#help-development

1 messages · Page 1002 of 1

sinful matrix
#

How can I send a packet to remove and add the Player?

public class SkinChanger {
    public static void setSkin(Player player) {
        GameProfile profile = ((CraftPlayer)player).getHandle().getGameProfile();
        ServerPlayerConnection connection = ((CraftPlayer)player).getHandle().connection;

//        REMOVE_PLAYER
        
        profile.getProperties().removeAll("textures");
        profile.getProperties().put("textures", getSkin());
        
//        ADD_PLAYER
    }
hazy parrot
#

How are mappings not useful ?

#

U have a problem exactly with that

bright spire
#

PackageVersion is not present anymore either

bright spire
#

[06:05:33 WARN]: java.lang.NoSuchMethodException: net.minecraft.network.chat.Component$Serializer.a(java.lang.String

#

And I cant find any other useful ones

dry hazel
#

it probably still has the method, just the obfuscated name changed

eternal oxide
#

yes, look up the mapping on the old version, then find its replacement on current

hazy parrot
#

That is the thing u have to do if working with nms and reflection

#

¯_(ツ)_/¯

bright spire
#

Is there a guide or someone that did some kind of auto updating nms api?

#

I am not very experienced at it or want to bother on each update

#

It seems to exist but it asks a weird argument

#

I am not sure what jk$a means

dry hazel
#

HolderLookup$Provider

bright spire
#

What is that?

#

Never heard of it before

#

Not sure what it does or how it can be instantiated

dry hazel
#

you can click on the class name and it will show you what it is

#

as for knowing what it does, you're just gonna have to look around in decompiled source and figure it out, as with the entirety of nms

bright spire
#

I will probably wait until someone more familiarized gets a grip on it. Thanks!

hazy parrot
#

Gl

swift sable
#

Anyone know why this wont work?

            spiralBlock.setType(Material.SKELETON_WALL_SKULL);
            BlockState blockState = spiralBlock.getState();
            Skull skull = (Skull) blockState;
            skull.setRotation(blockFace);```

Something with the skull casting, but i dont know what else the item is
hazy parrot
#

Is there any error ?

tardy delta
#

dont you need to update it in some sort, doubt that only setType is required?

swift sable
#

oh sorry, i did with blockState.update();

sand spire
swift sable
#

debugging it now

#

its saying its not a skull

#

isnt there a differnt cast for wall skulls?

sand spire
#

or try SkullMeta

hazy parrot
swift sable
#

nvm got it, nfi how

#

this works:

            spiralBlock.setType(Material.SKELETON_WALL_SKULL);
            BlockState blockState = spiralBlock.getState();
            ((Skull) blockState).setRotation(blockFace);
            blockState.update();```

What was i even doing wroong.
#

fuck me im dumb, cause skull skull is an item and it was like i was defining a new itemstack thing as a local variable -- which works for ladder bc theyre the same thing, but not for skull

tardy delta
#

BlockState::update i assume

#

nvm

smoky anchor
charred blaze
young knoll
#

An entity with a customizable hitbox

charred blaze
#

hmm

smoky anchor
#

I'm not commenting on your issue, but suggesting an improvement.

charred blaze
#

would that be harder to do?

young knoll
#

The only downside is they don’t intercept projectiles

charred blaze
#

i already have slime system set up

#

i dont need that

#

only click event

#

does that have some kind click event?

smoky anchor
#

I don't think replacing your slimes would be hard.

smoky anchor
charred blaze
#

ok lets see

#

i gtg ill check this one later

young knoll
#

It has both left and right click events

#

Well, it fires them

eternal oxide
#

Are those not spawnable via Spigot?

young knoll
#

They are

eternal oxide
#

added in 1.19.4 but I see nothing in Spigot API

young knoll
#

Interaction

young knoll
#

^

eternal oxide
#

ah okies

dawn valley
#

can anyone help me with that part of the code ? i have my shop icons players are able to take it and place in the invnentory , althoe i denied it in the code

    @EventHandler
    public void onInventoryClick(InventoryClickEvent event) {
        Inventory clickedInventory = event.getClickedInventory();
        if (clickedInventory != null && clickedInventory.getType() == InventoryType.CHEST) {
            Player player = (Player) event.getWhoClicked();
            InventoryView inventoryView = event.getView();
            if (inventoryView != null && inventoryView.getTitle().equalsIgnoreCase("Shop")) {
                event.setCancelled(true); // Prevent players from taking items from the shop inventory
                ItemStack clickedItem = event.getCurrentItem();
                if (clickedItem != null && clickedItem.getType() != Material.AIR) {
                    int slot = event.getRawSlot();
                    if (shopItems.containsKey(slot)) {
                        ShopItem item = shopItems.get(slot);
                        int harmoniePrice = item.getPrice();
                        int playerHarmonies = afeliaRPG.getHarmonie(player);
                        if (playerHarmonies >= harmoniePrice) {
                            afeliaRPG.takeHarmonie(player, harmoniePrice);
                            String command = item.getCommand();
                            if (!command.isEmpty()) {
                                Bukkit.dispatchCommand(Bukkit.getConsoleSender(), command.replace("%player%", player.getName()));
                            }
                            player.sendMessage("Merci pour votre achat !");
                        } else {
                            player.sendMessage("Vous n'avez pas assez d'harmonies à dépenser.");
                        }
                    }
                }
            }
        }
    }
}```
young knoll
#

?gui

young knoll
#

Don’t use titles to identify inventories

smoky anchor
lilac dagger
#

we like the arrow pattern

pseudo hazel
#

it looks amazing on mobile though 🥲

dawn valley
royal heath
smoky anchor
#

If you mean the arrow antipattern, it does not mean it's good or should be followed.
Quite sad if anybody approved that kind of code.

royal heath
#

Hah I know it does not mean it is good. I'm just saying its hilarious

ivory sleet
#

I mean I can see the appeal in something thats a bit nested if its perhaps a gui flow or sth yk

royal heath
#

It was from legacy code

royal heath
ivory sleet
#

yes but that doesnt mean you should

royal heath
#

Wdym? You should never do that much nesting

#

My instructor back in college always told me if it nests more than 3 you're doing something wrong

shadow night
ivory sleet
#

it all depends, yes i agree in most cases you never have to go over 3 levels, but its not always objectively wrong when you get above 3 at times

royal heath
#

In rare cases.

#

It always sacrifices code readablity

#

What's stopping you from creating another method, abstracting a bit more, etc

#

I rarely go that deep anymore. I did when I was new, and that is fine, just not really a good thing to practice

ivory sleet
#

sometimes you want to compromise exit-earliness, readability for centralization or compactness

royal heath
#

Again in very rare cases. I'd get skinned alive if I did this at work

ivory sleet
#

mye

sly venture
#

I'm running a server using Velocity, and I created an NPC that moves from one server to another. How can I move it between servers? Is there an API available, not just commands?

eternal night
#

On what level do you spawn the NPC? Is it client side only?

quaint mantle
wet breach
#

what issue are you actually having with this?

wet breach
#

it all depends on your needs and what kind of setup you have

#

or what is needed to be retained and not retained

sly venture
#

in velocity, use the command "/server {serverName} to switch between servers

wet breach
#

if the npc never really has to be saved but the info needs to transfer over, definitely can use the proxy for such things

sly venture
#

i'm curious if there is and API avaliable for this functionality

inner mulch
wet breach
#

ok but the commands to switch servers are for players, why would an NPC need commands

#

when you can literally spawn npc's at will

#

since npc's are non-players as their name implies, in what use would the server itself need which controls the npc to use commands on itself?

sly venture
#

No, that was just an example I gave.
I want to set it up so that clicking an item in the inventory moves you to another server

#

"Player"

wet breach
#

ok, but you understand that the npc is actually the server?

#

its not a player

inner mulch
wet breach
#

that is one way of doing it but it also depends if the npc needs to persist

#

if it does, then you only need a DB

inner mulch
#

he doesnt want an npc

wet breach
#

destroy the npc, re-create it on the server the player moved to

wet breach
#

and state they created an npc

inner mulch
quaint mantle
wet breach
#

I did, but it doesn't align with them stating that they created an npc or even answer that. If I had to guess I am assuming they want the npc to follow a player that uses a command

#

or an item from there inventory to move to another server

royal heath
#

Yeah just simulate it moving. If it is going to always have the same data maybe use MySQL or Redis if you just want it cached. Then generate the NPC on the new server with those values

inner mulch
#

he cant, for plugin messages there needs to be a player on the server

#

he wants to move players

wet breach
#

he can't what?

#

you can move an NPC to whatever server you want without using the proxy

inner mulch
#

he doesnt want npcs

wet breach
#

then I will let you handle it since you know what they want and I have no clue why they bothered bringing up npc's to begin with

sly venture
drowsy helm
#

You’re giving an xy problem

inner mulch
#

he is using velocity

wet breach
#

it should relatively be the same, but that is true though

#

in which case they really shouldn't be here if they are asking for help with velocity 😉

royal heath
#

ah ok lol. I assumed Bungee bc he was asking here

sly venture
#

😭

wet breach
#

but you should be mindful where you are at though

#

as long as you don't mind doing some work translating between bungee and velocity it should be fine, just can't expect no one here to provide specific velocity help

royal heath
#

When you finally finished a feature

wet breach
#

don't feel bad 🙂

royal heath
#

Ahaha "shit I need to buy more ram for my browser"

wet breach
#

to be fair the majority of them I don't keep in memory

#

but I am quite lazy in bookmarking stuff

royal heath
#

Bookmarking to the extreme

wet breach
#

so I just keep stuff opened and eventually over time I will prune it back down

royal heath
#

Ha fair enough

icy beacon
wet breach
#

closing 5k tabs is awesome

icy beacon
#

yesssss

wet breach
#

it actually takes like 1-2 minutes for my browser to close that many 😛

icy beacon
#

😄

wet breach
#

well I guess I should say it depends how I close my browser

#

if I exit the browser it saves all the tabs to open up when browser starts again

icy beacon
#

Same. Very convenient

wet breach
#

if I want the tabs to be gone gone, I have to explicitly close the tabs

icy beacon
wet breach
#

my PFP predates photoshop

icy beacon
#

Care to elaborate? xD

blazing ocean
#

he's old

wet breach
#

anyways, back in highschool I helped found a tech club called the Legion Tech Club. My PFP was our logo. There were 5 other founders, 6 in total if you count myself

icy beacon
#

I thought "predates" as in "predator" 🥶

wet breach
#

the club lasted for about 6-7 years and then it died

#

I hold the historical data and probably am the only one that has the complete set

#

and therefore making me the owner of it all

#

the PFP was created with MS paint

icy beacon
#

Respectable

wet breach
#

Now you know the origin of my pfp

#

also helps to know that I ran the website and webserver for the tech club off my home computer

#

a 1999 pentium 3

#

with 512mb of ram initially, and then bumped up to 4gb

#

also the webserver was the only known webserver/website to not be under the schools control but also approved through the firewall

#

or should say whitelisted on the filter

#

I had a forums which I created a front page which had articles, and then I implemented instant chat on the forums 🙂

#

even teachers used it

#

so it was great

ancient plank
#

feels good man

royal heath
#

Nicee

icy beacon
wet breach
#

yeah, we teamed up with the journalism class and allowed them to publish articles on the site

#

so it was great experience for them

wet breach
#

but, I am not the oldest here

meager mountain
#

where can i find the pack ?

#

of gempower

#

anyone help me ?

wet breach
#

the all mighty pack?

meager mountain
#

i need it xD

ancient plank
#

brandish the pack wisely young one

meager mountain
#

where is it ?

ancient plank
#

xd

tardy delta
#

tab groups

royal heath
#

Oh mann ahaha getting 1 upped

slender elbow
#

do you not have tabs from summer 2019?

eternal oxide
#

I keep my banking tabs open so I don't have to keep logging in. Thats safe.. right?!

river oracle
#

It's probably about as safe as my homework folder being on my desktop

eternal oxide
#

"Homework"

river oracle
#

I've written some pretty bad papers I wouldn't want anyone looking in there

royal heath
#

Ha, let's hope no one steals your session cookies on your browser

wet breach
#

no one can do anything without you noticing now

eternal oxide
#

Disclaimer: for anyone reading do NOT take anything we say as advice.

icy beacon
#

too late

icy beacon
wet breach
#

he is not either

icy beacon
#

huh

royal heath
icy beacon
#

who is

wet breach
#

the oldest is like 55-56 if I recall

icy beacon
#

yeah elgar is like 90

eternal oxide
#

lol

dawn flower
#

how possible is it to give long limit coins to a player in vault?

dawn flower
#

even if i have to use reflection, cuz depositPlayer has the double limit

eternal oxide
icy beacon
#

how old are you, to the year?

wet breach
#

33

wet breach
eternal oxide
#

uh 57 this year

wet breach
#

huh, I guess there is two then

icy beacon
#

There's two, actually

eternal oxide
#

old programmers never die, we just get replaced.

wet breach
#

but no there is another person though, their name begins with a B if I remember right, but I am too lazy to look in the history

eternal oxide
#

oh no I'm 58 this year. great at math me.

wet breach
#

lmao, guess I am not alone in forgetting their own age sometimes

eternal oxide
#

I got my credit card blocked once because I couldn;t tell that chap on teh phone how old I was. I could tell him when I was born btu not how old.

icy beacon
dawn flower
#

what extends AbstractEconomy in vault

trail coral
valid burrow
#

respect him

quiet ice
quaint mantle
trail coral
#

he was 30 yesterday java just aged him

brittle geyser
#

How to fix code duplication in 2 difficult class?

chrome beacon
#

Depends

brittle geyser
#

?

quiet ice
#

the best kind of "we don't know until we see it"

icy beacon
#

?nocode

undone axleBOT
#

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

brittle geyser
#
private void storeInventoryInConfig(Inventory chestInventory, FileConfiguration config) {
        int count = 0;
        for (int i = 0; i < chestInventory.getSize(); i++) {
            ItemStack item = chestInventory.getItem(i);
            if (item == null || item.getType() == Material.AIR) {
                continue;
            }
            setItemToConfig(item, config, count++, i);
        }
    }
royal heath
#

What's the issue exactly?

quiet ice
#

if I had to guess this issue can easily be fixed by using static

#

But quite a few people here hate the stateless => static trick

slender elbow
#

I mean if it's stateless that's fine

#

what people hate is how one makes everything static because "how do I access it from another class"

quasi gulch
#

Is the Method setShrieking for the SculkShrieker for disabling the soudn and effect it makes when i step on it. Because when i set it to false it still does that

royal heath
#

However, if it is only needed in one class he should leave it there rather than make it static

quiet ice
#

I mean they complained about code duplication, so my assumption is that they have near-identical methods in a non-static context in two different classes

wind blaze
#

does anyone know how to code forge mods in 1.8.9?

chrome beacon
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

quiet ice
#

now let's see how long it takes until ?whereami is spammed

chrome beacon
#

Well that too

ancient plank
#

let's be fair, forge/fabric modding isn't really within the scope of what this server is about- why bank on the idea that maybe one person among thousands is capable of assisting you with it when there are specific servers filled with people who can more easily assist

shadow night
wind blaze
#

SORRY

rapid vigil
#

lol that was brutal

drifting ice
#

spigot grandpa ?

#

what the flip!

brittle geyser
royal heath
#

Wdym code duplication?

ivory sleet
#

If you use a sensible ide, there should be a way you can extract a method of the common code

quasi gulch
#

Is there an Event that gest triggert when a Player walk over a Sculk Shrieker and it shrieks?

charred blaze
#

is there an option to enable console errors instead of this nightmare

worthy yarrow
chrome beacon
#

^^

charred blaze
#

no errors in console

worthy yarrow
#

#

How lovely

chrome beacon
#

Then you have something removing it

charred blaze
chrome beacon
#

That message means it caught and printed an error

charred blaze
#

there are no errors in console

worthy yarrow
#

Well it’s somewhere or it got removed

icy beacon
#

are you using acf or just bukkit api or something else

charred blaze
#

whats acf

icy beacon
#

nvm then

worthy yarrow
#

Do you have any try catches without a print stack trace?

charred blaze
#

lemme see

worthy yarrow
#

Might help to print the trace 😛

charred blaze
#

why doesnt it send me the usage message then?

worthy yarrow
#

Ith it’s cuz you’ve got in a catch body? Could be incorrect

charred blaze
#

you cant have code in catch body?

icy beacon
#

you can

charred blaze
#

was that "answer limited edition" buy now for 100k?

hazy parrot
#

That error in Minecraft is printed when runtime exception is thrown

icy beacon
hazy parrot
#

So it's probably not that try catch

worthy yarrow
#

You can I just don’t know if you can send players messages through them so idk

icy beacon
#

why wouldn't you be able to

worthy yarrow
#

Mmm because print the stack trace don’t send a player message kek

charred blaze
#

ill try adding print of error

icy beacon
#

treat try-catch like an if-else

worthy yarrow
#

Try catch is a glorified if else, you just get to log errors easier

icy beacon
#

yeah basically

hazy parrot
icy beacon
#

yes

worthy yarrow
#

That too

charred blaze
#

lol

#

still no errors

icy beacon
#

send your entire command method

#

?paste

undone axleBOT
charred blaze
#

ok wait

worthy yarrow
#

Is it cuz of all the return false?

charred blaze
#

i have all of my commands returning falses

icy beacon
#

return (true, false) determines whether usage info is printed

charred blaze
#

it works fine

#

well i dont have usage info set up in plugin.yml

#

so it shouldnt print anything

icy beacon
#

idk maybe you could comment out like 33 and use some hardcoded number for size and see if that works bc if it still doesn't work then the problem is elsewhere

charred blaze
#

ill try this

icy beacon
#

yeah

charred blaze
#

still error

#

but nothing in console

icy beacon
#

try placing a log message before or after literally every method and see where the execution stops to narrow down the options

charred blaze
#

ok

broken nacelle
charred blaze
charred blaze
#

wdym

charred blaze
icy beacon
charred blaze
#

probably would take longer

remote swallow
#

they arent hard

broken nacelle
#

if the console showed the stacktrace

charred blaze
remote swallow
charred blaze
#

do they print the code line or something?

remote swallow
#

no they pause execution

brittle geyser
charred blaze
brittle geyser
#

cringe

charred blaze
#

it was this ModifyRI.setSizeOfRI(plugin, name, size);

#

but why isnt it printing errors hmm

broken nacelle
#

print all methods

#

and see if some were not printed

charred blaze
#

ok but where is errors

#

why isnt it there

broken nacelle
#

What doesn't work?

charred blaze
#

wait what

#

nvm

worthy yarrow
charred blaze
#

wait i think i found it

clear elm
charred blaze
#

Slime hitBox = (Slime) Bukkit.getEntity(UUID.fromString(hitBoxUUID));

#

it was this

#

the entity actually was Interaction entity instead of slime

#

strange why it didnt print errors

#

thanks

#

about that

#

cant interaction entity

#

s

#

hitbox be set to lower than 1 blocks?

young knoll
#

yes

charred blaze
#

when i do interaction.getBoundingBox().expand() do i need to apply this new boundingbox to interaction?

#

if so how

young knoll
#

setWidth and setHeight iirc

charred blaze
#

theres no setBoundingBOx

#

oh

#

ok

young knoll
#

setInteractionWidth/height

wraith cliff
#

Hi guys, I'm currently developing a plugin in my main language (Brazilian Portuguese). And I'm finding problems with the sendMessage(String... message) method, it has difficulty with messages that have spelling accents(like "é", "à" etc). If anyone can help me, I'll be grateful.

charred blaze
#

i think its about some utf8 compiling

worthy yarrow
#

Derive messages from a lang file so players get the message in their native language, if I knew more about this I’d let you know but if greened’s thing doesn’t work try playing around with this

charred blaze
#

like this?

#

so if i put -1 in size

#

it should shrink right?

#

it disappears

wraith cliff
young knoll
#

Well yeah the default size is 1

#

If you shrink it by one it becomes 0

charred blaze
#

oh

worthy yarrow
#

It is a double? Float perhaps?

young knoll
#

it's a float

charred blaze
#

float

#

yeah

#

so -0.5

#

should shrink it

#

right?

young knoll
#

How big do you want it

charred blaze
#

like creeper skull

#

veri specific xd

young knoll
#
interaction.setInteractionHeight(0.5);
interaction.setInteractionWidth(0.5);
charred blaze
#

a little bigger actually

#

than a creeper skull

shadow night
#

Hmm, if I want to make a localization system that would also apply to items, could I just use packets to send all players the same item with a different name and lore?

charred blaze
#

ill try 0.7

young knoll
#

You can rename the items in the outgoing packets

shadow night
worthy yarrow
shadow night
#

Why has that not been done before

young knoll
#

I'm sure it has

charred blaze
#
            interaction.setInteractionHeight((float) box.getHeight());
            interaction.setInteractionWidth((float) box.getWidthX());```
#

still makes it disappear

young knoll
#

Creative mode does ruin everything tho

charred blaze
#

on -1

young knoll
charred blaze
#

ill try that

worthy yarrow
#

size * .7 sounds like its gonna return you a goofy hitbox

charred blaze
#

size is usually whole number

worthy yarrow
#

only time I every messed with hitboxes of sorts was on a jfx project when I was making a minigame module kek

shadow night
#

I wonder how much misinformation was told in this channel and never corrected

worthy yarrow
#

Probably a lot

charred blaze
#

diff: easy

#

can interaction entity be killed and ...?

#

is it like a normal mob?

#

do i need to protect it?

young knoll
#

No

dawn flower
#

how would i turn a Number object into a BigDecimal object

young knoll
#

Is it a bigdecimal?

#

If so you can cast

#

If not you'll have to use #doubleValue to create a BigDecimal

elder dune
#

!paste

young knoll
#

?paste

undone axleBOT
worthy yarrow
#

?paste

undone axleBOT
worthy yarrow
#

Ok coll

young knoll
#

fastest ?paste in the west

worthy yarrow
remote swallow
dawn flower
#

it just returns a Number

young knoll
#

You can check with instanceof

worthy yarrow
young knoll
#

also TIL BigDecimal is a subclass of number

dawn flower
#

what if i just turn it into a string then do new BigDecimal(...)

#

if u can turn a Number into a string

young knoll
#

Yeah that would probably work tooo

remote swallow
dawn flower
#

i dont think Number overrides toString

#

nvm

worthy yarrow
young knoll
#

tbf I think cool1234567 was actually taken on whatever site that was

#

Idk this was like 15 years ago

remote swallow
worthy yarrow
#

kek

young knoll
remote swallow
#

just get good memory

worthy yarrow
#

Alex suggested multi version support, butttt this isnt meant to be a production project, so just looking for functionality ideas related to display entities

young knoll
#

Uhh

#

Idk make em pop upwards a bit and then fall down

worthy yarrow
#

Hmm

#

maybe .4 above the player?

#

Also am I able to change velocity? Like with particle effects?

young knoll
#

hmm?

worthy yarrow
#

player#spawnParticle(x, y, z, 0, 0, 0) The three 0's are like the directional velocities of the particle right? Is there any way to do this with the text displays? Or do I just have to rewrite the teleport method

young knoll
#

They ignore velocity

#

so no

worthy yarrow
#

Boo alright

silver robin
#

what's up with the new RegistryFriendlyByteBuf (mojang mapping) introduced in 1.20.6?
I'm rewriting a plugin that uses NMS,
this packet for example, the constructor in 1.20.4 is public, but private in 1.20.6
Apparently I can just mock what the private constructor does, but the large (and only) difference is RegistryFriendlyByteBuf requiring a RegistryAccess, which I know nothing about, and I'd rather not dig through minecraft code to find that out...

eternal night
#

The joys of NMS

silver robin
#

ProtocolLib hasn't been updated in two weeks since release and I kinda can't wait 😦, seems like they got stuck by all the changed aswell

eternal night
#

You can grab a RegistryAccess from MinecraftServer#registryAccess

young knoll
#

The F in NMS stands for fun

shadow night
#

Lol

slender elbow
#

codecs 😋

grim hound
#

It literally has no downsides compared to ProtocolLib

#

It's superior in every way

young knoll
#

Somewhat less adopted I guess

#

But that’s not a big downside

grim hound
#

It's even more intuitive than pl

clear elm
#

how can i do a command

young knoll
#

It means the average server is more likely to already have plib installed

clear elm
#

p.performCommand("sellgui"); this dont works

young knoll
#

It should if they have perms

#

Unless you need the /, don’t remember

meager mountain
#

anyone can help me rq ? im haveing probelms with minecraft mods

tardy delta
#

this is plugin support not mod support

meager mountain
#

im lauching the game same version fabric all mods are same version but they wont work when i launch the game like armor hud etc

tardy delta
#

wrong server, get into the fabric discord or smth

meager mountain
blazing ocean
#

read the description

tardy delta
#

for spigot, server software :)

