#help-development

1 messages · Page 1139 of 1

vagrant stratus
#

64, 32/32 16/16, etc

chrome beacon
#

And to prevent weird issues on the client you hide the tag from them

pseudo hazel
#

unless you assign 1 id for an individual item

#

i.e. a full 64 stack would have 64 ids

chrome beacon
#

yes

#

That

pseudo hazel
#

and then on crafting you run into small issues

#

you would need to keep track of what ids were used to craft which new id(s)

vagrant stratus
#

.

chrome beacon
pseudo hazel
#

yes

#

a db is the only sane way

vagrant stratus
#

or

item id -> crafted into <crafted_identifier>

pseudo hazel
#

yes

#

or store the craft event

#

this set of ids crafted into another set of ids

vagrant stratus
chrome beacon
#

PostgreSQL uwu

vagrant stratus
#

If I can get something good enough, it would be useful to determine user fuckery & what not

rough drift
#

what are you trying to do

vagrant stratus
#

.

pseudo hazel
#

user fuckery in what way

vagrant stratus
#

If robust enough, it could be a way to detect dupes, for example without having to check for specific methods

pseudo hazel
#

how though

rough drift
#

stackables are a PITA but you could do it by the following:

- Track every inventory update that could ever be done
- Store the slots for each stack
- If an item is dropped and the inventory matches the correct hash prior to dropping (i.e. based on the changes you've observed, because sometimes events aren't fired or players can edit their inventories with NBT), store that UUID as a dropped item that you want to track
- On pick-up put remove the UUID -> Item and change it to Inventory -> Slot -> Item
- On item destroy, prevent or remove UUID -> Item

this should be pretty resistant to every change you could make

pseudo hazel
#

also how would you even let players stack items with different ids

#

unless nothing is stored on the item itself

#

pita?

rough drift
#

Pain in the ass

pseudo hazel
#

ah

rough drift
#

Also build a history

rough drift
#

of event -> inventory hash

vagrant stratus
#

Shouldn't be toooooooo annoying. Gonna look into unstackables first, since I can just fuck with their PDCs directly since again, it doesn't matter

#

Those will likely be the only consistently good way to determine duplicated stuff as well, given how some of the dupes work

pseudo hazel
#

also what about anvil repairs and stuff

#

like repairing a near broken pickaxe with a fresh diamond

#

does the pickaxe keep the same id

#

or is it basically a new item

vagrant stratus
#

for unstackables, it shouldn't matter as the PDC (should) stay the same

pseudo hazel
#

right

#

but what about the diamond used in the process

vagrant stratus
#

unless it's stackable item + unstackable item merging, in which case a new id is assigned, and logged as such w/ the relevant older ids

pseudo hazel
#

yeah

#

I think you would have to make a new item every time

#

otherwise you would have a situation where you repair a pickaxe with some id, and an item was used for that, but if you dont assign new id you cant easily determine when the item was used to basically merge into the existing item

vagrant stratus
pseudo hazel
#

yeah

vagrant stratus
#

as long as the older ids get logged, it (hopefully) shouldn't matter lol

pseudo hazel
#

any operation involving multiple items need to create new ids

vagrant stratus
#

Yea, luckily not too much of a hassle. It is only a hassle for stackable items though, since you can't easily add anything to an item w/o making it impossible to stack lmao

#

Luckily, still possible, just a bitch to impl

pseudo hazel
#

wdym

#

the usecase I just explained involves and keeps an unstackable item

#

or do you mean the opposite

#

there are like 4 negations in that sentence

vagrant stratus
#

Unstackables are stupidly simple to implement (thank god) but still a hassle, due to a bunch of things that need to be taken into account. Stackables are a bitch, but still possible to support properly even though you can't modify an item directly w/o making it unstackable

pseudo hazel
#

right

#

you would have to edit the item after its been stacked or whatever

#

or like voodoo said, keep track of the inventories the items are in

vagrant stratus
pseudo hazel
#

yeah

#

I usually start with the hardest case

#

since it usually means I dont have to refactor everything once I get to the other cases

#

something that works with stackables automatically works for non stackables if its a bit flexible

vagrant stratus
#

I'll probably end up refactoring it a bunch anyways lol
Plus, they're usually one of the main things that are likely to trigger automated checks (e.g. nerds duplicating armor, swords, enchanted books, etc and the like), might as well get that out of the way first

#

and, again, in the case of unstackables I can rely purely on PDC so for the most part it's just gonna be a bunch of if statements & logging lol

pseudo hazel
#

yeah true I guess

#

or shulker boxes

#

probably nr 1 dupe target if I was playing xD

vagrant stratus
#

Yea, or those. Stackables still get duped, but unstackables are higher priority due to ease of implementation & the fact that they're (usually) higher priority in regards to being duped

#

checking is also easier, since it's just a matter of looping the inv and checking unstackables for the same ID

vagrant stratus
#

Honeypotted items, think gps in bank money kinda thing. Niche, but has its uses

vagrant stratus
#

remembered itemstack hash a hashCode impl, not useful for this though

       int hash = 1;

        hash = hash * 31 + getType().hashCode();
        hash = hash * 31 + getAmount();
        hash = hash * 31 + (getDurability() & 0xffff);
        hash = hash * 31 + (hasItemMeta() ? (meta == null ? getItemMeta().hashCode() : meta.hashCode()) : 0);
