#help-development

1 messages · Page 656 of 1

grim ice
#

i think le baguette will help you in your adventure

smoky oak
#

ah

split slate
#

bro calm down

smoky oak
#

i might know what it is

#

one sec

split slate
#

sorry btw if its kinda a noob question, its my first time coding in java i started yesterday lol

smoky oak
#

yea call player.updateInventory()

#

that might be the issue

reef flower
#

I already searched on google if you had read what I said! I usually don't use maven! I need a little help if this is too much for you then stop confusing me

eternal night
#

add the maven shade plugin to your maven plugin list

#

define the dependency as scope compile

#

run mvn package

#

voila

reef flower
#

thanks !

eternal night
split slate
# smoky oak yea call player.updateInventory()

It seems like the updateInventory() method doesn't exist, unless I did something wront

event.getWhoClicked().updateInventory();

I get an error, because "updateInventory() is undefined for the type HumanEntity

#

I think I need to convert it to a Player

smoky oak
#

yea human entity isnt a player

split slate
#

But idk how to that

smoky oak
#

simple

eternal night
#

ye 👍

split slate
hazy parrot
#

Sure

smoky oak
#

That works. I usually use this

if(object1 instanceof class object2){
  ...do stuff
}
```inside that if, the object 1 is cast onto object2 as an instance of class. Player extends humanEntity so Ido ```
if(event.getWhoClicked() instanceof Player player)```
timid hedge
#

Im trying to do is if the attackers held item is a stick and if the name contains "STICK" and the lore contains "------", "", "Købt af:" + p.getDisplayName(), "Må kun bruges i a", "", "-----" it should give the attacker blindness
But i dont know how to get the lore

        if (attackerPlayer.getItemInHand().getType() == Material.STICK){
            if(attackerPlayer.getItemInHand().getType() == Material.STICK.name().equalsIgnoreCase("STICK"){
                if(attackerPlayer.getItemInHand().getType() == Material.STICK.name()){

                    victimPlayer.sendTitle("Hello", "This is a test.");
                    victimPlayer.addPotionEffect(PotionEffectType.BLINDNESS.createEffect(60, 1));
                }
            }
        }
smoky oak
#

but yours legit too

split slate
#

Okay thank you, ill try to use updateInventory() then

smoky oak
#

warning

#

yours can error

#

if the class is wrong

#

thats what instanceof does

#

it checks if its actually convertible

split slate
smoky oak
#

it's one of those summary things

hazy parrot
#

It does convert to Player, object2 will be player

split slate
#

Oh okay sorry , again its my first time in java i still don't understand everything about this language

smoky oak
#

eh np

#

it basically does the check, and then the cast

#

just in one lline

ocean hollow
#
    public void onPistonExtend(BlockPistonExtendEvent event) {
        List<Block> movedBlocks = event.getBlocks();

        movedBlocks.forEach(b -> {
            Location oldLocation = b.getLocation(); // block location before
            Location newLocation = b.getRelative(event.getDirection()).getLocation(); // block location after

            db.removeBlock(oldLocation.getBlock().getLocation());
            db.addBlock(newLocation.getBlock().getLocation());
        });
    }``` why this event updates only one block()
eternal night
remote swallow
#

they use 1.8 probably

timid hedge
#

Yeah i do

eternal night
split slate
# smoky oak just in one lline

"The Java feature 'Pattern Matching in instanceof Expressions' is only available with source level 16 and above"
I think the fact that i'm coding a 1.8 plugin and i'm on java 8 is the issue ?

eternal night
#

Well, ItemMeta#getLore()

smoky oak
#

ah

#

yea

eternal night
#

yields you a list of strings

smoky oak
#

just split into two lines

#

java got good around java 9

#

im so used to it i forget some things dont work in java 8

split slate
smoky oak
#
if(object instanceof Class){ //check class
  Class object2 = (Class) object;
}
split slate
#

oh okay its as simple as that

#

ty !!

#

Its basically the same as my method but you're checking beforehead if its possible

smoky oak
#

yea. By the way

#

some people advertise for keeping your clauses as shallow as possible

#

which isnt always applicable, sinnce sometimes you need code for both possible outcomes of the condition

#

essentially, instead of inside if clauses, you negate conditions and return if your code wouldn't run anyways

#
if(! (object instanceof Class)) return;

Class object2 = (Class) object;
#

that way your code can be more readable

#

in most cases it should be fine either way though

split slate
#

That's what i usually do , my "main" language is javascript so i'm kinda used to the main syntax of java

smoky oak
#

more or less the only thing in common between those is the name lol

split slate
#

It works !!! The item is sent in the trade menu
However is still have it in my inventory, I just need to delete it
Thank you so much for the help 🙂

smoky oak
#

np

#

inventories are one of the more finnicky things

#

just hope nobody finds a dupe glitch

stray nacelle
#

stout shako for 2 refined

split slate
split slate
timid hedge
# eternal night Well, ItemMeta#getLore()

I dont have the option

        ItemStack attackerWeapon = attackerPlayer.getItemInHand();
        Material weaponType = attackerWeapon.getType();
        String weaponName = weaponType.name();
        ItemStack weaponLore = weaponType.  <- ItemMeta dosent exist
split slate
#

its like a bedwars but for french peoples lmao

eternal night
#

not the material

#

on the item meta

#

of the item stack

shadow night
remote swallow
#

no thanks

shadow night
#

Lol

#

Yeah I wouldn't bother creating that either

remote swallow
#

if you create more stuff for 1.8 it gives people reason to still use it

shadow night
#

Well yeah

#

But people will use it anyways, so why not

#

I wish there was like a seperate line of updates that added everything modern minecraft added besides the new pvp mechanics so people would just use "1.20.1-OldPvP"
Maybe also remove shields

timid hedge
eternal night
#

attackerWeapon.getItemMeta()

#

can be null, make sure to null check it

timid hedge
#

Okay thanks, but how do i check for more lines? i cant do "line1", "line2"

remote swallow
#

its a list of strings

#

just check the enries

#

entries

split slate
#

Hey, me again lol
How can I clear an inventory slot ?
I tried inventory.setItem(30, null); and inventory.setItem(30, new ItemStack(Material.AIR))

None of them works, it threw an error

quaint mantle
# remote swallow its a list of strings

hi bro i have a question for u
im getting player last online date with relative i mean like 10 hours age
this data is constantly changing one day after this will be 1 day 10 hours
if i add this to database is there continuous data updating in the database?

#

