#help-development

1 messages · Page 1245 of 1

eternal night
#

actually

echo basalt
#

I mean like manually

eternal night
#

uh

#

oh yea

#

lore is irrelevant

echo basalt
#

it made a fucking list of compound tags?

#

"redacted-core:order": [{}, {}, {}]

eternal night
pseudo hazel
#

who knew List.strings would be a compound list uwu

slender elbow
#

lynx knew

#

he's trying to sabotage our servers

echo basalt
#
minecraft:diamond_sword[max_damage=1943,custom_data={PublicBukkitValues: {"redacted-core:attributes": {"redacted-core:armory_modifiers": {"redacted-core:implicit": {"redacted-core:attack_damage_t2": 0.77615064f, "redacted-core:attack_speed_t1": 0.852396f, "redacted-core:durability_t1": 0.905921f, "redacted-core:order": [{}, {}, {}], "redacted-core:slots": 4}, "redacted-core:prefix": {"redacted-core:chaining_t1": 0.32566094f, "redacted-core:horde_damage_t1": 0.7768043f, "redacted-core:order": [{}, {}], "redacted-core:slots": 5}, "redacted-core:suffix": {"redacted-core:attack_range_t1": 0.10402691f, "redacted-core:chilling_cloud_t1": 0.2019844f, "redacted-core:order": [{}, {}], "redacted-core:slots": 2}}, "redacted-core:level": 10}, "redacted-core:item-id": "4886632e-1394-4675-b1bc-8cd060a55594"}},lore=[REDACTED],attribute_modifiers={modifiers: []}]
slender elbow
#

PDCContainer is definitely a name

echo basalt
#

cba manually updating stuff it does parenting :)

#

just fits what I need to do well

eternal night
#

hmmm, I have 0 idea how it would emit empty compound tags

eager hawk
#
ItemStack startPlate = new ItemStack(Material.LIGHT_WEIGHTED_PRESSURE_PLATE);
ItemMeta startMeta = startPlate.getItemMeta();
startMeta.setUnbreakable(true);
startMeta.setDisplayName(ChatColor.AQUA + "Parkour Start");
startMeta.setLore(Arrays.asList("Place this pressure plate on the location where", "you want the parkour timer to start counting"));
startPlate.setItemMeta(startMeta);            

I have this code, but whenever I place the block (with or without OP), I can still break it. How come? setUnbreakable is on true?

eternal night
#

At least looking at the code, it doesn't seem like it would.

echo basalt
#

list should look something like ["attack_speed_t1", "attack_damage_t2", "durability_t1"]

eternal night
#

Yea

echo basalt
#

but yeah this only started happening in .4

#

we've been on .3 for like 3 months and I developed the entire server in .3

remote swallow
jagged thicket
#

when is .5 coming out

remote swallow
#

whenever mojang release it

smoky anchor
remote swallow
#

^^

jagged thicket
#

w

eternal night
#

okay so

eager hawk
echo basalt
eternal night
#

.4 had some SNBT changes

jagged thicket
#

.3 is cool

echo basalt
#

and no it's not dfu

eternal night
#

I believe

eager hawk
remote swallow
#

yes

slender elbow
#

oh yeah it did, didn't it?

#

i thought all the snbt changes were in .5

echo basalt
#

I know the latest previews are changing components

eager hawk
#

how do i make sure that it cant get destroyed?

remote swallow
#

if you want something unbreakable listen to block break event

eager hawk
#

do i need to cancel a blockbreakevent

remote swallow
#

yes

echo basalt
#

nun about snbt

eager hawk
#

oh alrighty, thanks!

eternal night
#

or was it early .5

#

that had the initial snbt changes

slender elbow
#

fwiw someone showed up yesterday with the same error in paper-dev but on .1 (?)

remote swallow
#

.5 has some (s)nbt changes afaik

slender elbow
#

it wasn't even paper paper but aswm so i told them to repro on up-to-date paper :pepelaugh:

remote swallow
#

i dont think ive seen much good from asp

echo basalt
#

.5 snapshots def have nbt changes but I don't recall .4 having as many

eternal night
#

Hmm, yea ListTag only had changes in 25w09a

remote swallow
#

dont think theyre even updated to hf or publish any dev bundles for anything

echo basalt
#

anyways is there any stupid solution I can use for now

#

I can throw a big //FIXME: Mojank fault and just save it as a string

#

split by , or something

eternal night
#

I guess

echo basalt
#

🙏 gotta push an alpha by next week already got enough to deal with

eternal night
#

I'll put it on my ever growing issue test NODDERS

echo basalt
#

time to get back to IA -> Nexo conversion 😔

eternal night
#

Wait

#

I may

#

have been a full idiot

#

omg

slender elbow
#

omg?

eternal night
#

@echo basalt are you running latest via version or something

echo basalt
#

running 5.2.0

eternal night
#

mhm okay

#

and this is in creative yea?

echo basalt
#

git-ViaVersion-5.2.0:488a6b691

eternal night
#

your original stacktrace was on the creative click

echo basalt
#

I am in creative yeah

eternal night
#

mhm

echo basalt
#

but this happens in survival too iirc?

#

I update the item when i throw it down and some other triggers

#

error happens when I pick it back up

eternal night
#

okay, that should not be creative click then

#

mb

echo basalt
#

yeah it also happens on survival

#

good enough for now LMK if you need more testing

eternal night
#

I'll try to find some dumb replication yea 👍 I sadly don't have much time (as emily said, thesis is crushing me) but, I'll have it on my pile

#

if someone else runs into it with replication steps, I'll poke ya with the issue

echo basalt
#

I can write something up for replication

eternal night
#

that'd be great if you can find like, a minimal example

echo basalt
#

not sure if it's list related, component-in-component or what

#

again I gotta push an alpha in like a week (gonna travel after that) so I doubt they'll let me poke at the issue for longer than I need to

eternal night
#

All good yea, just go with the hack for now then 👍

tall panther
#

Hey Devs, I struggle with some commands. First I spawn 100 drowned with trident in hand and than I kill them, but they won’t drop there trident.
I have a command to make this damage as player attack, but it won’t work anyway:

/execute as @e[type=minecraft:drowned] at @s if score @p drownedKill matches 1 run damage @s 1000 minecraft:player_attack

what am I doing wrong? They got all killed but none drops a trident

eternal night
echo basalt
#

1.21.4

eternal night
#

okay, thanks 👍 sad because my replication doesn't work out

echo basalt
#

I can get you a plugin list or whatever

#

what if you have multiple armory containers or whatever

#

armory-1 armory-2 armory-3

eternal night
#

shouldn't really matter. the compound tag works, it having multiple values is w/e

#

a plugin list would be good tho

#

so I can cross reference that with the next reports, if this is actually a paper issue

smoky anchor
echo basalt
#

