#help-development

1 messages Β· Page 1246 of 1

sly topaz
#

I mean, that's the same as just depending on protocollib

thorn isle
#

nope

#

libsdisguises api is far more stable than the protocol

#

and far far more stable than nms

sly topaz
#

ProtocolLib hasn't changed API in ages

burnt current
#

the exact way i had my original plugin work was this:

when a player dies, they spawn a corpse.

if the corpse is ever empty, it will take only 10 seconds to despawn.

when the corpse is not empty, it will take 5 minutes to despawn.

when the corpse despawns it drops whatever items remained in it.

if you right click on a corpse with an empty inventory, then instead of opening the corpses inventory, the plugin sets your inventory to that of the corpses and empties the corpse.

thorn isle
#

yes, but the protocol changes every version

#

anything that directly uses the protocol is inherently unstable

#

and protocollib is only a very thin wrapper over the protocol

burnt current
#

oh also curse of vanishing worked on that plugin, so curse of vanishing items would vanish properly (had someone make me a bugfix to add that to that plugin)

thorn isle
#

for example just one or two major versions back, the remove entity packet got changed to contain not one eid, but a collection of eids

#

this was an unexpected and imo needless change, but mojang did it anyway

burnt current
#

oh also the corpse has a nametag above it, which has a timer telling you how long until despawn time.

and it also says "[username]'s corpse"

sly topaz
thorn isle
#

this fucked over a bunch of plugins relying on protocollib for e.g. clientside fake entities

#

including my imagemap plugin

sly topaz
#

when you click an empty corpse, it clears your inventory?

burnt current
#

so if you right click a corpse, the plugin checks if your inventory is empty or not.

if empty:
the corpses inventory is copied to your inventory, and the now empty corpse despawns in 10 seconds.

if not empty:
you just open up the corpse like a chest

thorn isle
#

i'd maybe commission someone to do it, or to find/modify an existing plugin to behave this way

burnt current
#

i am an unforseeable problem magnet unfortunately πŸ˜”

#

i will try, but would it really not be easier to try and compile playernpc?

thorn isle
#

well

#

based on that repo? no

sly topaz
#

I really don't think so considering you are not a developer

thorn isle
#

that repo is a shitshow

sly topaz
#

and that code looks like a mess to deal with anyway

burnt current
#

i think i know how to fix the singular bug, i just cannot get it compiled for the life of me

sly topaz
#

I can make a plugin like that for 10 bucks

thorn isle
#

that's a decent rate

burnt current
#

well, its 2 plugins technically

#

theyd both have to work together

#
# Lootable Corpses config

# Set in minutes how many minutes before corpses are removed
# Set to 0 to not remove corpses automatically
remove-corpse-after-minutes: 2

# Set in minutes how many minutes before corpses are removed after interaction
# Set to 0 to remove instantly after interaction
# Set to -1 to disable
remove-corpse-after-interaction-minutes: 0

# Disable looting corpses
disable-looting: false

# Instant respawn - cancel death screen
instant-respawn: false

# Kill players when leaving game
kill-on-leave: false

# Custom inventory title
inventory-title: "{player}'s corpse"

# Set whether the corpse is generated above the Void when a player dies in the Void
keep-corpses-above-the-void: true

# Blacklisted worlds - disable lootable corpses in certain worlds
blacklisted-worlds:
  - world_nether

this would take some work actually i think 😭

#

half the features i normally use aren't there, idek if it has nametags for the corpses

#

im also 90% sure that 1.20+ adds some features that these kinds of fake players and custom mobs can utilize... and said features don't exist in 1.19.4

#

based on some discussion ive had with the GSit dev

manic delta
#

is there a event when a player duplicates item in creative?

#

or should i use InventoryClickEvent

thorn isle
#

iirc there's a COPY_STACK inventory action but i might be wrong

#

disguise Player %player% setSwimming true setCustomName "%player%'s corpse"

manic delta
#

let me see

sly topaz
#

what in the Skript

burnt current
thorn isle
#

this is a libsdisguises disguise string

#

it is a bit 🀑 and you probably should use the proper methods on Disguise, but this should work; pass this through DisguiseParser::parseDisguise to get the matching Disguise

manic delta
#

ill try with it

#

thank you

thorn isle
#

then apply the Disguise to e.g. an armor stand

#

and they will appear exactly as in that plugin of yours

#

they will have the player's skin and a title over the corpse saying "player's corpse"

#

then you can listen to the entity interact event to do the item stuff

manic delta
burnt current
#

but line 1 and line 2 accurate?
and inventory stuff?
and then the code to drop items when it despawns and not when a player tries to kill it?

manic delta
#

any ideas?

thorn isle
#

should all be very simple

burnt current
#

like it still just sounds like you're coding the entire plugin minus the fake player

manic delta
thorn isle
#

well yeah

#

but the entire plugin is very simple

#

minus the fake player

#

that part is complicated

burnt current
#

how did they get a simple 2 line nametag tho?

thorn isle
#

which is why i use libsdisguises to take care of it

burnt current
#

i feel like they did something complicated

thorn isle
#

probably an invisible armorstand with a custom name

manic delta
#

oh wait

#

maybe is from creativeinventoryevent

thorn isle
#

nothing complicated, just a little bit of extra work

burnt current
#

and the nametag updating in real time

thorn isle
#

not complicated either

burnt current
#

i dont actually know how to dev a plugin...

thorn isle
#

commission that other guy who was here for 10 bucks

manic delta
thorn isle
#

the client usually doesn't tell the server about the inventory actions it does in creative

manic delta
#

damn

thorn isle
#

the protocol around creative mode inventory is completely whack

#

what are you trying to do

burnt current
#

every commission ive ever done has gone this way:

commission guy: yeah i can totally do it, it will be easy
me: with ALL the features? like, not a single one missing?
commission guy: yeah

8 weeks later:
commission guy: hey im done
me: this is not even close to what i asked for
commission guy: ok, anyway im done

manic delta
thorn isle
#

the way i tackled this is by applying an unique id earmark in the pdc of every valuable item, and then periodically scanning interacted-with slots for duplicate earmarks

#

it will make them unstackable but there's no other way around it i don't think

#

i mean barring dupe exploits and creative mode, you shouldn't need this anyway

#

don't uh give creative mode to players you don't trust not to fuck your server

manic delta
thorn isle
#

tell him he's dumb

thorn isle
blazing ocean
#

telling your client they're dumb has gotta be my favourite thing to do

thorn isle
#

but i had to listen to every single inventory event and pickup event and 4 others and manually merge stacks and simulate inventory action outcomes

#

turned out to be like 2000 lines but it did work

manic delta
#

maybe i can listen for InventoryCreativeEvent and PLACE_ALL action

#

and i can detect if theres another equal spawner

thorn isle
#

well, see

#

the creative client is unhinged

#

i can take your spawner, save it into a hotbar

#

put the spawner into a chest

#

restore that hotbar

#

put the copied spawner into a chest

#

and repeat indefinitely

slender elbow
#

the proper solution is to disallow creative mode altogether

thorn isle
#

in fact i don't even need to save it to a hotbar, i can just mod my client to spawn anything whatsoever into the game

manic delta
#

yea

#

ill tell him that he is dumb

slender elbow
#

let's go

thorn isle
#

there are plugins like limitedcreative that get around this but they're very bandaidy

manic delta
#

fuck him πŸ–•

thorn isle
#

that's the spirit

slender elbow
#

kinky

manic delta
#

okay now

#

i still have problem with PlayerLoginEvent that is fired twice or more times if i disallow it

#

lmao

#

i think is a bug

thorn isle
manic delta
#

this thing

#

damn

#

I think is a spigot itself bug

thorn isle
#

but oh well, they're physical money items anyway so it doesn't hurt to earmark them aggressively

