#help-development

1 messages Ā· Page 1756 of 1

quaint mantle
#

ok maybe i didnt read all messages on spigot so i dont know that lel

young knoll
#

And tacos

quaint mantle
#

tacos

#

🌮

drowsy helm
#

Best I can do is 3$

young knoll
#

And this is why you don’t have a rewrite

runic mesa
#

How do i spawn a baby zombie?

sullen marlin
#

spawn a zombie and setBaby it

runic mesa
#

Oh i saw that but i saw the deprecated one

#

im dumb

#

ty

valid solstice
#

is there a better way to find the Location of a target block within x amount of chunks around a player than doing something perhaps a linear search with the blocks in the chunks? I feel like this isnt that efficient and is slow especially when multiple players will be using it...

drowsy helm
#

so you want to find a block within a radius?

valid solstice
#

yes, within x amount of chunks

#

example is something like 4x4 chunks around the player

drowsy helm
#

i mean probably the best way to do it is iterate from -x -> +x if you iterate through each block in a chunk itll probably take longer

valid solstice
#

-x -> +x
-z -> +z

#

something like that?

young knoll
#

You can limit the height of your search too

#

Chunk snapshots may be advantageous

drowsy helm
#

yeah just a triple nested for loop should do the job fine

#

could even do it async if necessary but that would raise a lot more issues that would have to be rectified

valid solstice
#

i see... im just woried that checking through every single blocks in x and z will be very slow if im working with something like 8x8 chunks

drowsy helm
#

whats the context for this? Is a single search like that the best method?

valid solstice
young knoll
#

They are for async processing

valid solstice
#

ill try you guys' method and ill look more into them, thanks!

drowsy helm
#

im not sure whether chunk snapshots will be faster than straight Location.getBlock

#

i think its a matter of testing

valid solstice
#

well speed is what im going for, but im also going for the efficiency with lower ram usage if many players will be using this "function" then there'll be constant checks of blocks

drowsy helm
#

i really doubt this would use much ram

#

especially if you're not caching it

#

i would just do it async if i were you

quaint mantle
#

async

#

async

#

async

#

?async

#

heil it

drowsy helm
#

huh

valid solstice
young knoll
#

Ram isn’t the concern

#

It’s cpu time

drowsy helm
#

^

#

you're not caching any new data so its fine

valid solstice
#

alright i see, ill try both methods. thanks!

young knoll
#

Trying to find that X-ray plugin to see it it’s OS

#

But I keep finding anti X-rays

young knoll
#

Open source

valid solstice
#

oh i see, i'm also research something about finding the nearest block too, i can't find any sadly

young knoll
#

Ah you can just getBlockAt async anyway

#

Fair enough

proud basin
#

isn't getBlockAt already async?

young knoll
#

No?

#

It doesn’t return a CompletableFuture

proud basin
#

I thought it did

young knoll
#

No

#

You been using a certain fork’s API?

proud basin
#

nope

tranquil viper
#

is there a way to stop people from using elytras

#

Like a built in event that you can cancel

#

rn im dropping the elytra/taking it off if they try to fly but i feel like there should be a more efficient way

young knoll
#

Actually yes

#

PlayerToggleGlideEvent iirc

snow ember
#

Hey! I'm trying to randomly generate items into a chest.

here's the code to generate the items:

    public Chest generateNormalRng(Chest chest) {
        if (!(chest.getType() == Material.CHEST)) return chest;

        Inventory inv = chest.getInventory();
        for (int i = 0; i < inv.getSize(); i++) inv.setItem(i, generateNormalRng());
        chest.update();

        return chest;
    }

    public ItemStack generateNormalRng() {
        // Note: normal is a hashmap (Integer, ItemStack)
        ItemStack stack = normal.get(new Random().nextInt(400));
        if (stack != null) System.out.println("Generated itemstack: " + stack);
        return stack == null ? new ItemStack(Material.AIR) : stack;
    }

And here's the implementation code:

    private void loadChests() {
        this.chest1 = loadChest(chest1);
        this.chest2 = loadChest(chest2);
        this.chest3 = loadChest(chest3);
    }

    private Chest loadChest(Chest chest) {
        RNGGenerator rng = RNGGenerator.getInstance();
        return this.insane ? rng.generateInsaneRng(chest) : rng.generateNormalRng(chest);
    }

When I run this, the console prints:

Generated itemstack: ItemStack{LEATHER_CHESTPLATE x 1}
[INFO] Generated itemstack: ItemStack{STONE_SWORD x 1}
[INFO] Generated itemstack: ItemStack{FISHING_ROD x 1}
[INFO] Generated itemstack: ItemStack{EGG x 16}
[INFO] Generated itemstack: ItemStack{EXP_BOTTLE x 16}
[INFO] Generated itemstack: ItemStack{EGG x 12}
[INFO] Generated itemstack: ItemStack{SNOW_BALL x 12}

but the chests don't get updated and they stay empty. Any help on this?

young knoll
#

Iirc you don’t want to call chest.update

snow ember
#

how do I update it then?

#

i'm using spigot 1.8.8

young knoll
#

Just don’t call update

snow ember
#

really?

#

I swear if this works 🤷

#

nope

#

still doesn't work

quaint mantle
#

how are you getting the Chest object

young knoll
#

Also why do you have a map with integer keys

snow ember
#

(Chest) Bukkit.getWorld(map.getWorld()).getBlockAt(map.getChest1()).getState();

snow ember
#

because

#

brain

#

its complicated to explain

#

and its messy code :/

#

lemme see if the chest is null

young knoll
#

From a quick search on the forums the only thing I found was not using .update

snow ember
#

one sec

young knoll
#

There is also getBlockInventory

snow ember
young knoll
#

But I think that’s just for getting the half inventory for a double chest.

snow ember
#

not null

snow ember
#

wait a sec

young knoll
#

You’ve made sure there are no other update calls?

snow ember
#

yeah

#

wait one sec

granite beacon
#

super dumb question, do you need to cancel all runnables onDisable()

#

or does spigot do that for you

drowsy helm
#

no you dont

granite beacon
#

so spigot takes care of that?

young knoll
#

Yes

drowsy helm
#

yep

granite beacon
#

By checking when the plugin you passed in to make the runnable is no longer loaded?

#

Just curious^

vast junco
#

Is it possible to detect a custom packet sent from a forge client in spigot? I've tried using a library (https://www.spigotmc.org/resources/api-packetlistenerapi.2930/), but it doesn't work for any packets. I'm fairly sure I'm sending the packets correctly on the client side. What is the best way to accomplish this?