#

I feel that it would collide waaay to often for it to actually be of use lmao

pseudo hazel
#

well yeah

#

its made to compare itemstacks with the same item meta

#

a single potato will always have the same hash

#

which is the polar opposite of what you want

inner mulch
#

whats the best way to process events in an order, i heard the priorities aren't the best approach as at some point there wont be enough of htem?

chrome beacon
#

Have one listener

#

And then order your methods in there

inner mulch
#

ok

#

what if i wanted to treat it like a pipeline? i had imagined making decoupled systems, for example when creating a burger there could be listeners adding beaf, one adding lettuce, one tomato and the last one delivering it

chrome beacon
#

You can do that if you want

#

Just have your own pipeline code and don't rely on the Spigot event api too much

#

So one listener to trigger pipeline code

#

and then the pipeline takes care of the rest

inner mulch
#

ok

#

thank you

pure dagger
#

how is this List<Map<String, List<String>>> and not list<list<string>>

#

is this even correct syntax? these 2

hybrid spoke
#

ah i see

#

olivo basically told you everything

chrome beacon
#

making it a map

chrome beacon
#

though I wouldn't use the second one

sharp flare
#

fck I have to spent hours why the hell when I convert yaw to degree, it doesn't translate well in-game just because it has an offset of -90, why mc why

pure dagger
#

how to make a list in list without name?

chrome beacon
#
list:
- a
- b
#

a and b don't have named keys

#

they are numbered keys since it's a list

#

if I want to give them named keys I would do something like

notAListAnymore:
  nameOne: a
  nameTwo: b
glad prawn
chrome beacon
#

^^

pure dagger
chrome beacon
#

yeah

glad prawn
#

still a list tho

chrome beacon
#

Having a list in a list is weird

#

but it is valid

pure dagger
#

okay

#

thanks

fading drift
#

is there an easy way to set a cooldown on item usage

blazing ocean
#

Player#setCooldown or soemthing

pure dagger
#

yeah

#

but its for all items of that type

#

if thats what u want

fading drift
#

okay thank u

blazing ocean
#

afaik it's the only way

pure dagger
#

what?

blazing ocean
#

to do cooldowns

pure dagger
#

ummm

#

what does 'afaik" mean

remote swallow
#

as far as i know

pure dagger
#

oh... that explains

#

i mean it is the only way thats like built in, you can implement your own

#

do you need to put quotes in config?

#

i mean in plugin yml some strings have it, other dont

fading drift
#

do events run before or after code

#

like PlayerItemConsumeEvent would run before setting the absorption for golden apples or after

pure dagger
#

after

fading drift
#

would there be any way to run code before

pure dagger
#

if thats what u mean, you can cancel event in you code, so thats obvious that it runs before event

eternal oxide
#

it depends on teh event, but almost all run before

quaint mantle
pure dagger
fading drift
#

I want to set my own potion effects for gapples but I don't want to run it if they already have the effect

glad prawn
fading drift
#

but I really dont want to store a list of all the players with my effect

pure dagger
glad prawn
#

&[]{}

fading drift
#

which is literally absorption with a shorter timeframe

#

what does amplifier and ambient actually mean with potion effects

young knoll
#

amplifier is the level

#

ambient makes the particles less visible

pure dagger
#

what do i set to "sender" in Bukkit.dispatchCommand() i dont have any sender but it says not null

glad prawn
#

Console or Player

pure dagger
#

so console

pure dagger
#

because i dont have any player

#
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "say jajko");

why does it say unknown command? i have tried
say
/say
minecraft:say
/minecraft:say

#

can i use it do execute minecraft's command?

shadow night
#

well, you probably shouldn't use it like that

pure dagger
#

so like what

shadow night
#

For saying, you should use built-in methods

pure dagger
#

i was testing

#

im gonna need it to execute a command from another plugin

#

but i was testing it and it does not work

shadow night
#

Hmm

pure dagger
#

xD

#

im seeing you typing

shadow night
#

Can you try making it run version or something

pure dagger
#

why this

#

but with / or no

#

t

shadow night
#

Without /

pure dagger
#

Oh it worked

#

why idk

shadow night
#

Yeah, bukkit looks up commands only in the command map, it does not delegate handling to brigadier

#

It will only work with non-minecraft commands

pure dagger
#

oh

#

so

#

thats actually not my problem

#

i can use it for another plugins command? right

shadow night
#

you should be able to

pure dagger
#

but i write "nameoftheplugin:nameofcommand arg1 arg2"

shadow night
#

But you should probably just depend on the plugin and run its code

pure dagger
#

what? how

paper viper
paper viper
# pure dagger what? how

He’s saying to use the plugin’s API and use their methods/classes instead of running a command

#

But if the plugin doesn’t have an API you might have to use commands

pure dagger
#

what if i dont even know the plugin

pure dagger
paper viper
#

Then use a command

pure dagger
cedar saffron
#

Help. It doesn't work

pure dagger
#

what

#

did you buy this "cute"

#

thingy

worthy yarrow
#

I think it's a new discord thing