#

can't have them money dupes happening

manic delta
#

I want to dupe money irl

thorn isle
#

you need to be in the government to do that

manic delta
#

You are right

#

Or be a drug

#

Trafficker

thorn isle
#

or crypto shitcoins

manic delta
#

Yea

thorn isle
#

is there a md5 coin

manic delta
#

SpigotCoin

thorn isle
#

pump and dump in favor of purpur

thorn isle
#

amazing

eternal night
#

April Fools NFT in uhhh 2022?

thorn isle
#

someone bought it for 0.08 eth? 🀑

#

that's like 100 bucks in today's money

manic delta
eternal night
#

I think md paid like, 100+ to even mint it xD

thorn isle
#

well i guess he made his money back

#

sounds like we should do it again

worldly ingot
#

I still stand by that joke. It was kinda funny

eternal night
#

the hotbars?

slender elbow
#

S

coral sparrow
#

Shi

eternal night
#

wtf is that link omegaroll

#

?imgur

#

Booo

coral sparrow
#

I meant this

#

πŸ˜‚

eternal night
#

Usually actionbar/bossbar/whatever + font hacking via negative spaces

coral sparrow
eternal night
#

no (at least none I know)

coral sparrow
#

dang

coral sparrow
thorn isle
#

there's uh

#

happyhud

#

but its garbage

young knoll
#

That’s not very happy :(

thorn isle
#

and probably 25 other hud plugins

coral sparrow
#

i am making smp with powers and the hotbars black are showing countdown and cooldown

thorn isle
#

i don't really know any by name other than happyhud though

#

because happyhud performance makes me very unhappy

#

google for a hud plugin i suppose

#

you'll for sure find a few

#

hud as in heads up display

#

i'm also faaairly certain you can maybe do this with some display entity hacks now, and if you stick to vanilla icons and unicode symbols and text, it won't even need a resourcepack

#

don't think anyone has tried it yet though

coral sparrow
#

can this be plugin or it is related to mod?

#

Power: Time Stop – Stops time in a 5-block radius for 2 minutes.
Cooldown: 5 minutes.
Duration: 2 minutes.

chrome beacon
#

Could probably be done with a plugin

coral sparrow
#

could make plugin work?

#

ik there is plugin where you can make plugin

burnt current
#

so i tried to compile this one;

[17:21:37 ERROR]: Error occurred while enabling LootableCorpses v2025 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "com.devConnor.lootableCorpses.LootableCorpses.getCommand(String)" is null
        at com.devConnor.lootableCorpses.LootableCorpses.onEnable(LootableCorpses.java:55) ~[lootablecorpses.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugin(CraftServer.java:577) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugins(CraftServer.java:488) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:311) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1120) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:325) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at java.lang.Thread.run(Unknown Source) ~[?:?]

it can't find the commands...?

#

oh my god

#

it made my plugin.yml a default one 😭

eternal oxide
#
  1. Purpur
  2. commands missing from plugin.yml
burnt current
#

ok

#

i just need to take the plugin.yml from source again

burnt current
#

i dont get the purpur hate

sullen marlin
#

?whereami

eternal oxide
#

Forks behave differently. They have their own bugs and idiosyncrasies . This is Spigot support

burnt current
#

wait so i shouldnt be using paper either?

buoyant viper
eternal oxide
#

nope πŸ™‚

burnt current
#

oh

sullen marlin
#

what discord server is this?

burnt current
#

ok fair enough

#

yeah it just didnt occur to me 😭

#

idk why

buoyant viper
eternal oxide
#

get it all working on SPigot and change later if you need to

burnt current
#

makes sense πŸ‘

buoyant viper
burnt current
#
[17:37:38] [Server thread/ERROR]: Could not pass event PlayerDeathEvent to LootableCorpses v1.0-SNAPSHOT
org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]

uhhhh... im not really sure how to fix that...

coral sparrow
#

import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;

public void updateBigHotbar(Player player) {
new BukkitRunnable() {
@Override
public void run() {
// Get coordinates
double x = player.getLocation().getX();
double y = player.getLocation().getY();
double z = player.getLocation().getZ();
String coordinates = "X: " + x + " Y: " + y + " Z: " + z;

        // Send coordinates to the ActionBar (can be customized as big hotbar effect)
        player.sendActionBar(coordinates);  // This is the 'big' text display.
    }
}.runTask(this); // runTask schedules it for execution.

}

Would this work as big hotbar?

glad matrix
#

[23:24:30 ERROR]: Could not load 'plugins/SeedWorldPlugin.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:162) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:148) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.craftbukkit.v1_16_R1.CraftServer.loadPlugins(CraftServer.java:388) ~[patched_1.16.1.jar:git-Paper-138]
at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:208) ~[patched_1.16.1.jar:git-Paper-138]
at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:941) ~[patched_1.16.1.jar:git-Paper-138]
at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Paper-138]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_432]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
... 7 more

chrome beacon
#

Jar does not contain plugin.yml

glad matrix
#

but its contain this i dont uderstand y

chrome beacon
#

It does not

glad matrix
#

and maybe the server dont get the file

#

but in the plugin there is th yml

thorn isle
#

is there

#

open it up and see

#

just because you see it in your IDE doesn't mean it ends up in the jar

chrome beacon
#

They send me an image of what looks like an empty zip or jar with just the plugin.yml in it

#

nothing else so no code

thorn isle
#

lol

chrome beacon
#

Empty as in no code

glad matrix
thorn isle
#

that doesn't match the error though, it'd say no main class found or some such thing if there was a plugin.yml but no classes

chrome beacon
#

Yeah that's the plugin.yml

glad matrix
chrome beacon
#

I don't use Eclipse

#

but I recommend you use Maven or Gradle instead of packaging with their artifact system

thorn isle
#

put the plugin.yml in the jar with winrar every time you build it

young knoll
#

Genius

thorn isle
#

then automate it with ant by having antrun call winrar with the .yml as a parameter

chrome beacon
#

I mean the jar doesn't contain any code

#

so you'd have to put that in there as well

young knoll
#

Eclipse definitely can export it with the plugin.yml

#

That’s how I did it years ago

chrome beacon
#

Yeah it can

thorn isle
#

issue is i think the only person here who uses eclipse is elgarl

sullen marlin
#

And @worldly ingot

#

Really the answer is use netbeans

young knoll
#

I used to use it until recently

sullen marlin
glad matrix
#

?

thorn isle
#

yeah

#

you're not doing it right

glad matrix
#

wdym

thorn isle
#

there's a way to do it

#

but that's not how you do it

eternal oxide
#

If using Eclipse you shoudl be using Maven

#

Export means you have to manually select the elements you want to include, like the plugin.yml

glad matrix
young knoll
#

I think you just select plugin.yml as an external resource when you use right click -> export

glad matrix
#

is it possible that my plugin is 1kb?

chrome beacon
#

No

young knoll
#

Doubt it

glad matrix
#

and 3kb?

young knoll
#

That’s 1/32 the size of the original Super Mario bros

glad matrix
chrome beacon
#

You use the Eclipse build system

eternal oxide
#

Depends how you setup your IDE/plugin

#

if you are exporting you are using the built in compiler

#

wether you should or not is yet to be seen

#

do you have a pom.xml?

glad matrix
eternal oxide
#

then you should not be using export

glad matrix
#

oh no

#

i dont got

#

ops

eternal oxide
#

maven build profiles

#

in the Run menu, run configurations

#

select maven and create one for your plugin

#

or just pick runAs maven build

#

then you can use the run button/pull down to build

glad matrix
eternal oxide
#

I don;t do dm's I hate everyone too much

burnt current
#

ok yeah that new-ish lootable corpses plugin is totally and completely incompatible with 1.19.4 😭😭😭