is there any quick command to make a versioned plugin list?

eternal night
#

don't really need versions tbh

echo basalt
#

Cool

eternal night
#

most of the time, the cross section is so minimal, it is only 2 or 3 possible culprits

echo basalt
#

Paper plugins:

  • HuskSync

Bukkit plugins:

  • Essentials
  • FAWE
  • my custom core
  • LuckPerms
  • MEG
  • MythicHUD
  • MythicMobs
  • Nexo
  • PAPI
  • ProtocolLib
  • Vault
  • VentureChat
  • ViaVersion
eternal night
#

danke pepe_hand_heart_2

echo basalt
#

I tried having my custom core as a paper plugin in the past but it had a lot of plugin loading issues for absolutely no reason

#

not sure if that's worth looking into

#

it'd just not respect depends

eternal oxide
#

The only time I've seen that is when the person typo'd depend/depends

echo basalt
#

yeah in my case it was paper's plugin loader thing

#

it'd detect the depends but still load my plugin before anything else

eternal night
#

pretty sure we split clossloader joining and loading in paper plugins

echo basalt
#

I did

#

I did join-classpath and explicitly set the load order

#

it didn't give a fuck

#

so neither did I

eternal night
#

fair enough xD

echo basalt
slender elbow
#

core is meant to load after Dungeon?

echo basalt
#

uh

#

pretty sure it was a yes at the time

#

nowadays not so much

echo granite
eager hawk
#

Thanks!

#

I'm making a parkour plugin right now, where the player needs to place down a start and end pressure plate, they can't be broken either.

But how do I make sure these pressure plates are distinguished from other pressure plates in the game? I've read the PDC page on spigot but it seems a little complex to me

ocean gorge
#

guys, apart from the miserable code written, the plugin compiles but the IDE gives me these annoying syntax errors, how do I solve it?

blazing ocean
#

please just take a screenshot

ocean gorge
#

I'll start by saying that I had to deal with the .m2/repository folder before, having to delete it due to "Malformed \uxxxx encoded" issues.

#

Ok

#

I try

blazing ocean
#

and what does the actual syntax error show

#

does it compile

ocean gorge
#

well, I solved it by restarting the IDE, until now it gave me this 🤷‍♂️

echo granite
#

Just beware that when the server is shut down or reloaded, the set will be empty.

smoky anchor
#

?blockpdc alternatively

undone axleBOT
echo granite
# smoky anchor ?blockpdc alternatively

IIRC this resource just wraps the PDC without adding anything useful, so I don't understand why anyone would recommend it.
It seems that the guy is inexperienced so the best advice is to teach him the basics - which is simply using a collection(Set preferrably) to store the locations.

smoky anchor
#

Yeah no, it does more stuff. It handles different block break events, I think it even does pistons.

echo granite
#

even if it adds support for more complex stuff, the guy needs to learn the basics first.

#

event handling + collections

#

After that, the sky is the limit in terms of libraries

thorn isle
#

