#help-development

1 messages · Page 63 of 1

sturdy frigate
#

My question is what to exclude I suppose

quiet ice
#

The provided scope results in the dependency and all it's transitives to not be shaded in

tender shard
#

why is that weird

eternal oxide
#

well, never shade spigot/api

eternal oxide
#

never shade other plugins, like vault nor protocolLib

sturdy frigate
#

So i have to exclude spigot-api from utilityPkg?

tender shard
#

no

quiet ice
#

Eclipse's autocomplete says following thing about provided:

This is much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. For example, when building a web application for the Java Enterprise Edition, you would set the dependency on the Servlet API and related Java EE APIs to scope provided because the web container provides those classes. This scope is only available on the compilation and test classpath, and is not transitive.

tender shard
#

just set everything you don't wanna shade to "provided"

sturdy frigate
#

Thanks, I understand that, my question is what I shouldn't shade

quiet ice
#

If "utilityPkg" declares "spigot-api" as "provided" it will not be shaded in

#

even if you set "utilityPkg" as "compile"

sturdy frigate
tender shard
frosty tinsel
sturdy frigate
quiet ice
#

However if "utilityPkg" declares "spigot-api" as "compile" it will be shaded in if "utilityPkg" is declared as "compile". You need to manually exclude "spigot-api" in that case

quiet ice
tender shard
quiet ice
#

They are basically downloaded at runtime and needn't be bundled (shaded) with your jar

#

Only declared in your plugin.yml

tender shard
#

a library's readme will tell you if it needs to be shaded or nont

sturdy frigate
quiet ice
#

Yeah, I am talking about scopes there

sturdy frigate
#

Oh okay, is providing no scope considered compile?

quiet ice
sturdy frigate
tender shard
#

e.g. apache commons

tardy delta
#

guava

quiet ice
#

But it won't be in the lib's readme page

tender shard
#

well thats what I said

quiet ice
#

It needs to be on the classpath somehow

tender shard
#

I said "they will tell you if shading is required"

quiet ice
tender shard
#

yeah

#

that's what I am saying

quiet ice
#

Java won't magically add classes to the classpath

tender shard
#

I know

sturdy frigate
#

Okay great, so: I shouldn't shade spigot, and libraries that don't* need to be shaded according to their Docs, and shade everything else

tender shard
#

the general idea is to shade nothing

quiet ice
#

Okay actually Vault and Protocol-api and other plugin-apis that take the form of plugins needn't be shaded now that I remember

tender shard
sturdy frigate
#

Ahh right, someone said something about it being downloaded when run?

tender shard
#

that's the libraries feature from plugin.yml

quiet ice
#

That is only done if you declare it manually in the plugin.yml

sturdy frigate
#

Oh the softdepend, depend and the such?

quiet ice
#

nah, that is for plugins

sturdy frigate
#

Ah okay didn't know you could declare deps in the yml

tender shard
#

you should just stop worrying so much about it and set everything to provided

quiet ice
#

Spigot will never download other plugins

#

?plugin.yml

#

?pluginyml

#

?plugin

sturdy frigate
tender shard
#

there is no such command

tardy delta
#

l

quiet ice
#

jesus, how stupid is this

sturdy frigate
#

?tag pluginyml

#

maybe?

#

nop

tardy delta
boreal sparrow
#

Is there an easy replacement for the /fill command in code?

tardy delta
#

just use worldedit

young knoll
#

Nested for loops

sturdy frigate
#

thanks very much guys

quiet ice
tender shard
tender shard
quiet ice
#

?plugin-yml god damn it

undone axleBOT
tender shard
#

thats missing i nthe list

quiet ice
tender shard
#

someone should add it to the listt

boreal sparrow
tender shard
boreal sparrow
#

oh?

