#help-development

1 messages · Page 1470 of 1

smoky lance
#

which means that if you run a task that lasts more than 50ms, you'll still lag your server (probably)

vestal dome
#

yes

young knoll
#

Async tasks are off the main thread

vestal dome
#

but it's very shortly tho.

vestal dome
young knoll
#

I mean that is also off the main thread

vestal dome
#

exactly 😂

smoky lance
#

I read a post about it but it was made by md5 in 2013 if I'm not mistaken, so don't mind me much

quaint mantle
#

Is there any difference in these 2 examples in terms of performance or whatever```java
class IPlayer{
final Core core;
public IPlayer(Core core){
this.core = core;
}
}

class IPlayer{
Core core;
public IPlayer(){
this.core = Core.getInstance();
}
}```

severe night
#

runTaskAsynchronously runs in the main thread or in parallel thread?

young knoll
#

Top one is preferred

severe night
#

Ok

#

thanks

vestal dome
#

it just creates another thread.

young knoll
#

Actually it uses one of the worker threads I believe

vestal dome
#

but if you're going to use async tasks every 2 seconds, I would honestly recommend you use "ScheduledThreadPool".

dense goblet
#

I was gone for a while but back to async methods, if I have calculateRoom running async to the main thread, and I come across a chunk that I need to take a snapshot of, what is the correct way of doing this? I haven't done parallel computing before.

quartz goblet
#

when vanilla minecraft does hit delay, does the hit delay apply to all damage? Like if one player hits you the tick after another source of damage, does that hit still register? Or does the 200ms delay apply to all sources of damage?

young knoll
#

All damage iirc

dense goblet
#

which data structure do I use for my map

#

and etc

eternal oxide
#

?paste

queen dragonBOT
eternal oxide
torn oyster
#

does Player.spigot().respawn() call PlayerRespawnEvent

dusk flicker
torn oyster
#

i dont believe it is hard to tell me

compact haven
#

How should I go about this? After toggling, the player can look around and all blocks that meet a condition of mine, will be marked with a particle. The troubling part is finding out where to place the particle for it to be both visible (so not inside the block) and facing the player, meaning it cant be on the other side of a wall, has to be on the side a player can see

dusk flicker
#

Well do your research, in the Javadocs it doesnt say it DOES or DOES NOT Call it

compact haven
#

@torn oyster its hard to believe anyone would know that off the top of their head

torn oyster
#

?Jd

dense goblet
eternal oxide
#

a completable future does the same as that does.

paper viper
#

CompletableFuture has blocking

#

get() is a blocking call

late cliff
#

What is the NMS packet for setting inventory items of the player? I tried looking for PacketPlayOutInventory

young knoll
#

PacketPlayOutSetItem iirc

late cliff
#

thank you

#

PacketPlayOutSetSlot

#

Hey

So basically I'm just gonna not use it (events instead of nms packets!!)

UGH I know....... I know... I'm sorry!!!!!!!!!!!!!!!!!

It's just that I'm not using it is all

HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAH

dense goblet
#

@eternal oxide does this look right? It's sync chunkloading which NNYa will scream at me for so I'll use PaperLib once I get the basic version working

eternal oxide
#

looks good. be sure you check for that null at the calling end

dense goblet
#

yup, nice ty

compact haven
# eternal oxide Not sure what you are asking

This is an example. Imagine the wool to be particles. The person on the outside (armorstand in blue) would see particles in the position of the blue wool, and the person on the inside (armorstand in red) would see particles in the position of the red wool.

eternal oxide
#

then raytraceBlocks

#

raytrace from the player to the target door then target.getHitBlock().getLocation().add(target.getHitBlockFace().getDirection());

#

will give you the location in front of teh door

dense goblet
#

if you know where the blocks are then I suggest you only raytrace against that specific block's AABB (rather than world.raytraceBlocks()), otherwise you will have particles spawning in front of the wall which stands between you and the door

eternal oxide
#

or, if you are only checking doors, get teh door facing and math to see which side is closer to teh player

vestal dome
#

So I have a block that the player placed, I need to spawn a wall depending on the direction of the player, how can I execute this, ElgarL

dense goblet
#

or if you only need 1m level of accuracy then no need for raycast

vestal dome
#

ideas are useful

dense goblet
#

i.e. block pos + (player pos - block pos).normalised

paper viper
#

i dont think you need vectors for this

#

as BlockFace should be enough

#

to suffice

dense goblet
#

but you need to know which face right

paper viper
#

Well, yes, but the entity has getFacing

dense goblet
#

oh so invert that

paper viper
#

mhm

eternal oxide
#

you can use the players direction to decide the walls geometry

dense goblet
#

yeah that sounds good too, not sure which is faster but unless you're doing it a lot it shouldnt matter

paper viper
#

its not about faster here lol. Vectors are just going to be more of a pain in the ass

#

in general

#

cause we dont like maths here

vestal dome
#

Change my mind

dense goblet
#

Bukkit vectors are kinda sucky

eternal oxide
#

it all depends if you only want north-south east- west walls

dense goblet
#

coming from Unity's Vector3/Vector2

#

plus no built-in Quaternion support

eternal oxide
#

if you want the alwasy 90 degree to teh player you need the vector

smoky lance
#

is there any difference between ProxyServer.getInstance() vs plugin.getProxy() in bungee?

eternal oxide
#

So your approach all depends on how you want your wall

vestal dome
#

know King of the hill?

#

on hypixeL?

#

instant wall?

eternal oxide
#

No

paper viper
#

yes ik that

eternal oxide
#

never been on Hypixel

vestal dome
#

that's how I want it.

eternal oxide
#

No clue what that walls are like

vestal dome
#

you place a block

#

and it spawns basically a cube

#

in front of you.

eternal oxide
#

always N/S E/W ?

vestal dome
#

it's not a cube but trying to make it simpler

#

no

#

it depends on how you place the block

#

or which direction you're looking

#

and it will spawn right in front of you.

compact haven
smoky lance
#

is there a limit of how many things I can send using plugin message?

vestal dome
#

nop

#

but cancel the event on the bungeecord so the client can't see the messages you're sending between bungeecord and spigot

eternal oxide
#

I can give you Projectile hit code that builds a wall and you can convert it to a block place

vestal dome
#

might be a good idea.

vestal dome
#

Thanks for the help btw

eternal oxide
#

?paste