vast junco
sullen marlin
#

custom packet? Use the custom payload / plugin messages / whatever forge calls it rather than an entirely custom packet

#

a custom packet wont work without server modding

valid solstice
#

what is the difference of chunk and chunksnapshot?

tranquil viper
#

doesnt actually cancel the event

summer scroll
hybrid spoke
summer scroll
crimson terrace
#

not sure if this is correct. try taking the '' off the column name maybe?

#

and put them on the aglerr

summer scroll
#

tried that too, but i'll try it again'

hybrid spoke
#

oh i didnt saw them

#

remove them

crimson terrace
#

SELECT * FROM theonly_mobcoins WHERE name = 'aglerr';
is what I would do

hybrid spoke
#

also ' not `

summer scroll
#

oh okay

#

can i just not use the ticks at all?

hybrid spoke
#

i think you have to use them

crimson terrace
#

Youre searching for a string. I think the ' ' on the aglerr is necessary

hybrid spoke
#

^

sullen marlin
#

use prepared statements

crimson terrace
#

if youre having trouble getting the results you need we will have to get more information

summer scroll
#

thanks guys

#

ill consider using prepared statement too

crimson terrace
#

np

quaint mantle
#

how to get the last element of this set ?

hybrid spoke
quaint mantle
#

i just turned it to an arraylist

#

and done that

#

thanks

summer scroll
#

Anyone here familiar with Hikari? I'm trying to get rid of this warning because it sounds bad.

[15:02:12 WARN]: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
#

Oh fixed it.

loud slate
#

hello, how to auto pull fishing rod when CHAUGHT_ENTITY given?

acoustic widget
#

hello what is the best way to get all players from a server with big amount of players ?
Is there any way to request players with a limit/offset ? Or is it safe to use getOfflinePlayers for a LARGE amount ?

worn tundra
#

Why?

#

What for do you need all players at once?

acoustic widget
#

I need to list them in a gui with pagination but maybe using getofflineplayers could be very bad performance

worn tundra
#

List ALL players that have ever joined your server in a GUI?

acoustic widget
#

yes

#

Maybe I can use one time getOfflinePlayers and store them myself in a database

#

what do you think

summer scroll
#

List of all online players or all players that have joined the server?

worn tundra
#

It's just nonsensical to me to do that

#

All players

#

For some reason he wants all players to be in a GUI. What is the GUI for? @acoustic widget

summer scroll
#

Well, you can store the data everytime players joined the server

hybrid spoke
#

maybe look at what it do in craftbukkit

#

so you can be sure to not open and read the playerdata file everytime

gray zodiac
worn tundra
#

Didn't register it

#

The listener

gray zodiac
#

bruh I forgot, so dumb smh lol

acoustic widget
hybrid spoke
acoustic widget
#

Any way to get them from idea easily ?

hybrid spoke
#

just get them at server start and cache them from there on

quaint mantle
#

why when i try to compile my plugin with gradle, this happens ?

acoustic widget
fierce quail
#

Is there any !!!short!!! small snippet for sending players to another server using bungeeeeecord

sullen marlin
#

onEnable: Bukkit.getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");

#
              DataOutputStream out = new DataOutputStream(b);
              try
              {
                out.writeUTF("Connect");
                out.writeUTF(server);
              }
              catch (IOException localIOException) {}
              event.getPlayer().sendPluginMessage(this, "BungeeCord", b.toByteArray());````
karmic mural
#

Trying to pass an instance of my main class to an event listener so I can access my config... Tried searching about a bit but couldn't find what I needed, any pointers?

sullen marlin
#

?di

undone axleBOT
karmic mural
#

thank you

solid cargo
#

why does this appear when i write a command

#

and the command doesnt execute

sullen marlin
#

that's not a spigot message

#

you must have another plugin doing it

solid cargo
karmic mural
#

I'd honestly assume it has to do with a permissions plugin, since you said you were trying to do commands

hybrid spoke
#

let me get my holy crystal ball

#

my holy crystal ball says

#

that we cant help you without any code which could cause that

solid cargo
#

i mean like, i dont have a set up perm

hybrid spoke
#

i mean, is this now a server or dev issue?

solid cargo
#

no idea lol

#

i coded the command

#

so i guess a dev issue

#

OH SHOOT

#

i forgot to change executor class

karmic mural
#

It happens

#

I forget how to write "this" sometimes šŸ˜…

hybrid spoke
#

yeah it happens, i sometimes forget how to hack the NASA

karmic mural
#

the NASA or The NSA

hybrid spoke
#

NASA = NSA

karmic mural
#

I mean...

hybrid spoke
#

they left an A

karmic mural
#

of course

hybrid spoke
#

so they are hidden

#

but actually they are one and the same

karmic mural
#

Also can I assume I've done this right, will the event listener work?

    public class onBlockBreak implements Listener {
    private final Pureores plugin;
    private final Collection<Material> blocks = Arrays.asList(new Material[] {});

    public onBlockBreak(Pureores plugin) {
        this.plugin = plugin;
    }

    @EventHandler
    public void onBreak(BlockBreakEvent event) {
        if(blocks.contains(event.getBlock().getType())) {

            // Do stuff
        }
    }
}```

Main class(not the whole thing):

```java
private onBlockBreak BlockBreakEventListener;

onEnable(){
 BlockBreakEventListener = new onBlockBreak(this);}

karmic mural
hybrid spoke
karmic mural
#

hah the issue is I can't really do that since the rest of the code isn't implemented yet

#

But I'm gonna charge ahead assuming the impossible: That I did something correctly first try

hybrid spoke
#

more or less

#

the listener looks fine except of new Material[] {}, but why are you making your listener to an instance variable in your main?

#

also the variable is redundant, you can just directly register it

karmic mural
#

I want to pass the config so I can access it in that onBlockBreak class, since the Collection there is meant to contain the blocks I want to check for in the if statement

karmic mural
mortal hare
#

any ideas how Notchian server (NMS) generates entity ids on the server?

#

is it a counter

#

like inventory ids?

#

if so, is there any maximum entity id value

#

since i need to generate entityId which does not collide with server's entityID

#

EDIT: Found it

#

**this.as **is a field for entityId in NMS entity class. It uses AtomicInteger to increment value, although it seems no sense to increment it atomically since entityId is a local class field, and the AtomicInteger is not used anywhere apart inside the constructor lol?