iirc it also listens to e.g. block explosions and piston pushing to update the collection correctly (and persists them, wouldn't be a __P__dc otherwise), but yes it is in principle just that

#

it gets recommended a lot because to do it correctly you need to listen to like a dozen different events and there are many edge cases you will mess up without trial and error

#

so rather than reinventing the wheel every time it's best to use something tried and tested

#

that said for the case of just pressure plates, which aren't pushable by pistons, and based on the description won't tick, only be interactable, writing it yourself shouldn't be too difficult

#

the biggest hill to climb is going to be figuring out when it breaks to drop the correct custom item, which is going to require listening to block physics and explosions and a few others

sly topaz
#

a lot of things in the spigot ecosystem are better handled by libraries so may as well start learning how to adapt to them anyway. Economy/basic permission hook? Vault, Scoreboards? FastBoard, block PDC? That one library, commands? CommandAPI or the other various command frameworks

thorn isle
#

it's a bit of that and a bit of this imo, trying your hand at reinventing complex things is definitely good practice, just, yeah, you'll want to get the basics down first, and the end result will usually be inferior to what's out there as a library

echo granite
#

if he had no idea he could've listened to block break event, he has stuff to learn.

eager hawk
#

In BlockPlaceEvent, does event.getBlock().getLocation() return the location where the block has been placed?

echo granite
#

I'd assume that it does

eager hawk
#

I just read "Gets the location of the block"

#

So I suppose that means after it was placed

echo granite
#

yeah, what else would it return? 😛

eager hawk
#

true true

#

sorry for the dumb questions, just experiencing a bit

echo granite
#

let me tell you something

eager hawk
#

Ive been working w java for a long time, but spigot is new to me

#

So just trying some stuff out

echo granite
#

It took me 5 years to discover the existence of javadocs, and after I have done that, I felt extremely more safe working with libraries

#

because it contains everything, including edge cases(when written correctly)

eager hawk
#

Hmm yea ur right

#

Javadocs can save a lot of time

echo granite
#

that's what they are for 🙂

#

FAQ right inside your ide

eager hawk
#

True

#

So if I remember correctly, u told me to store the blockplace location in a set right?

echo granite
eager hawk
#

For the parkour pressure plates

#

Alrighty

echo granite
#

when a block is broken, check if the location is in the set

eager hawk
#

What's the difference between a Set and a List? I don't think I've ever worked with Sets before.

blazing ocean
echo granite
#

we're reaching the pure Java territory 🙂 Both are implementations of the Collection interface, and you choose the appropriate one depending on your use case.
In your case, I chose set because their #contains is extremely faster than a list's.

#

Set is an interface, the most common implementation is HashSet

eager hawk
#

I understand, thanks for the information!

echo granite
#

@eager hawk I'm encouraging you to go beyond my explanation and learn about the different common collections, and how they're implemented.

ivory sleet
echo granite
#

Focus on ArrayList, HashSet, and LinkedHashSet

#

they have multiple differences, so it can be tricky going for the correct one

ivory sleet
#

LinkedList also

blazing ocean
#

LinkedHashSet my beloved

eager hawk
#

Will do, thanks!

thorn isle
#

LinkedReferenceOpenHashSet

eager hawk
#

Never heard of Linked actually lol

#

Got some searching to do

#

They've never spoken of it in classes

ivory sleet
echo granite
ivory sleet
#

No that’s wrong

blazing ocean
#

if you need collections that do not allow duplicates

ivory sleet
#

Set does not specify time complexity

#

HashSet does

echo granite
blazing ocean
#

con how is that thing going btw

ivory sleet
thorn isle
#

sadly i don't think fastutils has synchronized variants of each concrete class, you just have to wrap the impl in a SynchronizedReferenceSet, which is supremely sadge

blazing ocean
echo granite
thorn isle
#

nuh uh

ivory sleet
thorn isle
#

ArraySet from fastutils doesn't

ivory sleet
#

Your premise is wrong (respectfully), but please enlighten me Mazgani

blazing ocean
#

my own set implementation does not, actually

echo granite
#

🤦‍♂️

blazing ocean
#

(I do not have my own set implementation)

echo granite
#

sad to see trollers in a place meant for helping people

ivory sleet
ivory sleet
blazing ocean
#

con are you a wrong

thorn isle
#

you're right in that people pick it for the fast contains but you're missing a step and putting the cart before the horse

#

in this case specifically, it would be simply incorrect to use a list, because that wouldn't make sense -- you can't place multiple pressure plates in the same location, i.e. you can't have duplicates

#

contains being faster then is just a natural consequence of the problem's nature

dawn flower
#

i could sound stupid but what are all the ways a player can equip armor

#

i know right click, inventory click, block dispense exist but is there anything else

thorn isle
#

a plugin can always decide to put armor in the armor slot

#

the only reliable way is to check the slots every tick, which is afaik what paper does for its ArmorChangedEvent or whatever it was called

#

in terms of vanilla gameplay yeah that's probably all of them

eager hawk
#

So I just wrote the following code to get a message whenever I walk over a pressure plate at a specific location.

@EventHandler
public void onPressurePlateInteract(PlayerInteractEvent e) {
    if (e.getAction() == Action.PHYSICAL) {
        Block block = e.getClickedBlock();
            
        if (parkourPlates.contains(block.getLocation())) {
            Player p = e.getPlayer();
            p.sendMessage("Parkour plate has been pressed!");
        }
    }
}

But each time I walk over it, I get the message twice. How come and what's a possible fix?

thorn isle
#

probably once when the plate is pressed and another when it bounces back up? check the block state maybe

eager hawk
#

The thing is that the message comes at the exact same time

#

Like it gets sent twice

#

At the exact same moment

thorn isle
#

🤡

#

doublecheck that you're not registering your listener twice

#

apart from that it could just be some bukkit quirk

ivory sleet
#

I mean the interact event is terrorizing

dawn flower
smoky anchor
#

I wanna say "check hand" even tho it makes 0 sense

thorn isle
#

you can maybe bandaid it by adding a cooldown of one tick

dawn flower
ivory sleet
#

everything is possible with the interact event

#

truly a try and see event

thorn isle
#

those probably get sent a whole bunch apart from just the contents actually changing

#

for example i think player.updateInventory resends all the slots with set slot packets

sullen marlin
#

I don't think the event should be twice

eager hawk
#

😭

thorn isle
#

but if you qualify it with extra logic to check that the contents were actually changed, it should be fine

dawn flower
thorn isle
#

no, updateInventory is an api method that a bunch of gui plugins etc. use

#

it won't be called every tick

#

i'm just saying that you getting a set slot packet doesn't guarantee the slot was actually changed in any way

dawn flower
#

oh

thorn isle
#

conversely, you're not going to get a slot set packet with an item that isn't there, so it should be safe to listen to in that regard

dawn flower
#

wait you got a point

#

no i could accidently run the code twice because the packet was sent twice for the same item or something

#

this is frustrating

thorn isle
#

i'm not 100% if a slot being changed always sends a slot set packet either; there is at least in paper a container-update interval that causes container updates (slot set) to only be sent every n ticks, but most things that manipulate the player inventory also proactively send updates instead of waiting for that interval

dawn flower
#

this one is tricky but is there possibly a way in java to check when a list or array is changed

young knoll
#

When is MD going to merge that InventoryChangeEvent

#

Smh

thorn isle
dawn flower
#

it's stored as an array

thorn isle
#

that's the x, what's the y

undone axleBOT
dawn flower
#

tf is the y

#

oh i get it now

#

i want to run effects when the player gets a specific item in their inventory

thorn isle
#

listening to the set slot packets should be sufficient for this, alternatively (on paper where you have the armor change event) listening to inventory click/drag + armor change + item pickup should cover all cases

#

well. apart from plugins just putting shit in the inventory

thorn isle
#

i go about this by listening to the events and running a full check of all slots once a minute or so

dawn flower
#

a minute is too much delay

young knoll
#

Then check 1 player each tick

dawn flower
thorn isle
#

it is very infrequent for plugins to just put shit in your inventory

young knoll
#

Maximum delay = online players ticks

thorn isle
#

the idea is that you separate your logic into two parts; one part that looks at a slot and applies any effect changes if it differs from how you last saw it, and another part triggering those updates

#

that's where the set slot listener comes in; that can trigger an update when a slot has "probably" been changed

dawn flower
#

because there'd be 2 loops every tick and who knows how many each loop will be

thorn isle
#

individually, not very, at least if you're using (paper's?) live view persistent data container to identify your items

#

but yes it does scale directly with playercount

#

which is why i chose a conservative interval of 1 minute

#

so far i haven't had any issues with it

young knoll
#

Are you checking all players each minute

#

If so you’ve just spaced your performance issues out

dawn flower
#

the worst case scenario is:
1000 players
across the 1000 players there's 20000 items to check which would be an average of 20 items per player in their inventory
i'd need to check each item's pdc to confirm it's the item

and i'd run that every 5 ticks for minimal delay

thorn isle
#

it's negligible when amortized

dawn flower
#

how bad would that be

thorn isle
#

it might take say 10% of tick; that's negligible and not noticeable if it happens once a minute

#

but i wouldn't want to spend 10% of all my ticks doing it

young knoll
#

That’s why you do one at a time

thorn isle
dawn flower
dawn flower
thorn isle
dawn flower
#

nvm i can simulate it im dumb

thorn isle
dawn flower
#

k

#

what what tps should i scrap the idea

thorn isle
#

depends on how much you can afford

#

and don't measure tps, measure mspt, i.e. milliseconds per tick

dawn flower
#

what in the world is mspt

#

what plugin measures that

thorn isle
#

spark

#

tps is an useless metric because it's always 20

dawn flower
#

can i just run a spark profiler for like 2 minutes and send it here

young knoll
#

Well, except when it’s below 20

dawn flower
#

and u analyze it

thorn isle
#

when it's below 20 the game is already lost

#

or well 🤡 i suppose there's the tickrate command now so you can set it to 1000 and then measuring it would actually be useful

young knoll
#

Pfft, hypixel only hits 15 on a good day

dawn flower
young knoll
#

Maybe if @worldly ingot wrote better code :D

worldly ingot
#

wow, k, banning you

dawn flower
#

did you just ping him

#

to mock his code

young knoll
#

Someone had to!

dawn flower
#

you got balls of steel

young knoll
#

This code ain’t gonna mock itself

#

Tbf he wasn’t the one who somehow turned a 1/10000 chance to a 1/1 chance when moving from alpha to prod

dawn flower
#

so like

#

how do i confirm it's actually looping

thorn isle
#