queen dragonBOT
eternal oxide
smoky lance
dense goblet
compact haven
#

I'd just do a db query since once I have the block I would need to query anyways

dusty herald
#

I'm gonna loop every tick and have a for loop in them for each player online

vestal dome
#

cancel the message on the bungeecord.

#

or people will receive the plugin message.

dense goblet
#

but yea most efficient way is keep track of blocks as they are placed/destroyed and store them for example per chunk, then just loop nearby chunks

dusty herald
#

or maybe I should create a repeating timer for each player and remove it on disconnect

smoky lance
#

ok

torn oyster
#

how do i not save a world onDisable?

dusty herald
#

worlds are saved periodically iirc

dense goblet
#

keeping track of block destruction is a pain in the ass so prob better to verify if they still exist whenever you want to do something with them (in your case, display particles)

torn oyster
#

i disabled autosave

eternal oxide
#

all but Overworld you unload(false)

torn oyster
#

okay

#

i am doing that

compact haven
torn oyster
#
    @Override
    public void onDisable() {
        // Plugin shutdown logic
        Bukkit.unloadWorld("world_active", false);
    
        (more random stuff here)
    }```
compact haven
#

I will always know the block's location and the player's location

#

but I need to ensure the particle is facing the player, and is still within 1 block of the block's location

vestal dome
#

when u don't know how to store, use something

late cliff
#

Is there a method or something that allows you to get the slot-number of the given EquipmentSlot?

vestal dome
#

wdym?

late cliff
#

So the inventory has numbers for slots in there

vestal dome
#

well.......

late cliff
#

and there is also EquipmentSlot enum

vestal dome
#

hand = player.getInventory().getHeldItemSlot();

#

off_hand is another method in that category...

compact haven
#

he's not talking about that

vestal dome
#

then idk

compact haven
#

and Kaktusz wasn't talking about storing the blocks, he was saying that ensuring the block is still there is a pain since theres so many fucking ways a block can be destroyed

#

(which is just way too true)

late cliff
dense goblet
vestal dome
#

it's simple

dense goblet
#

if you want your list to be accurate you need to listen to about two dozen events

vestal dome
#

every block break event, add the block and the material to the list?

#

you just asked for something

#

but what is it for specifically btw?

dense goblet
#

nah I was bringing it up as part of an answer to someone else's question

vestal dome
#

if you're doing a minigame, might as well just copy the world and then delete it when's done.

compact haven
#

he was answering my problem

vestal dome
#

🙂

quaint mantle
#

Does anyone know why whenever i restart my server with mineresetlite all of the mines get deleted??

dense goblet
#

but the idea is it's easy to build up a map of blocks as they are placed but then listening for events which invalidate that hashmap is a lot harder

vestal dome
compact haven
#

Kaktusz

#

my problem isn't that though

compact haven
#

he doesnt have a problem

#

I do

vestal dome
#

not u katusz sry

#

yeah u

#

tell me

compact haven
#

@dense goblet I will always know the block's location and the player's location
but I need to ensure the particle is facing the player, and is still within 1 block of the block's location

dense goblet
#

so you have an accurate collection of all the doors right

late cliff
#

@vestal dome
https://wiki.vg/images/1/13/Inventory-slots.png

static int getSlotNumber(PlayerInventory inventory, EquipmentSlot slot) {
        switch (slot) {
        case HAND: return inventory.getHeldItemSlot();
        case OFF_HAND: return 45;
        case HEAD: return 5;
        case CHEST: return 6;
        case LEGS: return 7;
        case FEET: return 8;
        default: throw new IllegalArgumentException();
        }
    }
compact haven
compact haven
#

LMAO thats so ugly, but still should help you understand the issue I have

dense goblet
#

in that case you loop over this collection and either take the vector approach or the entity.getFacing approach

dense goblet
#

the latter will snap to the ordinals, the former will not

vestal dome
#

it's player.getEquipment().set....

compact haven
#

well they could be in F5 mode, so the particle should be facing the player, not the player facing the particle necessarily

vestal dome
#

to get boots, chestplate, leggings and helmet

dense goblet
#

I think f5 is only client side

late cliff
compact haven
#

it is, so I wouldnt get the looking at locataion

vestal dome
late cliff
#

no

vestal dome
#

because that image is not accurate.

compact haven
#

so for example, even if the player is looking away from the block

late cliff
#

oh

compact haven
#

the particle should still be facing the player, not the player facing the particle

late cliff
#

crap alright

vestal dome
late cliff
#

im looking for the 1.16 version

vestal dome
#

to the off hand I don't know

#

when talking about the armor, use "player.getEquipment();"

#

there's NO other way to get it except that, that I know at least.

dense goblet
#

not quite sure what you mean by that. If I press f5 and dont move my mouse, should the particle's position change or stay the same?

smoky lance
#

here, proxy = bungee and server = spigot, correct?JAVA // the receiver is a ProxiedPlayer when a server talks to the proxy if(event.getReceiver() instanceof ProxiedPlayer){ ProxiedPlayer receiver = (ProxiedPlayer) event.getReceiver(); // do things } // the receiver is a server when the proxy talks to a server if(event.getReceiver() instanceof Server){ Server receiver = (Server) event.getReceiver(); // do things }

dense goblet
#

oh wait I think i get you

late cliff
dense goblet
late cliff
#

I thought ALL slots had numbers???

late cliff
#

fuck

compact haven
#

Yes!

dense goblet
#

in that case you want to use:
particle position = block position + (player position - block position).normalised * 0.5

vestal dome
#

I'm pretty sure, even gonna check minecraft code.

late cliff
#

no its alright

#

dammit...

#

I am just trying to send a PacketPlayOutSetSlot

dense goblet
#

you may want to also snap it to the ordinal directions

late cliff
#

and it asks for a slot

compact haven
#

I dont want it to snap since that'd be weird I think

#

but that code would make the particle half way between the block and the player, I'd rather it be right infront of the block, regardless of where the player is

vestal dome
#

right there......

dense goblet
#

yeah I forgot to normalise it

compact haven
#

wait what does normalize do?

dense goblet
#

makes the length of the vector = 1

#

and maintains the direction

compact haven
#

interesting 🤔

compact haven
#

I'll definitely try that out, thank you :)

dense goblet
#

the value you multiply by is how far from the original block the particles spawn

#

mess around with it until it looks right 🙂

#

and a general vector maths tip if you are new to it, the direction from A to B is B-A

paper viper
#

is that NMS code?

vestal dome
late cliff
paper viper
#

or am i seeing stuff

#

lmao

#

because you arent allowed to post nms code

vestal dome
#

you saw nothing

late cliff
#

whenever I send a packet to entityequipm the wearer hears a sound

vestal dome
#

then

paper viper
#

🤨

vestal dome
#

lmfao

compact haven
late cliff
#

"thanks"

#

ftfy

compact haven
#

whenever I have a problem like this, I try and apply it to a non-minecraft situation and ask in a more general programming discord. sometimes writing it out helps, but not really in this situation lol

#

what

#

I already said thank you

#

I'm very confused

late cliff
#

oh

#

yeah nothing is working

vestal dome
#

what is the idea here?

#

first.... of all.

late cliff
#

well I am making rainbow armor, BUT

#

(cycling armor colors)

paper viper
#

what..

#

for leather?

late cliff
#

yes

#

BUT, here is the thing

#

now first of all

#

I am using PacketPlayOutEntityEquipment to send to other players

paper viper
#

you can already do this in normal bukkit

#

you know

late cliff
#

however, when I send that to the player WEARING the armor, it makes a sound

vestal dome
#

show me the code.

late cliff
#

SO

paper viper
#

why are you using packets for this?

dense goblet
#

is there a way to check if a block is passable from a ChunkSnapshot

late cliff
#

I tried sending SLOT packets instead

late cliff
paper viper
#

then tell me them

late cliff
#

ughhh

vestal dome
#

is the guy trying to make a Diamond armor have rainbow?

#

lmfao

late cliff
#

no

vestal dome
#

I would imagine that

late cliff
#

alright first of all

#

my plugin allows players to customize any item held in any of the EquipmentSlots (including main hand and off hand)

#

there are different "modes"

#

one mode allows cycling armor with a custom RGB equation made by the player

#

another mode allows "static" items to be set

#

so for example, the player can make their DIAMOND sword look like a fancy GOLD sword to another player

#

now I am running this plugin on a VANILLA server, so I can't risk using events

#

after all, what if I miss an event?

#

for example:

paper viper
vestal dome
#

what? what do you mean by VANILLA?

#

NMS ONLY?

#

lmfao

paper viper
#

the spigot api is designed for SPIGOT servers

#

not VANILLA

#

lmao

late cliff
#

vanilla gameplay

#

thats what i mean

paper viper
#

also, using NMS won't allow you to run it for vanilla

#

lol

late cliff
#

ANYWAY

#

If the player configures their incredible sharpness-5 sword to look like an enderpearl to other players, and they accidentally right-click, it is gone

#

duh I can configure events,

paper viper
#

you have a false sense

late cliff
#

but the point is there is so many possible combinations and events I have to look out for

paper viper
#

you CANNOT develop

#

plugins

#

for vanilla

late cliff
#

I know

paper viper
#

the NMS isnt even for Vanilla

late cliff
#

I called it vanilla, but what I meant it

#

is

paper viper
#

Spigot??

late cliff
#

what i ment is

vestal dome
#

vanilla gameplay.

#

with spigot

late cliff
#

for christs sake

vestal dome
#

like your normal spigot server.

paper viper
#

Then what the hell are you saying that you cant use events?

late cliff
#

holy shit

paper viper
#

Again, you CANNOT make plugins for a vanilla server

#

Even with NMS

vestal dome
#

ARE YOU FU***** KIDDING?

late cliff
#

VANILLA in the sense that there are no globohomo plugins installed that give players 1000 diamonds raining with shit filling their chests like most PAY-TO-WIN servers

vestal dome
#

can't U READ?

#

omggg

late cliff
#

VANILLA in the sense that they have to go out into the forest with their axe and chop down trees to get logs instead of going to a portal and paying $100-egirl-bucks to get a chestful of logs through these VANILLA-INTERFERING-PLUGINS

#

NO-GLOBOHOMO is what i mean

compact haven
#
  1. no one will play your server
#

but

late cliff
#

of course it is private

compact haven
#

he means that he cant use events

#

since it has to be different for other players

#

he has to use packets to make it look like a different item, when it really isnt

late cliff
compact haven
#

you literally corrected me one second earlier

#

and I wasnt rude

vestal dome
#

and then you have to listen for incoming packets

compact haven
#

but fuck you then

vestal dome
#

and outgoing as well....

#

I would imagine

compact haven
#

get blocked

late cliff
#

becuase nobody waants to hear your excuses for being shit at math jackass

vestal dome
#

ME?

late cliff
#

no

#

dig

vestal dome
#

thanks

late cliff
#

np

dense goblet
late cliff
compact haven
late cliff
#

my point is there are too many events I have to make handlers for to make sure shit doesnt break my server

late cliff
#

I didnt even read 5 words into your miserable message

dense goblet
#

yeah it sucks but you pretty much have to listen to all of them

#

thats what I do to allow for custom items

vestal dome
#

the break is over

#

go to your sits students

#

lmfao

late cliff
eternal oxide
#

If items are only to look different then you want to use custom model data

#

you'll have no events to listen to then

late cliff
#

but whenever I send the packet for entity equip, the WEARER hears this awful armor-equip sound

paper viper
#

hes trying to make leather cycle through colors

#

lmao

vestal dome
#

try to help

#

thanks.,

vestal dome
#

and then thinks he has a point and uses the ??? game

#

nice

paper viper
late cliff
#

anyway, this set-slot packets arent working

paper viper
#

Am i trolling you?

#

He literally said leather

#

and cycling color Jadss

#

The ??? game? What are you on

#

lmao

vestal dome
#

if you don't care LEAVE

#

simple.

paper viper
#

What the hell are you saying...

late cliff
#

bukkit more like FUKKIT

#

AHAHAHAHAHA

vestal dome
#

LMFAO

late cliff
#

FUKKIT(TM), I am going to use FABRIC api

paper viper
#

how immature can you guys even be

vestal dome
paper viper
#

jesus

solemn shoal
#

what the fuck is going on here

paper viper
#

read up

solemn shoal
#

yes i know

vestal dome
#

idc I'm leaving

solemn shoal
#

but like, what

paper viper
#

i dont even know..

vestal dome
#

I've lost countless braincells.

late cliff
solemn shoal
#

whats the core issue here

#

coz i dont understand

paper viper
#

the core issue is this gogrut kid

late cliff
paper viper
#

look at what he just sent me

#

above

solemn shoal
#

just take your vaccine smh

muted idol
#

hello there so after a game ends im trying to unload the world to then delete it. but for some reason the world that the player left does not get deleted. this is my stack trace. https://pastebin.com/Sdd5yCVX
the part of my code where im getting the error: `

    public void GameEnd() throws IOException {    
        for (Player player : Bukkit.getOnlinePlayers()) {
            plugin.runners.clear();
            plugin.hunters.clear();
            plugin.playermanager.clear();
            plugin.playersInGame.clear();
            plugin.playersLeftGame.clear();
            player.getInventory().clear();
            plugin.sendToServer(player, plugin.getConfig().getString("Settings.Hub"));
        }
        
        Bukkit.getServer().unloadWorld("ManHunt", false);
        Bukkit.getServer().unloadWorld("ManHunt_nether", false);
        Bukkit.getServer().unloadWorld("ManHunt_the_end", false);
        
        FileUtils.deleteDirectory(new File("ManHunt"));
        FileUtils.deleteDirectory(new File("ManHunt_nether"));
        FileUtils.deleteDirectory(new File("ManHunt_the_end"));

        Bukkit.createWorld(WorldCreator.name("ManHunt"));
        Bukkit.createWorld(WorldCreator.name("ManHunt" + "_nether").environment(Environment.NETHER));
        Bukkit.createWorld(WorldCreator.name("ManHunt" + "_the_end").environment(Environment.THE_END));
    } //and i have already tried sleeping in between the unloadWorld and delete directory!
