#help-development

1 messages Β· Page 1037 of 1

eternal night
#

another lolicolleen PR? skully shivering

#

(is it damage related)

gilded forge
#

Did that disruptive change make me so famous? 😭

eternal night
#

No you just always touch damage code 😭

gilded forge
#

You got it

eternal night
#

Again????

#

AHHHHH

gilded forge
#

Because the damage system is full of bugs

eternal night
#

indeed xD

gilded forge
#

πŸ˜‚

remote swallow
#

this is a tragedy

gilded forge
#

In fact, vanilla code has problems

remote swallow
#

i have to backport new features to an old mod bc of via version

gilded forge
#

But Im not going to fix them

#

They are so

#

troublesome

eternal night
#

what do you mean, mojang code is bug free 5Head

gilded forge
#

Yeah those are "features"

#

So they won't be fixed

eternal night
#

exactly KEKW all integral to gameplay

#

like shield stunning

#

still crazy

gilded forge
#

I have to say if they do fix the shield rebound issue it will be even more outrageous

#

Imagine PVPers will be easily repelled by the shields

#

Maybe Dream can fly by clicking spam at the hunters' shield

eternal night
gilded forge
#

Im still not sure where to add the new class

#

Because orignal nms codes dont contain this new class

eternal night
#

no they go into org.bukkit.craftbukkit.whatever

gilded forge
#

oh thanks

wet breach
#

it was created from a bug and then became a legitimate feature XD

gilded forge
#

WHAT

#

You mean invisible should hide armor stands' name tags?

#

I always thought that was on purpose

#

But they added text display instead

wet breach
#

if you set its age negative, the horse turned invisible except its name tag

#

one of the bugs that mojang was going to fix in 1.8 that they randomly decided to announce was this bug and it made a lot of people upset, so they created the armorstand that had this functionality

#

now we have progressed to having proper entities for such things

gilded forge
#

Thats cool

wet breach
#

so yeah, some of the bugs in the game could be technically features if you used right πŸ˜›

robust ginkgo
#

Is there a better/cleaner way to do this?

#

Or do I really have to extract and set the ItemMeta every time?

young knoll
#

Yes

#

But you can look into an Item Builder

robust ginkgo
#

Got any recommendations?
Last time I looked for a library on google I ended up with some hot garbage that drains my RAM.

young knoll
#

Idk I just made my own

robust ginkgo
#

oh wait the Gui library has one

#

I am very intelligent and always look at things before I ask. (trust)

spice burrow
#

im gonna make the random assumption that the new spigot 1.21 doesn't have support for custom enchantment datapacks (not complaining, just wondering if anyone else has experienced this in the latest build)

whenever i log custom enchants, i am getting these instead

chrome beacon
#

Depends on how they were implemented

young knoll
#

And how you are getting them

#

Enchantments should be registry backed so you can idewntify them by namespaced key

spice burrow
#

ah, i am identifying them from what ItemStack#getEnchantments gives

#

I'll give that a shot

late sonnet
spice burrow
#

i believe they have a custom enchantment api in the works, probably smarter to wait, but eh

late sonnet
young knoll
#

Iirc paper plugins that use registry stuff won't be reloadable

#

via /reload at least

spice burrow
#

yea i was using that hack for a little bit but just stopped and started using pdc because it wasn't really needed

young knoll
#

So does printing their namespaced key not work?

late sonnet
#

i mean if you wanna later move to better use the hack way becuase leter only need get the enchantment with the correct namespace

spice burrow
eternal night
#

should getEnchantments also work tho?

#

that is half the reason we have Enchantment as an abstract class

young knoll
#

In theory

night parrot
eternal night
#

and I don't think we have a patch there?

young knoll
#

Weird

#

If you can reproduce in the latest spigot build please make a ticket

#

@spice burrow

eternal night
#

I mean, the enchantment has to be in a registry, you can't use an anonymous enchantment

#

if that is what they are doing

#

but that should error out

spice burrow
#

very odd indeed

spice burrow
blazing ocean
#

minecraft:lucky kekw

eternal night
young knoll
#

So they key is fine but the name is wrong?

eternal night
#

yea isn't that the custom enchantment omegaroll

#

oh

green prism
#

Hi there. Do you think I shouldn't obfuscate a premium plug-in? If so, why?

spice burrow
#

yea πŸ˜‚ key works fine

young knoll
#

Even the vanilla enchantment name is wrong

spice burrow
#

i added a datapack to allow it to go up to 6

#

so i assume thats why

eternal night
#

dying at the impl of CraftEnchantment#getName

#

@young knoll opinion?

#

but yea, getName is iirc legacy enum crap

#

don't use it

worldly ingot
#

It's been legacy

#

For like probably the large part of a decade now

young knoll
#

I see

eternal night
#

Yea

young knoll
#

Do enchantments not have a name internally?

eternal night
#

they have a description component

young knoll
#

Just a translation key?

worldly ingot
#

They're translatable components

eternal night
#

yea

#

well

young knoll
#

Even custom ones?

worldly ingot
#

Yes

eternal night
#

no

#

lol

worldly ingot
#

Well, they're components

eternal night
#

common spigot moment

worldly ingot
#

They don't have to be translatable

eternal night
#

of just "trust me bro imma cast to translatable"

young knoll
#

I see

#

Clearly we should just return the component as a string

eternal night
worldly ingot
#

I already have a method in the component API to return the name as a component

eternal night
#

so, as per usual, its a "choco pls pls merge"

young knoll
#

So do we just tell getName to getFuxked?

eternal night
#

no you grab the translation key and /pray

#

or use paper

eternal night
#

I mean, the display thing could be exposed as a flattened legacy string

#

e.g. render out translation to english

#

and gg wp

#

but yea, choco PR time

young knoll
#

Does the server have the english translation?

eternal night
#

Yea

#

See PlainComponentSer- hehe

#

but like, why add legacy string methods when you could just merge chocos pr

young knoll
#

Because I'm not md ;c

eternal night
worldly ingot
#

