#help-development

1 messages · Page 591 of 1

pseudo hazel
#

ill keep checking then

river oracle
#

How do you get a Location cordinates from chunk cordinates
right now I'm using
x >> 4 and z >> 4 to get chunk cordinates
I used x << 4 and z << 4 to get world cordinates, but I semeed to get slightly incorrect results

In this case my chunk cordinates are correct
(73, -54)

But when bit shifting back I get a block in the chunk
(73, -55) how can I shift back or adjust for my inaccuracies

plucky finch
#

so basically, my friend out of a joke tries to make a plugin, that on chunk creation on every birch tree replaces 2nd block from bottom with birch sign with text. The way he does it now is, on chunk generation, it looks or all Birch Wood blocks, once it finds them it moves one block up and replaces block with sign. This is very unoptimised as it checks whole chunk with all blocks and only can be height limited. Can it be done any othey way that doesn't destoy server hardware on each chunk generation? (my friend is too stubborn to ask himself.)

eternal oxide
#

chunk to location will return the corner block

quaint mantle
#

PacketPlayOutWorldBorder

Anyone know what this is called in the latest version

river oracle
eternal oxide
#

your math is wrong

pseudo hazel
#

yep turns out I fd someting up (like usual), the event is working now 😉

river oracle
eternal oxide
#

yes or multiply by 16

#

either works

river oracle
#

then it should wokr no?

pseudo hazel
#

yeah same thing

eternal oxide
#

yes it should work

eternal oxide
#

chunk to location is multiply by 16, plus the block offset you want

pseudo hazel
#

probably off-by-one

remote swallow
#

use the new one

ivory sleet
#

Wait it is

#

Oh ye

quaint mantle
pseudo hazel
#

i.e. you are flooring or discarding the decimal result/bits

quaint mantle
#

I actually use it alot

ivory sleet
#

Listen to epic

quaint mantle
#

But it changes names and sometims I cant find it

river oracle
# eternal oxide chunk to location is multiply by 16, plus the block offset you want
        domainRegistry.getAll().forEach((DomainInfo info) -> {
            final LightChunk corner1 = info.flagChunks().getCorner1();
            final int x = corner1.getX() << 4;
            final int z = corner1.getZ() << 4;
            getLogger().info("Zone Name: " + info.name());
            getLogger().info("Check Cords: (%d, %d)".formatted(x, z));
        });