meager mountain
#

aah

#

alr srry

wintry oxide
#

hi, how do i check the age of a block and update it to the maximum age?

#

or how do i get the maximum age for that block

inner mulch
#

or blockdata

#

not sure how its called

wintry oxide
#

ok but still

inner mulch
#

what

young knoll
#

BlockData to ageable

#

Should have a getAge, setAge, and getMaxAge

#

Don’t forget to then call setBlockData

storm crystal
#

how can I test things that should happen if player joins server for the first time?

#

as in

wintry oxide
#

cant cast into ageabgle

storm crystal
#

where can I erase this entry?

wintry oxide
#

i get an error

young knoll
#

?notworking

undone axleBOT
#

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

wintry oxide
#

Ageable a = (Ageable) block.getBlockData();

#

literally what you said

#

Caused by: java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_20_R3.block.data.CraftBlockData cannot be cast to class org.bukkit.entity.Ageable (org.bukkit.craftbukkit.v1_20_R3.block.data.CraftBlockData and org.bukkit.entity.Ageable are in unnamed module of loader java.net.URLClassLoader @bebdb06)

young knoll
#

Wrong ageable

wintry oxide
#

import org.bukkit.entity.Ageable;

#

what is it?

young knoll
#

Notice it says entity

wintry oxide
#

