#help-development

1 messages · Page 439 of 1

rotund ravine
#

Not your shit.

#

getString

#

can be null

chrome beacon
#

and getStringList will never be

rotund ravine
#

but you are calling replace twice on it.

forest pumice
#

oh my days

#

say I remove replace

#

that's just gonna fix it?

rotund ravine
#

It should?

forest pumice
#

ok lemme try

rotund ravine
#

If not, Hold CTRL and click on the getString and send us whatever it decompiled.

charred pollen
#

is it better to create each class for entity or make a settings like this

it detects player movements and if player has passenger
as you can see it has alot of PlayerMoveEvent just for passenger detection

rotund ravine
#

Are you repeating yourself a lot?

chrome beacon
#

The answer is yes

#

We can see that in the image

rotund ravine
#

Ye

#

can be null

#

It do be weird how u don't have nullable annotation

forest pumice
#

what the fuck is that

terse ore
#

can you have a world in a different folder than "/"?

charred pollen
#

i like the chat is help-development and peoples respond is like this
people who are new to java or creating plugins, they would likely less ask and just stop try make plugins cause of this

rotund ravine
#

simply google DRY design principle

#

If you got the same code in multiple classes

#

abstract it.

forest pumice
#

@rotund ravine man could u at least bloody explain whats going on here

#

i might as well go figure it out myself

terse ore
forest pumice
#

bro its not like I haven't been googling the issue for the last 2 hours

terse ore
#

which issue do you have?

forest pumice
#

!= null on strings not working

chrome beacon
chrome beacon
terse ore
forest pumice
#

bro

#

like this happens to every string not just that

chrome beacon
#

Could you show your new code

forest pumice
#

?paste

undone axleBOT
forest pumice
#

there you go @chrome beacon

chrome beacon
#

Does it still give that same message

forest pumice
#

wdym

terse ore
#

how is uniqueId formated?

chrome beacon
#

This one

forest pumice
#

no, but it doesn't work in gamae

chrome beacon
#

So it's a different issue this time

forest pumice
#
String displayName = plugin.getConfig().getString("vouchers." + args[1] + ".display");
                        String material = plugin.getConfig().getString("vouchers." + args[1] + ".material").toUpperCase();
                        String lore = plugin.getConfig().getString("vouchers." + args[1] + ".lore");

                        // Voucher meta
                        ItemStack voucher = new ItemStack(Material.getMaterial(material));
                        ItemMeta voucherMeta = voucher.getItemMeta();


                        // More voucher meta
                        if (displayName != null){
                            voucherMeta.setDisplayName(ChatColor.translateAlternateColorCodes('&', displayName));
                        }
chrome beacon
#

Did you set the item meta on to the item?

#

getItemMeta always returns a copy

forest pumice
#

A copy as in..?

chrome beacon
#

as in a new object

#

so it won't be mutable

hazy parrot
forest pumice
terse ore
#

WorldCreator#file()

crystal dirge
#

Hi I'm working on a plugin that's using a Datapack for a custom dimension (Terrain and Structure generation). I already built something that checks if the Datapack in the world server is up to date and if not the Datapack is copied from the plugin jar to the server world. folder. The Problem is that each time this happens, the server needs to restart in order for the Datapack to work. It seems like Datapacks are loaded way before the plugin is. Using the minecraft /reload command doesn't work either because of this Bug: ||https://bugs.mojang.com/browse/MC-187938 || Does anyone know how to avoid this issue or has a better Idea of implementing the included Datapack?

terse ore
terse ore
#

maybe

    public static World createWorld(Player player) {
        WorldCreator worldCreator = new WorldCreator(player.getUniqueId().toString());
        worldCreator.seed(new Random().nextInt(999999999));
        worldCreator.generatorSettings("file:/realms" + player.getUniqueId());
        return worldCreator.createWorld();
    }```
icy beacon
#

i'm going against my own principles because fuck why not

icy beacon
terse ore
#

ok I am having issues with creating it in a specific directory

#

?paste

undone axleBOT
terse ore
#
    public static World createWorld(Player player) {
        WorldCreator worldCreator = new WorldCreator(player.getUniqueId().toString());
        worldCreator.seed(System.currentTimeMillis());
        worldCreator.generatorSettings("file:/realms/" + player.getUniqueId()); <- this line generates the error

        World world = worldCreator.createWorld();
        WorldBorder worldBorder = world.getWorldBorder();
        worldBorder.setCenter(0, 0);
        worldBorder.setSize(600);

        return world;
    }```
#

(idk if this is how you create worlds in another directory, it is what I found on google)

chrome beacon
#

That's not valid json

terse ore
#

yeah I read the error but don't know how to fix it

#

is there any other way to do what I need?

chrome beacon
#

Not that I'm aware of

#

You'll need to change the directory for all worlds I guess

quaint mantle
#

hi.

#

i have a question.

terse ore
#

ask it

quaint mantle
#

do any of you freelance?

#

selling freelancing services perhaps?

hybrid spoke
#

?services

undone axleBOT
quaint mantle
#

ok.

tawny remnant
chrome beacon
tawny remnant
quaint mantle
#

hey, what is the event for a player placing a bucket of lava or water?

#

it does not appear to be handled by the BlockPlaceEvent though.

chrome beacon
quaint mantle
#

okay.

analog valley
#

?paste

undone axleBOT
analog valley
tardy delta
#

use StringUtil.copyPartialMatches

#

and if length is 2 only indices 0 and 1 exist

analog valley
#

So how do i modify the code / what do i replace

tardy delta
#

idk what you want to achieve

analog valley
#

when a player types /mf item //here suggest item names

hybrid spoke
night verge
#

Is there any command in mythicmobs for banning my custom entity from jumping?

rotund ravine
#

ask them

quaint mantle
#

Whats the best event for my scoreboard to update

tardy delta
#

idea 2023.1 ultimate having issues?

quiet ice
#

Are you accidentally using pre-Java 5 java?

icy beacon
#

< 17 (2) >

#

looks like a no

quiet ice
#

I don't know what that (2) means

icy beacon
#

bro probably has 2 jdk 17 installations on his pc

#

but fr I don't know

#

the significant part is 17

tardy delta
#

java 17

quiet ice
#

If source version is set to J4 for some ungodly reason it doesn't matter what the target version is.

#

But I guess you should just try to forcefully cast to Long and forget it

tardy delta
#

its probably an ide bug cuz i didnt have it before

#

it compiles fine tho

quiet ice
#

In b4 jetbrains is rolling out their own compiler

icy beacon
#

if I have an itemstack of 33 stones and I call inventory.removeItem(new ItemStack(Material.STONE, 32)), it will delete the entire itemstack instead of leaving me 1 stone. how do I combat this? I only want 32 of it to be removed

ancient plank
#

^

icy beacon
#

perhaps

round finch
#

just quick question how would you prevent a villager be turned into a witch then lightning hit itself
how do i cancel that or protect the villager?

#