young knoll
tender shard
#
for(int x = -5; x <= 5; x++) {
  for(int y = 64; y <= 128; y++) {
    for(int z = -5; z <= 5; z++) {
      // do something
boreal sparrow
#

oh yea

#

thanks

tender shard
#

this wouldd loop over all blocks between -5,64,-5 and 5,128,5

boreal sparrow
#

yea

#

should the for loops be inside eachother?

tender shard
#

yes

young knoll
#

Yes

boreal sparrow
#

Ok thanks

hushed basin
#

where these removed from the json library at some point or am I doing something wrong? json-20220320

quiet ice
#

that is json-simple which is deprecated

#

org.json:json never contained those classes

hushed basin
#

ok so do I need an older library?

quiet ice
tardy delta
#

pfp ran away?

quiet ice
#

As you see that library is outdated AF. I recommend migrating to other json parsing libraries

boreal sparrow
#

I could just change it to -- instead of ++ but id like this to be in a method

drowsy helm
#

you start from -10

#

go to 0

tender shard
#

?

drowsy helm
#

dont start from 0

tender shard
#

Yeah just adjust the numbers lol

tardy delta
#
void fill(int fromX, int fromY, int fromZ, int toX, int toY, int toZ) {
  for(int x = fromX; x <= toX; x++) {
  for(int y = fromY; y <= toY; y++) {
    for(int z = fromZ; z <= toZ; z++) {
      world.getBlock(x, y, z).setType(smth);
}```will this work?
boreal sparrow
#

XD

hushed basin
#

Thank you so much I thought I needed just org.json

drowsy helm
#
    public void fill(int x1, int x2, int y1, int y2, int z1, int z2){
        int xMin = Math.min(x1, x2);
        int xMax = Math.max(x1, x2);
        
        int yMin = Math.min(x1, x2);
        int yMax = Math.max(x1, x2);
        
        int zMin = Math.min(x1, x2);
        int zMax = Math.max(x1, x2);
    }``` can do this so you dont ahv eto check which is smallest
boreal sparrow
#

oh yea

tender shard
#

flashbang

#

good morning everyone

tardy delta
#

bruh

#

its only 2pm

drowsy helm
#

intellij was made for mac

#

the icons go so well

tender shard
tardy delta
#

well nearly 2pm

young knoll
#

15 minute time zones would be wack

tender shard
#

remember 1000 years ago? there were no timezones

#

every city had its own local time

#

pepperidge farm remembers

lofty zephyr
tardy delta
#

lol

obsidian drift
#

I can't type

tardy delta
#

skill issue

#

maybe link is blocked

lofty zephyr
#

xd

tender shard
#

they will just get deleted and you'll get a temp ban or warning if you're lucky

#

at least post your spam in offtopic instead of dev forum

vital sandal
#

How can i send 2 respawn packet

#

Without making player stuck in terrian loading.

drowsy helm
#

why do you need two

vital sandal
#

If i send 1 the player will be broken and cant interact with world

drowsy helm
#

you're not sending it at the right time then

#

or the wrong values

vital sandal
boreal sparrow
#

Can you do this?

Thing()

public void Thing(){
//Do something
}

(ie. call the method before it has been... set?)

vital sandal
#

What is wrong ?

boreal sparrow
#

its just so weird to me, since the method hasnt really been set yet

tender shard
#

you cannot invoke methods outside of code blocks

golden turret
#

your code bad

young knoll
#

Everything is compiled in java

#

It’s not like python :p

vital sandal
tender shard
#

only javadoc warnings, and one from md5's plugin

young knoll
#

What are you sending a respawn packet for anyway

vital sandal
eternal oxide
tardy delta
#

found why my code wasnt working lol, i was working with an invalidated player object :/

vital sandal
#

All tried out

eternal oxide
#

I posted full code to change skins. fully working

vital sandal
eternal oxide
tardy delta
#

do plugins load after the world loads?

#

need a way to check if the plugin is reloading in onEnable

eternal oxide
#

load is before worlds

#

you test in onLoad if Bukkit.getWorlds().isEmpty()

tardy delta
#

i need to check in in onEnable :(

eternal oxide
#

if empty is a startup, if not its a reload

#

set a boolean flag in onLoad

#

read it in onEnable

tardy delta
#

hmm how did i not come up with that smh

#

skill issue

vital sandal
#

I dont use external lib :l

#

Even though protocol is greate

eternal oxide
#

what external lib?

#

that is pure NMS

tardy delta
#

ive been thinking the whole night about my code lol

vital sandal
#

Protocol ?

young knoll
#

No protocollib there

#

I do see some kind of NMSUtil from multiverse tho

eternal oxide
#

nope, thats mine, posted a few posts later

young knoll
#

Ah

#

Oh multiversion

#

I can read

eternal oxide
#

🙂

onyx fjord
#

i lost all my braincells

obsidian drift
#

Is there a way of changing the players prefix while changing their name?

onyx fjord
#

But it finally works!

tardy delta
#

all of them?

sturdy frigate
#

Is there a way to disable this on the server?

obsidian drift
eternal oxide
#

prefix is not a Profile thing

onyx fjord
#

or you want precoded plugin

sturdy frigate
#

Sure code or precode, any is fine

#

I just want to remove it

onyx fjord
#

check out my spigot page then 😄

sturdy frigate
#

What is it?

onyx fjord
#

AntiPopup is the plugin name

sturdy frigate
#

ohh wait your name is your spigotmc name right

#

ah okay

onyx fjord
#

it does what you want + removes warning on join

sturdy frigate
#

Noice

#

is it open sourced?

onyx fjord
#

yes

sturdy frigate
#

Very cool thanks

onyx fjord
#

youre welcome

ashen quest
#

is that the new 1.19 thing

sturdy frigate
#

Microsoft

ashen quest
#

man i hate MS

#

fuck you whoever thought of this

rough basin
#

I cant use Spigot with gradle
It builded successfully but i cant import them in Main Class, what should I do?

tender shard
#

?paste

undone axleBOT
tardy delta
#

hmm nice comments

rough basin
#

why cs

#

nah

tardy delta
#

smh cant userMap.computeIfAbsent(id, storage::loadPlayerSync)

tender shard
boreal sparrow
#

So, I have this method to select a hunter from the players in a provided world:

public List<Player> getHunter(String world) {
        List<Player> players = new ArrayList<>(Objects.requireNonNull(Bukkit.getWorld(world)).getPlayers());
        Player hunter = players.remove(new Random().nextInt(players.size()));
        Player hunter1 = players.remove(new Random().nextInt(players.size()));

        List<Player> hunters = new ArrayList<>();

        hunters.add(hunter); 
        
        return hunters;
}

And this method to retrieve all players that are not hunters

public List<Player> getNotHunters(String world, List<Player> hunters) {
        List<Player> players = new ArrayList<>(Objects.requireNonNull(Bukkit.getWorld(world)).getPlayers());

        for (Player hunter : hunters) {
            players.remove(hunter);
        }
        return players;
}

The problem is: sometimes players are both a hunter and a not hunter, as well as the hunters receiving two messages each somehow. This is how I call the method:
https://pastebin.com/rrRfwD3i
It is also set up in the main class like this:
https://pastebin.com/9YbQKtDm

The hunters and not hunters lists are also cleared after the game, so I'm really confused

tardy delta
#

cme

#

ig

#

player.removeAll(hunters)

drowsy helm
tardy delta
#

hmm the return value of someMap.computeIfAbsent(key, key -> null) when the entry is not present should be null right?

tardy delta
tender shard
tardy delta
#

ok then i ca, shorten my code 👌

tender shard
#

i dont understand why intellij doesnt suggest to suppress this warning, as it's obviously pointless and there is no other solution than to suppress it

tardy delta
#

alt enter

#

or click more actions ig

tender shard
quaint mantle
tardy delta
#

ah then do it yourself lol

tender shard
#

also the "generify" thing never does ANYTHING

tardy delta
#

mye sometimes it gives some useful things

ashen quest
#

i hate that

ivory sleet
#

type erasure coming at u

tardy delta
#

or split into declaration and assignment bruh

ashen quest
#

yea

tender shard
#

yeah and everything is instanceof Object

ashen quest
#

thats even more trash

tender shard
#

so it cannot ever be wrong

#

so what's the fucking problem IntelliJ

quaint mantle
young knoll
#

Are primitives instanceof object

ivory sleet
#

well

tender shard
ivory sleet
#

it does that because generics are reifiable

#

or whatever the term is

young knoll
#

It is

tender shard
quaint mantle
#

lol

ivory sleet
#

shoulve used netbeans smh

quaint mantle
#

i get ultimate for free

ivory sleet
#

many do

#

since they give their licenses out to os maintainers and students

peak depot
#

how can I nick a player with name and skin like whats the packages (1.18.2)

tardy delta
#

lets not expose collections

#

and early returns 😏

young knoll
#

I like to keep my collections on full display

tardy delta
#

getOrDefault with null as default is just get impl

tender shard
#

and beef jerky

#

then it seems like it indeed doesnt get called

#

although thats hard to believe

golden turret
tender shard
#

ik

quaint mantle
#

youre a cat arent you

tender shard
young knoll
#

I’ve never had issues with the event

quaint mantle
young knoll
#

Granted I don’t think I’ve really used it on armor stands

tender shard
boreal sparrow
#

I have a list of two players, how can I disable these two players from damaging eachother

quaint mantle
tardy delta
#

@SuppressWarnings("all") heheheh

tender shard
young knoll
boreal sparrow
#

ok il ltry that thanks

tender shard
tardy delta
#

i had that on top of my utils class

tardy delta
#

lmao

quaint mantle
#

is there a way to the the

tender shard
#

how can people find this dude attractive

young knoll
#

I have a lot of @supresswarnings(“deprecation”) classes

golden turret
#

peoplee think you are shit

young knoll
#

Thanks paper api

golden turret
#

and nobody cares

quaint mantle
#

is it possible to make a creeper afraid like absolutely petrified, flabbergasted of a dog like it is of a cat?

tender shard
tender shard
#

but not sure whats it called

#

it might expect a Cat object and not a generic mobb

young knoll
#

It probably takes a generic mob

tender shard
#

see if the generic EntityDamageEvent gets called

young knoll
#

Since it’s used for other mobs too

tender shard
#

if it was only meant for those

#

no idea why

young knoll
#

This one is used for several afaik

quaint mantle
#

bru

tardy delta
#

what have i done :(

tender shard
#

i havent checked

quaint mantle
#

give me my role already

tardy delta
#

lets remove the weakreference ;)))

tender shard
#

!verify @quaint mantle

undone axleBOT
young knoll
tardy delta
#

cached value lmao

#

dont say anything

river oracle
tardy delta
#

changed it

young knoll
#

Da heck is a lazy value

tardy delta
azure hawk
#

Hi, im trying to make a Nick Plugin in 1.18.2 with Skin + Name. But i cant find anything online. Do you guys have any clues/videos/threads that could help me ^^
Would be nice. Thx :)

young knoll
tardy delta
#

something in rust inspired me to do that lol

chrome beacon
#

Lombok has lazy value :)

#

And it's thread safe

tardy delta
#

so has scala

tender shard
#

well then I also can't help :/

tender shard
quaint mantle
echo basalt
#

🤔

tender shard
#

let's KISS

quaint mantle
#

my father might be DEAD

tender shard
echo basalt
#

does anyone have a tool that can extract zips and organize them in a very good manner?

tender shard
#

I have no idea, just try it

young knoll
#

No

quaint mantle
#

his work college said he didnt come to the job and doesnt pick up phone

echo basalt
#

I'm messing with call of duty files, extracting sounds for my own minigame

tardy delta
#

hmm hot stuff 🥵

echo basalt
#

finding all the music sound effects

#

this is so gangsta

tender shard
tardy delta
#

bruh

tender shard
#

yeah @hoary knoll throws

tardy delta
#

@SneakyThrows

ivory sleet
#

@tender shard just to explain why unchecked cast is a warning level inspection

    record Conclure(){}

    record B<T extends Conclure>(T t) { }

    interface A<T> { T t();}

//then
A<Object> o = (A<Object>) (Object) new B<>(new Conclure());
System.out.println(o.t());

would result in a class cast exception

tardy delta
#

smells like committing a crime

tender shard
#

@hoary knollThrows

quaint mantle
#

nah bro @hoary knoll why you be throwing 🙁

tender shard
#

discord is so weird sometimes

ivory sleet
#

compile time check u can use from the language semantically to stop it/make it less error prone

tender shard
#

btw everyone

tardy delta
#

we just summoned a new Conclure() RUUUUNNN

tender shard
#

quick reminder that you should check your discord bot intent settings, or they might go offline soon

young knoll
#

I can confirm that armorstands should work fine with the EntityDamageByEntityEvent

#

I know this because I had problems with them bleeding

tender shard
#

omg best captcha ever

tardy delta
#

einen wattes

quaint mantle
#

yeah they added new captchas

tardy delta
#

was ist das

quaint mantle
#

just animals

#

domestic cat

young knoll
#

What

quaint mantle
young knoll
#

Is that giraffe in the centre

quaint mantle
#

yes

tardy delta
#

they got conclures dog

quaint mantle
#

it looks high off meth

inland axle
#

nah

young knoll
#

It looks like it’s neck got snapped

tender shard
#

wtf

#

did jokni leave this discord?

tardy delta
inland axle
#

meth would be more apparent

tender shard
tender shard
quaint mantle
#

translate it

#

youre german

tardy delta
#

no

#

and too lazy

#

LazyValue<Fourteen> hehhee

#

smh

tender shard
echo basalt
#

I'm thinking about buying winrar so I can stop seeing these fucking prompts

young knoll
#

7zip

tardy delta
#

^^

tender shard
#

winrar is better than 7zip

#

but 7zip is free and open source

young knoll
#

I mean

tardy delta
#

7z has better compression 🦾

obsidian drift
#

Can you run PluginManager#callEvent asynchronously?

tender shard
#

not for .rar files

young knoll
#

What kind of fancy zipping are you doing

young knoll
tardy delta
#

oh

alpine urchin
#

yes, in constructor of events there is a boolean

tender shard
#

^

alpine urchin
#

which decides where the event can be called async or not

young knoll
#

Most cannot

tender shard
#

fun fact: in NMS, there's a "isFastFood" method/boolean on "Food" objects

#

and dried kelp is the only food considered fastfood

young knoll
#

Hehe

#

Yeah you eat kelp faster

tender shard
#

yeeehaw

#

I'm a cowboy

tardy delta
#

i need food

tardy delta
#

but i already ate everything

alpine urchin
echo basalt
#

Fun fact: CraftEntity#getEntity(nmsEntity) is the most digusting thing that spigot could make

young knoll
#

All hail the magic conch

tender shard
alpine urchin
#

Fun fact: NMS is a package

young knoll
#

It doesn’t even cover all of the internal code anymore

#

Since the repackaging

echo basalt
#

fun fact: there's a quagmire sound category within the Call of Duty: Black Ops files

quaint mantle
#

i can speak germn

alpine urchin
#

Fun fact: you can use Player#getPing on 1.17+ without needing reflection and nms

quaint mantle
#

ive been learning german for 3 years in school and dont know shit

tardy delta
#

ich bin german

quaint mantle
#

too far

tardy delta
#

ich speak german very gutt

tender shard
quaint mantle
#

i

alpine urchin
#

to know a user’s ping?

tardy delta
#

and i got 49% on my german exam heheheeee

alpine urchin
#

lol

young knoll
#

For display reasons I guess

alpine urchin
#

making a ping plugin or to visualize it somehow

tender shard
young knoll
#

Like a scoreboard

quaint mantle
young knoll
#

I

quaint mantle
#

what the hell idid i say

alpine urchin
young knoll
#

I feel geoip is better for that

alpine urchin
#

in the docs md5 even wrote it is for that and that only

#

not anticheat purposes as the client can spoof it

young knoll
#

it’s also like a rolling average over 30s or something

alpine urchin
#

so it should be used in a case where there’s no advantage in lying

#

yeah 20 on modern minecraft

vital sandal
eternal oxide
#

it uses Mojang mappings

tender shard
#

imagine using obfuscated mappings 😩

young knoll
#

The before times were dark days indeed

tender shard
#

yeah everytime I add new NMS stuff, it's just copy paste for 1.19 - 1.17. and then comes 1.16.X 😐

#

and everything is called a()

young knoll
#

That’s why we shun old versions

#

I wouldn’t even have to update my plugins if it wasn’t for craftbukkit :(

tardy delta
#

heres your daily hot code 🥵

#

"keeps continuing" maybe

young knoll
#

Continues

tender shard
#

quick, gimme ideas for stuff that can only be done with NMS

tardy delta
#

gud

young knoll
#

Uhh

#

Make pistons push tile entities

tender shard
#

hm nah

vital sandal
tardy delta
#

make boats panic

tender shard
#

Player.spigot().respawn()

#

no nms needed

vital sandal
young knoll
#

Make all mobs follow the player

tender shard
young knoll
#

But they only get 1 block away from you and then just stare at you

river oracle
#

you likely have just bad design

young knoll
#

Imagine if creepers just started at you instead of exploding

vital sandal
#

I have been searching for a method to fake respawn without killing

#

None work :l

young knoll
#

Kick them

river oracle
young knoll
#

Nice

azure hawk
#

how can i nick a player + skin in 1.18.2

ashen quest
tender shard
#

AtomicOneByte

young knoll
#

I actually found something I couldn’t figure out how to do properly with NMS

#

Had to use protocollib

tender shard
#

what is it?

tender shard
tardy delta
#

hehehe

vital sandal
tender shard
#

very good plot btw

tender shard
#

that's what's wrong with it 😛

vital sandal
#

player cant interact with world after it

#

the player do got reloaded but ^

azure hawk
#

Hi im trying to make a Nick Plugin in 1

echo basalt
young knoll
#

You don’t even need NMS for that really

echo basalt
#

ehh

#

technically not but it would be fun with

tall dragon
#

well how would you do that then

#

would love to know that

young knoll
#

Now that we have BlockDamageAbortEvent and Player.sendBlockDamage

tender shard
#

I basically look for ideas to add to my lib. e.g. I today added a PDC -> string and string -> PDC serializer

echo basalt
#

I mean yeah but what about making blocks break faster

#

sendBlockDamage just sends a packet

vital sandal
#

except the way of maping

young knoll
echo basalt
#

what about making it slower

#

you gotta cancel packets and shit

vital sandal
#

Have a look at hypixel mining system^

echo basalt
#

the client also predicts

tardy delta
#

will this work to see if the plugins jar is in the plugins/update folder?

peak depot
#

Hi, im trying to make a Nick Plugin in 1.18.2 with Skin + Name. But i cant find anything online. Do you guys have any clues/videos/threads that could help me ^^
Would be nice. Thx :)

tender shard
#

oh wait

#

wrong link again

#

this @vital sandal

#

that's the craftplayer respawn() method

young knoll
#

Give them client mining fatigue

#

So they never break it themself

vital sandal
#

i dont need them to die ...

tender shard
#

I know

#

that's why I told you to ignore the health check

young knoll
#

Just call the one line

tender shard
#

oh actually this is something I could add to my libb

#

just a wrapper for respawn() without the need to die

young knoll
#

What would that feel like in real life

tender shard
#

awesome

river oracle
# peak depot ?

if you need a video tutorial to make a plugin you want you are way in above your head learn more before continuing

tender shard
#

i dont think they are looking for a "how to make a plugin video"

#

but more like "what to do to change player's name and skin"

peak depot
tender shard
#

package?

river oracle
#

PlayerProfile

#

Player#getPlayerProfile

peak depot
#

thank you

river oracle
#

or is it human entity

#

i forgot

#

one of those too though

tender shard
#

that will not work

young knoll
tender shard
#

you need to send packets to update the names to other players

#

and skins have to be signed

river oracle
tender shard
tender shard
river oracle
#

I thought you could change skin atleast with PlayerProfile

tender shard
#

only for heads, it works with unsigned skins

vital sandal
tender shard
young knoll
#

Afaik using player profile works for everyone but the owner

tender shard
tender shard
young knoll
#

Huh

tender shard
#

or if the signature is invalid

young knoll
#

Haven’t tried

tender shard
#

i remember how happy I was when PlayerProfile was added, until I found out that it's still useless

river oracle
#

atleast according to the op

tender shard
#

for heads, yes, but not for players

river oracle
#

again I specifically looked at player skins

tender shard
#

hm

#

maybe I'm wrong

vital sandal
tender shard
#

I am wrong very often

young knoll
#

There’s only one thing to do

#

?tryandsee

undone axleBOT
tender shard
#

but in this I am actually quuiiiite sure

tender shard
#

you copy paste the code I sent

#

without the health check

river oracle
tender shard
#

yes, getting the URL is easy. but if you just change it, nothing will happen if you dont have a signed texture

#

no idea why those signatures are required in the first place, but... mojang /shrug

river oracle
tender shard
#

oh wait

#

I misread your message I think

river oracle
#

some server did it via item data on the armor

tender shard
#

yeah anyway, if someone finds an easy way to change skins, please share the solution 😄

vital sandal
young knoll
#

Hijack the users computer and make them physically change their skin

tender shard
#

it's in CraftPlayer line 193 on 1.19.2

river oracle
tardy delta
#

getHandle().connection.connection

young knoll
#

Don’t question it

tender shard
vital sandal
#

:l

tender shard
#

1.16 is like player.playerConnection, 1.17+ is player.connection.connection

#

are you using mojang mappings?

vital sandal
#

nope

tender shard
#

because it seems like you don't

vital sandal
#

spigot

tender shard
#

yeah

#

you must use mojang mappings

young knoll
#

Ewww unmapped

tender shard
#

I won't even try to help people who don't use mojang mappings because it's just a pain in the ass, and not in the good way (scnr)

#

that's what he said

#

okay I'll get out

vital sandal
#

:L

#

okay

tender shard
#

you will love mojang mappings

#

they are so much better

vital sandal
#

hope it gonna not crash all of my previous code

tender shard
#

hm

#

if you used NMS, then it'll break

#

you will have to "translate" it to mojang names too

#

you can either go full mojang mappings, or full obfuscated

#

but you cannot mix it

#

okay in theory you could mix it but....

#

not a good idea

drowsy helm
#

No point really

tender shard
#

yeah well if someone already has 300 lines of obfuscated code, it COULD make sense to just keep it and add both, spigot remapped and spigot obfuscated

#

but yeah that seems like a bad idea

young knoll
#

You’ll have to update that obfuscated code never version anyway

#

Might as well replace it now

drowsy helm
#

Once I moved to mojang mappings I never looked back

tender shard
tender shard
#

same for eclipse -> intellij for me lol

drowsy helm
#

Yeah my lecturers tell everyone to use netbeans or eclipse

#

And I cringe

young knoll
#

But but

#

My sidebar with all my projects

drowsy helm
#

“IntelliJ is alright but netbeans is the best ide”

tender shard
#

erm

#

lecturer still living in 2009

drowsy helm
#

Pretty much

glossy scroll
#

IntelliJ is a very resource intensive ide tho

drowsy helm
#

IntelliJ is unbeatable tbh

glossy scroll
#

Its not worth the resource cost for most people, esp college students that are learning

vital sandal
#

it have a free version

drowsy helm
#

I mean sure if you’re using an i3

glossy scroll
#

Wdym it takes like a 2gb ram

drowsy helm
#

Most modern notebooks have at least 16gb

glossy scroll
#

Not really, more like 8gb

vital sandal
glossy scroll
#

You dont know what “resource cost” means lol

#

Chrome tab, minecraft, and intellij is borderline impossible on 8gb

compact haven
#

he speaks some truth

#

just minimal truth

tender shard
#

my intellij takes up 3.4 gb and I only have one project open

vital sandal
compact haven
#

3.4gb

ancient plank
#

My computer has 8gb of ram

compact haven
#

that’s crazy

tender shard
glossy scroll
#

See there we go

compact haven
#

my computer has 16gb tho so idc kek

glossy scroll
#

I lowballed it lmfao

tender shard
#

now you destroyed my joke

#

thanks, adele...

#

smh

ancient plank
#

I can't have Minecraft open with intellij open 💀

compact haven
#

open 8gb swap space

vital sandal
#

it take like 3W of power ;d

compact haven
#

then u can have 16gb of ram

tender shard
#

talking about RAM... eat this

compact haven
#

3w is literally like the plastic corner of a gpu

#

no one cares about your 128gb dedi :(

#

when do I get one alex

tender shard
#

it has an additional 128gb of swap

vital sandal
#

is there any mojang mapping for 1.16.5 ?

tender shard
#

no

vital sandal
#

;<

tender shard
#

mojang mappings for spigot started in 1.17

compact haven
#

1.16.5

#

choose between 1.8.8 or 1.19.2

young knoll
#

Not on spigot

vital sandal
#

so how could i fix mine problem

tender shard
#

check out the source code and see which method is the respawn one

#

or wait until I did it

ancient plank
#

Best resource which I've never figured out how to use is minimappings

tender shard
#

minimappings is broken

compact haven
#

hey Alex, what’s your swappiness 😏

ancient plank
#

Is it

tender shard
#

screamingsandals is better imho

ancient plank
#

It worked when I used it

tender shard
vital sandal
#

in org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer right ?

tender shard
#

unless your browser allows cross site scripting

tender shard
#

I will tell you the exact name in a few minutes

vital sandal
#

how to open it :l

ancient plank
#

this is so sad

tender shard
tender shard
young knoll
#

No

#

They’re dead

ashen quest
#

yes

#

Dogs >>>>>>>> Cats (waiting for optic to ban me)

vital sandal
#

hmmm

tender shard
#

@vital sandal

vital sandal
#

i think i know the issue :l

tender shard
#

its called "moveToWorld"

#

in 1.16

tardy delta
#

would this work to check if the plugins jar is within the plugins/update folder?

young knoll
#

It gets moved before it loads afaik

tardy delta
#

ah

ashen quest
tender shard
#

@vital sandal ```java
@Override
public void respawnPlayer(Player player) {
((CraftPlayer)player).getHandle().server.getPlayerList().moveToWorld(((CraftPlayer)player).getHandle(), true);
}

#

this is all you need

#

Player is a bukkit player

#

that's for 1.16.5

tardy delta
vital sandal
#

I think i broken the corefile by adding —remmaped

tender shard
#

corefile?

vital sandal
#

I need to rerun buildtool

tender shard
#

wdym with corefile

vital sandal
#

the spigot lib

tender shard
#

it doesn't break by using --remapped

#

using --remapped will just create an additional jar in your maven repo

vital sandal
#

It resulted in my server :l

tender shard
#

but as said, remapped wonnt work for 1.16.5 anyway

#

1.17 is the first spigot version that can use remapped

#

i still remember when it was announced and I was like "nooo" and then when I understood what it means, I was like "yeeehaaaaw"

ancient plank
#

yeehaw parner

sturdy frigate
#

I would like to use default items from minecraft to create little powerups where you can right click to gain certain effects, I heard before something about giving items tags and detecting them when they're being right clicked on? How do i go about this

ashen quest
zealous osprey
sturdy frigate
vital sandal
#

Now it work thank you

#

But still need to teleport them back

tender shard
#

but it looks like ass

#

I can show in a minute

#

@ancient plank check out the site again

#

it's now in this weird, half assed dark mode

#

but the code blocks look like shit and so does the search bar

opal juniper
#

black bade, use grey

tender shard
ancient plank
#

I don't like pure black in design

tender shard
#

yeah I bought it while drunk

#

it was a bad decision

#

but I won't refund because it's not their fault that I bought it

ancient plank
#

I just went and found some random theme that looked nice and put it on my website kekw

tender shard
#

i still need someone who does a proper website for my foundation but all offers I got were like 3000k+€ -.-

tender shard
tardy delta
#

im also very abused so give me money ||jk||

#

ah shit im not a child anymore

wet breach
sturdy frigate
#

How do I get the highest collidable/solid block under a player?

tender shard
wet breach
#

for that much, I would have them include an app

tender shard
#

e.g. sth like this:

sturdy frigate
#

Okie, I could keep on calling getRelative() I suppose

tender shard
#

for int i = world.getMinHeight(); i < player.height; i++
currentblock = world.getBlockAt(coordinates)
if block.getType().isSolid(): currentblock = this block

young knoll
#

Start at the player and go down

tender shard
#

oh yeah

#

that makes way more sense

young knoll
#

And then break away once you find something

tender shard
#

yeah

#

thats better

frosty tinsel
tender shard
#

where are you from

#

in my country, 3000€ is like what minimum wage people earn in about 2 months

frosty tinsel
young knoll
#

I assume you mean 3000€ or 3k €

#

Not 3000k €

tender shard
#

oh shit

frosty tinsel
#

Oh

tender shard
#

yeah obviously I meant 3000€

#

sorry haha

#

not 3 million

frosty tinsel
tender shard
#

the cheapest offer I got was 2100€

frosty tinsel
#

My bad XD

tender shard
#

most agencies wanted 3000€ or more

#

and that's just not worth it

sturdy frigate
frosty tinsel
tender shard
#

btw you might also wanna check for isOccluding()

sturdy frigate
wet breach
tender shard
#

e.g. isSolid() will e true for fences although they let light pass through

sturdy frigate
#

Ahh I see

tender shard
#

isSolid() basically means "can you walk on this"

#

so glass, fences, etc are solid, but none of those are occluding (letting light through)

sturdy frigate
#

Yup okay gotcha

tender shard
#

perfect

tender shard
#

those are normal prices

#

my father's website costed him like 7000€

#

and it's not even a nice website

wet breach
tender shard
#

that is true lol

#

yeah it's kinda fucked up

wet breach
#

in the US, for a cheap basic website with 1-3 pages and simple navigation you are looking at anywhere between $100-$300

tender shard
#

I mean, if you spend 2 weeks to design the whole website and you get 3000€, then you probably pay like 1200 in taxes so you're left with 1800€ which is "okay" for 2 weeks

wet breach
#

if you want something a bit nicer, easily looking at $500 and that gets you quite a lot to even include them setting up domains for you and everything lol

tender shard
#

no idea whether 2 weeks is realistic, I just made that number up

wet breach
#

the more customized the site needs to be or if it needs to interface with something, the more it will cost.

tender shard
#

i only need a very simple site with a system where people can donate online

#

without paypal

#

we must not accept paypal for legal reasons

wet breach
#

but paypal has donate buttons already

tender shard
#

yeah but laws for charities are very strict in germany because some people kept abusing them

wet breach
#

yay for the dumb people

tender shard
#

the only thing we may legally accept is regular bank transfer

#

but we dont get much donations anyway, so not a real problem haha

wet breach
#

what card processor are you using?

tender shard
#

none, we got a regular bank account

#

well it's some kinda charity account

#

so we dont have to pay any banking fees

ancient plank
#

jeff media

wet breach
#

that isn't what I meant. I meant processor to accept cards online

tender shard
#

we dont have any

#

we used to just have our IBAN written on the website

tender shard
wet breach
#

then you really can't interface your website with anything except maybe your bank if they have any API's to automatically setup EFT

tender shard
#

my charity has nothing to do with jeff media gbr

tender shard
wet breach
#

no it isn't

tender shard
#

we would need weeks to get that money back

sullen canyon
#

when i throw ender pearl on 1.8.8 spigot then i cant hit anyone and no one can hit me for like 3-5 seconds

tender shard
#

and if someone really wants to donate, they could just transfer the money via bank anyway

sullen canyon
#

i have only my custom plugin so i dont know what the issue

tender shard
sullen canyon
compact haven
tender shard
#

what does your pluginn

wet breach
#

I started out with web design, and I still kind of do it on some rare occasions, but I still keep tabs on the prices and you can easily pay cheap prices for a simple site lol

tender shard
sullen canyon
#

for skywars

#

is that normal for regular spigot or its my plugins issue?

wet breach
sullen canyon
#

just tell me and then i will look up

tender shard
vale veldt
#

1)```java
Location newLocation = regionObject.getMax();
while (true) {
double x = NumberUtil.randomInt((int) regionObject.getMin().getX()-1, (int) regionObject.getMax().getX());
double y = NumberUtil.randomInt((int) regionObject.getMin().getY()-1, (int) regionObject.getMax().getY());
double z = NumberUtil.randomInt((int) regionObject.getMin().getZ()-1, (int) regionObject.getMax().getZ());
newLocation.setX(x);
newLocation.setY(y);
newLocation.setZ(z);

        // Logic with location & return or continue
    }```

2)```java
while (true) {
World w = regionObject.getMax().getWorld();
double x = NumberUtil.randomInt((int) regionObject.getMin().getX()-1, (int) regionObject.getMax().getX());
double y = NumberUtil.randomInt((int) regionObject.getMin().getY()-1, (int) regionObject.getMax().getY());
double z = NumberUtil.randomInt((int) regionObject.getMin().getZ()-1, (int) regionObject.getMax().getZ());
Location loc = new Location(w, x, y, z);

        // Logic with location & return or continue
    }``` 

What is the best way to do this? I guess the first one that reuses an existing location and does not create a new one by iteration?

wet breach
#

for people in the US, as long as who you are donating too is a non-profit organization of legal nature, then all you need is just a receipt of donation

tender shard
tender shard
#

it's not 100% a donation if any online payment system takes a commission or anything

vale veldt
wet breach
#

paypal doesn't take a commission for donations

tender shard
#

but the impact is so small that I just wouldnt think about it at all

tender shard
vale veldt
#

mmm I understand

#

thx alex

tender shard
#

np

#

"premature optimization"

wet breach
#

I would use ints for those locations

tender shard
#

Just dont worry about what's better if both is working fine

#

e.g. sometimes people do bitshifts because they think it's "faster than using /2"

wet breach
#

no sense in using doubles unless you have borders that are not full block length lol

tender shard
wet breach
tender shard
#

exactly

young knoll
#

From what I’ve heard C compilers will optimize / 2 to a bit shift

#

No idea if the java compiler does

tender shard
#

java doesnt do that, I checked it

#

but then I read that most CPUs automatically use bitshifts if possile

#

and then I stopped worrying aobut it

vale veldt
young knoll
#

Fair enough

tender shard
#

you cannot create regions that aren't "full blocks"

wet breach
vale veldt
#

mmm good

wet breach
#

also, math on doubles takes more cpu resources then it does on ints

tender shard
#

yeah IIRC a double is 8 bytes while an int is "only" 4 bytes

wet breach
#

even if your doubles are whole numbers, and it goes through 2 different cpu routines for double vs ints

tender shard
#

and an Integer object is like 192 bytes lol

#

or sth like that

#

new Object() is 128 bytes if I am not totally stupid rn

wet breach
#

it varies between implementations. Typically that is true

tender shard
#

oh yeah, I think 32/64 bit also makes a difference

wet breach
#

it does

tender shard
#

but tbh who cares about 100 bytes

#

that's maybe an issue in embedded stuff, but not in a spigot plugin

wet breach
#

only time you need to worry about size of objects like that, is if you are dealing with a system that takes up huge globs of ram to just run

#

like somewhere around 32gb-64gb

#

then it becomes necessary to optimize on those levels

tender shard
#

btw frostalf. you guys in USA always say "i need to go the bathroom" but noone ever says "i need to go the toilet lol"

#

this just came into my mind because I really have to go to the toilet

lost matrix
#

Not sure what this is about but there is literally no difference between using a byte, short or int in java. Only clarity wise.

young knoll
#

Tf?

wet breach
young knoll
#

Are you telling me they all take 32 bits

tender shard
lost matrix
#

Yes

#

All are stored in one word

#

32 bits

#

Only exception are arrays

tender shard
#

but I am wrong very often, so maybe this time too

#

story of my life

#

you are talking about fields I guess, since they store a memory address

young knoll
#

TIL what a word is

lost matrix
#

Only double and long have different memory implications

#

the rest is all the same

tender shard
#

hm I cant really find that in the text you sent

#

but I also dont question it 😄

lost matrix
#

Its in the table of computational types

young knoll
#

I guess we have so much memory these days wasting 24 bits doesn’t really matter

tender shard
#

ah the one with "category"

#

but where does it say "category 1 = XX bytes"?

tender shard
#

still, we got nothing bbetter to talk about and I find stuff like this interesting

lost matrix
#

We are nerds...

tender shard
#

and I am proud of that

quiet ice
echo basalt
#

ehh

quiet ice
#

How many slots it occupies on the stack does not mirrior the memory it consumes

tender shard
quiet ice
#

The document even acknowledges that this was a mistake

tender shard
#

bbealdung claims that a byte is indeed only one byte

echo basalt
#

reading into this convo makes me feel useless for this

quiet ice
#

HOWEVER, int, byte, short, etc. are Integers for the JVM

#

HOWEVER JIT may optimize it

wet breach
#

They are backed by an integer would be the correct thing to say

chrome pewter
#

Hi for some reason when i try calling the class it dosent work @Override public void onEnable() { getServer().getPluginManager().registerEvent(new MovementEvent(),this); }

wet breach
#

as for the object forms, other then long and double, they are all stored in a 32bit cell

tender shard
#

baeldung claims that an integer only takes up 4 bytes (32 bit)

ashen quest
tender shard
quiet ice
young knoll
#

No

tender shard
#

@worldly ingot

ashen quest
lost matrix
#

VPS is garbage. If you have 20 bucks a month to spare then you can just get a root server and run everything on it.

ashen quest
quiet ice
tender shard
young knoll
#

Oh man they are apparently the ceo of this host

chrome pewter
# ashen quest show that class

import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerMoveEvent;

public class MovementEvent  implements Listener {

    @EventHandler
    public static void OnPlayerJoin(PlayerJoinEvent event){
        Player player = event.getPlayer();
        player.sendMessage(ChatColor.LIGHT_PURPLE + "Welcome to the server");
    }

    @EventHandler
    public static void OnPlayerWalk(PlayerMoveEvent event){
        Player player = event.getPlayer();
        int x = player.getLocation().getBlockX();
        int y = player.getLocation().getBlockY();
        int z = player.getLocation().getBlockZ();

        Material block = player.getWorld().getBlockAt(x, y-1, z).getType();
        if (block == Material.GRASS_BLOCK){
            player.damage(20);
            player.sendMessage(ChatColor.RED + "YOU TRY ! ");
        }
    }
}
young knoll
#

Seeing the ceo advertising on discord makes me really eager to use it

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

tender shard
#

german laws for charities are extremely strict 🥲

#

your website has no data privacy policy and not even an address?

#

very sus

chrome pewter
gleaming grove
young knoll
#

I actually don’t think it matters

#

But iirc a certain fork can more effectively optimize non static event methods?

lost matrix
#

Imagine paying almost 120 bucks a month for a ryzen 9 vps with 64 gigs of ram and only 250 gigs of hard drive.
You can get this dedicated for half the price.

wet breach
worldly ingot
#

Fuck, dude. I need 10gbit/s internet speed at home

#

I might have to take him up

young knoll
#

Don’t we all

small current
#

guys how can i deserialize this to a location im coding a converter

young knoll
#

Cries in 10mbit

small current
#

why the plugin just done that

chrome pewter
tender shard
chrome pewter
#

sorry everyone

tender shard
lost matrix
tender shard
#

^

small current
#

i did not serialized it

#

a plugin did it

#

an im coding a converter

#

a data converter

tender shard
#

then just read it, I dont see the problem

#

@w= is the world