#

Groups/guilds if you will

#

Idk if you have to buy it that'd be kinda dumb imo

pure dagger
#

what?

#

i mean

worthy yarrow
#

click on it bro

pure dagger
#

if someone lives on discord

#

its cool to decorate

pure dagger
cedar saffron
pure dagger
#

icant click on it

pure dagger
cedar saffron
#

Guilds are private servers you have to be invited to to get in, there is also a max of 200 people that can be in one, and guilds can have a 4 character tag too to represent the guild

sly topaz
#

they're called clans internally, which makes more sense

cedar saffron
#

This aint coc bro

worthy yarrow
#

discord clans lovely

sly topaz
#

the 4 characters aren't unique though, so you can have multiple guilds with the "CUTE" suffix for example

glossy laurel
cedar saffron
#

Yes, but I can't because I don't have that feature yet

glossy laurel
#

ohhh

#

makes sense

#

I cant wait for guild spam next to names đŸ„°

slender elbow
#

discord in their infinite wisdom

pure dagger
#

d

cedar saffron
#

It's not weird, it's cute

sly topaz
#

what is wrong with your d key, you missed it twice

pure dagger
#

can i get it?

cedar saffron
#

I aint inviting anybody anymore

pure dagger
#

i dont have G

glossy laurel
pure dagger
#

i have d

#

im in a car typing from laptop sorry guys

shadow night
sly topaz
#

bro is trying to kill themselves

cedar saffron
#

:3

#

The will of D that is!

pure dagger
cedar saffron
pure dagger
#

oh

#

Ƃaj

#

why*

worthy yarrow
#

Imagine having wifi in your car

pure dagger
#

i do 😎

#

no

#

i dont

cedar saffron
#

Cuz they said they weren't gonna accept anymore from here

sly topaz
#

I just share mobile data with my phone, infinite data plan so I don't really worry about it

cedar saffron
#

Only close people and their friends are the people I only invited

pure dagger
#

did i just invite myself?

#

sad

worthy yarrow
sly topaz
#

mine isn't infinite either, tops at 100GB from what I have seen

#

I found that out that one time wifi went down in the classroom and I just shared with the whole class

worthy yarrow
#

We could never get cell signals in class lol

#

I mean the whole building is concrete

#

Also the school I went to in georgia, was literally designed like a prison

pure dagger
#

cool

cedar saffron
warm mica
glossy laurel
#

guys when will spigot implement nms normally

#

fr

#

😎

eternal oxide
#

what? never

young knoll
#

What does that even mean

glossy laurel
#

smh why

#

why do I have to use some random stuff

#

like

#

packetevents

#

and like

#

mojang mappings

young knoll
#

The entire api is an abstraction over NMS

#

If there’s something you can’t do without NMS, make a pull request or open a feature request

glossy laurel
#

hm

sly topaz
#

you don't have to use packets at all for most things nowadays anyway

pseudo hazel
#

if there was no spigot you had to do all the packets yourself

glossy laurel
eternal oxide
#

?contribute

young knoll
pseudo hazel
#

there actually only a few select things you would need to use nms for, qnd most of those uses are pretty advanced

sly topaz
#

changing the actual nameplate only causes issues and is rather limited

glossy laurel
slender elbow
#

doesn't exist in 1.7 :(

glossy laurel
paper viper
#

Wtf is a consumer, Java 7 doesn’t have that?!?!

young knoll
#

Half the people playing minecraft didn’t exist in 1.7

glossy laurel
glossy laurel
#

đŸ€Ł

pseudo hazel
#

yikes

#

i hate how thats true

glossy laurel
#

fr though 😭

paper viper
#

is org.bukkit.util.Consumer still there

#

😭

sly topaz
glossy laurel
young knoll
#

Yeah we did

pseudo hazel
#

yeah

young knoll
#

Back before java did

glossy laurel
#

ohh

#

fair enough

slender elbow
#

it was added even after they started to depend on java 8

glossy laurel
young knoll
#

Ah

glossy laurel
#

spoonfeed? đŸ„ș

#

nah jk

young knoll
#

Well, lol

glossy laurel
#

where do i start tho

young knoll
#

Either way it’s deprecated now

paper viper
young knoll
#

And isn’t used in the code anymore afaik

glossy laurel
#

how*

young knoll
#

Make a text display ride the player

#

Set the text

paper viper
#

Use Team to hide the existing name tag

young knoll
#

Adjust the translation to position it right

glossy laurel
young knoll
glossy laurel
#

what about

#

one little thing called

#

luckperm prefixes

paper viper
#

?

young knoll
#

What about them

glossy laurel
#

hold up can I just get them

#

with permissions

#

and prefix.weight.

#

💀

#

or what

young knoll
#

You can get them with the vault api

#

(Or the luckperms api)

sly topaz
#

do you even have to use a team? I thought riding an entity would hide it

young knoll
#

Not display entities

#

They don’t hide the name tags of mobs they are riding

glossy laurel
sly topaz
#

ah, that sucks

young knoll
#

I think you can hide it with an interaction entity tho

#

With a size of 0

sly topaz
#

that sounds better

#

dealing with teams just to hide the nametag is wacky as fuck

young knoll
#