i lost my farmer joe 😦

#

note: looking for events

worldly ingot
#

EntityTransformEvent iirc

#

Yeah

round finch
#

Thank you Choco @worldly ingot ❤️

pure dagger
#

i made that inventory and i cancell InventoryClickEvent when player clicks in the "chest" area but not in his inventory, but 1 player can place items in the chest inventory by clicking shift in his inventory and 2 player can place the item in chest just spamming it.
How to fix it

#

i want player to be able to click in his inventory

icy beacon
#

please help me get a material's translated name (e.g. for Material.STONE it would be "Камень" if a player is using Russian)

#

I've been looking for way too long and the solutions all used NMS

#

maybe there's a lib or something?

#

I'm not gonna use nms

pure dagger
#

Kamień

young knoll
#

Material#getTranslationKey

round finch
#

🤯

#

fr this is a thing?

#

i feel dumb for not knowing there is a translation feature

young knoll
#

It only works with components

#

Which only work with sending messages to players atm

tawny remnant
#

how do i cancel this task after 5 seconds?

young knoll
#

Have a counter

#

And cancel when it hits 100

icy beacon
#

my kingdom manager is 878 lines long

#

????

rotund ravine
#

?wherami

icy beacon
#

i know lmao

#

I'm only using paper because otherwise my server takes 2 minutes to boot up

#

I'm coding for spigot

#

(against spigot API)

#

how the fuck do I use a TranslatableComponent

#

it only translates when sent to a player

#

what if I want to put it into lore for example

#

why wouldn't there be a method to translate for a locale

eternal night
#

like, that would be how you do it

icy beacon
#

no, I want to translate it first, for example for a player/locale

#

ofc you can't just put it into lore

eternal night
#

the server only has the en_us lang bundled

icy beacon
#

Jesus fucking christ

eternal night
#

you can put a translatable component into an item if you use NMS

#

the client will render and translate it out

icy beacon
#

this translatable shit is gonna kill me

eternal night
#

spigot is just missing API

#

choco where is the PRRRR

icy beacon
#

do you have an example or a lib link maybe

eternal night
#

to what ?/for what

eternal night
#

CraftItemStack has the methods to convert between ItemStack and nms item stack

#

and from there on out, you can just use NMS components as well KEKW

icy beacon
#

oh my god

#

I'm just gonna search jefflib and theapi and pray that it's there

eternal night
#

or pressure choco in getting the expansion of bungee component PR merged

icy beacon
#

im going to find his place of living address

pseudo hazel
#

or you can use json

#

and do it like you would by using the /give command

icy beacon
#

perhaps

#

what's the JSON format for that?

pseudo hazel
#

for a translated piece its just {"translate":<key>} if im not mistaken

icy beacon
#

wait I think I found jefflib shit for this

pseudo hazel
#

so like {"translate":"diamond_sword"} or something

icy beacon
pseudo hazel
#

you can test it out using /tellraw in the game

young knoll
#

Sometimes PR do just be slow

#

/srhug

pseudo hazel
#

to actually set the json text to the items name, is kinda tricky because you need to use Bukkit.getUnsafe().modifyItemStack() as far as I know

icy beacon
#

I think there was a constructor that took JSON or smth

#

or a method

pseudo hazel
#

for itemstack?

icy beacon
#

wait

#

couldn't find it

#

maybe in itemfactory

#

yeah

#

ItemFactory#createItemStack

#

The input should match the same input as expected by Minecraft's /give command

pseudo hazel
#

oh awesome

#

I didnt know that existed

#

xD

#

time to change my code too 😛

icy beacon
#

do you know what the key is? like in /tellraw @s {"translate":"??"}

#

for me always just outputs whatever is inside the quotes

pseudo hazel
#