I need to update the PR to 1.21

#

I'll do it this week or something

carmine mica
worldly ingot
#

Shouldn't be hard

young knoll
#

Ah

#

When do we get registry api

#

Choco get to work

eternal night
#

We still don't allow reloading tho KEKW

#

do we?

carmine mica
#

If you do commands, no.

eternal night
#

yea

eternal night
carmine mica
#

But just the registry modification api, it still lets you iirc

carmine mica
eternal night
#

Yea only commands blocks reloading

carmine mica
#

And that means configuration stage

night parrot
young knoll
#

Why freeze when you could not freeze

eternal night
#

Just kick every player into configuration stage 5Head

worldly ingot
eternal night
#

that works so well on spigot

eternal night
night parrot
young knoll
#

I remember modifying biome registry while players were connected

#

Made them very laggy

eternal night
#

The doc gif is giving me nightmares

#

pls ban

late sonnet
hazy parrot
eternal night
#

That is not a high bar skully

night parrot
eternal night
#

?paste

undone axleBOT
night parrot
eternal night
night parrot
#

Feel free to reply ping me tho

#

I sent every file that might be associated with the error so its easier for you guys to look into it

eternal night
#

databasefile is wrong

#

#getString won't throw an NPE

#

it'll just return null

#

which you then also return

dawn flower
#

so uh, i have a block display model (that is related to a boss attack) and i dont know how to spawn it during the boss fight

the minecraft command is 3.7k lines

#

i have an idea in mind to spawn it somewhere in the map and have the code clone the entity from that location but idk how to clone entities

spark lynx
#

How can i get this ip and port from [/ip:port] logged in with entity id in BungeeCord Plugin.
using ProxyPlayer.getSocketAddress() doesn't give the correct address

dawn flower
#

yes it does

#

are you using a hosting provider that masks ips?

spark lynx
#

ip are the same , but port are different

dawn flower
#

is there something that isnt experimental

spark lynx
dawn flower
#

why do you want the port

spark lynx
#

to find the connection exactly.

mortal hare
#

too lazy to resend

#

but someone might help me here?

ivory sleet
#

What if you pass the entire signature

mortal hare
#

example?

#

ik what you mean but i dont know how to write it properly

dawn flower
#

i want to make ice not slippery

dawn flower
barren trail
#

it says "all its data", so probably? not sure though, you'll have to try it yourself

remote swallow
young knoll
#

Uhh

eternal oxide
remote swallow
#

why dont you know

night parrot
eternal oxide
#

It can;t find your sql server Caused by: java.net.UnknownHostException: null: Name or service not known

night parrot
#

I could read that

#

I want to know how I can aolve

young knoll
#

I believe it does copy passengers

eternal oxide
#

I'd need to see the startup log. There shoudl be an exception

eternal night
#

OH

#

I did not

blazing ocean
#

kek

eternal night
#

@night parrot now with a ping

night parrot
eternal night
#

null check the value instead of try-catch

mortal hare
#

is it possible to disable false positive intellij warning here

river oracle
mortal hare
#

its throwing me a warning since im doing a mixin

night parrot
# eternal night null check the value instead of try-catch

like this?
public String databaseHost() {
String host = plugin.getConfig().getString("database.host");
if (host != null) {
return host;
} else {
Logger.getLogger(DatabaseFile.class.getName()).log(Level.SEVERE, "Host configuration is missing");
return "localhost";
}
}

blazing ocean
kindred sentinel
#

Is there a way to change player's skin (For everyone) using protocol lib?

night parrot
eternal night
#

try and see

tardy delta
#

st language to java btw

eternal night
#

looks better tho yea

mortal hare
blazing ocean
#

comment type?

night parrot
eternal night
#

paste.dev the exception NODDERS

night parrot
#

Ik I need to create a public void in DatabaseFile

#

but where

mortal hare
#

//noinspection SimplifiableConditions

#

doesnt work

chrome beacon
#

Suppress all blobevil

tardy delta
#

ConstantConditions

robust ginkgo
#
list:
  - [Hello world!]
  - [Hi there!, Hello there!]

list in this example should be able to be cast to List<List<String>>, right?

shadow night
#

Theoretically possible, but not certainly

robust ginkgo
#

I'm sure it'll be fine :)

tardy delta
#

whatever

blazing ocean
#

just pray

tardy delta
#

if the config changes, you have isisues

shadow night
#

Yeah

shadow night
kindred sentinel
#

How to send packet remove player in nms 1.20.1?

night parrot
kindred sentinel
#

I found only ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER,(((CraftPlayer) player).getHandle()))

#

Add player

night parrot
mortal hare
# mortal hare

chatgpt saved the day:
//noinspection ConstantConditions

mortal hare
#

nvm

#

im dumb

#

i found it lol

#

but kinda hidden

tardy delta
slender elbow
#

wdym hidden that option has always been there lol

#

but, ig if you don't know, you don't know

mortal hare
blazing egret
slender elbow
#

uh no

#

suppressions are not in main options

tardy delta
#

another one "it doesnt work" πŸ™„

mortal hare
#

with some suppressions it is, i've saw it i swear

tardy delta
#

dude gone

slender elbow
#

xd

blazing egret
inner mulch
#

is there a good scoreboard-api, thats open source, that i can look into?

kindred sentinel
#

Is there any nms guru?

tardy delta
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

kindred sentinel
#

How to hide player using nms? Something like the opposite of Action.ADD_PLAYER

slender elbow
#

you don't need nms for that

#

Player#hideEntity

kindred sentinel
#

I have to use nms

slender elbow
#

well, see what the server does in hideEntity and replicate that :^)

kindred sentinel
#

Hide player for himself?

#

It doesn't work like that

slender elbow
#

well, no, to another player

kindred sentinel
#

But I want to hide it for everyone

#

lol

slender elbow
#

then you need to send the packet to everyone

#

you just need to replicate the logic

kindred sentinel
#

I still want to make it using nms

#

Cause I add player using nms