so its block?

#

idk

#

i did autoimport

rapid vigil
#

it's from org.bukkit.block.data

young knoll
#

^

#

Your ide should list all of them when you type it

wintry oxide
#

yes but i really didnt care about that

#

never tought would be differents

rapid vigil
wintry oxide
#

so i did import this

#

import org.bukkit.block.data.Ageable;

#

which as you said is correct right?

young knoll
#

Yes

rapid vigil
#

There's only 2 imports, if you know which one is the wrong one then how can't you tell that the second one is the right one :p

wintry oxide
#

still get error

#

by: java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_20_R3.block.data.CraftBlockData cannot be cast to class org.bukkit.block.data.Ageable (org.bukkit.craftbukkit.v1_20_R3.block.data.CraftBlockData and org.bukkit.block.data.Ageable are in unnamed module of loader java.net.URLClassLoader @bebdb06)

#

which to me seems =

young knoll
#

What is the block

wintry oxide
#

bamboo_sapling

young knoll
#

Probably uses something else

#

Let’s see

wintry oxide
#

wdym

young knoll
#

Apparently it has no data

#

Does it show any extra data in F3

wintry oxide
#

idk you say

#

the block i have i'm sure its the bamboo_sapling

#

cuz i do a sout with the blocktype and it says bamboo_sapling