remember to place a reasonable number of complex (named, enchanted, etc.) items in the inventories you're benchmarking with

dawn flower
#

i'm not making 20000 items

thorn isle
#

it's going to be moot if it's just empty inventories, because your 1000 players probably won't all have empty inventories

dawn flower
#

i just generated random items

thorn isle
#

do that, but make sure to put enchants and custom names on some of them

#

through the api, programmatically, of course, not by hand

#

this is because comparing simple items without meta and items with meta are completely different beasts performance wise

dawn flower
#

k

#

k now we wait

young knoll
#

Don’t forget to have a hasItemMeta check so you don’t create a bunch of metas for no reason

dawn flower
#

this looks bad

thorn isle
dawn flower
#

i'm a genius

thorn isle
#

it might allocate slightly less, i'm not sure, but empty item meta's are pretty lightweight memory wise so i don't think it's a large concern

young knoll
#

It saves you creating one though

#

Since it’s just a null check iirc

#

Actually that might only be for the Bukkit itemstack

thorn isle
#

mmm not quite i don't think, iirc the item factory does some sort of comparison vs the "default" meta or something

dawn flower
#

that seems fine to me

#

idk abt u though

thorn isle
#

looking at it anew it looks like craftstack at least just checks if the component patch is empty

#

which ought to be faster

dawn flower
#

it's 1 tps, it's running on prayers and luck now

thorn isle
# dawn flower help

means nothing without context; take a spark profile and see how much time your code is actually using vs the server ticking normally

dawn flower
thorn isle
#

/spark sampler --start --interval 0.01

dawn flower
#

it's 2 tps

thorn isle
#

run for about a minute and /spark sampler --stop

dawn flower
#

but ok

thorn isle
#

and again don't look at tps, look at mspt

dawn flower
#

dunno why it says 9 tps though

#

straight up lying

chrome beacon
#

huh are you getting ItemMeta a 100000 times or smth

thorn isle
#

pretty much

#

org.bukkit.inventory.ItemStack.getItemMeta() 77.55% 7462.06ms

#

and this is why itemmeta is evil

eternal night
#

average item meta moment

dawn flower
#

so now what

slender elbow
#

highly flexible system

eternal night
#

Use the methods on ItemStack

#

(If you can)

dawn flower
#

what if i just access the item meta with reflection

thorn isle
#

now you go back to listening to set slot packets or bukkit events

dawn flower
eternal night
#

Why not Confuse

dawn flower
#

i need the pdc

#

u need the meta for that i think

thorn isle
#

you can't access it via reflection, that's not how it works

eternal night
#

depends ™️

#

|| paper has pdc methods on the itemstack that skip item meta cloning||

slender elbow
#

if only there was a PersistentDataContainerView that didn't go through ItemMeta

thorn isle
#

you can access the pdc with reflection (or you can use paper, which lets you get the item pdc without getting the meta)

#

har har har

dawn flower
#

hear me out

eternal night
dawn flower
#

it's using the 70% cpu or whatever because of the item factory thing

eternal night
#

that you could use to edit the PDC on an itemstack without cloning and parsing item meta

dawn flower
#

what if i just access the meta field with reflection so it doesnt go through that

eternal night
#

Yea you can do that

#

Will still need to parse it tho omegaroll

slender elbow
#

that's not really going to work for internal itemstacks lol

eternal night
#

Phew well glad no server implementation made every itemstack an internal one

#

that would suck here

thorn isle
#

the thing is that itemmeta is purely an api construct; the inventory you are accessing has items which have their metadata in a completely different format

dawn flower
#

welp

#

now what

thorn isle
#

if you try accessing the itemmeta field through reflection, it's going to be null because it gets created when you call getItemMeta

#

like i said

#

you go back to listening to events

dawn flower
#

ok

thorn isle
#

because doing this every tick clearly isn't tenable at the scales you're testing it with

eternal night
#

doing things on a tick based system also does not sounds particularily bulletproof

#

idk what this is but like, if you need to catch changes, this sucks, clients can work around that rather fast

dawn flower
#

wait

thorn isle
#

applying item effects based on equipped/held items

dawn flower
#

is the pdc in the nbt of the item

eternal night
#

Yes

dawn flower
#

what if i jsut use an nbt library

young knoll
#

What’s an NBT

dawn flower
#

to get the pdc

young knoll
#

I only know of components

eternal night
#

Well

thorn isle
#

which i don't think spigot has events for for the armor slots

eternal night
#

Items don't have NBT anymore

dawn flower
dawn flower
eternal night
#

you'd be serializing the item every call

dawn flower
#

it was perfect

thorn isle
#

so you're kind of stuck with ticking

eternal night
#

it was terrible

#

components are so much more performant

thorn isle
#

yes

#

absolutely

eternal night
#

(outside of rw, there they suck)

slender elbow
#

if it wasn't for components, your getItemMeta calls would be infinitely worse

thorn isle
#

components are the best thing that's happened since the netty rewrite

dawn flower
#

how do i get the slot of each item in window items packet

#

and how do i check if it's the player's inventory that's being changed

thorn isle
#

see the protocol documentation i suppose

dawn flower
#

wasnt that gone

thorn isle
#

it's on mcwiki now

#

someone who remembers the bot command can maybe help you out

young knoll
#

?ptorocol

eternal night
#

yes

young knoll
#

Yep

eternal night
#

exactly

young knoll
#

?protocol

eternal night
#

?ptorocol

dawn flower
#

what is it called

thorn isle
#

consult the mappings

eternal night
thorn isle
#

or simply go through the table of contents

young knoll
#

He seems nice

#

He’s got a weird laptop though

dawn flower
eternal night
#

Maybe my GPU doesn't have enough vram for proper models

thorn isle
#

the wiki page has a table of contents

dawn flower
#

i got the name window items from protocol lib

eternal night
#

leave me alone Sadge

thorn isle
#

read the table of contents

#

and see which packet is what you want

dawn flower
dawn flower
thorn isle
#

🤡

#

read the wiki

eternal night
#

a toc

dawn flower
#

Set Container Content

thorn isle
#

which in the mojang mappings is ClientboundContainerSetContentPacket

eternal night
#

Why are we listening to container set content packet 💀

#

wtf is the xy

dawn flower
#

listening for when the player inventory changes

eternal night
#

That thing is spammed to death on every cancelled event touching inventories

eternal night
#

Well, the client does some slot predictions the server needs to fix

dawn flower
#

the only reason i wanted to listen for packets is to not spam it

thorn isle
#

it's still spammed far less than if it would be if you'd look at every slot every tick

dawn flower
#

wait a second cant the player just spam click it to crash the server

eternal night
#

Hmm, actually it should honestly not be sending a SetSlot tho

thorn isle
#

no, that would at worst be equivalent to you looking at every slot every tick

dawn flower
eternal night
#

it'll send a ClientboundContainerSetContentPacket, which is differnt.

thorn isle
#

if you don't want to listen to the packet, your only ticket is to listen to the various inventory events and then run a less frequent check that goes through every inventory

eternal night
#

ClientboundContainerSetSlotPacket could work

#

but uh, not a guarantee I guess

thorn isle
#

these are the options, basically

#

there is no perfect solution without maybe going into nms and implementing your own custom enchant

#

well, i wouldn't exactly qualify that as perfect either

dawn flower
#

i want it backwards compatible

#

custom enchants were in 1.21 or 1.20 i think

thorn isle
#

you want a lot of things

dawn flower
#

no

#

i just want it backwards compatible and to work when the player gets the item

thorn isle
#

custom enchants have been around forever, it just wasn't exposed via datapacks and synchronized to the client

dawn flower
#

i could give it a shot

thorn isle
#

that is a lot of things to want

young knoll
#

I still vote for the MD merges the PlayerInventoryChangeEvent PR solution

dawn flower
thorn isle
#

i think you've misunderstood the concept i put forward

dawn flower
#

i'll try the custom enchants one if it doesnt work ill just use normal events as you said

#

probably the only way anyways

thorn isle
#

the idea is that you listen to events and update the effects immediately on a "best effort" basis; but some things simply can't be caught, like plugins inserting items into inventories

#

these things are typically quite rare

thorn isle
#

so the infrequent timer check is there to make sure a player doesn't get to exploit something like that permanently

slender elbow
#

that's a weird way of spelling spigot

eternal night
#

im dyslaxis

thorn isle
#

for this use, 1 minute is good enough

dawn flower
#

i actually love you lynx

young knoll
#

My event is cooler

eternal night
#

but- but its a paper event

young knoll
#

Because uhh

dawn flower
young knoll
#

I made it

eternal night
#

Fair enough

#

that indeed sounds cool

young knoll
#

Paper is short for toilet paper

eternal night
#

WOAH

young knoll
#

Cuz you wipe butt with it

dawn flower
young knoll
#

Gottem

eternal night
#

Well now I feel sad

young knoll
#

I think there’s a server that actually has a fork called toilet paper

chrome beacon
#

yeah

eternal night
#

Yes kekwhyper

young knoll
#

I think it’s Origin Realms? Iirc

eternal night
#

Well, the humor of a yaml developer

dawn flower
eternal night
#

what can you do about it

#

taco is a great name wtf do you mean

dawn flower
#

not for a spigot fork

slender elbow
#

i have a taco fork in my cupboard

dawn flower
#

wait spigot is a spigot

young knoll
#

What about Yatopia

slender elbow
#

yatopia deez nuts

#

gottem

young knoll
#

Fuck

chrome beacon
eternal night
#

and someone got annoyed af about it

dawn flower
#

i forgot i had it running and it's screaming

slender elbow
#

lol

#

yeah

dawn flower
orchid brook
#

Im storing the uuid of my textdisplay in database. The text display is persistent. How can i retreive the TextDisplay by uuid after a restart ?

young knoll
#

You need the entity to be loaded

young knoll
#

Then Bukkit.getEntity() iirc

orchid brook
eternal night
#

xD

#

Someone questioned my professionality today

dawn flower
slender elbow
#

typical z

young knoll
#

So agreeing that tacos are tasty fixes lag

#

Noted

eternal night
#

average german core team member

slender elbow
#

god complex paper dev

eternal night
#

literally

eternal oxide
#

in nearly 60 years I've never tried tacos

eternal night
#

I-

slender elbow
#

i prefer quesadillas but a good authentic taco is great

slender elbow
#

you've looked at papermc code, now you will no longer be able to contribute to spigot

#

🫡

eternal night
#

mc dev imports looked very ugly back then

young knoll
#

I heard you like ternary

remote swallow
#

nah paper love ```java
if (boolean)
condition();
else
otherThing();

pliant fog
#

Hi, i'm trying to set the physics of an CraftEntity to false with spigot nms but all the method are obfuscated, how can I find the right one ?

young knoll
#

?nms

worldly ingot
#

Wrong server. Adventure is a Paper product

robust saffron
#

?whereami

eternal night
#

(it could be available on spigot too if you wanted typing)

jagged thicket
#

we always use the half ahhhh version of adventure library if we want adventure

worldly ingot
sly topaz
#

was it that issue MachineMaker pointed out

jade oasis
#

Anyone know the best way to use GetofflinePlayer stuff in codes for plugins without issues

worthy yarrow
#

?xy

undone axleBOT
worthy yarrow
#

What issues are you having and what are you trying to achieve?

jade oasis
jade oasis
#

?

worthy yarrow
#

You should probably just use uuids

jade oasis
worthy yarrow
#

It’s ideal and easier for every situation

jade oasis
#

Ah okay in that case I might try it

thorn isle
#

except for user interfaces

#

but that's what the gui is for -- a friendlier user interface hiding the uuids and showing human friendly names instead

burnt current
#

hi im trying to compile a plugin from github (first time working with plugins): https://github.com/SergiFerry/PlayerNPC

i want to first get the source code to compile, and then figure out how i can fix some of the plugin's bugs

i have been running into issues because the source code doesn't include a pom.xml or anything else to tell the IDE where to get the dependancies

does anyone know how to get com.mojang or net.minecraft packages? spigot api doesn't include them for some reason

mellow edge
#

What is the best way to prevent loading world beyond some area of chunks for my minigame? Probably to render air or just don't render anything at all. Smth like spectator allowed to load chunks gamerule.

echo basalt
burnt current
#

to compile spigot api?

#

ohhhh i see

#

the version i downloaded wasnt the whole thing

#

because they legally can't distribute it for some reason

#

so i have to build it myself

#

luckily buildtools seems pretty painless

#

hmm, its still missing com.mojang.authlib and com.mojang.datafixers

#

also what does it mean when a plugin imports itself...?

#

IDE says it cant resolve the symbol, and the referenced package isn't even in this source code i think...?

manic delta
#

Why PlayerLoginEvent is getting fired twice when i disallow the event?

#

without disallow

#

with disallow

#

i really dont understand why

buoyant viper
#

?jd-s for me

undone axleBOT
manic delta
buoyant viper
#

i said for myself 😭

manic delta
#

oh okay

#

why that event works like that

#

damn

blazing ocean
buoyant viper
#

but it was to help my development..

manic delta
short pilot
#

Hey in my custom target goal i am trying to access the level of a mob, but it is private

    private final WitherSkeleton witherSkeleton;


    @Override
    public boolean canUse() {
        for (Player player : this.witherSkeleton.level.players()) {
            if (player.getName().getString().equals("A")) {
                this.witherSkeleton.setTarget(player);
                return true;
            }
        }
        return false;
    }
#

Was wondering if anyone had help about how to do this or if im doing it wrong

#

this is just a test, as you can see it is targeting players with name of "A"

sonic goblet
sonic goblet
sharp heart
#

can we add and remove things, and clear a Chunk PersistantDataContainer in async ?

sullen marlin
#

You can try reporting it

sharp heart
sly topaz
sharp heart
#

in my case that's not a problem

#

I juste need to check if the container has a NamespacedKey

sly topaz
#

The thing is that PDC does IO, so anything in a different thread could trigger a race condition if you happen to access it on the same time as the server

sharp heart
#

damn

sly topaz
#

I am unsure of how much it does things on memory once the container is loaded (in this case, a chunk), it should be the case but I wouldn’t rely on it

ivory sleet
#

Worse comes to worst, callback on the server thread to do pdc stuff and then continue async stuff

jagged thicket
#

where is it getting fired twice?

jagged thicket
jagged thicket
fair rock
#

Is there a way from stopping the creaking heart to deactive itself when its not have the required logs?
Like BlockPhysicsEvent or something else (but that event didnt get triggered for the creaking heart)

slender elbow
jagged thicket
#

do not mind that

eager hawk
#

Any spigot pages explaining how to use timers?

#

Like for exmaple when I walk over apressure plate I want a timer to start right above my hotbar

eternal oxide
#

?scheduling

undone axleBOT
eager hawk
#

thx!

eternal oxide
#

and Bukkit.spigot().sendMessage

eager hawk
#

Does that put the message above my hotbar?

eager hawk
#

amazing, thank u!

jagged thicket
#

i can only reproduce in non local servers

#

Yeah i leaked my ip

#

dw

urban cloak
#

how does pterodactyl detect when the server is running?

chrome beacon
#

It checks for the startup message

urban cloak
#

once it listens to the port?

#

ah

chrome beacon
#

You can see that if you open the server egg

urban cloak
#

oh is that a docker feature?

chrome beacon
#

No

#

Eggs are a pterodactyl thing

#

but they do use docker images

urban cloak
#

i thought they were docker images

chrome beacon
#

Internally yes, but eggs are more like a config for using that image

urban cloak
#

ah

chrome beacon
#

So you specify the image and other things such as startup command and what to wait for ect

slender elbow
jagged thicket
#

could not re produce

#

consistently

jagged thicket
slender elbow
#

correct

jagged thicket
#

this thing only prevented intelij from building 💀

#

this is weird

#

only the first join, consistently fires thrice

#

after that only fires once

lost matrix
jagged thicket
#

no mods

lost matrix
jagged thicket
#

import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.plugin.java.JavaPlugin;

public final class LoginListener extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        // Plugin startup logic
        Bukkit.getPluginManager().registerEvents(this, this);
    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }

    @EventHandler
    public void onPlayerLogin(PlayerLoginEvent event) {
        String playerName = event.getPlayer().getName();
        String address = event.getAddress().getHostAddress();
        getLogger().info("Player " + playerName + " is trying to log in from IP: " + address);
        event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST,"trying smth");
    }
}
#

this is the wole plugin lol

lost matrix
#

What is this "clumsy" screenshot for?

jagged thicket
#

so tried to create artifical lag

lost matrix
#

I cant reproduce this. Are you running the latest Spigot version?

#

Btw what are you planning to use the event for?

slender elbow
#

bro that ain't spigot 💀

jagged thicket
#

i can't keep taking screen shots

lost matrix
#

Sure you need the LoginEvent even?

jagged thicket
#

No

#

i don't need it

lost matrix
#

Oh nice, well... in that case dont use it ^^

jagged thicket
eager hawk
# eternal oxide ?scheduling

How can I use this to display a timer? Because this does something every x amount of ticks, but I need the timer to stay in the screen through the entire run, you also need to see the miliseconds

lost matrix
echo basalt
#

For example, when a player steps on a pressure plate, we create a "player timer data" object with, let's say, 100 ticks remaining and we associate it to the player (using a map or something)

#

Every tick we tick every timer data object and remove it from the collection if it's expired, for example

#

You can use bukkit's scheduler for that "every tick" logic and display the timer when you tick it too

#

If you want to get fancy you can make a whole abstraction around renderers vs timer tasks vs timer filters vs whatever

worthy yarrow
eager hawk
#

Problem is that I can not know the amount of time

manic delta
eager hawk
#

Since it depends on how fast the player finishes the parkour

manic delta
icy kelp
#

Hi guys I've been on this discord like few months ago and I'm now learning GUI, someone send me article about OOP style of GUI or how do code it propertly, someone know which article it was?

#

?gui

icy kelp
#

oh nvm

jolly cliff
#

I'm creating and using a GUI plugin, but I want to place a player head within the GUI and change the appearance of that player head. How can I do this?

icy kelp
#
ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1);
SkullMeta skullmeta = (SkullMeta) skull.getItemMeta();

skullmeta.setOwner(// player here);
skull.setItemMeta(skullmeta);
slim wigeon
#

Ok, I fed up with game communities blacklisting mobile hotspots so I either use this energy to something useful. So the reason this is there. You see the normal hoppers pulls 1 per item. So my question is, how can I get it to pull 8 per item without editing the spigot.yml I think its called?

slim wigeon
#

I using that but its not working

devout knot
#

hi

#

🙂

blazing ocean
#

?nohello

undone axleBOT
eternal oxide
#

Scatter its the feds

slim wigeon
eternal oxide
#

did you read the javadoc for that event?

slim wigeon
#

I tried

eternal oxide
slim wigeon
#

I tried to use timers. I started on its function then I thinking "This is not going to work" because if you know how hoppers work, its going to be a task which Mojang has already done. I just want this to work, I been off and on about this for months

eternal oxide
#

You are canceling the even without modifying the Item so it will be returned to the source Inventory

#

The Item MAY have already been removed from the source inventory, so it no longer exists in the source when you attempt to remove it

slim wigeon
#

I removed the cancelled event and 64 turned to 32

eternal oxide
#

you also set your transferAmout to Math.min, so its always going to be 1

#

and item.getAmout is also going to be 1

#

so resultItem.setAmount(amount - transferAmount) resolves to 1-1

slim wigeon
#

Changed Math.min to Math.max, 32 turned to 16

eternal oxide
#

so your resultItem stack size is zero and you try to remove it from the original inventoyr where it no longer exists

#

you never check the original stack size

#

do hoppers pull a full stack at a time or do they pull 1 item?

slim wigeon
#

Only one item

eternal oxide
#

its been so long since I played MC

slim wigeon
#

I trying to make it 8

#

Without editing the global values

eternal oxide
#

so if there is a stack of 64 it will pul a single item, leaving 63 in the inventory?

slim wigeon
#

Yes, realiticly

eternal oxide
#

ok

slim wigeon
#

You know what I can do here?

eternal oxide
#

If I were you (as its going to be a stack of size one each time the event fires) I would modify the getItem (not a clone), then remove the extra items yourself.

#

IF the source has the required items

slim wigeon
#

I normally don't ask this but you got my code, could you edit it and I test it like I trying to get ChatGPT to do? I cannot really think. This server with its mobile hotspot blacklist annoyed me

#

I cannot even adv it so don't ask what server

eternal oxide
#

Nope as I'm cooking dinner

slim wigeon
#

I tried editing the amount (Not Clone), its not working

#

I had to use setItem and it saved its amount

quaint mantle
#

how do I go about changing a player's movement speed in lava?

#

tried a whole bunch of things, like changing the velocity, movement speed attributes, setWalkSpeed, flySpeed, etc. but none of them seem to work.

worldly ingot
#

There's WATER_MOVEMENT_EFFICIENCY but I don't think Mojang ever added one for lava

sly topaz
#

if the water movement attribute doesn't work, then your last resort would be a speed potion

thorn isle
eternal oxide
#

Cottage pie, and it was lovely

thorn isle
#

i've thought about trying that recently, never had it

eternal oxide
#

its yummy.

thorn isle
#

sure looks like it

quaint mantle
#

oh my, am I going to have to get my hands dirty with NMS?

worldly ingot
#

I don't even think NMS is going to save you here because it's not like there's a field you can change

#

You would have to mod the server. A Spigot fork

eternal night
#

Would that even work?

#

Given movement is client authed

quaint mantle
#

all that just to change how fast a player moves in lava?

worldly ingot
#

Yep

quaint mantle
#

yah, I am not doing that, way out of my scope. Not gonna do that just get player moving fast through some orange water.

glossy laurel
#

how do I change the server's elytra handling logic? nms or smth?

worldly ingot
#

orange water
😭

worldly ingot
slender elbow
#

today is "asking about things that the server can't do" day

worldly ingot
#

Must have missed that memo

young knoll
#

Well maybe the server should control movement smh my head

echo basalt
#

applying vectors every tick has worked really well for me in the past

young knoll
#

I don’t understand how games that do server side movement still make it smooth for laggy clients

#

I figured they would be snapped back a lot by the client prediction being out of sync

echo basalt
#

uh

#

it's a mix of push back

#

For example Apex completely kills movement if you have any sort of packet loss (it pushes you back)

#

but it's somewhat acceptable if your ping is high

worldly ingot
#

Rocket League does client prediction but if you don't get a movement packet, you slide to where the server tells you you should be

#

If you don't sent an input packet, the server just assumes you're still doing the last input

echo basalt
#

yeah these games just push you towards a direction

young knoll
#

I guess being pushed would be less jarring than snapping

echo basalt
#

sometimes you snap if your packet loss is too crazy

#

the client sending absolute movement instead of relative helps with desyncs

#

I assume the server also tells it where to go and the client pushes within a certain range/time

#

you could do a pro gamer move and just get a career at the game company

#

and then just read the code and fuck off

#

stonks

young knoll
#

Genius

rough drift
burnt current
#

where can i get com.mojang.authlib and com.mojang.datafixers?

young knoll
#

From Mojang

burnt current
#

oh alr

young knoll
#

Although I think you’ll also get them when depending on spigot (not spigot-api)

burnt current
#

i looked through many reddit posts and spigot threads, many recent, and they all gave a separate link to a minecraft.net hosted file which for some reason didn't actually include the packages

worldly ingot
#

(worth noting that Mojang aren't the ones that publish AuthLib or DataFixerUpper to Maven Central)

burnt current
#

it says it's able to find datafixer, but cannot find any specified version of it...?

#

6.0.8 apparently doesn't exist, and neither do the other versions

remote swallow
#

Add the mojang repo

#

It's not on central

burnt current
#

ah ok

#

how do i find the mojang repo?

worldly ingot
#

It's not located on Mojang's repo

remote swallow
#

I thought they are

worldly ingot
#

Nope

remote swallow
#

Swear I've downloaded it from there

worldly ingot
#

Again, Mojang doesn't publish the auth lib. Third parties do

#

The only library Mojang publishes is Brigadier

slender elbow
#

mojang does publish authlib on their repo tho?

worldly ingot
#

Does it?

slender elbow
#

yeah

worldly ingot
#

Guess I'm high

slender elbow
#

sources jar too which is just confusing to me lol

eternal oxide
slender elbow
worldly ingot
#

I'm in Canada. I'm told it's not even good weed

slender elbow
#

oh yeah you are

burnt current
slender elbow
#

that's right

burnt current
#

nor this one

remote swallow
#

Do the randy, eat a plate of brownies and not realise they don't have weed in

eternal oxide
#
        <!--Mojang -->
        <dependency>
            <groupId>com.mojang</groupId>
            <artifactId>authlib</artifactId>
            <version>3.5.41</version>
            <scope>provided</scope>
        </dependency>```