#

And I'm not sure that it will work normally

slender elbow
#

yeah, so, see what the server does in Player#hideEntity and replicate that logic but in your nms code

slender elbow
#

sure

kindred sentinel
slender elbow
#

yes it is? aren't you using nms?

kindred sentinel
#

I use nms + spigot

#

Sorry, I don't understand what you trying to say

slender elbow
#

yes, so you have access to the spigot impl code

#

CraftPlayer implements Player, and you will find the code for hideEntity there

kindred sentinel
#

oh really

#

thanks

#

Well.. I did what I wanted, but it didn't work... My minecraft just crashed

inner mulch
#

I'm working on an animation system, let's say I have a line, updating it is fairly easy, but what if I only want parts of it updated? How can a system like this be properly designed?
example: Time - 5:31
^ static ^ updated

tardy delta
#

whats updated? the 31?

inner mulch
#

the time?

tardy delta
#

just set "Time - $time"?

inner mulch
#

bad example then, im talking about animations in general

#

that dont have a int or something

#

rather color changing

kindred sentinel
#

?paste

undone axleBOT
tardy delta
#

what

#

a

kindred sentinel
#

Just forgot the command and site for me

tardy delta
#

browser doesnt store that url?

kindred sentinel
#

Minecraft just crashed with this

[19:55:35] [Render thread/ERROR]:
 Signature is missing from Property textures
river oracle
kindred sentinel
#

Which one?

river oracle
#

PlayerProfile api

eternal night
#

miles is drunk

#

player profile api cannot modify player skins

remote swallow
river oracle
kindred sentinel
river oracle
#

That's a bug then

eternal night
#

no that is a feature request lmao

#

it can be used for skulls

#

player skin modification using this becomes very funny very quickly

kindred sentinel
#

Well, then it's still problem, If playerprofile api doesn't work like that

warped rain
#

if u can help me make specific blocks with lore unplaceable dm me

blazing ocean
kindred sentinel
#

?blockpdc

undone axleBOT
blazing ocean
kindred sentinel
blazing ocean
#

what

kindred sentinel
#

Like lore, that doesn't disappear after placing and breaking the block

blazing ocean
#

and you shouldn't be able to place it down in the first place :P

kindred sentinel
#

In that case I would use blockpdc

warped rain
blazing ocean
warped rain
#

i dont want tem to be placeable tho

#

are cooldowns hard to make

kindred sentinel
#

?pdc

kindred sentinel
#

?blockpdc

undone axleBOT
kindred sentinel
#

Oh wait

kindred sentinel
blazing ocean
#

no

#

why would you need to go to dms for that

#

it's literally so simple

#

lol

kindred sentinel
#

what's that?

blazing ocean
#

direct messages

kindred sentinel
#

oh

kindred sentinel
blazing ocean
#

?wiki

undone axleBOT
blazing ocean
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programmingβ€”great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! πŸŽ‰

warped rain
#

how long

#

is the classes

vernal halo
#

modifiers are broken in 1.21... why is it giving me ID?

eternal night
#

πŸͺ„

warped rain
#

how do i start it for free

kindred sentinel
warped rain
#

no i wanna learn

#

so i use youtube for every problem that bad

#

all i know are basics of java

#

nothing else

vernal halo
robust ginkgo
#

If I use fileConfig.set("path.to.this", true) and path or to don't exist, will it create those sections?

tardy delta
#

yes

tardy delta
kindred sentinel
warped rain
#

k

#

i love c++

kindred sentinel
#

Meh, just program in c and fortran.

#

Or maybe cobol

tardy delta
#

ah please dont watch those yt vids about plugins, most people will stick to that awfully written code then

blazing ocean
#

^

sterile breach
#

No its impossible to have inventory immediately, try yourslef how to do. Leave event is called after asyncpreloginevent but before asyncprelogin event the player is again on the server 1 si he van interact with the server (un the same time we should save his inventory in db but the player can change it after)

#

Its my opinion not sure

dawn flower
#

how do i get the middle location between the 2 legs of the player

#

Player#getLocation gets the edge of the feet

eternal oxide
#

If you are maintaining their inventory in the db you could wipe their inven on login/join, then update it a few ticks after join

sterile breach
robust ginkgo
#

What's the recommended version of shade?
The plugin won't compile anymore after updating triumph-gui to 3.1.8 because of the 1.20.5 item changes.

pseudo hazel
#

mine is on like 3.5.0

robust ginkgo
#

oh lord mine is outdated then

pseudo hazel
#

which compiled everything from 1.19.3 to 1.21

robust ginkgo
#

much better

hearty sparrow
#

Hello. I have been trying to create a nms item entity and when trying to set the item i get this error. Cannot invoke "net.minecraft.network.syncher.DataWatcher$Item.b()" because "datawatcher_item" is null

robust ginkgo
#

why did intellij generate a POM file with such an outdated version lol

tardy delta
#

damn thats some cursed kotlin

dawn flower
hearty sparrow
elder dune
#

Anyone know why this is not applying to the player