#

i'm checking with ages and i think thats not the correct way to obtain what i need

#

i need that when the player places the bamboo it grows instantly into bamboo

#

the one on left is bamboo_sapling the one on right is bamboo

young knoll
#

It’s a separate material

charred blaze
#

how do i remove an entity?

young knoll
#

So just use setType

charred blaze
#

hitBox.remove();
hitBox.setPersistent(false);

#

doesnt work

young knoll
wintry oxide
#

let me try

charred blaze
young knoll
#

Not sure

#

The entity has to be loaded

wintry oxide
#

yeah thats the correct and easies way

young knoll
#

If you want to remove it whenever the chunk is unloaded do setPersistent(false) when spawning it

charred blaze
charred blaze
#

i just need it to be removed ondisable

slender elbow
#

remove the entity when it's loaded

young knoll
#

Isn’t that the same as setPersistent(false)

charred blaze
slender elbow
slender elbow
charred blaze
#

i have list of uuids

#

i wont have them after restart

#

any better way?

slender elbow
#

save them?

charred blaze
#

i dont want to store it comon

young knoll
#

Store a pdc tag on the entity

charred blaze
#

that works?

young knoll
#

If the entity loads and isn’t in your list

#

Then remove it

slender elbow
#

why do you want to remove them between restarts anyway?