#

thats the last time I use authlib

#

from xml <repository> <id>minecraft-repo</id> <url>https://libraries.minecraft.net/</url> </repository>

burnt current
#

im 99.99% sure its right there

#

it just looks at the version number provided and says "welp that version doesnt exist cant use it"

#

its colored red in the IDE

remote swallow
#

Oop is minecradg

#

Check what version spigot has in cb

#

?stash

undone axleBOT
burnt current
#
    <repository>
      <id>minecraft-repo</id>
      <url>https://libraries.minecraft.net/</url>
    </repository>
    <dependency>
      <groupId>com.mojang</groupId>
      <artifactId>authlib</artifactId>
      <version>3.5.41</version>
      <scope>provided</scope>
    </dependency>
#

everything looks fine, just the version number is red and it says it cannot find that specific version

eternal oxide
#

it finds it for me

burnt current
sullen marlin
#

Did you run a build or whatever intellij makes you do if you're using that

thorn isle
#

did you reimport the project

burnt current
#

i used buildtools to compile spigot api

slender elbow
#

my god that version of authlib is old

burnt current
#

then i took craftbukkit and spigot jars from that, and i added them as libraries

#

it resolves all spigot and bukkit related dependancy issues

sullen marlin
#

So you're not using maven?

burnt current
#

but the com.mojang ones arent resolved

burnt current
#

but i was told to manually compile spigot api

sly topaz
#

what does your pom look like

sullen marlin
#

But you don't add jars in pom.xml

thorn isle
#

i drag and drop my paper jar into pom.xml

burnt current
sullen marlin
#

Suggest you share your pom.xml and the log of when you compile via maven and not your ide

burnt current
#

(im using intellij idea)

sly topaz
burnt current
#

how do you use maven for a file that is not hosted online?

slender elbow
#

it is hosted tho

burnt current
#

spigot api?

#

in its entirety?

eternal oxide
#