So you’d just mount 2 entities on the player

glossy laurel
#

this whole thing sounds wacky as fuck

young knoll
#

(Idk how well teleporting would cooperate with that tho)

glossy laurel
#

where is my Player.setNameAboveHead() ???

sly topaz
#

this is how pretty much everyone does it nowadays

young knoll
#

It’s certainly less wacky than messing with the players gameprofile

sly topaz
#

if you don't want to deal with implementing it, just use something like NametagEdit or whatever the API for that is nowadays

glossy laurel
#

but here's the twist

paper viper
#

Or use a top secret downstream fork

#

That nobody can use!

sly topaz
glossy laurel
#

I want one player's nametag to appear differently to different players

#

so supposedly I can just make 50 text displays ride one guy

#

and then hide all but 1 to another player?

sly topaz
#

yes, basically

young knoll
#

You can control which entities are shown to which players

glossy laurel
#

yeah alr

#

and how would I update it?

#

wait

#

can I like

young knoll
#

Just change the text

glossy laurel
#

set the text a text display displays?

young knoll
#

Yes

glossy laurel
#

sick

sly topaz
#

that's quite literally the function of a text display

#

lol

glossy laurel
#

crazy

#

now feed me a code snippet cuz idk what im doing ahahaha

sly topaz
#

it is wacky, but that's simply because Minecraft doesn't support this functionality by default. So you gotta work it around

young knoll
#

Next you’re gonna tell me item displays let you customize what item gets displayed

worldly ingot
blazing ocean
#

wait wHAT??

#

so does that mean

#

an armour stand has armour

young knoll
#

Maybe

glossy laurel
#

I thought it was like

#

a final entity

#

yk

sly topaz
#

hear this one out, a minecart with tnt explodes

blazing ocean
#

đŸ€Ż

young knoll
#

Well

glossy laurel
#

thats actually crazy

young knoll
#

You can have a tnt minecart or a minecart with tnt

glossy laurel
#

if not camman18 I'd think you were joking

paper viper
#

Camman18 is a joke

glossy laurel
#

😔

sly topaz
#

who is that

young knoll
#

The explosive minecart is its own entity

paper viper
#

A YouTube shorts YouTuber

glossy laurel
#

guys so youre telling me I need to create like a bunch of text displays to ride all players when someone joins

young knoll
#

You can also just make a normal minecart display a block of tnt in it

glossy laurel
#

and leaves

#

right?

young knoll
#

But it won’t actually explode

sly topaz
#

uh I can't find a library that does this with a quick google search actually

#

there is no way someone hasn't done this before

fading drift
#

can I have two methods running code on an event?

#

which one will run first?

sly topaz
#

what does that mean

#

like, two event handlers?

young knoll
#

LibsDisguise can customize name tags afaik

fading drift
#

yea

sly topaz
#

conceptually speaking, both of them run at the same time

young knoll
#

Whichever one is registered first will run first

hybrid spoke
#

you can give your eventhandler a priority

young knoll
#

Assuming they have the same priority

#

If they have different priorities then it’ll follow the normal priority order

sly topaz
#

ah, I was assuming it was the same Listener class, if it is different listener classes then yeah order matters

glossy laurel
#

im just asking if thats what I need to do

sly topaz
#

it is indeed

glossy laurel
#

cool

sly topaz
#

performance isn't much of a concern since display entities don't tick

young knoll
#

It’s either that or a bunch of packet fuckery

#

â„ąïž

glossy laurel
fading drift
#

ur right my code just isnt working

young knoll
#

(They do actually tick)

hybrid spoke
young knoll
#

Shh don’t tell anyone

hybrid spoke
#

display entities dont

glossy laurel
#

💀

#

right

slender olive
#

heyo
i have not at all started making plugins yet (although i’ve made a few small datapacks) but i’m just wondering if this is possible
i’m trying to make a plugin where it asks the youtube api how many subscribers i have and every tick does worldborder set [sub count divided by 5] 5
is this typa thing possible?

glossy laurel
#

yes

#

but

hybrid spoke
#

sure it is

young knoll
#

Yes

glossy laurel
#

your requests will take longer than one tick probably

#

if you dont do it right

hybrid spoke
#

just cache the subscriber count and update it async

paper viper
#

Display entities do tick, it’s just to check if something is riding it

eternal oxide
#

lol hammer ytube api 20 times a second 🙂