btw i used library for get relative time

remote swallow
#

save the epoch an convert it to relative as needed

quaint mantle
#

wdym for that

remote swallow
#

save System.currentTimeMillis() and convert it to relative tiome as you need it

hushed spindle
#

im trying to give a clock a simple new texture when it has a specific custom model data, but this causes vanilla clocks to lose their texture. any way i can avoid this?

timid hedge
#

I am trying to do if a player is gettig hit and if the attacskers item is a stick and the name contains "STICK" and the lore contains ".." the player should get a title and blindness but the player dosent get anything and it dosent send anything in the console, i think the problem is that in the lore if the stick is the players name but i cant see why it should work when i use contains
This is the lore on the sitck: -----", "", "Købt af: " + p.getDisplayName(), fMå kun bruges i a", "", "-----"

            if (weaponName.contains("STICK")) {
                String weaponslore = "-----" + "\n" + "\n" + "Købt af: " + "Må kun bruges i a"+ "\n" + "\n" + "-----";
                if (weaponlore.getLore().contains(weaponslore)){
                    System.out.println("19199191");
                    victimPlayer.sendTitle("Hello!", "This is a test.");
                    victimPlayer.addPotionEffect(PotionEffectType.BLINDNESS.createEffect(60, 1));
                }
            }
hushed spindle
#

you shouldnt check names or lore for custom item functionality, i recommend you put a persistent data tag with a string ID on your custom item and check for that data tag instead

#

look into PersistentDataContainer

remote swallow
#

their on 1.8

hushed spindle
#

ah

young knoll
#

Use NbtAPI

#

Or just raw NMS

hushed spindle
#

also, your lore detection doesnt work because you have line breaks in your string

#

lore isnt done with line breaks

#

its a list of strings

hushed spindle
#

i do it all the time

split slate
#

Could not pass event InventoryClickEvent to rushplugin v0.1
org.bukkit.event.EventException: null

#

Here is my complete code :

 public void onClickEvent(InventoryClickEvent event){
        System.out.println("A click event pccured. Here is the raw slot :");
        System.out.println(event.getRawSlot());
        Inventory inventory = event.getInventory();
        System.out.println(inventory);
        if (event.getRawSlot() == 0 || event.getRawSlot() == 1 || event.getRawSlot() == 2) return;
        if (!event.isShiftClick()) return;
        if (!inventory.getType().equals(InventoryType.MERCHANT)) return;
        ItemStack cursorItem = event.getCurrentItem();
        inventory.setItem(0,cursorItem);
        if(event.getWhoClicked() instanceof Player){
            Player player = (Player) event.getWhoClicked();
            player.updateInventory();
            inventory.setItem(30, new ItemStack(Material.AIR, 1));
            player.updateInventory();
          }
        
 
    }
#

I'm basically trying to make the villager trades shift clickable

hushed spindle
#

well what is null

split slate
#

i removed the null rn

hushed spindle
#

ok but that wasnt the issue

split slate
#

but it was giving me the same error

young knoll
#

?paste the full error

undone axleBOT
young knoll
#

Not just one line

hushed spindle
#

you're getting a null error, therefore something is null

#

and such an error is thrown when you try to call a method on null

split slate
remote swallow
#

the villager doesnt have 30 slots

split slate
hushed spindle
#

you should really read your errors and not just assume something you think of broke it

split slate
remote swallow
#

no they dont

hushed spindle
#

it says indexoutofboundsexception

young knoll
#

They don’t

#

Iirc they have 27

split slate
#

And when i'm clicking on the first slot of my hotbar, the System.out.println(event.getRawSlot()) return "30" on the console

young knoll
#

That’s the raw slot though

split slate
#

Yeah

young knoll
#

Your inventory is separate from the villagers

split slate
#

But i'm using raw slot on the inventory.setItem() of the top and it works fine

young knoll
#

When you have a gui open it’s treated as two inventories

#

Top and bottom

hushed spindle
#

event.getInventory() returns the villager inventory, so you're limited to slots 0 1 and 2

split slate
#

Oh

#

Oh

#

I see

hushed spindle
#

i think an InventoryView has a getItem() method right

#

so use that

split slate
#
public void onClickEvent(InventoryClickEvent event){
        System.out.println("A click event pccured. Here is the raw slot :");
        System.out.println(event.getSlot());
        Inventory inventory = event.getInventory();
        System.out.println(inventory);
        if (event.getRawSlot() == 0 || event.getRawSlot() == 1 || event.getRawSlot() == 2) return;
        if (!event.isShiftClick()) return;
        if (!inventory.getType().equals(InventoryType.MERCHANT)) return;
        ItemStack cursorItem = event.getCurrentItem();
        inventory.setItem(0,cursorItem);
        if(event.getWhoClicked() instanceof Player){
            Player player = (Player) event.getWhoClicked();
            player.updateInventory();
            int slot = event.getSlot();
            player.getInventory().setItem(slot, null);
            player.updateInventory();
          }
        
 
    }
#

Will this work?

timid hedge
#

So isnt this a list? becuase it is still not working

weaponlore.setLore(Arrays.asList("-----", "", "Købt af: ", "Må kun bruges i a", "", "-----"));
hushed spindle
#

which it doesnt

#
String weaponslore = "-----" + "\n" + "\n" + "Købt af: " + "Må kun bruges i a"+ "\n" + "\n" + "-----";

this is the problem

hushed spindle
#

you're checking if the list contains that string

#

it doesnt contain it

#

and it seems with that string you just assume line breaks work for lore which they dont

young knoll
#

If you want a line break you add another entry to the list

hushed spindle
#

yeah he seems to understand that when he actually creates that custom item of his, i dont know why he uses line breaks to check if the lore actually matches though

hushed spindle
near mason
hushed spindle
#

its fine to use sout for simple debugging

near mason
#

ok

kindred sentinel
#

Hi.. I recently decided to try creating plugins, and I needed to create a custom item tag, and for this i need NMS, in all tutorials there are normal methods like .hasTag, .getTag().. And I only have an alphabet...

hushed spindle
#

that means you don't have mojang/spigot mappings, you're using obfuscated nms

remote swallow
#

?nms

hushed spindle
#

here you can view what your methods translate to

kindred sentinel
#

oh thanks

remote swallow
#

you could also just get the mojang mappings

hushed spindle
#

thats recommended yes

split slate
vital ridge
#

Anyone has any ideas to check if the player is clicking in the inventory I created

#

And that check must happen under InventoryClickEvent