PotionEffect potionType = new PotionEffect(PotionEffectType.SPEED, speedTimer, speedLvl, false, false, true);
p.addPotionEffect(potionType);```

p.send message under that code and it sends the message fine so I know the code is running but for some reason its not applying the Effect
when a player gets hit by a mob
dawn flower
#

is one of your conditions not passing

dawn flower
robust ginkgo
#

What's the difference between a normal jar and the shaded version?

pseudo hazel
#

I honestly dont know

#

but I just use the normal one

robust ginkgo
#

Will my server explode if I used the shaded one?

tardy delta
#

shaded contains only shaded stuff iirc

#

use normal one

eternal oxide
#

Normal jar is replaced by the shaded jar, so they are in then end identical

proper cosmos
#

Everything I found online seemed outdated or not full explanation.
How am I able to change players Nametag color, in world and in tab?

dawn flower
#

how do i get the middle location between the 2 legs of the player
Player#getLocation gets the edge of the feet

pseudo hazel
#

and then I think you can set the teams color

eternal oxide
dawn flower
#

fanks

orchid iron
#

Hi does anyone know why unsafe dig_speed enchantments dont show any effect above level 5?

umbral ridge
#

hey does File constructor take fileName, fileFolder or opposite

#

because I don't understand what "parent" is

swift dew
#

anyone knows why this doesnt run on first join

pseudo hazel
#

usually file path from main class I think?

eternal oxide
#

if you are using the two String constructor

umbral ridge
#

yes two string

#

is the file name or file folder first

eternal oxide
#

then it has a couple of uses

#

first File is just a pointer to a location

#

it could be a Directory or a file

#

if you pass (getDataFolder(), "test")

#

and no file called test exists in teh data folder it points to it

#

the location

#

you could then do file.mkdirs() and it would create a test folder inside the data folder

#

same with a file

#

(getDataFolder(), "test.txt") would just be a pointer too

#

if you called file.mkdirs() on that it would make a directory called test.txt in the data folder

robust ginkgo
#

Does anyone know how to hide the damage and speed part of the tooltip with triumph-gui? .flags() doesn't seem to do anything.

icy beacon
#

idk if that's removalbe

carmine mica
vital sandal
#

how do I include a library into the jar with maven ?

blazing ocean
blazing ocean
vital sandal
#

I got allmost every lib include except for one ...

#

one only ...

vital sandal
#

do have this thing

blazing ocean
#

looks good

chrome beacon
#

oh no outdated shade plugin

#

and modified output file

vital sandal
quaint mantle
#

components look so ugly

#

(code wise, CC.translate >>)

chrome beacon
#

They're fine

quaint mantle
#

It makes so much more code

chrome beacon
#

You can just use MiniMessage

carmine mica
#

its not really that much more, especially if you make use if the tree structure and static imports

quaint mantle
#

well Like if u do it without minimessage

#

u gotta keep appending

#

and stuff

carmine mica
#

no you don't, you just aren't making the best use of the adventure api

quaint mantle
#

how are u supposed to append text with dif colors?

blazing ocean
quaint mantle
carmine mica
#
text().append(text("Stuf", GRAY), text(" is Gold", GOLD, BOLD))
blazing ocean
#

kotlin mentioned ❀️

#

shut olivo

quaint mantle
#

the docs don't show that

carmine mica
#

the javadocs very much do

#

the other docs aren't supposed to spell out what every method does, that's the javadocs

quaint mantle
#

They provide examples

vital sandal
#

sadly these doesn't change anything :l

quaint mantle
#

:|

carmine mica
vital sandal
#

still not include what I need

quaint mantle
#

when are they removing translated color code support

vital sandal
floral drum
#

wot da fook

vital sandal
#

it include every other libs though

blazing ocean
#

show your full pom

#

?paste

undone axleBOT
vital sandal
grim oak
#

Heya, the docs dont seem to clear, what happens when i do Plugin.getResource(resource), if the resource doesnt exist

chrome beacon
grim oak
#

Where is that on the docs

chrome beacon
#

I mean it does tell you pretty clearly?

grim oak
#

I only see this, are the docs im looking at outdated?

chrome beacon
#

That's in the method list

grim oak
#

Ohh I see

chrome beacon
#

Click on it and it will scroll down to more detailed info

grim oak
#

Ah so sorry thanks for the help

vital sandal
chrome beacon
#

also relocate the dependencies you want to shade

vital sandal
vital sandal
#

well they are not all plugins

chrome beacon
#

on the dependencies you don't want to shade

vital sandal
#

these are all set in the main file :l

#

so how to make it compile?

chrome beacon
#

?

vital sandal
#

like :l

#

include it into the jar?

pseudo hazel
#

you are probably using a paper server right?

robust ginkgo
#

don't tell me paper fucks this up

pseudo hazel
#

you need to apply a custom attribute, only then will it be hidden

#

like apply random luck or something

#

and then hide it

robust ginkgo
pseudo hazel
#

or like a multiplier by 1

#

well you can add custom attributes to tools

#

like +2 damage

robust ginkgo
#

uh huh

pseudo hazel
#

but I think there is also luck

#

which doesnt do much afaik

#

but you can also try to add a multiplier that just results in the same value, i.e. multiply damage by 1

#

but the point being

#

that now it has a custom modifier

#

and the flag will hide all the attributes when set

robust ginkgo
#

did they add a way to do that in the ItemBuilder or do I manually need to modify the ItemStack?

pseudo hazel
#

I have no idea

#

I did it with item meta since I was already changing the meta

#

idk about any api

#

but thats the item flag behavior that paper has

carmine mica
#

paper fixes it

#

whatever spigot did to make hiding attributes still work actually breaks items

tardy delta
carmine mica
#

you can't hide attributes without setting something to the modifiers either an empty list or some modifiers (can't be an empty list for armor, thats a vanilla issue tho)

pseudo hazel
#

it breaks the functionality of I see attribute, I try to hide it with flag

robust siren
#

hello is there anyplace i can report a bug like on the websiute some whereA?

pseudo hazel
#

but no, you cant hide all attributes because you didnt add a custom one

robust siren
#

yea

pseudo hazel
#

?jira

chrome beacon
#

?jira

icy beacon
#

?jira

undone axleBOT
pseudo hazel
#

sniped

icy beacon
#

?jira

undone axleBOT
robust siren
#

Thank you! lmao

icy beacon
#

btw you can report bugs here:

#

?jira

undone axleBOT
robust siren
#

ty!

chrome beacon
#

._.

carmine mica
#

any custom modifiers set completely override any modifiers that are default to the item type

#

including an empty map

chrome beacon
#

For a GUI I don't think that matters

#

so an empty map should be fine in this case

carmine mica
#

if the item is just for a gui, then yeah, doesn't matter

quaint mantle
pseudo hazel
#

btw when I discoverd this paper "feature" was when I found out there is a scale attribute which can literally change your size xD

#

how old is is that attribute

sullen belfry
#

is this the correct way to launch an entity? because it only seems to work when its falling or doesn't have a block directly under it.


                                // Set the new velocity (keep horizontal velocity as it is)
                                entityToLaunch.setVelocity(entityToLaunch.getVelocity().setY(launchVelocity));
pseudo hazel
#

oh that expains it haha

carmine mica
pseudo hazel
#

its very funny though

carmine mica
#

vanilla needs to support not setting any modifiers but hiding them

#

there's an open mojira for it cause it doesn't support that behavior

pseudo hazel
#

right

#

well it feels off to use

carmine mica
#

its better than breaking itemstacks by randomly actually removing modifiers when someone just wanted them hidden

pseudo hazel
#

I mean sure papre might have fixed the actual breaking logic, but like

carmine mica
#

take a regular sword, set hide attributes on spigot, and the sword no longer has its default modifiers

pseudo hazel
#

its just feels like why couldnt they have just done the extra step and kept the same functionality in the end with like hiding the attributes

carmine mica
#

because you cant hide attributes without setting some or an empty map of attributes

pseudo hazel
#

but you can add a custom one and then hide all of them?

#

thats the part i dont get

carmine mica
#

yeah, but that sounds like awful behavior. someone calls setItemFlag(Flag.hideattributes) and suddenly it adds a random modifier?

#

that's not good API, just adding modifiers behind the scenes when someone sets a flag

blazing ocean
pseudo hazel
#

but neither is having a flag called hide item attrbutes that doesnt hide attributes by default

#

idk

carmine mica
#

its an issue with the ItemFlag API itself

pseudo hazel
#

maybe there is just no other way

carmine mica
#

its not just attributes that have this problem, its just the most commonly used item flag for this

pseudo hazel
#

yeah mojang just needs to fix their shit I guess

#

but they arent xD

elder dune
#

Is their a diffrent function you need to call for when a player is standing on a block?

Because atm I have a plugin where when they get hit they get launched 5 blocks in the air
but they only get launched when they are already in the air and when they are standing on
a block they dont get launched

Here is the event code: https://pastebin.com/sd84HpDg

tardy delta
pseudo hazel
#

different compared to what

quaint mantle
tardy delta
#

oh dang

#

if i ever get a lot of money ill consider a framework laptop

elder dune
#

Or better yet is their a reason why velocity dont work when a player is standing on a blcok but does work when they are hit already in the air ?

eternal oxide
#

?whereami

quaint mantle
#

any way to get the title of a currently opened menu?

carmine mica
carmine mica
river oracle
#

?gui don't use titles to see which GUI you have open

tardy delta
#

InventoryView has a title

river oracle
tardy delta
#

depends on what use

river oracle
#

there is almost 0 use for that method

#

I mean I genuinely can't think of a good one

#

99.99% of the time someone asks about a title they're just doing a naive GUI implementation

quaint mantle
#

porting 1.8 😎

#

and trying my best not to have to refractor all UI's

river oracle
#

read the thread above

quaint mantle
#

yeah I'm trying my best to avoid that

river oracle
#

you're exposing whatever plugin this is to possible exploits

pseudo hazel
#

yeah the only time you touch the title is when you set it yourself

river oracle
#

and really setTitle should be called sendTitleChange you're just throwing a packet out

eternal night
#

nah iirc spigot does store that new title somewhere

#

but w/e dumb method

river oracle
eternal night
#

dumb developer

river oracle
eternal night
#

like yea, setTitle does update the title no?

#

getTitle will return the updated one

river oracle
#

setting the title for the view on the server side though does work

eternal night
#

it does more than just throw out a packet

river oracle
#

which is why it was renamed

#

because the views title can never revert

river oracle
eternal night
#

then

#

but yea

pseudo hazel
#

oof

river oracle
#

IK paper doesn't like that method, but I find it quite useful, even though it is a client quirk that allows it

eternal night
#

this could have really been such a nice "send packet method"

#

like, that we would have pulled

#

the fact that it fucks around with the state is so ass

pseudo hazel
#

cant we just have a send packet method for all packets :/

eternal night
river oracle
eternal night
#

Yea and returned in a new method skully

#

but w/e

#

works I guess ℒ️

river oracle
kind hatch
#

Can't you just make another pr that does it the way you want then?

river oracle
#

or very close to it

grim oak
#

Hi, how could I confirm if a tree is 'natural', so if i wnat to make a quest to mine a 100 wood, how could i confirm its not wood they have placed down

kind hatch
river oracle
pseudo hazel
#

just count the wood in their inventory

river oracle
#

you could get away with your own metadata or PDC here

#

PDC >>>

#

literally just apply a byte to a block you can do this super easily with blockpdc

#

?blockpdc

undone axleBOT
river oracle
#

if you only apply 1 byte you don't really have to worry about storage

kind hatch
#

Do placed blocks actually store data now?

river oracle
#

blockpdc uses chunk

kind hatch
#

Ahhh

river oracle
#

@eternal night I actually had a question for you. I've been playing around with the new InventoryView API to ensure it works smoothly, however, with my current implementation I found a strange issue.

If I set anvil repair cost in PrepareAnvilEvent it updates under the conditions

  • Shift Click Occurs into the Anvil
  • Item Text is changed

It doesn't change if a regular placement occurs though.

I narrowed it down to a packet update spigot does, but I'm confused why specifically it causes an issue with regular click.

sendAllDataToRemote(); // CraftBukkit - SPIGOT-6686: Always send completed inventory to stay in sync with client 

This is the exact reason it updates for Shift Click's and Item Text changes, but it won't for regular placements unless I send it again a tick later

anvil.setRepairCost(10);
// Bukkit.getScheduler().runTask(this, () -> ((Player) event.getView().getPlayer()).updateInventory());
#

my main wonder is why does a regular click not send the correct data to the remote even though I've confirmed that its set correctly in the data slots

eternal night
#

Lemme finish paper and read πŸ‘

carmine mica
#

it breaks drags and other various things depending on if the click event is cancelled or not

wraith delta
#

Whats the best way to replace text in a chat message without sending the message again? or is it just not possible?

#

i feel like if i took their message then cancelled and changed it and broadcast it again thats inefficient.

slender elbow
#

why not just change the message in the chat event? 🀨

remote swallow
#

lynx ip leaked totally real

slender elbow
#

yeah he has all the IPs

tardy delta
#

now how is this any different in functionality

        private static int indexOrThrow(char value) {
            byte idx = -1; // dummy value to make the compiler stop complaining

            Assert.isTrue(
                    value < MAX_RANGE_CHAR && (idx = indexLookup[value]) != INVALID_IDX,
                    "character %s is not allowed in a symbol name", value
            );
            return idx;
        }

then

        private static int indexOrThrow(char value) {
            Assert.isTrue(value <= MAX_RANGE_CHAR, "character %s is not allowed in a symbol name", value);
            byte idx = indexLookup[value];
            Assert.isTrue(idx != INVALID_IDX, "character %s is not allowed in a symbol name", value);
            return idx;
        }

(

    static void isTrue(boolean condition, String fmt, Object... placeholders) {
        if (!condition) {
            throw new SyntaxException(fmt.formatted(placeholders));
        }
    }

)

#

somehow first one somehow decides to throw

lunar mica
#

Sorry for ping but it shows me again like Material is deprecated.. I must always check for updates or smthng is wrong with my InteliiJ?

young knoll
#

Not sure

orchid iron
#

Hi does anyone know why unsafe dig_speed enchantments dont show any effect above level 5?

young knoll
#

What do you mean effect?

twin venture
#

Hi , when iam using redis (jedis) server freezes

fervent cobalt
#

Does the server guarantee the order of execution of event handlers to match the order in which the events were created in?

chrome beacon
twin venture
#

where i should run it then?

#

it should be onEnable

#

subscribing is blocking the main thread ..

worldly ingot
young knoll
#

What if the other plugin is already on highest :(

carmine mica
#

loadbefore

knotty ruin
young knoll
#

What if they use monitor! Clearly we need monitor+

knotty ruin
#

what if they use monitor+

slender elbow
#

can we add BigDecimal for event listener priority?

#

@ choco

young knoll
#

Can an annotation even use those

knotty ruin
#

thats just so overkill lmfao

slender elbow
#

most certainly not

slender elbow
young knoll
#

Perfect

knotty ruin
#

devs gonna fight until the server runs out of memory

young knoll
#

Look my listener is simply the most important

river oracle
young knoll
#

If only brewing was that fast

river oracle
#

you can make it that way πŸ˜‰

kind hatch
#

@river oracle You left at the worst time. I just got it to work.

river oracle
#

πŸ₯³

warm ledge
#

wondering, I was working on a cutscene system and realised setting the pitch & yaw of a location doesn't actually set the players yaw & pitch to those values upon teleportation, is there a different approach to this? Setting it directly via player.getLocation().setYaw/pitch doesn't set it either.

slender elbow
#

player.setRotation iirc

#

or directio n idk

warm ledge
#

I swear that method didn't exist 2 minutes ago

#

.. thx I'll try

#

yeah that method does exist, but you're not actually allowed to set the rotation of a player "and you should consider teleporting instead", unfortunately teleporting doesn't set it either πŸ˜…

slender elbow
#

xd

warm ledge
#

yeah the debug is just funny. Printing x y z yaw pitch of the location I teleport to gives me the values I want. printing the player values right after teleporting gives me the x y z, and then just yaw and pitch r completely thrown out the window

#

not sure thats even a my-code problem anymore tbh?

worldly ingot
remote swallow
#

Smh emily

young knoll
warm ledge
#

eh, not really blaming anyone

#

just not sure why setyaw n setpitch do absolutely nothing

#

And it's getting slightly irritating after like 3h lol

slender elbow
winter zenith
#

what even is the beef with spigot and paper

#

they all hate each other

slender elbow
#

Vanilla. Bukkit. Spigot. Paper. My grandmother used to tell me stories about the old days, a time of peace when Aikar kept balance between the Bukkit Tribes, Spigot Kingdom, Paper Nation, and Vanilla Nomads. But that all changed when Wolvereness' DMCA attacked.

river oracle
young knoll
#

What happened to Aikar

#

Was he killed in the war

slender elbow
#

Only he could stop the ruthless paperbenders. But when the world needed him most, he vanished.

worthy yarrow
#

Anyone know if CoinsEngine has a public repo? Their .readme isn't very helpful lol

slender elbow
#

that is the repo.. it does have other files besides the readme lol

young knoll
#

Oh hey

#

They got infected with the buildtools

slender elbow
#

:PepePoint:

worthy yarrow
#

I need to hook into it D:

kind hatch
#

You know what. I should probably add some sort of check to BT to see if those have been set and inform people if they have been set to what it once was so they can change it back.

toxic sage
worthy yarrow
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

worthy yarrow
#

Oh you have the right one

toxic sage
undone axleBOT
#

Usage: !verify <forums username>

#

A private message has been sent to your SpigotMC.org account for verification!

toxic sage
#

!verify nonymous13

undone axleBOT
#

A private message has been sent to your SpigotMC.org account for verification!

toxic sage
#

so I'm trying to get the entity hook that the player has on his head, is there any method to do this?

worldly ingot
summer scroll
#

Just been exploring Bungee Plugin Messaging and I'm kinda stuck, so in the spigot server I want a placeholder to get the balance that the player has, but the problem is the data is in bungeecord server, how can I get the data from bungeecord to spigot server and display it in PlaceholderAPI placeholders?

outer tendon
#

If I have a Bungee server that is running my Party system plugin on the proxy and I want to be able to access cached information from the individual servers running on the network, what is the best way to go about this?

atomic swift
#

yes

river oracle
#

Jesus just use the docs for that kekw

#

?jd-s

undone axleBOT
river oracle
#

Some weird shit can happen If you're under j21 developing latest

#

Otherwise could just be eclipse being weird

#

If it compiles that's all that matters

atomic swift
#

was on J2SE1.5 switched to J2SE1.8

#

AND IT WORKS NOW

river oracle
#

πŸ’€ java 5 wtf

atomic swift
#

idk

river oracle
#

What version are you developing for like mc version

atomic swift
#

i use 1.8 for all of my projects

river oracle
#

πŸ’€

#

Use Java 17 at minimum

atomic swift
#

im on J18

river oracle
#

JSE1.8 is java 8

summer scroll
#

This is my attempt of getting data from BungeeCord to Spigot server, it looks so bad lmao. I'm trying to do it with one method like double getBalance(org.bukkit.entity.Player), what is the best approach here? Here is the code https://paste.md-5.net/oxodefuves.js

drowsy helm
#

builds on a literal 20 year old JDK

fervent cobalt
#

This is very good

#

What about packets? Can you even add custom handlers to them?

#

Ping when answering please

chrome beacon
#

Use PacketEvents or ProtocolLib

blazing ocean
#

packetevents my beloved

knotty ruin
#

^

undone pebble
#

^

blazing robin
#

hey guys, is there any way to get blocks in a chunk?

I tried this :

  public static int[] getMaterialAmount(final Chunk chunk) {
        final int[] amount = new int[Material.values().length];
        final int minX = chunk.getX() << 4;
        final int minZ = chunk.getZ() << 4;
        final int maxX = minX | 15;
        final int maxY = chunk.getWorld().getMaxHeight();
        final int maxZ = minZ | 15;

        for (int x = minX; x <= maxX; ++x) {
            for (int y = 0; y <= maxY; ++y) {
                for (int z = minZ; z <= maxZ; ++z) {
                    ++amount[chunk.getBlock(x, y, z).getType().ordinal()];
                }
            }
        }
        return amount;
    }

 @Override
    public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args) {
        long time = System.nanoTime();

        final int[] amount = getMaterialAmount(((Player) sender).getLocation().getChunk());

        time = System.nanoTime() - time;

        sender.sendMessage(ChatColor.GREEN + "TNT: " + Integer.toString(amount[Material.TNT.ordinal()]) + "!  (" + DECIMAL_FORMAT.format(time / 1000000.0D) + "ms)");
        return true;
    }

But It's not work at all
how can I get blocks in a chunk

fair rock
#

?paste

undone axleBOT
blazing robin
fair rock
#

Yes.

agile anvil
#

And please explain if you have errors, or whatever

blazing robin
blazing robin
hoary pawn
#

.

blazing robin
# undone axle https://paste.md-5.net/

I've tried this : https://paste.md-5.net/kebiruhoye.java

but the error said :

0439)
[16:23:51 ERROR]: Could not pass event BlockPlaceEvent to ShibaHopper v0.1
java.lang.IllegalArgumentException: x out of range (expected 0-15, got -736)
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:193) ~[guava-31.1-jre.jar:?]
        at org.bukkit.craftbukkit.v1_20_R1.CraftChunk.validateChunkCoordinates(CraftChunk.java:398) ~[purpur-1.20.1.jar:git-Purpur-2001]
        at org.bukkit.craftbukkit.v1_20_R1.CraftChunk.getBlock(CraftChunk.java:107) ~[purpur-1.20.1.jar:git-Purpur-2001]
        at kr.shibapark.hopperlimit.listener.HopperListener.getMaterialAmount(HopperListener.java:35) ~[ShibaHopper.jar:?]
        at kr.shibapark.hopperlimit.listener.HopperListener.onPlace(HopperListener.java:17) ~[ShibaHopper.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor122.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[purpur-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[purpur-api-1.20.1-R0.1-SNAPSHOT.jar:git-Purpur-2001]
fervent cobalt
#

Is network order preserved for handlers?

umbral ridge
#

its preserved if you put it in a fridge

#

otherwise it spoils

drowsy helm
fervent cobalt
chrome beacon
fervent cobalt
#

I asked about normal events and then about packets

chrome beacon
#

Anyways I believe it's the same as regular listeners with ProtocolLib, set the priority. Not sure about packet events

fervent cobalt
#

Hmm

#

I'm interested in how the server works under the hood. Does it handle the packets in the correct order internally, at least?

#

When does it even handle the packets? Is it in some part of a tick? Or does it have a separate update cycle?

fervent cobalt
#

Also, how do things like ProtocolLib allow you to add packet handlers? Do they intercept traffic, or is it something in the server exposed that they catch?

chrome beacon
#

They inject a packet handler it to netty

#

Which is the network library used internally

fervent cobalt
fervent cobalt
#

Alright

river yew
#

hello

#

guys i hope anyone help me

#

i have build tools, minecraft nms 1.20.4_R1

#

i try to make npc but i dont know, i hope any one help

radiant aspen
#
java.lang.IncompatibleClassChangeError: Found class org.bukkit.inventory.InventoryView, but interface was expected

Thoughts on how one would support this and previous versions of spigot?

#

I can update my spigot builds and change it to an interface, but then it will break any versions before this commit

#

People changing stuff just to make me do more work 😒

twin venture
#

hi , question how i can get a data from config file that use bungeecord api?

#

this does not work ..

#

it send empty data

#

but the file is there , and it have the correct data structure

chrome beacon
#

If you're just trying to support older 1.21 builds don't bother

chrome beacon
twin venture
twin venture
chrome beacon
#

I doubt that's how the file is structured

twin venture
#

this is how its structured

radiant aspen
#

Sounds like a pain

chrome beacon
#

You get used to it πŸ’€

radiant aspen
#

tbh, I already got a bunch of version specific code....

#

spigot just likes changing stuff to watch us suffer

twin venture
radiant aspen
#

atm I support 1.13+

twin venture
#

i did it , many times .. really painful and waste of time and effort just try to support 1.19+

twin venture
chrome beacon
#

So fix the path in the code

twin venture
#

you mean the section?

chrome beacon
#

You already have the kits section there's no need to get it again

#

Remove the path variable and just use key

twin venture
#

alr got it

chrome beacon
#

Yeah ItemStack class isn't going to work on Bungee

#

You really should setup your project properly so that import isn't available

#

Use multiple modules

river oracle
radiant aspen
river oracle
#

We don't support API Extension

radiant aspen
#

I believe thats the code its failing on player.getOpenInventory().getTopInventory()

river oracle
#

Please make a jira report

#

Not sure how that breaks it I ran many plugins on that build

chrome beacon
#

The problem is compiling against new version not working on old servers

chrome beacon
#

That ASM thing is for old plugins to run on new

quiet ice
#

Oh in that case you can even use MethodHandles

chrome beacon
#

Not available in J8

river oracle
#

@radiant aspen nvm don't report that I wasn't aware you were going new to old

#

Yeah nothing we can do about that

tardy delta
#

supporting old versions goes brr

quiet ice
river yew
#

who know nms?

radiant aspen
#

I currently compile against org.spigotmc:spigot-api:1.21-R0.1-SNAPSHOT

chrome beacon
river oracle
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

tardy delta
#

they are

river yew
#

yes

quiet ice
#

MethodHandles should be a J8 thing, might even have been introduced in J7

radiant aspen
chrome beacon
river oracle
radiant aspen
#

if anyone claims to know about NMS, they know so little about it they dont understand how much they dont understand

chrome beacon
#

Use Citizens

radiant aspen
#

Which is dumb

river oracle
quiet ice
river oracle
#

You can modularize easily

radiant aspen
river oracle
radiant aspen
#

Yeah, which is super dumb

river oracle
#

Not really it's the reccomend way to do legacy support

chrome beacon
#

It's the easiest way to avoid random issues like this

river oracle
#

More asm remaps are coming

#

This just happens to be the first

radiant aspen
river oracle
#

What's dumb is support 10+ year old legacy api for people who won't update

#

That's what's dumb

radiant aspen
#

I wouldnt really call 1.20 "10+ year old legacy"

river oracle
#

1.20 still contains code that is ridiculously horrible We're moving forward in some areas that is long overdue

radiant aspen
#

I mean Im not really sure how much benifit moving from an abstract class to an interface provides tbh, seems fairly minimal

river oracle
#

Ig wait and see

#

The fact I actually convinced md to make a breaking change says enough

radiant aspen
#

I do have 0 clue, you are correct. I dont know too much about the inner workings of Spigot

#

but It means I have to do work, which is annoying

#

because instead of doing work, I would rather not do work

#

because not doing work > doing work

river oracle
#

Just switch to doing multi version support in a sensible way

radiant aspen
#

I currently have this which is where all the horrible scary code I dont want too have to deal with goes

#

I mean its not too bad tbh, its just I dont like dealing with it cuz every time I do, It reminds me of how much I need to clean it up

#

I also gotta update my tests now cuz they are failing aswell

#

it shouldnt take to long to be fair

#

I just like complaining πŸ‘€

river oracle
#

Yep just a warning this is simply the first domino so jump ship while you can duck tape won't fix this

smoky anchor
#

May I ask, where is this heading ?

river oracle
#

Pretty much every abstract class is going goodbye

radiant aspen
radiant aspen
river oracle
# radiant aspen What else is planned

Almost all enums and abstract classes are being converted to interfaces to be backed by NMS registries and hopefully eventually an API for registering data driven components using this registries.

As far as InventoryView I'm modernizing the Inventory api pretty much all of the internals are being rewritten. And most of the curren creation and InventoryType will be deprecated and replaced with a more modern and capable api. The backend of the old api will be replaced by these new internals to ensure compatibility

radiant aspen
river oracle
#

ABI is maintained

radiant aspen
#

ABI?

river oracle
#

Binary interface

radiant aspen
#

Im most concerned about version support, it feels like its going to be extremly difficult to support anything 1.20 and below no?

tardy delta
river oracle
radiant aspen
#

and dont say drop 1.20 < support

river oracle
tardy delta
#

thought you meant the api contract would be unchanged

river oracle
#

Vs working down

river oracle
#

Most people won't notice other stuff

#

ASM will do heavy lifting

tardy delta
#

asm will do what?

river oracle
radiant aspen
river oracle
#

At the binary level

tardy delta
#

you're saying a lot of magical words without any meaning :)

river oracle
tardy delta
#

yes

radiant aspen
tardy delta
#

clearly

river oracle
#

Spigot has a class called commodore and it loops through method calls to search for out of date methods and classes used and reroutes or rewrites to the updated or expected byte code

tardy delta
#

:/

river oracle
#

Hopefully that simplifies it idk how else to simplify java asm

radiant aspen
young knoll
#

lol

radiant aspen
river oracle
#

Tbh idk completely the checks they use derfrzocker wrote most of Commodore

hushed spindle
#
if (e.getView().getTopInventory() instanceof BrewerInventory) {...}

what's happening here? what changed with 1.21 that this now throws this error?

radiant aspen
#

Welcome to the club

tardy delta
#

what on earth is donkey kong? new king kong classic?

river oracle
hushed spindle
#

man

young knoll
#

lol

hushed spindle
#

so this is ongoing and no solution is found yet xd

young knoll
#

It’s a painting

river oracle
#

Not sure what to say we can rerelease finalized versions with an update thats quite silly

radiant aspen
#

So whats the plan for the Material changes aswell, that sounds like its going to be a huge thing aswell?

#

Is this changing every enum aswell or just Material (im assuming every, so EntityTypes Biomes ect)

young knoll
#

Material will be deprecated

#

But still functional

hushed spindle
#

wait im not understanding this, so you cant make a plugin compatible with versions 1.21+ and below?

young knoll
#

The other enums will be yeeted and replaced with abstract classes

radiant aspen
river oracle
#

Or was that changed

radiant aspen
river oracle
radiant aspen
#

πŸ€”

hushed spindle
#

its nice that blocks and item types will be data driven now tho