it starts with this {display:{Name:'[

icy beacon
#

🤠

pseudo hazel
#

I think that should work

#

oh

young knoll
#

Yeah you could do that

pseudo hazel
#

well yeah, the key is whatever translation key you use

young knoll
#

Idk if it's really better than NMS

pseudo hazel
#

which can also be found in en_us.json if you have one on hand

#

idk

tardy delta
pseudo hazel
#

but atleast I dont have to use nms

#

so its better in that regard

pseudo hazel
tardy delta
#

not if sent to the server, atleast not on minestom

pseudo hazel
#

makes sense, these are used for client translation

#

the server just sends the item with teh json data

#

and then the client translates it

icy beacon
#

it works

pseudo hazel
#

awesome

icy beacon
#

/tellraw @s {"translate":"item.minecraft.stray_spawn_egg"} outputs Stray Spawn Egg

#

wow

#

/give @s acacia_boat{display:{Name:{"translate":"item.minecraft.stray_spawn_egg"}}} 1 this gives me a normal acacia boat, what am I doing wrong?

#

I found it

#

/give @s acacia_boat{display:{Name:'{"translate":"item.minecraft.stray_spawn_egg"}'}} 1

#

the only fucking give generator that supported translatable names

#

Choco, fyi I'm driving to your house and the only way to make me turn around is to make a PR to make translating shit bearable

buoyant viper
#

new TranslateableComponent()

icy beacon
#

and how do I translate it for a player then

buoyant viper
#

need components fully integrated into spigot @ choco

young knoll
#

He's working on it

#

I think

#

:p

icy beacon
#

he better be

buoyant viper
#

u would supply the same translatable key

icy beacon
young knoll
#

@worldly ingot You have an angry mob forming

icy beacon
#

I'm gonna implement the wither's AI into the nearest microwave to Choco and md_5 in 50 minutes if I don't see a hotfix

buoyant viper
icy beacon
#

yeah they are all chat only I think

#

and I want lore 😭😭😭😭😭

young knoll
#

Yes only chat supports components atm

buoyant viper
#

theyre also for books iirc xd

icy beacon
#

who uses those

young knoll
#

Right

#

Chat and books

buoyant viper
#

/rules but it opens a book lololol

icy beacon
#

so approximately one usage per server player's life

#

unlike, hmm, lore

#

🤬

silent tendon
#

Hey, I wanted to ask how I can give a player e.g. 5 diamonds

young knoll
#

player#getInventory#addItem

pseudo hazel
#

oh yeah I have not found a way to do lore with json because you cant in vanilla either xD

#

but like what lore is there to translate

silent tendon
vital sandal
#

how to run task after the world is loaded?

opal juniper
#

WorldLoadEvent i imagine

worldly ingot
#

Although it will give them 12 wheat seeds rather than 5 diamonds ;p

icy beacon
#

hi Choco :>

toxic lion
#

wait(); isnt working like how do i use it propperly?

icy beacon
#

you gonna pr better components, right?

toxic lion
#

i have a player join event and i want

wait(5 (seconds));

thn it sends something in chat to the player

kind hatch
#

wait() is for threads.

pseudo hazel
#

whats wait from

kind hatch
#

Thread#wait()

icy beacon
#

?scheduling

undone axleBOT
icy beacon
#

I'm gonna commit blanket if I get another off-by-one error

analog valley
icy beacon
#

NPEs are more pleasant to deal with than this shit

pseudo hazel
pure dagger
pseudo hazel
#

if they already have wheat, additem will stack, but not give extra if the inventory is full/cant take any wheat

pure dagger
#

oh

pseudo hazel
pure dagger
#

i mean

#

you take the item and you cant place it in chest inventory but if you spam you can do it

#

but wait

kind hatch
#

Probably gets treated as an InventoryDragEvent

pure dagger
#

OOH

pseudo hazel
#

yes very likely

pure dagger
#

yeah but still

#

i can click shift on MY invnetory

#

shift and left click

pseudo hazel
#

if you dont also cancel drag events in those cases it gets tricked

#

so you also want to cancel that?

#

you can check which clicktype was used

#

iirc event.getClickType or something like that

#

and then ignore anything that isnt simple left click

pure dagger
#

thanks

#

i think that still you can double left click and it takes items from chest inventory, but its not separate click type

#

bruh

#

oh there is double click

pseudo hazel
#

is there no double click?

pure dagger
#

i used event.getClick().

pseudo hazel
#

yeah

pure dagger
#

but when i use event.getClick() == ClickType. there is double click

#

ok i think i that will work

pseudo hazel
#

DOUBLE_CLICK is a separate click type

pure dagger
#

yeah

pseudo hazel
#

just do if (event.getClick() == ClickType.LEFT)

pure dagger
#

then return

pseudo hazel
#

well I assume not, depending on what you want to do

pure dagger
#

i mean not cancell

#

but it can be also right click or something

#

THERE IS SO MANY CLICK TYPES

pseudo hazel
#

yeah if the player uses a single left click you want to continue with teh rest of your code

#

well then make an or

pure dagger
#

yes yes

pseudo hazel
#

you'll figure it out

pure dagger
#

but now i have to test all of the click types

#

yeaaah

analog valley
#

the last one never works!

toxic lion
#

can anyone help:
I tried to do a delay for an event but it just sends nothing


public void onPlayerJoin(PlayerJoinEvent e) {
  new BukkitRunnable(){
    @override
    public void run(){
      Player p = e.getPlayer()
      p.sendMessage("asdasd")
    }
  }.runTaskLater(plugin, 20 * 4);
}

i dont understand why it doesnt send anything to the player because it does send something to the console wich i included at the same height as the p.sendMessage

#

it also has no errors

pseudo hazel
#

hmm

#

well first off, for something small like this I would rather user Bukkit.getScheduler().runTaskLater()

#

and secondly, idk why it does not send the message

#

does it send a message if you dont put that in the runnable?

toxic lion
pseudo hazel
#

like instantly

chrome beacon
pseudo hazel
#

okay

#

yeah, maybe there is something else happening in the code you overlooked

toxic lion
#

should i send ntire code of that class?

rotund ravine
pseudo hazel
#

yeah but this is like 4 seconds later

toxic lion
#

ye

pseudo hazel
#

maybe try even longer

toxic lion
kind hatch
#

?paste the entire method

undone axleBOT
pseudo hazel
toxic lion
kind hatch
#

It's not sending because of the Player#hasPlayedBefore() check

toxic lion
#

why?

kind hatch
#

Because #hasPlayedBefore() just checks to see if your playerdata in the world folder exists.

toxic lion
#

i made an else for if players did join already

#

so no

kind hatch
#

Since you have already joined before, your player file already exists.

toxic lion
#

i made an else{ so if the player HAS played before they get welcome BACK instead of just welcome

toxic lion
pseudo hazel
#

what did it print to the console

kind hatch
#

Ok, I see the separation for the hasPlayedBefore

#

Couldn't tell at first due to the formatting. :/

#

However, I don't see any real issue with it's structure.

#

The only thing that could possibly be screwing up is the location check which would be why you aren't getting your message.

orchid gazelle
#

Hello! I am reading a Player-Inventory from some persistant storage I created, but Spigot somehow does not allow me to create it. It tells me that the size is incorrect

#
java.lang.IllegalArgumentException: Size for custom inventory must be a multiple of 9 between 9 and 54 slots (got 41)
#
final Inventory inventory = Bukkit.getServer().createInventory(player, dataInput.readInt());
tender shard
#

the inventory has to be 9,18, 27, ... slots in size

#

create a bigger inventory, 45 in this case

orchid gazelle
#

Well I directly save the player-inv to the file and read it again

#

I need that size

pseudo hazel
#

well 41 is not a valid size, so idk how you save inventories to a file

tender shard
#

are you trying to create a PlayerInventory?

orchid gazelle
#

I am backing up player-inventories to load them in as a a failsafe-mechanism

tender shard
#

that'd only work with NMS. normal inventories created with createInventory() can only have a multiple of 9 slots

#

why don't you just use an ItemStack[] ?

orchid gazelle
#

im fine with using nms actually if its like not gonna break on every update

pseudo hazel
#

you dont assign player inventories with createInventory()

#

the players inventory always exists on a player

#

you can just replace its contents using player.getInventory()

orchid gazelle
#

omg thats gonna take a shit load of work to get it to run with ItemStack-Arrays

tender shard
#

where are you even saving the inventory to? player's PDC?

orchid gazelle
#

json

tender shard
#

how so? just use a Map<Integer,ItemStack>

pseudo hazel
#

can you show an example

orchid gazelle
#

got a serializer up already lol

tender shard
#

where the integer is the original slot

#

then you just loop over it and set it back to the player's inv

orchid gazelle
#
{"id":"ae326c4b-88fe-3012-8a60-19fb39cae765","inv":"rO0ABXcEAAAAKXNyABpvcmcuYnVra2l0LnV0aWwuaW8uV3JhcHBlcvJQR+zxEm8FAgABTAADbWFw\r\ndAAPTGphdmEvdXRpbC9NYXA7eHBzcgA1Y29tLmdvb2dsZS5jb21tb24uY29sbGVjdC5JbW11dGFi\r\nbGVNYXAkU2VyaWFsaXplZEZvcm0AAAAAAAAAAAIAAkwABGtleXN0ABJMamF2YS9sYW5nL09iamVj\r\ndDtMAAZ2YWx1ZXNxAH4ABHhwdXIAE1tMamF2YS5sYW5nLk9iamVjdDuQzlifEHMpbAIAAHhwAAAA\r\nBHQAAj09dAABdnQABHR5cGV0AARtZXRhdXEAfgAGAAAABHQAHm9yZy5idWtraXQuaW52ZW50b3J5\r\nLkl0ZW1TdGFja3NyABFqYXZhLmxhbmcuSW50ZWdlchLioKT3gYc4AgABSQAFdmFsdWV4cgAQamF2\r\nYS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAA0JdAATRElBTU9ORF9IT1JTRV9BUk1PUnNxAH4A\r\nAHNxAH4AA3VxAH4ABgAAAARxAH4ACHQACW1ldGEtdHlwZXQADGRpc3BsYXktbmFtZXQACGludGVy\r\nbmFsdXEAfgAGAAAABHQACEl0ZW1NZXRhdAAKVU5TUEVDSUZJQ3QAkHsiZXh0cmEiOlt7ImJvbGQi\r\nOmZhbHNlLCJpdGFsaWMiOmZhbHNlLCJ1bmRlcmxpbmVkIjpmYWxzZSwic3RyaWtldGhyb3VnaCI6\r\nZmFsc2UsIm9iZnVzY2F0ZWQiOmZhbHNlLCJjb2xvciI6ImdyZWVuIiwidGV4dCI6InRlc3RndW4i\r\nfV0sInRleHQiOiIifXQASEg0c0lBQUFBQUFBQS8rTmlZR0JtWUVuTXpjMW5ZR0FRNVdCZ1R5L055\r\nMHZNVFdWZ0wwa3RMZ0Z5R0FBQWZCbjdJZ0FBQUE9PXNxAH4AAHNxAH4AA3VxAH4ABgAAAARxAH4A\r\nCHEAfgAJcQB+AApxAH4AC3VxAH4ABgAAAARxAH4ADXNxAH4ADgAADQlxAH4AEXNxAH4AAHNxAH4A\r\nA3VxAH4ABgAAAARxAH4ACHEAfgAVcQB+ABZxAH4AF3VxAH4ABgAAAARxAH4AGXEAfgAadACQeyJl\r\neHRyYSI6W3siYm9sZCI6ZmFsc2UsIml0YWxpYyI6ZmFsc2UsInVuZGVybGluZWQiOmZhbHNlLCJz\r\ndHJpa2V0aHJvdWdoIjpmYWxzZSwib2JmdXNjYXRlZCI6ZmFsc2UsImNvbG9yIjoiZ3JlZW4iLCJ0\r\nZXh0IjoidGVzdGd1biJ9XSwidGV4dCI6IiJ9dABISDRzSUFBQUFBQUFBLytOaVlHQm1ZRW5NemMx\r\nbllHQVE1V0JnVHkvTnkwdk1UV1ZnTDBrdExnRnlHQUFBZkJuN0lnQUFBQT09cHBwcHBwcHBwcHBw\r\ncHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBw\r\n"}
``` thats an inventory lol
pseudo hazel
#

what in teh actual fuck

#

how did you save that

orchid gazelle
#

its b64-encoded

pseudo hazel
#

okay

#

whats it look like not encoded

tender shard
#

you can easily turn that into an itemstack array

orchid gazelle
#

im using BukkitObjectOutputStreams for it

pseudo hazel
#

oh i see

grizzled oasis
#

Hi, im using https://github.com/Acquized/ItemBuilder/blob/master/ItemBuilder.java , for make items in the gui but if i do

new ItemBuilder(ItemUtils.deserialize(plugin.getConfig().getString("items." + String.valueOf(plugin.getConfig().getInt("Legendary")) + ".itemstack"))).lore("aaa").build()

items with already having lore just don't get added

orchid gazelle
#

yeah you see where this is going

orchid gazelle
#

well its hardcoded to use Inventories in a load of classes, thats gonna take like an hour to fully change lol

toxic lion
# kind hatch The only thing that could possibly be screwing up is the location check which wo...

ig your are right... i moved the plugin to a local server and i got this error:

    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[guava-31.1-jre.jar:?]
    at org.bukkit.craftbukkit.v1_19_R2.entity.CraftPlayer.teleport(CraftPlayer.java:875) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3670-Spigot-454acb7-bd29f41]
    at org.bukkit.craftbukkit.v1_19_R2.entity.CraftEntity.teleport(CraftEntity.java:514) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3670-Spigot-454acb7-bd29f41]
    at me.lostplugins.electragens_v2.core.listeners.SpawnListeners$1.run(SpawnListeners.java:94) ~[?:?]
    at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3670-Spigot-454acb7-bd29f41]
    at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:415) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3670-Spigot-454acb7-bd29f41]
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1249) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3670-Spigot-454acb7-bd29f41]
    at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:388) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3670-Spigot-454acb7-bd29f41]
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1201) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3670-Spigot-454acb7-bd29f41]
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1017) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3670-Spigot-454acb7-bd29f41]
    at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:301) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3670-Spigot-454acb7-bd29f41]
    at java.lang.Thread.run(Thread.java:1589) ~[?:?]
#

like how do i change that

tender shard
grizzled oasis
pseudo hazel
#

is base64 the new hot thing or something

tender shard
orchid gazelle
pseudo hazel
#

I guess its more memory efficient

pseudo hazel
kind hatch
orchid gazelle
#

based64

pseudo hazel
#

yeah

#

I prefer base2 encoding though

orchid gazelle
#

im actually gonna call my encoder-class Based64 now LMAO

pseudo hazel
#

for my memory increase

grizzled oasis
toxic lion
pseudo hazel
pseudo hazel
#

also what line of code is that error on

silent tendon
pseudo hazel
#

Is there a way to split up my plugin in like modules

#

so the server owner can decide which parts of the plugin they want

#

like im more asking about how to device up the jar file and not about teh logic I would need to manage these modules in the "main" plugin

#

the most obvious route is to split it into smaller plugins but I am wondering if there is a better way to do it

#

pls @ me when replying

rare rover
#

hmm

#
@Override
    public @NotNull int getAirBlocks() {
        int airBlocks = 0;

        final Location loc1 = getLoc1();
        final Location loc2 = getLoc2();
        final BoundingBox box = BoundingBox.of(loc1, loc2);

        for (int x = (int) box.getMinX(); x <= box.getMaxX(); x++) {

            for (int y = (int) box.getMinY(); y <= box.getMaxY(); y++) {

                for (int z = (int) box.getMinZ(); z <= box.getMaxZ(); z++) {

                    Block block = loc1.getWorld().getBlockAt(x, y, z);
                    if (block.getType() == Material.AIR)
                        airBlocks++;
                }
            }
        }
        return airBlocks;
    }``` how would i improve this?
#

if possible

#

this will be on an async thread so i ain't too worried but

#

still

orchid gazelle
pseudo hazel
#

well

#

not really

#

if you take the array is always teh same size, being the amount of slots

#

then you can set the items 1 by 1 for each slot

orchid gazelle
#

ohh so its always the right size

pseudo hazel
#

if you keep the order ofc

#

yeah

#

and empty slots will just be null or air or something

orchid gazelle
#

so I do #getContents and #setContents

#

do I need to do that manually or is it already done with #get/setContents?

pseudo hazel
#

yes I think thats correct

#

you can try setContents

#

I think it would work

orchid gazelle
#

aight ty

pseudo hazel
#

especially since getContents can contain null for empty stacks, so it will always be the size of the whole inventory regardless

orchid gazelle
#

thats nice of the spigot devs lol

pseudo hazel
#

yeah this is why OG arrays are good

orchid gazelle
#

my GUI-System is really getting messy lol

pseudo hazel
#

yikes

orchid gazelle
#

I was too lazy to make an actual API for it, so I got like half an API

#

with an external failsafe lol

#

my failsafe is actually kinda 5Head

mint nova
#

How i can get the message that user write?

frank kettle
#

Chat message or commands too?

mint nova
#

Only chat message

rotund ravine
#

AsyncPlayerChatEvent

frank kettle
#

AsyncPlayerChatEvent

mint nova
#

O thanks

frank kettle
#

Then event.getMessage()

desert tinsel
#

AsyncPlayerChatEvent#getMessage()

vivid skiff
#

How can i reduce the lag caused by a runTaskTimer?

pseudo hazel
#

what do you do in the timer

vivid skiff
#

add and remove players form a scoreboard team

subtle folio
#

For some reason, this rayTrace is returning null when I'm looking at a Pig. Any help? java RayTraceResult rEntity = p.getLocation().getWorld().rayTraceEntities( p.getLocation(), p.getEyeLocation().getDirection(), 3, entity -> !entity.getName().equals(p.getName()) );

tardy delta
#

entity.getName()?

subtle folio
#

Perhaps, I'm trying to make it not just do the player whenever it ray traces

#

lemme see if I just do entity -> entity != p

#

Nop,e java RayTraceResult rEntity = p.getLocation().getWorld().rayTraceEntities( p.getLocation(), p.getEyeLocation().getDirection(), 3, entity -> entity != p );

#

This still returns null

pseudo hazel
solar mauve
#

hey there mongodb folks, is creating connection on every query attempt a bad idea? (like hikari datasource.getConnection), so i just create MongoClient everytime i want to save a data or get it (i also cache player's data and save them whenever the quit or server stops) 🔥

abstract sorrel
#

Does anyone know how to make a random integer generator within a range

solar mauve
#

where bound is your range

#

or you can use ThreadLocalRandom class

#

or you can divide the random number by your limit and get the left number

#

which is number %

#
int rangedRandom = ThreadLocalRandom.current().nextInt(min, max);
abstract sorrel
#

yeah thanks

#

just one problem with Random.nextInt the bound is exclusive so if i want to include it do i just do bound + 1

solar mauve
subtle folio
#

Why does RayTraceEntities not pick up animals or mobs?

abstract sorrel
abstract sorrel
#

ok

#

thanks for the help

solar mauve
#

because (number % max) is always from 0 to max - 1

vivid skiff
echo basalt
#

well

#

reuse variables

#

also ?workdistro

#

fuck

#

?wd

#

whatever

vivid skiff
remote swallow
rotund ravine
#

BlockPhysicsEvent yeyeyeye

mint nova
#

How i can make that the config will save on exact number? idk how to name it

lavish cliff
#

hi guys , someone have any idea?

lavish cliff
#

oh im stupid

#

thx

#

but the error is the same

#

on "Componentecc , the ";"

#

like this? Component.text("[item]").clickEvent(DisplayItem.open(player));

#

same problem

#

lmao

remote swallow
#

hover over the error

lavish cliff
#

oh so i need to create a command for gui and use it on click event?

#

ok thx 🙂

#

oh ok

tardy hatch
#

If a wirher skull is placed on the ground is it "WITHER_SKELETON_SKULL" or "WITHER_SKELETON_WALL_SKULL"?

#

I get that but my code doesn't detect it

#

Must be an error on my end then

left pine
#

Hello, you ask how do I make my config.yml file save the comments? with spigot 1.8.8

kind hatch
#

Use a library or write to the files manually.

tardy hatch
#

I already found the mistake. I had the coords wrong. Absolutely had nothing to do with the skull type XD

left pine
#

Hello, you ask how do I make my config.yml file save the comments? with spigot 1.8.8

sullen marlin
#

First result on Google

lavish cliff
#

someone know ?

kindred valley
#

know what

lavish cliff
#

the problem?

kindred valley
#

well we cant know unless you describe whats wrong

remote swallow
#

Component is not in spigot

#

if your using adventure components and want to send them to players you need to use papers api

kindred valley
#

do you know java @lavish cliff

sage dragon
#

Does the server know which way water/lava is flowing?

lavish cliff
round finch
#

yo dm5
i've been stuck with a problem nobody have seems to be able to answear

#

i can't grab the result item?

lavish cliff
#

wich alternative

remote swallow
#

player#sendMessage iirc or player#message

#

dont remember which they use

lavish cliff
#

k thx

sullen marlin
remote swallow
#

event.setResult(result);
&
inventory.setItem(2, result);

#

try removing the Inventory#setItem

round finch
young knoll
#

dm5

#

Thats a new one

raw crow
#

is there a way to get an enchant by its namespacedkey?

like "crazyname:somethinghere"

raw crow
#

oh, tks

cold sparrow
#

hello guys im having issue with custom bungeecord channels
messageController = new SpigotMessageController("premiumcore:main"); getServer().getMessenger().registerIncomingPluginChannel(this,"premiumcore:main",messageController);

SpigotMessageController implements PluginMessageListener
`@Override
public void onPluginMessageReceived(@NotNull String channel, @NotNull Player player,@NotNull byte[] message) {
//Check if this channel is handle by our controller
System.out.println(channel + " == " + this.getChannel());
if (!channel.equalsIgnoreCase(this.channel)) {
return;
}
//Read the subchannel
ByteArrayDataInput in = ByteStreams.newDataInput(message);
String subchannel = in.readUTF();
String[] args = in.readUTF().split(":");
//Execute the action
if (subChannelsActions.containsKey(subchannel)){
subChannelsActions.get(subchannel).run(channel,subchannel,player,args);
}
System.out.println("received from bungee to spigot ("+subchannel+")");
for (String s : args){
System.out.println("<- "+s);
}

}`

the problem is I never got when I receive a plugin message it never even printed to first line being System.out.println(channel + " == " + this.getChannel());

Anyone can help?

steep cove
#

Kind of just throwing this here, couldn't immediately find much while doing CTRL+F. Is there a way to make a particle last longer when it has spawned?

#

Generally searched the <player>.spawnParticle() function overloads, and couldn't quite see a great way of doing it that was obvious

eternal oxide
#

particle animations have a fixed life span

steep cove
#

Most unfortunate.

quaint mantle
#

anyone know how to make a /nick command similar to hypixel that changes the players skin?

quaint mantle
#

thx broski

cold sparrow
fallow violet
#

Hey, if i try to remove only 1 item from a dispenser inventory it works unless the itemstack has an amount of 2 or 1... why is that the case?

I only remove 1 item and its working with every size but 1 qnd 2 not whyyyy

cold sparrow
#

if so you can get the item meta and set the amount this way (I think)

young knoll
#

Amount is not part of meta

#

Either way there is a remove method that takes the number you want to remove as a parameter

#

I believe its removeItem

cold sparrow
frozen thorn
#

hello, is there a bug on the InventoryClickEvent? Because when I pickup an item the type is "PLACE_ALL" (spigot 1.19.4)

sullen marlin
raw crow
#

i want to cancel the action of a player trying to take off its armor, what event detects that?

young knoll
#

Several

frozen thorn
#

how to get the updated inventory of a player in a InventoryClickEvent pls?

worldly ingot
#

Just event.getInventory() should be the up to date one

young knoll
#

It’ll be before the event has actually gone through

#

Since it’s cancellable

lunar forge
#

Is it possible to show HEX colors in Inventory titles?

young knoll
#

Sure

jagged monolith
#

Yeah it is, I've done it multiple times.

young knoll
#

I’m pretty sure they work everywhere

jagged monolith
#

Not teams though like above head names

twin venture
#

Hello , its been a while ..

iam having a problem with The Fire Check .. it does not work right .
what happen is that player die .
but my system is diffrent player is not acctully died ..

#

the second message is when i kill player normally .

#

if i attack him with a sword that have enchants (Fire Aspect) and he die because of the fire , the code will not work , is there other kind of check i can do?

worldly ingot
#

Any reason you're not using PlayerDeathEvent? o.O

jagged monolith
#

Yeah, wouldn't it make sense to use the PlayerDeathEvent, if player deaths are involved.

worldly ingot
#

make sense *not to use it?

twin venture
#

well i just want to make my own death system .

#

and iam not sure if its bad or not , but iam calling the PlayerDeathEvent , because this system will break other plugins that depend on PlayerDeathEvent .

twin venture
#

Good night ..

lunar forge
sullen marlin
#

Nms? Why?

jagged monolith
#

There's no need to use NMS?

lunar forge
#

How can I update the title of an inventory?

#

While the inventory is open

sullen marlin
#

I don't think nms will help you, there's no update title packet

#

The inventory has to be closed and opened again

jagged monolith
#

Closing and opening is best way, user will only notice a small flicker anyway. It opens and closes pretty quick if you don't use timer for it

lunar forge
#

Isn't it packetPlayOutOpenWindow

sullen marlin
#

Yes, that's the open inventory packet. It opens an inventory

eternal oxide
#

7smile7 did a demo of inventory name changing (no flicker)

fossil lily
#

Im getting this error when making my jar. it downloads fine and I use it in my project, but I can't compile!

eternal oxide
#

he won;t be on til later as he's in Germany

sullen marlin
#

?maven

undone axleBOT
fossil lily
#

Im doing the exact same thing in another project and its working. This is taken directly from that page.

sullen marlin
#

It doesn't say it searched the spigot repo

#

Probably something to do with the positioning of your content tag

#

Idk don't use gradle

jagged monolith
sullen marlin
#

Actually it's probably the fact you have 3 urls in 1 maven block

#

?gradle

sullen marlin
#

It's only looking at the last one

jagged monolith
fossil lily
#

yep that fixed it

jagged monolith
#
repositories {
    mavenLocal()
    maven {
        url = uri('https://hub.spigotmc.org/nexus/content/groups/public/')
    }

    maven {
        url = uri('https://repo.extendedclip.com/content/repositories/placeholderapi/')
    }

    maven {
        url = uri('https://repo.codemc.org/repository/maven-public')
    }

    maven {
        url = uri('https://jitpack.io')
    }

    maven {
        url = uri('https://repo.maven.apache.org/maven2/')
    }
}
fossil lily
#

so confused how it worked in another project

young knoll
#

It’s possible you had it in your local repo for that project

worldly ingot
#

Though it's a bit of a quirk in the client

#

I can't imagine it's intentional behaviour

young knoll
#

Doesn’t matter, PR it

solar mauve
#

just asking, but the worldborder.getSize() means its radius right?

halcyon citrus
#

bit new to java, but how do i make a perm variable?

#

meaning i can use it globally throughout my entire plugin

young knoll
#

I mean if it’s constant it’s probably fine to make it static

#

Otherwise you may want to consider

#

?di

undone axleBOT
young knoll
#

If it doesn’t change

halcyon citrus
#

yeah it does lol

#

trynna make an eco

#

oh wait i did it right i just wasnt calling it right

vernal oasis
#

For 1.19.3 what api-version: and <maven.compiler.source> version should I be using?

remote swallow
#

1.19 for api version, and atleast 17

vernal oasis
remote swallow
#

api should be 1.19

#

compiler should be 17

vernal oasis
#

so api-verison 19

remote swallow
#

1.19

vernal oasis
#

api-version: 1.19
<maven.compiler.source>17</maven.compiler.source>

remote swallow
#

yeah

vernal oasis
#

and I should be using Java 17 to compile?

#

or what jdk?

remote swallow
vernal oasis
#

Thank

young knoll
#

The day we finally moved on from java 8 was wonderful

#

I do hope Mojang at least somewhat keeps up with LTS releases if they can

sullen marlin
#

its like every 3 years, so hopefully

remote swallow
#

Next lts is 21, 21 dev builds are out

sullen marlin
#

ew did they actually bring it down to 2 years

jagged monolith
#

Seems like it

tender shard
#

does anyone actually use maven or gradle to run a test server?

remote swallow
#

a few people might but imo its not worth it

#

gradle might have more people than maven because the run-paper plugin

chrome shadow
#

Does anyone know a good tutorial for holograms using nms?

sullen marlin
#

Idk what the advantage of using your build system to run a server is

vital zinc
#

What is your opinion about the project "Folia"?

tender shard
near crypt
#

How would you guys realize a block with a name tag on top of it? Just with a armor stand that is invisible?

tender shard
remote swallow
#

it'll be good for insane player count servers but for normal servers theres no point to it

chrome shadow
near crypt
remote swallow
chrome shadow
#

i run my servers on 1.8.8

near crypt
chrome shadow
#

it's more compatable and stable

remote swallow
#

what about new features

chrome shadow
#

like?

#

we run minigame servers not smp

remote swallow
#

all the new biomes, deeper caves, new blocks, non ticking entities, updated combat system, revamped nether etc etc

tender shard
near crypt
near crypt
#

Ok

tender shard
#

you just spawn it like a normal entity

near crypt
#

Sounds fun

tender shard
#

there's also BLockDisplay and ItemDisplay

tender shard
#

if i recall correctly

remote swallow
#

if i remember correctly

#

is it recall?

tender shard
#

both

#

whatever

near crypt
tender shard
#

yep

chrome shadow
#

Ill have a look into the isMarker flag

#

thx

tender shard
#

np

#

is there any shortcut in intellij to "remove everything to the left (or right) of the current cursor"?

#

uugh what the - can github wikis be edited by everyone, without any confirmation/approval? 😮

remote swallow
#

they can?

chrome shadow
tender shard
#

idk I just changed the wiki on ACF, I thought I changed it on my fork but apparently I changed it in the actual repo

tender shard
chrome shadow
#

shift + home + delete would work xD

tender shard
eternal oxide
#

Github love confusing you what page/fork you are actually on

remote swallow
#

huh

eternal oxide
#

yep, says you edited it

remote swallow
#

wonder if we tell them about that

#

that was quick

eternal oxide
#

thats not vulnerable at all

quaint mantle
tender shard
#

everything's better in modern versions

river oracle
#

bUt ThE PvP 😭 😭 😭

quaint mantle
#

1.19.4 just added more stuff that makes more attractive making minigames in modern versions

imagine if hypixel's bedwars quality with 1.19.4 display entities

quaint mantle
river oracle
#

I know I was making a joke

#

its the usual excuse for not updating

quaint mantle
#

it allows you to make weapons with cooldown and even have an animation

river oracle
#

its a shitty excuse as well

quaint mantle
#

if you just want to spam click go away and stay in 1.8 or learn php and do bedrock stuff

tender shard
#

"1.8 pvp is better because it doesnt require skill nor timing, its about who has the fastest autoclicker. And THAT is what we 1.8 users consider to be skill!!!!11one"

remote swallow
#

"but i drag click not use an auto clicker"

tender shard
#

tldr; 1.8 users like 1.8 pvp because they are not skilled enough for actual pvp

quaint mantle
#

imagine watching yt videos about which mouse is better for either drag click or butterfly click

#

save your money, dont buy mice and just enjoy modern minecraft

#

that's my tip 🗿

remote swallow
#

i wonder if i should start using xyz.epicebic as my package

#

that means effort

#

so probably not

rustic pecan
#

Hi everyone, I'm programming a plugin with Dependency Injection in version 1.8. I'm using Google Guice (v4) and the Maven Shade Plugin for building.
This has worked well in the past, but now I keep getting the following error:

com.google.common.util.concurrent.ExecutionError: com.google.common.util.concurrent.ExecutionError: java.lang.ExceptionInInitializerError

I haven't made any code changes in the plugin or modified any versions in the POM, so this error is not quite clear to me.
(Even with a completely empty project, this error now occurs.)

Thanks a lot for your help 😄

tender shard
#

show the full stacktrace

rustic pecan
chrome shadow
tender shard
rustic pecan
#

or you mean the src?

tender shard
#

yep, the source code of your main class

eternal oxide
#

I'm going to guess you changed your java version on your server to 14+

rustic pecan
tender shard
eternal oxide
#

Java version not spigot version

rustic pecan
#

oh, that could be. Let me check

rough drift
#
var packet = new PacketContainer(PacketType.Play.Server.PLAYER_INFO);
packet.getPlayerInfoAction().write(0, EnumWrappers.PlayerInfoAction.UPDATE_DISPLAY_NAME);
```Crashes on ProtocolLib `4.7.0` with the error `Field index 0 is out of bounds for length 0`, anyone know why?
forest pumice
#

Is there a replacement for using for-each loops in Locations? Cause it doesn't support it I guess

eternal oxide
#

question doesn't make much sense

tender shard
forest pumice
eternal oxide
#

there is no expected result. You are asking a question which makes no sense

remote swallow
#

what are you even wanting to loop over on a location

forest pumice
#

I have a bunch of locations in config file and I want to loop through them

eternal oxide
#

thats better

#

are they in a list in the config, or in a section?

tender shard
#

would be helpful if you could show your config

forest pumice
remote swallow
#

show ur config

forest pumice
#

Sec

eternal oxide
#

ok so its a MemorySection

forest pumice
rustic pecan
eternal oxide
#

um thats not a map

remote swallow
#

what even is that

forest pumice
eternal oxide
#

nope

remote swallow
#

that is not a hash map

#

how are you saving it

forest pumice
#

this is "blocks"

#

the hashmap

remote swallow
#

first you should do material location and material isnt yaml serializable you should save a string

#

so HashMap<String, Location>

#

and .toString the material

forest pumice
#

okay

river oracle
#

Strings 💀 stop using legacy strings switch to componennts

#

💪🏽

remote swallow
river oracle
#

what would you rather have in your configs

entry: <color:red>Hi!
entry: {"text": "Hi!", "color": red}
#

hoenstly I feel like this one is a no brainer

remote swallow
#

what saves stuff like that

eternal oxide
#

top one

river oracle
near crypt
#

@tender shard is TextDisplay not a class in the spigot api?

remote swallow
#

are you in 1.19.4

near crypt
remote swallow
#

you dont have text displays then, gotta use armor stands

near crypt
remote swallow
#

yeah

near crypt
#

like this?

remote swallow
#

have you ran buildtools for 1.19.4?

icy beacon
#

run buildtools with latest first

#

?bt

undone axleBOT
remote swallow
#

latest isnt updated yet

near crypt
#

k thx

icy beacon
#

then yeah run 1.19.4

near crypt
#

so there are no bt for 1.19.4?

icy beacon
#

there is

remote swallow
#

there are

icy beacon
#

but you have to specify

remote swallow
#

you just need to use --rev 1.19.4 not --rev latest

near crypt
#

ah ok

icy beacon
#

and not just call latest

near crypt
#

ye

icy beacon
#

not me and epic sniping each other's answers

#

lol

remote swallow
#

how else is help dev gonna fuction

icy beacon
#

😄

near crypt
#

how can i set the name of a TextDisplay?

#

@remote swallow

remote swallow
near crypt
remote swallow
#

do you have a text display entity

near crypt
#

like this?

remote swallow
#

nope

near crypt
#

xd

remote swallow
#
TextDisplay textDisplay = (TextDisplay) Bukkit.getWorld("world").spawnEntity(new Location(Bukkit.getWorld("world"), 0, 100, 0), EntityType.TEXT_DISPLAY);
textDisplay.setText("cool text");
near crypt
near crypt
eternal oxide
#

Its an Entity so setRotation

near crypt
#

so that the rotation updates?

remote swallow
#

if you set the correct type it always looks at you

remote swallow
#

dont remember the method but text displays have a type, billboard, horiztonal and something else iirc

near crypt
#

and i can use this so that it looks at me?

remote swallow
#

fucin

#

pc loves to not copy stuff

near crypt
#

very nice thx

remote swallow
#

textDisplay.setBillboard(Display.Billboard.CENTER);

mint nova
#

how i can make that the spawn on save dont delete the prefix and comments?

eternal oxide
#

first line of onEnable saveDefaultConfig();

mint nova
eternal oxide
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

mint nova
#

oh in first line

#

wait

eternal oxide
#

and delete teh options line, it's junk

mint nova
#

where

remote swallow
#

getConfig().options()...

mint nova
#

OOoh

eternal oxide
#

getConfig().options().copy...

#

delete it

mint nova
#

and its will work?

eternal oxide
#

yes

mint nova
#

ok i will test it

keen ferry
#
    @Override
    public void onEnable() {
        Bukkit.broadcastMessage(ChatColor.YELLOW + "Loading config file...");

Hi, I want to broadcast a message when the plugin is loaded. Unfortunately, it doesn't send anything in chat, is it possible to do it?

eternal oxide
#

nothing wrong with that, other than no one is online to see it

mint nova
#

it delete it

chrome beacon
#

You'd need to use the reload command to see it

keen ferry
#

It doesn't show up in the logs, and players are online, if I use /reload

mint nova
eternal oxide
#

show your command handlers

#

?paste

undone axleBOT
mint nova
reef acorn
#

Hello, I'm programming a ChestShop plugin and I want to get the block behind the sign but it only works on oak sign

eternal oxide
#

thats all fine

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

mint nova
#

But why its delete prefix?

#

i know that it works when prefix in config is delete

#

but whats the issue

eternal oxide
#

it can only delete it if you have not saved the default one

#

I'm going to guess you havn;t deleted teh bad config.yml from your server

reef acorn
eternal oxide
#

Wrong Sign import

dire marsh
#

isn't materialdata deprecated

remote swallow
eternal oxide
#

probably

eternal oxide
#

another reason could be you forgot to update the jar on your server

mint nova
#

Oh

#

yea you right

#

i forgot

#

i will update and we will see

quaint mantle
#

Hi

remote swallow
#

yo

mint nova
#

Hi

dire marsh
#

?nohello

undone axleBOT
dire marsh
#

xd

remote swallow
#

dam

quaint mantle
#

There is an airdrop plugin spigot

dire marsh
remote swallow
#

got an answer in general too

dire marsh
#

oh you already asked in general

#

smh

mint nova
#

its work now

#

thanks

#

but you know how to gat space between them?

#

and this comment bellow will be on the top of this spawn?

dire marsh
#

bukkit serializable to yaml

mint nova
#

to users know whats is does?

dire marsh
#

makes me cry

remote swallow
eternal oxide
mint nova
eternal oxide
#

spaces and comments will be preserved from the original

remote swallow
#

you have the comment then nothing, add the spawn after the comment

eternal oxide
#

add a spawn: in the default

remote swallow
#

then it will appear at the spawn

eternal oxide
#

just nothing under it

mint nova
remote swallow
#

yeah

eternal oxide
#

If your default config has all the keys when you call .set they will be replaced

mint nova
#

Ok thanks

#

i will test it

#

why it delete the comment?

eternal oxide
#

if you have a comment on a node you have to add it when you set

mint nova
#

i dont undersrand because i dont understand English well

eternal oxide
#

getConfig().get(path).setComm...

mint nova
#

Oh

eternal oxide
#

or addComment, something like

mint nova
#

what path i need?

fallow violet
#

Inventory#removeItem() problem

mint nova
#

because i dont have anything

remote swallow
#

"spawn" will be the path

mint nova
remote swallow
#

iirc yeah

mint nova
#

why its on red?

remote swallow
#

it takes a string list

mint nova
#

i dont understand

remote swallow
#

the method takes a List<String> for the last paramater so use List.of("string")

mint nova
#

its on red

remote swallow
#

hover over it

mint nova
remote swallow
#

ah, should be able to use Arrays.asList("test") instead

mint nova
#

like that?

remote swallow
#

might need to set comments after, but should work

humble tulip
#

Jist listen to the playerdeathevent and call player.spigot().respawn();

twin venture
#

but thanks

humble tulip
#

Your code is extremely flawed

#

I'd recommend listening to EntityDamageEvent instead

#

And checking instanceof EntityDamageByEntityEvent to get the player

tardy delta
#

people straight ignoring warnings 💀

twin venture
#

i got it working by using EntityDamageEvent

ocean hollow
#

hi guys, how can I change time for runTaskTimer()?

eternal oxide
#

you can't change it once scheduled

#

cancel and reschedule

ocean hollow
#

okay 😦

pseudo hazel
#

wait I just found out about the new text displays, so are they just the better way of doing holograms compared to armorstands?

grim iris
# mint nova its on red

You probably can get away with using java 16 instead of 8, depending on what version you're making the plugin for

grim iris
#

Yeah definitely can use java 16 then

pseudo hazel
#

then you need to update java version in your config

#

I dont even know if you can use anything other than 16 for 1.19

grim iris
#

Update java version in the pom file from 1.8 -> 16 and in the project settings of intellj set language level to 16

chrome beacon
#

Why not use Java 17?

ocean hollow
#

how can I add objects like that?

#

(i need to save HashMap<Location, Inventory>)

mint nova
ocean hollow
#

if you use Idea: File -> Project Structure

mint nova
#

Thanks

grim iris
#

I can show an example but Im unable to access a PC to get one right now

ocean hollow
lavish wing
#

Guys tell me pls how i can make minecraft 1.7.10 query plugin for versions 1.6.4 and older?

#

my code:

public static void main(String[] args) throws Exception {
        startServer();
    }    

public static void startServer() throws Exception {
        ServerSocket serverSocket = new ServerSocket(8080);
        logger.info("[Query] Starting server on " + serverSocket.getLocalSocketAddress() + ":" + serverSocket.getLocalPort() + " ...");
        while (true) {
            Socket clientSocket = serverSocket.accept();
            OutputStream outputStream = clientSocket.getOutputStream();
            PacketProtocol protocol = new PacketProtocol(clientSocket.getOutputStream(), clientSocket.getInputStream());
            protocol.read();
            protocol.write();
            outputStream.flush();
            clientSocket.close();
        }
    }```
#
public class PacketProtocol {

    private StatusQuery statusQuery;

    public PacketProtocol(OutputStream out, InputStream inputStream) {
        this.statusQuery = new StatusQuery(out, inputStream);
    }

    public void read() throws IOException {
        statusQuery.readVarInt();
        statusQuery.readVarInt();
        statusQuery.readVarInt();
        statusQuery.readString(0);
        statusQuery.readShort();
        statusQuery.readVarInt();
        statusQuery.readVarInt();
    }

    public void write() throws IOException {
        statusQuery.writeVarInt(0x00);
        statusQuery.writeString("{ \"version\": { \"name\": \"1.19.3\", \"protocol\": 761 }, \"players\": { \"max\": 100, \"online\": 5, \"sample\": [ { \"name\": \"thinkofdeath\", \"id\": \"4566e69f-c907-48ee-8d71-d7ba5aa00d20\" } ] }, \"description\": { \"text\": \"Hello world\" }, \"favicon\": \"data:image/png;base64,<data>\", \"enforcesSecureChat\": true }", 0);
        statusQuery.stream.flush();
    }

}
hazy parrot
#

1.6.4???

mint nova
#
            }else if(args.length == 1){
                if(args.)
                plugin.reloadConfig();
            }

How i can make (idk how to name it), that when the name of args in command is reload, its reload the plugin, but when its the help, its show help commands

hazy parrot
#

args[0].equals

#

Or equalsIgnoreCase

mint nova
#

oh thanks

flint coyote
tardy delta
#

what even is a query plugin?

#

query what

mint nova
quaint mantle
#

what scoreboard plugin is good?

hazy parrot