fading drift
#
            for (PotionEffect pot : player.getActivePotionEffects()) {
                System.out.println("Potion effect: " + pot.getType().getName() + " " + pot.getAmplifier());
                // if level 10 damage resistance, the same potion effect applied during spawn protection, cancel hit
                if (pot.getType() == PotionEffectType.DAMAGE_RESISTANCE && pot.getAmplifier() == 9) {
                    event.setCancelled(true);
                    damager.sendMessage(ChatColor.RED + "This player is currently spawn protected...");
                    return;
                }
            }```
printing
`[02:55:33 INFO]: Potion effect: DAMAGE_RESISTANCE 9  `
however the event isnt cancelled and the message isnt sent
#

am I crazy?

slender olive
glossy laurel
#

check out runTaskTimer

slender olive
#

awesome

#

will start to learn how to make plugins before i do this lol but ill ask here if i need help after i do

young knoll
#

And runTaskTimerAsyncronously

sly topaz
glossy laurel
fading drift
#

why wouldnt it be true

hybrid spoke
#

i happily use the async timer

young knoll
#

CompletableFuture only runs once

glossy laurel
#

you can just put a completable function inside a sync timer tho no?

young knoll
#

You could just make your own thread, but there’s really no need to

paper viper
#

The asynchronous scheduler allows you to schedule something asynchronous with server ticks

#

That’s the benefit compared to like using an executor with CF

hybrid spoke
#

^

young knoll
#

Yeah it’s also still aligned to the server ticks

worldly ingot
worldly ingot
#

Also is his YouTube channel id really mrbeast6000? lol

hybrid spoke
#

yeah thats his old name

young knoll
#

That’s his lawsuit count

glossy laurel
sly topaz
#

do .equals on it instead ig

glossy laurel
young knoll
#

Ah right

#

Yeah use .equals

glossy laurel
#

actually does it matter with enums?

#

I thought all enums are like

young knoll
#

It’s not an enum

paper viper
#

Right

glossy laurel
sly topaz
#

with enums it doesn't matter if you do equals or reference equality since it is always the same constant

glossy laurel
young knoll
#

Nope

#

It’s just a static field

glossy laurel
#

no?!?

#

damn

#

well

hybrid spoke
#

always compare them by their adress

glossy laurel
#

makes sense actually

glossy laurel
#

damn

#

crazy

paper viper
# glossy laurel yeah

The scheduler allows you to schedule stuff accordingly to those game ticks. If you have a CompletableFuture, you can’t schedule a delay based on game ticks

young knoll
#

With just slightly more overhead

worldly ingot
#

It's fine being referentially compared, it's registry backed

glossy laurel
worldly ingot
#

At least I believe methods pulling PotionEffectType pull from the Bukkit constants. They should be

young knoll
#

I remember having an issue with it before

hybrid spoke
worldly ingot
#

Yeah and == has the risk of being wrong lol

young knoll
glossy laurel
# paper viper What

im not asking .runTask vs CompletableFuture, I'm asking .runTaskAsync vs CompletableFuture inside of .runTask

hybrid spoke
worldly ingot
#

There's a risk someone will call my static method when I don't want them to

#

There's a risk someone will reflectively call my private constructor

#

There's a risk of everything

young knoll
#

There’s a risk choco will ban me from hypixel

glossy laurel
hybrid spoke
#

ah you're that type of guy

pseudo hazel
#

then just call the equals on the one thats not null

glossy laurel
worldly ingot
#

I'm just saying, don't not use .equals() because you're afraid of an NPE lol

paper viper
#

There’s a risk someone will find a way to instantiate my private utility class constructor but they’ll be met to their demise with a horrible exception

pseudo hazel
#

yeah I have a big brain

fading drift
pseudo hazel
#

im aware

young knoll
#

That’s why people do “Test”.equals(myString)

worldly ingot
#

Those people are psychopaths

young knoll
#

Even though my brain doesn’t like that for some reason

hybrid spoke
#

anyways, comparing enums with == is the best practice

pseudo hazel
#

those people are smarties

fading drift
#

thanks guys it works now

#

not used to javas weirdness I come from c#

hybrid spoke
sly topaz
glossy laurel
sly topaz
#

if what Choco said is true then it should have worked with reference equality to begin with

young knoll
#

See choco, it’s not referentially comparable

#

Gottem

glossy laurel
#

lolll

paper viper
young knoll
#

That just sounds like reinventing runTaskTimerAsync

#

With extra steps

glossy laurel
#

XD

#

point taken

fading drift
#

also I have this

        player.setVelocity(player.getVelocity().zero());
        player.teleport(new Location(world, 0.5, 66, 0.5));```
running when the player falls below a certain distance
hybrid spoke
fading drift
#

however it seems to still have velocity I assume because the player takes damage when they teleport

glossy laurel
sly topaz
#

(0, 0, 0) vector

glossy laurel
young knoll
#

Set their fall distance to 0 after teleporting them

glossy laurel
#

damn

young knoll
#

And perhaps set the velocity after the teleport too

glossy laurel
#

so you can just set someone's fall distance to 10000

#

and theyll die instantly?

young knoll
#

No

glossy laurel
#

no?

hybrid spoke
#

once they jump ig

glossy laurel
#

why not

young knoll
#

They’d have to be airborne

glossy laurel
#

hm

#

why

young knoll
#

It’s constantly reset to 0 when on the ground

glossy laurel
#

ohh

hybrid spoke
#

you cant fall while standing

glossy laurel
#

tp them 0.000001 blocks upwards

sly topaz
peak depot
glossy laurel
#

and set fall distance to 10000

hybrid spoke
young knoll
#

Hear me out

glossy laurel
#

wait no

young knoll
#

Just deal 10000 fall damage

glossy laurel
#

it was smth else

#

yeah

#

that

#

.damage(big number)

fading drift
#

setting velocity to 0 just instantly killed me when I teleported

#

like new Vector 0

young knoll
#

Hmm

glossy laurel
#

.setFallDistance

#

or smth

young knoll
#