late cliff
#

SO basically I am trying to send cycling globohomo colorful LEATHER armor to other players to make it appear that a player has colorful ARMOR.
I have been successful, for I have used the entity equip packet.
BUT
When i send that entity equip packet to the WEARER, it makes this awful sound on their client

#

so I dont know what to do

solemn shoal
#

entity equip???

late cliff
#

hold on lemme get the name

vestal dome
#

It's a packet

solemn shoal
#

does that even handle players?

late cliff
#

stand by

vestal dome
#

ofc it does?

#

why wouldn't it?

eternal oxide
#

You are deleteing the directory before the world has finished unloading.

late cliff
#

alright here it is

#

PacketPlayOutEntityEquipment

solemn shoal
#

oh, i thought players had a separate one

late cliff
#

so yeah, when I send PacketPlayOutEntityEquipment to the own player wearing the armor, it makes this awful sound

young knoll
#

I mean yeah, equipping armor makes a sound

late cliff
#

yeah but

#

you see

#

I am trying to make it cycle colors every tick

#

so it spams that sound

paper viper
#

You can already do this by modifying the data of the leather armor itself

#

instead of requipping

#

like every tick

solemn shoal
#

^

late cliff
#

wait

#

is there a packet for that?

paper viper
#

as mentioned above...

solemn shoal
#

