#help-development

1 messages Β· Page 1933 of 1

hasty prawn
#

I have IntelliJ build directly to the plugins folder, works fine.

waxen plinth
#

Interesting

hasty prawn
#

Or, it copies to the plugin folder.

waxen plinth
#

I wonder why windows allows that

#

Thought it was pretty strict with NTFS handles

hasty prawn
#

Yeah I'm not sure why applications are allowed to replace and humans aren't :(

gloomy arch
#

Honestly, I didn't even realize reloading plugins was a default bukkit command oop.

waxen plinth
#

It is, but it reloads everything rather than one plugin

#

That can be fine if you only have a few plugins on your server

#

But many larger plugins will break if you attempt to reload them

#

So it is often necessary to have a plugin manager to reload individual plugins

gloomy arch
#

I see, makes sense. Yeah I'm just using the one I'm working on currently so it should be good enough. Thanks for all the tips tho πŸ™‚

granite burrow
#

wouldnt this cancel the whole event? for each player? I basically wanna make it so that 1 player cant get the see the message if thats at all possible

waxen plinth
#

Oh

#

I believe you can remove a recipient

granite burrow
#

sorry I phrased it wrong

waxen plinth
#

Yeah you can do getRecipients().remove(target)

granite burrow
#

alright let me try that out

#

ah it didnt work

#

do I have to save it to any variable?

waxen plinth
#

The implementation isn't guaranteed I guess

granite burrow
#

ehh oh well it wouldve been a cool feature but its fine without it, thank you πŸ˜„

warm light
#

How can I get all variant of tropicalFish?

dark arrow
#

Does the explosion of blocks come in blockbreakevent?

fast temple
#

does anyone know why this is not working, what it is supposed to do is make it so that only a furnace named "Reinforced Furnace" will cook at 3x speed yet when i do this any furnace cooks at this speed any ideas?

waxen plinth
fast temple
#

how do i do that?

waxen plinth
#

In eclipse, ctrl + shift + f I believe

fast temple
#

there is 1 more } there right at the end that i accidentally cut off just so you know that isnt an issue

waxen plinth
#

What's not working about it

#

Oh

#

You're doing == on a string, for one

#

You need to do a.equals(b) instead of a == b when comparing objects

fast temple
#

do i need to do this on the f.getMetadata("ReinforcedFurnace") != null)

#

too?

waxen plinth
#

No, you can always use == with null

fast temple
#

ok

#

thought so

waxen plinth
#

There's a lot else that could be wrong with this

minor vapor
waxen plinth
#

But that's what stuck out to me

minor vapor
waxen plinth
#

That's also true

fast temple
#

oh yeah duh

#

thanks

waxen plinth
#

You're also adding 3 to the cook time

#

Wouldn't this only ever increase how long it takes?

fast temple
#

no it triples it ive tested it

waxen plinth
#

Not to mention the 1600 thing - this will only run for 1600 ticks after the furnace is placed, after that it will stop

#

So, 1 minute

fast temple
#

ok ill test that

waxen plinth
#

Wait

#

80 seconds

fast temple
#

i did that because thats the coal burn time

waxen plinth
#

Yeah but you call this when the furnace is placed

#

Oh nevermind

fast temple
#

ok ill test it and tell you what happens

waxen plinth
#

You're listening on FurnaceBurnEvent

#

I wouldn't do it that way though

#

I would just schedule a task on FurnaceBurnEvent that runs indefinitely, but cancels itself when the furnace is no longer cooking an item

fast temple
#

so how could i do that... i think i might have an idea

waxen plinth
#

Just don't keep a time variable

#

And cancel the task when the furnace is no longer burning

fast temple
#