charred blaze
#

if is in my list*

charred blaze
#

and animation stops working

#

when i restart

young knoll
#

Detect them loading via said pdc tag

#

And start the animation again

slender elbow
#

why not just restart the animation instead of removing them?

charred blaze
#

kills the whole idea of already storing them into my data.yml

young knoll
#

That’s all I’d do

#

Remove from animation list on unload, add back on load

slender elbow
#

^

charred blaze
#

unload of?

#

chunk?

slender elbow
#

enable/disable

#

the UUIDs are gonna stay the same, but you need to keep them somewhere between restarts

#

if you're already storing a data file, just put them in there

young knoll
#

Yeah the chunk

#

No reason to animate them if the chunk isn’t loaded

slender elbow
#

ig

#

not that you can do anything with an entity that you can't use

young knoll
#

Not with that attitude

slender elbow
#

bet

young knoll
#

This way you don’t need a file of all the UUIDs either

#

Just a pdc tag slapped on the entity

charred blaze
#

chunk unload/load idea is really a good idea

#

if i do that i dont even need to do stuff in onenable

charred blaze
young knoll
#

Listen for the load/unload

charred blaze
#

and check all entities in a chunk?

slender elbow
#

EntitiesLoad/UnloadEvent

#

check their PDC

#

add/remove from your list the ones that match

charred blaze
#

what if there are too many entities

young knoll
#

If you have enough entities in a chunk that checking them all causes issues

#

Then you have bigger issues

charred blaze
young knoll
#

Well yes, usually you want that

charred blaze
#

ok ill add another key for the UUID

#

and re-start the animation in onenable

#

thanks

young knoll
#

If you have a list of the UUIDs that won’t help either, said entities won’t exist anymore if the world is deleted

charred blaze
#

hm

#

ill check if uuid isnt found

#

just recreate the entity

slender elbow
#

just keep a pdc in the entity itself

#

if it has the tag, that's all

#

if it doesn't, it isn't yours

young knoll
#

And if the world gets reset chances are they want the entities gone anyway

charred blaze
#

So ill store additional uuid in the data file. in chunk load/unload ill check if one of the entities's uuid matches any of display's uuid and re-start animation if so.

#

but what about server copying hm

slender elbow
#

why are you overcomplicating this lol

young knoll
#

What even is this

#

Holograms?

charred blaze
#

no Display entities

young knoll
#

Yes but what for

charred blaze
#

rotating items

slender elbow
#

just keep a tag in the entity pdc

young knoll
#