dont REPLACE the armor

#

but update it instead

late cliff
#

so there is an update packet for updating armor?

solemn shoal
#

no

late cliff
#

because otherwise I am not going to change the state of the real armor on the server

paper viper
#

Ok Jadss.. you said I was trolling

#

but what you are saying literally..

late cliff
vestal dome
#

well the player

paper viper
#

sigh

vestal dome
#

does not see the cycle

#

but others do

#

lmfao

late cliff
#

yeah I might do that

solemn shoal
vestal dome
#

that not work

late cliff
#

wont work for armor at least

paper viper
#

and only others

#

so it doesnt look good at their perspective?

late cliff
#

ikr

#

im so torn

#
  1. Hear the shitty equip sound
  2. Look at the shitty armor
#

which one which one AHHHHH

vestal dome
late cliff
#

cant have both

paper viper
#

or

#
  1. Actually start using API and you can fix both issues
#

smh

solemn shoal
#

^

late cliff
#

ok look

#

I will add a 3

#
  1. Hear shitty equip sound
  2. Look at shitty armor
  3. Fix both using API, but risk losing items or gaining items etc by fucking with my precious vanilla world data
paper viper
#

How do you lose items or gain items...

late cliff
#

well here is one example

#

like I said earlier,

paper viper
#

then just dont add those plugins??????

late cliff
#

this plugin allows players to have custom "modes" applied to their items

#

one mode allows armor to cycle colors

#

the other mode is called "static" modes which lets any item be disguised as another item

paper viper
#

Ok?

late cliff
#

im not done just wait

#

so if a player wants to disguise their DIAMOND sword as a FANCY GOLD SWORD, then yeah epic it works

#

BUT

#

what if the player is a retard and for some reason wants to disguise their sword as an ENDERPEARL?

#

and they accidentally right click??

#

then I have to create an event listener for THOSE situations

#

then you realize

#

there are SO MANY situations

#

where items can be lost

#

maybe gained too

#

ok im done

#

does that make sense

paper viper
#

well, you know

#

you can use NMS in spigot

#

too...

#

and use a combination of that and api

late cliff
#

I am

paper viper
#

to solve your issue

late cliff
#

explain

young knoll
#

I mean cancelling item usage is just 1 event

late cliff
paper viper
#

want to look at my project?

#

and see what i mean

late cliff
#

unless you want to prepare a list of ALL the conceivable possibilities...

#

I wont do it

late cliff
#

I am using NMS packets

#

CraftItemStack.asNMScopy etcetera

paper viper
#

AND API

#

holy shit

late cliff
#

yes it also uses spigot api

paper viper
#

ok at this point im wasting time

late cliff
#

or bukkit api

paper viper
#

bye

late cliff
#

you will never be a woman

vestal dome
#

lmfao

#

he WHAT?

late cliff
#

anyway

vestal dome
#

I ..... lost braincells...

#

what can I say

#

Good news.............. I found what u needed.

paper viper
#

Jadss, I still severly doubt you improved even though you stated that you did...

late ledge
#

not sure wtf is going on here.... just gonna say that: if both parties do not understand eachother, a third (independent) vision can be of use. Both parties should however try to understand eachother in the first place.

fair panther
#

Is there a way for me to code a plugin so where if you get an achievement you get an item automatically?

young knoll
#

Advancements already support that

paper viper
#

and his actual goal was not what we intended it was

#

in other words, an xy problem

fair panther
young knoll
#

No it’s a vanilla

#

Then can run commands on completion

fair panther
#