theres so many things mojang changed or renamed in code and i would need to have a full understanding of all that stuff in order to just get this plugin to run correctly

#

though i do have some ideas now for how i can maybe get playernpcs to compile...?

eternal oxide
#

the github you linked earlier only seemed to be an API. did it actually have the whole plugin?

burnt current
#

PlayerNPC is an API for Corpses. PlayerNPC has a bug that makes it so that Corpses can dupe items if you have one of the new Minecraft movie capes

#

so i want corpses, but i don't want that dupe

#

Lootable Corpses is a completely different plugin (which only requires protocollib) that i started trying to backport to 1.19.4, but it seems like i will not be able to do it without actually knowing my way around plugin development and Minecraft backend code and stuff

glad matrix
#

@eternal oxide that what it show when i do run

eternal oxide
#

hit the pulldown and pick run configurations

#

you have to create a configuration before you can build

glad matrix
burnt current
#

the plugin I was trying to find dependencies for earlier was PlayerNPC (the API)

eternal oxide
#

click new

#

give it a name

#

and in the goals section type clean package

glad matrix
eternal oxide
#

yep

#

make sure it has a name

glad matrix
#

what i do in profile and settings?

eternal oxide
#

nothing

#

only name it

glad matrix
#

where is the name?

eternal oxide
#

At the top

glad matrix
#

the base directory?

eternal oxide
#

no

#

name

glad matrix
#

oh

eternal oxide
#

then run or close, whatever you like

#

teh base directory shoudl already have been in the configuration, unless you removed it

glad matrix
#

i dont need to wrote something in base directory

#

?

eternal oxide
#

it shoudl have already been there

#

ok, close all the windows

#

find your pom.xml in your package explorer

#

right click

#

runAs

glad matrix
#

how to i clode all the windows?

#

close

icy kelp
#

?gui

eternal oxide
#

close/cancel you just want out of that ui section

buoyant viper
#

eclipse spotted

glad matrix
eternal oxide
#

what?

glad matrix
#

the pom.xml

eternal oxide
#

in the package explorer window left of your screen

burnt current
#

ok I think I know why I couldn't get working dependencies before

if I don't close the project, reopen the project, AND click on "show more" for the error intellij has every time, then it won't load new dependencies

#

it is quite strange

eternal oxide
#

there is an update/refresh button in the maven/pom window

burnt current
#

ahh, I will try that next time

glad matrix
eternal oxide
#

which?

thorn isle
#

or in the maven sidebar on the right, click the circular arrow "reload" button to do the same

#

sometimes the reload modal popup thing when viewing pom.xml doesn't appear

eternal oxide
#

?maven

undone axleBOT
dawn flower
#

how do i change an item to a creative player with packets without it changing serverside

young knoll
#

That’s the neat part

#

You don’t

dawn flower
#

thank's for the amazing help <3

#

so like what can i tell the creative player to show it actually did something to the item

#

he could thing it's bugged

young knoll
#

When a creative player picks up an item, it gets destroyed server side, when they place it again, it just tells the server to create the item again

thorn isle
#

what're you trying to do

dawn flower
#

1 sec lemme load up the game to record

#

i can't explain

buoyant viper
#

are u playing minecraft in 4:3 aspect ratio

dawn flower
#

amazing monitor

buoyant viper
#

banishment to the shadow realm on account of the highest decree

young knoll
#

What are you doing to add this lore

#

Is it a packet?

dawn flower
#

yes

young knoll
#

I mean that should still work for creative players

dawn flower
#

no

#

it changes the item serverside if im creative

young knoll
#

But every time they pick up the item and place it again it’ll duplicate

#

Unless you also remove it in the incoming item packet

#

Yay creative mode

chrome beacon
dawn flower
chrome beacon
#

You need to strip it from the item

#

Yes you can intercept and strip

dawn flower
#

how

#

what packet

young knoll
#

Idk the Mojang name

#

ServerboundSetItem or something

#

?mappings

undone axleBOT
chrome beacon
#

Could probably use InventoryCreativeEvent

young knoll
#

Might work

dawn flower
#

generous spigot ngl

young knoll
#

Appears the Mojang name is ServerboundSetCreativeModeSlotPacket

#

Shortest java class name

dawn flower
#

issue

#

i dont want to accidently strip other lore from the item

#

should i just store the original lore in the pdc of the item being sent

young knoll
#

You can

#

I can also think of some other hacky ways to do it

dawn flower
chrome beacon
#

hidden color codes to identify your line

young knoll
#

^

dawn flower
young knoll
#

Or a special component to do the same (that’s outside the api though :( )

dawn flower
#

i also enchant the client side item with unbreaking and give it hidden enchants flag, is there a way to also identify if it's by my item changes or it actually has that (i know enchant glwo override exists but i want it backwards compatible)

#

actually i wont make it glow for creative players, nvm

burnt current
#

ok i have managed to decompile, and then recompile, the corpses plugin

i can now confirm with 100% accuracy that the bug WAS in-fact, inside of playernpc and not corpses 😭

#

though maybe now i have enough decompiling experience to decompile playernpc and get all the right dependancies...? i hope

#

hm

#

ok

#

so

#

many of these files i need

#

that are not included in the source code

#

do not decompile correctly

#

there are two files i have the source of, that i also have the decompiled versions of. and those two decompiled versions show irreversible data loss πŸ’€

#

there is no way to work back from the decompiled version to tell what random parts of the code were truncated into "()" for whatever reason

#

corpses decompiles well enough, but playernpc absolutely does not

#

so, i guess i need to somehow make a workaround in corpses to fix a bug in playernpc???

#

😭

#

sometimes i wish i did not run a minecraft server

young knoll
#

Isn’t it open course

burnt current
#

playernpc is open source, yes. but the provided source files are incomplete i think 😭

#

it depends on files that it doesnt provide, that are attached to its organization

#

for example; import dev.sergiferry.playernpc.nms.minecraft.NMSEntity;

playernpc imports nms from inside itself

#

but it does not come with that

young knoll
#

Oh yeah it just doesn’t have any of its version specific code in the repo

burnt current
#

import dev.sergiferry.playernpc.utils.ColorUtils;
it also doesnt come with this one

burnt current
#

if they do exist outside of playernpc this wouldnt be so hard

#

id just have to rename a bunch of imports and stuff

#

i think πŸ€”

eternal oxide
#

Looks like it has a core library dependency for its nms wrappers

young knoll
#

It also has a disgusting 4800 line godclass

eternal oxide
#

which are not published

young knoll
#

My advice would be to run very far away from this library and never look back

burnt current
#

ok, so that is playernpc-specific code then? meaning i would not be able to compile this?

#

since its missing

young knoll
#

Correct

burnt current
#

ok damn 😭

#

so i have 2 options:

  1. make a workaround somewhere in the corpses plugin's code so that it deletes capes from playerdata before asking playernpc to make a corpse from it
  2. code my own corpses plugin from scratch (i legit have 0 clue how to do this)
eternal oxide
#

If you have the whole thing running on a server you "should" be able to decompile it

burnt current
#

well

#

i tried

eternal oxide
#

but I wouldn't Its horrible

burnt current
#

i was able to decompile and recompile corpses pretty easily

#

but playernpc straight up loses entire bits of code and if statements

#

when decompiled

#

and i cant really predict what they were

young knoll
#

Why not just use a different corpse plugin

burnt current
#

from the few files that are shared between the decomp and the public source, there are issues that cannot be fixed;

    public void setSkin(@Nullable String playerName, Consumer finishAction){
        if(playerName == null){
            setSkin(Skin.STEVE);
            return;
        }
        NPC.Skin.fetchSkinAsync(playerName, (skin) -> {
            setSkin(skin);
            if(finishAction != null) getPlugin().getServer().getScheduler().runTask(getPlugin(), ()-> finishAction.accept(skin));
        });
    }

turns into:

    if (playerName == null) {
      setSkin(Skin.STEVE);
      return;
    } 
    Skin.fetchSkinAsync(playerName, skin -> {
          setSkin(skin);
          if (finishAction != null)
            getPlugin().getServer().getScheduler().runTask(getPlugin(), ()); 
        });
  }
