#help-development

1 messages · Page 1223 of 1

rough ibex
#

yeah

#

you said Mojang's is different

molten hearth
#

yeah but python seems to have the same one anwyay

#

I had like python # new sha1 dummy test dummy_sha1 = hashlib.sha1() dummy_sha1.update(b"Notch") dummy_hash = dummy_sha1.hexdigest() print(f"Dummy Hash: {dummy_hash}") and it returned 4ed1f46bbe04bc756bcb17c0c7ce3e4632f06a48 which is the same one here

#

so i guessed that aint a problem

#

ah wait i think my verify token is bullshit

#

It then encrypts the shared secret and verify token with the server's public key (PKCS#1 v1.5 padded), and sends both to the server in an Encryption Response packet. Both byte arrays in the Encryption Response packet will be 128 bytes long because of the padding. This is the only time the client uses the server's public key.

#

yeah ngl i dont think i encrypted shit

#

💀

rough ibex
#

yeah...

#

# sha1 := Sha1() nice comment????

#

I don't mean to be reductive but... y-yeah?

molten hearth
#

I was copy and pasting the comments from wiki.vg to follow them lmao

rough ibex
#
// if(x) { y; }
if (x) { y; }```
molten hearth
#

it wasnt very enlightening instructions

rough ibex
#

lol

molten hearth
#

do you have any idea how i could verify that the public key isnt total bogus

#

i guess this website would tell me

rough ibex
#

yeah

molten hearth
#

damn

#

python collapses when trying to load that same public key

#

thats a shame 💀

rough ibex
#

you should really type hint

#

even in early dev stages

molten hearth
#

i didnt even know python had type hints

wet breach
#

are you certain there was no response?

#

typically when you do network related stuff you would have a network sniffer/capture client running

molten hearth
#

but its fine i think i figured out why

#

i actually gotta encrypt this data somehow

wet breach
#

what about the response to the server?

echo basalt
#

woeisme worldedit api doodoo

wet breach
#

there is a 3 way communication that happens when a client attempts to join a server

molten hearth
#

i mean the client was me sending my non encrypted data

#

that should be encrypted

#

i just sent back the same stuff the server sent to me lmao

#

i was wondering how useful that truly was

past wagon
#

Hello, I have a fairly technical question. Is it possible to retrieve the source of a message sent by a plugin? I already tried with ProtocolLib regarding the packages, but the source still remains unknown

manic delta
#

what u mean

#

when u execute a command, get the return of that command?

past wagon
#

More precisely who sends the message in relation to the plugins. For example :

  • The player connects, he receives the welcome message from Essentials

  • The plugin manages to find that it was Essentials who sent the message

#

In fact the problem is that when the message is sent by the plugin, it is sent by the server and I cannot retrieve the source

manic delta
#

mmm

young knoll
#

I think your only option would be walking the stack trace to find the original source of it

#

But due to how packets are sent that might not work

past wagon
#

Already done, and it doesn't work x)

chrome beacon
#

There's probably some real hacky stuff you can do with reflection

#

Such as injecting a wrapper in to the pipeline where the message is sent

#

So you can capture it there

wet breach
#

you could start with peeking at the listener registration

#

and see which plugins are listening for player joins

#

but you will eventually have to resort to reflection though

past wagon
wet breach
#

well, you would have to use reflection to scan the methods. The registration would just help you figure out which plugins might be doing something

#

won't necessarily tell you that it sends out a message

#

that is where reflection comes in

past wagon
#

Sound a great idea ! I will try it

past wagon
#

Work 🙂

wet breach
bold venture
#

Hi yall I am not to sure what I am allowed to say in here but mods please let me write this i need help lol

mortal vortex
bold venture
wet breach
#

otherwise you would know that advertising services doesn't belong here

bold venture
#

I cant really open any links right now which is why I said that

mortal vortex
wet breach
bold venture
#

I appologize for that I just need some help with it and cant really open any links

wet breach
#

you can't open links but can have discord open?

#

right, don't think you are fooling anyone here since this is the spigot discord you know o.O

#

also, probably won't get anyone to agree to your terms with your ad if you are not going to pay someone lmao

bold venture
#

I am I just tried to send the message but it wouldent let me use the word pay

#

It kept saying blocked word

#

I obviosly am paying I am not an idiot

bold venture
bold venture
wet breach
#

therefore you can open links

bold venture
#

If I am on the app and I dont have permisions set to open exeternal links then therefore I can not open links

#

I am not tryin to fight just trying to explain my prespective

wet breach
#

you can still copy them and open them, you can also give temporary perms as well

#

I don't care for your perspective

#

as I said earlier it is just excuses or rather, just being to lazy to actually go read them

#

so you figured you would play innocent and just post it anyways, fortunately the mods/staff are not always super strict so the odds of someone getting banned from the first instance is not likely but still possible

bold venture
bold venture
wet breach
#

not sure what you mean by that, it is up to the mods/staff who is or is not allowed to break the rules 🙂

#

I guess you could always take a gamble with that

bold venture
wet breach
#

I am very good at just simply not caring

#

as far as I am concerned you are some random person on the internet

bold venture
#

Again I never said ignorance to the rules is an excuse you made that up and put words in to my mouth saying that I thought I would just play dumb etc like dude just chill out and maybe try to help people instead of just telling them that they are brainless pieces of sht

wet breach
#

or really at all

bold venture
#

You imply it though

wet breach
#

sure what is your point?

#

that I am terrible ?

#

I probably should have clarified the caring part, not only do I not really care for people on the internet but I don't really care what their opinions are either

bold venture
#

No just that you could give people a chance

wet breach
#

a chance for what?

bold venture
#

A chance to explain themselves or just hold a friendly conversation before you become agressive

wet breach
#

I am not aggressive, I am just very direct and to the point

#

all I did was call you out on not reading the rules when you have the ability to do so. You were the one that got defensive about it and I simply didn't care for the excuses 😉

#

good news though I am not a moderator or staff member here so nothing I can do about it 🙂

nova notch
#

shouldnt this be dual not duel

bold venture
wet breach
wet breach
bold venture
bold venture
wet breach
#

o.O

nova notch
#

yall it is not that deep just move on

wet breach
#

yeah, this person took too much offense

nova notch
#

ngl ur just being a dick

wet breach
#

indeed

bold venture
#

Then just dont be? idc at this point enjoy your night

wet breach
#

have fun 🙂

bold venture
nova notch
#

no

wet breach
#

?services

undone axleBOT
bold venture
#

Fair

wet breach
#

I would also refrain from attempting to DM people as well. Only because if people complain to the staff about it here, they may very well remove you from the server

#

it does count as a form of spam/advertising thing

bold venture
#

Well ok I don't see the practical implications of that but ok I guess

wet breach
#

I don't know you nor what you intend to do, some have resorted to DM'ing people here and I have seen the result of that and that is getting banned

#

usually

bold venture
#

Well I will only dm people that let me or say they want to help

mortal vortex
#

Fuck up already

wet breach
bold venture
#

I aint just gonna go up and down the server list, thanks

#

Is they refering to me?

wet breach
#

couldn't say

#

as I don't know

#

unless their message is missing two words

#

then it would make sense

#

but I surmise then their message wouldn't have been sent as it would have been caught by the filters

bold venture
#

Should have said Shut the

mortal vortex
wet breach
#

well just fyi but to non-australians your message meant something else entirely

mortal vortex
wet breach
#

figured as much but still without those two words or at least the one, message means something else XD

mortal vortex
#

u have a perverse mind

covert gulch
#

I want to disable [Render thread/WARN] and [Worker-Main-7/WARN] from logs. It'll be better for me to read and send those logs without that spam. I cannot even find any topic about it.

sullen marlin
#

uh Render thread sounds like a client log to me

#

what warnings specifically are you seeing

#

you shouldnt be seeing any lol

jovial mason
#

I have a shop plugin and i want users to only make shops with chests they placed themselfs, how much will it lag if i log every chest on blockplace/blockbreak?

#

since griefers just claims other chets so they are unaccessable for others

pseudo hazel
#

just add an owner tag to a chest in the pdc when they get placed

#

should be pretty lightweight

jovial mason
#

sorry but what is a pdc? i need to google that i am new

pseudo hazel
#

?pdc

jovial mason
#

thanks

formal plaza
#

hiya, hopefully appropriate to this channel, I'm currently having a tiny issue with bungeecord forwarding (idk if it's also appropriate to use a boolean for that), pasted my methods below

from sender

        ByteArrayOutputStream b = new ByteArrayOutputStream();
        DataOutputStream out = new DataOutputStream(b);

        try {
            out.writeUTF("Forward");
            out.writeUTF("lobby");
            out.writeUTF("GameStatus");

            ByteArrayOutputStream msgBytes = new ByteArrayOutputStream();
            DataOutputStream msgOut = new DataOutputStream(msgBytes);

            msgOut.writeUTF("dodgeball");
            msgOut.writeBoolean(ingame);

            byte[] finalMsg = msgBytes.toByteArray();
            out.writeShort(finalMsg.length);
            out.write(finalMsg);

            Bukkit.getLogger().info("[Dodgeball] Sent GameStatus " + (ingame ? "INGAME" : "LOBBY"));

        } catch (Exception e) {
            e.printStackTrace();
        }

        Player sender = Bukkit.getOnlinePlayers().stream().findFirst().orElse(null);
        if (sender != null) {
            sender.sendPluginMessage(Dodgeball.getInstance(), "BungeeCord", b.toByteArray());
        }
    }

receiver:

    public void onPluginMessageReceived(String channel, Player player, byte[] message) {
        if (!channel.equals("BungeeCord")) return;

        try {
            DataInputStream in = new DataInputStream(new ByteArrayInputStream(message));
            String subChannel = in.readUTF();

            Bukkit.getLogger().info("[Lobby] Received plugin message: " + subChannel);

            if (subChannel.equals("PlayerCount")) {
                String server = in.readUTF();
                int playerCount = in.readInt();
                plugin.getLobbyScoreboard().updateTotalPlayers(playerCount);
                CompassGUI.updatePlayerCount(server, playerCount);
                CompassGUI.updateDodgeballLore();
                return;
            }

            if (subChannel.equals("Forward")) {
                String forwardedSubChannel = in.readUTF();
                short messageLength = in.readShort();
                byte[] forwardedMessage = new byte[messageLength];
                in.readFully(forwardedMessage);

                if (forwardedSubChannel.equals("GameStatus")) {
                    DataInputStream forwardedIn = new DataInputStream(new ByteArrayInputStream(forwardedMessage));
                    String gameName = forwardedIn.readUTF();
                    boolean inGame = forwardedIn.readBoolean();

                    CompassGUI.updateGameStatus(gameName, inGame);
                    Bukkit.getLogger().info("[Lobby] GameStatus " + gameName + ": " + (inGame ? "INGAME" : "LOBBY"));
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Bukkit.getLogger().warning("[Lobby] Error while handling plugin message!");
        }
    }

The message pretty much is being correctly sent, however the receiver only intercepts the message but doesn't seem to detect it's GameStatus

slate surge
sullen marlin
#

no

glossy laurel
#

how can I check if a ray from point A to point B has a point that falls inside a bounding box

glossy laurel
azure zealot
#

mixed

#

i am unsure grab a Collection of formulas
or ask chatgpt

jovial mason
#

Why is this method not existing for shulker chests?
if (block.getBlockData() instanceof org.bukkit.block.data.type.Chest) {
facing = ((org.bukkit.block.data.type.Chest) block.getBlockData()).getFacing();

eternal oxide
#

its not a chest

jovial mason
#

is there an alternative?

#

it works for barrels too

#

but i guess shulker boxes dont have that

azure zealot
#

Isnt there a shulkerbox interface

unreal willow
#

Excuse me

#

I have a config.yml file on my PHP website, when users access this file via url it automatically downloads, is there a way to prevent them from manually accessing it? I tried designing the .htaccess file,

#

But it doesn't work

#

Can someone help me?, thanks

jovial mason
#

Like i was thinking to do something like this alternative

 if (block.getType() == Material.SHULKER_BOX || block.getType().toString().endsWith("_SHULKER_BOX")) {
            textDisplay.setBillboard(Display.Billboard.CENTER.FIXED);
            textDisplay.setRotation(player.getLocation().getYaw() + 180f, 0);
#

but how can i make it always looking into 1 direction? like north, east etc not something between that

rotund ravine
#

Why the or

#

Ah i see

jovial mason
#

coloured are different

#

if u mean that

rotund ravine
#

Just remove the _

jovial mason
#

Huh?

rotund ravine
#

and only do the one comparison or use tags

jovial mason
#

the code is working

#

but it should get rounded to north or south for example you know what i mean? not something between both

smoky anchor
#

Why not use tags or instanceof shulkerbox

jovial mason
#

shulkerbox doesnt exist

smoky anchor
rotund ravine
smoky anchor
#

I would really advise against block.getType().toString().endsWith("_SHULKER_BOX")

jovial mason
#

oh i did org.bukkit.block.data.type.SHULKERBOX

rotund ravine
#

We just nitpicking at it

#

Since there is better ways for that part

smoky anchor
# jovial mason

It's facing up, not to a side, what do you expect it to do here.

jovial mason
#

fixed it now

#

yeah i know i want to calculate where the player is looking and place the textdisplay in the direction where the player is looking at

smoky anchor
#

Aah got it

jovial mason
#

yesss

#

my english sucks so idk#

#

it should look at north,west,south,east not somewhere between

smoky anchor
#

I feel like there was a method specifically for that somewhere

jovial mason
#

i am new as hell to java so idk where to look things up etc

formal plaza
jovial mason
#

i used that already for the chests but for shulkerboxes it doesnt work

#
        if (block.getBlockData() instanceof ShulkerBox) {
            textDisplay.setBillboard(Display.Billboard.CENTER.FIXED);
            textDisplay.setRotation(player.getLocation().getYaw() + 180f, 0);
        } else {
            // Überprüfen, ob der Block ein Chest ist
            BlockFace facing = BlockFace.NORTH; // Defaultwert, falls kein gültiger Blocktyp gefunden wird

            if (block.getBlockData() instanceof org.bukkit.block.data.type.Chest) {
                facing = ((org.bukkit.block.data.type.Chest) block.getBlockData()).getFacing();
            }
            // Überprüfen, ob der Block ein Barrel ist
            else if (block.getBlockData() instanceof org.bukkit.block.data.type.Barrel) {
                facing = ((org.bukkit.block.data.type.Barrel) block.getBlockData()).getFacing();
            }
smoky anchor
#

no, the one I sent is for entity
Get that facing from player, and use that in rotation.
It will be "rounded"

jovial mason
#

lemme try

smoky anchor
#

Hmm, why do you have the full qualifier org.bukkit.block.data.type.Chest

#

or whatever its called

#

Oh, barrels will have the same problem if they're placed facing up

jovial mason
#

i am complety cooked then

#

xD

#

i see it rn

smoky anchor
#

I mean, you have two things you have to do:
If the block is placed in some cardinal direction, use the blocks facing value
If not, use the players facing value to spawn your displays
Sounds fairly easy

jovial mason
#

I did that now

if (block.getBlockData() instanceof ShulkerBox) {
            textDisplay.setBillboard(Display.Billboard.CENTER.FIXED);
            float rotation = 0;

            switch (player.getFacing()) {
                case NORTH:
                    rotation = 0;
                    break;
                case EAST:
                    rotation = 90;
                    break;
                case SOUTH:
                    rotation = 180;
                    break;
                case WEST:
                    rotation = 270;
                    break;
                default:
                    break;
            }
            textDisplay.setRotation(rotation, 0);
#

but it rotates wrong idk

smoky anchor
#

This one might be correct, idk

jovial mason
#

i think its not even executing this part of code

#

it always put it at north

smoky anchor
#

Oh, look up enhanced switch, much nicer way of writing switches

smoky anchor
jovial mason
#

yeah i just did nothing happened

#

thats why i said it XD

smoky anchor
#

Gosh why is spigot so confusing (I know why but ree)
You're testing if block.getBlockData() is org.bukkit.block.ShulkerBox
I'm not sure if that's right

young knoll
#

Display.Billboard.CENTER.FIXED

#

That is certainly some code of all time

jovial mason
#

??

smoky anchor
#

Clearly needs to be Display.Billboard.FIXED.FIXED.FIXED.FIXED.FIXED to ensure it's properly fixed for real yes I'm sure I want it fixed yes

jovial mason
#

xd

smoky anchor
#

You don't need the CENTER.

jovial mason
#

ah ok but i am pretty sure that wont fix it

#

XD

smoky anchor
#

well no, again that's just nitpics

young knoll
#

It should be something in the org.bukkit.block.data package iirc

jovial mason
#

its not detecting the shulker box anymore

#

i try to do it the other way again

smoky anchor
#

no, try block.getState() instanceof ShulkerBox

jovial mason
#

nice try diddy

#

works now

#

xD

smoky anchor
jovial mason
#

epic gamer

#

now i will just copy paste the same bs for barrels

smoky anchor
#

can't you do or ?

young knoll
#

Yeah || should work

jovial mason
#

i like my code messy bruh

smoky anchor
#

Don't learn bad habits smh

jovial mason
#

wanna have a heart attack

#

everything is in one class

smoky anchor
#

get out

jovial mason
#

look at that i can scroll for half a hour

smoky anchor
#

Oh your whole plugin is not in one class tho, so that's not that bad.

jovial mason
#

onEnable is seperate

#

thats it XD

#

and my main is called test lol

smoky anchor
#

Related, there's a guy who wrote a C++ game in one file and published it on Steam.

young knoll
#

Games don’t have to have good code to be popular

smoky anchor
young knoll
#

I believe undertale has a giant switch block for text

#

Terraria also has some wacky code

jovial mason
#
                if (!block.getType().equals(Material.CHEST) && !block.getType().equals(Material.BARREL) && !block.getType().equals(Material.SHULKER_BOX) || !config.contains(path)) {

i am curious why is it only detected non coloured shulker boxes

young knoll
#

Because each one is a different material

#

Use Tag.SHULKER_BOX iirc

jovial mason
#

lemme try it

young knoll
#

Specifically Tag.SHULKER_BOX.isTagged

jovial mason
#

it expects an arg?

young knoll
#

The item to check?

eternal oxide
#

Material of item

eternal oxide
#

No one listens to you

rotund ravine
slender elbow
#

kinky

#

idk if elgar is up for that tho

#

might surprise me

eternal oxide
#

My wifes name is Jan so I'm hoping...

slender elbow
#

ayo

glossy laurel
#

How can I detect when a sound stops playing? I want to make my own music play in the background but im not really sure how to make them player one after another

smoky anchor
#

You can not "detect when a sound stops playing"

#

Could probably use uhh.. cooldown system thing

glossy laurel
river oracle
# glossy laurel how do I get the length of the sound then

Step 1. Pray the client doesn't have a resource pack that changes sounds
Step 2. Download all sound assets from mojangs asset list
Step 3. Download and Parse all ogg files at startup to ensure you're up to date with the latest sounds.
Step 4. Once you play a sound reference your parsed Metadata and set a task delay for the amount of time returned.
Step 5. Cry the server doesn't actually know anything about sounds this is the best you get
Step 6. Ignore rad using your own sounds doesn't fix this as client resource packs can still override them

blazing ocean
#

Which is why you should just use your own sounds

river oracle
jovial mason
#

i didnt read 100% now but u can just force the client to download a custom sound file and delay what u want to do

#

so its always after sound end

#

Also isnt (block.getState() instanceof ShulkerBox) every shulker box? colorized shulkers dont get recognized again i am so confused

jovial mason
#

yee

#

its the only way thats why

glossy laurel
jovial mason
#

yes

blazing ocean
#

It's not the only way

blazing ocean
slender elbow
river oracle
#

either your code is wrong or you found a bug

jovial mason
#

Wait i show u the code rq

#

its messy but idc

river oracle
#

good idc either as long as I see the code

jovial mason
#
 private void updateItemDisplay(Block block, ItemDisplay itemDisplay) {
        // Überprüfen, ob der Block eine Chest, Barrel oder ShulkerBox ist
        if (!(block.getState() instanceof Chest || block.getState() instanceof Barrel || block.getState() instanceof ShulkerBox)) {
            return;
        }
if (block.getState() instanceof ShulkerBox) {
            ShulkerBox shulkerBox = (ShulkerBox) block.getState();
            ItemStack[] inventory = shulkerBox.getInventory().getContents();
            List<ItemStack> nonNullItems = new ArrayList<>();

            String path = "shops." + block.getWorld().getName() + "," + block.getX() + "," + block.getY() + "," + block.getZ();
            String waehrung = config.getString(path + ".currency");

            if (waehrung == null) {
                return;
            }

            Material waehrungsMaterial = WAEHRUNG_MAP.get(waehrung.toUpperCase());

            for (ItemStack item : inventory) {
                if (item != null && item.getType() != waehrungsMaterial) {
                    nonNullItems.add(item);
                }
            }

            if (!nonNullItems.isEmpty()) {
                Random random = new Random();
                ItemStack randomItem = nonNullItems.get(random.nextInt(nonNullItems.size()));
                itemDisplay.setItemStack(randomItem);
            } else {
                itemDisplay.setItemStack(new ItemStack(Material.BARRIER));
            }
        }
    }

#

it always shows the barrier

#

no item from the inventory

#

works with normal shulker tho

river oracle
#

I mean if you really want to see if its a spigot bug simplify the problem and see if I look at a shulkerbox no matter the color is it always a shulkerbox?

#

if its the case that colored shulker boxes truly have no BlockState that'd be something you'd report on JIRA

#

me thinks its much more likely something else is going on though

jovial mason
#

wait u are right

slender elbow
#

of course he is

jovial mason
#
  new BukkitRunnable() {
            @Override
            public void run() {
                if (!block.getType().equals(Material.CHEST) && !block.getType().equals(Material.BARREL) && !block.getType().equals(Tag.SHULKER_BOXES) || !config.contains(path)) {
                    cancel();
                    return;
                }
#

the runnable is wrong i guess

slender elbow
#

Miles InventoryView Y2K_ is never wrong

#

except those two times

jovial mason
#

coloured shulkers have a different material tag than normal shuklers

#

is there a way to write em without listening every single one

sly fiber
#

Does anyone know about CommandNPC

slender elbow
#

there's probably a Tag.SHULKER or something

jovial mason
#

idk how to use tags tho

#

XD

slender elbow
#

Tag.SHULKERS.isTagged(material) or whatever

jovial mason
#

i already used that as u can see but wrong i guess

river oracle
wet breach
slender elbow
#

jesus christ no what the fuck

river oracle
#

tags are stored in a set internally iirc lol

#

just do the sweet sweet O(1) comparison

wet breach
#

the above isn't any less optimal

river oracle
#

chat I'm out

remote swallow
#

Miles we require a cat photo

river oracle
#

I'm back at school already

remote swallow
#

I want another

river oracle
#

I can only be home on friday and saturday

#

I come back sunday morning

remote swallow
#

Use on from the backlog of photos

jovial mason
#

what a sexy shop

shadow spire
#

guys, help me, I've been trying to fix the error for 6 hours now, but it always appears:

[17:55:42 ERROR]: Error occurred while enabling LiteBuyer v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "java.util.List.stream()" because the return value of "org.bukkit.configuration.MemorySection.getList(String)" is null
        at org.by1337.blib.configuration.YamlContext.getList(YamlContext.java:281) ~[?:?]
        at org.by1337.blib.configuration.YamlContext.getList(YamlContext.java:277) ~[?:?]
        at org.by1337.buyer.item.Category.buildSellableItems(Category.java:35) ~[?:?]
        at org.by1337.buyer.item.Category.<init>(Category.java:26) ~[?:?]
        at org.by1337.buyer.Config.<init>(Config.java:45) ~[?:?]
        at org.by1337.buyer.Main.onEnable(Main.java:81) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:518) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:432) ~[patched_1.16.5.jar:git-Paper-794]
        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:599) ~[patched_1.16.5.jar:git-Paper-794]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:298) ~[patched_1.16.5.jar:git-Paper-794]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1074) ~[patched_1.16.5.jar:git-Paper-794]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794]
        at java.lang.Thread.run(Thread.java:840) [?:?]
jovial mason
#

yes look into your .yml

#

there is something null

#

not existing

shadow spire
#

Ik but I don't understand what's wrong with it, it seems to be correct

jovial mason
#

i think u need to show it tho otherwhise nobody can help

smoky anchor
#

?main

smoky anchor
#

also you're running paper...

shadow spire
wet breach
#

you probably have some tab in there

shadow spire
wet breach
#

well, something is missing from it

slender elbow
#

we're going in blind here

#

help us help you, share the code, share the config

smoky anchor
wet breach
#

?paste

undone axleBOT
slender elbow
shadow spire
smoky anchor
#

oh right
Even after being here for so long, I keep forgetting that ppl still work with old versions

jovial mason
#

XDDD

#

THE PASTEBIN

shadow spire
#

?

slender elbow
#

if the config running on the server is the same as the config in that repo, it looks fine at a first glance, although no clue what that blib YamlContext code looks like

jovial mason
#

is there no trapchest instance?

shadow spire
#

?

jovial mason
#

nothing to do with your code

#

asking for myself

jovial mason
#

are trap chests not existing??

slender elbow
#

trapped_chest is a material

#

the blockstate is just Chest

jovial mason
#

thats weird

slender elbow
#

well, no

#

that's just how it is lol

#

it's a separate block kind

#

but the container kind is the same

jovial mason
#

but its bugging with PersistentDataType

#

for some reason

slender elbow
#

wdym

jovial mason
#
 if (placedBlock.getState() instanceof Chest chest) {
                // Handle Chest
                PersistentDataContainer data = chest.getPersistentDataContainer();
                data.set(ownerKey, PersistentDataType.STRING, player.getUniqueId().toString());
                chest.update();
#

its not setting the ownerKey

#

just for normal chests

slender elbow
#

i can't test right now but according to the server code it should work fine, if you can write a minimal reproducer where you can consistently reproduce the issue you should file a bug report

jovial mason
#

trapped chests aint that importent rn but do sshulker chests also support persistentdatacontainer?

slender elbow
#

every blockstate that is a TileState does

#

that includes trapped chests and shulker boxes

jovial mason
#

ohh

#

okay

#

hmm

#
            } else if (placedBlock.getState() instanceof ShulkerBox shulkerBox) {
                // Handle Shulker Box
                PersistentDataContainer data = shulkerBox.getPersistentDataContainer();
                data.set(ownerKey, PersistentDataType.STRING, player.getUniqueId().toString());
                shulkerBox.update();

CODE BREAK


        if (targetBlock.getState() instanceof Chest chest) {
            PersistentDataContainer data = chest.getPersistentDataContainer();
        } else if (targetBlock.getState() instanceof Barrel barrel) {
            PersistentDataContainer data = barrel.getPersistentDataContainer();
        } else if (targetBlock.getState() instanceof ShulkerBox shulker) {
            PersistentDataContainer data = shulker.getPersistentDataContainer();

            if (!data.has(ownerKey, PersistentDataType.STRING)) {
                sender.sendMessage(messages.getString("messages.no_owner")); // Falls kein Besitzer gesetzt ist
                player.playSound(player.getLocation(), messages.getString("sounds.no_owner"), 1.0f, 1.0f);
                return false;
            }

            String ownerUUID = data.get(ownerKey, PersistentDataType.STRING);
            if (!player.getUniqueId().toString().equals(ownerUUID)) {
                sender.sendMessage(messages.getString("messages.not_owner")); // Falls der Spieler nicht der Besitzer ist
                player.playSound(player.getLocation(), messages.getString("sounds.not_owner"), 1.0f, 1.0f);
                return false;
            }

for some reason it triggers messages.no_owner

#

which means ownerkey aint set

chrome beacon
#

You should store the result of getState in a variable rather than calling it multiple times

#

It's not a cheap method as it copies a bunch of information

jovial mason
#

so i store every chest placed from every player in a variable?

chrome beacon
#

also when is the second part called

jovial mason
#

after executing an command second part is called

chrome beacon
#

That would just be a bad idea

jovial mason
#

ik but it creates a ownerkey after every chest place

#

thats why i dont save it

chrome beacon
#

I was talking about a local variable

#

inside the method

jovial mason
#

Oh i can definetly add that later but first i need do find out why it doesnt place the ownerkey at all for shulkers

quaint mantle
#

Inventories made with Bukkit.createInventory() saves the items inside even if the server restarts?

pseudo hazel
#

not automatically because those inventories arent attached to anything

fickle spindle
#

what that mean Plugin already initialized!

blazing ocean
#

are you perhaps calling the constructor of your main class

slender elbow
#

nooo (yes)

worldly ingot
#

That's not necessarily true. They could be extending their main class too :p

blazing ocean
#

never have i heard a more disgusting thing

novel talon
#

Hi, I'm running a Minecraft 1.12.2 server, and basically, when my players join, they have 3 seconds of immunity. I tried changing that with setNoDamageTicks(0) in an onJoinEvent and also giving it with some ticks of delay, but it doesn't seem to work. Is there any other way to make players have no immunity when they join the server?

blazing ocean
#

why the everloving fuck would you run spigot 1.12

worldly ingot
#

That immunity is built into the server. Not sure where that's kept

blazing ocean
#

like not even modded

#

(inb4 hybrid)

novel talon
#

But this issue brings me problems with players abusing this immunity when doing pvp

worldly ingot
#

I think the better solution for that is to not allow them to combat log, no?

#

Because that join immunity is useful. Some clients don't load in fast enough for players to react to damage happening to them

novel talon
echo basalt
#

reminds me of the fall damage reset "bug"

worldly ingot
#

I don't know what ct is (unless it's "combat tag" I guess :p)

#

But if they're in active combat and they leave, they should die when rejoining

echo basalt
#

pretty sure that one actually reset your falling ticks but still the 3 seconds of immunity is nice for ppl with slow pcs

#

I used to struggle bad with networks because my old pc would take more than 20 seconds to enter and I'd timeout lmao

novel talon
echo basalt
#

at least back then the fix would be lowering your render distance

novel talon
#

I might force them into combat tag if they are in the arena, so that they cant quit and reconnect and abuse of that 3s of immunity

echo basalt
#

that's kind of how combatlog plugins work

#

they tag the player and if you log out an npc replaces you and redirects all damage

#

sumn like that

worldly ingot
#

Or just kills you when you leave

novel talon
#

The plugin kills the player when they logout in combat

worldly ingot
#

Drops your items and, when you rejoin, teleports you to spawn with an empty inventory

#

Yeah aPES3_AngeryNod

novel talon
#

Yes, thats exactly how it works

echo basalt
#

that one kid tripping his breaker mid pvp

novel talon
#

The thing is that some players quit and join to get the 3 secs of immunity and abuse that

echo basalt
#

(me like 10 years ago)

novel talon
#

Definitly i should keep the 3s immunity and find the way to tag them if they are in the arena. Thanks guys!

junior bough
#

Hey I have a question how to change player Name tag for java 1.8.8

pseudo hazel
#

update to a higher version might help

rough ibex
#

1.8
im tired boss

jovial mason
#

isnt 1.8 like 2013

#

💀

remote swallow
#

?howold 1.8.8

undone axleBOT
jovial mason
#

oh

#

oops

quasi gulch
#

How can i use TextComponent from the Bungee API to set a Hover Event displaying an Item?

#

Currently i got this but it doens't work and i dont find anything in this topic ``` textComponent.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_ITEM,new Item(new ItemStack(Material.LEAD).getTranslationKey(),1,null)));

pseudo hazel
#

any more code?

#

i assume sethoverevent returns a new component?

quasi gulch
#
        TextComponent textComponent = new TextComponent("[Test]");
        textComponent.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_ITEM,new Item(new ItemStack(Material.LEAD).getTranslationKey(),1,null)));
        player.spigot().sendMessage(textComponent);```
#

it doenst return a new Component

#

thats the error i get

pseudo hazel
#

oh I didnt know you got an error haha

#

almost looks like a spigot bug

quasi gulch
#

so im cooked?

pseudo hazel
#

no wait maybe im wrong

#

what is that Item

#

I cant find that constructor online

#

nvm

#

im stupid

#

your item namespace is wrong

#

I think its just minecraft:lead

#

not item.minecraft.lead

quasi gulch
#

okay how can i get this namespace?

pseudo hazel
#

Material.LEAD.getKey()

#

and then tostring probably

quasi gulch
#

But how does it display the item then?

#

Woulnt that just display the material

pseudo hazel
#

yes

#

getTranslationKey returns a string anyways

#

but maybe thats what the ItemTag is for that you left at null

quasi gulch
#

i mean idk because theres not a single documentation i could find

pseudo hazel
#

eyah same here

#

spigot api is kinda wacky

#

imagine if Item just took an itemstack

#

I guess that'd be too hard

#

well the reason is because its bungee

quasi gulch
#

I will just use a different solution and not display the item. Too much stress for one little feature

pseudo hazel
#

and not bukkit

#

if you think this is stressful you chose the wrong hobby

#

xD

quasi gulch
#

I will just display the item name

#

i wish paper components would be supported nativly by spigot

pseudo hazel
#

just make a paper plugin then

remote swallow
#

if its message related, use bukkit audiences

quasi gulch
#

👍

pure dagger
#

sorry its wrong channel but can someone help? i use these 2 plugins on 1.21.3 and there is an error, am i using wrong worldedit version?

#

java.lang.NullPointerException: Cannot invoke "com.sk89q.worldedit.world.item.ItemType.getId()" because "com.sk89q.worldedit.world.item.ItemTypes.LEATHER" is null

smoky anchor
#

Why do you have .jar set to open with NOTEPAD

pure dagger
#

because i dont open it

jovial mason
#
 public void onBlockPlace(BlockPlaceEvent event) {
        Player player = event.getPlayer();
        Block placedBlock = event.getBlockPlaced();

        // Check if the placed block is a chest
        if (placedBlock.getType() == Material.CHEST) {
            Block[] adjacentBlocks = {
                    placedBlock.getRelative(BlockFace.NORTH),
                    placedBlock.getRelative(BlockFace.SOUTH),
                    placedBlock.getRelative(BlockFace.WEST),
                    placedBlock.getRelative(BlockFace.EAST)
            };

            // Iterate over all adjacent blocks to check if they are part of a shop
            for (Block adjacent : adjacentBlocks) {
                String path = "shops." + adjacent.getWorld().getName() + "," + adjacent.getX() + "," + adjacent.getY() + "," + adjacent.getZ();

                // Check if there is a shop at the adjacent block
                if (config.contains(path)) {
                    event.setCancelled(true); // Cancel the placement of the chest
                    player.sendMessage(messages.getString("messages.no_adjacent_chests")); // Send a message to the player
                    player.playSound(player.getLocation(), messages.getString("sounds.no_adjacent_chests"), 1.0f, 1.0f); // Play a sound to the player
                    return; // Exit the method after cancelling
                }
            }


            if (placedBlock.getState() instanceof Chest chest) {
                // Handle Chest
                PersistentDataContainer data = chest.getPersistentDataContainer();
                data.set(ownerKey, PersistentDataType.STRING, player.getUniqueId().toString());
                chest.update();
            } else if (placedBlock.getState() instanceof Barrel barrel) {
                PersistentDataContainer data = barrel.getPersistentDataContainer();
                data.set(ownerKey, PersistentDataType.STRING, player.getUniqueId().toString());
                barrel.update();
            } else if (placedBlock.getState() instanceof ShulkerBox shulkerBox) {
                PersistentDataContainer data = shulkerBox.getPersistentDataContainer();
                data.set(ownerKey, PersistentDataType.STRING, player.getUniqueId().toString());
                shulkerBox.update();

            }
        }
    }

shulker chests have no ownerkey

sullen marlin
#

You shouldn't need to duplicate all that code for each block

#

Otherwise I don't see an obvious issue. Do you have the right import

jovial mason
#

i think i forgot to add shulker chest at if (placedBlock.getType() == Material.CHEST) {

#

that was the error

tepid gust
#

Does anybody know how to check the color of a wool block?

echo basalt
#

I mean

#

it's just

#

Material.RED_WOOL or whatever

#

unless you're on 1.12 and below

#

in which case just give up

#

or y'know check the data magic number

vagrant charm
#

Could someone tell me how to keep classes and packages, for example litecommand/okaericonfigs in ProGuardGUI?

fickle spindle
#

how can i remove some particles?

#

like the critics one

#

critical*

jovial mason
#

force a server resourcepack

#

XD

fickle spindle
obtuse jackal
#

Anyone know how to create a player NPC using ProtocolLib? This is what I have so far:

ProtocolManager m = ProtocolLibrary.getProtocolManager();
PacketContainer npc = m.createPacket(PacketType.Play.Server.SPAWN_ENTITY);

npc.getIntegers().write(0, 69420); //Entity ID
npc.getUUIDs().write(0, UUID.randomUUID()); //UUID
npc.getIntegers().write(1, 0); //Entity type

npc.getDoubles().write(0, l.getX())
                .write(1, l.getY())     //   } Location
                .write(2, l.getZ());

ProtocolLibrary.getProtocolManager().broadcastServerPacket(npc);
smoky anchor
drowsy helm
#

protocol lib isn't really necessary in later versions

obtuse jackal
chrome beacon
#

Use Citizens uwu

smoky anchor
#

Use actual players, have people sit behind their computers to act as an NPC /j

jovial mason
#
   @EventHandler
    public void onBlockExplode(BlockExplodeEvent event) {
        for (Block block : event.blockList()) {
            String path = "shops." + block.getWorld().getName() + "," + block.getX() + "," + block.getY() + "," + block.getZ();

            if (config.contains(path)) {
                event.blockList().remove(block);
            }

            if (block.getType() == Material.CHEST || block.getType() == Material.TRAPPED_CHEST ||
                    block.getType() == Material.BARREL || block.getType() == Material.SHULKER_BOX) {
                event.blockList().remove(block);
            }
        }
    }

If i spam 10000 tnt minecarts on a rail and i let it explode sometimes the shop gets destroyed how can i fix that?

obtuse jackal
chrome beacon
#

What are you trying to do

jovial mason
#

well

#

i cant stop players to do that

#

so i need to fix that lol

eternal oxide
# smoky anchor

I actually had a doctor tell me that. Had pain lifting my arm.

smoky anchor
#

OOF

jovial mason
#

i dont get it how it happens the chest explodes sometimes

#

but sometimes it doesnt

#

thats weird

smoky anchor
# jovial mason so i need to fix that lol

I'll give you a suggestion, it probably won't fix your problem.
Instead of config file, use PDC (since you're only using containers) to check if its your special shop.
It will be much faster if you have hundreds of shops.

obtuse jackal
# chrome beacon What are you trying to do

It would be similar to a replay plugin, where I can record and play back exact player movements and such. They would have to be identical to the actual players though so I cant just grab their XYZ coords and pipe it into citizens pathfinding api

jovial mason
#

that wont help my issue rn ;(

eternal oxide
#

how are you blowing the chest up?

smoky anchor
#

I know, but it will be great improvement to your plugin :D

eternal oxide
#

very few Blocks Explode

chrome beacon
#

^^

eternal oxide
#

TNT is an entity

chrome beacon
#

And so is tnt minecart

jovial mason
#

have also a entityexplode event

drowsy helm
#

Anyone know which event gets called when a Player steps on a tripwire that's not connected to a hook? Doesn't seem to fire PlayerInteractEvent

sullen marlin
#

I would've thought it would with PHYSICAL action

#

It's meant to

drowsy helm
#

I guess it's undefined behaviour since you can't natually set the wire to armed without commands or plugins

sullen marlin
#

Oh, not connected

orchid furnace
#

does getLogger().info support ansi?

eternal oxide
#

You can put anything in the msg, but the console will only accept whatever codepage the system has

vestal matrix
#
        for (Block block : getBlocksBetween(loc1, loc2)) {
            BlockData data = block.getBlockData();
            if (data instanceof Directional) {
                Directional directional = (Directional) data;
                Bukkit.getLogger().info("directional");
            }
        }```

why isnt the if statement being called?

the block is a stair
eternal oxide
#

did you import teh correct Directional?

vestal matrix
#

i think so
import org.bukkit.material.Directional;

eternal oxide
#

wrong one

vestal matrix
#

😭

vestal matrix
#

ok it works now thanks

night pecan
#

Hello,

Is there someone that can help me real quick with compiling my java code to a .jar file?

would be much appreciated

night pecan
rough ibex
#

what build system?

#

none?

#

well theres your problem

night pecan
#

i guess so haha

rough ibex
#

Pick one and use it

night pecan
#

yea

#

i just need my java project to compile to a .jar file so i can use it on my spigot server and test the plugin out

#

but im fucking around for 3 hours

#

and nothing seems to work

#

ive tried Maven already

rough ibex
#

okay cool, and

night pecan
#

i cant find a fix thats the problem

rough ibex
#

you say that like it failed

#

The problem being

#

why didnt maven work

night pecan
#

maven worked

but when building the project to a .jar file to make it a plugin

im just stupid or whatever cuz it builds a .jar file but its empty or whatever

idfk

#

if i could send the project to someone else who can compile it to a working .jar file would be very nice

#

cuz i cant seem to make it work

worldly ice
#

what's your project structure

#

and send POM that you used

night pecan
worldly ice
#

put the plugin.yml into /src/main/resources

night pecan
#

ye that worked finally

#

thx alot

#

everything works now

torn shuttle
#

yo gamers what's the hotkey to jump to a line in intellij?

#

I vaguely remember it exists but can't remember what it is

smoky anchor
#

Ctrl+G ?

torn shuttle
#

that's the one, thanks jack black

#

well, that's not right

#

how did that happen

mortal vortex
dry hazel
#

Yes

mortal vortex
#

Yeah could've meant that.

wet breach
mortal vortex
jovial mason
#

if (!(block.getState() instanceof Chest || block.getState() instanceof Barrel || block.getState() instanceof ShulkerBox || !config.contains(path))) {

#

how can i include trapped chests?

sullen marlin
#

pretty sure block.getState() instanceof Chest includes trapped chests

jovial mason
#

ok thats weird

mortal vortex
#

If it does, then it should be assigned to the Chest BlockData.

undone axleBOT
#

You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {

}

}```
Becomes:

public class MyPlugin extends JavaPlugin {
    @Override
    public void onEnable() {

    }
}```
torn shuttle
#

when I cancel the break event for signs they pop back as blank, ideas?

mortal vortex
#

Thats a visual thing no?

pseudo hazel
#

Material.TRAPPED_CHEST

mortal vortex
pseudo hazel
#

ah i see

#

yeah

torn shuttle
mortal vortex
#

I've seen on servers where theres land protection, if you dont have permission to break a sign, and you have an axe fast enough, you can break the sign on your screen before the "Hey! You can't do this" is triggered, and the sign comes back as blank. Could be the same.

smoky oak
#

do plugins have access to their own jar files? i want to have a way to verify that it hasn't been modified

eternal night
#

kinda rough to check A has not been modified when the check for that is in A

#

Like, I can just modify your check

smoky oak
#

bleh

#

should just PR spigot with a request to see plugin hashes w/o perms lol

eternal night
#

?

#

But where does the hash come from

smoky oak
#

like sha hash from the file?

eternal night
#

Yea but compare it to what

smoky oak
#

the hash to a file you have so you can be sure the plugin installed is the same as on a public repository

eternal night
#

whats the hash

#

where does it come from

#

if spigot reads WorldEdit.jar, what hash does it compare that files hash to

smoky oak
#

ah no, i meant to print out to commandSender
im just annoyed you cant have a trust anchor bc you can just replace the topmost one

eternal night
#

Yea, it is pretty impossible to do that

smoky oak
#

wait could AES work?

eternal night
#

what

smoky oak
#

like this math thing with two prime numbers

eternal night
#

AES is an encryption algo

#

but no. The issue boils down to spigot having no way to check if a file is "valid".

pseudo hazel
#

what does an invalid file even mean

eternal night
#

Well in this case, tampered with from the original

#

what the original is, is a hard question tho omegaroll

pseudo hazel
#

tampered in what way xD

smoky oak
#

modified from what it should be, as in what people think it is vs what it actually is when running /plugins
the issue being that no matter how you verify, there's no trust anchor. Another plugin, you can just edit that too, and even if there's custom server software, to act as trust anchor, that still can be edited just as well

#

you just can't be sure that the code running on a server is the code available on public repos

eternal night
#

Well, you can make the server file read-only on the server side of things

#

but still, what tells the server worldedit-hacked.jar isn't just a renamed world edit version

#

like, what does it compare it to

smoky oak
#

well yea but the only person who can verify that is the admin. same issue, you cant reliably check that without having access to the server

as for renaming, i thought that didnt change file hashes?

pseudo hazel
#

the hacked version can just make their own checksum, like that would require the owner of the server to compare all the keys of all the plugins they have with some verified version the plugin author published

eternal night
#

No but what hash do you compare to

#

Yeaaa

smoky oak
#

you can just hash the release jar i figured

eternal night
#

And put the hash where

#

Or do you mean a server owner has to do that manually

#

Because I can just download all jars again manually too, that's probably faster

smoky oak
#

oh i didnt even think of doing it that way. i thought about it from the perspective of a user trying to figure out if the plugins have been modified

eternal night
#

Well that's possible lol. Just not on the server software

glossy laurel
#

is it possible to get the bounding box in which you collide with a block? (like a full block would have it 1 block big, a slab would have it half, snow would have it depending on layer count, etc.)

eternal night
#

It's just manual comparison

pseudo hazel
#

how can a plugin just get modified

#

like a virus?

eternal night
#

Yea

wet breach
pseudo hazel
#

one way could be to store the hash when they first add a plugin, but then there is no difference between a virus and a plugin update

eternal night
#

Yea, we could be signing jars but that still doesn't help much

wet breach
#

if implemented properly, the signed jar should not load if it has been tampered with or at the very least a warning displayed. It is a bit annoying fixing such jars to make them run if tampered

eternal night
#

Given attackers can easily pose as normal plugin developers, get a leaf certificate from spigot and welp

smoky oak
#

? whats that

wet breach
#

Well I don't know the context, just was kind of pointing there is a way to verify to some extent if a jar has been tampered with or not lol

#

at least a mechanism built into the JVM

pseudo hazel
#

yeah lynx is more saying that from the server perspective there is no way to tell if a signed jar is malicious or just some version of a legit plugin

eternal night
#

only interesting bit would be including the plugin name in that signature

wet breach
#

right, that is completely different area

#

hence we have Optic's Malware plugin

eternal night
#

like technically could do that

pseudo hazel
#

free malware plugin?

#

hype

wet breach
#

Anti-Malware*

#

lmao

#

anyways, I will say it is actually pretty decent, quite a few of us here have helped with it

smoky oak
#

idk how to make malware anyway
just how to give myself op status :V

upper hazel
#

where find permissionEX repos and depend version

wet breach
upper hazel
#

maven not can find 1.22, 1.23.1

wet breach
#

you probably wouldn't really even know it was malicious either

smoky oak
wet breach
#

since it is the server loading it 🙂

wet breach
#

in fact, you could even make a mod that activates from it as well on clients

#

and no one even really know

smoky oak
#

actually, question about mods, if you want to send more data to a modded client, can you listen to non-vanilla packages?

#

i really want to add keybinds to my plugins lol

wet breach
#

you would make use of the plugin messaging normally

#

since that is what that is intended for originally

smoky oak
#

wait can plugins just define new keybinds?

upper hazel
#

you talk obaut plugin updating system?

smoky oak
#

no

slate surge
#

Hi! Uh how much is the length of a packet id?

wet breach
#

uh, a byte?

#

I think

#

could even be a short 🤔

slate surge
#

hm thnxx

#

is it varint?

#

a packet id

wet breach
#

it is a varint and I just looked, it will never be larger then 5 bytes

#

in terms of actual length

slate surge
#

okay btw how do I get the packet id of a plugin message for version 1.21.4 to server?

eternal night
#

plugin message?

slate surge
#

ye

#

[11:00:26 INFO]: aaa lost connection: Internal Exception: io.netty.handler.codec.DecoderException: Failed to decode packet 'serverbound/minecraft:player_command'

eternal night
#

You mean ClientboundCustomPayloadPacket ?

slate surge
#

I get confused between clientbound and serverbounc

eternal night
#

okay but, why are you manually writing the buffer

#

you could just construct the packet and send it

#

wtf is that

slate surge
#

Basically I got a potential zero day

#

in bungee

#

just testing if it works

eternal night
#

and you want support in implementing it? omegaroll

slate surge
#

cause then I can get it patched?

eternal night
#

Ahaaa kekwhyper

wet breach
slate surge
#

wdym?

#

imma go take some sleep

wet breach
#

zero day infers the moment something is released

#

not few months after

slate surge
#

rip

#

wdym a few months later

#

it is in the latest bungee

eternal night
#

that would indeed by a zero day then

wet breach
#

was bungee released for 1.21.4 today?

slate surge
#

ill try search it in velocity as well

eternal night
slate surge
#

like in latest commit it still persists

eternal night
#

A zero day exploit is one that is not known to the developer and is unpatched

slate surge
#

exactly

#

imma come some hours later

eternal night
#

Aynway, java -DbundlerMainClass=net.minecraft.data.Main -jar server.jar --all should prove very useful for you

eternal night
#

the 0 day isn't 0 days since release

eternal night
#

its 0 days to prepare to fix the exploit

slate surge
#

0 day is when it is unpatched and dev is unknown to the vuln

eternal night
mortal vortex
#

discovers “zero day”
”going to sleep”

Dude is about to start infecting as many servers as possible.

eternal night
#

you get a fun json at generated/reports/packets.json

wet breach
#

I doubt there is any serious vulnerability

slate surge
eternal night
#

paper

eternal night
wet breach
#

especially with bungee considering bungee doesn't really change much of anything in terms of the protocol

slate surge
mortal vortex
#

you need to lock in.

slate surge
mortal vortex
#

Exploit it as much as possible.

wet breach
slate surge
#

alright

#

when i am back from my nap time

#

ill work again on it

wet breach
#

but I doubt its anything bungee is doing

eternal night
#

meh

#

you have too much trust

slate surge
#

blindly trusting what player is sending

wet breach
#

that is just how the MC protocol is

slate surge
#

well

#

atleast to what i saw

mortal vortex
#

Dude you need to lock in man. You need to start exploiting as fast as possible.

slate surge
#

it can fixed in one line

smoky oak
wet breach
mortal vortex
# slate surge xd

if you discovered a vulnerability in PayPal would you wait til the morning before you start draining everyone’s accounts?

mortal vortex
#

a patch is always one step around the corner.

eternal night
slate surge
#

welp

eternal night
#

instead of opening like, a public issue or PR

slate surge
#

xd

wet breach
slate surge
#

cya

#

all

mortal vortex
#

Please please someone ping me when this guy posts again about this zero day. I’m really interested in what it actually is.

wet breach
#

yeah I am curious too

#

only because I like to keep tabs on such things

mortal vortex
#

If you’re writing a plugin to exploit the vulnerability on the server, you already have an entry point to that server being the plugin itself; it doesn’t make sense why it would be like a back door zero day, as you could make a backdoor out of any old plugin.

#

Or I wonder if it means zero day in the sense that it actually impacts the client. Which I really doubt.

I can’t see any other way a zero day could exist.

wet breach
#

well they said the server blindly trusts the client

eternal night
#

usually it'd be a client sending malicious packets, either tricking the proxy into doing something not good or worse

wet breach
#

so I assume the vector point comes from the client

#

however it is already known that MC servers will blindly accept packets

eternal night
#

I mean, who knows, this might be like, blindly trusting like, names or uuids.

wet breach
#

that is why if you have an actual decent sysadmin you would implement packet filtering

mortal vortex
#

ohh okay I misinterpreted this. I thought they were making a bungee plugin.

But from what I’m understanding it’s modifying the client to perform malicious things on any bungee server?

wet breach
#

well, to send malicious crafted packets

#

to do something

#

not entirely sure what it would allow since they haven't divulged in what exactly they are referring to

mortal vortex
#

Sounds cool! Do ping me!

limber marten
#

Hey, I'm trying to setup a plugin in 1.21.4 with NPC-lib. I wanted to shade the dependencies but it seems that my setup with Java 21 isn't working. I have the following error when I ./gradlew shadowJar :
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 65
Here is my Gradle :
https://hastebin.com/share/iheqolacag.bash

smoky anchor
limber marten
#

I'll try thx

#

It worked perfectly, thanks👍

young knoll
#

Zero day exploit?

#

Pfft how about -1 day exploit

misty ingot
#

"i needed it yesterday" moment

rough drift
eternal oxide
#

Nope, he still wants it yesterday

rough drift
#

GET A TIME MACHINE THEN!

misty ingot
#

theres this comedy duo who actually did a skit on this

eternal oxide
#

I watched it

#

boss wanted the reports yesterday

broken flume
#

I'm working on a plugin using Spigot 1.21.1 and encountering a NoClassDefFoundError when attempting to use NMS classes such as:

import org.bukkit.craftbukkit.v1_21_R1.CraftServer;
import org.bukkit.craftbukkit.v1_21_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_21_R1.entity.CraftPlayer;```

dependencies {
compileOnly 'org.spigotmc:spigot:1.21.1-R0.1-SNAPSHOT:remapped-mojang'
}```
my project is using the correct version, but the error persists at runtime.

java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/v1_21_R1/CraftServer```
eternal oxide
#

?nms

eternal oxide
#

you need to remap

broken flume
#

alright thanks

slender elbow
#

Spigot 1.21.1

#

Spigot 1.21.1 was indeed v1_21_R1

white anchor
#

I checked myself

glossy laurel
#

what is the best way to check if someone is in a non-cuboid are of the world? Kind of like a bounding box except that it's not necessarilly a cuboid

young knoll
#

I assure you 1_21_R1 exists

#

We didn’t just magically skip to R2

broken flume
#

java.lang.NoClassDefFoundError: net/minecraft/network/NetworkManager

im not even using NetworkManager, then why this error

chrome beacon
#

Could you send your new build.gradle

#

?paste

undone axleBOT
chrome beacon
white anchor
#

and for 1.21 and up it doesnot need v1_21_R1 anymoewr

chrome beacon
#

Bro be running Paper

#

and not Spigot

slender elbow
#

lmao

chrome beacon
#

?whereami

white anchor
#

it works on spigot

#

or wait no it doesnot

#

Never seen someone use spigot

young knoll
#

Forever immortalized in whereami

#

Truly my proudest achievement

remote swallow
#

You were still blue then

broken flume
#

NetworkManager was changed to Connection in newer versions, and I'm using Connection

smoky anchor
glossy laurel
chrome beacon
#

If the server is running 1.21.1 that won't work

#

Also since it's Paperweight you might need to tell it to compile with Spigot mappings

smoky anchor
broken flume
chrome beacon
#

You will need to compile against every version you want to support

#

So time to setup your multimodule project

glossy laurel
chrome beacon
#

One module per version

broken flume
#

so i gotta create different module for each nms version

smoky anchor
chrome beacon
#

Alternatively use reflection with some logic

broken flume
#

alright

smoky anchor
# smoky anchor A concept I guess

But a really easy to grasp one
It's basically just some collection of small functions that all return a distance, based on that you can do stuff. You can combine these functions together to create "complex shapes"
I've mainly seen it in rendering

broken flume
# chrome beacon yes

paperweightDevelopmentBundle('io.papermc.paper:dev-bundle:1.21.1-R0.1-SNAPSHOT')

still error

glossy laurel
#

just not necessarily in the shape of a cuboid

young knoll
#

Split it into multiple cuboids

glossy laurel
#

is the the best way

smoky anchor
#

Octree ?

glossy laurel
smoky anchor
#

Just google that
I think that may be the best structure to do this kind of check, maybe

glossy laurel
#

kind of like a binary tree

#

except that it isnt

#

its an oct tree

#

mm

slate surge
#

back xd

pseudo hazel
#

its like a binary tree but in 3 dimensions instead of 1

broken flume
slate surge
#

YOU HERE TOO

smoky anchor
#

context ?

pseudo hazel
#

context in a help channel is rare

chrome beacon
#

It shows how to use it

broken flume
#

so i gotta add this

chrome beacon
#

No that's for the run Paper task

#

It's optional

slate surge
#

btw

#

u getting class not found for networkmanager

#

i saw that last time in minecraft coder pack in 1.8

broken flume
#

im not even using networkmanager, im using connection

smoky anchor
#

Discord client mod spotted

slate surge
#

xd

pseudo hazel
#

yikes

slate surge
#

now

#

help me

smoky anchor
#

consider yourself helped

broken flume
slate surge
smoky anchor
#

You're welcome, now what were you helped with ?

slate surge
#

finding zero day impl?

eternal night
slate surge
#

oh hi again

eternal night
#

what are you stuck on now lol

slate surge
#

sending a packet server reading it differently

#

xd

#

i changed my way

#

now instead of sending raw bytes

#

imma jailbreak mc to allow me to do the thing which i want

eternal night
#

jailbreak MC lol

slate surge
#

xd

worthy yarrow
#

Free my boy MC, he ain’t do nothing!

smoky anchor
#

Da heck do you mean by jailbreaking MC
Can't you create Fabric mod ?

slate surge
slate surge
#

i need smth

#

which mc wont allow

#

so imma force it to allow me

smoky anchor
#

I see

eternal night
#

imagine not just using mache-client typing

slate surge
#

tf is a mache-client?

worthy yarrow
#

“We know we won’t run into an issue where we would cause issues”

slate surge
#

famous last words

eternal night
eternal night
#

pretty handy to like, dirty hack around

slate surge
#

xd

eternal night
#
  • breakpoints
smoky anchor
slate surge
#

imma now create an accessor so i can get only the namespace xd

eternal night
smoky anchor
slate surge
#

I mean

#

my use case is

#

paradiseClient_Fabric$getLegacyIdentifier

smoky anchor
#

ok you're doing too much cursed shit for me to understand lmao

jovial grove
#

Is there any way to find out who placed the vehicle, like boat or minecart? I found VehicleCreateEvent, but it doesn't track who placed the vehicle

slate surge
#

did I do smth wrong lmao

#

oh wait

#

no

#

i have to do it entirely dif

#

java.lang.IllegalArgumentException: Data fixer not registered for: minecraft:DUMMY in block_entity

#

😭

eternal night
#

did ya do it? xD

slate surge
#

nah

#

datafixer

#

being weird

#
@Mixin(Identifier.class)
public class IdentifierMixin {

    @Shadow @Final private String namespace;

    @Shadow @Final private String path;

    @Inject(method = "isNamespaceValid", at = @At("HEAD"), cancellable = true)
    private static void isValidNamespace(String namespace, CallbackInfoReturnable<Boolean> cir) {
        cir.setReturnValue(true); // We know that we won't run into an issue where we would cause issues
    }

    @Inject(method = "isPathValid", at = @At("HEAD"), cancellable = true)
    private static void isPathValid(String namespace, CallbackInfoReturnable<Boolean> cir) {
        cir.setReturnValue(true); // We know that we won't run into an issue where we would cause issues
    }

    @Inject(method = "isCharValid", at = @At("HEAD"), cancellable = true)
    private static void isCharValid(char c, CallbackInfoReturnable<Boolean> cir) {
        cir.setReturnValue(true); // We know that we won't run into an issue where we would cause issues
    }

    @Inject(method = "isPathCharacterValid", at = @At("HEAD"), cancellable = true)
    private static void isPathCharacterValid(char c, CallbackInfoReturnable<Boolean> cir) {
        cir.setReturnValue(true); // We know that we won't run into an issue where we would cause issues
    }

    @Inject(method = "isNamespaceCharacterValid", at = @At("HEAD"), cancellable = true)
    private static void isNamespaceCharacterValid(char c, CallbackInfoReturnable<Boolean> cir) {
        cir.setReturnValue(true); // We know that we won't run into an issue where we would cause issues
    }

    @Inject(method = "toString", at = @At("HEAD"), cancellable = true)
    private void toString(CallbackInfoReturnable<String> cir) {
        // Legacy identifier
        if (path.isEmpty())
            cir.setReturnValue(namespace);
    }
}
#

what could be wrong

#

We know that we won't run into an issue where we would cause issues

#

🙄

blazing ocean
#

also overriding Identifier like that is crazy weird

#

what the fuck are you doing that needs you having invalid identifiers forcefully like that

slender elbow
blazing ocean
#

that's called sodium smh

eternal night
#

giving FriendlyByteBuf#read codec mixin

blazing ocean
#

"We know that we won't run into an issue where we could cause issues" my brother in christ resource packs and datapacks exist

eternal night
#

(they are trying to break something in bungee, this isn't a production software)

blazing ocean
#

oh even better then

slate surge
#

I got what i want

#

but spigot kicks me

eternal night
#

depression

blazing ocean
#

yeah because it's invalid? lmao

#

what are you even expecting the server to do here

#

just crash?

#

the netty thread will just throw causing you to be kicked