what command would it be?

late ledge
paper viper
#

Yep

young knoll
#

Actually they run functions

cobalt blaze
#

So the StackOverflow way

young knoll
#

So you can just make a function with a single /give command

fair panther
#

Im still confused sorry

young knoll
#

I mean yes, you can do that too

late cliff
late ledge
#

Lets keep it civil.

late cliff
#

that is civil

young knoll
#

What’s with the sudden hostility

cobalt blaze
#

maarten I got banned by Cloudflare 😔

young knoll
#

And casual transphobia for some reason

late ledge
late cliff
late ledge
#

Alright. Lets both calm down

#

No need for a flamewar

cobalt blaze
late cliff
#

holy shit I cant wait for trump to seize power in august

#

he wont be as soft this time around

#

all redditors will be sent to death camps

cobalt blaze
#

We have lost the battle

young knoll
#

@grand swan

late ledge
cobalt blaze
#

wE dOnT nEed An iNStaNcE

#

Actual reply btw

#

He replied that

#

For a manager we dont need an instance

paper viper
#

static everyday, every noight

#

every day i go to sleep

vestal dome
#

No one:
Bad developers: public static, public static, public static, public static, private static

cobalt blaze
#

I got shit on because I pointed that out

#

By like 3 people

late ledge
#

I tried supporting but static debates are soo... ugh

vestal dome
#

yes change my mind

late ledge
#

like... they happen too often and always with the kind of people thatdoes not want to learn

late cliff
#

static is pretty cash

woeful crescent
#