this.as = b.incrementAndGet();
#

atomicInteger object is created inside the class too. what a useless object

tardy delta
#

is there a way to is there a way to cancel a method when something is true and if not, execute the overridden method from itsself?

eternal night
#

Call super ?

tardy delta
#

but i'm handling it in the super class

#

so :/

eternal night
#

You want to explicitly call the child classes version of a method ?

tardy delta
#

kinda

eternal night
#

That is not how inheritance works šŸ˜…

tardy delta
#

wew

#

lets make a new method then

#

which will be overridden

eternal night
#

The parents method wouldn't even be called unless you call super in your child's method

#

So I don't know how you would only partially execute the parent one

loud slate
#

hello, are there anyone who do stuff with fishing rod?

drowsy helm
#

What

#

I go fishing a lot if thats what you’re asking

quaint mantle
loud slate
#

i mean, i need write a plugin where auto pull the fishing rods, when fish / entity

drowsy helm
drowsy helm
iron palm
#

Hi I have a problem for settings some values in config :

                        KnockbackFFA.getInstance().getConfig().set("kits.1.contains", Arrays.stream(playerinventory.getContents()).filter(item -> item != null).toArray());
                        KnockbackFFA.getInstance().getConfig().set("kits.1.name", args[1]);```

the main problem is actually that the config shows like this :
https://paste.md-5.net/ezibeyaciv.makefile
But i dont want to display   - ==: org.bukkit.inventory.ItemStack
but if i try to remove them i could only get the item contents so i cant get the item meta's that easily 
what can i do
drowsy helm
#

so you just dont want it to serialize like that?

#

you can make your own parser

iron palm
drowsy helm
#

just make a method that read/writes the config to/from an item stack, all you really need is name, stack size, lore, enchants

#

whats the usecase anyway?

iron palm
#

right i need to try that

#

thanks

eternal oxide
#

- ==: org.bukkit.inventory.ItemStack tells the serializer what the object is. you can;t remove it simply

drowsy helm
iron palm
last ledge
#

Elgarl is the best, always helpful ^^

eternal oxide
#

you would be better accepting the extra line in teh config than rewriting the majority of a serializer/deserializer

drowsy helm
#

ElgarL stan

drowsy helm
#

i mean making your own serializer really isnt that hard

eternal oxide
#

you also have a typo in the lore of yoru knockback stick

paper viper
#

Oh wait

#

fuck

eternal oxide
#

I always do

tardy delta
#

is it worth disabling the tabcomplete when the sender is the console?

eternal oxide
#

no

#

tab complete can be used in the console too

tardy delta
#

wdym used? i cant see the options

eternal oxide
#

I actually had a request to allow it in console

tardy delta
#

oh

paper viper
tardy delta
#

paper..

paper viper
#

spigot should really add it too

tardy delta
#

hmm true would be nice

paper viper
hybrid spoke
#

isnt tab complete already available in spigot?

paper viper
hybrid spoke
#

yeah

#

in console too

eternal oxide
#

yes

paper viper
#

Wait so does Spigot show the options?

ivory sleet
#

Believe paper has somewhat a more sophisticated variant but yeah

paper viper
#

Yeah

ivory sleet
#

Should be in spigot afaimc

acoustic widget
chrome beacon
#

You will have to import NMS and look around in there

#

Should be called Craft<something>

hybrid spoke
#

craftbukkit

#

not NMS

chrome beacon
#

They come together

pastel mauve
#

I tried developing a plugin but in the console, it tells me to use Version 60 of Java instead of 61, but i dont know how to switch it. I downloaded Java 16 but in IntelliJ it tells ne to use Java 17

iron palm
#

someth like this :

"  ));
tardy delta
#

Arrays.stream(Arrays.stream ) :/

iron palm
eternal oxide
#

!String.equals

ivory sleet
#

Objects::nonNull

iron palm
ivory sleet
#

Yeah you’d be using the method reference instead of that lambda expression

ivory sleet
#

Anyways you could also flatMap that stream

iron palm
#

btw cant i stop - ==: org.bukkit.inventory.ItemStack
by adding itemstack?

ivory sleet
#

Uh

#

No

#

You’re comparing an item stack against a string if I read that right

iron palm
ivory sleet
#

Because a string will never be equal to an ItemStack through an identity comparison

iron palm
#

cause i need them

ivory sleet
#

Why do you want to remove it?

#

That’d yeet its serializability

iron palm
ivory sleet
#

Yeah well bukkits serializing system adds those - :== class.Class

#

It’s a way to later tell which class to use for deserialization

iron palm
ivory sleet
#

Yeah

iron palm
#

oh than i dont think removing it is a good idea

ivory sleet
#

Assuming you’re storing and ItemStack just like that

ivory sleet
#

Yeah wise choice

iron palm
#

a temporary itemstack

ivory sleet
#

Some people decide to instead just serialize and deserialize it their own way, not depending on the Bukkit serialization system

#

So that’s why you might not always encounter that - ==: thing

iron palm
ivory sleet
#

šŸ‘

iron palm
#

btw this code duplicated the kits in the configuration uhh

ivory sleet
#

Oh is it configuration?

iron palm
ivory sleet
#

Ah then you might want to actually serialize it/ deserialize it your own way to make some what more appealing to the end user

iron palm
#

cause there are more bugs than that

ivory sleet
#

Yeah, well everything comes at a cost

weary pagoda
#

how do i keep items in an inventory?

hybrid spoke
weary pagoda
#

gui

hybrid spoke
#

you dont store it, you set it ever and ever again

weary pagoda
#

I click on the campfire, put the stuff on, can't you save?

quaint mantle
hybrid spoke
quaint mantle
hybrid spoke
#

I am assuming that at this point here is no configuration that can be adjusted using a config gui

#

so

#

he have to set it ever and ever again

#

and even if he stores it somewhere

#

he have to set it ever and ever again

#

except if he saves the inventory somewhere

#

which he opens for every player

feral pier
#

need small help with PrepareItemCraftEvent

hybrid spoke
#

?paste

undone axleBOT
manic furnace
#

How can i set the executer for a tab completer?

tardy delta
#

plugin.getCommand(name).setTabcompleter(tabcompleter)

tranquil viper
#

Is there a way to only make part of a message clickable?

acoustic widget
tranquil viper
#

Ie: Click HERE to teleport and only clicking "HERE" will execute the event

tranquil viper
tardy delta
#

like thiss

split ridge
#

Can anyone tell me why my tree populator only generates trees at y level 60 and close to water?

@Override
public void populate(World world, Random random, Chunk source) {
  if (random.nextBoolean()) {
    int x = random.nextInt(16);
    int z = random.nextInt(16);
    int y = 0;
    for (y = world.getMaxHeight() - 1; source.getBlock(x, y, z).getType() == Material.AIR; y--);
    world.generateTree(source.getBlock(x, y, z).getLocation(), TreeType.BIRCH);
  }
}
iron palm
weary pagoda
#

minecraft no longer works, how can i fix it?

split ridge
tranquil viper
tranquil viper
weary pagoda
#

help

tranquil viper
#

i don’t know how to

#

what do you mean it doesn’t work

hasty prawn
#

You have told us nothing, how are we supposed to help confusedcat

weary pagoda
#

i downloaded the new launcher, deleting the old one but it says unable to update the native launcher

tranquil viper
#

this isn’t minecraft support

#

it’s spigot support

weary pagoda
#

but before they answer I will have broken the pc

split ridge
weary pagoda
#

no

split ridge
#

Then maybe start there :)

tardy delta
#

install the older one back

weary pagoda
#

nothing goes anymore, it tells me it is impossible to move the file to another disk drive

tardy delta
#

that's just your pc

#

probably moving around in program files

iron palm
#

Why stream duplicates values in my config file?

hasty prawn
#

Wdym

#

Duplicate values?

iron palm
#

something happens in config like this

hasty prawn
#

They're not in the same depth, the first kits is a child section

iron palm
hasty prawn
#

They're not, notice the 2 spaces before the first one

iron palm
#

ohhh

chrome beacon
quaint mantle
#

guys can NBTTagCompound act like pdc ?

#

cause pdc api is not in 1.8.8

young knoll
#

Pretty much

#

Pdc is just an NBT wrapper

quaint mantle
#

so i can for example set command:test

#

and get it

#

for my item

#

right ?

eternal night
#

well you'll have to handle all the serialisation logic

quaint mantle
#

or NBTTagCompound is just for vanilla data

eternal night
#

it isn't

#

but you can just use stuff like NBT-API

#

and worry a bit less about server internals

quaint mantle
#

is there anything other than nbt-api ?

#

to make a pdc thing in 1.8

dire marsh
#

not using 1.8

quaint mantle
eternal night
#

I mean, the PDC implementation is open for you to look at

dire marsh
quaint mantle
#

but others wont

dire marsh
#

their loss i guess

iron palm
quaint mantle
#

i know that

#

but what about the pvp

#

ocm ? lol

iron palm
#

we also have a plugin for that

dire marsh
#

patch the server yourself for 1.8-like pvp

iron palm
dire marsh
#

ocm is shit

#

patching server is better

quaint mantle
#

i was just asking for help about something like pdc in 1.8

#

so i wont have to use lores

eternal night
#

Well, yes you can use the items NBTTagCompound

dire marsh
#

Why do you need it for a bedwars gamemode in the first place

eternal night
#

identifying custom items ?

quaint mantle
#

i just said for example

eternal night
#

huh

quaint mantle
#

i wont to make my plugin support all versions

#

so i wont have to use lores

eternal night
#

glhf shipping your own PDC implementation to multiple versions

quaint mantle
#

ahh i will just use lores

#

šŸ˜‚

acoustic widget
viscid edge
#

Hiring Java Developers

lean gull
#

hi everyone, i have a very basic question that you will most likely make fun of me for:
how do i use the logger to send a message to the console? currently i just use the sout thing, but every time i do it, it tells me in the console to use the logger.

young knoll
#

?services @viscid edge

undone axleBOT
hybrid spoke
lean gull
#

and then .info("hi") right?

young knoll
#

It has various methods for sending different level messages

vale ember
#

hey, i want to make my plugin work on 1.8-1.17.1 and i want to know, is there any point on making nms support for version like 1.16.1, 1.13.1 and so on?

young knoll
#

Probably not

hybrid spoke
young knoll
#

That wasn’t the question

vale ember
hybrid spoke
#

just like 1.8.8 has 1.8.1_R iirc

lean gull
#

i did this in the main class:
getPlugin(this).getLogger().info(ChatColor.translateAlternateColorCodes('&', "hello"));
but (this) has a red line below it

#

the hello will be changed later btw

vale ember
lean gull
#

nvm i just needed to add .getClass()

young knoll
#

Yes

hybrid spoke
young knoll
#

1.16 has 3 NMS versions

lean gull
#

btw can someone tell me if i'm doing this right or not

young knoll
#

However hopefully no one is using 1.16.1-4

hybrid spoke
#

just swear on them in console if they do

young knoll
#

Just don’t add support for them unless people start asking I guess

vale ember
hybrid spoke
hybrid spoke
vale ember
hybrid spoke
#

most likely

acoustic widget
#

OK ty

hybrid spoke
#

not sure if you cant just count up xd

#

but nms changes are so fucked

#

prob doesnt work

vale ember
#

and also, what should i import in pom.xml spigot or bukkit or something else?

young knoll
#

Spigot

hybrid spoke
#

you need to shade in CraftBukkit ig

young knoll
#

What

#

No

#

Don’t do that

hybrid spoke
#

spigot doesnt have nms

young knoll
#

spigot does

hybrid spoke
#

sure?

vale ember
#

if i use spigot instead of spigot-api it has

young knoll
#

spigot-api does not

hybrid spoke
#

oh well then forgot what i said

vale ember
#

and ig i should build like 10+ servers to test them working?

young knoll
#

Have fun with that

hybrid spoke
#

you guys test what you did?

#

amateurs

vale ember
#

me, yes

young knoll
#

Some people upload jars that don’t even load

#

Its terrible

hybrid spoke
#

strong people*

lean gull
#

does anyone know what the label parameter in a command method does?

vale ember
#

what alias is used to issue command

hybrid spoke
lean gull
#

i'm getting 2 different answers, i'm confused

hybrid spoke
#

you could just look up the docs

#

nah, more or less the same

eternal oxide
#

label is the command/alias as it was typed

lean gull
#

i don't understand

eternal oxide
#

cmd is the actual registered command

hybrid spoke
#

label is the thing triggered your command executor

#

command is the command

#

which belongs to the label

vale ember
#

so your command may have alias like gamemode and gm, the label says what alias is used

eternal oxide
#

if you have a command called /test with an alias of /fubar. If you type /fubar, label will say fubar, while cmd will say test

lean gull
#

oh ok

#

can you only use getPlugin in the main class?

eternal oxide
#

you don;t need to

#

the main class is yoru plugin

lean gull
#

it's not letting me do it in another class

eternal oxide
#

pass a reference of your main class when you create the other class

vale ember
#

getPlugin is static method of your main class

eternal oxide
#

?di

undone axleBOT
young knoll
#

Get plugin is a static method of JavaPlugin actually

vale ember
#

dep injection is your option but if you REALLY need to use getPlugin you can use

YourPluginClass.getPlugin(YourPluginClass.class)
young knoll
#

JavaPlugin.getPlugin(YourPluginClass.class)

lean gull
vale ember
#

simple words: if you need plugin in your method, require it as parameter, if you need it in your class require it in constructor

lean gull
#

will this actually be useful to me in the future? cause right now i can just make a method in the main class with an input parameter that will send the inputed message, and then i can call it from another class

rough jay
#

How can I program an event to happen each X minutes?
For example :

every 5 minutes:
    set weather clear in world "world"
    give all players online 1 diamond
vale ember
undone axleBOT
rough jay
lean gull
#

that's in skript

#

so i called u a skript boi

rough jay
#

what's skript?

lean gull
#

the language that that code is in

#

it's like a simpiler version of java

rough jay
#

uh this is english lol not skript

lean gull
#

yep, skript is mostly english

rough jay
#

well this is the first time I coded something without meaning to šŸ˜‚

lean gull
#

i don't think it will work, but it is probably very close to working

#

so can anyone explain to me dep injection? i don't even know what it is

lean gull
#

alright

#

oh and just keep in mind: i'm not going to click on any links that i do not know of, so if you're like making a big expliniation text wall or whatever, don't bother including any links to anything that is not well known

vale ember
#

example:

public class SomeClass {
  public void registerListenerBAD(Listener listener) {
    JavaPlugin plugin = JavaPlugin.getPlugin(YourPluginClass.class);
    plugin.getServer().getPluginManager().registerEvents(listener, plugin);
  }
  public void registerListenerGOOD(Listener listener, JavaPlugin plugin) {
    plugin.getServer().getPluginManager().registerEvents(listener, plugin);
  }
}
lean gull
#

oh nvm i thought you were gonna explain it to me

#

um i don't really understand what's going on here

vale ember
#

in simple words

#

it means you should not use getPlugin()

#

you should just take plugin as parameter if you need it in other classes

#

for example, if you have method, in which you need your plugin's class, you should just ask it as argument in method like:

public void myCoolMethod(JavaPlugin plugin, ...) {}
rough jay
#

So if I call this method in the onEnable() method, it should clear the weather each 5 minutes?

public static void repeat(MaxiCity plugin) {
    BukkitScheduler scheduler = Bukkit.getScheduler();
    scheduler.runTaskTimer(plugin, () -> {
        plugin.getServer().getWorld("world").setClearWeatherDuration(99999);
    }, 20L * 5L * 60L, 20L * 5L * 60L);
}
vale ember
#

actually you shud not use bukkit scheduler

#

the better option is to use BukkitRunnable

stone sinew
#

@vale ember what do you think the scheduler runs?

vale ember
eternal oxide
#

they are the same thing

lean gull
#

back

vale ember
eternal oxide
#

BukkitTask and BukkitRunnables are the objects that run on teh Scheduler

lean gull
#

aregcraft sorry but i still don't understand, one of the things i don't understand for example is why you should put the plugin as a parameter, and where it's supposed to be called from and where to

#

like from the main to another class?

eternal oxide
#

just don;t use any deprecated runnables

vale ember
lean gull
#

what parameter? where? when? i don't understand

ivory sleet
#

But BukkitRunnable is more powerful

vale ember
#

if in method outside of main class you are doing something that requires plugin, like registering events or scheduling tasks

lean gull
#

ok, but how do i get the plugin if i'm not supposed to use getPlugin

vale ember
young knoll
#

Pass it from the main class

#

Using this

eternal oxide
lean gull
#

am i supposed to make a method in the main class that returns this?

rough jay
# vale ember the better option is to use BukkitRunnable

Like this?

public static void repeat(MaxiCity plugin) {
    new BukkitRunnable() {
        @Override
        public void run() {
            plugin.getServer().getWorld(plugin.getConfig().getString("main_world")).setClearWeatherDuration(99999);
            HologramCommand hologram = new HologramCommand(plugin);
            hologram.regenerateHolo(plugin);
        }
    }.runTaskTimer(plugin, 20L * 5L * 60L, 20L * 5L * 60L);
}
vale ember
lean gull
#

i'm not sure i understand, lemme write some code and send it here to see if i do understand

vale ember
#

yep

lean gull
#

this is Plugin type, right?

#

like i'm doin it for a constructor

vale ember
#

best option is to use JavaPlugin

stone sinew
vale ember
#

"this" is of your main class type which extends JavaPlugin

#

but it is also extends Plugin, so you may use Plugin

stone sinew
lean gull
#

ok i already have a problem, i can't use this method:

    public JavaPlugin getPluginFromMain() {
        return this;
    }```