young knoll
#

Preferably one that doesn’t rely on an outdated library with questionable code

burnt current
#

id basically be making my own plugin either way

young knoll
#

What features

burnt current
#

its hard to use an existing plugin as a starting place unless its almost exactly what i want already, cuz im really not a plugin dev

eternal oxide
#

that looks fine, its just referencing internal code

burnt current
#

its different

#

the random "()" is an error

eternal oxide
#

different how? other than then NPC. taken off?

dawn flower
#

what's ClientboundSetCursorItemPacket in protocollib?

burnt current
#

its missing finishAction.accept(skin)

eternal oxide
#

ah teh missing lambda

#

what file is that in?

burnt current
#

NPC.java

burnt current
#

so if i cant find some methodology to figure out how the code changes when it gets decompiled, i cant fix the decompiliations when theyre removing important pieces of code

#

there's only 2 java files i have the source for

young knoll
#

At least the source is actually available

eternal oxide
#

other than the missing spigot lib

young knoll
#

It claims 1.20+ but the plugin.yml has an api version of 1.19 so it might just work

burnt current
#

couldnt make it work

#

mojang changed some backend code, so its not for 1.19 anymore πŸ˜”

manic delta
eternal oxide
#

I don't use IJ, only noobs use that

manic delta
#

damn

burnt current
manic delta
#

but it gives you all you need

eternal oxide
#

at teh cost of all your memory/resources

manic delta
#

do you have 2gb or what πŸ€”

eternal oxide
#

While your system is lagging mine is puring with Eclipse πŸ˜‰

manic delta
#

i can literally run two minecrafts, run the server and intellij at the same time just with 16gb ram

burnt current
young knoll
#

Same way any sane plugin would do it

#

Just map an inventory to the corpse entity id

burnt current
#

the corpse doesnt have an entity id if it doesnt exist and is only in packets sent to players

#

it quite literally does not exist on the server

#

unless i misunderstand this

young knoll
#

You need an entity ID to communicate with the client

manic delta
#

this

burnt current
#

alright πŸ€”

#

ill see if it has inventories

#

oh

#

it doesnt actually work on 1.19.4

#
[20:28:02] [Server thread/ERROR]: Could not pass event PlayerDeathEvent to Corpse v1.0.10
org.bukkit.event.EventException: null
#

thats weird because the latest update for the plugin is from 2024, and it says it added 1.19.x support

#

but yeah it legit does not work on default spigot

burnt current
dawn flower
#

how do i change the visual dropped item to a player clientside but when they pick the item up, they get the serverside item

#

if that makes sense

#

xy: i want the dropped item to have a glow to the player but serverside it doesn't have the glow

young knoll
#

Probably just an entity metadata packet

dawn flower
#

in a spawn_entity packet?

young knoll
#

No

#

A metadata packet

#

Or whatever Mojang calls it

dawn flower
#

no like i send the entity metadata packet when the server sends the spawn entity packet

young knoll
#

Yes

#

Or whenever you want to change it

burnt current
#

wait actually, dumb question, is there a way to edit only 2 java files and just jam the resulting files into the plugin's original compiled jar?

#

ive been assuming u cannot do that

young knoll
#

You could decompile them, edit them, compile them, and then replace the ones in the jar

#

Tho getting them to compile on their own is the hard part

#

Some decompilers also let you edit the files

dawn flower
#

recaf is one

burnt current
#

interesting πŸ€”

#

im going to try recaf then

dawn flower
#

io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:set_entity_data'

        if (packet.getType() == PacketType.Play.Server.SPAWN_ENTITY) {
            Entity entity = packet.getEntityModifier(event).read(0);
            if (entity instanceof Item item) {
                PacketContainer metadataPacket = new PacketContainer(PacketType.Play.Server.ENTITY_METADATA);
                metadataPacket.getIntegers().write(0, item.getEntityId());
                WrappedDataWatcher watcher = new WrappedDataWatcher();
                watcher.setEntity(item);
                watcher.setItemStack(8, changeItem(player, item.getItemStack()), true);
                metadataPacket.getWatchableCollectionModifier().write(0, watcher.getWatchableObjects());
                ProtocolLibrary.getProtocolManager().sendServerPacket(player, metadataPacket);
            }
        }```
#

it kicks me as well

charred marten
#

The code shows you're handling item entities with metadata packets,, and It just looks like the packet data might be getting messed up somewhere. The watcher setup for the item entity seems fine at first glance, but something's breaking when it tries to send that data to the client. Have you made any recent changes to the plugin or updated the server?

  • The server and client versions don't match perfectly
  • A plugin is trying to send data in a format the client doesn't expect
  • Something's null that shouldn't be
dawn flower
#

The server and client versions don't match perfectly
they match perfecty, i'll check the null one

young knoll
#

Smells like chatgpt

dawn flower
#

no

#

i copied it from a thread

#

and changed some stuff to do what i want

young knoll
#

I meant their response

dawn flower
#

ah

burnt current
#

recaf gives an error for every single import in every single file 😭

#

is this normal?

dawn flower
charred marten
#

@young knoll scan it πŸ‘πŸ€—

burnt current
#

it wont let me save any changes to the files until i fix each and every single error 😭

#

but since all imports cause errors...

dawn flower
#

weird

burnt current
#

yeah im kinda stuck ig πŸ˜”

dawn flower
#

probably because of dependencies

#

it cant detect them

burnt current
#

but like, even the files from the plugin itself cant be imported from one place to another

#

things cant be implemented

dawn flower
#

try something other than recaf

#

i havent used recaf in so long but i remember it being buggy

dawn flower
thorn isle
#

are you still trying to fix that crappy corpse plugin? just rewrite it

#

it'll take maybe like 4 hours and you'll learn something actually useful while doing it

dawn flower
#

am with vcs2 on that one

sly topaz
#

eh, more like a week considering they aren't a developer

#

but you'll learn something nonetheless

dawn flower
#

y'll prob spend more time trying to find something like recaf

young knoll
burnt current
#

and its not a very simple plugin

dawn flower
#

is the corpses plugin open source

sly topaz
#

it is actually a not that complicated of a plugin

burnt current
#

diving right into protocols, packets trickery, timers, all that stuff from having 0 knowledge beforehand is going to take more than 4 hours

dawn flower
#

what is it called

thorn isle
#

yeah rewriting this from scratch, even accounting into it learning everything involved, is going to be an order of magnitude easier and faster than trying to modify this existing crappy codebase

sly topaz
dawn flower
#

what is it called

burnt current
#

thats the sad part, i can decompile AND recompile corpses just fine. and itll work

but the bug is in playernpc, its main dependancy

sly topaz
sly topaz
#

kinda

burnt current
#

yes but its missing half the files

#

and it wont decompile properly

dawn flower
#

just change the playernpc

#

and put it in your server

#

it'll automatically change it for the corpses

thorn isle
#

it "is" but it doesn't compile and is missing 95% of the classes needed to build it, and doesn't use any build script

burnt current
#

yes that is what ive been trying to do

sly topaz
#

that's what they're trying to do, it's just a mess of a library however

burnt current
#

it is awful 😭

thorn isle
#

tl;dr rewrite it

dawn flower
#

dear lord

#

i need water

#

what is that

#

he made the wwhole api 2 massive classes

thorn isle
#

start by writing a plugin that simply spawns an armor stand or another simple entity when a player dies, and stores the dead player's inventory on it

sly topaz
burnt current
dawn flower
thorn isle
#

well... this isn't going to be any easier for you

burnt current
thorn isle
#

repairing an old thing is harder than making a new one

sly topaz
dawn flower
#

io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:set_entity_data'

        if (packet.getType() == PacketType.Play.Server.SPAWN_ENTITY) {
            Entity entity = packet.getEntityModifier(event).read(0);
            if (entity instanceof Item item) {
                PacketContainer metadataPacket = new PacketContainer(PacketType.Play.Server.ENTITY_METADATA);
                metadataPacket.getIntegers().write(0, item.getEntityId());
                WrappedDataWatcher watcher = new WrappedDataWatcher();
                watcher.setEntity(item);
                watcher.setItemStack(8, changeItem(player, item.getItemStack()), true);
                metadataPacket.getWatchableCollectionModifier().write(0, watcher.getWatchableObjects());
                ProtocolLibrary.getProtocolManager().sendServerPacket(player, metadataPacket);
            }
        }```