#

Something other than comparing titles

smoky oak
#

oh simple

#

you can internally create a new class that extends inventory

#

call instanceof on the clicked inventory

hazy parrot
#

Don't have to make class that extends

vital ridge
#

so ill make my custom gui class just extends inventory pretty much

smoky oak
#

i mean thats what i did

hazy parrot
#

Just save your inventory and check if (yourInv == event.getClickedInv())

smoky oak
#

couldnt tell you what for though lol

inner mulch
smoky oak
#

keep in mind you cant actually make new guis tho

#

you need to use the layouts in vanilla + the unused storage container layouts

#

(1...6 x 9 slots)

vital ridge
#

If I make it implement inventory

#

I'll need to add all the methods

#

Obviously

inner mulch
#

Why is this if statement false?

            player.sendMessage("true");
        } else {
            player.sendMessage(activeInventories.get(player));
            player.sendMessage("rewInvMinenarbeiter");
        }```

In the image, you can see the messages sent to the player.
vital ridge
inner mulch
smoky oak
inner mulch
#

and create your own inv creator if you want

#

with all the methods you could dream of

eternal night
#

they are compared using .equals

vital ridge
#

you create an abstract class

#

You add some methods

#

Like I just dont understand the sentence

inner mulch
inner mulch
#

if you create a class through an abstract class, it has all the attributes assigned to the abstract class. All the attributes you think an inventory should have

vital ridge
#

Okay gotchu.

#

I need to define the methods

#

of the abstract class.

inner mulch
#

yes, but no

#

there are also abstract methods with are not filled with anything (if you want)

vital ridge
#

Yeah and these are the ones the class that extends the abstract class needs to define

inner mulch
#

yes, lets say you have a String displayname; and a abstract method called setdisplayname

quaint mantle
#

what is this

inner mulch
tender shard
inner mulch
#

and once you call the method setdisplayname somewhere

tender shard
lilac dagger
#

why does the server need to know the parts of an ender dragon?

quaint mantle
rough drift
#

Why does Bukkit.unloadWorld(world, false); still try to save raids.dat

rough drift
lilac dagger
#

ah

tender shard
smoky oak
#

hey alex do u know by chance how long it'll take for the javadoc to be available for 1.20?

tender shard
#

wdym

smoky oak
#

if i run --generate-docs for 1.20 or 1.20.1, neither seems to exist when i enable the maven import for it

#

like

#

spigot exists and so does remapped

#

but it doesnt find the javadoc

tender shard
#

oh hm idk. --generate-docs doesn't install them, idk why. you can install them manually or let maven download them
mvn dependency:get -DgroupId=org.spigotmc -DartifactId=spigot-api -Dclassifier=javadoc -Dversion=1.20.1-R0.1-SNAPSHOT -DrepoUrl=https://hub.spigotmc.org/nexus/content/repositories/snapshots/

#

sth like that

smoky oak
#

uh

#

ive never had to deal with maven commands lol

#

okay so i do have maven on %Path% at least

tender shard
#

you can alternatively add that to your pom, let maven download it, then remove it again

smoky oak
#

can i call that anywhere or do i need it to do in the proper .m2 folder?

tender shard
#
<dependency>
  <groupId>org.spigotmc</groupId>
  <artifactId>spigot-api</artifactId>
  <classifier>javadoc</classifier>
  ...
tender shard
smoky oak
#

i already had that in my pom iirc

#

lmc

tender shard
#

i doubt that you are depending on the javadoc

smoky oak
#

nope

#

i disabled it cuz it gives a maven error

#

though your command pasted the javadoc into the spigot api folder

#

so it should work now

#

yea seems to work now

#

any idea why the --generate-docs is broken

inner mulch
#

int++;
is there something like this too?
int--;
i tried but couldnt get it to work?

smoky oak
#

both should work

inner mulch
#

int++ worked

smoky oak
#

if you use them in an expression, depending if you do ++int or int++ it first adds then reads, or first reads then adds

#

like

int a = 0;
int b = a++;
// a = 1, b = 0

int a = 0;
int b = ++a;
// a = 1, b = 1
inner mulch
#

what about int--

smoky oak
#

same thing but minus

inner mulch
#

i want it to lose 1

kindred sentinel
#

I installed remapped NMS, but after installing remapped NMS NBTTagCompound stopped working

hazy parrot
inner mulch
smoky oak
#

he

#

screenshot

inner mulch
#

is this the right symbol '-'

smoky oak
#

double minus

#

and double plus

inner mulch
#

i managed to get it work, i was using a wrong minus

smoky oak
#

what language is your keyboard on lol

inner mulch
#

i copied urs

smoky oak
#

hm

lilac dagger
#

weird how the ender dragon doesn't use pathfinders like most other mobs do

worthy moat
#

How can I change the name of a player so it also shows this new name in the tablist and death messages and so on?

smoky oak
#

try pressing alt shift and hold those buttons. It should light up possible keyboard configs on the right, it might help switching to a different layout

#

with

#

you know

inner mulch
#

setPlayerlistname

smoky oak
#

the correct minus

inner mulch
#

yeah i changed it too, thank you

kindred sentinel
eternal night
#

I mean, it should be called CompoundTag

#

under mojang mappings

kindred sentinel
#

Oh really, thanks

kindred sentinel
eternal night
lilac dagger
#

for some reason the multiple choises don't appear anymore, did i change something?

#

ah i found the problem

sullen canyon
shadow night
#

lol

#

ья луяищфкв шы щт кгыышфт

#

my keyboard is on russian*

quaint mantle
#

i don't understand

#

am i need control this ?

ivory sleet
#

r u storing connections in variables or sth?

quaint mantle
ivory sleet
#

?

#

send some code

late sonnet
#

the issue talk about the getConnection
in any moment can connect?

quaint mantle
#

wdym

late sonnet
# quaint mantle wdym

the error is a timeout when try to get the connection to DB.. then with hikary that can be by...

  • you can connect but dont close correctly the connection and a new getConnection cannot happen
  • you put bad the host or by firewall or another things where is the code cannot connect to the database
smoky oak
#

is there a way to use maven to send a 'reload' command to a locally running test server?

late sonnet
smoky oak
#

yea figures

#

thought it couldnt hurt to ask

unborn sable
#

How can I get the inventory of a Dispenser from the BlockDispenseEvent?

worldly ingot
# smoky oak if you use them in an expression, depending if you do ++int or int++ it first ad...

lol, I learned recently that for (int i = 0; i < 10; ++i) is more efficient than for (int i = 0; i < 10; i++) because while the pre-increment updates the value of the object referentially, the post-increment creates a copy first and returns it, then updates the value of the object referentially. So you can avoid an object copy by pre-incrementing vs post-incrementing unnecessarily

#

Compilers tend to make this optimization for you so it doesn't really matter, but you'll see ++i in source more often because of it

#

*in C++, btw. Doubt it makes any meaningful difference in Java

lilac dagger
#

yeah in c++ it makes more sense

slender elbow
#

it doesn't even make any difference at all in java

lilac dagger
#

but in java it's all bytecode

#

but in c++ stack is actually more used

worldly ingot
#

I'm still gonna i++ aPES_MadTyper

#

Make the compiler do my dirty work for me

lilac dagger
#

i think i figured out why main has to be the last method in the source file

#

it must be due to how the stack works

#

it loads all the binary and the main will be right on top

worldly ingot
#

main can be anywhere. It's just that files are processed from top to bottom

smoky oak
lilac dagger
#

i couldn't have main in the middle

worldly ingot
#

So if the method prototype doesn't exist and is called, then y'know, boom

lilac dagger
#

i think i heard a weird compiler

worldly ingot
smoky oak
#

well yea

slender elbow
#

you can have the method declaration above main and the definition below or in a completely separate translation unit

smoky oak
#

doesn i++ return then increment

worldly ingot
#

Yes

#

More accurately, makes a copy, increments, then returns the copy

smoky oak
#

what i mean is if it increments first wouldn't it return one loop early?

worldly ingot
#

Because it's a post-increment, right? So int i = 10; int x = i++, i = 11, but x = 10 still

lilac dagger
#

i dislike how in c++ you can't have bodies in classes due to inlining

worldly ingot
#

wut

lilac dagger
#

it makes a copy

#

everytime you call a method

#

i mean function

worldly ingot
#

I'm lost at what you're trying to get at 😅

lilac dagger
#

you had to put it in the main class with class::method

#

i don't remember that much about c++ so don't expect me to be precise in what i'm saying

#

you can have a body in the classes but it's not recommended

worldly ingot
#

No it should be fine. Shouldn't be any copying at all there

lilac dagger
#

you are supposed to do it like this

worldly ingot
#

You can definitely still write that in the header file

#

Especially just simple one-line functions, it's fine

#

If it's in a header file, #pragma once it and it won't be duplicated

lilac dagger
#

i don't know that much c++, i might go back into it for a refresh

kindred sentinel
#

I have a lot of questions about NMS, I'm just starting to figure it out and it's quite difficult for me, I don't want to clutter up this chat so can someone help me in dm?

timid hedge
#

How can i get the line of the lore?

remote swallow
#

ItemMeta#getLore().get(index)

#

starts at 0

timid hedge
#

Thanks

kindred sentinel
#

I got an error 'StringTag(java.lang.String)' has private access in 'net.minecraft.nbt.StringTag',
and I do not know how to solve it, could someone help? Please

CompoundTag itemCompound = new CompoundTag();
itemCompound.put("time", new StringTag("foo"));
smoky oak
kindred sentinel
slender elbow
#

the linker will optimise those away

hazy parrot
#

We recently learned that inline keyword in cpp is more likely "please compiler, make this inline " then "make this inline !"

#

Which is kinda funny to me lol

kindred sentinel
tender shard
#

but isn't time a timestamp or sth?

remote swallow
#

you dont have embed perms, you need to be verified for them

kindred sentinel
tender shard
#

oh ok

#

use StringTag.valueOf(String)

kindred sentinel
#

ok thanks

barren ridge
#

How would i be able to translate a title of a gui?
The vanilla way of making translatable things is like this:
[{"translate":"space.-50"},{"text":"Example Name"}]
But how would i do this in a plugin?

stuck imp
#

I offer 5€ to whoever helps me to make a post request to my website

tender shard
#

?services

undone axleBOT
stuck imp
#

?services

undone axleBOT
stuck imp
#

I make this offer here, i want it fast

#

Im done, 2 days im on it

remote swallow
stuck imp
#

I can't arrive

barren ridge
tender shard
chrome beacon
#

You'd need nms for that

remote swallow
river oracle
#

@barren ridge I have the NMS for this do you want it?

remote swallow
#

nerd

river oracle
#

okay give me a minute

kindred sentinel
river oracle
barren ridge
#

1.20

river oracle
#

alr

#

I only have 1.20.1 but the NMS didn't change between 1.19.4 and 1.20.1 so I doubt theyr will be differences other than the craftbukkit imports

river oracle
#

?paste

undone axleBOT
river oracle
#

so there is kinda two ways to go about this. One way is to just resend the title packet on open with your custom title or the other is to override the entire custom inventory system I went for the latter because I'm a nerd, but the former should be just fine

remote swallow
#

y2k why are you in offline mode

river oracle
#

forgot

river oracle
remote swallow
#

skuetto

remote swallow
#

yucky screamingsandles

#

cephx.dev better

tender shard
#

Nah

river oracle
#

screamingsandals so deprecated

tender shard
#

The new website is weird

remote swallow
#

no it isnt

river oracle
#

it looks the same

remote swallow
#

you can toggle namespaces before you say it

kindred sentinel
remote swallow
tender shard
eternal night
#

screamingsandals' viewer is literally deprecated KEKW

remote swallow
tender shard
eternal night
#

I mean for now

remote swallow
river oracle
#

but I'll warn you mine is wrapped up in a builder you'd probably want to decouple it

tender shard
#

Screaming sandals is better, just compare this

remote swallow
#

okay who the fook looks at mappings on their phone

eternal night
#

True

#

one of them having the generic params

tender shard
eternal night
#

a stronger contrast

#

urgh

remote swallow
barren ridge
kindred sentinel
#

and that's all i think

remote swallow
kindred sentinel
river oracle
ocean panther
#

Need help:
How can i set someones compass direction to a specific location? (in skript)

river oracle
#

you did most of the steps but it has the special source on here

river oracle
remote swallow
river oracle
#

u good

ocean panther
river oracle
remote swallow
river oracle
remote swallow
#

them too

river oracle
#

I could probably look at paper feature requests too if they have those

eternal night
remote swallow
#

just keep away from looking at any prs or their current code

eternal night
#

True

river oracle
#

paper does quite a bit of impl different from Craftbukkit iirc

#

don't you guys have your own like utils for some stuff or whatever I forget tbh

remote swallow
#

add this

river oracle
#

which ones don't do that

#

huh

#

oh anvil

#

yeah anvil

eternal night
#

finish the build tools PR

#

👍

river oracle
remote swallow
#

gui

eternal night
#

yea

river oracle
#

Shadow is in charge of that one

eternal night
#

smh

river oracle
#

I do testing nd shit

remote swallow
#

im a windows slave

river oracle
#

reminds me I need to test latest jar

river oracle
#

the code formatting makes me cry too

eternal night
#

completely recode it

remote swallow
river oracle
#

no

twilit creek
#

Hello, in my Logs Unicode is being replaced with "??????" instead of the original Unicode char. Is there an way to display them or maybe display them in there HEX format?

river oracle
#

yeah I would, but I don't know anything about NBT lol

eternal night
#

its so annoying because I cannot pull it into paper

#

otherwise, people cannot go back to spigot Sadge

river oracle
#

idk why no one has given it a look

eternal night
#

¯_(ツ)_/¯

#

I mean, can't flame them

remote swallow
#

mojangson

eternal night
#

paper pr queue isn't better lol

river oracle
#

what's the goal of the PR, I don't really get what it is

slender elbow
eternal night
#

Well, rn spigot tries to map a compound tag completely into a yaml tree

#

that fails terribly in edge cases because nbt has a lot more datatypes than yaml

#

e.g. bytes, doubles, ints, float etc

remote swallow
#

@lone jacinth are you still working on the de-enumification stuff

eternal night
#

so it uses some fucked logic to represent the values in a string way to re-construct the type

#

that falls short in a couple of cases

river oracle
remote swallow
#

last commit 28th june

eternal night
#

I mean

#

isn't the PR near feature complete

river oracle
eternal night
#

nah, there is some internal logic to convert it to a Map<String, Object>

#

thank god nothing on the API level

eternal night
#

but it just fails rn, shit like true is interpreted by the mojang parser as a byte 1

remote swallow
#

watch it not have been seen bc its a cb only pr

#

is mojangson mojang modified gson

river oracle
#

I read that as Mojang-son lol

eternal night
#

no that was just spigot mappings back then xD

remote swallow
#

mojang-gson

eternal night
#

its just their SNBT format

river oracle
#

ahh

remote swallow
#

idk if its correct

#

just how i read it

eternal night
#

which is partially used to like, serialise a double to like 3.5d

#

instead of 3.5

#

this instead stores the entire PDC as a single, multiline string

#

of pure SNBT

#

still editable

river oracle
eternal night
#

future proof

#

because you can write an itemstack to yml ?

river oracle
#

I forget

eternal night
#

I mean, that is how half the people serialise them to db too

#

with the bukkit output stream

river oracle
#

I just take the material type and guess the rest when I deserialize

#

random word generator for the name

#

random enchantment generator etc etc

eternal night
lone jacinth
eternal night
#

but yea, single SNBT string imo is just cleaner

#

and future proof

#

compared to the hacky solution

eternal night
#

I mean, we are waiting for 1.21

river oracle
eternal night
#

shit like this cannot be pulled mid version lol

remote swallow
#

ofc it can

eternal night
#

it breaks things

#

it will

remote swallow
#

you break things

river oracle
eternal night
lone jacinth
remote swallow
#

why cant we pull it on 1.20.2

river oracle
eternal night
#

iirc a test should include how it looks ?

#

or not ?

#

maybe I only have a test with external yml for the legacy shit

river oracle
#

you only have a test external with legacy

remote swallow
river oracle
#

that's legacy

tender shard
eternal night
#

Yea that is the edge case

#

rip

tender shard
#

thx

eternal night
#

Ehhh rip, I don't have a local spigot env setup

#

give me a bit

river oracle
eternal night
#

Well

#

not useful really

#

all the existing tests do that

river oracle
#

ahhh

#

I see

eternal night
#

whats the point of writing and reading that from a file

#

¯_(ツ)_/¯

river oracle
#

just realized config.set("test", stack); you just read the legacy

eternal night
#

but I agree, knowing how the output looks would help reviewers

river oracle
eternal night
#

Yee exactly

smoky oak
#

Is there a way to link an object to a player? I'd rather not have to deal with serialization

river oracle
# eternal night Yee exactly

{name1:123,name2:"sometext1",name3:{subname1:456,subname2:"sometext2"}} this is SNBT though it just looks like json with tweaks

eternal night
#

Yea

river oracle
#

so I'm assuming the output would just be a one liner like this

eternal night
#

Well

#

it should be multiline

#

I looked at it before

#

while coding it

#

it looks pretty sexy honestly KEKW

river oracle
#

I'll only approve If I get to see sexy ItemStack Ouput 😡

tender shard
#

Wasnt there an EnumMap in java

eternal night
#

Yes

tender shard
#

Or is there only enumset

eternal night
#

There is EnumMap

tender shard
#

Because i cant find the enum map lol

#

Weird

eternal night
tender shard
#

invaldating caches fixed it, once again

eternal night
#
testpath:
  ==: org.bukkit.inventory.ItemStack
  v: 3465
  type: DIAMOND
  meta:
    ==: ItemMeta
    meta-type: UNSPECIFIC
    display-name: '{"extra":[{"text":"Item Display Name"}],"text":""}'
    PublicBukkitValues: |-
      {
          "test-plugin:custom-byte-array": [B; 0B, 1B, 2B, 10B],
          "test-plugin:custom-double": 3.123d,
          "test-plugin:custom-inner-compound": {
              "test:validkey": 5L
          },
          "test-plugin:custom-int": 3,
          "test-plugin:custom-long": 4L,
          "test-plugin:custom-string": "Hello there world"
      }
#

@river oracle

remote swallow
#

could be sexier

eternal night
#

hmm not really

#

at least not in yml world

tender shard
#

I'm ready for the "no enums" pull request now

tender shard
#

stupid me

eternal night
#

given how fucking giant material enum is

#

I'd be surprised if EnumMap isn't larger than HashMap

remote swallow
#

isnt the enum staying

#

just deprecated

eternal night
#

no

lone jacinth
eternal night
#

you forget it

#

forget material ever existed

#

you have Items and Blocks

#

or something along the lines

river oracle
eternal night
#

I mean, the previous yml is nicer KEKW

#

that isn't the point of the PR

river oracle
eternal night
kind hatch
river oracle
#

I think its bad at its sole purpose which is configuration files

#

barely functional and easily breaks because of indentation errors

eternal night
#

I mean

#

just write json

river oracle
#

I do :P

eternal night
#

in your yml files

river oracle
#

oh no I just write my configs in json

river oracle
eternal night
#

I mean, it remains user editable

river oracle
#

yeah its just not the nice yaml whatever

eternal night
#

yea

#

it compromises a bit on that

kind hatch
#

The fact that it's plain text just makes it easier to edit. Compared to it being encoded.

eternal night
#

I mean, it was never encoded

#

prior it was a normal yml tree

river oracle
#

Editing serialized anything from bukkit is hardly the point though. If you're doing that you need some serious help there are way more user friendly ways to achieve that

eternal night
#

That do be true

river oracle
#

I should have no room to complain about yaml I'm writing my new Inventory Framework with XML

#
<item item-type="DIAMOND">
        <name>"[Example Diamond](color=#fff-#666)"</name>
    <lore>
        <line>"[Example Lore Line](color=#111-#222)"</line>
        <line>"[Example Next Lore Line](color=#333-#444)</line>
    </lore>
</item>
tender shard
#

I wonder if this works

kind hatch
#

BlockGrowEvent IIRC

tender shard
silent steeple
#

blockchangeevent

#

i thought

silent steeple
#

LOL

remote swallow
silent steeple
#

no

#

<name> is wrong

#

its tabbed twice

#

should only be once

remote swallow
#

no?

#

cool

silent steeple
#

yes?

#

lmao?

kind hatch
silent steeple
#

i know

#

but its ugly

remote swallow
#

good for you

silent steeple
#

shush npc

river oracle
silent steeple
#

Ok?

tender shard
#

XML is fancy

tender shard
smoky oak
#

so apparantly abstract static isnt a thing

#

i must be doing something wrong here

tender shard
#

works fine

smoky oak
#

i cannot declare abstract static methods

tender shard
#

oh well methods, ofc not

#

an abstract method means that an "inheriting" class has to implement it

smoky oak
#

well yes thats the idea

tender shard
#

static methods are members of the class itself

#

they cannot be overriden or anything

river oracle
#

abstracts don't belong to an instance they belong to a class so how would inheriting those methods even work?

lilac dagger
tender shard
#

T might be Material which is an enum now but not tomorrow

lilac dagger
#

ah wait

#

i keep forgeting

flint coyote
tender shard
#

yeah I'd also love it if you could declare constructors in interfaces

smoky oak
#

lright then here's my problem. I have a bunch of different sets of effects. I want to have one class (here named EffectClass) that contains the 'applyEffects' method, but i don't want to have a massive switch and all the effects in there, hard to read, hard to maintain, so the idea was to have classes extend this class, so that i can just call EffectClass' applyEffects method.

Issue here is... static methods cant apparantly be overridden, but i dont want to instantiate an object just to run a basically static method

remote swallow
#

the pr is splitting the class

#

ItemType and BlockType

#

the material enum just becomes deprecated

river oracle
#

check for deprecation I suppose would be more effective in this case

tender shard
#

so material too

lilac dagger
#

oh, so they become deprecated

#

nice

lilac dagger
#

someone here said something to do with commodo

#

which probably is a runtime editor

remote swallow
river oracle
#

@kind hatch I finalized my data structure this is what the end XML looks like. I like it personally think the one-liner itemstacks are cool hopefully the way I did it allows for it to take name in in the one liner too
https://paste.md-5.net/finofizoti.xml

remote swallow
tender shard
#

what's the purpose of splitting it though

austere cove
#

it makes more sense

smoky oak
remote swallow
austere cove
#

also more closely follows what nms does

remote swallow
#

or vise versa

austere cove
#

^ this

tender shard
#

yeah but most things are both an item and a block

remote swallow
#

not everythimg is

tender shard
#

it'd be weird to have Item.DIRT and Block.DIRT

remote swallow
#

theres loads of item only stuff

tender shard
#

and then how would I check if Item.DIRT and Block.DIRT are the same

kind hatch
austere cove
#

It is more convenient for item only and block only methods

river oracle
#

so everything counts up by ones, but once I define column 7 it'll count up from that in the future

kind hatch
#

Ohhh.

austere cove
#

because the current implementation of #isBlock() and #isItem() is garbo

gleaming grove
smoky oak
#

i havent written any except trying to make a method static abstract

#

im asking how i should design this

river oracle
#

this is going to be insane especially once I factor in json linking for configuration

austere cove
#

if you need an abstract static you're doing something wrong design wise

remote swallow
gleaming grove
smoky oak
#

alex do u by chance have a blog about this

river oracle
austere cove
river oracle
#

I'd just comment on it on stash if you do

austere cove
#

no it's on my list of todos kekw

#

tbh there's rarely a moment I feel like I need to pr something

river oracle
#

there's a spigot thread

#

comment on that

timid hedge
#

I dont know what the error is but its never comming sending "b1" on the console and i cant see what's wrong with if(itemName.equalsIgnoreCase("§bSTICK")) {
code: https://paste.md-5.net/lemipiduvo.cs

remote swallow
#

you really should learn java

#

you only need 1 item meta variable

#

you should also have 1 List<String> variable that equals itemMeta.getlore

#

then you check that

#

no 5 identical item meta variables calling.getLore on all of them

timid hedge
#

Okay thanks

sterile token
# timid hedge Okay thanks

A recomendation never compare items by name or description, always add a custom identifier by the use of PDC or even NBT depending on what api version you are using

timid hedge
#

Im using 1.8

sterile token
smoky oak
#

hm actually

#

i dont recall if it was java

#

can you return a method?

kind hatch
#

If it returns the correct data type.

timid hedge
#

I have fixed the same 5 lines now but that hasnt fixed it tho

kindred sentinel
#

Is there change item in offhand event?

smoky oak
#

cant recall what it is but there should be

#

probably some variant of InventoryEvent

kind hatch
#

PlayerSwapHandItemsEvent

#

Only applies when they use the hotkey though.

#

You'd have to check the InventoryClickEvent if they manually move items.

kindred sentinel
kind hatch
#

Refer to the message above.

kindred sentinel
#

oh yes ok

smoky anchor
#

Hey, some time ago mfnalex (I think) created a wiki for basic minigame framework
I can't seem to find it, does anybody have the link?

kind hatch
#

Don't think that was alex. @echo basalt This you? ^

timid hedge
#

Does anyone know whats the error with if(itemName.equalsIgnoreCase("§bSTICK")) {?

        ItemStack attackerWeapon = attackerPlayer.getItemInHand();
        Material weaponType = attackerWeapon.getType();
        ItemMeta itemMetaList = attackerWeapon.getItemMeta();

        String world = attackerPlayer.getWorld().getName();

        String itemName = attackerPlayer.getItemInHand().getType().name();

        if(attackerPlayer.hasPermission("vagt")){
            System.out.println(1);
            if (weaponType != Material.STICK) return;
            if (world.equalsIgnoreCase("B")) {
                if(itemName.equalsIgnoreCase("§bSTICK")) {
                    System.out.println("b1");
                    if (!itemMetaList.getLore().get(0).contains("-----")) return;
                    if (!itemMetaList.getLore().get(1).contains(" ")) return;
                    if (!itemMetaList.getLore().get(2).contains("Købt af: ")) return;
                    if (!itemMetaList.getLore().get(3).contains("Må kun bruges i b")) return;
                    if (!itemMetaList.getLore().get(4).contains(" ")) return;
                    if (!itemMetaList.getLore().get(5).contains("-----")) return;
                    victimPlayer.sendTitle("Hello!", "This is a test.");
                    victimPlayer.addPotionEffect(PotionEffectType.BLINDNESS.createEffect(60, 1));
                }
            } 
smoky anchor
remote swallow
#

if (ChatColor.stripColors(itemName).equalsIgnoreCase("stick")

timid hedge
#

Okay i will try it, but what does stripColors do?

remote swallow
#

remove all colors and formatting

austere cove
#

imagine just adding an nbt tag to identify the item so you can use any formatting, name, lore, enchants, item flags, item type you want

timid hedge
#

Still not working tho

remote swallow
#

well im pretty sure ur lore checks are the ones failing you add an entry of "" not " " as an empty line

kind hatch
# timid hedge Still not working tho

That's because your comparing the Material name with a custom color code that you shouldn't even be using.
getItemInHand().getType().name(); will return STICK or DIAMOND since it's an Enum.
You're basically saying

If "STICK" equals "&bSTICK"

Which will never be true.

river oracle
#

Maybe that'll help your search

smoky anchor
#

yep, already found it

echo basalt
river oracle
echo basalt
#

😔

#

Smerch indez - y2k bad

smoky anchor
remote swallow
#

smerch smindex

smoky oak
#
public abstract class AbilityHandler {
    final TypeEnum type;
    
    public AbilityHandler(){
        type = TypeEnum.NONE;
    }
}

So

apparantly

abstract classes

have to instantiate

final variables

#

im so done

smoky oak
#

its not a static variable

#

this class CANNOT be instantiated

#

why would you need a fcking instanciation

remote swallow
#

you call super

smoky oak
#

point

remote swallow
#

if anything you can inline that init

smoky anchor
# echo basalt I wrote it without an ide

well you did one hell of a job in making this then
It's decent apart from like 2 small errors
ty for taking your time on this, I would not have any idea where to start were I to do this by myself XD

echo basalt
#

Fixed that tiny thing

carmine mica
#

POTATO and POTATOES
these are items and blocks, but have 2 separate enum constants

echo basalt
#

wasn't that a thing in like 1.8

young knoll
#

Key word is most

echo basalt
#

This works

#

it also looks awful on my 2nd monitor wtf sharex

young knoll
#

Smh not namedspaced key?

echo basalt
#

tf you think I am? bukkit?

remote swallow
#

yeah

echo basalt
#

built-in minigame lib when

remote swallow
#

lul

echo basalt
#

But yeah I'm not concerned about using namespaced keys

remote swallow
#

very unnerd of you

echo basalt
#

Because I don't account for idiots trying to register bedwars in 2 different plugins using the same name

quaint mantle
#

Don't see the reason of abstraction here

remote swallow
smoky oak
#

i need a final identificator thats part of the class it extends from and can change depending on the class that extends it

echo basalt
#

more like "are you an idiot? who's trying to register %template% twice?"

timid hedge
echo basalt
#

?pdc

remote swallow
#

which will always be full caps no formatting

inner mulch
#

is there a way to create and ItemStack that consists of 100 items AND displays the number correctly instead of saying 64?

remote swallow
#

you should check if the item hasDisplayName() and use get DisplayName

quaint mantle
remote swallow
echo basalt
#

But you can

smoky oak
#

well even if it would be an interface the variable would still need to be initialized

inner mulch
#

hmm, can you guys tell me more about it, or send materials that i can use?

smoky oak
#

oh wait

smoky oak
#

yea

echo basalt
#

and move on

smoky oak
#

just realized that

quaint mantle
#

😎

#

Interface wins this fight

echo basalt
#

you can still do it with an abstract class

smoky oak
#

well

quaint mantle
#

Yeah, but interface looks cleaner

#

Like, less code

smoky oak
#

no reason to have one

quaint mantle
#

Plus right, in this case abstraction is not actually needed

#

If it can be replaced by an interface and it doesn't really need to be an abstract class, do it

echo basalt
#

I'm not arguing for abstract classes btw just stating the possibility

timid hedge
remote swallow
#

sys out the result of them

quaint mantle
remote swallow
#

System.out.println(attackerPlayer.getItemInHand().getItemMeta().hasDisplayName()) same for getDisplayName

sterile token
quaint mantle
#

getDisplayName returns null if none btw, maybe store the value on a field, and check if null

remote swallow
#

no point

echo basalt
#

I mean I could probably make an impl with cosmos

remote swallow
echo basalt
#

but for now worldedit and a world pool does the job

sterile token
echo basalt
#

I was doing some profiling and it isn't that bad

quaint mantle
timid hedge
remote swallow
#

so sysout the display name

sterile token
#

oh right, i thought the "lag" (i dont remember apropiate word) let call it like that was really bad

remote swallow
#

see if its actually what you think it is

echo basalt
#

Well

#

It is if you aren't doing things right

#

In my case I always have worlds on standby to minimize that stuff

quaint mantle
#

How do you leave a world in stand-by?

echo basalt
sterile token
echo basalt
#

You have a world pool where you leave worlds loaded but with spawn chunks disabled and that kind of stuff

remote swallow
quaint mantle
#

Oh

echo basalt
#

And when you need a world, you fetch it from the pool

remote swallow
#

fetch it from the poo

echo basalt
#

poo funny word

#

hehehehaw

quaint mantle
echo basalt
#

anyways

quaint mantle
#

Doesn't it?

echo basalt
#

If you start fetching too much it creates new worlds

remote swallow
#

theres just a poo pile out back you run and grab a usb from

echo basalt
#

If you use too few it unloads and eventually deletes them

quaint mantle
#

That's what SWM do?

echo basalt
#

Nah that's what I do

#

SWM just does its own chunk and world logic instead of relying on bukkit's

sterile token
quaint mantle
sterile token
echo basalt
#

Configurability looks like this

remote swallow
echo basalt
sterile token
sterile token
#

oh you sweet summer child what means that? 🤔

quaint mantle
#

Urugay no existe

smoky oak
#

polite for youve seen nothing

timid hedge
#

Im trying to do so when you get hit by a player and the attacker has permission "vagt" and his held item is a stick named "§aSTICK" and his lore is .... you will get blindness and send a title but its not working, when im doing this -> System.out.println(attackerPlayer.getItemInHand().getItemMeta().hasDisplayName()); its sending true in the console

        if (attackerPlayer.hasPermission("vagt")) {
            System.out.println(1);
            if (weaponType != Material.STICK) return;
            if (world.equalsIgnoreCase("A")) {
                System.out.println("a");
                if (attackerPlayer.getItemInHand().getItemMeta().hasDisplayName() && attackerPlayer.getItemInHand().getItemMeta()
                        .getDisplayName().equalsIgnoreCase("§aSTICK")) {
                        if (!itemMetaList.getLore().get(0).contains("-----")) return;
                        if (!itemMetaList.getLore().get(1).contains(" ")) return;
                        if (!itemMetaList.getLore().get(2).contains("Købt af: ")) return;
                        if (!itemMetaList.getLore().get(3).contains("Må kun bruges i a")) return;
                        if (!itemMetaList.getLore().get(4).contains(" ")) return;
                        if (!itemMetaList.getLore().get(5).contains("-----")) return;
                        victimPlayer.sendTitle("Hello!", "This is a test.");
                        victimPlayer.addPotionEffect(PotionEffectType.BLINDNESS.createEffect(60, 1));
                    }
remote swallow
#

System.out.println(attackerPlayer.getItemInHand().getItemMeta().getDisplayName())

quaint mantle
#

Try checking the item name stripping colors

#

ChatColor.stripColors() I think it was

remote swallow
#

yeah

#

told them that earlier but no reaction

#

you wanna see what they had earlier

#

1.8

kind hatch
#

My thoughts exactly.

timid hedge
remote swallow
#

System.out.println(attackerPlayer.getItemInHand().getItemMeta().getDisplayName())

sterile token
#

Why!! With this code you are creating 6 variables for the same thing

remote swallow
#

who knows, they fixed it quite quickly atleast

timid hedge
remote swallow
#

its not hard to debug this yourself

#

i shouldnt have to hold your hand the entire way

timid hedge
#

?? i have, its not sending anything if its before and after

remote swallow
#

it should either send null or something

#

if not you arent updating your code

sterile token
timid hedge
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

remote swallow
kind hatch
#

The apparently don't listen to what has been said. Or at the very least understand what they've been told the issue is.

sterile token
remote swallow
sterile token
timid hedge
sterile token
remote swallow
sterile token
timid hedge
#

?paste

undone axleBOT
remote swallow
kind hatch
#

You're welcome.

echo basalt
#

sharex copycat

kind hatch
#

How? How did you revert back to the same code that I already told you what the issue was?

chilly hearth
#

Hmmmm

#

Iam smart 😁

#

I spended alot of time finding a solution then realized I didn't register the event

timid hedge
sterile token
remote swallow
timid hedge
#

I have but i will just do it again

remote swallow
#

now im gonna eat my dinner, you should go and learn basic java before making plugins . good luck

timid hedge
#

Okay i think i did something wrong before but now it sends true and ´┐¢a´┐¢lSTICK in the console

remote swallow
#

its bold stick

#

&lSTICK

quaint mantle
#

I told you to check the name stripping colors

timid hedge
#

I did that earlier but that didnt work, but i will try again now

quaint mantle
#

How are you stripping colors?

timid hedge
remote swallow
#

if you add the ending bracket yeah

native bramble
#

How can i spawn particle and make him go only up?

#

Im using Particle.CAMPFIRE_SIGNAL_SMOKE

timid hedge
#

Sorry but im probally doing this wrong but if im doing this:

                if (itemName.equalsIgnoreCase("&aSTICK")) {
                    if (ChatColor.stripColor(itemName).equalsIgnoreCase("stick")) {

Its still sending ´┐¢a´┐¢lSTICK

tender shard
#

why are you checking the item name in the first place?

remote swallow
tender shard
#

and even if the itemName would equal &aSTICK, then why are you checking if it equals "stick" in the next line again?

remote swallow
tender shard
#

what even is the purpose of checking the item's name?

timid hedge
#

Becuase i have 3 world c, b and a, and if you are in a and the stick isnt named §aSTICK its not working becuase blue is for the world b and red is for c so you cant use one from world c in world a

remote swallow
#

their on 1. 8

tender shard
#

yeah but still

#

what's the point?

#

people can rename items however they want

remote swallow
timid hedge
#

Okay i will try to do that

quaint mantle
remote swallow
#

i mean yeah

#

but they just wont listen to it

tender shard
#

every plugin dev should listen to NewMcVersionReleasedEvent and handle it properly

remote swallow
#

so i just print out every 30 min " new mc server version realsed update will come out in the nxt few days "

tender shard
#

exactly

timid hedge
#

I have tried to do it with the nbt but i dont think its right, im getting some warning about it too

                ItemMeta itemMeta = attackerPlayer.getItemInHand().getItemMeta();
                itemMeta.setDisplayName("§aSTICK");
                itemMeta.getLore().contains(Arrays.asList("§8§m---------------------------", "", "§fKøbt af: §a", "§fMå kun bruges i §aA", "", "§8§m---------------------------"));
remote swallow
#

use nbt api

timid hedge
#

I cant find out how do it

scenic onyx
#

hi

#

how i can add new version of plugin on Spigotmc?

#

i dont see button

remote swallow
#

are you signed in

scenic onyx
remote swallow
#

2fa needs to be enabled now too

scenic onyx
#

ah

#

ok

remote swallow
#

== for enum constants

eternal night
#

a block is rarely equal to a material

remote swallow
#

oh that too

#

event.getBlock().getType() == Material.xyz

silent hound
#

How would I check if an item burns in lava?

#

what?

#

I mean like netherite and ancient debris