#

this is in the main class btw

vale ember
lean gull
#

that's what i understood from what you said

vale ember
#

ok

#

ill try to explain again

lean gull
#

also i am sorry that i do not understand this

vale ember
lean gull
#

also if you can, please like dumb it down by a lot

stone sinew
#
public class <SomeMainClass> extends JavaPlugin {
    private static <SomeMainClass> instance;
   
    public void onEnable() {
        instance = this;
    }

    public static <SomeMainClass> getInstance() {
        return instance;
    }
}

This creates a class. It sets an variable named instance which is the class object. onEnable() it will set the instance as this which is the main class. When getInstance() is ran it will return the instance of the main class.
@lean gull

vale ember
#

Imagine you have some class (not your main class), and you have some method in it.

That method registering listeners or scheduling tasks, or doing something that requires plugin class.

public void myMethod() {
  // doing some task that requires main class
}

Just require plugin's class as argument, like this:

public void myMethod(JavaPlugin plugin) {
  // do some task requiring plugin's class via plugin argument
}

And here is how to call it FROM MAIN CLASS:

@Override
public void onEnable() {
  MyClass.myMethod(this);
}
tardy delta
#

what about return this?

lean gull
young knoll
#

šŸ™ƒ

#

Everything is an object expect for the primitive types int double long float char byte

#

I think I missed one

rough jay
#

last step I need to figure out : detect when a player right clicks on a block

tardy delta
#

what are primitives :kekw:

stone sinew
#

Object is exactly what the name says... and object that you create.
Instance I can't really explain lol Instance is like your call of the object if that makes sense.

young knoll
#

Short, thank you

vale ember
lean gull
#

i don't get it, areg.
from what i understand, you want me to call a method from another class to main, and then that method will then call yet another method back from main to the other class?

#

wouldn't that be the same result as what i did

stone sinew
#

@lean gull show your actual code.

lean gull
#

in other class:

vale ember
stone sinew
# lean gull in other class:

Its not accessible to other classes.
You need to make an instance like I showed above. Or make that method static

vale ember
lean gull
#

now it says that this cannot be refered from a static context

#

referenced*

vale ember
stone sinew
tardy delta
#

make your instance field static

#

and the method to get it too

tardy delta
#

Class.someMethod() - static method

#

instead of objectt.someMethod() - not a static method

lean gull
#

i don't know what an object is

vale ember
#

also, the right way is to make executor class constructor require plugin as argument and than, when you register it in main class, pass "this"

stone sinew
vale ember
#

ill make sample

tardy delta
lean gull
#

ok can only 1 person explain to me please? there are currently 3 people talking to me and my brain is just pure confusion

tardy delta
#

you got all the code, what don't you understand?

vale ember
lean gull
young knoll
#

?learnjava

undone axleBOT
lean gull
#

this is how i learn

vale ember
tardy delta
#

sololearn :kekw:

vale ember
#

sorry

tardy delta
#

i use it :kekw:

vale ember
#

also you don't need getPluginFromMain method.

tardy delta
#

i've been wondering why not just cast sender = (Player) sender

#

ah

lean gull
#

what does this.plugin do

vale ember
#

that is required cuz argument and field name is same

tardy delta
#

player does extends commandsender but not in reverse šŸ™‚

lean gull
#

again, i don't understand, sorry

#

no offense areg, but your english makes it harder to understand

tardy delta
#

this.plugin is a field

lean gull
#

no, plugin is

#

ohh i get it

vale ember
tardy delta
lean gull
#

this. just makes sure that it uses the plugin named variable from this class and not the parameter

#

right?

vale ember
#

yes

tardy delta
#

yes

lean gull
#

ohh

#

i actually don't really mind the name of the variable, so i can just change it

vale ember
#

u dont need to do it

#

it's common practice to name parameter and field same name

lean gull
#

ok so from what i understand, when i set the executor for the command it will also set the plugin variable to the plugin until it restarts, but then it also repeats when u start again

#

is that right?

vale ember
#

yes

lean gull
#

ohh ok

#

thank you

tardy delta
#

plugin.getCOmmand() doesnt set the plugin?

#

it is already set

vale ember
tardy delta
#

looks cursed

vale ember
#

when constructor called, the plugin field in command class is set

lean gull
#

new problem, yay!
if anyone can help that would be great lol

vale ember
#

sorry

#

wrong

lean gull
#

oh ok

vale ember
#

remove "()" after hashMapCommand

lean gull
#

ah ok

vale ember
#

cuz hashMapCommand is variable, not method

lean gull
#

how do i check if a hashmap key is set?

quaint mantle
#

containsKey

lean gull
#

alright, thank you

#

and how do i check if a command argument is an integer?

vale ember
quaint mantle
#

Integer.parseInt

vale ember
#

many ways

quaint mantle
#

or regex

#

may as well just use parseInt

maiden thicket
lean gull
#

how do i use parseInt

vale ember
#

also there is NumberUtils in apache.commons

quaint mantle
#