sly topaz
thorn isle
#

chatgpt could probably create this plugin minus the libsdisguises/corpse visuals part

sly topaz
#

I wouldn't trust chatgpt to produce valid spigot code tbh, it doesn't have enough information on it

dawn flower
#

i'm not gonna lie i remember watching a how to make a corpse plugin video on yt

sly topaz
#

claude 3.7 maybe

dawn flower
#

i dont remember why but i remember i did

thorn isle
#

eh it produces pretty good bukkit-facing code

#

there's a lot of bukkit plugins in the dataset, after all

sly topaz
dawn flower
sly topaz
#

just change the displayed item?

dawn flower
#

yes

sly topaz
#

wait, the item of an item?

dawn flower
#

yes

sly topaz
#

that would be a shulker box or what

dawn flower
#

no

#

it's complicated

young knoll
#

The item shown by an item entity on the ground

sly topaz
#

you wouldn't want to send a packet but listen to the metadata packet in that case, otherwise the change is just going to revert to whatever it was before

#

the most likely case is that you are missing metadata in that packet and thus it fails to encode it

young knoll
#

It won’t revert unless that specific value is marked as dirty for whatever reason

dawn flower
sly topaz
#

I mean, that just takes reloading the chunk no?

#

ah so it is a client-side entity

dawn flower
#

no

young knoll
#

Well yeah, that’ll resend the entire entity

dawn flower
#

how do i explain this

#

i intercept the spawn entity packet

#

if it's an item entity, it does whatever to the item of that entity

thorn isle
#

itemstacks are complicated

#

my first advice would be to give up

sly topaz
#

lmao

dawn flower
young knoll
#

A listener for the entity meta packet is probably what you want though

dawn flower
#

any real advice

dawn flower
sly topaz
#

you should be able to, yes

dawn flower
#

k

young knoll
#

You can get its internal ID

#

I think plib has a method to get the entity from said ID

sly topaz
#

ProtocolLib has an utility to get the bukkit entity out of the ID

#

but it should have a convenience method for it already in the packet container

thorn isle
#

you want it to glow, right? maybe stick to some other visual effect, like maybe make a text display with a fancy shiny texture ride it or something

#

it doesn't have to be enchantment glow specifically, right

dawn flower
#

it's always enchantment glow

young knoll
#

I mean, it’s really not that hard

#

Granted I have more experience with packet events soooo yeah

sly topaz
#

is ProtocolLib still being actively maintained

dawn flower
#

yes

#

i use it because i'm used to it tbh

sly topaz
#

haven't seen dmulloy or whatever was his name in ages

#

PacketEvents is allegedly a more lightweight wrapper around the packets which makes it faster

dawn flower
#
        if (packet.getType() == PacketType.Play.Server.ENTITY_METADATA) {
            Entity entity = packet.getEntityModifier(event).read(0);
            if (entity instanceof Item item) {
                
            }
        }```
i have no idea what to do from here
sly topaz
#

I've checked the source of both and they don't seem all that different though

sly topaz
#

then modify it like you were trying earlier

dawn flower
#

how do i get index 8

sly topaz
#

this time it shouldn't fail as you are modifying the existing one instead of trying to create it from scratch

dawn flower
#
List<WrappedWatchableObject> watchableObjects = packet.getWatchableCollectionModifier().read(0);
watchableObjects.get(8)```?
thorn isle
#

atp just use nms

dawn flower
thorn isle
#

protocol becomes way friendlier when you don't need to go through 1000 undocumented wrapper classes

#

all you need protocollib is for intercepting packets (you can do it through netty too but its ass)

thorn isle
#

from there just getHandle on the packet wrapper to get the nms packet and then its good old simple nms from there

dawn flower
#

i can try that

young knoll
sly topaz
young knoll
#

Rather than dealing with figuring out which index to read/write

sly topaz
#

getWatchableCollectionModifier seems to be the one used for 1.19.3-

young knoll
#

Protocollib used to have wrappers but they aren’t maintained anymore

dawn flower
#

1.19.3-*

sly topaz
dawn flower
#

ok so i just throw my problems at viaversion and it solves it for me

#

amazing

young knoll
#

Use code for the version your server actually runs

sly topaz
#

if you mean people who run your plugin on 1.19.3 then I don't have the answer to that

young knoll
#

And hope viaversion handles it

sly topaz
#

you'd have to try

thorn isle
#

it handles most things, except when it doesn't

young knoll
#

Better than viabackwards at least

#

Though to be fair that was always going to be a losing battle

sly topaz
#

aren't they all made by the same dude

thorn isle
#

i've had trouble getting itemstack components working across 1.21 and 1.20, because apparently via only translates those for system messages and not player chat messages

young knoll
#

Yes but you try replicating new features on old versions

thorn isle
#

so in my chat formatter plugin i send everything as system messages 🀑

dawn flower
#

if i do
packet.getDataWatcherModifier().read(0).setObject(8, ...); do i have to do packet.getDataWatcherModifier().write(0, ...)

#

or does it reflect automatically

young knoll
#

Oh you want to build below y=0 but you are playing on 1.16? That’s too bad

sly topaz
#

I think you do want to write

dawn flower
#

i'll try both

sly topaz
#

the minecraft wiki did such a half-assed job at transitioning the wiki.vg content

#

wish it was more easily discoverable

#

can't complain about free things ig

dawn flower
#

com.comphenix.protocol.reflect.FieldAccessException: Field index 0 is out of bounds for length 0

#

getDataWatcherModifier doesnt work

dawn flower
sly topaz
#

AbstractStructure being a super class of PacketContainer

dawn flower
#

i hate my life.

sly topaz
#

where is that

#

still, what I said before applies

#

you only need to care about your code running in latest, the rest is for ViaVersion to handle

dawn flower
#

i'm supposed to use WrappedDataValue

#

which is why i was getting kicked in the first place

sly topaz
#
var dataWatcher = packet.getDataWatcherModifier().getItemStack(8);

is how you're supposed to read the datawatcher

dawn flower
#

data watchers are 1.19.3-

thorn isle
#

from what i remember the stuff on mcwiki is pretty much 1:1 to wiki.vg

sly topaz
#

that is talking about getWatchableCollectionModifier which returns WrappedWatchableObject, not getDatawatcherMdoifier which returns WrappedDataWatcher

thorn isle
#

it's just that wiki.vg didn't do a very good job at translating the packet names etc.

dawn flower
#

after getting the list of data values, how do ig et index 8

#

because in the list it gives me index 8 is index 0

sly topaz
dawn flower
#

it's a list where index 0 is index 8

#

but idk if that's always the case

sly topaz
#

just loop through the list and check whether the id is 8

dawn flower
#

k