If I'm making a method that doesn't need any internal variables, or modification of internal variables (aka literally code that I'm running), why can't it be static?

#

If I don't need multiple or something, why not?

cobalt blaze
#

Oh no I'm talking about complete manager classes

paper viper
#

but idiots remain idiots

#

and will continue to be

vestal dome
#

i have a 42 static class that is just for utils 🙂

#

I sleep as well as before I created it, if you ask

dusk flicker
#

Utils should be static

paper viper
#

^

vestal dome
#

exactly 🙂

cobalt blaze
#

I had like an amazing explanation

dusk flicker
#

The methods should be, not the classes (Not sure if this is what you meant but you said static)

cobalt blaze
#

If there's no difference possible with this if I create a different instance of the same object, it can be static.

If you have 2 instances of the manager, you can have different sessions saved. That makes them in different states, and therefor it can't be static.

woeful crescent
#

also, I have a question

#

should I use threadlocalrandom or create a new Random() every few ticks

#

like every time I want a random number

paper viper
#

threadlocalrandom

dusk flicker
#

^

woeful crescent
#

ok

paper viper
#

and also store that

#

preferebly like some singleton

woeful crescent
#

like as a variable?

cobalt blaze
#

Like ThreadLocalRandom.current() ?

hexed orbit
#

Hello guys, could someone help me? I would like to know if there is a possibility to make an item that is not stackable become one.. For example: music disc

dusk flicker
#

Pulse correct me if Im wrong but you don't have to recreate them every time afaik

foggy igloo
#

How do i spawn a tipped arrow?

woeful crescent
paper viper
#

that's why you should store them as a singleton

cobalt blaze
#

It does that itself

late cliff
#

ahahahaha

dusk flicker
#

also not clicking that

foggy igloo
#

ye

dusk flicker
#

sketch af

cobalt blaze
#

Just a STATIC GOES BRRRRRRRRR

vestal dome
paper viper
#

not sure

vestal dome
#

is this gonna earrape me?

paper viper
#

there could be some weird overhead

#

involved

dusk flicker
#

gogurt you need to not use sketch links

paper viper
#

i need to look at the source code

late cliff
woeful crescent
#

lol

vestal dome
#

LMFAO

cobalt blaze
#

Noooo 😔

foggy igloo
woeful crescent
#

So you're saying I should store ThreadLocalRandom.current() in a variable?

paper viper
#

one second

cobalt blaze
#

No you can use that for the singleton pattern

paper viper
#

let me check

cobalt blaze
#

So it's like
ThreadLocalRandom.current().nextInt(1000)

paper viper
#

the method itself might have some overhead

quaint mantle
#

Anyone know a plugin that works on 1.16+ for plants, fruit bushes etc?

paper viper
#

but i need to check the source code

paper viper
#

yeah it does

#
    public static ThreadLocalRandom current() {
        if (UNSAFE.getInt(Thread.currentThread(), PROBE) == 0)
            localInit();
        return instance;
    }
quaint mantle
#

Nobody answers, so I came here instead (That chat is kinda dead)

dusk flicker
#

¯_(ツ)_/¯

torn oyster
#

how do i not save a world onDisable

paper viper
#

you should store ThreadLocalRandom as a singleton itself

dusk flicker
#

Not a good reason

#

This is a development chat for a reason

cobalt blaze
#

Pulse read that code again

torn oyster
#

it randomly decides to save sometimes

cobalt blaze
#

Check what it really does

quaint mantle
#

¯_(ツ)_/¯

paper viper
cobalt blaze
#

No yours

#

It just checks to see if there isn't anything made up already

paper viper
#
    static final void localInit() {
        int p = probeGenerator.addAndGet(PROBE_INCREMENT);
        int probe = (p == 0) ? 1 : p; // skip 0
        long seed = mix64(seeder.getAndAdd(SEEDER_INCREMENT));
        Thread t = Thread.currentThread();
        UNSAFE.putLong(t, SEED, seed);
        UNSAFE.putInt(t, PROBE, probe);
    }

#

that aint free

#

tho

cobalt blaze
#

That only gets called once

#

At the first call

paper viper
#

hm true

woeful crescent
#

Yeah

paper viper
#

Yeah ig thats why some ppl using the singleton

#

to make sure it gets called first

cobalt blaze
#

You could just call it in your onEnable()

woeful crescent
#

Come on, it's barely a difference

cobalt blaze
#

Although I doubt even that takes up a lot of resources

woeful crescent
#

It's like once

cobalt blaze
#

mhm

paper viper
#

Well yeah

#

Tho, I think I heard an argument that someone stated that ThreadLocal variables should be singletons

#

not sure however, if ThreadLocal and ThreadLocalRandom have similar impl, I'd assume they should?

cobalt blaze
#

So the first request takes 228x more resources than the other requests

#

But

#

The other requests take 800 nanoseconds

#

which is literally nothing in a 50ms tick

#

So the first one takes 182400 ns = 0.182 ms

wraith rapids
#

is what mojang said when they looked at the individually low overhead of streams

#

but yeah unless it's a hyper hot loop it isn't worth the effort to store threadlocal resources in a variable

#

the whole point of them is that they are specific to the currently executing thread, so whenever the thread may have swapped you should get a fresh one anyhow

woeful crescent
#

I'm using Math.random() now

dense goblet
#

so I have a chunk snapshot and need to know if a block in it is solid or not. I can't acces the Block itself, only BlockData, BlockState and Material. I was thinking of using Material.isSolid() but I think that won't do exactly what I need. My requirements are:
Air - not solid
signs, flowers, etc - not solid
doors and such - solid
fluids - solid
pretty much whatever can be walked through as if it was air should be considered not solid, otherwise it should be solid. Is there a good way to go about this?

wraith rapids
#

not really

#

ig you could precompute a material enumset using material.issolid as a baseline

#

and then customize it by adding doors and whatever else

warm galleon
#

My entity end crystals arent dealing explosion knockback and damage, but are braking blocks,
Code:

@EventHandler
    public void onSnowballThrow(ProjectileHitEvent e){
        if (e.getEntity() instanceof Snowball) {
            Snowball projectile = (Snowball) e.getEntity();
            Location loc = e.getEntity().getLocation();
            loc.getWorld().spawnEntity(loc, EntityType.ENDER_CRYSTAL);

        }
    }``` (When you hit it it explodes but doesnt do damage and knockback)
#

blocks are destroyed though

#

i really dont want to have to spawn another explosion when they explode

vestal dome
#

is there any other plugin on the server?

warm galleon
#

nope

dusk flicker
#

I dont see how that code can alter anything

vestal dome
#

ikr

dusk flicker
#

What server brand/ver? (exact)

warm galleon
#

no worldgruard on my server, essentials protect, etc

#

1.8.8

dusk flicker
#

well that prob doesnt help

vestal dome
#

1 word, dumb

warm galleon
#

d

warm galleon
vestal dome
#

it does not make sense.

warm galleon
#

wdym

vestal dome
#

it should be working

#

the end crystal should deal damage.

#

etc.

warm galleon
#

i set spawn prot off too

vestal dome
#

more sense was removed...

#

are you like....

#

cancelling any damage event or smth?

warm galleon
#

on damage, if the player is going to die from anything, i set cancelled event and set them to adventure

#

thing is the ender crystal doesnt set to adventure meaning it doesnt run

vestal dome
#

wait wa?

#

so let me get this staight

#

you cancel a player from dying....

#

ok more?

warm galleon
#

wanna just ese my method?

vestal dome
#

yes please

warm galleon
#
@EventHandler
    public void playerDamageEvent(EntityDamageEvent e) throws InterruptedException {
        if (e.getEntity() instanceof Player) {
            Player target = (Player) e.getEntity();
            if(Arena.getPlayers().contains(target.getUniqueId()) && Arena.getState().equals(GameState.LIVE) && target.getHealth() - e.getFinalDamage() <= 0) {
                e.setCancelled(true);
                target.getLocation().getWorld().strikeLightningEffect(target.getLocation());
                target.setGameMode(GameMode.SPECTATOR);
                for (UUID uuid : Arena.getPlayers()) {
                    if (uuid != target.getUniqueId()) {
                        Game.gameEnd(Bukkit.getPlayer(uuid));
                        return;
                    }
                }
                Game.gameEnd(null);

            }
        }
    }```
vestal dome
#

stupitdly strange

#

maybe the damage is just too much that it just doesn't do any stuff and just gets cancelled?

warm galleon
#

i mean its <= /shrug

vestal dome
#

Ik

#

but what if the damage

#

is too much the player gets all the health damage taken?

#

like 20 hp gone in 1 second

warm galleon
#

<=

vestal dome
#

o_o

warm galleon
#

if the playe rwill have 0 or less hp then it should trigger?

wraith rapids
#

throws InterruptedException
why

#

literally what

dusk flicker
#

im guessing one of their other methods they use

#

rather then surrounding it in a try and catch

warm galleon
wraith rapids
#

you 100% do not want to use blocking methods in an event listener

warm galleon
#

we dont talk about t

#

it

dusk flicker
#

then remove it?..

warm galleon
#

eh

#

lazy

vestal dome
#

lmfao

warm galleon
#

tryna fix the explosion thing first

vestal dome
#

I didn't wanna say a word but maybe that's the problem ya know?

smoky lance
#

I'm having issues with command permission

vestal dome
#

how can you possibly have that tho?

smoky lance
#

"You do not have permission to execute this command"

warm galleon
vestal dome
smoky lance
#

I do have OP and I'm added into LP group that has *

smoky lance
#

but it's not that I cannot use my subcommands, I can't even use /queenswhitelist without any arguments

warm galleon
#

i like how one is a http fine format and another is a .bash

vestal dome
#

I don't get what is this?

#

what is this?

#

did you have any formatting issues bud?

#

(don't ask about the 129419028409142 tabs pls)

dusk flicker
#

looks like kotlin

vestal dome
#

Then IDK

#

I can't help that If it is...

smoky lance
dusk flicker
#

also why so much fucking youtube tabs

vestal dome
#

well I don't know how to help you...

smoky lance
#

the command is registered, but the onCommand it's not even called

vestal dome
#

ok?

#

thank you.

dusk flicker
#

we do talk.

#

thanks.

vestal dome
#

getCommand(....).setExecutor(...)?

vestal dome
smoky lance
quaint mantle
#

is that

#

rust

#

what is that

smoky lance
#

!! makes whats before it throw NPE instantly if it's null

vestal dome
#

too smart for u

lapis sphinx
#

hey I was wondering if there was a way to decompile an plugin (im still fairly new to java so sorry if this sounds kinda dumb). Someone gave me a plugin to learn from but he told me to decompile it myself and idk how.

vestal dome
#

Java Decompiler.

vestal dome
#

just google Java Decompiler lmfao

#

but nice link

lapis sphinx
vestal dome
#

nvm

lapis sphinx
smoky lance
#

btw the console can execute the command, only players cannot

vestal dome
#

Plugin extends Java.

#

basically

vestal dome
upper vale
#

is it possible to get a BoundingBox a player is looking at?

#

i have a list of all of the bounding boxes im looking for so i can also do it the other way around

covert bluff
#

is there a method for player to get the team they are in

#

nvm, there was a method for team called getEntryTeam

ivory sleet
covert bluff
#

^

#

best is to just look for its github source code if it has any

ivory sleet
#

Compilers do some magic when they compile code which decompilers aren’t able to reverse

woeful crescent
#

Hey, does anyone know how to display a certain number of seconds left as a properly formatted string?

#

For example, if I had 600 secondsLeft how would I turn it into a String containing 10:00?

#

I could do it manually, but I wanted to know if there was any better way to do it

cobalt blaze
#

DateTimeFormat ?

#

Or just this

int minutes = time / (60 * 1000); 
int seconds = (time / 1000) % 60;
 String str = String.format("%d:%02d", minutes, seconds);
#

If time is already in seconds ignore the 1000

woeful crescent
#

alright, makes sense

cobalt blaze
dusty herald
#

things

dense goblet
#

%d gets replaced by the first integer in the arguments, %02d is the same for the next given integer but formatted to look correctly

#

i.e. format("%d:%02d", 1, 9) = "1:09" I believe

#

the : is copied directly, you can replace it by whatever string you want (as long as it doesnt interfere with the formatting) and it will be put in its respective place

#

e.g. "%d minutes, %02d seconds" would be "1 minutes, 09 seconds"

quaint mantle
#

Can I make an itemstack with amount 4 if the item is not stackable?

#

or will I receive an error?

#

and if I receive an error, how do I bypass it?

young knoll
#

You can

quaint mantle
#

kthx

young knoll
#

But it’s prone to unstacking randomly

quaint mantle
#

No problem, just to show point amounts

#

but have a iron sword as an icon

dense goblet
#

can I do player.sendMessage from a different thread?

dusty herald
#

player.sendMessage

dense goblet
#

will that break if called from an async environment

dusty herald
#

no

dense goblet
#

ok ty

warm vapor
#

What is required to implement a custom entity? Not sure where to start, and I can't seem to find any recent examples/guides that give a good explanation

dusty herald
#

I mean I normally just override creaturespawnevent and spawn a new entity with the attributes I want

warm vapor
#

how does the firing of that event work? would I be able to handle the spawning of multiple different entities with one event handler, or do they need to be separate?

#

also, is the event fired for a location before vanilla spawning so the plugin has a chance to replace vanilla entity spawning? or does it work differently?

young knoll
#

It’s fired when an entity spawns

warm vapor
#

is it before or after an entity is actually spawned

young knoll
#

Just before

warm vapor
#

will cancelling the event without spawning anything myself cause vanilla entities not to spawn at all

young knoll
#

Yes

vestal dome
#

I need help.....

sullen dome
#

?ask

queen dragonBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

vestal dome
#

does anyone here know packets very well in 1.8.8

#

more specifically the PacketPlayInBlockPlace?

sullen dome
#

1.8 is not supported officially

vestal dome
#

ik

#

but asking is gud

sullen dome
#

sadly i don't know anything in packets lol

vestal dome
#

Pissed

sullen dome
#

lol

torn oyster
#

if (!(location.getWorld().getNearbyEntities(location, 1.0, 1.0, 1.0).size() >= maxIdleEntities)) {

#

does this return a list of entities

#

at that block

#

or no

#

if not, how do i make it check for entities only at that location

#

the block

quaint mantle
#

just out of curiosity, are you calling the method again afterwards..?

#

getNearbyEntities

torn oyster
#

wdym

quaint mantle
#

I mean if you are calling the method again afterwards

torn oyster
#

i call it once every secon

#

second

#

cuz its a generator

#

i dont want more than 4 items staying there at once

quaint mantle
torn oyster
#

no its called once

quaint mantle
#

I mean that will return all entities at that location within a radius of 1 block in all directions

torn oyster
#

yea

quaint mantle
#

so it's actually a full 2x2x2

torn oyster
#

ah

#

well thats still fine

#

it just isnt working

#

it isnt detecting items

#

or sum

quaint mantle
#

well i can't read your screen so

torn oyster
#

what

quaint mantle
#

consider sharing more than just a single line of code and explain what exactly isn't working and what you're expecting your code to do and how it's actually behaving

torn oyster
#
        new BukkitRunnable() {
            @Override
            public void run() {
                taskId = this.getTaskId();
                if (!(location.getWorld().getNearbyEntities(location, 1.0, 1.0, 1.0).size() >= maxIdleEntities)) {
                    Item i = location.getWorld().dropItem(location, drop);
                    i.setVelocity(new Vector(0.0, 0.0, 0.0));
                }
            }
        }.runTaskTimer(CaptureTheClay.getInstance(), 0L, delay * 20);```
#

it doesnt stop dropping

#

even when it exceeds maxIdleEntities

quaint mantle
#

uh print location, put the result of getNearbyEntities in a variable and print the result too

#

debugging is crucial

young knoll
#

Store the entity UUIDs in a list and then check the size

#

Remove them once they are picked up

tawdry rampart
#

Hey, I'm trying to use this for a cooldown on a PlayerFishEvent:

private Map<String, Long> cooldown = new HashMap<String, Long>(); // Outside the PlayerFishEvent

if (e.getState() == PlayerFishEvent.State.REEL_IN || e.getState() == PlayerFishEvent.State.IN_GROUND) { // Line 81
  if ((System.currentTimeMillis() - cooldown.get(player.getName())) / 1000 > 3) {
    long timeleft = ((cooldown.get(player.getName())) - System.currentTimeMillis()) / 1000;
    PraxisUtilities.sendMessage(player, "&cWoah! You must wait " + timeleft + "&cbefore doing that again.");
    return;
  } else {
    cooldown.remove(player.getName());
  }
  cooldown.put(player.getName(), (System.currentTimeMillis() + (3 * 1000)));
}
```and I get this error:
https://paste.helpch.at/pujunivipi.sql, any ideas?
young knoll
#

The first run cooldown.get will return null

#

Use getOrDefault, or null check the return

topaz atlas
#

I cant access org.bukkit.TravelAgent. I am using craftbukkit 1.16.5

tawdry rampart
topaz atlas
#

Api-version 1.13

#

The server is being run on the latest build of paper mc

#

and the ide is eclipse

#

What version is org.bukkit.TravelAgent available in?

young knoll
#

I can see it in 1.13

#

Don’t see it anywhere higher

young knoll
tawdry rampart
topaz atlas
#

Is it an issue with the IDE

#

I doubt it since it stopped working in my server because of the error

#

The method of importing is Class.forName("org.bukkit.TravelAgent");

young knoll
#

Well you are running it on 1.16

#

And it’s not in 1.16

young knoll
topaz atlas
#

Well. I want to use it in the latest version

young knoll
#

Then you can’t

topaz atlas
#

Another thing

#

Multiverse Nether portals work fine in the latest version

young knoll
#

They probably don’t use it

topaz atlas
#

I looked at the source code and they do. I will send u a link

tawdry rampart
young knoll
#

I haven’t really read your cooldown code in depth

#

But set the default to whatever would work for a default if they aren’t in the map

topaz atlas
#

So uh

young knoll
topaz atlas
#

So Is there any way I can replicate what they did?

#

Basically make it work

young knoll
#

Copy what they did with the try catch

topaz atlas
#

The catch will stop the plugin from shutting down if there is an error if I am correct but it wont somehow fix my problem. I need the use the functions inside of TravelAgent

tawdry rampart
young knoll
#

Well it’s been removed

#

No idea what the replacement is

#

From what I’ve found I don’t think there is a simple replacement

topaz atlas
#

I mean I tried there thing on my 1.16 server and it works. There has to be something that has happened

quaint mantle
#

hello spigot anyone? 😄

topaz atlas
#

Multiverse Nether Portals

young knoll
#

I mean like I said, I assume it’s just triggering the catch block every time

topaz atlas
#

So they probably removed some key things in the source code and decompilers are not efficient maybe

topaz atlas
#

Ok I'll try and see whats up with the catch

dense goblet
#

@eternal oxide you were right, there isn't really a need to do async chunkloading. This is a large apartment block from a city map, its a good order of magnitude faster than what I expected 😄 https://imgur.com/kR962Py

quaint mantle
#

How to change this? (I can edit spigot)

late dove
#

How to check if an item is enchanted?

    p.sendMessage("+");
}
ornate heart
#

Get the item stack meta data and use ItemMeta#hasEnchants

quartz anchor
#

the response is in json format so it should be easy to modify

halcyon linden
#

Hey I'm brand new to programming in the plugin. I've found that I learn best when I just do it. So I code now and now the question came to me: How do I get a player to get a random item every 30 seconds? Can anyone help me with this?

sage swift
#
List<Material> itemMaterials = Stream.of(Material.values())
.filter(Material::isItem)
.collect(Collectors.toList())
ItemStack item = new ItemStack(itemMaterials.get(new Random().nextInt(itemMaterails.size())))```
hexed orbit
#

Hello guys, could someone help me? I would like to know if the server can be lagged if I create an event in which every time someone changes the item of the main hand the player's gamemode is changed.

young knoll
#

Probably not

hexed orbit
#

thank you ❤️

quaint mantle
sullen marlin
#

seems like its from the bedwars1058 plugin

#

look into its config or ask the author

hexed orbit
#

hello guys, i have another question, i'm a beginner sorry haha, i'd like to change the player's gamemode when he takes an item in his main hand, but unfortunately he's only actually changing when i take the item out of my main hand

#

I don't know if it was clear, my English is not good

#
    public void aoTrocar(PlayerItemHeldEvent event) {
        Player p = event.getPlayer();
        if(p.getInventory().getItemInMainHand().getType() == Material.PIG_SPAWN_EGG) {
            p.setGameMode(GameMode.ADVENTURE);
        }
}```
sullen marlin
#

if(p.getInventory().getItemInMainHand().getType() == Material.PIG_SPAWN_EGG) { --> ItemStack item = p.getInventory().getItem(event.getNewSlot()); if(item != null && item.getType() == Material.PIG_SPAWN_EGG) {

vestal dome
#

I have a NMS Material, how can I convert it to bukkit's material?

vestal dome
#

The Honey block got Ponged.

sullen marlin
#

CraftMagicNumbers has methods I think, but please avoid using nms

vestal dome
#

is there any specific reason why?

sullen marlin
#

because its not the api and there's a good chance the api does what you want to do anyway

vestal dome
#

not in lower version, many methods missing.

#

and by lower version I mean legacy versions.

sage swift
#

lol, legacy versions

halcyon linden
#

I'm currently programming a kind of OneBlock. As known, there is only one block on the map and my question now is how I can regenerate the ender portal when the map is reset. so it should always appear in a different place

cursive fractal
halcyon linden
#

Oh your right

cursive fractal
sage swift
#

are you sure a plugin of this complexity is good starting out?

cursive fractal
sage swift
#

xd

cursive fractal
#

Just generate the 21 block portal every time plugin is loaded

cursive fractal
sage swift
#

im not gecko20

cursive fractal
#

xp

sage swift
cursive fractal
#

Hmm I should get verified too

quaint mantle
#

Try that, now instead of just holding it you need to right click with it

vital swift
#

Is it possible to broadcast message to Bungeecord via Spigot plugin?

keen kelp
#

emm how do I create an ItemMeta

vital swift
#

get itemmeta from item

keen kelp
#

new ItemMeta() has way too much things

vital swift
#

ItemStack i

#

ItemMeta meta = i.getItemMeta();

keen kelp
#

ok fine

#

I was trying to void that

vital swift
#

why?

keen kelp
#

does the detail matter

vital swift
#

No, but it might help me in the feature to avoid same thing as you

late dove
#

How can you set an enchantment by its name? Or a key!

keen kelp
#

Enchantment.MENDING

#

or

#

Enchantment.getByKey()

#

@late dove

tardy delta
#

if i want to override the onTabComplete() method for every command i have, do i need to make a different class for each command?

late dove
tardy delta
#

is it Enchantment.getByKey(String) ?

keen kelp
#

no

#

that takes a NamespacedKey

late dove
tardy delta
#

oh

keen kelp
#

Enchantment.getByKey(new NamespacedKey().fromString("Key"))

#

there

tardy delta
#

never mind then

lapis heath
#

does anyone know how the hive creates mini world borders for each island in their skywars mingame?

late dove
keen kelp
#

Deprecated?

tardy delta
keen kelp
#

yeah

#

read a bit into ProtocolLib's wiki

late dove
lapis heath
#

might be exactly what I'm looking for

north field
#

im getting invalid plugin.yml when i launch my server with my plugin, "Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml"