#help-development

1 messages ยท Page 1492 of 1

eternal night
#

but paper has no pdc specific changes so

vital ridge
#

Ill show the code how im spawning my skull

eternal night
#

something on your end

vital ridge
#
public PhysicalBox(Chicken chicken) {

        Location skullLoc = chicken.getLocation();
        
        ItemStack head = new ItemStack(Material.PLAYER_HEAD);

        skullLoc.getBlock().setType(head.getType());

        skull = changeSkin(skullLoc.getBlock(), "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTA5ODcwNTk0OWZjNGM0YjI4ZWI4MzQ3NDVjNTc2YTFjMzVkOGQ3MDIyMGM5YTBiNTQyZGVmOGY0NzA5Nzc4YyJ9fX0=");
        
        skull.getPersistentDataContainer().set(ChickenMap.key, PersistentDataType.STRING, UUID.randomUUID().toString());
        
        skull.update();
        
        spawnHologram(skull);
    }
eternal oxide
#

show us how you are adding the pdc data dn how you are testing it in explosion

eternal night
#

I mean that seems pretty fine

vital ridge
#
@EventHandler
    public void onBoxExplosion(EntityExplodeEvent e) {

        List<Block> toRemove = new ArrayList<>();

        for (Block b : e.blockList()) {

            if (b.getType() == (Material.PLAYER_HEAD)) {

                Skull skull = (Skull) b.getState();
                
                if (skull.getPersistentDataContainer().has(ChickenMap.key, PersistentDataType.STRING)) {

                    toRemove.add(b);
                    
                }

            }

        }
        e.blockList().removeAll(toRemove);

    }
#

so yea no idea why it gets removed

#

maybe the b.getState() plays a role here

#

no idea

eternal oxide
#

I would be more likely to suspect the setting of the PDC is wrong. perhaps your changeSkin method is not returning the correct BlockState.

vital ridge
#

its returning skull

eternal night
#

can you check the existing head in the world

#

using like /data get block <x> <y> <z>

vital ridge
#

needs to be a blocke entity

#

i tried under interacting event

#

that if i click on a skull

#

it prints out the pdc

#

and it worked

fickle helm
#

are you setting the PDC data after the block has been placed? If you set it beforehand it will get removed

vital ridge
#

yeah

#

setting after block was placed

#

cant rly set it before anyways

#

I need to get the blockstate and cast it to skull

#

before setting the pdc

eternal oxide
#

in your explode event try b.getLocation().getBlock()

vital ridge
#

just sysout?

eternal oxide
#

just to check its PDC

#

lets exclude any possibility that the blockList is funky

vital ridge
#

wait what do you want me to do?

#

just to sysout?

eternal oxide
#

In your explode event you are testing the block with b.getState() to then check if it has a PDC.

vital ridge
#

Yeah

#

okay so

#

gotchu

eternal oxide
#

instead use b.getLocation().getBlock().getState() to ensure you have a current world BlockState and nothing funky is happening

vital ridge
#

i just need to change this

#

Skull skull = (Skull) b.getLocation().getBlock();

#

from getting the state to getting the block

eternal oxide
#

It will probably do nothing, but lets just eliminate teh possibility that the explosion blockList is bad

vital ridge
#

I mean theres a cast error lol

#

block cannot be cast to skull

#

i need to use blockstate

eternal oxide
#

yes, getState

quartz goblet
#

how do you remove attributes from an item? Like the "attack speed" and whatever. Just need to hide from lore

vital ridge
#

add hiding flags

#

to item meta

eternal night
#

combine the two, and voilร 

quartz goblet
#

thanks guys

vital ridge
#

maybe theres any other ways

#

i could check

#

if the skull was placed by my plugin

#

or is the mystery box

eternal night
#

I mean, this should work

eternal oxide
#

What was teh result of getting the skull from teh location?

eternal night
#

you are 100% certain the placed skull contains the PDC value

vital ridge
#

yeah because

#

after its being placed

#

ive tried getting the pdc

#

in interacting event

#

by clicking the skull

#

placed skull has pdc

#

no fkin idea why it doesnt have it in entityexplode event

#

my plugin depends on the pdc

eternal night
#

quick question, what version are you on

vital ridge
#

1.16.5

eternal night
#

okay

eternal oxide
#

What was the result of getting the skull from the location?

vital ridge
#

Casting error

eternal oxide
#

OK, you ignored me.

vital ridge
#

wait whatsu mean?

#

You wanted me to getlocation.getblock

eternal oxide
#

b.getLocation().getBlock().getState()

vital ridge
#

Oh

#

Nvm

#

mb

#

trying it

eternal oxide
#

I wanted you to get a fresh reference directly from the location to test if the explosion blocklist was a bad block copy

vital ridge
#

WHAT THE FUCK

#

it worked

#

lmaoo

eternal oxide
#

It shoudl be impossible, but there seems to be no other alternative, if as you say the block DOES have the PDC.

fickle helm
#

does that mean there's a bug in spigot for that event?

vital ridge
#

not sure ElgarL your method worked

eternal oxide
#

it means the block list is not a deep clone

vital ridge
#
@EventHandler
    public void onBoxExplosion(EntityExplodeEvent e) {

        List<Block> toRemove = new ArrayList<>();

        for (Block b : e.blockList()) {
            
            System.out.println(b.getLocation().getBlock());

            if (b.getType() == (Material.PLAYER_HEAD)) {

                Skull skull = (Skull) b.getLocation().getBlock().getState();
                
                if (skull.getPersistentDataContainer().has(ChickenMap.key, PersistentDataType.STRING)) {

                    toRemove.add(b);
                    
                }

            }

        }
        e.blockList().removeAll(toRemove);

    }
#

this code here works

eternal oxide
#

It may be a bug in spigot, or teh block list in teh event is not a deep clone

wraith rapids
#

there's nothing deep to clone about a block

#

a block is just a wrapper over a blocklocation

eternal oxide
#

yes, however his code just proved a funkery

wraith rapids
#

whether its new or old, the block instance is just a weakref to a world and three ints

#

whatever you retrieve from it goes through the world reference

eternal oxide
#

It shoudl be, but if that were true his b.getState() woudl return the full Block with PDC.

wraith rapids
#

the only case where that would happen is if b represents a different block than the other instance

#

it's a wrapper; there is no data stored in Block beyond the location

eternal oxide
#

instead doing b.getLocation().getBlock().getState() does get the block with PDC.

wraith rapids
#

getState deferences to the underlying world

eternal night
#

Maybe some plugin is messing with the block list here

eternal oxide
#

Somethgin is up with his explosion block list is all we know

abstract relic
#

does anyone know

#

if chunk format will change

#

in 1.17

eternal night
#

Yes

abstract relic
#

im pretty sure

eternal night
#

It will

abstract relic
#

it will in part two

#

but part one?

eternal night
#

I think it already did ?

abstract relic
#

fuck

eternal night
#

Entities should now be stored separately similar to tile entities

abstract relic
#

i just implemented a parser in 1.16.5

#

oh

#

if its just adding entities

#

should be fine

#

but i dont want to fight the compact array again

eternal night
#

The block pallet format isn't gonna change any time soon I hope

vital ridge
#

Thanks @eternal oxide

abstract relic
vital ridge
#

tho

#

i tried to fix it for hours

eternal night
#

They already had to break that for 1.13 with material registry and block data/block state

abstract relic
#

oh

#

biomes

#

are going to be mandatory now

eternal night
#

Well yes but like. A parser had to already include them

abstract relic
#

and the chunk data format is a little different

eternal night
#

Oh really ?

abstract relic
#

actually no

#

i read it wrong

#

they remvoed the amount of airblocks

#

in the packet

#

and turned it into this

abstract relic
#

still dont

eternal night
#

Oh. But you must have skipped it backt then anyway no?

#

While reading

abstract relic
#

ye

#

but it was optional

#

and it wasnt there 99% of the time

wraith rapids
#
    public CraftBlockState(final Block block) {
        this.world = (CraftWorld) block.getWorld();
        this.position = ((CraftBlock) block).getPosition();
        this.data = ((CraftBlock) block).getNMS();
        this.flag = 3;
    }

unless one of these is different on the returned Block instance, the end result is the same

#

getWorld and getPosition are self explanatory

eternal night
#

Don't think this is for you Kitsune

#

XD

wraith rapids
#
    public net.minecraft.server.IBlockData getNMS() {
        return world.getType(position);
    }

getNMS defers to the world

eternal night
#

But yeah, I think 1.17 already moved entities out of the chunk data files

#

Into their own files

#

Besides that I don't know of any bigger change

wraith rapids
#

there's no two ways around it; the block instance simply does not store any data

abstract relic
#

i didnt rly mess around

#

with 1.17 yet

#

REALLY HYPED FOR JAVA 16 THO

#

FINALLY

#

I CAN JUST SAY FUCK YOU

wraith rapids
#

if the results are different for two block instances, then the blockpos/worldaccess of those blocks are different

abstract relic
#

WHEN SOMEONE ASKS TO SUPPORT JAVA 8

eternal night
#

We will all miss reflection :(

stone sinew
#

Replied to the wrong one lol

abstract relic
#

?

eternal night
#

Whaaaat

abstract relic
#

sorry ur stuck

#

in 1944

#

ye reflection is a bummer

#

but is it gone?

#

like for good?

#

no way

eternal night
#

No lol

#

But a bit more restricted on the NMS parts

wraith rapids
#

no it just got a vasectomy

eternal night
#

And fully blocked on jdk internal classes

#

E.g. URLClasdLoader

#

Or Field

wraith rapids
#

abandon reflection

#

embrace unsafe

eternal night
#

The latter prevents you from modifying static final fields

#

Yes XD

#

Write those bytes yourself

abstract relic
#

wtf

wraith rapids
#

just cuntpaste the java reflection impl from j8 and include it in a library

abstract relic
#

im quitting java

eternal night
#

Good choice XD

wraith rapids
#

i'm actually not sure which layer the new safeguards are on

abstract relic
#

going to just go full time rust

wraith rapids
#

are they in the actual reflection impl that uses unsafe, or are they in unsafe itself?

eternal night
#

Dunno either

wraith rapids
#

based on how I haven't seen a "bring back j8 reflection" library that does what I mentioned I would guess it's actually in unsafe

#

then again I haven't really looked, either

granite stirrup
eternal night
#

Why would you ever want that

granite stirrup
#

cuz

#

yes

eternal night
#

Like, java is already struggling with performance

wraith rapids
#

muh interpreted language

granite stirrup
#

okkk

#

cpp then

#

much faster

eternal night
#

I think there is a project for MC server in cpp

wraith rapids
#

there are like a million c rewrites of minecraft servers out there

eternal night
#

There is feather-rs for rust

abstract relic
eternal night
#

Which is fun

#

Faster

abstract relic
#

weve been working on a rust implementation

eternal night
#

Than you

abstract relic
#

of the minecraft server

abstract relic
#

and were up to date

#

to 1.16.5

eternal night
#

Quill is actually genius ngl

abstract relic
#

and got plugin support using

#

HAHAHAH

#

YES

eternal night
#

Love that idea

#

Virtual wasm runtime

#

Like hell yea

abstract relic
#

its a little bit of a pain

#

to add api stuff

granite stirrup
#

theres like no 1.16.5 cpp server

#

lol

abstract relic
#

ok

#

but cpp

#

is outdated crap

#

fuck cpp!

granite stirrup
#

cpp is fast

#

tho

abstract relic
#

rust is just as fast?

#

if not faster

#

nicer to write

granite stirrup
#

i dont think so

eternal night
#

Sure npm 2.0 man

abstract relic
#

its literally just as fast

granite stirrup
#

i dont think it is

abstract relic
#

and i guess the nicer to write thing is just personal preference

#

why not?

eternal night
#

I don't think he really knows what he is talking about ๐Ÿ˜…

wraith rapids
#

he doesn't

abstract relic
#

fair

granite stirrup
#

cpp is probs almost the fastest programming language

eternal night
#

Sure ๐Ÿ˜‚

granite stirrup
#

java isnt fast lol cpp is faster than java

eternal night
#

Yes. No one said otherwise

#

Concerning that java is basically interpreted it isn't much of a surprise it doesn't reach cpp speeds

abstract relic
#

eh

#

java is pretty fast

#

imo

granite stirrup
#

but doesnt cpp have more performance

abstract relic
#

compared to code that runs natively like c/rust its obviously not as fast

#

yes it does

eternal night
#

I mean the JVM does its best through JIT but

#

Eh

abstract relic
#

i mean compared to python/js

#

java is blazingly fast

eternal night
#

You don't get the fully compiled machine code speed rust/c offer

#

Lol nah

#

js is pretty fast

granite stirrup
#

its close to cpp

abstract relic
#

eh

granite stirrup
#

speeds

abstract relic
#

HAHAHAH

lunar schooner
#

Oeh, JIT + Rust talk, fun times!

abstract relic
#

yo

granite stirrup
#

not kidding

eternal night
#

Latest js runtime

granite stirrup
#

js is close to cpp

abstract relic
#

@lunar schooner i saw ur rust project

#

on github

#

think i starred it

lunar schooner
#

rConsole?

abstract relic
#

ye

lunar schooner
#

:"D Nice

abstract relic
#

think its sick

lunar schooner
#

Havent had much time to work on it lately unfortunately, school and such, should be able to do more work on it soon though ๐Ÿ˜„

eternal night
#

The plugin written entirely in rust ? XD

lunar schooner
#

The majority is

eternal night
#

Lol

lunar schooner
#

37% Rust to 29% java ๐Ÿ˜„

lunar schooner
#

I was actually thinking of writing some sort of Rust wrapper around Bukkit ๐Ÿค”

abstract relic
#

NAH

#

BRO

#

DONT BOTHER

#

FUCK THAT

granite stirrup
#

anyway cpp is faster to boot than java lol

abstract relic
#

yes

#

no one ever said it isnt

#

contribute to feather-rs instead!

granite stirrup
#

java takes like 1 min or something

abstract relic
#

making a minecraft server in rust with plugin support

lunar schooner
#

Worked on a modular plugin system in Rust today, pretty easy, and working on a library with proc macros to make JNI easier, so it should be an easy combination

abstract relic
#

it doesnt what hte fuck

#

eh

eternal night
#

Dunno what Java apps you code m8

abstract relic
#

think its gonna be a pain ngl

eternal night
#

But 1 Mon is trash

granite stirrup
lunar schooner
#

Oh probably, considering Bukkit is huge

lunar schooner
abstract relic
granite stirrup
lunar schooner
#

What the :thonk

abstract relic
#

was doing something similar

eternal night
#

Shag

granite stirrup
#

when i start mc it takes like 1min

eternal night
#

Your JVM needs 30 seconds to start ?

abstract relic
#

but jni on mac

#

is kind of cringe

lunar schooner
#

Why so

#

JNI is the same everywhere ๐Ÿค”

abstract relic
#

some methods are just missing

#

nah

lunar schooner
#

That's odd

granite stirrup
#

isnt mac java outdated

lunar schooner
#

I've never run into that anyways ๐Ÿค”

abstract relic
#

i couldnt get the GetCurrentJVMs function from memory

#

when injecting a dylib

granite stirrup
#

same as the opengl

abstract relic
#

what no

#

?

#

im running java 16 built for m1

lunar schooner
#

Mac runs java 16 just as well as Windows or Linux

abstract relic
#

yup

granite stirrup
#

oh

#

but opengl is old

#

af

abstract relic
#

i need to try on my pc

granite stirrup
#

on there

abstract relic
#

ok and

#

lwjgl 3 uses metal backend in minecraft

granite stirrup
#

u cant run opengl 4.5?

abstract relic
#

i dont use a mac to play video games

#

lmao

#

just for work/uni

granite stirrup
#

oh lol

#

ik but mac doesnt support opengl 4.5

#

opengl 45 idk

lunar schooner
#

Interestingly, people are using Java 16 more than I though too!

abstract relic
#

rlly dont care tbh

eternal night
#

Guys wanna move this into general maybe ? XD

lunar schooner
#

These are Metrics I collect from my plugins, btw ๐Ÿ˜„

abstract relic
#

๐Ÿ˜„

eternal night
#

Got a little far off help for spigot plugin development ๐Ÿ˜…๐Ÿ˜…

abstract relic
#

ye true

granite stirrup
lunar schooner
#

Fair point yeah :"D

lunar schooner
granite stirrup
#

thats kinda confusing ngl

lunar schooner
#

Well no one said it's yellow ๐Ÿ˜‰ It's whatever colour grafana gave it ๐Ÿคฃ

granite stirrup
#

more than half use linux for mc servers XD

#

also wtf uses windows server

lunar schooner
#

Yup ^_^
I'm also curious how fast the 1.17 adoption will be, since that's graphed too!

abstract relic
#

depends on what kind of plugins u have

granite stirrup
#

the mc version section dont look accurate

abstract relic
#

everyone running on 1.16

#

is kind of a dream

#

mf'ers expect backwards support

granite stirrup
#

not everyone uses 1.16

#

so that mc server version thing isnt accurate

lunar schooner
#

They are accurate for the people using my plugins ๐Ÿ˜„

granite stirrup
#

lol

lunar schooner
#

Since I only can collect metrics from those servers ๐Ÿ™‚

granite stirrup
#

cant you check other plugins metrics?

abstract relic
#

jfc

#

gn fellas

lunar schooner
#

I could if I programmed it to I suppose, but I havent

#

Have a good nap Kitsune :"D

granite stirrup
#

someone make a mc 1.16.5 server in haxe

lunar schooner
#

Also working on a mechanism of doing over-the-air updates for the metrics library, should be pretty easy

granite stirrup
#

well i mean it compiles to alot of languages including cpp so its kinda like making it in cpp still but

#

lol

#

who cares

#

lol

#

its another language

#

kinda

lunar schooner
#

C++ :pepechrist: never again

granite stirrup
#

its a bit like java

#

and maybe csharp

abstract relic
lunar schooner
#

well, long nap then! :"D

granite stirrup
#

lol

lunar schooner
vale cradle
lunar schooner
#

Yep :"D I dont use it yet in development due to the lack of support by the majority of people, but hopefully soon โ„ข๏ธ

opal juniper
#

I mean - I tend to just support the version that is newest so I will probs move to Java 16 for development

lunar schooner
#

yeah Im on 11 now.

opal juniper
#

Up until now I have been using 8 but itโ€™s a bit ehh

wraith rapids
#

there's not much in 8+ that i miss

eternal oxide
#

Its a good idea to move to 16 now as MC will require is very soon. See what issues you have before you are forced to.

wraith rapids
#

diamond notation for anonymous classes, vars, and List.of and co, but that's about it

#

i guess some of the matcher methods introduced in j9 are nice qol stuff too, but I can do without

lunar schooner
#

Oh MC is switching to J16?

#

I'm guessing they'll do J17 though, since thatll be an LTS release

#

Ooo did some reading into J16, JNI is finally on its way out :poggers:

young knoll
lunar schooner
#

And I just noticed, J9 introduced modules, which adds private fields you cant access with reflection. Hope mojang stays away from that ๐Ÿ˜”

upper vale
#

is it possible to get the timestamp a player was last damaged or do i need to keep track of that myself

candid silo
#

how much normally changes from version to version. I created a pretty large mini game in 1.16 and I wanna upgrade to 1.17 if possible, what in the past has changed from version to version?

paper viper
#

The material enum

#

i beleive

#

changed to registries

fickle helm
paper viper
#

also java 16 too

#

if you used reflection hacks to load jars at runtime

#

that will break

candid silo
#

How bad is the strategy of force changing the library to the new one it's using and seeing where the ide yells at me

granite stirrup
#

lol

vast sapphire
#

I want to have a user input for my command and event

#

something kind of basic

#

like i do /explosionpower 10 and it sets it to 10

#
        if (event.getAction() == Action.LEFT_CLICK_AIR) {
            if (event.getItem() != null) {
                if (event.getItem().getItemMeta().equals(ItemManager.wand.getItemMeta())) {
                    Player player = event.getPlayer();
                    player.getWorld().spawnEntity(player.getLocation(), EntityType.FIREBALL);


                }
            }
        }``` event code
#
            Player player = (Player) sender;
            if (cmd.getName().equalsIgnoreCase("givecustomitem")) {
                player.getInventory().addItem(new ItemStack[]{ItemManager.wand});
                player.sendMessage("Left click to throw fireball, right click to blow up things");
                return true;
            }``` command i use to get the item
#

Item Managing class ```v
private static void createWand() {

    ItemStack item = new ItemStack(Material.BLAZE_ROD, 1);
    ItemMeta meta = item.getItemMeta();
    meta.setDisplayName("ยง6CUSTOM STICK");
    List<String> lore = new ArrayList();
    lore.add("This stick was made in java");
    meta.setLore(lore);
    meta.addEnchant(Enchantment.DAMAGE_ALL, 32767, true);
    item.setItemMeta(meta);
    wand = item;
}
twin venture
#

hi is there a way to stop color code?

vast sapphire
#

?

twin venture
#

e.setFormat(Main.color("&e"+playerData.getKills() + " "+ " &7["+ prefix +"&7]" + player.getName() + ": " + e.getMessage()));

#

the &7 color

#

is keep going to player.getname

#

and e.getmessage

#

i dont want that ..

eternal oxide
#

&r

twin venture
#

you are my hero

#

so i use it like this :? " &7["+ prefix +"&7]&r" +

#

right?

candid silo
vast sapphire
#

no

#

temporary

candid silo
#

than you can have a public hashmap that is <player,int> or <uuid,int>

vast sapphire
#

alright, not sure what that is but i'll look into it! New to java.

candid silo
#

imagine an arraylist but instead of using an int as the index you use any object type

#

this one being player

vast sapphire
#

ok

candid silo
#
public static map<player,int> [name] = new hashmap<>();
paper viper
paper viper
#

you know, one key mapped to one value

#

like a key -> value relationship

sinful wagon
#

I just got server from peble host chunks are not loading good when spigot comes will be better?

vast sapphire
# paper viper whats your goal?

I want to get to learn java by making cheesy little plugins, they really helped me learn plugin development and java as a whole, I watched a 4 hour beginner video to get a foundation

#

I just started a week ago

#

or maybe 2 weeks ago

#

I want to build bigger plugins for my server eventually

dusk flicker
#

If you need any resources for learning Java-

#

?learnjava

undone axleBOT
vast sapphire
#

Yea i have a good resource

granite stirrup
#

u could look at the java docs also

vast sapphire
#

oh ok

#

how could i make an explosion that does no damage?

granite stirrup
#

if u want to learn spigot api u use the spigot docs

candid silo
#

maybe listen for the event and cancel the damage?

wraith rapids
#

spawn an explosion effect

vast dome
#

anyone know why when a player is riding a horse and moves out of render distance, the player freezes while the horse moves, then teleports to the horse when its in render distance

wraith rapids
#

it'll do neither entity nor block damage

#

the player tracking range is higher than the horse tracking range

#

so the server doesn't send an entity destroy packet for the player

vast dome
#

how do i fix that

wraith rapids
#

i think paper has a patch for it

vast dome
#

is there like a specific version

wraith rapids
#

of

twin venture
#

can i ask for help (free not paid ) iam making some plugins for my network and i would have another opinon of how i did things ( maybe i did the code in a bad way or smth . )

#

someone to check codes with me and see if i did things wrong ..

deft geode
#

What constitutes a command activating a command block itโ€™s facing and how can I use that with a command in my plugin

proud basin
#

Quick question anyone know why when I join the server the book opens for a second then closes automatically?

crisp citrus
#

is it possible for me to get this.plugin from a static context?

plucky comet
#

can someone help me with builing my plugin

wraith rapids
#

no

#

because this is not a thing in a static context

young knoll
#

There is no this in a static context

wraith rapids
#

by definition

crisp citrus
#

is there some sort of equivalent i can get?

#

that points to the plugin

lofty pebble
wraith rapids
#

why do you need the plugin in a static context

plucky comet
#
java: error: invalid source release: 16```I get this when i build can soone help me
crisp citrus
#

thnks in advance

wraith rapids
#

you learn java

lofty pebble
#

public static MyPlugin plugin;

onEnable(){
plugin = this;
}

#

simple as this XD

wraith rapids
#

don't make it public

#

create a getter method

#

exposing state, especially non-final state, is bad news bears

proud basin
#

I've got the book to open on PlayerJoinEvent

young knoll
#

Did you try delaying it

proud basin
#

no I haven't will try

crisp citrus
lofty pebble
#

you dont set the main class as static, you set a variable within the class as static

#

you can have a static variable in a nonstatic class

proud basin
#

Hm doesn't seem to even open if I add a delay

wraith rapids
#

classes are by default static

#

you can in fact not have a static field in a not-static class

crisp citrus
#

my ide keeps demandding that i remove the static modifier

wraith rapids
#

but top level classes are all static by default

crisp citrus
#

Modifier 'static' not allowed here

wraith rapids
#

you should learn java

#

look up a guide

#

get the basics down

#

this is 101

proud basin
#

can't he just do```java
private Main plugin;

public MyClass(Main plugin) {
    this.plugin = plugin;
}```
lofty pebble
young knoll
#

?learnjava

undone axleBOT
proud basin
#

Omg I just noticed I was delaying the user joining

#

instead of the book opening

crisp citrus
#

so this?

wraith rapids
#

an utils class generally shouldn't need your plugin instance, but yes

#

next you need to make all of the methods non-static as well

proud basin
#

instead of a you would name it whatever you class name is

wraith rapids
#

and then store and retrieve a canonical instance

proud basin
#

If I add a delay task on the PlayerJoinEvent will that delay the person joining?

wraith rapids
#

no

young knoll
#

What is the preferred way of having a static API class that can access your plugin instance

wraith rapids
#

it will delay the task

young knoll
#

I've seen some interesting methods to do so

weak mauve
#

how i can detect if player hit the back of a mob

crisp citrus
#

so this?

wraith rapids
#

i suppose the conceptually right way would be to get the call stack and get the plugin of the calling class

#

but that is inperformant and cancer

young knoll
#

I've seen someone reflectively set a private static variable in said API class

wraith rapids
#

seems fair

#

don't want to expose that as api

#

and don't want to rely on access modifiers since then you'd have to have the provider and the api class in the same package

sharp bough
#

why arent you verified NNY

wraith rapids
#

i'm verified enough

#

i don't need to conform to your crappy standards

sharp bough
#

and why dont you show when you are typing

proud basin
#

How long is 600L?

wraith rapids
#

because i don't want to

#

600L is 600L

sharp bough
wraith rapids
#

it's 600 units

young knoll
#

I assume you mean in a runnable

proud basin
#

Yes Coll

young knoll
#

So 600 ticks / 20

wraith rapids
#

if you are asking how long is 600 ticks

proud basin
#

Thank you guys

wraith rapids
#

then the answer is there are 20 ticks in a second

crisp citrus
wraith rapids
#

i'm sure you can crunch the numbers

sharp bough
young knoll
proud basin
#

rip

dusty herald
sharp bough
#

now save it

dusty herald
#

save it and reboot

sharp bough
#

at that point

crisp citrus
#

i cant even undo it because intellij is cancer

wraith rapids
#

and then close the ide and go find a java tutorial

sharp bough
#

just start over

dusty herald
#

or just

#

fix your shit

crisp citrus
dusty herald
#

๐Ÿ‘€

#

let's not

sharp bough
wraith rapids
#

i hope you can get off your ass and find a java tutorial

sharp bough
#

theres a history

#

lmao

proud basin
#

so 40L is 2 seconds correct?

sharp bough
#

yes

dusty herald
#

yes

#

you could just do

plucky comet
#

@crisp citrus ```java
private static PotFill instance;

public static PotFill getInstance(){
    return instance;
}

@Override
public void onEnable() {
    instance = this;```
dusty herald
#

SECOND * 20

proud basin
#

Ok thank you

plucky comet
#

that is how you get this

dusty herald
#

or you could just

#

dependency inject and not static abuse

sharp bough
wraith rapids
#

he doesn't know how to make a static method

sharp bough
#

i have been doing what he did

#

for a while

proud basin
#

awesome it works properly now

wraith rapids
#

it's debatable whether he knows what a constructor is

unreal quartz
#

or

#

give up and move to brazil

wraith rapids
#

i'm not going to be the one trying to explain DI to him

sharp bough
wraith rapids
#

you haven't seen me mad

sharp bough
#

normally you are toxic

#

but not that much

wraith rapids
#

idk i guess wishing surgical leg removal and shit rubs off the wrong way on me

fickle helm
#

r u kidding. He's very patient always answering very basic and usually lazy questions

sharp bough
#

he firsts flames the shit out of you

#

saying "just learn java"

#

and then says the answer

#

lmao

lofty pebble
#

perhaps thats his way of saying "listen to me" :think:

wraith rapids
#

they just never actually go learn java so I need to keep repeating the same shit over and over

lofty pebble
#

yeah i can see how that'd get annoying

fickle helm
#

it's one thing to ask cause you can't figure something out and it's another to ask because you don't feel like solving it yourself

ebon abyss
#

^

dusty herald
#

wow if it isn't the discordsrv developer themselves

sharp bough
wraith rapids
#

i remember trying to report an issue to discordsrv once

young knoll
#

An argument as old as time

#

Dependency injection or static singleton for the plugin main class

ebon abyss
wraith rapids
#

yes

#

but first I had to debate with you for like 30 minutes

ebon abyss
#

because you made little effort to actually identify your issue

wraith rapids
#

i had already identified the issue

#

you just didn't believe me

#

you wanted me to plug my server into a memory profiler or some shit

ebon abyss
#

because that's what you do to diagnose memory issues

#

poggers

wraith rapids
#

i already knew the cause

fickle helm
#

discordsrv inspired me to make a settings migrator on my plugin whenever I add new stuff to my settings.yml

wraith rapids
#

namely you comparing a bazillion permissions

ebon abyss
#

not our fault you completely refused to follow the instructions we gave

#

be difficult and expect difficulty back

wraith rapids
#

i gave you everything you needed

ebon abyss
#

nope

#

you certainly didn't

wraith rapids
#

i most certainly did

ebon abyss
#

nope

#

you certainly refused to give a memory dump

wraith rapids
#

you didn't need a memory dump

ebon abyss
#

so now we've come full circle with you refusing to follow my instructions

#

thanks for proving my point

wraith rapids
#

i gave you what you needed

ebon abyss
#

cool

sharp bough
#

cool

#

ha

#

i just foud how to do that

#

nice

proud basin
#

I forgot are you suppose to put registerEvents in onDisable() too?

ebon abyss
#

what would be the point of registering events when your plugin is disabling

proud basin
#

Ok thanks

wraith rapids
#

bukkit unregisters all events after it calls your onDisable

#

and also cancels all scheduled tasks

proud basin
#

oh ok

sharp bough
#

lets say you have a delayed task

#

hm idk that doesnt make much sense

wraith rapids
#

spawn a thread and sleep it, but no, not through the bukkit scheduler

ebon abyss
#

I'm pretty confident in saying that you do not need to be doing that

sharp bough
#

but would be cool

sharp bough
wraith rapids
#

wut

ebon abyss
#

not even sure what that's supposed to mean

weak mauve
#

can anyone help me if i can detect if a player backstab a mob

young knoll
#

Compare the players direction and the mobs direction

wraith rapids
#

or more specifically the player's relative position to the mob and the direction of the mob

#

there should not be much in the way of difference but with the fucked up protocol we have, who knows what might happen

ebon abyss
# young knoll Compare the players direction and the mobs direction
@EventHandler(ignoreCancelled = true)
public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
    float alpha = event.getEntity().getLocation().getYaw();
    float beta = event.getDamager().getLocation().getYaw();
    boolean backstab = Math.abs(alpha - beta) % 360 <= 90;
}

example of this

#

backstab would be true if the two entities were facing within 90 degrees of each other

#

but that's naive on it's own, you should be checking the location of the entities as well to make sure they don't somehow hit the other entity while they're on the side of them

mint maple
#

can anyone help me with checking how to tell if a player has stopped breaking a block

fading gull
#

listen for packet PacketPlayInBlockDig

stone light
#

I keep getting this error running my plugin
Caused by: java.lang.UnsupportedClassVersionError: me/TerrorGames/SurvivalGames/Main has been compiled by a more recent version of the Java Runtime (class file version 8243.8224), this version of the Java Runtime only recognizes class file versions up to 59.0
But I didn't compile the plugin in version 60 so idk what this means can anyone help Thanks!

young knoll
#

Version 8243.8224

#

What

#

Double check your java installation and make sure the project is compiling with the right version

granite stirrup
#

I think that's a joke lol

#

If it's not like wtf

young knoll
#

I want whatever version of java they have

#

Must be from 2200

stone light
#

I'm using JRE 1.8

#

I can show you what java I have installed on my pc if you want

granite stirrup
#

Also is java 59.0 a thing XD

stone light
#

yeah I think java 60.1 came out in may

young knoll
#

Class file version != Java version

granite stirrup
stone light
young knoll
#

Java 1.2 uses major version 46
Java 1.3 uses major version 47
Java 1.4 uses major version 48
Java 5 uses major version 49
Java 6 uses major version 50
Java 7 uses major version 51
Java 8 uses major version 52
Java 9 uses major version 53
Java 10 uses major version 54
Java 11 uses major version 55
Java 12 uses major version 56
Java 13 uses major version 57
Java 14 uses major version 58
Java 15 uses major version 59
Java 16 uses major version 60

#

Makes you wonder what the first 45 were

granite stirrup
#

Lol

#

What does java 1 use

#

And 1.1

hazy rock
#

very basic question but how do i tell if a method is sync or async

pulsar patrol
#

I would assume checking whether it's on the main thread, or a thread synced with the main thread

young knoll
#

In the bukkit API, everything is sync unless it mentions async

hazy rock
#

ah ok

#

so if you want to run a sync thing from an async thread you use bukkitrunnable

young knoll
#

Yes

#

RunTask specifically

hazy rock
#

ah

#

for some reason gamemode changing isnt working for me, ig ill rewrite it instead

young knoll
#

When are you doing it

proud basin
#

How can I add support of 1.12 to my plugin?

young knoll
#

Depends

#

What does the plugin use

proud basin
#

Itemstack & packets

young knoll
#

Via version should handle packets

#

For items you can use something like XMaterial

proud basin
#

Are you saying to implement via version?

young knoll
#

Not via version

#

Derp

#

ProtocolLib

proud basin
#

ah ok

#

and by X do you mean like the version?

young knoll
#

Itโ€™s a library

proud basin
#

oh ok

young knoll
#

Mhm

proud basin
#

Ok, will look into this

#

hm they don't have gradle for XSeries

granite stirrup
#

Holly shit it's hot here

young knoll
#

Gradle can handle maven repos

#

Iโ€™m pretty sure there are sites to convert the pom entries too

pliant copper
#

I'm forking Bungeecord and I'd like to have the name of the fork be different from Bungeecord, similar to how other forks have their name, which files do I change?

mellow gulch
#

what do i need to do to get buildtools to build the jars for java 16? i changed my java_home environment variable, downloaded the newest buildtools, and deleted the old bukkit, craftbukkit, and spigot folders that buildtools uses.
i still get "has been compiled by a more recent version of the Java Runtime (class file version 59.0)" errors on server start (as it tries to load my plugin) and im unsure what im missing.

young knoll
#

Run the server with java 16

#

As far as I know you donโ€™t need to do anything with buildtools

rigid otter
#

Hello! when I send player a packet, PacketPlayOutOpenWindow, I change inventory title, it affect on player see, but it does not affect in InventoryClickEvent. That mean in InventoryClickEvent it still in the old title(event::getView()::getTitle()) while player sees new title.

young knoll
#

Correct

#

Packets only change things client side

rigid otter
#

So, is there a way to change both sides?

young knoll
#

Not with the API, probably with NMS

rigid otter
#

I can work with current situation, but just want to know if it is possible

#

Yes, then how about that?

young knoll
#

You shouldnโ€™t be using the name to identify inventories anyway

mellow gulch
# young knoll Run the server with java 16

hmm so that would mean my environment variables are still incorrect then? im using: java -Xmx2G -Xms2G -jar X.jar nogui
to launch the server, do i need to change a different environment variable besides java_home?

#

(where X is the spigot server)

young knoll
#

Donโ€™t believe so

#

You can always use the full path in your launch file

rigid otter
young knoll
#

Not a packet

#

Youโ€™ll need to change whatever variable controls it

#

Of which I have no idea, youโ€™re on your own with NMS

rigid otter
#

Okay

#

Thank you!

#

And can I change opening inventory size? How?

young knoll
#

While itโ€™s open? Probably not

#

You can always just open a new inventory

rigid otter
#

Don't tell me that if it is possible with NMS

young knoll
#

No idea

rigid otter
#

If the API from spigot, sure it can't. But can with NMS?

young knoll
#

Inventory sizes arenโ€™t designed to change

rigid otter
#

Okay, I just see ShopGUI+ can do it

young knoll
#

Are you sure they donโ€™t open a new inventory

rigid otter
#

Sure, the cursor is still the same. But not mean they set client's cursor

young knoll
#

You can always check their source

vivid lion
#

when you changed the title

rigid otter
#

Not

#

Oh no

#

I update

vivid lion
#

player.updateInventory()

#

from what i remember

rigid otter
#

EntityPlayer::updateinventory(container)

vivid lion
#

uh let me check the nms first

#

and confirm for you

rigid otter
#

There's Player::updateInventory() too, but Idk what different. But just above, there is a container parameter exists, but Player::upda... does not have any parameter

vivid lion
#

alright found it

#
  public void updateInventory(Container container) {
    a(container, container.a());
  }
#

ye try using that

#

method

#

from the EntityPlayer.class

#

if you want

#

or you can use the interface Player

#

either one is fine

young knoll
#

As far as I know opening a new inventory doesnโ€™t reset the cursor

#

As long as you donโ€™t explicitly close the old one

rigid otter
#

But it does not work well

rigid otter
# vivid lion ye try using that

Use already, but it can be updated only in client side, what about in the server? For InventoryClickEvent::getView()::getTitle() works?

vivid lion
#

have you tried closing it and then reopening it after like 1 tick delay

#

with a changed title

rigid otter
#

The cursor change

#

It's the main reason, and it also still sometimes show the close and re-open like a glitch

rigid otter
summer scroll
#

I think ShopGUI+ replace the contents on the inventory.

#

And maybe they use InventoryHolder that holds type of the inventory.

hazy rock
#

how do you get the current plugin instance from a static context? ive tried: java private static MyPlugin instance; public static MyPlugin getInstance(){ return instance; } but it returns null for whatever reason

ebon abyss
#

@rigid otter why do you keep referring to methods with :: lol

rigid otter
#

idk ๐Ÿ˜„ I just see others usually do it, then just follow them

hazy rock
ebon abyss
#

Three buttons to press vs using two with a #

rigid otter
#

It can be easily to see too

ebon abyss
#

:: is for lambdas, # is for method references

rigid otter
#

Haha

#

Ok!

#

Maybe I confuse

#

Me#thanks(Scarsz);

ebon abyss
#

how dare you objectify me

rigid otter
#

Haha

hazy rock
ebon abyss
summer scroll
ebon abyss
#

You do not make a new instance of your plugin class ever

#

Only bukkitโ€™s plugin manager should be doing that

#

@summer scroll why do you care so much about the cursor being repositioned?

#

I have an inventory GUI library by the way, if you want to check that out

summer scroll
#

Someone asking how to do that, and I'm finding a way to possibly do that.

hazy rock
ebon abyss
ebon abyss
#

You need to assign it inside

summer scroll
#

I guess it's just personal preferences.

#

For example If you have pagination inventory, and you want to change page multiple times.

#

It's easier If the cursor doesn't reset.

rigid otter
#

Yep!

ebon abyss
hazy rock
#

oh

rigid otter
#

I usually just store reference in some variables too(example store a Map<Player, Thing> then when need that thing, just get from the map)

#

@aglerr

quaint mantle
#

When you say half MMA

#

Nms

hasty fog
#

Does paper miss some nms code?

quaint mantle
#

Are you sure itโ€™s the right version

hasty fog
#

Yup, latest one

#

Also v16_3

quaint mantle
#

No errors being thrown

hasty fog
#

Well only the missing ServerConnection class

#

And since its around startup

#

It wont start at all

quaint mantle
#

Your using paper? Correct

hasty fog
#

Yes

#

Spigot works fine

quaint mantle
#

You may be best aslong on their discord

hasty fog
#

Alright ๐Ÿ‘

quaint mantle
#

Asking*

hasty fog
#

Thanks for your help

quaint mantle
#

Np

opal juniper
#

You guys know on the f3 screen in the top left it says like โ€œspigot serverโ€ or something - can I change that (packets is fine)

#

Ideally not packets but I imagine that is how

opal juniper
#

Thanks

ivory sleet
#

Yes all config values are strings

#

Or they can be returned as ones

#

Youโ€™d get it with Plugin#getConfig()#getString("Mode")

stiff topaz
#

Intellij didnt like that a minute ago which is why I was confused

#

randomly works now

ivory sleet
verbal flint
stiff topaz
#

Amen

tardy delta
#

you mean adding to a argument to an existing command?

stiff topaz
#

Yes but just adding it to /

#

So before you type anything you see it

tardy delta
#

I've done it like this

public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String[] args) {
        if (cmd.getName().equalsIgnoreCase("lock")) {
            if (arguments.isEmpty()) {
                arguments.add("cancel");
                arguments.add("set");
                arguments.add("remove");
                arguments.add("info");
            }

            List<String> result = new ArrayList<String>();
            if (args.length == 1) {
                for (String a : arguments) {
                    if (a.toLowerCase().startsWith(args[0].toLowerCase()))
                        result.add(a);
                }
                return result;
            }
        }
stiff topaz
#

Thanks!

tardy delta
#

ow yes

#

List<String> arguments = new ArrayList<String>();

weak mauve
#

how, i dont get it

#

it actually not armorstand

#

its a gaint

livid tundra
#

I think it might have something to do with the jdk or something

weak mauve
twin venture
livid tundra
#

when a bunch of errors related to bukkit methods popped up on my code, it had something to do with my jdk/.iml file/.xml file

#

basicly, I configured it wrong

quaint mantle
twin venture
#

any ideas guys?

livid tundra
#

he probably configured the workspace wrong

#

as there are no errors related to code

quaint mantle
#

or head pos

#

ArmorStand.setHeadPose

quaint mantle
#

a lot of methods

twin venture
#

thank you guys ! , but i want it to rotate .. without lag on server ..

hybrid spoke
#

yeah

#

every method does that

quaint mantle
#

you creating tick

twin venture
#

i guess

quaint mantle
#

nah

#

that calls a lot of laggs

hybrid spoke
#

if you want to have a clean rotation => every tick

twin venture
quaint mantle
#

aw

#

it is

hybrid spoke
#

and that does not cause lags

#

just set the direction of the armorstand every tick and you are fine

quaint mantle
#

Why my event is not working?

@EventHandler
    public void onPlayerInteract(BlockPlaceEvent e) {
        if (e.getPlayer().getInventory().getItemInHand().getItemMeta().getDisplayName().equalsIgnoreCase("&aMy Profile &7(Right Click)")) {
            e.setCancelled(true);
        }
    }```
eternal night
#

There are alot of potential null pointer exceptions in your event code

weak mauve
quaint mantle
tardy delta
#

whats this?

eternal night
#

probably didn't setup your SDK

tardy delta
#

it says i have to define my project jdk

livid tundra
#

click on the add maven dependency

hybrid spoke
#

just reload your project

livid tundra
#

go download one or something

twin venture
hybrid spoke
#

mvn clean install or setup your JDK

quaint mantle
tardy delta
#

oh i downloaded an sdk

#

works

twin venture
#

did you register the event?

quaint mantle
#

Yes

twin venture
#

did you check for the colors ?

#

in the item ?

quaint mantle
#

coloredChat.chat

tawdry cedar
#

If I was you Iโ€™d strip the colours

quaint mantle
quaint mantle
twin venture
#

i use smth like this :

quaint mantle
#

try this in your check

tawdry cedar
hybrid spoke
#

yup

quaint mantle
#

Oh i forgot that

#

Thanks for help

weak mauve
#

WHY I CANNOT USE getInvisible LMAO

quaint mantle
weak mauve
#

no, i mean set invisible

#

this is the result

livid tundra
#

does a blockbreakevent trigger when an enderman takes a block?

eternal night
#

no

quaint mantle
#

I'm making a custom ore generation plugin and i have error. When I'm generating custom ore, that triggering BlockPhysicsEvent and i have error.

public static void setBlockMeta(Block b, String name, Note note, Instrument instrument) {
        b.setType(Material.NOTE_BLOCK); // <--- ERROR
        b.setMetadata("custom_block" , new FixedMetadataValue(getInstance(), name));
        BlockData data = b.getBlockData();
        NoteBlock noteb = (NoteBlock) data;
        noteb.setNote(note);
        noteb.setInstrument(instrument);
        b.setBlockData(data);
        b.getState().update();
    }
}
#

what is problem?

hybrid spoke
livid tundra
#

does a blockexplodeevent trigger when a block creates an explosion, such as tnt, or when a block breaks from an explosion?

hybrid spoke
livid tundra
quaint mantle
hybrid spoke
quaint mantle
#

i need to place block before sets type?

hybrid spoke
livid tundra
quaint mantle
# hybrid spoke yeah otherwise it doesn't exist

but that detecting a type

@EventHandler
    public void blockChange(BlockPhysicsEvent e) {
        Block b = e.getBlock();
        if (b.getType() == Material.NOTE_BLOCK) {
            if (b.hasMetadata("custom_block")) Platinum.setOre(b);
        }
    }
hybrid spoke
#

answered to the wrong one

quaint mantle
#

There is Platinum.setOre()

public static void setOre(Block b) {
        Functions.setBlockMeta(b, "platinum",
                new Note(1, Note.Tone.F, true),
                Instrument.DIDGERIDOO
        );
    }
hybrid spoke
quaint mantle
#

block can't be null

livid tundra
#

does the entitychangeblockevent fire when endermen place blocks?

quaint mantle
hybrid spoke
#

your problem is, that b --> block --> is null

#

try to delay your setOre by 1 tick

quaint mantle
#

i'll try

iron condor
#

hey Iv'e made 2 plugins (economy and something that uses economy), the problem is that the plugin that uses the economy plugin loads before the economy plugin, how do I make it load after the economy plugin like other vault depended plugin do?

#
RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            return false;
        }