``` This gets me the exact corner block in the chunk, but when I go in game to check its in the next chunk over
ivory sleet
#

Yeah true, u can always track it by packet id

quaint mantle
#

Yeah I got it bookmarked

ivory sleet
#

I mean like, the packet id

#

Cuz it stays the same regardless of name refactorizations

pseudo hazel
eternal oxide
#

chunks index on zero

primal ermine
#

Can i just use .append .event .append .event, or somehow i should need to stop hover event before appending next text?

river oracle
eternal oxide
#

my guess you are storing the initial chunk wrong

river oracle
#

but the inital chunk cords check out as working

#

I've confirmed that in previous tests

#

if I was storing chunks wrong wouldn't that be off too?

eternal oxide
#

<<4 >> 4 can;t give you an incorrect result, so you are either storing the wrong value or checkign the wrong value

river oracle
#

does it matter what corner of the chunk you check the cordinate on?

#

e.g. I set my zone on this corner of the chunk

eternal oxide
#

why not just get teh chunk coords from teh chunk not the location?

#

no math to do to get teh ints

#

and you guarantee you have the correct chunk

autumn cave
#

But why is it not in ProtocolLib?

#

Is there a ProtocolLib discord by any chance?

river oracle
eternal oxide
#

when you use the location are you using getX or getBlockX?

tranquil prairie
#

How do I fix this

young knoll
#

Use getFinalDamage instead of getDamage

river oracle
eternal oxide
#

your boundingbox is probably 1 pixel larger than your block

river oracle
#

smh foolish mistake

#

thank you

kind hatch
#

It does, you just have to pay attention to where you put the marker.

#

It's hard to tell cause of your small screenshot, but you need to put the character after your values.

#

Not just the inbetween sections.

#

Yea, you're missing the characters after each ColorAPI#process call.
You are appending the calls directly one after the other.

Add "\n" + at the end of each of those lines.

#

That's the only one that has it and you can see it in your screenshot.

#

Pay attention to what you are writing. ColorAPI#process() returns a string. You are concatenating strings.

When you concatenate strings, they get joined together.
If you want to move to the next line, you add the \n character.

So when you do ColorAPI.process(whatever) + ColorAPI.process(whatever else), you will end up with whateverwhatever else not
whatever
whatever else

river oracle
kind hatch
#

You don't have to, you just have to add the character after the process. Which you do for the line you pointed out, but not on the ones you are getting confused about.

#

No it's not.

#

This is the only line that adds it.

#

All the ones above it don't have the newline string appended.

remote swallow
#

make the dashes strike through

#

the formatting

#

&m

#

also i have this

#

#

longer than a dash

#

—————

#

might connect in game

autumn cave
#

How to do this in 1.20? CraftPlayer handle no longer has playerInteractManager:

((CraftPlayer) player).getHandle().playerInteractManager.breakBlock(new BlockPosition(b.getBlockX(), b.getBlockY(), b.getBlockZ()));
remote swallow
#

what version was it last in

#

yes

autumn cave
eternal oxide
river oracle
#

?paste

undone axleBOT
autumn cave
eternal oxide
#

breakNaturally is teh break

#

there is also Player#breakBlock

#

no point in using nms for that

river oracle
autumn cave
#

Wait, I think this is wrong. Is there a way to break a block (properly) without specifying a player breaking it?

young knoll
#

That would just be breakNaturally

remote swallow
#

set it to air

autumn cave
young knoll
#

But the NMS code you were using is exactly what Player.breakBlock does

remote swallow
#

set it to air then

autumn cave
river oracle
#

well this is one of those take a break or the PC is going out the window moments

#

its been 3 hours me stumped on this

remote swallow
#

is ur gf spigotchan

river oracle
remote swallow
#

so you arent a spigot chan simp

river oracle
#

be quit about this

#

don't let the other spigotmc users know

remote swallow
young knoll
#

Won’t fire unless a player breaks it

remote swallow
#

oh

#

use the player break block and cancel it

timid hedge
#

Anyone?

zenith gate
#

Could i get another persons opinion towards my problem? #1123699678425399396 Thanks.. ( My responds may be a little slow, got really bad hotspot service rn ).

young knoll
timid hedge
#

Thanks

quaint mantle
#

I should learn Java better first

ivory sleet
#

By using static you’re not learning java better though

#

It’s one if not the worst obstacle for beginners

carmine nacelle
#

Anyone know how I can make the background of a text display transparent?

            List<WrappedDataValue> dataValues = List.of(
                    new WrappedDataValue(22, WrappedDataWatcher.Registry.getChatComponentSerializer(), WrappedChatComponent.fromText(ChatColor.RED + "Test").getHandle()),
                    new WrappedDataValue(14, WrappedDataWatcher.Registry.get(Byte.class), (byte) 3),
                    new WrappedDataValue(26, WrappedDataWatcher.Registry.get(Byte.class), (byte) 40)
            );

None of the values ive tried work

timid hedge
#

How do i set so the priority is group testGroup4?
So if your group is testGroup1 it shows somethig in a menu and same with testGroup2 and so on
But if i have testGroup1 (the "baddest" group) and testGroup4 (the "best" group)
It shows the items for testGroup1, and how do i make it so if you have both it will shows it for the highest group?

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player)) {
            sender.sendMessage("Only players can do this");
        }
        Player player = (Player) sender;
        if (!(isPlayerInGroup(player, "testGroup1") || isPlayerInGroup(player, "testGroup2") || isPlayerInGroup(player, "testGroup3") || isPlayerInGroup(player, "testGroup4"))) {
            sender.sendMessage("You dont have permission for this.");
        }else{
            if(player.getWorld().getName().equalsIgnoreCase("A")){
                new VagtshopA().open(player);
            } else if(player.getWorld().getName().equalsIgnoreCase("B")){
                new VagtshopB().open(player);
            } else if(player.getWorld().getName().equalsIgnoreCase("C")){
                new VagtshopC().open(player);
            }
        }

        return true;
    }
}
ivory sleet
#

Let me check actualy

#

Just gonna open my recent project

carmine nacelle
#

alright

ivory sleet
#

displayEntity.setBackgroundColor(Color.fromARGB(0));

#

This is what I used

#

Which is black I think?

carmine nacelle
#

how could I do that with my packets though..?

#

since my entity is just a packet

ivory sleet
#

What are those data values representing if I may ask?

#

I haven’t looked at nms for display entities at all so my bad

carmine nacelle
#

im still trying to figure that out myself

ivory sleet
#

I could help you in 10 min prob, at my pc then, else someone else might be able to give u a hint

queen niche
#

how do I make a chicken fly the direction the player is looking at?

I currently use this:

        // set the chickens velocity

        int m = 10;

        Vector v = new Vector();
        v.setX(L.getDirection().getX() * m);
        v.setY(L.getDirection().getY() * m);
        v.setZ(L.getDirection().getZ() * m);

        C.setVelocity(v);

C = Chicken
L = Player's location

however it does not fly away yet. What am I missing?

high pewter
#

What's the easiest method to check if BlockDropItemEvent actually had a chance of dropping an item (other than just the contents of an inventory)? For some reason I thought it didn't get called if the player used the wrong tool, but it still does and I also need to check for the event being cancelled or if the player is in creative. But then, even if you're in creative, multi-block structures such as torches will still be dropped, just not the original block broken. I was thinking I could just check if event.getItems() is empty, but that doesn't account for breaking containers such as dispensers with items in it using your fist (where the items are still dropped but not the dispenser itself) and would also have a random outcome if you harvested crops. I'm just hoping there's something that checks all this for me.

twin venture
#

hi , i started to work on redis and i have few questions if any one could elaborate :

redis.clients.jedis.exceptions.JedisConnectionException: Failed to create socket.

what can cause this ?

the ip / port / password is correct i doubled checked them ..

#

iam working on a communcation system for my network :

  • send a player bettwen servers .
  • get number of players

using redis ..

young knoll
#

He ded

chrome beacon
#

1 am

#

He seems to be listening to Spotify though

echo saddle
#

How can I get the exp drop amount for an entity that is not killed

echo basalt
#

Now for this to work, your chicken needs to have AI (setAI(false) breaks things)

echo basalt
#

The failed to create socket issue happens because your ip/port is incorrect, nothing else

#

password is a different thing

#

For the communication system, I'd suggest you make some packet system that runs on top of redis. Just sending around strings saying "CONNECT IMILLUSION LOBBY" is not fun

carmine nacelle
#

@echo basalt any idea how to make the background transparent on a text display

rough drift
#

check the wiki

#

it says it

#

default_background: 0b, background: 0 this is the NBT for it

rough drift
#

0x02 should be 1 iirc

#

and background color should be 0

#

actually

#

don't touch 0x02

wet breach
#

So the entire bitmask should be 0 which is the default lol

rough drift
#

no

#

background color

#

0x04 is zero by default

#

but Background Color is 0x400000000

wet breach
#

Ah i see, yeah if you wanted to change the background color you need to set that bitmask to 1

rough drift
#

no

#

0x04 is it will use default if Background Color is 0

#

you need to set both to zero to disable it

wet breach
#

In order for 24 to take effect you have to tell it to not use default

rough drift
#

yeah

#

0 is false, and it's called "Use"

#

Frost it's a boolean

wet breach
#

I am pretty sure it might be backwards in this case from a day or twos testing

rough drift
#

Used it myself

#

it works like I am telling you

#

Use background color should be 0b for false

Background color should be 0 for transparent black

wet breach
#

In that case it seems that bitmask is useless to even have set. Wonder why mojang even included it will have to at some point look at mojangs code which i havent really done yet

carmine nacelle
#

0b doesnt work here

#

must contain at least one binary digit

#

unless im missing something

wet breach
#

Should be 0 after 0b since 0b means its a binary

#

0b00

#

Alternatively

#

Just stick an int there

carmine nacelle
#

I guess im confused on how to set values on "sub" things

#

like, how to set a value for a bitmask

wet breach
#

Since you are casting to byte anyways

#

You could just use 0

wet breach
#

There is 4 bits in a byte

echo basalt
#

8

wet breach
#

Yeah that stupid phone

echo basalt
#

4 bytes in an int

#

4 bits = nibble
8 bites = byte
2 bytes = 16 bits = short
4 bytes = 32 bits = int
8 bytes = 64 bits = long

carmine nacelle
wet breach
#

Since that is at the end

echo basalt
#

uhh

wet breach
#

00000001

echo basalt
#

that alignment bit is icky

carmine nacelle
#

just trying to figure out how to reference everything in code

wet breach
#

When you figured out the binary value you can turn that binary into decimal or integer

#

And use that int to pass in

carmine nacelle
#
                    new WrappedDataValue(24, WrappedDataWatcher.Registry.get(Byte.class), (byte) 0),
                    new WrappedDataValue(26, WrappedDataWatcher.Registry.get(Byte.class), (byte) 0)
#

Did i somehow not do it right..?

#

Oh wait..

wet breach
#

If that even registers

echo basalt
#

damn I gotta take the time to clean my keyboard

#

my tab key been hella sticky lately, just shined a flashlight at it and it's crusty

carmine nacelle
#

AYYYYEEE LETS GOO

wet breach
#

There you go

carmine nacelle
#

new WrappedDataValue(24, WrappedDataWatcher.Registry.get(Integer.class), 0),

echo basalt
#

only took forever and pinging me 25 times

carmine nacelle
#

had to change it to Integer.class instead of Byte.class

wet breach
#

You will get the hang of it. Just dont let bitmasks scare you

carmine nacelle
#

I still dont understand why it works

echo basalt
#

ngl I barely looked at your code

#

24's field is varint

#

varint is just a specially encoded int

wet breach
echo basalt
#

passing byte wouldn't ever work

wet breach
#

But 0 is an int not a byte

#

0b00 is a byte

#

My bad binary

#

0x00 is a byte representation way

carmine nacelle
#

so is it literally just this?

wet breach
#

0x04 refers to where in the bitmask that is

carmine nacelle
#
new WrappedDataValue(26, WrappedDataWatcher.Registry.get(Byte.class), (byte) 0)

So this is the same as

new WrappedDataValue(26, WrappedDataWatcher.Registry.get(Byte.class), 0x04)
echo basalt
#

0x04 is not 0

wet breach
#

So it is saying that option is the 4th bit

#

Or starts at the 4th bit

echo basalt
#

For context let's take a look at what hex converted to binary is

carmine nacelle
echo basalt
#

00000001 -> 0x1
00000010 -> 0x2
00000100 -> 0x4
00001000 -> 0x8
00010000 -> 0x10
00100000 -> 0x20
01000000 -> 0x40
10000000 -> 0x80

wet breach
echo basalt
#

This is the basics of a bitmask

carmine nacelle
#

oh shit

#

my binary is coming back slightly

echo basalt
#

A bitmask is just a byte representing up to 8 booleans

carmine nacelle
#

my beautiful drawing

echo basalt
#

And those booleans just correspond to if the bit is a 1 or a 0

carmine nacelle
#

the last is supposed to be 16 not 10

#

lmao

echo basalt
#

So we can say "one is false, two is true" by just saying

00000010

#

AKA 0x2

wet breach
#

So why waste that bytes space

carmine nacelle
#

So does X just replace everything before the 1..?

echo basalt
#

We can say "one is true, two is true" by saying
00000011
AKA 0x1 | 0x2

carmine nacelle
#

like :: in ipv6

echo basalt
#

0xwhatever just represents hex

wet breach
#

0x just refers which notation you are representing it in

echo basalt
#

0bwhatever just represents binary

carmine nacelle
#

ok so...

new WrappedDataValue(26, WrappedDataWatcher.Registry.get(Byte.class), (byte) 0)

(byte) 0, how does this reference 0x04 if its entirely different?

#

and 0 isnt 0x04

echo basalt
#

your the value indexed 26 is a bitmask

#

0 is all set to false

carmine nacelle
#

I thought it was the index..?

echo basalt
wet breach
carmine nacelle
#

So this is setting ALL options in 26 to 0

wet breach
#

So regardless how many bits you want everything to be 0

#

Because 0 as a byte is just 00000000

carmine nacelle
#

right

wet breach
#

If we split it into bits of 0

#

Its still all 0

#

Now conversely if we pass an int of 1

#

It would set the last bitnask

cold pawn
#

Hey does anyone know of a good way I can position slime entities on the head, body and feet of an npc lying down? Im using slime entities as a artificial bounding box, since when an npc is in a sleeping pose, there bounding box is to small and only at the feet. I wanna know how I can position the slime on top of the npc perfectly (or at least close to it), even if the npc turns diagonally at times.

wet breach
#

Because binary of 1 is 00000001

carmine nacelle
#

I get that part at least

wet breach
#

Right, so this how you use ints to set the bitmask

carmine nacelle
wet breach
#

Now java allows you to represent numbers in different notations too

echo basalt
#

Maybe a practical demo would help?

carmine nacelle
#

shadow to 0, see through to 0..

wet breach
#

Yes, but you need to use integer class

#

Otherwise byte representation to pass is actually 0x00000000

carmine nacelle
#

For what purpose?

#

hmm..

wet breach
#

To force the programming to convert it properly

carmine nacelle
#

but since im casting it to a byte, it converts the 0 to 0x00000000

echo basalt
#

Frosty you got this I got more to do than teaching bitmasks 😛

#

Use your military networking experience

wet breach
carmine nacelle
echo basalt
#

ugh

#

Look at your byte in its binary form

wet breach
#

I recommend just playing with it and convert it to different representations to get the idea

carmine nacelle
#

yes (byte) 0 is the same as 0x00000000

echo basalt
#

byte 0, in binary, is 0b 00000000, so all the bits are turned off, which means all values are false

carmine nacelle
#

I get that part

echo basalt
#

Let's say you only want the first value as true

#

You'd set.. 0x1 which in binary is 0b 00000001

wet breach
#

Oh right lsb and msb

carmine nacelle
#

So the first value would be "has shadow"

echo basalt
#

Correct

#

Let's say you want the second value to be true
You'd set... 0x2 which in binary is 0b 00000010

wet breach
#

So uh something we didnt cover minecraft uses LSB

echo basalt
#

So it's the second bit starting from the right

carmine nacelle
#

And if I wanted the "is see through" and "use default background color" to 0..

#

but not the first

#

00000110

#

right?

wet breach
#

Least significant bit first which is all the way at the right

echo basalt
#

Correct

eternal oxide
#

0x06

wet breach
#

Seems they are understanding now uwu

carmine nacelle
#

Well..

#

now im confused cause 0x06, wouldnt that mean all 3 ending digits are on?

echo basalt
#

Let's talk about this

00000001 -> 0x1
00000010 -> 0x2
00000100 -> 0x4
00001000 -> 0x8
00010000 -> 0x10
00100000 -> 0x20
01000000 -> 0x40
10000000 -> 0x80

eternal oxide
#

no

#

its 4 + 2

#

if the last digit is set it would be an odd number

echo basalt
#

add the numbers of the bits that are on in your bitmask

carmine nacelle
#

wait seriously? so if I wanted every other one
Has Shadow, Use default background color... it would be 0x00000101... so 0x5..?

echo basalt
#

So if you have essentially "110", right -> left it'd be (0 * 1) + (1 * 2) + (1 * 4) which results in 2 + 4 which is 6

carmine nacelle
#

ahhhh...

echo basalt
#

The idea of a bitmask is that it's just a number whose binary representation is seen as a list of booleans

wet breach
#

This is the moment the light bulb finally turned on for them and they can now see

carmine nacelle
#

so I need to set all my values at once?

#

Like, if initially I want to set "has shadow" and "use default background color", I have to do 0x05

echo basalt
carmine nacelle
#

but say later on, I want to only enable the "has shadow"

#

I need to re-set the entire bit

echo basalt
#

Yes

wet breach
#

Yes

carmine nacelle
#

i see..

echo basalt
#

Now, notice this funky thing

echo basalt
carmine nacelle
#

wait dont ruin it

#

i finally understand

#

😭

eternal oxide
#

wait until he starts throwing & and | at you 🙂

echo basalt
#

It's pow(2, index) where index starts at 0 (I'll refer this as 2 ^ exponent)

So
2 ^ 0 = 1 (0b 00000001)
2 ^ 1 = 2 (0b 00000010)
2 ^ 2 = 4 (0b 00000100)
2 ^ 3 = 8 (0b 00001000)
...

#

But we don't use pow when it comes to bits, we just do bitshifting :)

wet breach
echo basalt
#

Or just use the windows calculator in programmer mode

wet breach
#

But i dont think they are ready for that yet

echo basalt
#

Bit shifting is basically... shifting bits

wet breach
#

Basically? It literally is lol

echo basalt
#

So

0b 00011100

<< 1 (left shift one) is 0b 00111000

1 (right shift one) is 0b 00001110

echo basalt
#

except when they go out of bounds it's just gone

wet breach
#

Its probably one of the few things in programming its name is quite literal

echo basalt
#

yeah

#

Throwback to when I was messing with collisions and nms had this mess

#

But back to bitmasking

#

You can set your numbers individually by doing

(to set to true)
bitmask |= number

(to set to false)
bitmask &= ~number

#

Like I did here

#

This is probably the easiest example I got for bitmasks used in minecraft

eternal oxide
#

0x01 | 0x02 | 0x04 == 0x07

echo basalt
#

ye

eternal oxide
#

easy to read bit masking

echo basalt
#

0x07 | 0x04 = 0x07 because the bit is already set :p

#

vivian probably left the convo 5 mins ago and we're just showing off

eternal oxide
#

he's sat in teh corner dribbling

echo basalt
#

it's not an opinion my dude

zenith gate
#

You guys got mad Skillz

orchid gazelle
#

Yoo guyd

carmine nacelle
#

So, if I wanted to change this to being a green background instead.. how would I get the integer for a specific green color? I know how to get the hex through just an html color picker new WrappedDataValue(24, WrappedDataWatcher.Registry.get(Integer.class), 0),

echo basalt
#

Just convert that hex to base 10

glossy mantle
#

How do i create a 1.8.9 mod? All tutorials fail for me

echo basalt
#

pretty sure you can pass 0xAB12EF

#

?whereami

zenith gate
echo basalt
zenith gate
glossy mantle
zenith gate
#

all good.

echo basalt
#

After enough time you'll eventually need this

zenith gate
#

I mean idk. rn im just making a simple rpg plugin type thing. Im stuck on set bonuses for armor. I doubt i will lol.

echo basalt
#

Some of us have been doing this for years or decades

carmine nacelle
echo basalt
#

I've been doing programming for 12ish years, plugins for the past 6

zenith gate
echo basalt
#

It hasn't been until the past few years that I needed to learn this

#

Or even had the mental capacity to learn (I just turned 18 a couple months ago)

zenith gate
#

i turned 17 2 weeks ago lol

echo basalt
#

Ehh you're still on time

#

should I have another energy drink and make tnt tag in an hour think3d

#

think my body's gonna cry for help if I do

zenith gate
#

I just lack the motivation to continue doing it. It's a lot of work and it keeps growing. Sometimes it just comes to much for me to work on my own.

zenith gate
#

make it so when they explode they explode of villager sounds 🙂

echo basalt
#

Customer's the one doing the decisions, not me

#

but like.. I've already got the weirdest mix going on

#

Cause I had dinner, an energy drink

zenith gate
#

Perfect combo

echo basalt
#

and prescription pills

zenith gate
#

got the Gamer Fuel

echo basalt
#

nah

#

closest thing I got to g fuel is watermelon flavored protein powder

zenith gate
#

lmfao

echo basalt
#

that you mix with water

zenith gate
#

sounds gross

echo basalt
#

it literally tastes like watermelon juice

#

it's clear isolate

#

there are a few poses that minecraft has

#

crawling is just "flying with an elytra"

#

or

#

"sleeping in a bed"

#

depends in how you say it

#

it's usually just done with packets

#

I did it at work once by spawning a fake npc that was lying down, teleporting the player into the ground and setting them invisible

#

and spawning a client-sided barrier on their head so they couldn't jump

#

but that was for a zombies minigame

zenith gate
#

god damn what havent you done.

echo basalt
#

uhh

#

no clue honestly

#

only things I haven't made are uhh

#
  • a scoreboard plugin
  • a chat plugin
  • fancy particle effects
#

probably

#

most likely for youtubers

zenith gate
#

I would kill for fancy particles.

echo basalt
#

did a "minecraft but I'm spider man" plugin once

#

I've made over 500 projects over the past 6 years it's hard for me to tell

zenith gate
#

youve been doing this since you were 12?

echo basalt
#

yeah

#

making money of it since I was like 13-14

zenith gate
#

I've been coding since I was 11, but didn't start minecraft until like a year or 2 ago.

echo basalt
#

made bots for flash games

zenith gate
#

WHAT?

echo basalt
#

and shitty programs in C

zenith gate
#

How could you have gotten into it at 6?

echo basalt
#

I had no friends

#

and I played this game where it had fun minigames ran by bots

#

and I saw a tutorial on how to make my own

#

and made a bot that spawned a random maze that'd close in and whatever

#

then I revised the project a couple years back, added a points system, made a shop

zenith gate
#

damn my undiagnosed ADHD would have never allowed me to do that lmao

echo basalt
#

made friends with the game's devs

#

think I also made a bot that'd grab your movement and make a sort of 2d shooting game (it was a 2d sandbox game)

#

pressing space to shoot

carmine nacelle
echo basalt
#

And we'd have capture the flag, team deathmatch, free for all

#

I made a command system, a map system

#

it was fun

zenith gate
#

I wish i could have the motivation to do all that. and probably would like to go back and learn a better language to start off.

echo basalt
#

I started with C# and then moved to C and Java

zenith gate
#

I started with python, moved to Lua, an JS, I only use Java to code plugins I dont know like anything outside of that.

echo basalt
#

for example pure white would be new Color(255, 255, 255).getRGB()

carmine nacelle
echo basalt
#

the other color

zenith gate
echo basalt
#

not bukkit's

carmine nacelle
#

so, not the bukkit one

#

weird

zenith gate
#

Congrats!!

carmine nacelle
#

Is there a way to do transparency?

#

I dont see a getRGBA() or similar

young knoll
#

Bukkit's color has an asARGB() now

#

But idk about the one you are using

echo basalt
carmine nacelle
#

Yeah but I dont see an option for using alpha with this guy

#

I dont get why its telling me it has private access

#

like why do I care just WORK

zenith gate
#

Is there a time delay that is needed when a player joins for editing their PDC? I need to get 3 booleans on login to see if they get these improvements or not. rn they just dont get them.

echo basalt
#

alpha is transparency where 255 is solid

#

and 0 is transparent

carmine nacelle
#

neither are working for me.

echo basalt
#

awt

#

you might need to bump your java version up but I honestly doubt it

carmine nacelle
#

For me, AWT doesnt let me use alpha

echo basalt
carmine nacelle
#

poggers

#

ily guys in the gayest possible way

#

lmao

#

TRANSPARENCY BAYBEEE

echo basalt
rough drift
summer scroll
#

Hello, i'm trying to learn how to use mongodb, so i have a data saved on yml like this https://paste.md-5.net/ilorubolag.bash, how can I convert it into mongodb?

the data is about logging every actions that the player do on item with custom model data

echo basalt
#

So you need to create a "codec"

#

A codec is basically a serializer for a specific object

#

Or you can just... write it in the document class but I wouldn't advise

#

If you already have a data class that represents that object it'd be ideal

summer scroll
#

i have an object called Action which stores the type, date, and location

echo basalt
#

Alright so you can probably make an ActionCodec

#

which is just implementing the codec class and doing the stuff

#

A codec looks like this

#

I made a static instance because I can't bother actually doing DI for this

#

Then on your mongo class, you'd make a MongoCollection<Action> after registering the codec

#

and that's.. your collection

summer scroll
#

if you can see on the link that i put here

#

the action data is under the "counter" section

echo basalt
#

Yeah so

#

You make a data class for that and a codec

#

You can make multiple codecs and reference each other to split your code up

#

Like I do here

summer scroll
#

so i can have a codec that have another codec?

echo basalt
#

You can make a codec call another codec

#

It's basically just a serializer

summer scroll
#

so like i have multiple types of action, and every action has different data that needs to be saved

#

i have like inventory action too, so when player move around the item on inventory it will have a log

#

and it has information what inventory type that player is interacting in

echo basalt
#

Yeah so you'd make a codec for each type of action

#

basically you want to serialize this

#

Or you can just... save all of this data individually into a Document and skip the codecs entirely but that's not really advisable

summer scroll
#

i have classes like this, can i just implement the codec there?

#

is it possible to save multiple objects but with same uuid on mongo?

#

i can do something like that in sql as long as the uuid is not set to be unique

echo basalt
#

uhh

#

great question

compact haven
#

you can't have 2 entries with the same row id in sql

#

and the _id field acts as the row id in mongo

#

so I highly doubt it

summer scroll
#

if i was using sql, my plan was to create a table with column like
"player_uuid, item_uuid, item_material, item_custom_model_data, action_type, action_date, action_location.... etc"

summer scroll
lilac cobalt
#

How can i outline a container for many types of data that can be set and used across multiple files in java? I want to make an outline for a custom item. Containing things like a name, a function that might be ran for specific cases, the type of event those functions will be ran on, ect. Is it a good idea to use classes for this?

river oracle
#

You should use classes for everything

vital sandal
#

is it possible to make an item display with A lore when it real lore is B :l?

#

like client-side lore?

ivory sleet
#

Yes

vital sandal
#

any reference for that?

ivory sleet
#

Packet interception

#

Basically

vital sandal
#

I don't thing it is the packet :l

compact haven
#

that's exactly what you do lmfao

vital sandal
#

or if so it gonna be a lots of things to do

compact haven
#

you intercept the inventory packet and change the lore before it's sent to the client

vital sandal
#

;-; dam that gonna be painful to do so

compact haven
#

correct

echo basalt
#

and if you're on creative

#

that lore duplicates

#

unless you're smart

compact haven
#

creative is just bullshit, they still haven't fixed that nonsense yet?

vital sandal
compact haven
#

I don't understand how you know Hypixel has this because you wouldn't know the item's real lore if they wanted to change it on your client

river oracle
#

Why did you delete that lmfao

compact haven
#

Unless you mean like you drop the item and they see something else, then yes

river oracle
lilac cobalt
#

I think i'm lacking some pretty fundamental knowledge

compact haven
#

what you described is literally an interface, I guess?

echo basalt
#

I made something with client-sided lore in the past

#

it's ass

#

don't recommend

wet breach
river oracle
#

?learnjava

undone axleBOT
river oracle
#

These are all good links

#

Though for oop specific things you might wanna do your own research

compact haven
#

@peoples make an API to set an ItemStack's lore for a particular Player on their client, with the option of persistence using PDC perhaps?

#

would be sick and I'd love you for it

#

would be saved in my Spigot bookmark folder

echo basalt
#

can't bother

river oracle
#

Cb f u ck ed

echo basalt
#

client-sided lore is done with a couple packets

#

and is usually done by intercepting rather than actually sending new data on top

#

unless you want to be that guy sending a packet every tick

compact haven
#

ofc its intercepting

#

why u explaining

echo basalt
#

because I've done that before

latent bone
#

i don't like packets and i've never gotten round to learning about them, but should I?

echo basalt
#

if there's no better way to waste your time, sure

latent bone
#

ty

young knoll
#

Yeah the creative issue with client side lore is annoying

#

Granted it doesn’t matter if ur hypixel, they probably don’t use creative :p

echo basalt
#

or they can just afford to write those extra 2 checks

wet breach
young knoll
#

Well yeah you can just strip it on the incoming packet

#

Or just don’t show it for people in creative

echo basalt
#

p much

young knoll
#

Stripping it can be kinda annoying since you need to know what lines you are stripping

echo basalt
#

it's usually just the last X lines you'd be adding anyways

#

if you only add a single line saying its rarity, then you only remove that 1 line if the item's source is the creative inv

young knoll
#

True

#

Until you add a variable amount of lines

zenith gate
vital sandal
#

and armor bonus which showing on the amors is changed by who see it

#

like if you wear 2 pieces you see any thing 2 pieces bonus

compact haven
#

mm I see

#

then yes, it probably intercepts packets

ivory sleet
carmine nacelle
#

Is there a fancy way of adding "interactability" with the new TEXT DISPLAYs?

#

Other than just intercepting the interact packet

young knoll
#

I assume they are client side only

carmine nacelle
#

hmmm..

young knoll
#

In your case

carmine nacelle
#

so how could I make something happen when right clicking a text display..?

#

Before, I was using an armor stand..

young knoll
#

If you actually spawn then on the server you can raytrace

#

Or you could attach an interaction entity to it

carmine nacelle
#

yeahhh.. im doing per-client though..

#

interaction entity..?

young knoll
#

It’s an entity designed for detecting interactions

#

They can have a custom width and height

carmine nacelle
#

Can that be done on the client?

young knoll
#

Don’t see why not

#

It’s an entity

carmine nacelle
#

EntityType.Interaction, eh?

#

How could I attach that to another entity?

young knoll
#

Make it a passenger

unborn sable
#

Help making a system to mount any entity

carmine nacelle
#

Would that trigger an INTERACT_AT packet..?

#

yes, yes it does

#

nice

brave lynx
#

Help applying potion effects

wintry zenith
#

how can i get the block under a player?

young knoll
#

Get the players location and go one block down

#

You can either subtract one from the Y of the location

#

Or getBlock.getRelative

wet breach
wintry zenith
# young knoll Get the players location and go one block down

this is my code and that's what trying to do but its not functioning as i expected

public class pathspeed implements Listener {


    private int SPEED_BOOST = 2;

    Plugin plugin = DoofsToolkit.getPlugin(DoofsToolkit.class);

    @EventHandler
    public void onpathblock(PlayerMoveEvent e){

        Player player = e.getPlayer();
        Block block = player.getLocation().subtract(0, 1, 0).getBlock();

        if (block.getType() == "minecraft:stone") {
            player.setWalkSpeed(player.getWalkSpeed() + SPEED_BOOST);
        } else {
            return;
        }

    }


}

young knoll
#

That’s not how you compare block types

#

Block.getType returns a Material enum value

wet breach
#

Well wasnt too far off

wintry zenith
#

ooooh

wet breach
#

The change needed wont draistically change their code much so that is good

#

Just change that string to Material.STONE

#

Or to whatever material you are checking for

wintry zenith
#

if block.getType returns a Material then what checks for the block id?

zenith gate
young knoll
#

You can use Material.getKey to get the namespaced key of a material

#

And then toString that

wet breach
# zenith gate What do you mean I’d see it differently? What changes ?

When you do it as a job, you lose freedom in what you want to do and you are obligated to do whatever the employer is wanting you to do to include not optimizing or using non optimal solutions. When it is just a hobby you put whatever time you want into it as well as dont really answer to anyone

zenith gate
wet breach
#

But when you do it as a job all the time, you may lose interest in doing it as a hobby since your job requires you to do that programming for like 8-12 hours a day and may not want to use that free time you get to work on hobby projects

#

Some people manage to do both but from my experience that isnt the majority of people lol

#

So just a warning if you do seek jobs in the programming industry

zenith gate
#

Yeah, that kind of sways what I’d want. Cause I would probably get tired of it.

young knoll
#

Maybe I should have thought of that before going to college for it

#

Welp

wet breach
#

Lol

zenith gate
#

But that student debt was calling for youuu

young knoll
#

Maybe I’ll get lucky and end up like Notch

#

Minus the dumb twitter posts

zenith gate
#

Nahhh you’d have to have them. 😂

wet breach
carmine nacelle
#

Would anyone know why my plugin is loading before Vault even though its in the depends?

#

My plugin needs Vault to do some things, but it loads after it

young knoll
#

Make sure your depends is properly formatted

carmine nacelle
#

depend: [ProtocolLib, Vault]

young knoll
#

And the exported jar has the updated plugin.yml

wintry zenith
# wet breach Just change that string to `Material.STONE`

this is my code now and im not getting any errors but it is still not working

@EventHandler
    public void onpathblock(PlayerMoveEvent e){

        Player player = e.getPlayer();
        Block block = player.getLocation().subtract(0, 1, 0).getBlock();

        if (block.getType() == Material.STONE) {
            player.setWalkSpeed(2);
            player.sendMessage("on" + block.getType());
        }

    }

wet breach
#

Should be subtract 1

#

On the location

#

You are getting 2 blocks below the player

young knoll
#

What

#

They are subtracting 1

wintry zenith
#

it was meant to be 1 but was testing 2

young knoll
#

Ah

#

Sneaky edit

wintry zenith
#

and it is still not working

young knoll
#

Is the event registered

wet breach
#

Check the event is registered and that the block below is indeed stone in the game

wintry zenith
#

no lol i feel kinna dumb lmao

unborn sable
#

Does .addPassenger let me put a player on top of any entity?

wintry zenith
#

to be fair its my first day so its not habbit yet ig lol

carmine nacelle
#

Is my depend not properly formatted or something..?

wet breach
carmine nacelle
#

for some reason, it seems like vault loads, disables, then reloads?

wet breach
young knoll
#

depend is the one for load after

carmine nacelle
#

Yeah im using depend..

#

I mean.. how? ```java
public void onEnable() {
if (!this.setupEconomy()) {
this.getServer().getPluginManager().disablePlugin(this);
return;
}

#

I gotta get a Vault instance onEnable

wet breach
#

Just check in the onenable for vault being loaded after like a minute or two or being enabled

carmine nacelle
#

What if someone tries to do something within that time that requires vault?

#

it'll error

wet breach
#

Not if you just dont allow it or delay it

young knoll
#

You can delay it by a tick and it should work fine

carmine nacelle
#

I delayed it by 5 seconds and it still didnt work

young knoll
#

Since scheduled tasks don’t start until after everything is enabled

carmine nacelle
#

hmmm..

#

yep this is super weird..

wintry zenith
#

what the hack player.setWalkSpeed(2); is not working but player.setHealth(0); is

glad prawn
wintry zenith
unborn sable
wintry zenith
#

its working thanks for the help!

young knoll
#

Apparently -1 is reverse

#

Didn’t know that was possible

unborn sable
young knoll
#

I guess so

fluid river
#

Tho if you depend on Vault, your plugin always loads after it

wintry zenith
carmine nacelle
#

ive tried depend, softdepend

wintry zenith
fluid river
#

Show your log

#

Entire

carmine nacelle
#

The error it says isnt the actual reason its crashing

#

[00:44:04] [Server thread/ERROR]: [CadiaCore] [CadiaCore] - Disabled due to no Vault dependency found!

unborn sable
#

Unsupported API version 1.2

I get this error when setting the api-version in plugin.yml to 1.20

kind hatch
#

Wrap it in quotes.

fluid river
#

Im quite sure u are registering perms or economy there

unborn sable
carmine nacelle
#
    public void onEnable() {
        if (!setupEconomy() ) {
            getLogger().log(Level.SEVERE, (String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName())));
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        this.setupProtocolLib();
        this.registerClassInstances();
        //this.furnaceRecipes.registerRecipes();
        this.loadConfigs();
        this.registerListeners();
        this.registerCommandExecutor();
        this.hologramManager.spawnOwnableHolos();
        this.holoListeners.registerHoloListeners();
        CadiaCore.instance = this;
    }
    private boolean setupEconomy() {
        if (getServer().getPluginManager().getPlugin("Vault") == null) {
            return false;
        }
        RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            return false;
        }
        econ = rsp.getProvider();
        return econ != null;
    }