Set their invuln ticks to 1

#

Then teleport them

young knoll
#

I believe it would

#

If you did it right before the teleport

glossy laurel
#

Guys, can someone once and for all explain me something

#

what's the difference between SomeClass.someMethod

#

and SomeClass#someMethod

paper viper
#

The first is static

glossy laurel
#

the one with the dot is static?

paper viper
#

The second is within class instance

young knoll
#

The # is just used to indicate it’s an instance method

glossy laurel
#

damn

paper viper
#

Yes

glossy laurel
#

alright makes sense

#

I thought it was something like that

#

but never knew which was which

#

noones gonna beat me if I just use . for everything tho right

paper viper
#

no one cares tbh they’ll know what you mean

peak depot
#

tbf I didnt know what # is for in first place

glossy laurel
peak depot
#

(Back then I 100% didnt try litterly Player#teleport(postion))

fading drift
peak depot
glossy laurel
#

valid

peak depot
#

why tf is northface so expensive

#

I dont want to go to turkish basar

young knoll
glossy laurel
peak depot
#

a clothing brand

blazing ocean
#

It's where you get the cheapest shit tho

fading drift
#

still died

peak depot
#

so a casio watch it is

fading drift
#
        player.setVelocity(player.getVelocity().zero());
        player.setFallDistance(0); // prevent fall damage
        player.setNoDamageTicks(1);
        player.teleport(new Location(world, 0.5, 66, 0.5)); // todo: team based tp
        player.setMaximumNoDamageTicks(1);
        player.setVelocity(player.getVelocity().zero());
        player.setFallDistance(0); // prevent fall damage```
#

still dying even with this shit

peak depot
#

List#add(player) if(List#contains) event.setcancled (Damage event)

#

would be a work arround

fading drift
#

I am not doing that

blazing ocean
fading drift
#

there is a better way I just don't know what it is

paper viper
#

Set the no damage ticks longer and see what happens

peak depot
#

f u

fading drift
paper viper
peak depot
# fading drift set to 20 still didnt work
    List<Player> sigmas = Lists.newArrayList();

    @EventHandler
    public void checkSigmaStatus(EntityDamageEvent f) {
        if(f.getEntity() instanceof Player) {
            Player potSigma = (Player) f.getEntity();
            if(sigmas.contains(potSigma))
                f.setCancelled(true);
        }
        
        //before tp sigmas.add(player);
        //after tpsigmas.remove(player);
    }
fading drift
fading drift
peak depot
#

hater

sly topaz
fading drift
#

when they reach under 30 or something y level im teleporting them one block above the spawn point

#

which is just a clay block lol

sly topaz
#

ah, so this is just a void teleport kind of thing

paper viper
#

What if you teleport them right before you do all the shit

#

Instead of the middle

sly topaz
#

what everyone does for this kind of thing is just check the damage event for void damage, if so cancel the event and teleport

peak depot
sly topaz
fading drift
sly topaz
#

teleporting shouldn't cause players to die tho, even less so if fall distance was set to 0

#

did you try not setting the velocity?

fading drift
#

and keeping no fall distance?

sly topaz
#

yes

fading drift
#

figured it out I think

sly topaz
#

oh, what was it

fading drift
#

never fucking mind

#

wait

#

im fucking stupid

peak depot
#

yeah just use the sigmavalidator

fading drift
#

no wonder nothing was changing I was modifying the wrong method

#

đŸ€Ł

sly topaz
#

lmfao

glossy laurel
#

Guys how do I spawn a TextDisplay and make it ride a player

fading drift
#

okay well it now plays a damage sound but does no damage but I guess thats probably just client side

paper viper
#

Read on how to spawn an entity and modify it

#

And then set it to ride a player

sly topaz
glossy laurel
#

how do I disable the players normal tag?

#

btw what happens to displays riding player when he leaves

glossy laurel
pure dagger
#

what does "deep" mean - config.getKeys(boolean deep);

blazing ocean
glossy laurel
#

gets keys from keys

#
  key2:
    key3:```
#

if you get keys on key1

#

with deep it will get both key2 and key3

#

if without only key2

pure dagger
#

okay i get it

glossy laurel
blazing ocean
#

what

pure dagger
#

how do i specify from which location i want to get the keys lol, like you said from "key1"

glossy laurel
blazing ocean
#

you don't

chrome beacon
#

can't*

glossy laurel
#

or what

pure dagger
#

fileConfiguration, what you mean?

glossy laurel
#

right

#

so

#

wdym

pure dagger
#

hah

glossy laurel
#

getConfigurationSection

#

?

pure dagger
#

oh

chrome beacon
glossy laurel
blazing ocean
#

what

chrome beacon
#

hm true

#

That could probably work

glossy laurel
#

how do I do that though

blazing ocean
#

Just use teams...

#

way easier

glossy laurel
#

nuh

#

uh

chrome beacon
blazing ocean
#

Okay and why not just use teams

#

It takes like 5 lines of code...

glossy laurel
#

fair

glossy laurel
#

😎

blazing ocean
#

no

#

just use teams ffs

echo basalt
#

team system is only incredibly ass

blazing ocean
#

it works

echo basalt
#

it's still ass

glossy laurel
slender olive
blazing ocean
#
if (Bukkit.getScoreboardManager().mainScoreboard.getTeam("players") == null) {
    val playersTeam = Bukkit.getScoreboardManager().mainScoreboard.registerNewTeam("players")
    playersTeam.setOption(Team.Option.NAME_TAG_VISIBILITY, Team.OptionStatus.NEVER)
}

how is that hard

glossy laurel
#

btw guys

#

can you

#

make a textdisplay

#

thats hidden to everyone by default

#

without looping first

blazing ocean
#

Entity#setVisbileByDefault

glossy laurel
chrome beacon
#

You don't want to do that on the passenger

glossy laurel
#

I dont?

pure dagger
#

configs are cool

glossy laurel
#

how come

glossy laurel
blazing ocean
#

...just use teams...

chrome beacon
#

Well if the client doesn't see it the nametag will be there

inner mulch
#

general java question: can i get when a mouse is clicked without a jframe?

#

i only find stuff about mouselisteners

blazing ocean
#

That interaction entity thing will only be more painful than it has to be

inner mulch
#

but they need to be added to components of a jframe

chrome beacon
blazing ocean
chrome beacon
#

The new FFI makes it a lot easier

blazing ocean
#

what new ffi

#

did windows add new ffi or sth

chrome beacon
#

No Java 22

blazing ocean
#

oh

glossy laurel
#

what happens to textdisplays that are riding a player when player leaves?

chrome beacon
#

It has new Foregin Function and Memory API

blazing ocean
#

Kotlin has had good ffi for a while

glossy laurel
glossy laurel
#

I've played on lunar too much

#

by default you dont see your own name

#

right?

blazing ocean
#

Don't use lunar

glossy laurel
blazing ocean
#

Just kick all people who have the lunar client brand 🧌

blazing ocean
#

this server dev thing is easy

glossy laurel
#

lol

chrome beacon
glossy laurel
#

kick wurst❌ kick lunar✅

blazing ocean
glossy laurel
#

how get player prefix no vault api

chrome beacon
#

Hook in to every plugin you want to support

glossy laurel
pure dagger
#

why the first one is ok but the second can produce null pointer exception?

ConfigurationSection configSection = config.getConfigurationSection("ranks");
        if (configSection == null) return null;
        return configSection.getKeys(false);
if (config.getConfigurationSection("ranks") == null) return null;
        return config.getConfigurationSection("ranks").getKeys(false);

i think i may know the answer but i need to ask to make sure

chrome beacon
#

Intellij doesn't know that getting the section again won't return null

glossy laurel
#

yeah

pure dagger
#

it wont? for sure?

glossy laurel
#

yeah

pure dagger
#

i thought it can

glossy laurel
#

how

pure dagger
#

because second time its like different time and it may be already changed

chrome beacon
#

Just use a variable it's safer and cleaner

glossy laurel
pure dagger
#

what

#

i dont know sorry

#

i thouht something like htat

glossy laurel
#

unless you're changing configurations async

#

for some reason

#

but even then it wont change

pure dagger
#

yeah, i was talking about it

glossy laurel
#

cuz the config is already loaded

pure dagger
#

but im not usin it

#

ill do the variable one

#

anyway

glossy laurel
#

omg intellij warning đŸ˜±

pure dagger
#

?

glossy laurel
#

would this work or would there be some reason it wont cuz of the entity not really being spawned yet and I need to pass it as a consumer

#

nvm it's the opposite

#

💀

#

should players be comared using == or .equals

blazing ocean
#

don't compare player objects

glossy laurel
#

why

blazing ocean
#

just compare uuids

glossy laurel
#

why

blazing ocean
#

player objects are (somewhat) expensive

glossy laurel
#

hm

#

does that affect comparisson??

#

like the == one

chrome beacon
#

Where/When are you trying to compare players

glossy laurel
#

in commands

#

so they dont select themselves

chrome beacon
#

== should be fine then

glossy laurel
#

how do I make textdisplays always face the player?

cedar flume
chrome beacon
#

^^

glossy laurel
#

thx

#

nvm

#

how do I lift it up a bit

worthy yarrow
#

transformation

glossy laurel
#

who that

cedar flume
#

need to add all the transformation tags, one of which is translation x, y, z

worthy yarrow
#

such as


        Vector3f offset = new Vector3f(0, 0.15f, 0);
        AxisAngle4f rotation = new AxisAngle4f();
        Vector3f scale = new Vector3f(0.75f, 0.75f, 0.75f);
        Transformation transformation = new Transformation(offset, rotation, scale, rotation);```
worthy yarrow
#

This also scales it btw

glossy laurel
#

wait

#

wdym

worthy yarrow
#

Vector3f scale = new Vector3f(0.75f, 0.75f, 0.75f);

glossy laurel
#

and if I dont wanna scale it?

#

all to 1?

worthy yarrow
#

You can play with this to make it bigger / smaller

glossy laurel
#

so it doesnt show that direction arrow

candid galleon
#

why not just change the player’s name?

glossy laurel
#

I cant

#

I need a different nametag displayed to all players

#

and I need it to look identical to a normal nametag

candid galleon
#

you could probably intercept the packets

glossy laurel
#

okay so youre telling me

#

5 people convincing me not to use packets

#

was for nothing?

worthy yarrow
#

Are you trying to replace the players nametag?

candid galleon
#

there’s diff ways to go about it

glossy laurel
cedar flume
glossy laurel
#

THATS SUCH A GOOD IDEA

worthy yarrow
# glossy laurel yes.

pretty sure if your text display is overlapping with the normal nametag it already removes it kek

#

So just set a transformation a bit higher than the players head

glossy laurel
#

someone just told me it doesnt

worthy yarrow
#

last time I checked it does, tested on multiple environments

cedar saffron
#

I need help

#

it doesnt work

glossy laurel
#

dyk the exact offset of players nametag?

worthy yarrow
#

I don't

valid burrow
undone axleBOT
#

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

cedar saffron
glossy laurel
cedar saffron
#

and thats on skibidi

glossy laurel
#

☠

#

how do I remove the direction arrow from the nametag?

cedar flume
#

from F3 show hitboxes you mean?

glossy laurel
#

yeah

cedar flume
#

dont think you can, as its just a regular entity like any other

glossy laurel
#

dont tell me its impossible or ill kms

#

shit

glossy laurel
#

point

#

downwards

cedar flume
#

not without changing the direction the tag faces

#

which would be a worse issue for you id think

glossy laurel
#

nuh uh

#

ill make it

#

point downwards

#

watch me

cedar flume
#

😄 God speed

glossy laurel
#

!!

cedar flume
#

oh, how do?

glossy laurel
#

it pokes from the bottom 💀

#

lmfao

cedar flume
#

ah I see

#

billboard is client side so it doesnt care the orientation of the actual entity, nice

#

so you rotate the entity to face downwards. 👌 nice thinking

glossy laurel
#

:D

#

Can I actually make it so it like

#

has shorter blue line?

cedar flume
#

i wonder if you hide the entity from the player entirely, if the clienside billboard would also hide

cedar flume
#

darn

glossy laurel
#

:/

#

if shulkers have it shorter

#

I can make textdisplay shorter too

#

right?!

worthy yarrow
#

wdym shorter

glossy laurel
#

shorter

#

right

worthy yarrow
#

I'm confused on what is shorter

cedar flume
#

the blue line

glossy laurel
#

blue line

worthy yarrow
#

ah

glossy laurel
#

its

#

not shorter

#

😔

#

how do I nuke the blue line

#

fr

worthy yarrow
#

Assuming that angle is directly down from the shulker I'd say its the same

glossy laurel
#

it is the same

#

now how do I remove the blue line

#

fr

#

if everything is working

#

but the lbue line

worthy yarrow
#

I have no idea

glossy laurel
#

and I have to switch everything cuz of that line

#

i will literally

#

đŸ”Ș đŸ©ž

#

okay not literally

#

đŸ«ą

chrome beacon
#

You can't remove the blue line

glossy laurel
#

is this the part where I start crying

chrome beacon
#

but you can use teams like you were told many times

#

which does get rid of the entity and there for the blue line

glossy laurel
#

can I use teams to make a player have a different nametag for 2 other players?

chrome beacon
#

you mean shown to some and hidden for others?

#

Or like actually changing the display name

glossy laurel
#

actually changing

chrome beacon
#

No

glossy laurel
#

exactly

chrome beacon
#

You have to use nms and packets for that

#

wdym exactly

glossy laurel
#

im about to punch a hole through a wall

glossy laurel
#

😎

chrome beacon
#

...

glossy laurel
#

right so!

#

nms!!

#

:D

chrome beacon
glossy laurel
#

?nsms

#

my hands are literally shaking

#

im scared of nms

#

?nms

candid galleon
#

if you want diff things to show on diff clients i think you have to use packets

chrome beacon
#

Yeah you do

glossy laurel
#

guys

#

packetevents?

glossy laurel
#

right?

drowsy helm
#

no

#

why would it

candid galleon
#

different versions maybe

#

is protocollib still the standard?

drowsy helm
#

it's not really used much in new plugins

candid galleon
#

what’s the new defacto?

drowsy helm
#

packet events on top

candid galleon
#

or do people just use packet wrapper?

drowsy helm
#

packet events with moj mappings is usually the go to

candid galleon
#

damn that’s new, very cool

drowsy helm
#

*I am very biased to packet events

#

but that seems like the general consensus

sly topaz
#

I mean, it updates faster than ProtocolLib and is cross-platform, so it indeed has PL beat in that aspect

#

I still believe PL is more intuitive to use, but I haven't really used PE extensively to say for sure

glossy laurel
#

oh

#

my

#

god

#

guys

#

im

#

on

#

paper

#

no nms

#

for me

#

ig

glossy laurel
#

dont

#

I know.

drowsy helm
#

paper still uses nms

sly topaz
#

bro, stop flooding the chat

drowsy helm
#

and sotp spamming

glossy laurel
drowsy helm
#

paper just uses moj mappings from the jump

glossy laurel
#

and then I ragequit

drowsy helm
#

nms still exists

glossy laurel
drowsy helm
glossy laurel
#

right so

#

I know nothing

#

how do I change what nickname for displaying above head another player gets with packetevents? :D