sly topaz
dawn flower
#
                List<WrappedDataValue> dataValues = packet.getDataValueCollectionModifier().read(0);
                dataValues.stream()
                        .filter(dataValue -> dataValue.getIndex() == 8)
                        .findFirst()
                        .ifPresent(dataValue -> dataValue.setValue(changeItem(player, item.getItemStack())));
                packet.getDataValueCollectionModifier().write(0, dataValues);```

this works πŸ₯³
#

i'm like 99% sure this isn't the best way but idec anymore

sly topaz
#

I'll give it a try myself later when I finish setting up IJ

dawn flower
#

k

sly topaz
#

if I come up with a better way I'll ping u

dawn flower
#

πŸ‘

burnt current
#

i think i figured it out

#

the reason playernpc sucks balls

#

you're not provided with all the files cuz the rest are proprietary and you get them only from importing a version of the api you cant decompile πŸ’€

#

testing my theory real quick...

#

yep πŸ’€

#

i am now missing NOTHING

#

but 1 import

sullen marlin
#

Yeah

burnt current
#

ok new question

#

why am i missing one import

#

😭

#

import dev.sergiferry.playernpc.command.NPCGlobalCommand;
is the only one missing...

burnt current
#

nvm also missing a bunch of symbols

#

its possible this plugin was originally not built with 1.19.4 spigot even though it works on 1.19.4

short pilot
#

Getting the following bug with my mob targeting with creative mode players, any help ?

short pilot
#

Actually I changed it just now but here it is

#

Removed targeting for creative (I think)

package io.github.derec4.dragonforgekingdoms.entity;

import io.github.derec4.dragonforgekingdoms.kingdom.KingdomManager;
import net.minecraft.world.entity.ai.goal.target.TargetGoal;
import net.minecraft.world.entity.player.Player;

import java.util.UUID;

public class TargetNonFactionPlayersGoal extends TargetGoal {
    private final CustomWitherSkeleton customWitherSkeleton;
    private final UUID kingdomID;
    private final KingdomManager kingdomManager;

    public TargetNonFactionPlayersGoal(CustomWitherSkeleton customWitherSkeleton, UUID kingdomID) {
        super(customWitherSkeleton, false);        System.out.println("TEMPTEMPTEMP" + kingdomID);

        this.customWitherSkeleton = customWitherSkeleton;
        this.kingdomID = kingdomID;
        this.kingdomManager = KingdomManager.getInstance();
    }

    @Override
    public boolean canUse() {
        for (Player player : this.customWitherSkeleton.level().players()) {
            UUID playerKingdomID = kingdomManager.getPlayerKingdom(player.getUUID()).getID();
            // CHANGE LATER TEMP TEMP TEMP
            if (!player.isCreative() && !player.isSpectator() && kingdomID.equals(playerKingdomID)) {
                this.customWitherSkeleton.setTarget(player);
                return true;
            }
        }
        return false;
    }
}

Is there any way to optimize this?

short pilot
#

should i be using the Bukkit Player

slim wigeon
short pilot
slim wigeon
#

?paste I also recommend pasting code there due to the length can take a huge chunk of the chat but that is good that your code is really small

undone axleBOT
sly topaz
#

use the setTarget override which has a TargetReason parameter and use CLOSEST_ENTITY or whatever fits

sly topaz
#

yes

#

it is the one from EntityTargetEvent

short pilot
#

you mean like override the settarget method itself?

#

oh nvm i see it

sly topaz
#

now, why it isn't happy with reason unknown I can't know, somewhere along the line that seems to cause a null somewhere but the stack trace doesn't specify

#

just setting the reason may just fix it

short pilot
#
    @Override
    public boolean canUse() {
        for (Player player : this.customWitherSkeleton.level().players()) {
            UUID playerKingdomID = kingdomManager.getPlayerKingdom(player.getUUID()).getID();
            // CHANGE LATER TEMP TEMP TEMP
            if (!player.isCreative() && !player.isSpectator() && kingdomID.equals(playerKingdomID)) {
                this.customWitherSkeleton.setTarget(player, EntityTargetEvent.TargetReason.CLOSEST_PLAYER, false);
                return true;
            }
        }
        return false;
    }

Like this?

sly topaz
#

sure

#

do you not want it to fire the event tho

short pilot
#

is target selection with

this.customWitherSkeleton.level().players()

Optimal or is there a better way, looks like it'll have to sweep through all possible players or something

#

oh

#

πŸ’€ i thought that meant fire as in minecraft fire

#

ignoring that

#

does the player for each go for every single player, or within the Entity's range

sly topaz
#

the issue might not have been the target reason tbh, but it is good to have it

#

now that I am looking at it, it is just saying null was passed to EntityInsentient#setTarget somewhere down the line, most likely in your target goal

#

can you reliably reproduce that issue?

#

if so, put a log in canUse to check whether customWitherSkeleton is null

#

also, what version is this for?

sly topaz
short pilot
sly topaz
#

well this seems to be the problematic line this.customWitherSkeleton.setTarget(player);

short pilot
#

I'm wondering how to make it target the appropriate player in range, that fits the conditions where the ID matches the ID without having it iterate through all players()

short pilot
sly topaz
#

well now I am more confused than you are about that, but glad it got fixed lol

sly topaz
short pilot
sly topaz
#

if that's the case, you can just look for it in your IDE, it should be indexed (you can look for classes with Ctrl + N in IntelliJ)

#

the Enderman goal is called EndermanLookForPlayerGoal

short pilot
sly topaz
#

well if you used the following guide

#

?nms

short pilot
#

I just added the decompiled as a dependency through buildtools

sly topaz
#

you are

sly topaz
short pilot
#

yeah im pretty sure i have it

#

what do i do now

sly topaz
#

I mean, if you aren't using mojang mappings, then it is just matter of looking for the class

#

I don't know what the class is named in the obfuscated version, so you'll have to go through the inheritance tree to find it

sly topaz
short pilot
sly topaz
#

oh you're using gradle, but you are using the remapper gradle plugin so it should be the case

#

then just hit Ctrl + N in your IDE and look for this class: EndermanLookForPlayerGoal

burnt current
#

does anyone know how i can figure out the "texture id" of a minecraft cape?

#

like

#
            VANILLA("Vanilla", "f9a76537647989f9a0b6d001e320dac591c359e9e61a31f4ce11c88f207f0ad4", 0),
            MINECON_2011("MineCon 2011", "953cac8b779fe41383e675ee2b86071a71658f2180f56fbce8aa315ea70e2ed6", 1),
            MINECON_2012("MineCon 2012", "a2e8d97ec79100e90a75d369d1b3ba81273c4f82bc1b737e934eed4a854be1b6", 1),
            MINECON_2013("MineCon 2013", "153b1a0dfcbae953cdeb6f2c2bf6bf79943239b1372780da44bcbb29273131da", 1),
            MINECON_2015("MineCon 2015", "b0cc08840700447322d953a02b965f1d65a13a603bf64b17c803c21446fe1635", 1),
            MINECON_2016("MineCon 2016", "e7dfea16dc83c97df01a12fabbd1216359c0cd0ea42f9999b6e97c584963e980", 1),
#

this kind of texture id

#

im missing a bunch of ids for the newer capes

sullen marlin
#

They're probably listed on a wiki somewhere

#

At the very least you'd need to find a player who has the cape you want

slim wigeon
#

@sullen marlin Can we talk privately? I need help with something not related to this

#

md_5

burnt current
#

no results with texture id πŸ˜”

#

and i know for sure i will not be able to find players with some of these capes

#

maybe it's in the minecraft files...

short pilot
#

I see a lot of context related to maven a lot more than gradle

#

or kotlin whatever

#

i get confused by all the different compilre types now

sly topaz
#

whatever you're more comfortable with really

sly topaz
burnt current
#

but the texture ids?

#

the ids in the urls are too short to be the full texture ids

#

oh nvm

#

u were responding to the other message

#

no but like

#

wouldn't i have to get in-game with that player in order to get my minecraft client to load their cape?

#

that could maybe let me see what the texture id is, if its downloaded somewhere

sly topaz
#

I mean, if you just want the texture id, you can just hit the mojang API for it

burnt current
#

but i dont think its happening for this many capes

burnt current
sly topaz
#

look for a profile that has the cape in skinmc first, then get their UUID, and then hit the endpoint that sends the texture information

#

all the endpoints should be in the minecraft wiki

burnt current
#

ok, how do i "hit it"? command line type stuff?

sly topaz
#

just type it in the address bar of your browser

burnt current
#

oh 😭

burnt current
#

seems to be encoded...?

sullen marlin
#
ewogICJ0aW1lc3RhbXAiIDogMTc0MjYyMjQ5NjU1OCwKICAicHJvZmlsZUlkIiA6ICI3OGRmNmMyZTBhZjc0OTQzOWI4NjYxNjRiMmFmZmNiZCIsCiAgInByb2ZpbGVOYW1lIiA6ICJMYXhXYXJyaW9yMSIsCiAgInRleHR1cmVzIiA6IHsKICAgICJTS0lOIiA6IHsKICAgICAgInVybCIgOiAiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS9kNWM0ZWU1Y2UyMGFlZDllMzNlODY2YzY2Y2FhMzcxNzg2MDYyMzRiMzcyMTA4NGJmMDFkMTMzMjBmYjJlYjNmIiwKICAgICAgIm1ldGFkYXRhIiA6IHsKICAgICAgICAibW9kZWwiIDogInNsaW0iCiAgICAgIH0KICAgIH0sCiAgICAiQ0FQRSIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTUzY2FjOGI3NzlmZTQxMzgzZTY3NWVlMmI4NjA3MWE3MTY1OGYyMTgwZjU2ZmJjZThhYTMxNWVhNzBlMmVkNiIKICAgIH0KICB9Cn0
{
  "timestamp" : 1742622496558,
  "profileId" : "78df6c2e0af749439b866164b2affcbd",
  "profileName" : "LaxWarrior1",
  "textures" : {
    "SKIN" : {
      "url" : "http://textures.minecraft.net/texture/d5c4ee5ce20aed9e33e866c66caa37178606234b3721084bf01d13320fb2eb3f",
      "metadata" : {
        "model" : "slim"
      }
    },
    "CAPE" : {
      "url" : "http://textures.minecraft.net/texture/953cac8b779fe41383e675ee2b86071a71658f2180f56fbce8aa315ea70e2ed6"
    }
  }
}```
sly topaz
#