It won’t be lost if they copy it

#

Yes it will be lost if they reset the world because yknow, that’s what resetting a world does

charred blaze
#

in onenable ill store list of uuids from the data

#

then

#

try to get entity

#

if it fails

#

someone resetted the world

#

so ill recreate entitie(s)

#

if not

#

will get an entity list

#

and use that on chunk load/unload

#

does that sound fine?

young knoll
#

I guess?

#

Idk why you want them to persist world resets

charred blaze
#

well

#

have you ever wanted to move your for example holograms config to another server and just move holograms to other locations so you can use it without writing them yourself from 0?

young knoll
#

Also you won’t be able to get them by uuid in onEnable

#

The entity has to be loaded to get it by uuid

charred blaze
#

damn

#

what about i do runtasklater in onenable?

#

or do it in onworldload or something

young knoll
#

Well if every chunk with your entities loads on startup then yes

#

But I doubt that’s the case

slender elbow
#

like, at that point you'd just copy the worlds?

charred blaze
#

available?

#

wdym

#

im trying to avoid copying world data

slender elbow
#

where would you recreate the entities?

charred blaze
#

wdym

#

on the same location

#

as previous server

young knoll
#

And if that location isn’t loaded?

charred blaze
#

if the data is moved

#

wdym

slender elbow
#

what if the world is entirely different? there are buildings or something at that location

charred blaze
#

spawning an entity to unloaded location doesnt load the location?

slender elbow
#

no

charred blaze
slender elbow
#

I know

#

but it doesn't make any sense

#

from an admin standpoint

young knoll
#

If you really wanted a system like that I’d have all the data saved externally

#

And spawn the entity when the chunk loads, set it to not be persistent so it’s removed on unload

charred blaze
#

already have that

charred blaze
#

wait

#

if you do .setPersistent(false) it will be removed whenever server stops?

young knoll
#

Yes

#

Because the chunks all unload

charred blaze
young knoll
#

Yes but you only wanted on disable

charred blaze
young knoll
#

Not all chunk unloads

young knoll
#

A non persistent entity doesn’t get saved

slender elbow
#

the entity is not saved at all

charred blaze
#

aa

young knoll
#

So if the chunk ever leaves memory it goes byebye

charred blaze
young knoll
#

Because it’s location is within that chunk

charred blaze
#

how do i check that?

young knoll
#

You’d save the location with it

charred blaze
#

what does chunk name look like?

young knoll
#

What?

#

Save the location

#

World uuid, x, y, and z

charred blaze
#

mhm

#

already got that

young knoll
#

Spigot even has support for that in yml

charred blaze
young knoll
#

When a chunk loads, check if the x and z are inside that chunk

charred blaze
#

how does that work

#

is there any method for that?

young knoll
#

Well, a chunk has a getX and getZ

#

In terms of blocks it spans from X << 4 to X << 4 + 15

#

Same with z

charred blaze
#

like this?

young knoll
#

That might also work

charred blaze
#

k ill try it

young knoll
#

Not too sure how chunk comparison works

charred blaze
#

seems easier than checking if its in between of locations

young knoll
#

Also not to sure if calling getChunk loads the chunk

charred blaze
#

and getZs

young knoll
#

You probably want .equals at the least

carmine mica
#

it does load the chunk

#

and you can't do a reference equality check with chunk instances

charred blaze
#

== coordinates?

young knoll
#

.equals

#

But yeah if you loop through each one you’re going to load a bunch of chunks with this, not recommended

carmine mica
#

really shouldn't be using reference equality unless you specifically know it's behavior for whatever type you are working with, like primitives and enums

young knoll
#

Primitives and enums is the easy rule for most people

charred blaze
#

ok ill use .equals

young knoll
#

You could add a isChunkLoaded check first

#

Or do some sort of spatial partitioning on your saved locations

charred blaze
#

hmm

#

so chunk's getX and getZ will be always same right?

young knoll
#

A chunk will always have the same X and Z coords

charred blaze
#

aham

#

what about i store that X and Z coords

young knoll
#

But chunkX will not always = chunkZ

charred blaze
#

and compare it to the loaded chunk's coords

young knoll
#

Yeah you can do that

charred blaze
young knoll
#

Or you could calculate it from the block x and z

charred blaze
#

thats more calculations than comparing like

#

4 numbers

young knoll
#

True but it’s fast

#

And you can do it all on load

charred blaze
#

oh i actually dont need the y value

charred blaze
#

a

young knoll
#

The conversion from block x/z to chunk x/z

charred blaze
#

what does chunk.getX exactly return?

#

chunk's lowest x coordinate?

#

or?

young knoll
#

The coordinate closest to -infinity

charred blaze
#

is that easier to compare

young knoll
#

Sure

#

You can turn any block coordinate into a chunk coordinate easily

#

And vice versa

charred blaze
#

chunkx+15 or + 16?