kind hatch
young knoll
#

That PR will be merged on day

#

Maybe

fluid river
carmine nacelle
#

Vault

fluid river
#

Well thats the error

#

Vault requires editional economy plugin on top of it

#

Any

carmine nacelle
#

?

fluid river
#

XConomy, EssentialsEco

#

Otherwise it will always return false

glad prawn
#

tf

fluid river
#

On setupEconomy method

carmine nacelle
#

bro..

#

is it seriously erroring cause i dont have essentials on my test server

#

i swear to fking god

unborn sable
#

Why can I drop items even when cancelling PlayerDropItemEvent?

fluid river
#

Vault for some reason only registering eco with any economy plugin

#

And perms with PEX or LP

carmine nacelle
#

jesus christ bro

#

i spent WAY too much time on that!!!

#

THANK YOU

kind hatch
#

It's one of the biggest misconceptions people have about Vault.
Vault is just an API. Nothing more, nothing less. It cannot be an economy plugin itself.

fluid river
#

Yeah

young knoll
#

It’s also not a perms plugin

fluid river
#

Its just using this RegisteredServiceProvider stuff

young knoll
#

It’s nice to have a unified api

fluid river
#

Which is part of bukkit iirc

young knoll
#

Even if it is somewhat dated with no async support

fluid river
#

Well, you can write your own economy plugin based on vault

#

In like 20 mins

young knoll
#

Yes but the vault api doesn’t support async

fluid river
#

To test your stuff

young knoll
#

Would be nice to have some future methods

fluid river
young knoll
#

Fair

kind hatch
#

Did the Treasury devs ever gain enough popularity?

fluid river
#

What is Treasury

kind hatch
#

A Vault alternative.

fluid river
#

Never heard of it

#

So i guess in Russia it's unknown

#

Every server i worked on used Vault and random eco plugin

#

And LuckPerms ofc

kind hatch
fluid river
#

I guess we are the last guys who switched from PeX to LP

#

Im sure half of russian servers still use pex tho

quiet ice
#

They are doing a V2.0 of the api rn

vocal cloud
#

They claim that Vault is outdated but without evidence the claim really doesn't hold water

quiet ice
#

Vault really is outdated, there is no point arguing against that

fluid river
#

It just works TM

fluid river
quiet ice
#

Meh, UUID support is the main thing I am looking forward to

#

But it won't happen in vault - ever

fluid river
#

For years i thought that Vault isnt a real word

#

Several years ago i found this word in a random book

vocal cloud
#

The biggest issue with treasury would probably be their willingness to break things. Would mean that plugins would require a specific version. I guess you could shade it if you really wanted to

fluid river
#

Still everytime i read it i get Vault's icon from dev.bukkit in my head

vocal cloud
#

B I G decimals kekw

fluid river
#

They are doing Biiig decimals here

glad prawn
#

Whats that plugin name

fluid river
#

Treasury?

#

iwant_tptoassrn

#

Sorry

#

Im Havent slept in 2 days

glad prawn
#

ayo

quaint mantle
#

What packet gets sent when u right click a block

wet breach
#

Depends on the block as there could be multiple packets

solemn compass
#

how do i use hex color codes for text in 1.20 spigot?

#

i used this before

        Bukkit.getConsoleSender().sendMessage(net.md_5.bungee.api.ChatColor.of("#0033ff")+"["+net.md_5.bungee.api.ChatColor.of("#ffffff")+"FactionsUUIDLOTR"+net.md_5.bungee.api.ChatColor.of("#0033ff")+"] "+ChatColor.RESET+message);
#

but it doesnt work anymore in newer spigot

buoyant viper
#

?jd-bcc

carmine mica
#

I like how that link has "latest" in it, when it really isn't the "latest"

#

still using 1.16 bungeecord chat stuff

solemn compass
#

thats gone

#

i cant reference it in 1.20 spigot api

buoyant viper
carmine mica
#

run either mvn dependency:tree or gradlew dependencies and see if its listed