Integer.parseInt(#String)

lean gull
#

i don't understand, sorry

#

also please only 1 person help me at a time, my brain can only handle so much lol

vale ember
#

but that will throw exception if argument isn't number?

mortal hare
#

Is there any way to get all unloaded entities of players view range?

vale ember
#

and handling exception is slow

maiden thicket
#
int i = -1;

try {
  i = Integer.parseInt(args[?]);
} catch (NumberFormatException e)
{ 
  //tell user it isnt a number
  return;
}```
onyx shale
#

they arent unloaded if its in his view range? wut

quaint mantle
#
int i;

try {
    i = Integer.parseInt(args[0]); // Number arg
}
catch (NumberFormatException e) {
    sender.sendMessage(ChatColor.RED + "That is not a valid number!");
    return;
}

// code
maiden thicket
#

imagine i wrote it on phone ez claps

quaint mantle
#

šŸ˜”

maiden thicket
#

😌

lean gull
#

alright, thank you

vale ember
#

handling exceptions is very slow, best option is apache commons

mortal hare
quaint mantle
#

just use parseint

maiden thicket
#

yeah just use it

onyx shale
#

and get entities inside it

maiden thicket
#

better to learn ways than to always use apis i mean

vale ember
#

Bennchmarks:

#

Benchmark Mode Cnt Score Error Units
Benchmarking.usingCoreJava avgt 20 57.241 ± 0.792 ns/op
Benchmarking.usingNumberUtils_isCreatable avgt 20 26.711 ± 1.110 ns/op
Benchmarking.usingNumberUtils_isParsable avgt 20 46.577 ± 1.973 ns/op
Benchmarking.usingRegularExpressions avgt 20 101.580 ± 4.244 ns/op
Benchmarking.usingStringUtils_isNumeric avgt 20 35.885 ± 1.691 ns/op
Benchmarking.usingStringUtils_isNumericSpace avgt 20 31.979 ± 1.393 ns/op

maiden thicket
#

ok werdo

mortal hare
quaint mantle
#

the apache method is the slowest compared to Integer.parseInt

hybrid spoke
#

the fastes way would be to check each char manually

vale ember
#

"As we can see, the most costly operations are regular expressions. After that is our core Java-based solution."

hybrid spoke
#

and no, exception handling is not slow, it just takes a few extra steps

#

totally fine in his case

vale ember
#

*core java is exception handling

quaint mantle
#

there is nothing wrong with parseInt here, and it is not slow

#

if you were worrying about performance (why?) you'd parse it yourself

lean gull
#

what does (NumberFormatException e) do? also can someone tell me what does try and catch do? i'm guessing it try checks if it's possible to do something, and if there's an error, it will not do it and then catch runs? correct me if im wrong

maiden thicket
#

string utils isnumeric literally uses a loop

hybrid spoke
#

the only thing being slow in exception handling is the stacktrace. everything else is just normal

lean gull
#

i'm also guessing that (NumberFormatException e) is the error that it's looking for?

mortal hare
maiden thicket
#

in this case, when u do a parseint, theres a possibly of a numberformatexception being thrown

#

i.e. u parse a string with a letter

#

it will throw a numberformatexception

lean gull
#

i don't understand, sorry

maiden thicket
#

ok so

#

u have ur code

#

in the try block correct

#

Integer.parseInt

hybrid spoke
#

dont explain it step by step. go all at once

tardy delta
#

boom

maiden thicket
mortal hare
#

you're at the wrong place. @lean gull https://www.youtube.com/watch?v=xNVlq9IEBEg

Full Java Course: https://course.alexlorenlee.com/courses/learn-java-fast
If you're new to programming, I HIGHLY RECOMMEND solving challenges on Edabit: https://edabit.com/?ref=alexlee
Get my favorite programming audiobook for free! https://audibletrial.com/alexleefree
20% off Brain.fm (productivity hack): https://www.brain.fm/alexlee20
Get Tabn...

ā–¶ Play video
maiden thicket
#

else i'd comment it out

vale ember
#

exception handling is good in some cases, but "From this result, we learn that throwing and handling of the NumberFormatException, which occurs in only 5% of the cases, has a relatively big impact on the overall performance. So we can conclude that the optimal solution depends on our expected input."

lean gull
#

please only one person help, i cannot read all of this without being confused

#

thank you

maiden thicket
#

but anyways,
try ->, code to be run. try/catch is great for debugging
catch -> will catch an exception thrown by anything in the try block

mortal hare
maiden thicket
#

some code statements will throw specific exceptions

#

but u can always just use the (i think superclass?) Exception class

hybrid spoke
maiden thicket
#

i don't know how else to explain it on my phone, i'd recommend just watching a video then or awaiting someone else's reply

vale ember
young knoll
#

Wait

#

Are you telling me try-catch is faster

vale ember
#

NOPE

#

fastest is apache common lib

young knoll
#

is_numeric?

mortal hare
#

is there any way to get players that are in selected player's view range

#

apart from for looping

vale ember
#

isNumeric, isNumericSpace, isParsable, isCreatable is approx same speed

tardy delta
#

Bukkit.getOnlinePlayers().stream().filter(p -> executor.getLocation().distance(p) <= max).collect()?

mortal hare
#

THAT still counts as a for loop

tardy delta
#

uhh probably not then

mortal hare
#

i was wondering if there's more lighter way to do that

#
Spawn Player
This packet is sent by the server when a player comes into visible range, not when a player joins.
#

this seems useful way to get players around, but this could be stale data, if player leaves the visible range and never comes back

chrome beacon
#

Paper has getTrackedPlayers

tardy delta
#

getCrackedPlayers :kekw:

vale ember
#

player.getNearByEntities(radiusX, radiusY, radiusZ);

mortal hare
#

this loops all of the entities around the radius

#

it could be costly

#

especially in mob farms

#

getTrackedPlayers is great

vale ember
#

u use paper?

mortal hare
#

yes

#

who doesnt

vale ember
#

oh ok

mortal hare
#

md_5

#

probs is the one who doesnt use it

#

I use Purpur or Airplane

iron palm
#

is there anyway that config would saveitself without deleting something?
not just even only comments it also removes some values in the config

#

currently im using saveConfig();

eternal oxide
#

only if you set the value/path to null

#

well path to null

tardy delta
#

whats the difference between SomeClass<?> and SomeClass<Object>?

#

doesnt seem to work with ?

vale ember
blazing scarab
tardy delta
#

oh

tender shard
blazing scarab
#

depends

tender shard
#

only generic arrays cause huge problems

blazing scarab
#

like, if you wanna return a List of ints as List<Object> you'd have to convert it

vale ember
#

I think List<?> In most cases

lean gull
#

how do i check if a command argument is a string?

blazing scarab
#

Its always a string LoL

lean gull
#

oh right

quaint mantle
#

hey cuties

iron palm
#

Hey Conclure
can you believe that im still stuck in the config file? šŸ˜…

ivory sleet
iron palm
#

I cant find the problem that why it duplicates in config file

iron palm
ivory sleet
#

?paste

undone axleBOT
lavish hemlock
ivory sleet
#

owo

blazing scarab
#

please delete this messages

quaint mantle
#

uwu

lavish hemlock
#

no ā¤ļø

quaint mantle
#

no ā¤ļø

ivory sleet
#

yesnt ā¤ļø

quaint mantle
#

most certainly not ā¤ļø

ivory sleet
quaint mantle
#

wassup @iron palm

iron palm
quaint mantle
#

hi

#

what problem you having?

little trail
#

this is probably a bad question, wondering if this will help anyway java Object playerName = res.get("name"); logger.info("Name of " + playerName.toString()); this.server.broadcastMessage(String.format( "<%s%2> %s%s", ChatColor.BLUE, playerName.toString(), ChatColor.RESET, msg.toString())); the log shows a valid name but the broadcast doesnt work and just stops the entire plugin somehow java Object playerName = res.get("name"); logger.info("Name of " + playerName.toString()); this.server.broadcastMessage(String.format( "<%s%2> %s%s", ChatColor.BLUE, playerName.toString(), ChatColor.RESET, msg.toString())); does work for note but playerName is from a different source

plain scroll
#

how can i get a servers RAM and CPU usage? Atm im using java Runtime r = Runtime.getRuntime(); long memUsed = (r.totalMemory() - r.freeMemory()) / 1048576; But this aint giving me the result i wanthaha

ivory sleet
#

I mean totalMemory should give you precisely what you need

quaint mantle
#

I think you just need to divide it to get MB/GB

plain scroll
iron palm
ivory sleet
#

Runtime.getRuntime().maxMemory() gives max memory

quaint mantle
#

take a look at that

plain scroll
#

ty

iron palm
quaint mantle
#

I'll check

ivory sleet
#

totalMemory gives the currently allocated memory

#

and usedMemory gives you the used memory

plain scroll
ivory sleet
#

sounds plausible

plain scroll
ivory sleet
#

Oh yeah my bad

quaint mantle
ivory sleet
#

freeMemory

iron palm
ivory sleet
#

But you can use freeMemory and totalMemory to calculate used memory

quaint mantle
#

I don't exactly see the issue

#

uhh

#

is it possible to send the whole config

#

instead of a snippet

ivory sleet
iron palm
ivory sleet
#

???

quaint mantle
#

LMAO

little trail
#

what kind of response is that

iron palm
# ivory sleet What is the duplicate there?
    '1':
      name: ''
      contains:
      - null
      - null
      - null
      - null
      icon: IRON_SWORD
    '2':
      name: ''
    '3':
      name: ''
    '4':
      name: ''
kits:
  '1':
    contains:
    - ==: org.bukkit.inventory.ItemStack
      v: 2586
      type: STICK
      meta:
        ==: ItemMeta
        meta-type: UNSPECIFIC
        display-name: '{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"aqua","text":"Knocbkack
          Stick"}],"text":""}' 
and ...
iron palm
quaint mantle
#

the whole whole config

ivory sleet
#

They’re at different levels tho

quaint mantle
#

yea

#

so I'm thinking that the 1st kits in inside of a section

ivory sleet
#

But yeah their content seems to be duplicated Ig?

iron palm
ivory sleet
#

Well

quaint mantle
#

the 1st kits is inside "scoreboard"?

ivory sleet
#

^

iron palm
quaint mantle
#

yes

#

it is

iron palm
iron palm
#

oh

eternal oxide
#

yes it is

iron palm
#

yes

quaint mantle
#

yea..

iron palm
#

lmao

quaint mantle
#

LMFAO

blazing scarab
#

Whats wrong with incrementing?

quaint mantle
#

alr

iron palm
#

this problem made me thinking and checking codes for many hours wtf

blazing scarab
#

no, not really

quaint mantle
#

loll

manic furnace
#

How can i change the name of a player above his head?

blazing scarab
#

You May do for(int i = 0;...) loop tho

ivory sleet
#

You could set the size of the array list you create to the size of the map or top or whatever that is

#

Like on instantiation

#

(:

quaint mantle
#

(:

iron palm
#

ahhhhhhh not again

#

contains: []

#

where is da pain emoji

iron palm
#

btw you need to get the player before that i think

solid cargo
#

why does this happen? I have a random int (Bound 100) and i have set up chances like this:

int random = ThreadLocalRandom.current().nextInt(100);
if (random <= 5) {
// do that and that
} else if (random <=15) {
// do that and that
} else if (random <=80) {
// do that and that
} else {
Bukkit.broadcastMessage("Something went wrong. How the hell?")
}
paper viper
#

i heard that doesnt work but idk

#

with the player.setDisplayName

tardy delta
#

doesnt work with me too

#

i saw this

Send the following
PacketPlayOutPlayerInfo with action REMOVE_PLAYER
PacketPlayOutPlayerInfo with action ADD_PLAYER with a different name
PacketPlayOutDestroyEntity to all players except you
PacketPlayOutNamedEntitySpawn to all players except you
#

i also saw this

GameProfile pprofile = craftPlayer.getProfile();
Field ff = pprofile.getClass().getDeclaredField("name");//don't change here
ff.setAccessible(true);
ff.set(pprofile, //name here);
#

i saw alot šŸŽƒ

solid cargo
lean gull
#

how do i set a variable that i can later use but that will delete itself on restart?

solid cargo
stone sinew
solid cargo
#

ahh

#

but like

blazing scarab
solid cargo
#

i put all possibilties

#

oh wait

blazing scarab
#

Same with playerinfo packet

solid cargo
#

instead of else if (random <= 80), i can use just else

#

right?

young knoll
#

You should use a WeightedRandom impl of some sort

hybrid spoke
solid cargo
#

but then

#

why did chances like this work before

#

and now not really?

#

oh waiit

young knoll
#

yes

solid cargo
#

could i just put else if (random < 80)

hybrid spoke
solid cargo
#

hmm

#

could i use Math.random instead?

young knoll
#

Just handle numbers above 80?

#

Or change the random.nextInt bound

hybrid spoke
#

what are you even trying to do

iron palm
#

why this isnt working
I mean am i wrong in usage of stream?
KnockbackFFA.getInstance().getConfig().set("kits.1.contains", Arrays.stream( playerinventory.getContents()).filter(Objects::nonNull).toArray());
But the output :

  '1':
    name: test
    contains: []```
solid cargo
hybrid spoke
solid cargo
#

oh wait

hybrid spoke
#

since its the same

solid cargo
#

nvm

#

soo

#

im trying to make a gambling table

solid cargo
#

by setting chances

#

so for example: 10% chance for diamonds, 5% chance for emeralds and so on

#

but here i have 3 items

opal juniper
#

seems weird seeing god here

solid cargo
#

item1
item2
item3

5% chance to get item1
15% chance to get item2
80% chance to get item3

hybrid spoke
solid cargo
hybrid spoke
young knoll
#

So you want < 5, < 5 + 15 (20), and less than 5 + 15 + 80 (100)

young knoll
#

Bukkit.getBanList.addBan

solid cargo
#

you gotta kick them tho

young knoll
#

Correct

stone sinew
#

player.ban(String) I think

iron palm
#

playerkickevent

young knoll
#

player.ban is deprecated/removed

#

?jd

iron palm
#

Bukkit.getPlayer(player.getName()).kickPlayer("§cyou got kicked!");

blazing scarab
young knoll
#

heh

iron palm
young knoll
#

Hang on I can improve this

#

Does it compile

#

Also please remove the getPlayer

iron palm
#

is there any replace method for filter?

iron palm
young knoll
#

Bukkit.getPlayer(Bukkit.getPlayer(player.getUniqueId()).getName()).getPlayer().getPlayer().kickPlayer("Banana");

#

Best code

solid cargo
#

Best part of that code is "Banana"

hybrid spoke
#

getLocalizedName doesnt take a parameter

young knoll
#

Also several things there could be null

blazing scarab
young knoll
#

Actually just one, itemmeta

blazing scarab
#

you could use #map

hybrid spoke
iron palm
blazing scarab
#

whats the xy

iron palm
#

cant use it for list of things

iron palm
blazing scarab
#

list.stream()

hybrid spoke
#

list.stream.filter

iron palm
#

does stream exists for list?

#

lmao

grizzled briar
#

can I do

(Player) commandSender
hybrid spoke
grizzled briar
#

ah yes obviously, thanks

hybrid spoke
#

EntityDamageByEntityEvent
block break

young knoll
#

?scheduling

undone axleBOT
iron palm
#

OMG You Read my mind
I was about to ask does anyone already creating squid game plugin or not