#
    public boolean isInChunk(int chunkX, int chunkZ, int pointX, int pointZ) {
        return  (pointX > chunkX && pointX<chunkX+15 && pointZ > chunkZ && pointZ<chunkZ+15);
    }```
#

like this?

young knoll
#

Given block coordinate X,Y,Z its chunk coordinate is
X >> 4,Z >> 4

charred blaze
#

what

#

whats 4

young knoll
#

It’s a bit shift right 4 bits

charred blaze
young knoll
#

No

charred blaze
#

why.

young knoll
#

Because you aren’t converting between chunk coordinates and block coordinates

#

A block at 20,20 is in chunk 1,1

charred blaze
#

what

#

oh

#

so 5,2 is 0,0?

young knoll
#

Yes

charred blaze
#

33,34 2,2?

young knoll
#

Yep

charred blaze
#

so basically pointx / 16

#

and same on pointz

young knoll
#

For positive values yes

#

Negative is another story

#

Hence the bitshift instead of / 16

charred blaze
#

whats a bitshift

young knoll
#

It shifts each bit so many places to the left or right

charred blaze
#

wdym shifts

young knoll
#

Moves

#

Suppose you have 8 in binary, which is 00001000

#

Shifting it one to the left gets you 00010000

#

Which is 16

charred blaze
#

a

#

so?

young knoll
#

Shifting one to the right is 00000100, or 4

charred blaze
#

so / or * by 2

slender elbow
#

what the hell is a bynary

young knoll
#

For positive values yes

slender elbow
#

does it go with mayo?

young knoll
#

For negative values it’s a bit different

winter cradle
young knoll
#

Shows the difference with negative numbers

#

The lower one is what you want, -5,-5 would be chunk -1,-1 not 0,0

charred blaze
young knoll
#

Probably gonna break for negative values

#

but I guess

#

?tas

undone axleBOT
charred blaze
#

x = loc.getBlockX() >> 4;
z = loc.getBlockZ() >> 4;

#

so this is how to get chunk's real x and z?

young knoll
#

Yes

charred blaze
#

like this?

young knoll
#

Do it on the block x and z

charred blaze
#

oh i need +15?

young knoll
#

Not the chunk ones

charred blaze
#

aaa

#

we are deviding point's coordinates

young knoll
#

You can just do pointX >> 4 == chunkX and pointZ >> 4 == chunkZ

charred blaze
#

ok have to sleep 3am

young knoll
#

Looks good

royal heath
#

Is it bad to have 2 Hikari DataSources pointing at the same database?

The reason for me doing it is on my plugin you can have multiple bots and each bot will have its own connection pool. They would likely not use the same tables

sullen marlin
#

Fine with mysql

#

Maybe less good for sqlite

royal heath
#

Sounds good. Would I really need to use it for SQLite though? Isn't SQLite fast enough to where it's not really necessary?

broken nacelle
young knoll
#

I don’t know if SQLite supports pooling

eternal oxide
#

dual access of SQLite will compain of a locked database for one

slender elbow
#

you'd have to configure sqlite jdbc for multiple connections and multithreaded access

#

it is capable, but it's disabled by default

eternal oxide
#

and use Transactions

winter scarab
#

are there any maven repo/depends with craftbukkit in it

eternal oxide
#

No but why?

kind hatch
eternal oxide
#

If you want CB depend on spigot not spigot-api

spice burrow
#

when spawning an npc in 1.20.2, how can i create an "artificial" ping? i noticed that client information is now required, but when trying to pass ClientInformation.getDefault() it gives me the following error which relates to the fake player's ping not being obtainable, because it's not a real player... Cannot invoke "net.minecraft.server.network.PlayerConnection.l()" because "var0.c" is null

wanton comet
#

The problem is not the ClientInformation from what I know, how you get the connection is. I saw something about a fake connection but I don't know how to do it either. I have been looking for some options.

spice burrow
alpine ruin
#

i need minecaft troll gui plugin

twilit coral
quaint mantle
#

Isnt it processor’s job?

twilit coral
mortal hare
#

i swear

eternal oxide
#

add another, I'm sure it will be right next time

mortal hare
#

this shit is as annoying as having your blanket

#

tangled

spice burrow
#

💀

glad prawn
quaint mantle
wooden frost
#

Hello everyone :D, i was wandering how the heck do i check if a bow is being pulled each tick.

hushed scaffold
#

Interact event maybe

#

Not sure

#

Just a guess

#

Right click interact

wooden frost
eternal oxide
#

events fire once and are done

wooden frost
#

Any other way to check right click each tick with my hands raised?

spice burrow
#

@echo basalt sry bout that i was pull up my project and i blue screened 😂

      ServerPlayer guard =
          new ServerPlayer(
              server,
              level,
              new GameProfile(UUID.randomUUID(), "Guard"),
              ClientInformation.createDefault());

this is what im passing for my info packet

for (Player on : Bukkit.getOnlinePlayers()) {
        ServerGamePacketListenerImpl p = ((CraftPlayer) on).getHandle().connection;
        p.send(
            new ClientboundPlayerInfoUpdatePacket(
                ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, guard));
        p.send(new ClientboundAddEntityPacket(entityPlayer.getHandle()));

#

i assumed that createDefault would work but i'm assuming that's where im wrong?

echo basalt
#

Right

#

So far so good

#

Full stacktrace?

#

BTW I hate to be that guy but check pins :)

#

argument 2

spice burrow
#

ahh okie, sry im still a bit new to Java and coding in general so ive just been getting the flow of things and learning good practices

#

ill boot up my server real quick for the stacktrace, im assuming thats the full error code(?)

echo basalt
#

Right

#

Let's create a connection for your NPC

echo basalt
#

Make a class that extends net.minecraft.network.Connection and override all the networking methods so they're empty

#

such as send(), setListener all of that

#

Let's say it's called "DummyConnection"

#

Once that's done, we use the dummy connection, along with the player and such to create a ServerGamePacketListenerImpl and associate it to the npc

#
ServerGamePacketListenerImpl dummyConnection = new ServerGamePacketListenerImpl(
  server,
  new DummyConnection(),
  nmsPlayer,
  CommonListenerCookie.createInitial(gameProfile)
);

nmsPlayer.connection = dummyConnection
spice burrow
#

great okay, i'm trying to follow but sorry if im a bit slow since im still learning

echo basalt
#

Let me know if any questions pop up

#

(nmsPlayer is the npc player btw, you'll do this when creating the npc)

spice burrow
#

will do, this explanation is amazing. thank you for the help, and ill make sure to take you up on the more questions part

echo basalt
#

You can define the latency and stuff on the CommonListenerCookie

spice burrow
# wanton comet sure

read what illusion sent btw, i know you had a similar issue so maybe this will help

drifting nova
#

How would I go about delaying configuration finish for the client?

#

for example I want to make sure data has synced from their last server b4 allowing them to get out of the loading menu

echo basalt
#

block packets and hold them until syncing is finished

drifting nova
echo basalt
#

Doubt

drifting nova
#

That's a bit painful, I might just make a psuedo-server that I send the client to as a sort of passthrough until everythings done

echo basalt
#

Will look flickery

drifting nova
echo basalt
#

You can also put users in a limbo state where user data won't be saved

drifting nova
#

I'm not going to send any configuration finish on this psuedo-server

echo basalt
#

Hm

drifting nova
#

and this would mean that atleast we know for certain if the player has joined the server, the last server has finished with them

#

rather than tracking the state which they're in (which I'd have to integrate into like, everything)

spice burrow
# echo basalt such as send(), setListener all of that

by this do you mean

public class DummyConnection extends Connection {
    public DummyConnection(PacketFlow enumprotoldirection) {
        super(enumprotocoldirection);
    }

    @Override
    public void send(Packet<?> packet) {
      super.send(null)
     }

    {...}
}

im assuming not, and being honest im a bit lost, sorry.

or am i heavily overthinking?

@Override
public void send(Packet<?> packet) {}

this maybe? ^

eternal oxide
#

no need to super

#

just override empty

spice burrow
#

for ones that require return statements such as

    @Override
    public boolean isEncrypted() {

    }

what should i be returning?

#

null?

eternal oxide
#

no

#

depends on the method. You won;t actually need to override all methods

spice burrow
#

assuming its whatever makes sense then, like isConnected being true and isConnecting being false?

eternal oxide
#

I never override any of those. Not sure if it's changed though

spice burrow
#

if its not too much would you mind sharing which ones you do override? i wish that there was docs or something that would let me know what i do/dont... maybe there is and im just blind

eternal oxide
#
public class NetworkHandler extends ServerGamePacketListenerImpl {
    
    public NetworkHandler(MinecraftServer minecraftserver, ServerPlayer entityplayer) {
        super(minecraftserver, new DummyConnection(PacketFlow.CLIENTBOUND), entityplayer);
    }
    
    @Override
    public void send(Packet<?> packet) {
        // Empty as we never want to try to send packets to a fake player.
    }
}```
```java
public class DummyConnection extends Connection {
    
    public DummyConnection(PacketFlow enumprotocoldirection) {
        
        super(enumprotocoldirection);
    }
}```
rough drift
#