solemn compass
#

uh

#

i cant run that lol

tacit drift
#

🧌🧌

solemn compass
#

no

#

i literally put in the terminal

#

and error

buoyant viper
#

probably doesnt have maven or gradle installed :v

#

just using them thru IDE

solemn compass
#

well i opened a plugin i made for 1.17

#

and changed it to 1.20

#

and this broke the net.md_5 stuff

smoky anchor
#

what exactly did you change
and how
where

solemn compass
#

i just removed the old 1.17 spigot api jar from my external libs

#

and put in spigot-api-1.20.1-R0.1-20230626.214335-16.jar

wintry zenith
#

im trying to set a horses heath two double on spawn

this is my code so far

public class HorseBuff implements Listener {

    @EventHandler
    public void Spawn(EntitySpawnEvent e){


        if (e.getEntityType() == EntityType.HORSE){
            // set health * 2
        }

    }
#

does anyone know what i would use to do this?

quaint mantle
#

To set the health?

smoky anchor
smoky anchor
wintry zenith
wintry zenith
smoky anchor
#

uuhh I believe only LivingEntity has attributes so you have to cast the entity
if you can use instanceof pattern matching as well

quaint mantle
#

There is any like e.getEntity().setHealt() or something like that?

smoky anchor
#

that I believe is deprecated

quaint mantle
#

Idk, never managed with that

smoky anchor
#

in LivingEntity

#

wish we had something like

#

?health

quaint mantle
#

How you use the docs

smoky anchor
#

you search...

wintry zenith
#

how would i implement this?

wintry zenith
#

like this is where im at and it wont let me get or set attributes

@EventHandler
    public void Spawn(EntityTameEvent e){


        if (e.getEntityType() == EntityType.HORSE){
            // set health * 2
            e.getA
        }

    }

pseudo hazel
#

they said to cast your entity to a living entity

#

since attributes only apply to living entities

eternal night
#

e is an event here... not an entity

pseudo hazel
#

well that might also help

#

actually getting the entity

#

poor naming

wintry zenith
#

now what would i put in to set the max health

@EventHandler
    public void Spawn(EntityTameEvent event){


        if (event.getEntityType() == EntityType.HORSE){
            // set health * 2
            
        }

    }
pseudo hazel
#

I would start by getting the entity...

solemn compass
#

i used shaded jar instead

sterile breach
#

Hello, i am trying to create placeholders with placeholder api (not using any exetension, directly the plugin), so i create my project, ans depends, i add PlaceholderAPI, and then i also have to do something in pom.xml?

wintry zenith
pseudo hazel
#

there is no setAttribute

#

you use getAttribute

#

I mean just look at the docs I guess

quaint mantle
#

If I’m wrong correct me pls

smoky anchor
#

if (entity instanceof LivingEntity livingEntity) { livingEntity..... }

I am not giving more

#

?learnjava

undone axleBOT
wintry zenith
smoky anchor
#

in that case

pseudo hazel
#

well looking at docs should not be a java exclusive skill

#

and also mardroide and steve should look the docs as EntityTameEvent::getEntity returns a LivingEntity

quaint mantle
#

He want to set the healt when spawning

#

But yeah

pseudo hazel
#

yes

smoky anchor
#

they changed the event for some reason

pseudo hazel
#

well then he shouldnt use the tame event to begin with

#

oh i see

smoky anchor
#

maybe they changed their mind ?

pseudo hazel
#

its fine

quaint mantle
#

Better I don’t say anything because I will be wrong a 100%

pseudo hazel
#

well if you never say anything you will learn way slower

#

better to get corrected on something you said than not say anything at all

#

generally speaking ofc

quaint mantle
#

Yeah, but some people correcting sometimes are so annoying 😂 the just say ‘learn Java’ idk if I explained that well.

wintry zenith
#

thanks for you help guys i just dont think my brain was braining because im very sleep deprived :/ Have a good rest of your day/night.

quiet ice
smoky anchor
quiet ice
#

Well that was well below the original message, hence I assumed it went unnoticed

smoky anchor
#

fair

shadow night
#

How do I make the other players clients think that a certain player has no armor or items?

quiet ice
#

And eh, better be safe than sorry

shadow night
#

What packets

quaint mantle
#

There is anyway to like change the opacity of a player?

smoky anchor
#

uhhh
you only have one set opacity that you get with invisibility and some team settings

vivid cave
#

how to get the actual displaying name of an itemstack?
Example: if no name was set, it should answer what's displaying still "Netherite Chestplate"
Are those hard coded or can I actually retrieve it? (i can always make a custom function ofc)

#

.getDisplayName() doesn't do the job well, it just for custom names

#

its null if no name was set

quaint mantle
shadow night
quaint mantle
#

If you also have been vanish

vivid cave
shadow night
onyx fjord
#

Debug them

#

Add a print line that sends the packet type for every packet

shadow night
#

There must be some packet sent to the other clients, so ig time for fun

smoky anchor
shadow night
#

Hmm

smoky anchor
#

Tho I have not looked at the items
wiki.vg is great resource for this

shadow night
#

Last time I went to wiki.vg, firefox told me to fuck off

smoky anchor
#

hmm I just accessed it with firefox tho 🤔

shadow night
#

Lol

smoky anchor
#

yes

prisma sedge
#
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.19.4-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>``` I'm trying to use nms, I watched a video on it and really just don't get it
#

anybody up to help me?

eternal oxide
#

?nms

prisma sedge
#

I'm trying to do it with paper.

eternal oxide
#

?fork

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

prisma sedge
#

got this shit down huh

placid moss
#

?whereami

prisma sedge
#

this place is a joke bruh

eternal oxide
#

Use spigot and we'll help. You are not.

quaint mantle
#

You are a joke

prisma sedge
#

Woah now, no need to get all mad guys

shadow night
#

what event is fired when a player picks up an item?

eternal oxide
#

PlayerPickupItemEvent

shadow night
#

thanks

prisma sedge
#

bro has been typing for a while

shadow night
prisma sedge
#

Bouta read none of it

quaint mantle
#

Don’t read then

prisma sedge
#

Damn thas sad

prisma sedge
shadow night
prisma sedge
#

I mean it still works

eternal oxide
#

PLAYER

prisma sedge
glad prawn
#

Why

shadow night
#

I don't use deprecated shit

#

it's deprecated for a reason

glad prawn
#

Yes

shadow night
eternal oxide
#

PlayerPickupItemEvent is not deprecated

prisma sedge
#

Let me check

shadow night
eternal oxide
#

You are not using Spigot

shadow night
#

this is the page you just sent

glad prawn
#

Yes

eternal oxide
#

um, I'm probably reading wrong.

#

Yep you are 100% correct

#

EntityPickupItemEvent is its replacement

shadow night
#

just check if entity is instanceof player and do whatever needed

prisma sedge
#

It's not deprecated on paper

quaint mantle
#

Bruh

shadow night
#

this is spigot

#

not paper

#

I don't care about what is what on paper, I use spigot

smoky anchor
#

petition to add :nopaper: emote ?

shadow night
#

yes

smoky anchor
#

cross_mark 📜

shadow night
#

nopaper

quaint mantle
#

I’ll make a emote for that

glad prawn
#

🥵

split lichen
#

Does anyone know if there is a way to organize and structure the hierarchy of npc names on the tablist? I'm developing a minigame which utilizes fake player instances, and I'm assigning kits to them which are showcased on the tablist. The problem is, there should be a descending order of how the players are displayed, from the rarest kit to the most common one. I'm familiar with teams and how to manipulate players on the tablist, but I'm unsure what the best approach here would be considering I'm using packets to display npc info. Any help would be much appreciated.

smoky anchor
tribal valve
#

how i can ban player on ALL servers, cuz im making a spigot plugin for bungeecord server and if i ban player on 1 server, they can still join other servers, how i can fix that

chrome beacon
split lichen
split lichen
chrome beacon
#

Teams uses player names or uuid

#

You don't need to do anything special

#

Entering the npcs information in to the team api should work just fine

eternal oxide
#

if you want to order them in tab use unprintable chars in the team prefix

split lichen
#

Essentially yes, I'd like them to be displayed in the tablist with respect to the rarity of the kit they have, which would place them above some players and below others

#

I was researching if this could be done in a different way with packet manipulation, as I don't think adding them into teams worked properly

#

the method is #addEntry which takes in a string

eternal oxide
#

players you add by name, entities you add by UUID.toString()

split lichen
eternal oxide
#

the entities UUID

split lichen
#

But I'm creating and sending a player info packet to display the npcs in the first place, there are no actual npc entities

eternal oxide
#

you are using players so you use their name

#

You have no Bukkit entity so you will have to send team meta packets yourself

split lichen
#

with team manipulation

#

I'll have to do some research into team meta packets, I don't think I've heard of that

eternal oxide
split lichen
#

you've given me enough info to work with, thanks for the help, I'll do some more research into the problem

onyx fjord
#

😮

shadow night
onyx fjord
shadow night
#

I remember, when coding discord bots there was some error that made returns crash sometimes because of some shitty library and since then I'm scared to return lol

onyx fjord
#

what

quaint mantle
onyx fjord
#

that creates a layer of nesting

#

for no reason

quaint mantle
shadow night
#

I wish I could do shift alt f or whatever it was in vscode to format my code

onyx fjord
#

if (!(entity instanceof Player player)) return;

shadow night
#

idk how to do that in ij

onyx fjord
#

this works exactly the same

quaint mantle
#

code > format code