``` this returns false
#

while other plugins that use vault work

hushed berry
#

Depend on Vault, and listen to the service registration events to get the correct economy service

twin venture
#

i have a problem when i respawn custom entity , only me can see it ..

#

other users can't

quaint mantle
iron condor
#

so the problem is with the Vault example code?

stiff topaz
#

I am making a command block and have an issue

List<String> list = p.getConfig().getStringList("Commands");
     if (list.contains(message))

In my config the command msg is allowed and when I do that command it works as expected. But when I use arguments in that command msg <player> <message> it says its not allowed. How can I see if the config contains just the base command (msg)

twin venture
#

HELP .-.

hushed berry
#

Ideally you should try and get the service on startup and listen to ServiceRegisterEvent to see if an econ plugin gets loaded after your plugin enables

#

Also, it's possible that someone might have two plugins with economies (eg EssentialsX/CMI and a dedicated econ plugin), and listening to the event lets you choose the highest priority service if it gets loaded later

iron condor
#

got ya, thanks

quaint mantle
#

if it is, then send packets for all players

#

create for for Bukkit.getOnlinePlayers()

quaint mantle
#

Recently, I made a menu and i was testing it to see if it has a bug or not, after that when i clicked outside of the menu/inventory i got error, Can anyone help me to fix it?

#

For example when i click here i get error

quaint mantle
#

How?

#

InventoryClickEvent special for you

hybrid spoke
#
if(e.getSlot() == slotWhereYourItemIs)
 /*do*/
quaint mantle
#

ok

minor fox
#

getClickedInventory returns null when you click outside the gui iirc

hybrid spoke
#

yeah or check if the clicked slot is -999 iirc

quaint mantle
#
@EventHandler(priority = EventPriority.LOW)
    public void onInventoryClick(InventoryClickEvent e) {
        String Title = e.getInventory().getTitle();
        if (e.getCurrentItem() == null) return;
        if (e.getCurrentItem().getItemMeta() == null) return;
        if (e.getCurrentItem().getItemMeta().getDisplayName() == null) return;
        if (Title.equals(coloredChat.chat("&8My Profile"))) {
            e.setCancelled(true);
            if (e.getCurrentItem() == null) return;
            if (Title.equals(coloredChat.chat("&8My Profile"))) {
                Menus.MyProfileActions((Player) e.getWhoClicked(), e.getSlot(), e.getCurrentItem(), e.getInventory());
            }
        }
    }```
Here is my listener
#

ItemMeta can not be null, i think

quaint mantle
granite stirrup
hybrid spoke
hybrid spoke
quaint mantle
#

ok, then... Why he checking item before checking meta?

minor fox
#

Returning an int in that method doesnt make sense

granite stirrup
minor fox
#

Well getSlot probably returns -999 if youโ€™re outside of the gui

#

Havenโ€™t worked with spigot in a while ;P

granite stirrup
#

I think u use getRawSlot() since you know

quaint mantle
#

Everyone saying different things what should i do?

hybrid spoke
#

first check if the clicked inventory is null