Help with getting unloaded plugins

eternal oxide
#

thats all I override

spice burrow
#

oh interesting, ill give it a shot

#

ty

eternal oxide
#

in my NPC constructor which extends ServerPlayerjava this.connection = new NetworkHandler(minecraftServer, this);

echo basalt
#

Given you already have a concrete class for that, you can just omit the constructor param

eternal oxide
#

although this is not up to date code

echo basalt
#

And pass it directly in the subclass

eternal oxide
#

fixed

#

much cleaner this.connection = new NetworkHandler(minecraftServer, this);

spice burrow
#

right so about the dummy connection constructor, how would i get rid of it? i believe i have the listener implication setup correctly, my issue is that DummyConnection() requires me to pass the PacketFlow... i feel like i did something wrong

eternal oxide
#

Your DummyConnection is my NetworkManager

#

I shoudl rename mine so it's more obvious

spice burrow
#

so should i create another class to handle everything?

#

and basically just replicate your networkhandler?

eternal oxide
#

no

#

you only need 3 classes. One to extend ServerPlayer, one DummyConnection and one NetworkHandler ( Listener).

spice burrow
#

gotcha. yea that was my issue, i skipped over the handler part lol

eternal oxide
#

hm, now I look at it more there doesn;t seem any point to teh DummyConnection class

spice burrow
#

now i have an issue with the command returning itself so im trying to figure out if its an issue with my yml or command executor

eternal oxide
#

I have a feeling the dummy connection is a legacy thing. In the past we had to alter bits. But not needed now

merry cove
#

int locationId = ((location.getBlockX() & 0x7FFFFFF) << 8) | (location.getBlockY() & 0xFF) | ((location.getBlockZ() & 0x7FFFFFF) << 24); seeing that the Y is -64 and max 320 the Y coordinates here is off but binary is hyroglyphics to me so how would I correct the Y accounting for the updated Y coordinates?

buoyant viper
#

EntityDismountEvent made it out of the spigot and into base bukkit? WOOO

#

?jd-s

undone axleBOT
spice burrow
#

yay they're displaying perfectly now, thanks again y'all for the help does mean the world to me since i couldn't find anything online about how to go about creating a fake connection <3

eternal oxide
#

I've not messed with it since 1.17/18 ish so it was good to look at the code and see how bad it was 🙂

spice burrow
#

it's okay mine is worse 😅 gotta start somewhere though

tropic totem
#

theres easy way to convert the string to nbt

inner mulch
#

is the cool new data driven stuff already in 1.20.6? or will it come out in 1.21?

dawn flower
#

bro ive been trying to fix an issue for a whole day and just found out shitty intellij idea wasnt compiling, it just said it did

buoyant viper
#

is 1.20.6 its own api-version for plugins?

#

like would marking api-version as 1.20 be wrong if im utilizing spigot-api:1.20.6-R0.1-SNAPSHOT?

dawn flower
#

u dont add the 2nd . in api version

#

1.20.6 = 1.20

buoyant viper
#

thats what i figured, just wasnt aware if the changes 1.20.6 presents are enough to be new version worthy

#

namely the changes to potions

eternal oxide
#

api-version now supports minor versions

dawn flower
#

does it make a difference tho

eternal oxide
#

yes if you are implementing breaking changes

dawn flower
#

ah

buoyant viper
#

well, on >1.20.4, my plugin wouldve crashed bc of using old potion code

dawn flower
#

then use new code

buoyant viper
#

i am now

#

but then said code isnt backwards compat

#

so its api-version wouldnt technically be 1.20

#

which is what my original msg was asking about :P

dawn flower
#

u cant

#

i believe 1.20.5 lets u

#

try setting the author to null

#

void setAuthor(@Nullable String var1);

#

and set the generation as null

inner mulch
#

have you tried adding itemflags

dawn flower
#

there isn't one for that?

#

yeah

#

setting them as null removes it

#

u did it incorrectly

#
        ItemStack geschiedenis = new ItemStack(Material.WRITTEN_BOOK);
        BookMeta meta = (BookMeta) geschiedenis.getItemMeta();
        meta.setDisplayName(ChatColor.GOLD + "Spel Geschiedenis");
        List<String> lore = new ArrayList<>();
        lore.add(ChatColor.GRAY + "Hier kun je al je game geschiedenis");
        lore.add(ChatColor.GRAY + "van blackjack bekijken.");
        lore.add("");
        lore.add(ChatColor.AQUA + "Klik om je game geschiedenis te zien.");
        meta.setLore(lore);
        meta.setAuthor(null);
        meta.setGeneration(null);
        geschiedenis.setItemMeta(meta);
        inv.setItem(15, geschiedenis);```
#

book meta extends itemmeta

#

this is how it looks, i forgot to set generation as null and im lazy to recompile but it should work as well

rapid vigil
#

try adding every ItemFlag it might work somehow

dapper flower
#

Is there a faster way than ItemFactory#getItemMeta() to get the default item's item meta

ivory sleet
#

wdym by faster?

dapper flower
#

more efficient

undone axleBOT