?maven

undone axleBOT
sly topaz
#

the spigot-api is hosted online yes, but if you run buildtools then it should also be in your maven local repository

burnt current
#

then why do build tools exist?

slender elbow
#

buildtools exists for you to run spigot, like, at all

sly topaz
#

buildtools is the one way you get the spigot jar to run your server

burnt current
#

ok so its for making a server, not deving for one?

eternal oxide
#

both

#

?paste your pom

undone axleBOT
burnt current
thorn isle
#

the server jar, that is

burnt current
#

oh the m2 directory?

thorn isle
#

not the api; the api is available online

#

yes, into the m2 directory

burnt current
#

i did specifically tell it to put it there

#

in the options

sullen marlin
#

Why are you building a project with only those dependencies?

thorn isle
#

no clue, never ran buildtools in my life

sullen marlin
#

Don't you want a spigot dependency?

burnt current
#

pom.xml is not finished

#

im compiling an existing plugin and i'm just trying to get these dependancies nailed down before i go hunting for more

sullen marlin
#

Well the only dependency you need is spigot-api or spigot

#

So I would delete those dependencies and replace them with spigot-api or spigot

burnt current
#

how do i tell it to use files from the local maven repository?

sullen marlin
#

It does by default

sly topaz
#

you just have to add the dependency to your dependencies block in your pom, with the proper group and artifact id

burnt current
#

i removed the minecraft repo and now it can find authlib and datafixer 😭

even though i originally didn't have minecraft repo in repositories in the first place

#

i am so confused

sly topaz
#

what do you even what authlib and datafixer for

slender elbow
#

how do you know exactly it "can't find it"?

#

like

sullen marlin
#

You don't need these libraries, you need spigot

burnt current
#

to compile a plugin so that i can fix it for my server

#

it specifically calls for authlib and was saying it couldn't find it even though it had spigot.org and bukkit.org

#

and a bunch of other things

#

hold on ill grab the source

eternal oxide
#

just run buildtools for the version you need (of spigot)

#

then depend on spigot instead of spigot-api

burnt current
#

it doesn't come with a pom.xml which would have been helpful

eternal night
#

4838 lines wtf

sullen marlin
#

That code is very incomplete. It references a tonne of classes which aren't in that source repository

#

Do you have those?

sly topaz
#

is there a reason you are using this plugin instead of just Citizens really

sullen marlin
#

Otherwise you're just gonna run into a very hard time

sly topaz
#

this plugin doesn't seem to be doing anything special for NPCs

burnt current
# sullen marlin Do you have those?

no, but in the comments on the plugin's page apparently many other people have taken to doing the same thing im doing and it has worked out for them

#

theres one nasty bug i want to squash

blazing ocean
#

why are they putting the generated JD on github

sullen marlin
#

You definitely cannot compile that plugin using only that code in that repo

#

That repo contains only the API, not the implementation

burnt current
burnt current
#

idk what to do then

sly topaz
burnt current
#

so i have this plugin called corpses, it's the best plugin for player corpses, and really the only one that works and is customizable. you die, a corpse spawns with your items. it will despawn after a configurable amount of time, and if you get back to it before then you can get your items back. if you take too long, the items get dropped from the corpse and while the corpse is gone you have another 5 minutes to get the items (default despawn time)

and this corpses plugin depends on playernpc

but playernpc has a bug where if you create a playernpc with a cape that didn't exist back when the plugin was made, it fails to make the playernpc. it has no error handling for this when it happens.

so the corpses plugin, after a player dies with one of these capes, will drop the players items immediately as there is no corpse to put them in. but then after the corpse despawn time it spawns ANOTHER set of items as if there actually was a corpse and it finally despawned.

it's a dupe... which is pretty bad.

#

i genuinely do not know how to take someone else's plugin and make it use a whole new library that it didn't originally use when there are major differences between both. ive been having trouble even figuring out how to compile this one...

burnt current
#

that's for a much newer version of minecraft and the config is awful 😔

thorn isle
#

are you on 1.8

sly topaz
#

I had assumed you were trying to update the plugin to a newer version

burnt current
#

1.19.4

#

oh

#

no

#

i just want to fix some bugs

#

the plugin is already on 1.19.4

thorn isle
#

do you have a link to the corpses plugin

sly topaz
#

it is that one most likely, as it is the same author as the PlayerNPC lib

thorn isle
#

if it's open source (and has a proper build script unlike this shit you're trying to build) modifying it to use e.g. citizens would be orders of magnitude easier

sly topaz
#

that said, the Corpses plugin doesn't even seem to be open source so how are you planning to modify it

burnt current
#

but the bug happens in playernpc

#

the only option is to fix playernpc

#

as far as i can tell

thorn isle
#

nuh

#

you modify corpses to use citizens

burnt current
#

playernpc is a dependancy for corpses. the bug happens in playernpc and causes corpses to dupe item sets

#

theyre both built for eachother specifically

#

and i dont even think corpses has source code out there

#

so i would have to decompile or something

thorn isle
#

alternatively you can try like decompiling playernpc and selectively recompiling the problematic classes

#

don't even try to use maven for this honestly

sly topaz
burnt current
#

you think the necessary classes are all included in the final jar?

sly topaz
#

the github repository contains no implementation whatsoever

burnt current
#

if so that may help things

thorn isle
#

sure you can, if the plugin runs on your server then you already have everything you need

#

it's just a matter of decompiling it

burnt current
#

hmm

sly topaz
#

I believe it'd be more worthwhile to just remake the plugin yourself

thorn isle
#

i did this to update mythicmobs to 1.21.4 despite it being closed source

sly topaz
#

instead of digging a rabbit hole to try and get the a compilable source out of a decompiled artifact

thorn isle
#

the trick to the matter is that you don't want to recompile the entire artifact -- just the problematic classes

#

although if the problematic class is 4000 lines like this nonsense on this repo, the two might be one and the same 🤡

sly topaz
burnt current
#

to clarify, i have no idea what im doing im not a plugin dev xd

it will take me years to get good enough at plugin development to make something like this from scratch

thorn isle
#

yes, this is honestly probably a much better option

#

looking at the plugin it seems like the author is a blithering fool to begin with

sly topaz
#

inb4 they're a youtuber who makes plugin

burnt current
#

hm, a backport...?

burnt current
sly topaz
#

you could also just ask the author of that plugin above if they could support 1.19.4 lol

#

if you're lucky, they'll do it and you're good

burnt current
#

well

#

there were some other features missing from this that my original plugin had

thorn isle
#

it uses nms so i doubt it

burnt current
#

i remember i tried it out at some point

thorn isle
#

why it uses nms is anyone's guess

sly topaz
thorn isle
#

if i had to write one of these, i'd depend on libsdisguises and disguise an armorstand as a diving playe

#

no nms or protocollib required