it is just base64 yeah

burnt current
#

ah ok, i just need a base 64 converter?

sly topaz
#

yep, you can just use an online one

sullen marlin
#

yep and then you can see the cape ID there in that url

burnt current
#

ok nice πŸ‘

sly topaz
#

too bad SkinMC doesn't have an API, could've made it into a single nice script

sullen marlin
#

that has some IDs

#

not even sure if those are all real

#

but if they are its the most comprehensive list I can find

dark arrow
#

it is not able to detect snare instrument for noteblock why

sullen marlin
#

detect how

dark arrow
#

i asked it to set block to note block it worked for bass but giving error snare

sullen marlin
#

whats the error

dark arrow
#

java.lang.IllegalArgumentException: No enum constant org.bukkit.Instrument.SNARE

sullen marlin
#

its SNARE_DRUM not SNARE

dark arrow
#

is harp changed to piano?

#

cuz in the dock it does not say the minecraft name

sullen marlin
#

Idk check the link above

#

There's a piano to me

dark arrow
jagged thicket
#

Ok, why is Connection.java absent here

sly topaz
#

how does one get javadocs and sources jar when using mojmap spigot

#

I ran BuildTools with --generate-source and --generate-docs but didn't seem to do anything (as in, the spigot-api dependency in my local maven repository has no sources or javadoc jar in it)

sly topaz
# jagged thicket

I ran those flags (well, more specifically, the ones I mentioned in my comment, those tooltips are wrong), yet I didn't get a javadoc jar

#

actually, I may have gotten one, but it is with the extension .lastUpdated so my IDE can't see it

sly topaz
#

unrelated but don't use reload

#

if you want to do fast prototyping, setup hotreloading properly

slim wigeon
#

No, hoppers not acting properly

sullen marlin
sly topaz
#

anyhow, what is the issue supposed to be, all I see is a hopper transfering some items

sly topaz
slim wigeon
#

From ChatGPTI put 2 stacks of seeds. One stack goes to the bottom chest while the another stack goes in the top chest. How can I fix this?

slim wigeon
sly topaz
#

I mean, are you doing something in a plugin for that to happen?

sullen marlin
#

I would be pretty surprised if that was actually an issue

slim wigeon
sly topaz
#

wait is that the expected behavior? I don't remember how hoppers work anymore lol

slim wigeon
jagged thicket
sullen marlin
#

why is it supposed to fill the bottom one first? the hopper connection is pointing into the top chest?

#

low key confused, but if you think there is a bug, isolate it then open a bug report

slim wigeon
#

Its pointing to the chest, yes. But try to start a creative world with no plugins and copy the same setup and you see what I talking about

sly topaz
#

so what you're saying is that it doesn't follow vanilla logic, if that's the case then you should definitely open an issue in the JIRA about it

#

however it'd be nice if you could get a video in a singleplayer world confirming it

slim wigeon
sullen marlin
#

your hoppers as in ones impacted by the plugin?

#

it might be because your cancelling the event, causing the hoppers to try and route via a different path

slim wigeon
#

I cancelled the event because the inventories are readonly

jagged thicket
sly topaz
#

no they're showing how it works with normal hoppers

jagged thicket
#

Ohh

sly topaz
#

if what md said is true, then that means another inventory move event is being called and that makes your code run again for the wrong chest

#

what I would do is either not cancel the event so it doesn't try to re-route, or if you do need to cancel then make sure to tag the hopper in some way to know where it should be transferring

#

I don't understand how cancelling it makes it go for another chest tho, could be considered a bug

slim wigeon
#

I tried doing it without cancelling but if I want to transfer 8 items as shown and invs are readonly, I got to cancel it followed by a timer

#

If you know what I can do with the invs without canceling, please tell me

sly topaz
slim wigeon
#

I can set it, you correct but that is only for the item being transferred, I tried

sly topaz
#

yes, then remove the equivalent in the other inventory

#

setting the item apparently makes the original item to not be moved akin to cancelling it so it'd theorically be the same

slim wigeon
#

Remember what I said, the invs are readonly

sly topaz
#

I mean, you seem to be removing the items just fine in your code, so not sure what that means

#

the only difference here is that instead of cancelling, you'd just be setting the item

slim wigeon
#

Because I have a task/timer. That is why the cancel is required. It locks the invs until the event is complete. So if I add a STICK for a example to sourInv, it will not show up

sly topaz
#

well, I don't quite understand what you mean by that honestly

#

but anyhow, another idea is to tag the hopper when you cancel the inventory move, then cancel the inventory search event if the inventory holder is the tagged hopper

#

that way, it won't try to re-route the items

jagged thicket
sly topaz
#

or if the inventory search event triggers for every item transferred, you could just move your logic there even

jagged thicket
#

its just called networkmanager in spigot

sly topaz
slim wigeon
sullen marlin
#

Typical ChatGPT L

slim wigeon
sly topaz
#

if I am to be charitable, it is probably referencing to what happens in the InventoryClickEvent as it happens within a modification of an item, however I don't believe that is the case for the InventoryMoveItemEvent as it happens before the modification itself