would i do like if(////.getSmelting( == null)

#

then cancel it?

waxen plinth
#

Doing it this way, I think FurnaceBurnEvent would be run every time a new item starts being smelted

buoyant viper
#

And cancel the task when the furnace is no longer burning

and when furnace is no longer there 😎

waxen plinth
#

That too

fast temple
#

wait how would i get the event to indefinatly run

buoyant viper
#

just dont cancel it?

fast temple
#

if it only runs when the furnace starts to brun

waxen plinth
#

But the issue doing it your current way is that if they use a fuel that lasts for less time than coal, it would keep increasing the smelting speed

fast temple
#

burn

waxen plinth
#

For example, if they used sticks, it would eventually apply that 20 times

#

So it would smelt... I guess 60x faster?

#

Wait no coal smelts 8 lol

#

So 16 applications, or 48x faster

fast temple
#

so basically i changed the stuff on my code now and tested it and nothing changed

waxen plinth
#

Well I gotta go to bed

#

Good luck

fast temple
#

it still does 3times faster for both

#

thx gn

primal lake
#

Does HumanEntity#dropItem fires PlayerDropItemEvent?

waxen plinth
muted sand
#

Which event I need to track and cancel to prevent players from removing items from chests? (But allowing them to add)

buoyant viper
undone axleBOT
buoyant viper
#

aw no embed

fast temple
#

BRO

#

I figured it out

#

all by my self wow

#

im proud of that (im a begginer lol)

glossy dirge
#

Hello how do i make this colored on console ?
Output:

[Spigot]: Configuration have been reloaded

Code:

Bukkit.getLogger().info(ChatColor.translateAlternateColorCodes('&', "&a[Spigot] Configuration have been " + "reloaded"));
sullen marlin
#

For colours you need to use the console command sender

#

Your reload command should work for players too so this should be automatic

glossy dirge
#

its still doesnt work

#
Bukkit.getConsoleSender().sendMessage(ChatColor.translateAlternateColorCodes('&', "&2[Spigot] Configuration have been reloaded"));
solid forge
#

omg the md_5 legend

muted sand
#

Does calling unload on a chunk, when there are players present, unload the chunk?

blazing scarab
#

Type "scoreboard packets" in the chat

solid forge
#

hey md_5 i have problems with scoreboard packets

sullen marlin
glossy dirge
sullen marlin
#

idk then

solid forge
#

just got ignored

glossy dirge
sullen marlin
solid forge
#

yay

blazing scarab
#

Be more creative

#

"I hate spigot api and i will use packets for scoreboards because async performance"

sullen marlin
#

Idk, why does it need to be bungee

#

It'll clash with your server

blazing scarab
#

caching for sure

sullen marlin
#

I don't think bungee ever got a working scoreboard API; mainly of course for that clash reason

trim creek
#

Question: using packets for nametags and player list displaynames would make me the abailty to use a per-player scoreboard?
(to understand: not using packets just destroys all the displaynames, when using getNewScoreboard(), and everyone's name will become white (currently using the /team feature))

tardy delta
#

does the plugin's logger supports "{}" for placeholders or is that another?

young vine
#

{} is slf4j syntax, isn't it?

#

oh log4j too

tardy delta
#

java utils logger

#

i'll try

young vine
#

ewww

tardy delta
#

oh alright

#

unfortunately you have to specify the level so you cant do logger.severe("something went wrong, {}", errormessage)

sullen marlin
#

Yeah

quiet ice
#

Then write a wrapper around that

tardy delta
#

😢

worldly steppe
#

How do i use that font on a bot ?

#

Is of koya

trim creek
#

Isn't a simple image easier?

worldly steppe
quaint mantle
#

excuse me? why u declare a discord bot as js?

worldly steppe
#

Im using phyton

#

So Tell me what i do for phyton

quaint mantle
worldly steppe
#

No for DC.js

tardy delta
#

ew python

trim creek
#

And what if I use Java? πŸ˜†

#

That is also a platform to develop a Discord bot. πŸ˜†

tardy delta
trim creek
worldly steppe
#

Is in Canvas that font?

trim creek
#

Legends use Java and C++

#

XD

blazing scarab
#

Dont play a moderator

quaint mantle
trim creek
vagrant stratus
#

Who's gonna get kicked for what?

trim creek
#

There is no wrong, or right here

#

Each humans are other

vagrant stratus
#

Having a look, the kick was because it wasn't related to help development and it seems like you were told to stop

tardy delta
#

should i startup a database sync? (in onEnable)

worldly steppe
#

So, stop saying that put directly on image, how i put the variable of Nickname directly on image? , O can't, true?
Just say me how i use that font on PHYTON, no discord js

vale ember
worldly steppe
#

What is Canvas?

#

Link pls, i dont find in google

#

I see canva, no canvas

sacred mountain
#

any ideas on why this isnt working?

#

it used to be getItemInHand() but i changed it

worldly steppe
#

I don't find nothing

sacred mountain
#

because tahts deprecated for 1.8

vagrant stratus
#

Helps if we had the actual lines lol

sacred mountain
worldly steppe
#

Thats for draw, no for download fonts

vale ember
#

that was the main point i was trying to avoid

tardy delta
#

yea that might be something to look at

worldly steppe
#

How?

vale ember
#

just accept what you need Player, int, double not String[]

#
  • i have a cool tab complete system
tardy delta
#

im just overriding onTabComplete πŸ‘€

worldly steppe
#

I want to download the font, no to use on PHYTON, i know how to use

blazing scarab
worldly steppe
tardy delta
vale ember
worldly steppe
#

A link for download

vocal cloud
#

Google "find a font"

worldly steppe
vocal cloud
# worldly steppe

if you want that font go ask the people who made it what font they use or look on a font website

tardy delta
#

well my database shuts down on disable so iguess i have to do it sync on disable

worldly steppe
vocal cloud
# worldly steppe Isnt there

That bot is in your discord it has your logo on it. Figure out who owns it and ask them. If they won't help you then good luck

tardy delta
vale ember
#

that's how spigot one is bad

tardy delta
#

and .doubleValue is unnessecary iirc

hardy swan
#

no slap, smh

vale ember
tardy delta
#

you would need to handle the neccesary arguments outside the command instead of doing it inside so whats the point πŸ‘€

vale ember
#

you don't handle arguments yourself

hardy swan
#

hey

vale ember
#

it is already handled in a finalized class

#

you just say "i want double as my first argument" and the api provides it to you, you don't need to do anything else

#

you don't check arg's length, you don't check if it is a number, you don't cast it

#

you just accept it as a method argument

tardy delta
#

hmm i like handling the logic in the command :D

vale ember
#

you like nesting and if(args.length > 0) ?

hardy swan
young knoll
#

Handling the logic in the command isn’t that bad

#

But command frameworks are nice

hardy swan
#

Life is good, but it can be better

vale ember
#

the api just picks the method which argument signature fit to the command sended

hardy swan
#

like you said, check for argument lengths

young knoll
#

^

#

And checking the types, etc

vale ember
#

you don't handle it outside yourself

#

it is already handled

#

one-time and forever

#

and for every command

hardy swan
tardy delta
#

if you dont handle logic in the command, in my case it will become a few lines of code which gets executed, which will defeat the point of having a class for each command lol

young knoll
#

If you want a better command API then PR one

#

Or use an existing framework

tardy delta
#

i dont like annotation frameworks lol πŸ˜‚

hardy swan
#

i mean, nothing wrong with coming out with another

young knoll
#

RedCommand exists, it uses files

hardy swan
tardy delta
#

😳 you're right xd

#

i created my own stuff and i like it :D

vale ember
tardy delta
#

hmm i get that

#

like in my terms this is already short πŸ˜‚

vale ember
#

so you just say, if the player passed a string which is a player nickname and a string which is double, execute this method, otherwise, if player passed a string which is a double, execute that method and so on

hardy swan
vale ember
tardy delta
#

hmm yea i understand

vale ember
#

and it is also qute logical, because each method handles only ONE scenario of issuing a command, instead of putting all possible argument combination in one single method

#

which can become really messy with big commands

hardy swan
#

what about the concept of subcommands

tardy delta
#

in my opinion 'dynamic' argument combinations will become difficult to adjust your tabcompleter accordingly

#

but i understand what you're doing

vale ember
#

i don't see anything dynamic here, all possible combinations is defined in a class and can't be adjusted at runtime

tardy delta
#

well to let the tabcompleter know what type it can expect

#

without too much exceptions like for casting etc

vale ember
tardy delta
#

ah

vale ember
#

just annotation changed from "CommandSyntax" to "CommandCompleter"

blazing scarab
#

cloud command framework on top

vale ember
#

but for small commands it is porbably a good choice

tardy delta
#

i just have different methods which handle all of the command :D

blazing scarab
elder oyster
#

Is there a way to disable the Tab-Complete for names, or at least modify them (using packets maybe)? It seems to be locally saved so it's taking the name tag value I set at an earlier point (onJoin)
Currently I tried "PacketType.Play.Client.TAB_COMPLETE" with "onPacketSending" overidden but the server doesn't even detect a tab complete from the player

young knoll
#

What tab completion of names

tardy delta
#

TabCompletEvent i guess

#

iirc its cancellable

elder oyster
#

when you press Tab with no commands in

young knoll
#

That happens? Neat

blazing scarab
elder oyster
#

Ty will look into fake players lists

vale ember
#

i like making method(int arg, Player arg1) instead of method(Context ctx) and then getting arguments + mapping them manually

blazing scarab
#

You can do that with cloud annotations

young knoll
#

Cloud looks exactly like brigadier

#

Which was probably the point

vale ember
#

is cloud command standalone or library?

blazing scarab
#

but.. annotations are very straightforward and does not support abstraction at all. Idk i just prefer builders at that point

#

ACF had a lots of hacks

blazing scarab
vale ember
young knoll
#

Library

#

You shade it afaik

blazing scarab
#

no, you shade it yes

zinc spire
#

How do I add value into list in lambda?, idk why my list doesn't have any value

quaint mantle
tardy delta
#

that looks weird, i would expect a forEach

quaint mantle
#

Thats the problem

#

System.out.println prints stuff when the list is not filled

tardy delta
#

if you're doing something async and then go back to sync, the sync thread doesnt know whether or not the async stuff has already finished or not so in your case the list isnt filled yet when the sysout is called

#

idk if im explaining it very good

zinc spire
#

That is the api and im not able to change to sync

young knoll
#

That’s why you need callbacks or futures

tardy delta
#

^^

lapis widget
#

taskChain

tardy delta
#

future uwu

zinc spire
#

So any idea to save it into List? Using callbacks?

glossy venture
#

you can block the thread with a lock object

#
final Object lock = new Object();

() -> {
  // ...
  lock.notifyAll(); // notify that it is done
}

try { 
  lock.wait(); // wait for it to be done
} catch (Exception e) { e.printStackTrace(); }
// ...
blazing scarab
#

Meh

#

Dont think about getting result, think about what are you going to do with it

glossy venture
#

or use bukkit tasks that run sybc

ivory sleet
#

Either you have a thread safe list which operates atomically, and then just save the content on whatever thread you might be in, or you schedule a task on the server thread which saves it to the list.

zinc spire
#

interesting i will try

glossy venture
#

Object#finalize() is kind of like a destructor in C++ right?

#

the implementation

ivory sleet
#

Yes but finalize sucks

#

There are so many flaws that come with it

#

Use a WeakReference + ReferenceQueue or just handle it with sth like try-with-resources

visual tide
trim creek
#

Using this code

ByteArrayDataOutput out = ByteStreams.newDataOutput();
                out.writeUTF("Connect");
                out.writeUTF("KitPvP");
                player.sendPluginMessage((Plugin) this, "BungeeCord", out.toByteArray());

My problem is that when I click the icon, it won't do anything than just sending me some errors into the console.

#

I guess I really messed up, but how can I fix this?

lavish hemlock
#

Finalizers and destructors work in vastly different ways

#

The concept is similar.

#

For one, finalizers can cause memory leaks :)

trim creek
#

Three lines of the error:

java.lang.ClassCastException: class neonowlgery.*************.core.lobby.menus.LobbyGameModeMenu cannot be cast to class
 org.bukkit.plugin.Plugin (neonowlgery.*************.core.lobby.menus.LobbyGameModeMenu is in unnamed module of loader '
*********.jar' @14977039; org.bukkit.plugin.Plugin is in unnamed module of loader java.net.URLClassLoader @484b61fc)
trim creek
#

Yes. Three lines

lavish hemlock
#

Does LobbyGameModeMenu extend JavaPlugin?

trim creek
#

Oh

#

It needs to?

young knoll
#

You are casting a class to plugin that does not extend plugin

trim creek
#

Cause its not the loader. πŸ˜†

trim creek
#

Oh well.. It is time for ?di again

#

I hate it so much

#

xd

quaint mantle
#

?jesusgolearnjava

#

?learnjava

undone axleBOT
glossy venture
#

im talking about how finalize() is called when an object is cleaned

lavish hemlock
#

They're still different implementations

#

You're comparing the general idea of them

ivory sleet
lavish hemlock
#

Cleaner works off phantom references I'm pretty sure

trim creek
#

πŸ€”

lavish hemlock
#

It's a wrapper around them

ivory sleet
#

Ah okay

#

Yeah that’s thinkable

lavish hemlock
#

Fun fact: It started out as internal API but ig people liked it

glossy venture
young knoll
#

The hell is a phantom reference

#

Java scary

lavish hemlock
#

java.lang.ref is like one of the most mysterious packages.

#

Okay I lied actually

#

java.lang.constant is

#

java.lang.invoke is pretty mysterious as well but not as much as constant or ref

lavish hemlock
#

And you're just like "tf are these??"

trim creek
#

πŸ€”

#

Using the loader would be better for changing servers?

#

(in most of yours case: "Main class")

glossy venture
#

what

elder oyster
trim creek
#

Or I messed up everything by using VeloCity?

glossy venture
lavish hemlock
# lavish hemlock And you're just like "tf are these??"

Not too complicated though.
Weak = A reference that is essentially ignored by the garbage collector. If a weak reference exists and no strong references exist, an object will be cleaned regardless of the weak references.
Soft = A reference that doesn't get cleaned ever until the JVM requests more memory.
Phantom = Like Weak in that it doesn't impact garbage collection, but if a phantom reference exists, it will be sent to a ReferenceQueue when the object is being cleaned (making it similar to finalize but much safer and faster)
(And a strong reference is just your regular types like Object o = new Object();)

elder oyster
glossy venture
#

oh lmfao

blazing scarab
#

PlayerInfo one

lavish hemlock
glossy venture
lavish hemlock
#

Which stores keys as weak references, therefore acting as a sort of lightweight cache.

young knoll
#

So we have a weak boy reference, a soft boy reference, but no cat boy reference

lavish hemlock
#

Yeah πŸ˜”

tardy delta
#

sad

elder oyster
blazing scarab
#

it will

lavish hemlock
blazing scarab
#

you'd have to fake tablist

young knoll
#

Spooky boy reference

lavish hemlock
#

Maow on his way to make the world's first CatReference

elder oyster
#

Ah this is a headache πŸ˜„ . I think name tags and name tab completions use the same name variable. Might have to find another way then

glossy venture
#

how do i draw a rect with opengl lol

lavish hemlock
#

How do I draw a rectangle with OpenGL?

glossy venture
#

doesnt it like vary per shader

#

the data you have to provide

#

AnnoyingReference will randomly free objects from memory

#

yes

#

using Unsafe#free()

#

i think thats a thing

lavish hemlock
#

It's uhhh

#

Unsafe::freeMemory(long address)

#

I believe

#

I bet it's just a direct mapping to free from stdlib.h

glossy venture
lavish hemlock
glossy venture
#

yes very useful also

lavish hemlock
#

It's just like

#

it's like simulating a race condition

glossy venture
#

"oh well there goes the server instance

lavish hemlock
#

WhoOoPS

#

My finger slipped and now the entire OS has been deallocated

trim creek
#

So then I guess implementing JavaPlugin to the game selector menu won't work. πŸ˜†

young knoll
#

What will a cat reference do

lavish hemlock
glossy venture
#

lmfao youll get spammed with "Maow"

young knoll
#

Looks in console
10,000 lines of meow

glossy venture
#

yeah

lavish hemlock
#

It's like a real cat! :D

vocal cloud
young knoll
#

Heh

trim creek
glossy venture
#

SwearingReference

Fuck i got deallocated!
Shit there i go
lavish hemlock
glossy venture
#

where is jdk.internal in the jdk source tree

#

wth

lavish hemlock
#

In Java 9 it's like under the jdk.unsupported module or smthn

glossy venture
#

oh its in java.base

lavish hemlock
#

Oh lol

glossy venture
#

lmfao

trim creek
young knoll
#

So I can make my plugin just unreference the server

lavish hemlock
#

And I know you can't instantiate a plugin nor can you have multiple classes in your plugin extend the plugin class.

lavish hemlock
#

But I'm not sure what "the load class" is.

young knoll
#

Unsafe is fun

lavish hemlock
#

Damn right it is

#

Feels like you're hacking into the NSA

trim creek
young knoll
#

Because sometimes you need to change a private static final value

lavish hemlock
vocal cloud
lavish hemlock
#

One sec

trim creek
#

Cause implementing JavaPlugin into the selector menu doesn't works.

young knoll
#

From anywhere

#

?di

undone axleBOT
trim creek
trim creek
# young knoll ?di

It works fine, I can use the JavaPlugin method, but it just throws me errors

lavish hemlock
# lavish hemlock You can do that with reflection.
field.setAccessible(true);
try {
    final Field mods = Field.class.getDeclaredField("modifiers");
    mods.setAccessible(true);
    mods.setInt(field, field.getModifiers() & ~Modifier.FINAL);
    field.set(null, /* ... */);
} catch (ReflectiveOperationException e) {
    e.printStackTrace();
}
#

That's possible ^

young knoll
#

Not anymore

lavish hemlock
#

Dang

#

Fuckin' hate Java 9

young knoll
#

Java doesn't let you reflect into Field

lavish hemlock
#

But yeah on Java 8 and below it's a fun hack

vocal cloud
#

Java making itself unfun

lavish hemlock
#

Exactly

trim creek
#

Da

#

I agree

lavish hemlock
#

"Nuu you can't refwect that, you naughty boi, you're gunna bweak stuuuuffff"

#

Shut the fuck up Java

#

who I am

glossy venture
#

i wish there was a command line option like -Dunsafe=true

lavish hemlock
#

visualizing as a furry?

#

but yeah

lavish hemlock
#

But they removed it

glossy venture
#

yeah i know

#

until java 16 there was right

lavish hemlock
#

Yeah

#

Java 17 removed this flag that allowed you to open all modules for reflection.

glossy venture
#

bruuuuh

lavish hemlock
#

I was truly pissed when I found out about it

#

Anyway there's a good chance Java 18 will remove Unsafe's memory allocation methods in favour of the Foreign Memory API.

glossy venture
#

yeah but that api seems cool

lavish hemlock
#

So people're gonna have to come up with much more creative solutions to unsafe reflection.

lavish hemlock
glossy venture
#

also where tf is the jdk.internal.misc.Unsafe native code

lavish hemlock
#

Uhhh it's buried somewhere in HotSpot

#

Lemme find it

glossy venture
#

wait

#

i found the main method of the jvm

#

feels like i found a treasure

trim creek
vocal cloud
#

Correct

trim creek
#

getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");

vocal cloud
#

You can ping me btw otherwise I won't respond if I'm not here.

trim creek
#

Isn't this the code for that?

vocal cloud
#

I'm not sure haven't done my own sending stuff for ages.

#

You sure a bungee cord command isn't what you want?

trim creek
#

Wait

lavish hemlock
#

Btw

trim creek
#

Don't I also need an incoming messenger?

lavish hemlock
#

I just found an old programmer pickup line I wrote

#

Hey baby, are you sun.misc.Unsafe? Cause I wanna engage in some unsafe internal access with you ;)

trim creek
vocal cloud
#

Ah. Yes you'll need to send messages between plugin->bungee

trim creek
#

So I really need that incoming crap

vocal cloud
#

Crap? Mmk

trim creek
#

I don't even understnad, what arguments I need to give to it. xD

vocal cloud
#

Plenty of guides on it out there

trim creek
#

'k I guess this server doesn't have any commands for that 😹

vocal cloud
#

I mean the API tends to have verbose documentation

#

?jd

storm chasm
#

hello, i was wondering if it was possible to use multiverse commands with condition commands

blazing scarab
#

🧐

storm chasm
#

for exemple, i want that when a player wears a specific item, it executes /mvtp

blazing scarab
#

Thats a #help-server question, though. Conditional commands is a plugin?

storm chasm
#

no it's vanilla

vocal cloud
#

I mean through code you could probably avoid needing to execute commands

storm chasm
#

mvtp Kandda test [nbt={Inventory:[{Slot:103b,Count:1b,id:"minecraft:carved_pumpkin",Count:1b,tag:{display:{Name:"{\"text\":\"test\"}"}}}]}]
i tested with this syntax but nothing happens

blazing scarab
#

Use execute if maybe?

#

Although bukkit plugins rarely support selectors

storm chasm
#

mhm

vocal cloud
#

Isn't this an XY problem

storm chasm
#

so i'll just have to put this with execute if?

vocal cloud
#

?xy

undone axleBOT
storm chasm
trim creek
blazing scarab
#

read a minecraft wiki article on execute command. It is a powerful instrument, actively used in datapacks or command blocks

storm chasm
#

execute if entity @a[nbt={Inventory:[{Slot:103b,Count:1b,id:"minecraft:carved_pumpkin",Count:1b,tag:{display:{Name:"{\"text\":\"test\"}"}}}]}]
ya but what about this?

vocal cloud
#

Why are you trying to do it this way?

storm chasm
#

i'm trying all ways

ivory sleet
storm chasm
#

i want the one that works

vocal cloud
storm chasm
#

make an auto execute for a player when he wears an item

#

so in my case the target command is /mvtp

crimson terrace
#

how do i get the boss bar from an existing wither?

lapis widget
# storm chasm so in my case the target command is /mvtp

Just make a plugin that listens to playerinteractevent check if right click confirm if item in main hand is not null check if item has itemmeta then check if it has a displayname and then check if it has the correct itemname after that execute the command

storm chasm
#

i'm not good at making plugins

blazing scarab
storm chasm
#

just wanted to know if bukkit supports mv for that

vocal cloud
#

You won't need to execute a Command they have an API

storm chasm
#

who do

vocal cloud
#

1 quick google search

lapis widget
#

Its time for you to learn then.
This is legit the basics

storm chasm
#

ya i planned to

ivory sleet
#

Merely planning won’t get you far

storm chasm
#

but it's kinda something that i need to do rn

ivory sleet
#

Exercising and practicing it will though

grim ice
#

is it possible to disable all caves and ores in a world

lapis widget
#

I've litterly given you what you need to make in plain english

#

all you need to do is have a good look on how to make a basic plugin and dealing with events

vocal cloud
#

They have an API it makes it easier than executing commands as well

storm chasm
#

well as i said i need to do it rn

grim ice
storm chasm
grim ice
#

Disabling caves and ores

vocal cloud
#

They have an API that allows you to use their plugin through code

ivory sleet
#

Kanda anyways if this has nothing to do with programming than I’m afraid you should move to #help-server

midnight shore
#

Hi guys! is there any way to loop for each Material entry and add it to a list?

ivory sleet
#

Material.values()

midnight shore
grim ice
#

u have an enum ready

midnight shore
#

Yes but i'm trying a thing

grim ice
#
List<String> materials = Stream.of(Material.values()).map(Material::getValue).collect(Collectors.toList());```
#

if u want it as a list

vocal cloud
#

Something you can't already do with the values?

grim ice
#

or List<String> list = Arrays.asList(Material.values());

crimson terrace
#

will this disable the withers bossbar from updating?

grim ice
#

but not sure why would you use it

lyric grove
#

Hi, im trying to spawn a hologram

#

It works fine on 1.8 clients but falls into the floor on 1.7

blazing scarab
#

ugha

#

Why would you even support 1.7

grim ice
#

1.7 is just too old

#

I understand 1.8.8

#

but 1.7 is just WAY too old

lyric grove
#

Im not asking why i should support 1.7

blazing scarab
#

i asked. 1.7 is unsupported at all

lyric grove
#

yeah. I see your point, but different servers have different player bases.

blazing scarab
#

is this a public plugin

lyric grove
#

no

#

isnt this development chat? xd

trim creek
#

But it is

#

But 1.7 is not supported by most of the devs

lyric grove
#

thats why im making my own plugin

blazing scarab
#

it is not officialy supported, not supported by enthuisasts either. You are on your own

ivory sleet
#

1.7 yikes

vocal cloud
#

Just use the Holograms plugin uwu

sharp flare
#

any alternative for #setCursor on InventoryClickEvent since its deprecated

spiral light
#

player.setItemOnCursor maybe

sharp flare
#

I know it can be used still but asking if there are other ways

sharp flare
spiral light
#

what version ?

sharp flare
#

1.18 api

spiral light
#

Player (extends HumanEntity) has this

sharp flare
#

maybe i can just event#getCursor#setAmount to 0 or set type to air

#

idk if it gets fired though or mutable

spiral light
#

dont know what is wrong with player.setItemOnCursor

sharp flare
#

will do that first then the one I said

chilly haven
#

Hello is there a way to check if a player his inventory is full?

spiral light
#

inventory.getFirstEmptySlot() will return -1

sharp flare
#

player.getInventory().firstEmpty() == -1

trim creek
#

Is using "this" in a static context really that illegal in Java? πŸ˜†

dusk flicker
#

everything is illegal in java

trim creek
#

lol

spiral light
#

its not clean code to set something to "this" when the obj is static

trim creek
#

player.sendPluginMessage((Plugin) this, "BungeeCord", out.toByteArray());

#

that line

#

requires

#

that this

#

but the IDE says

#

that its illegal

#

Xd

dusk flicker
#

are you in your main class?

trim creek
#

Ofc

#

'cause I cannot do that in the game selector

#

but I somehow need to reach the loader

sharp flare
trim creek
#

But just implementing it won't work with private Loader lapi = new Loader();

dusk flicker
#

might need to use a singleton instance rather than this

trim creek
dusk flicker
#

You also shouldent need static methods in your main class

#

You should just get access to it via a singleton instance (or DI) and then call the method

trim creek
#

calling by plugin.sendToKitPvP(player); or something like that?

dusk flicker
#

yeah

#

generally itd be on the lines of PluginMainClass.getInstance().sendToKitPvP(player);

#

ofc getInstance can be named anything, as long as that method exists in the main class as static

trim creek
#

Still does nothing... πŸ˜‘

#

Just says that it is already inited

#

...

#

No mind of what

dusk flicker
#

Can you send the code to your main class in a paste?

#

?paste

undone axleBOT
trim creek
#

Never gonna fucking use the code Loader loader = new Loader();

#

It just fucks up my plugin

#

And I've fucking had enought

dusk flicker
#

is Loader your main class?

trim creek
#

Yes

dusk flicker
#

ah so thats why

trim creek
#

Because it just loads

dusk flicker
#

yeah that will throw an error

#

You would want a static variable of Loader in the top of your class, not initialized, in onEnable set it to this

#

Then have a way of getting that variable, and you have a singleton

trim creek
#

wat

#

The main problem is that my loader is called Loader instead of Main?

dusk flicker
#

no that doesnt matter

trim creek
#

Huh

#

It would actually be rude

dusk flicker
#

In this case my main class is named AlphaCentauri, (I am using lombok, but you could just create the methods)

chrome beacon
#

Lombok πŸ‘€

dusk flicker
#

You would create an instance variable, and then in the onEnable set it to this

dusk flicker
trim creek
#

Eclipse πŸ₯΄

#

Just to make you feel better

#

πŸ₯΄

dusk flicker
#

What?

trim creek
#

Yes

#

I use Eclipse

#

for no reason

dusk flicker
#

oh

trim creek
#

Cuz I think IntelliJ is hard

#

I wasn't even able to modify my plugin

#

and it makes the plugin have a long package

#

which I don1T want

dusk flicker
#

that just means you have to learn more about it

#

I started with Eclipse, then moved to IntelliJ as Eclipse was crashing a lot for me lol

trim creek
#

how is that possible?

dusk flicker
#

may have been a crappy pc, bad ver, could be a lot of things Β―_(ツ)_/Β―

#

Didnt care to troubleshoot it

trim creek
#

So basically

#

When having done the instance

#

Where do I exacly need to use it?

#

In the game selector, or in the loader?

dusk flicker
#

You can use it anywhere to get your main instance

#

You can also make that sendToKitPvP method not static, I presume its static based on the error

#

Which would allow this to work in it

trim creek
#

So you mean, I should make the sendToKitPvP back into the gamemenu? πŸ€”

dusk flicker
#

you could

#

Up to you

#

Just without it being static, you can use this, or the instance (if you are accessing from another class), and yeah you could have it in another class

trim creek
#

πŸ€”

#

So I need to use instance instead of this?

blazing scarab
#

Intellij is simple as dick

trim creek
#

(instance as a variable is unused)

blazing scarab
#

But still much powerful

trim creek
dusk flicker
#

in another class, yes you can

hybrid crest
#

Anyone got an idea how to display Gif in 1.18? As the plugins that does that isnΒ΄t updated because of the new packet handling

blazing scarab
#

oh ok that makes sense

dusk flicker
#

Or if it is in your main class still, and the method isnt static you can just use this

trim creek
#

I sent it back to the game menu

#

And now it says the same... -.-

#
java.lang.ClassCastException: class neonowlgery.*************.core.lobby.menus.LobbyGameModeMenu cannot be cast to class
 org.bukkit.plugin.Plugin (neonowlgery.*************.core.lobby.menus.LobbyGameModeMenu is in unnamed module of loader '
**********.jar' @7ef6f50a; org.bukkit.plugin.Plugin is in unnamed module of loader java.net.URLClassLoader @484b61fc)
dusk flicker
#

you have a cast somewhere

#

That shouldn't be

hybrid crest
#

Yeah, just a way to display a GIF ingame, normal images works fine but atm I canΒ΄t find a GIF version

trim creek
#

The JavaPlugin? πŸ˜„

dusk flicker
#

you are casting LobbyGameModeMenu to Plugin somewhere

#

Rather than using an instance call I believe

trim creek
#

Nah

#

I removed the JavaPlugin casting

#

as

#

?di

#

but it still says the same

#

Which is weird

#

Because the code is not actually coded xd

dusk flicker
#

You dont want a new instance of your main

#

that will throw an error

blazing scarab
#

✨ Constructors ✨

trim creek
#

Depends where because the plugin is a whole core

#

Containing a lobby

#

and a KitPvP in the inside of it

#

By the

public LobbyGmaeModeMenu(JavaPlugin plugin) {
}
```?
It is deleted.
#

Instance in Loader is unused

blazing scarab
#

πŸ†˜ PUBLIC FIELD πŸ†˜

#

yes.

trim creek
#

🧐

spiral light
#

πŸ†˜ Main-Class named "MainClass" πŸ†˜

trim creek
#

Actually

#

You want me to put back the depenency?

#

Man

#

It made no sense to delete it then...?

blazing scarab
#

"Class" or "Object" prefix is unecessary verbose

trim creek
#

Its called Loader

dusk flicker
#

?main

trim creek
#

It is named Loader, because...

#

...it loads things...

#

Which makes sense

#

XD

summer scroll
blazing scarab
#

Tf is plexus compiler

#

run buildtools and install spigot to tour local repo

summer scroll
#

I have for days

summer scroll
trim creek
#

Having

public static Loader instance;

public void onEnable() {
  instance = this;
}

also does the same error πŸ˜›

grim ice
#

is it possible to disable all caves and ores in a world

#

Any information is fine

maiden briar
trim creek
quiet ice
#

It's velocity

ivory sleet
#

two different platforms right?

summer scroll
trim creek
#

XD

ivory sleet
#

aglerr tbf Idk how you specify a compiler with gradle

#

I think thats an ide setting moreover

summer scroll
#

Oh, you dm'ed me. I didn't notice.

ivory sleet
#

actually

summer scroll
#

Tbh, that really doesn't help much it's just the dependency for the compiler.

ivory sleet
#

compileJava.javaCompiler.set("eclipse-plexus-compiler")

#

that ought to work

#

hmm

#

actually

blazing scarab
#

Tbh that sounds more like a workaround

summer scroll
#

It accepts Property<JavaCompiler>

ivory sleet
#

java.toolchain {
vendor = JvmVendorSpec.matching("eclipse-plexus-compiler")
}

#

that's probably the more solid solution

blazing scarab
#

I dont get the problem, 1.16 nms worked without any problems for me

ivory sleet
#

Ye same

summer scroll
#

Try to play with PlayerInfoData

#

I still get the bad RuntimeInvisibleParameterAnnotations errors on compile

blazing scarab
#

wha

summer scroll
#

Maybe, but when I'm really stuck.

#

I have 3 modules tho, so that's why I don't want to switch right away.

midnight shore
#

Hi guys! Is there any way to get the entity a player is looking at? if yes, how can i do so?

blazing scarab
#

do a ray trace

midnight shore
blazing scarab
#

world.rayTrace

midnight shore
#

ok i'll try ty

#

what is this double?

quaint mantle
summer scroll
#

The distance

midnight shore
#

ok

quaint mantle
#

see javadocs

grim ice
summer scroll
#

Show us the errors.

dark arrow
#
@EventHandler
    public void onWalk(PlayerMoveEvent event){

      if(plugin.getConfig().getBoolean("enable")){
          Player player = event.getPlayer();
          if(player.getLocation().getBlock().getType().equals(Material.STONE_PRESSURE_PLATE)){
              player.sendMessage(ChatColor.RED+"Launched");

          }


      }


    }```
I wrote this piece of code but the problem is it shows to send me the message Launched but instead it does nothing
summer scroll
#

Or you can just use PlayerInteractEvent and check if the action is INTERACT for pressure plates.

dark arrow
#

ok

summer scroll
#

Also to compare enums, use ==

mighty pier
#

is there an entity move event on 1.8.8?

waxen plinth
summer scroll
#

Looking at your code, your dependency injection thing is wrong.

dark arrow
mighty pier
#

can i do something similar?

quaint mantle
summer scroll
#

?di

undone axleBOT
quaint mantle
#

or Chunk loading stuff idk

summer scroll
#

It's kinda similiar of what you're trying to do but that'll solve your issue.

blazing scarab
mighty pier
#

k

summer scroll
#

Is there even EntityMoveEvent on newer version?

blazing scarab
#

at least on paper there's

midnight shore
#

Hi guys! Is there any way to remove a player from the TABLIST while still being online?

summer scroll
#

Oh on paper, okay

midnight shore
summer scroll
#

Or that

midnight shore
#

i know i can but i don't know how!

blazing scarab
#

Player#hidePlayer i believe

midnight shore
#

and that will hide the player from others right?

summer scroll
#

But that will make the player "invisible" also

midnight shore
blazing scarab
#

Oh! Then use the api method

midnight shore
midnight shore
#

Wow nice site, tysm

summer scroll
#

Yeah it's called javadocs btw.

midnight shore
#

didn't know that, ty

tardy delta
#

what happens when i call someFuture.whenCompleted(lambda).join() (the join thing)?

#

does it only returns the T param or does other stuff too

blazing scarab
summer scroll
#

The plugin.inv is null.

tardy delta
#

that multiple futures are calculating a part of the thing you need?

#

make it private and make a getter

summer scroll
#

You can access like that however I suggest you to make it private and make a getter.

#

Also initialize it so it won't be null.

#

It's null because you haven't assign a value to that field.

dark arrow
#
@EventHandler
    public void onWalk(PlayerMoveEvent event){

      if(plugin.getConfig().getBoolean("enable")){
          Player player = event.getPlayer();
          if(player.getLocation().getBlock().getType().equals(Material.DIAMOND_BLOCK)){
              player.sendMessage(ChatColor.RED+"Launched");

          }


      }


    }```
it was supposed to send me a message when I step on diamond blocks but it does not do that
blazing scarab
#
CentralisedFuture<Clan> first = this.clanManager.getUserClan(player.getUniqueId());
        CentralisedFuture<Clan> second = this.clanManager.getUserClan(receiver.getUniqueId());

        CompletableFuture.allOf(first, second).thenAcceptSync(ignored -> {
            Clan clan = first.join();
            Clan receiverClan = second.join();
});
#

@tardy delta

summer scroll
dark arrow
blazing scarab
#

Getting 2 clans at the same time 😎

summer scroll
#

Yes, it's pretty basic thing on java

tardy delta
#

i will never understand multithreading and futures :C

blazing scarab
#

Well, you have two futures which completes at the same time

#

with CompletableFuture.allOf you create the future which is going to be completed when those two futures will be both completed

tardy delta
#

ah

blazing scarab
#

join() just gets the result

tardy delta
#

and then you get the result

blazing scarab
#

yep. Since both futures are completed, it is not going to cause thread lock

tardy delta
#

does this looks good tho?

blazing scarab
#

yep seems fine

summer scroll
#

just wondering

blazing scarab
#

but, assuming that Lang enum is mutable.. that suck

summer scroll
#

I have a dilemma whether use public static fields for config value or an enums.

#

I store not only String, but also a List, boolean, etc.

blazing scarab
#

both are not the best idea

summer scroll
#

Welp

#

What's the best then?

blazing scarab
#

I suggest using a fluent interface, declaring defaults by annotations:

public interface MyConfig {

  @DefaultInteger(3)
  int someInteger();
  
  @ConfKey("display.user-message")
  @ConfComments("The message shown when a certain thing happens")
  @DefaultString("Hello user")
  String userMessage();
  
  @ConfKey("display.enable-user-message")
  @DefaultBoolean(true)
  boolean enableUserMessage();
  
  @IntegerRange(min = 1, max = Integer.MAX_VALUE - 1)
  @DefaultLong(10)
  long boundedNumeric();
  
  @DefaultString("ONE")
  MyEnum enumValue();
  
  @SubSection
  NestedSection nestedConfigSection();

  @DefaultString("https://github.com")
  URL validUrl();

}
#

And then work with configs like any other object

summer scroll
#

The code will be too long for me xd

quiet ice
#

eeh

blazing scarab
summer scroll
#

something.getMyConfig().userMessage()

blazing scarab
#

I took the example from here

quiet ice
#

I'm not really for annotation-based code flow

blazing scarab
summer scroll
#

I know, there is nothing wrong but it's too long

quiet ice
#

manual parsing would be worse in terms of LOC

blazing scarab
#

i cant think of the shorter solution

quiet ice
#

Probably records and java serialisation, but that isn't really configurable

summer scroll
#

I love records

blazing scarab
#

i don't like annotations too much; but, in terms of something that simple like configs, it's just easy!

quiet ice
#

I use them semi-sparingly as eclipse has a hard time grasping the nullabillity of the implicitly declared methods

blazing scarab
#

eclipse moment

quiet ice
#

Most don't have annotation-based nullabillity checking enabled so I'm not really surprised that it is wonky from time to time

twilit wharf
#

does anyone know of a way to control and ride an entity through 1.8.8 with NMS? I cant find any tutorials or forum posts on this

quiet ice
summer scroll
#

i love lombok

quiet ice
#

Oh yeah, and those too

summer scroll
blazing scarab
#

😁

quiet ice
#

Well, it is more the @Inject annotation that really sparked my hatred towards those

summer scroll
#

but it's so helpful to not write getter and setter

#

i would use it if it's not hated by majority lmao

blazing scarab
#

Pro tip: avoid setters and getters

quiet ice
#

let's ignore the fact that any IDE can automagically generate those

summer scroll
#

i mean the code will look clean

#

at least for me

blazing scarab
#

It has some cool stuff like @Delegate or @SneakyThrows

tardy delta
#

smh why does <Void> exists

blazing scarab
summer scroll
#

although i find it really annoying when trying to search where the method is located

tardy delta
#

i know it's stupid to write this

blazing scarab
blazing scarab
quiet ice
#

If you code well you will never look at the code after writing it

blazing scarab
quiet ice
#

Why is this not a consumer?

blazing scarab
dark arrow
#

how to detect block under the player?

quiet ice
#

Well, this is a Function

blazing scarab
#

..used in completable futures

#

right, brush?

trim creek
#

Okay.... So using the code line....

@SuppressWarnings("resource")
DataOutputStream data = new DataOutputStream(out);

makes absolutely no sense, because it just throws a f#cking error....

java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/libs/org/apache/commons/io/output/ByteArrayOutputStream

And also makes the plugin crash... -.-

summer scroll
trim creek
#

For god's fucking sake

#

I've already tried what Rack tried to tell me

tardy delta
#

but the CompletableFuture#exceptionally does that only gets called when the completion threw an exception or is it from the for example database too?

trim creek
#

I already tried a fucking yt video

#

What the fuck else do I fucking need to fucking do to just fucking send the fucking player to the fucking KitPvP?!

quiet ice
#

Stacktrace please

tardy delta
#

thats a lot of fuck

trim creek
# tardy delta thats a lot of fuck

It is just dreadful that the DataOutput-izΓ© requires a suppress warning, and crashes the plugin, and without it, I would get an error

tardy delta
#

does it gets called when the future is interrupted or stuff?

quiet ice
#

Use try with resources

blazing scarab
quiet ice
#

?notworking and give the stacktrace

undone axleBOT
#

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

tardy delta
#

ah right

trim creek
#
ByteArrayOutputStream out = new ByteArrayOutputStream();
                DataOutputStream data = new DataOutputStream(out);
                try {
                    data.writeUTF("Connect");
                    data.writeUTF("KitPvP");
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
                player.sendPluginMessage(Loader.getPlugin(), "BungeeCord", out.toByteArray());
tardy delta
#

i thought it only handled completion exceptions

paper viper
#

or even better

#

try with resources

trim creek
#

πŸ€”

quiet ice
#

Okay, then check your imports, make sure you import java.io.ByteArrayOutputStream

trim creek
#

Ah

#

So I need the Java one

paper viper
trim creek
#

not the Bukkit one

quiet ice
#
try (DataOutputStream dout = new DataOutputStream(out)) {
    // Do data output stream magic
}
trim creek
#

Now that explains much more...

paper viper
#

don't forget ByteArrayOutputStream too

trim creek
#

Now it works...

#

Finally... πŸ˜„

#

After hours...

tardy delta
#

lol

blazing scarab
#

u know closing ByteArray streams has no effect

trim creek
#

It is time to kill myself... πŸ˜„

quiet ice
paper viper
#

it just looks cooler πŸ₯Έ

quiet ice
#

JIT will compile it down to NOPs anyways - probably at least

tardy delta
#

whas a nop?

quiet ice
#

no operation

quaint mantle
#

Is there an way to add config entries through bukkit/spigot api?

#

i'm using the default config.yml in the resources folder

tardy delta
#

yes use the configuration api

quiet ice
#
Format nop
Forms nop = 0 (0x0)
Operand Stack No change
Description Do nothing.
tardy delta
#

you could create a new file too

#

and load it with YamlConfiguration.loadConfiguration(file) which returns a fileconfig object to work with

quaint mantle
#

i dont want to code an own config. i want to use the default file.

in getConfig there are many things like addDefault or set. but i dont know what of these i could use to add an entry

tardy delta
#

set

#

and you have to save the fileconfiguration too

quaint mantle
#

okay and can this also add entries if they are not exisiting or does it throw an error if i set an nonexisiting entry

#

?config

#

?configurationapi

#

?configapi

#

what

#

this is not the day?

#

?configuration

tardy delta
#

it adds them if they arent present already

quaint mantle
#

it still not the day dessie

quaint mantle
tardy delta
#

i didnt find it too :C

#

meh i stopped working with files so i cant show an example

turbid tartan
#

Very broad question but what Backend database or service should I be looking into for synchronizing the same plugin data across multiple servers?

tardy delta
blazing scarab
quiet ice
#

Or netty if you are less stupid, and if you are really less stupid then you'd probably go with MariaDB or Redis

blazing scarab
#

MariaDB x Redis yep

dusk flicker
#

Redis

turbid tartan
#

I was looking at a Mongo/Redis combination

blazing scarab
#

mongo is for noobs

turbid tartan
#

ik

dusk flicker
#

shut it Mongo is great

blazing scarab
#

but thats doable too

turbid tartan
#

Easy, wich is why I want to use it

dusk flicker
#

Mongo / Redis is nice, thats what I run.

#

You could use any db tho with Redis

turbid tartan
#

I don't really care about scale since this would be for a small server, I just need the data to be the same on all servers

turbid tartan
tardy delta
#

what would i save to the database instead of a world name which is null?

#

so if a location isnt associated with a world what would i save

dark arrow
#

how can i give effects to a player

tardy delta
#

Player#addPotionEffect

blazing scarab
dark arrow
tardy delta
#

i'm wondering if im trying to get Bukkit.getWorld(null) if that will work

dusk flicker
#

prob throw an npe

tardy delta
#

i guess

#

i dont even know if a player can teleport to a location that hasnt a world

dark arrow
#

?effectapi

dusk flicker
#

could do like a check, if world == null use player.getWorld

#

actually I should prob do something like that in my plugin, just realized a fast way for an NPE lol

tardy delta
#

ah in craftplayer class

zinc violet
#

Trying to edit it using Brigadier, but having no luck

raw ibex
#

hello

#
    public void AdvancementEvent(PlayerAdvancementDoneEvent event) {

        NamespacedKey namespacedKey = event.getAdvancement().getKey();
        String key = namespacedKey.getKey();
        if(key.contains("mine_diamond")) {
            if(level != 2) {
                event.getPlayer().removeAdvancement("mine_diamond");
            } else if(level == 2) {
                level = 3;
                Bukkit.broadcastMessage(ChatColor.BLUE + "OP Item Level: 3");
                Bukkit.broadcastMessage(ChatColor.BLUE + "Next Quest: Enter the Nether.");
            }

    }

}```
#

why does removeAdvancement show up in red