#

then again, it's chatgpt so it may just be spewing bs

slim wigeon
#

Well, I don't know. I just annoyed by #general so I trying to make something useful. Put my energy somewhere useful then evil

sly topaz
#

the thing is that you actually got to test the behavior and see it for yourself rather than trust whatever it says is correct

slim wigeon
#

I have tested it and it was readonly

sly topaz
#

well, show us what your test code was

slim wigeon
#

I don't have the code currently because I edited the code. But that is what I saw. I just have the code in the timer now

sly topaz
#

well, try it again then

#
@EventHandler
public void onHopperTransfer(InventoryMoveItemEvent event) {
  var item = event.getItem();
  item.setAmount(8);
  event.setItem(item); // not sure whether this is necessary, the event claims it is mutable
  event.getDestination().removeItem(item);
}
#

this should technically do what you are trying to do, all your special hopper logic aside

#

if that works, then just add your special hopper checking logic on top

slim wigeon
#

I will test that in a min, let me start this convertsion

#

That works but items are disappearing

sly topaz
slim wigeon
#

Yes

sly topaz
#

if that's the case, try commenting out the last line, it might just be the case that the transfer is happening successfully despite what the javadocs say

slim wigeon
#

Now items is adding uncontrollablely

sly topaz
#

well that's annoying

slim wigeon
#

True

sly topaz
#

oh wait I am dumb

#

you should've removed from the source inventory, not the destination lol

slim wigeon
#

That is what I did but its still the same

sly topaz
#

hm, no idea then

slim wigeon
#

So ChatGPT was false, I always trusted that but it must not be up to date with the docs. I will know this next time, that is why I ask here most of the time. I closer to what I trying to do

#

Just added the amount from the timer and its working as expected, thanks

coral sparrow
#

Guys i am trying to make plugin when the player i gave ability like flight could click like key G and he could fly up and down by looking

maiden wasp
#

can somebody help me with me plugin

pliant topaz
glad matrix
#

how do i downlod a plugin from Eclipse ?

eternal oxide
#

it clicked while I was asleep last night

#

<packaging>jar</packaging>

glad matrix
#

I already did it, thanks anyway

eternal oxide
#

ok

glad matrix
#

nvm

#

i didnt

#

[11:16:15 ERROR]: Could not load 'plugins/seedworld-0.0.1-SNAPSHOT.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Cannot find main class `com.example.seedworld'
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:70) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:137) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:397) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:305) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.craftbukkit.v1_16_R1.CraftServer.loadPlugins(CraftServer.java:388) ~[patched_1.16.1.jar:git-Paper-138]
at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:208) ~[patched_1.16.1.jar:git-Paper-138]
at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:941) ~[patched_1.16.1.jar:git-Paper-138]
at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Paper-138]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_432]
Caused by: java.lang.ClassNotFoundException: com.example.seedworld
at java.net.URLClassLoader.findClass(URLClassLoader.java:387) ~[?:1.8.0_432]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:171) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:100) ~[patched_1.16.1.jar:git-Paper-138]
at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_432]
at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_432]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_432]
at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_432]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:68) ~[patched_1.16.1.jar:git-Paper-138]

#

... 8 more

blazing ocean
#

well, your main class does not exist

eternal oxide
#

your plugin.yml is missing the main: com.dragonboy.seedworld.SeedWorld

#

you originally had it at com.example but I had you change it when you made a new plugin

#

it might be com.dragonboy.seedworld.SeedWorldPlugin. I forget the name of your main class

robust nymph
#

When i try to join with IP Bungeecord proxy works, But when i try to join using Domain i get this error, IP and port is fine in cloudflare. Where's the issue?

eternal oxide
#

seems you did not setup your bungee properly

#

there is a section at tehbottom of the bungee page about setup/securing your installation

#

?bungee

robust nymph
#

I did, It's working with normal IP

eternal oxide
#

did you enable ip forwarding

glad matrix
robust nymph
wet breach
#

have to use forced hosts if using domains

#

you didn't set it up properly the documentation goes over everything

eternal oxide
#

?bungeecord

#

I know there is a link

blazing ocean
#

?bungee

#

hm

#

?cc search bungee

wet breach
#

!bungeecord

#

idk it either

blazing ocean
#

nope none

eternal oxide
jagged thicket
#

jus do ?cc list

glad matrix
#

[11:32:07 ERROR]: Could not load 'plugins/seedworld-0.0.1-SNAPSHOT.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Cannot find main class `com.dragonboy.seedworld.SeedWorld'
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:70) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:137) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:397) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:305) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.craftbukkit.v1_16_R1.CraftServer.loadPlugins(CraftServer.java:388) ~[patched_1.16.1.jar:git-Paper-138]
at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:208) ~[patched_1.16.1.jar:git-Paper-138]
at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:941) ~[patched_1.16.1.jar:git-Paper-138]
at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Paper-138]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_432]

#

Caused by: java.lang.ClassNotFoundException: com.dragonboy.seedworld.SeedWorld
at java.net.URLClassLoader.findClass(URLClassLoader.java:387) ~[?:1.8.0_432]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:171) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:100) ~[patched_1.16.1.jar:git-Paper-138]
at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_432]
at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_432]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_432]
at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_432]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:68) ~[patched_1.16.1.jar:git-Paper-138]
... 8 more

wet breach
#

?cc list

robust nymph
#
listeners:
- bind_local_address: true
  force_default_server: true
  forced_hosts:
    pvp.md-5.net: pvp
  host: 0.0.0.0:25570
  max_players: 2025
  motd: '&1Another Bungee server'
  ping_passthrough: false
  priorities:
  - authlobby
  - lobby
  proxy_protocol: false
  query_enabled: false
  query_port: 25570
  tab_list: GLOBAL_PING
  tab_size: 60
reject_transfers: false
network_compression_threshold: 256
permissions:
  admin:
  - bungeecord.command.alert
  - bungeecord.command.end
  - bungeecord.command.ip
  - bungeecord.command.reload
  - bungeecord.command.kick
  - bungeecord.command.send
  - bungeecord.command.find
  - bungeecord.command.server
  - bungeecord.command.list
  default:
  - bungeecord.command.list
prevent_proxy_connections: false
server_connect_timeout: 5000```
#

Is that part is ok?

jagged thicket
#

see there

eternal oxide
#

look and see what the actual name of your main class is

#

the path to main: is the package plus the name of your main class.

#

case sensitive

robust nymph
jagged thicket
#

this is so useful lol

#

?mappings

undone axleBOT
glad matrix
#

finaly [11:38:36 INFO]: Plugins (2): LuckPerms, SeedWorldPlugin

eternal oxide
#

nice

glad matrix
eternal oxide
#

its a learing curve. it gets easier the more you do it

wet breach
#

the first part is the domain you want to setup, the value points to the name of the server you want it to be for that is in the config

#

as we can see, you have not set that up properly thus it not working for domains

robust nymph
#

My domain name is goldenhorizon.fun and i want to go in lobby server

wet breach
#

the wiki for bungeecord goes over this

robust nymph
#

what will be the config?

wet breach
#

the wiki goes over this

#

I am sure you are capable of reading

robust nymph
#

Couldn't fix it, Can you just fix that one line making issue please? Finding solution for a long time πŸ™πŸ»

#

Small help please πŸ™πŸ»

#

Pls? @wet breach

smoky anchor
#

The server has no concept of keybinds.
You can not check if a player pressed some key, that information is never sent to the server.
Inputs are, as in "player pressed jump button" or "player pressed walk forward button".

young knoll
#

Forward, backward, left, right, swap hands, jump, sneak, left click, right click

#

I think that’s all of them

jagged thicket
#

isnt there any way to check action performed?

#

by a key press

smoky anchor
#

Correct