#help-development

1 messages · Page 1329 of 1

thorn isle
#

i will die from old age before we get value types while other languages have had it since the 80s

chrome beacon
#

Project Valhalla is on track for Java 28 I believe

#

so it's not that far off

thorn isle
#

and when my great-great-great grandchildren do get value types, the type system will be lacklustre and half baked just like generics

cold bobcat
#

OK so to wrap up my initial request, installing the actual openJDK JDK (not just JRE) seems to have done the trick. thanks gang!!!

#

please feel absolutely free continue smack-talk on oracle and/or java

ivory sleet
#

We even almost got string templates D:

thorn isle
#

"oops it was bad nevermind let's try again in 10 more years"

cold bobcat
#
Total Time: 2 minutes 29 seconds

Success! Everything completed successfully. Copying final .jar files now.
Copying spigot-1.21.11-R0.2-SNAPSHOT-bootstrap.jar to /home/pingu/spigot-buildtools/spigot-1.21.11.jar
  - Saved as ./spigot-1.21.11.jar

cold bobcat
#

I seem to remember being disgusted by the proposed syntax

mortal vortex
#

ooo python recently got template strings. Looks so cool

thorn isle
#

all the other languages get the cool things

cold bobcat
#

but java backcompat is one helluva requirement I bet

#

even JS has template strings lol

thorn isle
#

meanwhile all java gets is "removed even more things from unsafe, vol 24"

chrome beacon
cold bobcat
#

RIP

thorn isle
#

enjoy your 5x slower varhandles plebeians

ivory sleet
wet breach
#

in fact, it would be nice if they would replace the stuff first before removing >>

ivory sleet
#

yea thats true

#

ig they might have tech debt, where they cant keep the old stuff to coexist with the new stuff coming, just a speculation

wet breach
#

most of unsafe uses natives directly

thorn isle
#

i think it's mostly about stability for mission critical systems

#

they don't want their language to be the one where the hospital infra implodes because someone did a native memory with unsafe

#

goes into the same bucket as them removing reflective access to jdk classes

wet breach
ivory sleet
sly topaz
thorn isle
#

which, i mean, i get it; you want it to be stable, but at the same time, i'm not a hospital and i would like to be able to do things

wet breach
chrome beacon
#

I only know of the flexible constructor bodies

thorn isle
#

i think that was the one where you could define a method by replacing its body with a lambda or a method reference

ivory sleet
#

think they meant that olivo

cold bobcat
#

I had to deal with native library extensions in a react native project for android once. that was a pretty unique fresh hell

thorn isle
#

or no that was concise method bodies

sly topaz
#

it was concise method bodies the one I was thinking about, just mixed them up in my memory

chrome beacon
#

Did that ever make preview

#

Linked JEP only says Draft

thorn isle
#

god knows

#

the syntax looks cursed

sly topaz
#

I thought it made preview, but it doesn't seem like it ever did. Just a lot of fuss on reddit

thorn isle
#

what i really do want is the record with'ers

#

such a simple feature and yet it's taking forever

sly topaz
#

the syntax for that one was rough tho

ivory sleet
#

getting the structured concurrency api would be nice also

thorn isle
#

eh i think the syntax was okay-ish

sly topaz
#

hey, we at least got stable values in jdk 25/26

#

err, lazy constants now

thorn isle
#

i'm pretty happy with virtual threads

#

it's the one thing that i'd like to keep since java 9 if i had to choose

#

or well

ivory sleet
sly topaz
#

I liked the previous stable values, because it allowed me to define a constant without having to compute it 😔 . It would've been nice for JavaPlugin singletons which I don't compute myself

thorn isle
#

i will be happy with them once they fix the synchronized mounting issue

ivory sleet
thorn isle
#

which is in i think 25

cold bobcat
#

a good long-term dev friend of mine has always described C# as "java with 8 years of hindsight" and that hit pretty hard / has rung pretty true for me

sly topaz
#

it isn't a crazy feature to have, no syntax changes either

sly topaz
ivory sleet
#

i mean the only thing that really strikes me as modern java that is delivered is records, switch expressions, sealed, virtual threads and the whole gen zgc (at least to me those are most memorable)

thorn isle
#

oh yes, sealed interfaces are quite nice

sly topaz
#

records are going to be annoying in the future, they kinda rushed that one

thorn isle
#

especially in conjunction with the new switch; it's basically enums but not cancer

sly topaz
thorn isle
#

honestly for all the hell i raise about value types, i think they maybe should look into improving the jit, escape analysis, and inlining, and doing better scalarization on the jit level instead

ivory sleet
thorn isle
#

we already sort of have value types, at least in performance terms, in that after escape analysis, your Result is going to get scalarized to like an Exception and a Object refs on the stack

#

it's just that it's incredibly fragile because the Result must not escape the inlined call stack, so if you e.g. pass it to a bunch of other methods afterward, you easily break it

sly topaz
#

I wish it was that simple, it just ends up with a lot of young gen churn last time I tried it

thorn isle
#

it's fragile but it does happen and does work

#

there are many gotcha's though

cold bobcat
#

its pretty nice

thorn isle
#

and it's kind of something you need to verify with a benchmark and then analyze the c1/c2 produced by the jit afterward

sly topaz
#

I never understood the fuss about LINQ, C# people swear it is the most amazing thing

#

that being said, only time I've ever touched C# was when doing Unity and that was ages ago

thorn isle
#

i moderately dislike linq

#

not enough parentheses

ivory sleet
#

I do find LINQ kinda mid, its kinda just like a lot of function calls but u omit the parenthesis

#

syntax sugar ig

thorn isle
#

it's builders/method chaining for people who spend 80% of their time working with databases

sly topaz
#

I do think it is nice you can make whatever objects compatible with it and (ab)use of the syntax in very colorful ways

cold bobcat
sly topaz
#

like in Java, they just recently added Stream Gatherers which are horrible to work with, you don't have that experience when adapting LINQ syntax

ivory sleet
#

yea

cold bobcat
#

that and how it works with entity framework

#

linq-to-sql is wizard magic

ivory sleet
#

it does feel more or less made for that

ivory sleet
cold bobcat
#

also the async / await in general is super nice

#

no await keyword in Java right?

#

man look at me here almost shilling for microsoft

#

what have i become

sly topaz
#

I mean, not like shilling for Oracle is any better lol

sly topaz
thorn isle
cold bobcat
thorn isle
#

what i would like to see is some kind of escape analysis metadata added by the compiler to better inform the jit at runtime

cold bobcat
#

i found the python async await approach one of the more interesting approaches

ivory sleet
thorn isle
#

so you didn't need the entire call stack across the entire lifecycle of the object to be inlined to scalarize it

cold bobcat
#

in that the language specifies the keywords and so on but not what they get used for

#

which has led to different frameworks using them in different ways

#

main two seem to be asyncio and trio

thorn isle
#

that sounds very fun and simple to learn

thorn isle
#

though to be fair, for minecraft servers at least, increasing the max inlining size by about 20% reduces a ton of young gen gc churn

#

a lot of that churn comes from infinite fucking AABB's being allocated and resized for every entity and block and a billion other things every tick

cold bobcat
thorn isle
#

and those call stacks are just like 20 instructions too large to fit into the default inlining size

ivory sleet
#

i see

#

thats interesting

thorn isle
#

either way all of that shit could be avoided with some escape analysis metadata; 3/4th of those calls are recursive constructor/factory calls that just add more parameters to the call and pass it along to another constructor

ivory sleet
#

thats true

cold bobcat
#

"one more factory layer would fix me"

ivory sleet
#

lol

cold bobcat
#

alright i need to go to bed but thanks for both the help and the chats

ivory sleet
#

cheers!

thorn isle
ivory sleet
thorn isle
#

iirc there are several parameters, uh

#

-XX:MaxInlineLevel at least used to be a thing

#

which is in method calls

#

-XX:MaxInlineSize which is in bytes

#

looks like FreqInline is for hotter loops than MaxInline but behaves otherwise the same

ivory sleet
#

ooo

#

nice nice

thorn isle
#

either way, as with all jit things, you probably want to check whether it does what you want with debug or diagnostics

#

-XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining

#

there are also dedicated inspectors that show the resulting machine code but just printing what gets inlined is good enough

ivory sleet
#

oo, yea thats true

#

good call

thorn isle
#

this has irritated me to the point where i've thought about writing a java agent that'd asm the server classes with manual scalarization based on an external config or maybe annotations, but the churn is negligible enough with gzgc that it doesn't really warrant so much effort

ivory sleet
#

fair, I was curious about if this could impact much aside from already tweaking gzgc (I did it heuristically last time)

thorn isle
#

well yeah, generational gc's are made to churn

#

it still pisses me off, but there are more worthwhile places of optimization

young knoll
#

Like removing herobrine!

craggy cove
#

Hello hello, don't know if I'm supposed to post here or on the other help chat so as its related to build tool meh I'll do it here
So... I just downloaded the buildtool (.exe and .jar) and I got this error right on start

java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 403 for URL: https://hub.spigotmc.org/versions java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source) java.util.concurrent.CompletableFuture$AsyncRun.exec(Unknown Source) java.util.concurrent.ForkJoinTask.doExec(Unknown Source) java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

on cmd java -version give me this output

java version "25.0.1" 2025-10-21 LTS
Java(TM) SE Runtime Environment (build 25.0.1+8-LTS-27)
Java HotSpot(TM) 64-Bit Server VM (build 25.0.1+8-LTS-27, mixed mode, sharing)

and going on https://hub.spigotmc.org/versions by hand send me on the good page

chrome beacon
craggy cove
#

Yep

chrome beacon
#

Could you give the cli a try

craggy cove
#

look like it's starting, for now ^^'

#

Well got my 1.21.11 build so I think it worked ? ty

chrome beacon
#

not sure why that seems to break when people run the GUI

lilac dagger
#

mine works as expected

craggy cove
#

any way to choose build version ?

lilac dagger
#

let me see

craggy cove
#

from cli I mean

lilac dagger
#

do you have the jdk java?

#

the version doesn't seem to say what you're running

craggy cove
#

got jre for sure but dont think so about anything else

lilac dagger
craggy cove
#

I got my build done, no longer any issue, what I wanted to know is that if I could choose spigot version who's build, here I got 1.21.11, but if I want like 1.20.X or soething else

rotund ravine
#

I do wonder if ur doing anything diff / using diff headers in the gui @chrome beacon

chrome beacon
#

but I haven't checked how that part works 🤷‍♂️

coarse creek
#

One message removed from a suspended account.

lilac dagger
#

should be pretty easy

#

if there's no nms it should work without any change from you

thorn isle
#

there are a couple potion effect and attribute name changes i think

#

but nothing major

#

if it depends on item nbt, those parts need a full redesign because that no longer exists as a concept

lilac dagger
#

hmm true

mortal vortex
#

Anyone know what this is about and why it stays ontop of my screen and cant be minimizzed

mortal vortex
#

Thanks buby, I forgot the part where I directly pinged you and asked for help

#

silly me

drowsy helm
#

stop asking me idk

mortal vortex
#

daft cunt'

drowsy helm
#

by the looks of it, it just allows jetbrains IDEs to interact with kernel level events

onyx fjord
mortal vortex
#

ZAYUMM

onyx fjord
#

Or critical things will happen to your operating system

#

Don't want it operatingn't do you

mortal vortex
#

must update it immediately

onyx fjord
#

Critically as well

#

Oh this is not general

mortal vortex
#

we do a little trolling everywhere

buoyant viper
#

i think either of those IDEs install it

mortal vortex
#

Nope never.

buoyant viper
#

yeah ur ratted then idk

mortal vortex
#

fuck

#

radsteve's jetbrains kotlin virus

buoyant viper
#

oh do u have ReSharper

#

thru VSCode or Visual Studio maybe

mortal vortex
#

OHH YEAH

wide cipher
#

Is there an easy way to get a github action to build my plugin with remapped mojang jars?

rancid wolf
#

Hey, I have a question. Does anyone know what might have happened to the Plugin Getcase? There's a box where you assign a key and it doesn't work. You don't have a key for this box.

chrome beacon
sonic drift
#

I have no idea about coding or anything like that but i need a very specific small thing as a plugin
Im not sure if this is hard to do even, but i want to make a sort of like ranking system as a plugin where you gain points for killing players and if a player kills you then you lose points
and the points are supposed to be shown next to your name as well
as in

Tobi [104]
For Example.
i found a mod that does exactly that but i dont want to have a modded server. ive already tried using Claude for help to turn the mod into a plugin aka replicating a plugin that does exactly what the mod does
and i got a folder now and i fail turning the folder into a .Jar file using IntelliJ IDEA

and now im kind of lost...

#

if it helps then i can send the mod and folder too

thorn isle
#

i'm fairly sure something very close to this does exist as a plugin

#

perhaps ask in #help-server as the people in that channel are more familiar with the assortment of plugins available out there

#

you can also try seaching for something like "spigot bounty" for bounty plugins

#

if you really do want to write it yourself, this channel can guide you with that but it probably won't happen overnight

drowsy helm
thorn isle
#

minus the "points shown by playername" bit (unless you use scoreboards for it) it might be easy enough to be vibecodeable

#

i'm sure cursor could do it

ivory sleet
#

vibecodeable
lmao

#

good grief thats a good word

chrome beacon
#

What happened to your pfp

ivory sleet
#

i kinda just cleared everything, kinda boycotting discord ig u could say, unsubbed nitro also :>

#

u inspired me slightly olivo

chrome beacon
#

👀

mortal vortex
#

yaoi waiting to happen

#

conclube x olivo

ivory sleet
#

naaa thats crazy

chrome beacon
#

💀

mortal vortex
#

after 2 weeks you lose your nitro streak badge

ivory sleet
#

maybe yea

mortal vortex
#

Even if you resubscribe your Ruby badge is gonna go bronze again brochacho

ivory sleet
#

well be that as it may, im not too fuzzed about it anymore as i dont spend so much time on discord these days

thorn isle
#

is it because of the age verification whatever thing

mortal vortex
#

Do you believe in recycling? and if so would you recycle your helper role onto me?

thorn isle
#

is it even live yet? i haven't even noticed anything so far

ivory sleet
mortal vortex
ivory sleet
#

😭 what

thorn isle
#

at least your avatar is still orange

ivory sleet
mortal vortex
#

yk my buddy jishuna woulda said yes straight away

#

thats how yk he's a real one

thorn isle
#

they say there's some kind of ai inference thing going on where they go through your message history to see if you're a squeaker or not

ivory sleet
#

lmao

young knoll
#

Yeah they’re apparently going to monitor your usage and ask you to reverify if they think you’re a kid

#

So no saying skibidi rizz fornite 67

ivory sleet
#

Yeah they’re apparently going to monitor your usage and ask you to reverify if they think you’re a kid
fuck thats cringe

mortal vortex
#

yeah i actually got that

mortal vortex
young knoll
#

It’s not even out yet

#

Well, outside the UK

mortal vortex
#

oh it could be Australia's Teen Laws

mortal vortex
#

im getting ts

wet breach
wide cipher
#

When i try to run buildtools, i get this error java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 403 for URL: https://hub.spigotmc.org/versions java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source) java.util.concurrent.CompletableFuture$AsyncRun.exec(Unknown Source) java.util.concurrent.ForkJoinTask.doExec(Unknown Source) java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

buoyant viper
#

Tuff

wide cipher
#

yes

mortal vortex
wide cipher
#

how...

#

found it, will try now

#

works, thanks

mortal vortex
#

WELCOME

wide cipher
#

THANK YOU

sullen marlin
#

should be fixed

sonic drift
umbral ridge
#

is it ok to block AsyncPlayerChatEvent with db calls?

#

eg.: join() from CompletableFuture

chrome beacon
#

as it can sometimes be fired sync

#

if a plugin forces a player to send a message for example

umbral ridge
#

ok

#

time for a cache impl!

umbral ridge
lilac dagger
sacred dagger
#

I just started developping java can someone help please

nocturne wing
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! 🎉

sacred dagger
humble tulip
sacred dagger
smoky anchor
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!

smoky anchor
#

yelling "help" here will not... help

#

also, "robot lessons" ?
read a book then

humble tulip
#

Gotta learn the basics on your own and then try to make whatever you want. When you run into issues along the way, then you ask for help

sacred dagger
#

Got it

umbral ridge
#

how would you normally handle name changes? just use uuid as a primary key - and some sort of plugin in between that does these checks? checks if uuid in db is the same as the player that's joining, and check if name has changed, and then updates it in the db?

#

i store uuid as a primary key, and username as a backup in the 2nd field (I need it, as a backup, if player is offline, for voting and stuff)

#

seems dumb because that would be one tiny tiny plugin, that would do just that... how would i even call such plugin... and i can't integrate it into any of my existing plugins... Permissions... Database... None of these really handle anything like that..

#

Database handles low level operations and db procedures... Permissions is an api, 2nd layer above the Database

#

3rd layer are actual plugins, not api anymore

humble tulip
#

UUID as primary

umbral ridge
#

why would I need LastLogin?

humble tulip
#

For really rare edge case

#

If I login as minion325

#

Then log out and change my name

#

30 days later someone takes my name and logs in

umbral ridge
#

Oh also. I have though about that and if you change your name while being online?

humble tulip
#

There’s 2 name entries with my name

umbral ridge
#

alright

humble tulip
humble tulip
umbral ridge
#

oh i see

#

i get it

humble tulip
#

Alternatively have a second table with Name as primary but make it case insensitive

umbral ridge
#

but for my table, uuid is UNIQUE and cant have 2 entries

humble tulip
#

And I believe that’ll allow for faster queries too since primaries keys are hashed or something

umbral ridge
#

i guess it should just override on quit event and check on join event

chrome beacon
#

There are also accounts with duplicate names :p

umbral ridge
#

I'm talking about premium only

chrome beacon
#

Yeah

humble tulip
#

Yeah

umbral ridge
#

really? how does that happen? :D

humble tulip
#

But different uuid

chrome beacon
#

not just that

umbral ridge
#

i guess i should put it in permissions, since it has stuff to do with identity

#

and profile layer

#

it's gonna be a long night

humble tulip
#

Whenever you’re looking up UUID from name in the db, you can get by name order by last login and limit to 1

umbral ridge
#

yea

humble tulip
#

OR have a name uuid table that you can just lookup for names

umbral ridge
humble tulip
#

Personally I have in my plugin a table where name and uuid only is stored and both are unique

#

That way if a player with a duplicate name joins, you always have the latest UUID for that player

#

I honestly have no idea if that’s the BEST practice

#

But it worked for me so far and I ran into no issues

chrome beacon
#

It looks like Mojang has taken care of the accounts with the same name

#

so that's not an issue anymore :p

sacred dagger
#

I think For a the correct approach is to use the player's UUID as a primary key in your database, as this will never change, and then to use a standard, mutable column for the username. When a player joins, you would simply check if their UUID is present in your database. If it is not, you would add a new record, and if it is, but their username has changed from what you currently have, you would update it. This should be done inside your existing user service or repository layer, not inside a plugin, as this is simply part of standard data synchronization.

#

@umbral ridge

chrome beacon
#

Did you just GPT that

sacred dagger
#

Yes

#

Is it not allowed?

chrome beacon
#

Yeah please don't do that

sacred dagger
#

it helps a lot tho

chrome beacon
#

If someone wanted an AI reponse they could ask an AI themselves

sacred dagger
#

Mhm

chrome beacon
#

So now you're just bothering people with an unwanted answer

sacred dagger
#

If it helped why wonder

#

If he dont want the answer he can just ignore it

humble tulip
#

String createPlayersTable = "CREATE TABLE IF NOT EXISTS " + getPlayersTableName() + " (UUIDVARCHAR(36) NOT NULL UNIQUE,NAME VARCHAR(16) NOT NULL UNIQUE);";

#

That’s how I create my table

#

I have a players table that’s separate from where I keep all other data

chrome beacon
#

VARCHAR for UUID 😭

humble tulip
#

I created this so long ago

#

And now I don’t even wanna change it

chrome beacon
#

fair enough

humble tulip
#

Plus it’ll just take up a tiny bit more space in the grand scheme of things and be minimally slower

lilac dagger
#

if someone who had a name didn't join the server and he changed the name and someone else took the name and join the server it'd error

quaint basin
sullen marlin
#

What are you doing with packets and why

quaint basin
#

https://imgur.com/a/IV1HSwj The code I sent you above belongs to someone else; I'm using packetevents where I do the same thing. To solve the problem I mentioned above, I'm listening to the Bukkit's InventoryClickEvent to send a packet with the item with the new value: https://pastes.dev/c8uYJmHU5w

#

However, the solution I mentioned to you, based on the inventoryclickevent, doesn't appeal to me much. Do you have any suggestions for something better?

#

To provide context: replaceData returns the itemstack containing the lore

young knoll
#

Wouldn’t it be better to intercept the existing outgoing packets and add the lore

sullen marlin
#

I'm just confused why packets are involved at all

#

?xy

undone axleBOT
lilac dagger
#

Yeah, he's looking for persistent lores which means actually using the item stack api

quaint basin
#

I tried intercepting the set_cursor_item packet and it actually works, but there are desynchronizations between the client and server because the item hash with the lore is different from the item on the server, causing these desynchronizations, and I have no idea how to solve this

quaint basin
#

For example, a stone is worth 10 coins now, but tomorrow it might be worth 20

#

And constantly changing this server-side data when the cache already performs this function, I don't think it makes much sense, and I think packet-level makes much more sense here

lilac dagger
#

Hmm, can't you just update player inventories on join and every hour?

young knoll
#

I think it’s set window item or something

quaint basin
#

This packet is sent to client when I open a chest, for example

#

But it's not sent when an item is moved from the player's inventory/chest. So that packet isn't enough

young knoll
#

I think there’s also set window contents or something

quaint basin
#

the rest is like WINDOW_OPEN, CLICK_WINDOW etc

tender shard
#

is that ProtocolLib?

chrome beacon
#

Yeah

tender shard
#

oh god I hate protocollib so much

#

especially since mojang maps are now around everywhere

#

just use the actual packet constructors

#

protocollib causes more issues than it has ever solved imho

mortal vortex
#

yeah this is an L for not using PacketEvents.

tender shard
#

packetevents is definitely much better than protocollib, but I still think that no library is needed in the first place

#

Why not simply construct a WhatEverPacket using its regular constructor and then just send it normally

#

neither protocollib, nor packetevents offer any version-independent additions

quaint basin
mortal vortex
#

LOOOOL

quaint basin
#

bro wtf

#

You guys criticize protocollib and recommend packetevents, but you can't even look at code using packetevents, lol

tender shard
#

I'd just use NMS for packets

#

both paper and spigot support moj maps nowadays

chrome beacon
tender shard
#

Isnt PacketWrapper abandoned since years?

mortal vortex
mortal vortex
tender shard
#

Yikes

tender shard
tender shard
#

the tagged method works like this:

    /*override*/ private fun tagged(component: Component): Component {
        if (remove.test(component)) return component
        return Component.storageNBT(loreTag, false, Key.key(loreTag)).append(component)
    }
quaint basin
tender shard
#

then one can identify their own lore simply using "line instanceof StorageNBTComponent && line.tag().equals(whatever)"

tender shard
quaint basin
tender shard
quaint basin
#

These checks I'm doing for the netty thread are much less costly than they are for the main thread, where they are more noticiable

tender shard
#

if you're worried about the overhead of cloning itemmeta everytime, there's paper's DataComponent API - but obviously that only works on paper

quaint basin
quaint basin
#

I think I'll keep with my packet-level work. I think it's more efficient

tender shard
#

I wouldnt be so sure, it still means you have to intercept literally EVERY single sent packet

quaint basin
tender shard
#

you still need to inject into netty and your interceptor gets called for every packet

#

and whenever there's any exception in netty, your plugin will always show up

#

people will blame you for mistakes that aren't yours, just because they see your plugin in the stacktrace

quaint basin
tender shard
#

you do you, I wouldn't mess with packets unless it's absolutely neccessary

#

hello frostalf

wet breach
#

whether you do it on netty thread or not, it consumes the same amount of resources. Just different resources as well. But not sure why you are worried about tick consumption. You can literally show up as having a high tick consumption just by being a chat plugin and having no effect on the rest of the server.

tender shard
mortal vortex
#

because people will see ur plugin name in the exception and u'll get contacted when u didnt do shit

quaint basin
mortal vortex
#

its like that time i may or may not have been affiliated with turkish arms dealers, and i got the blame for it

wet breach
quaint basin
mortal vortex
#

i got them too bro dw

wet breach
#

fair enough I suppose lol

quaint basin
#

xd

tender shard
#

A typical netty exception looks like this:

NullPointerException caused by:
bla bla NMS bla bla
Random plugin number one
bla bla NMS bla bla
Random plugin number two
bla bla NMS bla bla
YOUR PLUGIN
bla bla NMS bla bla
Random plugin number four
bla bla NMS bla bla

quaint basin
wet breach
#

There is a ways to keeping your plugin optimal using normal API instead of going packet route. I probably wouldn't recommend doing packet stuff unless your plugin is indeed experiencing problems. But if you have not even bothered to do measurements and proper testing to show that your plugin is slowing the server down, I see no reason to make things harder then necessary.

wet breach
#

netbeans and intelliJ allow having a code library 🙂

tender shard
quaint basin
#

send me

#

Okay, I'm going to finish this, and if I find anything too complicated, I'll just go the traditional way

tender shard
quaint basin
tender shard
#

what about Player#updateInventory() ?

quaint basin
tender shard
#

ah ok yeah

#

I think you're going down a rabbit hole

#

updating the lore of an item is really not very expensive

quaint basin
#

i think i'm finishing

#

let's see

quaint basin
tender shard
#

I highly doubt that, as said

#

I'm working for a server that got about 100-150 players per instance on 1.21.11 and we do inventory checks and updates on each click, and on each InventoryClickEvent, without any issues

quaint basin
#

Forget what I said about being uglier, I got confused with something else

tender shard
#

I really wouldn't worry about the overhead of chaning the lore, it's imho really neglible

#

or however that word is spelt

#

the only things that fuck up a modern MC server are

  1. synchronous chunk loading, and
  2. entity ticking
quaint basin
#

I don't know which approach donutsmp uses, but it seems to be something like the one you suggested; if it is the one you suggested then your approach is uglier than mine

#

On DonutsMP, if you move one item to another, you can see the lore of the item's value being reset. On my server, with my approach, this doesn't happen

tender shard
#

i don't know anything about donutsmp, nor have I ever heard about it, so I cannot say anything about that

quaint basin
#

Actually, DonutsMP also uses packets, because when I enter the item, it doesn't have the lore. So I don't know what they do

tender shard
#

You are cloning the cursorItem in your code as well

#

your code will perform worse than if you'd simply directly modify the item

quaint basin
tender shard
tender shard
quaint basin
tender shard
#

I am not sure, and tbh I wouldn't care - benchmark it

quaint basin
tender shard
#

I can show you spark reports of a 1.21.11 server with 150 players online and you'll see that changing / checking itemmeta will not even appear there unless you scroll down very, very, very far

quaint basin
tender shard
quaint basin
tender shard
#

I wish you good luck, sorry if I sounded rude, that wasn't my intention. I just wanted to tell you about my experiences^^ good luck 🙂

quaint basin
#

I think I've finished my approach too

#

Easier than I thought

tender shard
#

feel free to share

#

how did you do it now?

quaint basin
#

I didn't change much from the previous code; I only made minor adjustments to fix amount errors

#

The logic is to set the item in the new slot with the correct quantity; for example, if I right-click on a slot, the quantity of the item in the clicked slot will increase by one, if I left-click on a slot, the quantity of the item will be max_stack_size, you know, etc

tender shard
#

interesting

#

thanks for the headsup

umbral ridge
#

hey

#

has anyone used jitpack before? build always fails and says "Fatal error compiling: invalid target release: 1.8.0_292 - i'm not using 1.8, I have specified 21 in pom.xml

mortal vortex
#

JitPack will compile projects using OpenJDK Java 8. See the example projects on how to set a different target version in your build file.

#

It was on page 2 bradda, you need to read the documentation before you start something.

#
jdk:
  - openjdk21
umbral ridge
#

i'll try that, I haven't had jitpack file yet

mortal vortex
#

It's okay.
You're learning.
It's apart of the process.
You're valid.

#

Keep going.
Always give it a shot.

umbral ridge
#

no buttons work on their site

#

nvm now it works again

humble tulip
#

Data is stored in a separate table by UUID

echo basalt
#

If you're doing self-updating lore and you control most items in the game just go it client-sided

upper jackal
#

Hello, can someone tell me how I can make gif visible on spigotmc via imgur, because when I upload a gif there is no real bbcode but something with blockqoute and the normal link

chrome beacon
#

Do make sure your gif isn't larger than 4mb

upper jackal
chrome beacon
#

?

#

gif?

quaint basin
#

If you know how to fix this, I would be grateful

echo basalt
#

there are 3 packets you need to intercept for that

#

not just set_cursor_item

quaint basin
#

WINDOW_ITEMS, SET_SLOT and SET_CURSOR_ITEM

echo basalt
#

actually 5 nowadays

quaint basin
#

what packets ?

echo basalt
#

WINDOW_ITEMS
SET_SLOT
SET_PLAYER_INVENTORY
SET_CURSOR_ITEM
Client.CREATIVE_INVENTORY_ACTION

quaint basin
#

i'll try

quaint basin
#

i'll send u a video

echo basalt
umbral ridge
echo basalt
#

would they really have 30 days of uptime

#

would nobody disconnect or restart the server for a month

umbral ridge
#

does player that changed their username while on the server gets kicked? or the other player that joined

chrome beacon
#

I have no idea

umbral ridge
#

see that can happen

chrome beacon
#

Feel free to give it a try

umbral ridge
#

need to handle everything

chrome beacon
#

I mean what are you even doing with names that's so important?

umbral ridge
#

nothing that important, i'm thinking things through

#

what ifs

chrome beacon
#

It if needs to be super accurate use the uuid

thorn isle
#

just don't allow username changes

young knoll
#

That’s up to Mojang though

thorn isle
#

grab the player profile pre-login and switch their name in for the original one based on the uuid

young knoll
#

Kek

chrome beacon
young knoll
#

But why tho

umbral ridge
#

if player changes their username while they're on the server

#

their old username is in effect until they disconnect

thorn isle
#

doesn't matter since the on-server usernames never change

#

when i say original, i mean the first name the player joined the server with

#

i.e. anything past pre-login will always see the same name for a given uuid

young knoll
#

Remove usernames

#

Give every player a name based on when they joined the server

chrome beacon
#

Do a minestom discord and just rename people to uuids

young knoll
#

745th unique player to join? Your name is 745

chrome beacon
#

to ensure unique names uwu

chrome beacon
young knoll
#

Ah yes

#

Please call me db2afc45-6f8f-4a8e-af59-b7509dbcef0a

thorn isle
#

what i did was just have people refer to me by the first 3 letters in the id

echo basalt
#

I refer to my own as b5eb

#

and my alt as b7ab or something

quaint basin
echo basalt
#

don't recall if it's a mirror or not

#

try taking the clone off and seeing if it works

#

if it goes, good for you

#

if not, keep as is

#

I wrote that code like 2 years ago

thorn isle
#

are you sure it still works? they changed the way how the client reports its inventory state to the server recently; it no longer sends the actual itemstacks, but hashed stacks

echo basalt
#

joeshrug client hasn't complained

#

and packetevents probably does something funky to keep it compatible

thorn isle
#

and i think the logic to get a hashed stack from an itemstack is absent from nms since it's needed only on the client

quaint basin
thorn isle
#

packetevents, mm, maybe

echo basalt
#

the server would still have to hash it

thorn isle
#

that sounds reasonable but last i looked around i couldn't find an impl for it

#

maybe my ide search was just being bad

quaint basin
#

or client like minemcraft client

echo basalt
#

yea

quaint basin
#

oh ok

#

have desync bug yea

#

same bug as in my impl

quaint basin
thorn isle
#

is this in creative or survival?

quaint basin
#

creative happens too

#

The cause of the problem is the interception of the set slot packet

thorn isle
#

i think the server might be rejecting your inventory actions because the hashed stack the client sends with it doesn't match

#

it's best to plug a debugger into nms and see where the logic diverges with your stacks vs regular stacks

quaint basin
#

It's in the packet I told you about. If I remove that logic, there will be no more desync

#

But I have absolutely no idea how I can fix this

#

It's not possible to tell the client: "I'm going to send you an item with hash X, but its hash is Y and not X."

#

That's not possible, so I have absolutely no idea how to fix it

thorn isle
#

you need to intercept the packets coming back from the client and un-do your changes to the stack

#

After performing the action, the server compares the results to the slot change information included in the packet, as applied on top of the server's view of the container's state prior to the action. For any slots that do not match, it sends Set Container Slot packets containing the correct results. If State ID does not match the last ID sent by the server, it will instead send a full Set Container Content to resynchronize the client.

#

tl;dr if hashes don't match, the server rejects it and sends an update packet with the container contents instead

#

as for how you're going to get the original itemstack's hash from the mangled hashedslot, uh

#

i guess a hashedslot -> original itemstack map somewhere

quaint basin
thorn isle
#

it's worded poorly

#

it checks both the hash ("server compares the results to the slot change information", "for any slots that don't match")

#

and the state id

#

state id you don't need to worry about

quaint basin
quaint basin
grave plover
#

Is it the correct behavior for no BlockDamageAbortEvent to be called when starting to mine a block and then while holding LMB hovering directly into the air? If I move the cursor directly to another block, it is called, but when I aim at the air while keep holding LMB, no event is fired?

chrome beacon
#

hovering? Like moving your mouse off the block?

grave plover
#

Yes

chrome beacon
#

What version are you on?

grave plover
#

Newest

#

1.21.11 something

chrome beacon
#

😭

#

When someone answers newest or latest it's like a 90% chance that they aren't

onyx fjord
#

Mc versioning is confusing

#

Mojang forgot what major vs minor release means

chrome beacon
#

Which is why they're changing things in the next release

#

Still what's relevant here is the exact version of Spigot

#

not just Minecraft

onyx fjord
#

Hope for Minecraft 2.0.0 is lost

chrome beacon
#

Yeah we jumping straight to Minecraft 26

grave plover
#

Oh I just recognized I used paper… I will ask there, but I doubt it’s a paper specific thing. Just didn’t know if it was expected behavior?

chrome beacon
#

:/

onyx fjord
#

I often find myself "resuming" digging

chrome beacon
#

I know there's been issues with block cancelling digging for years

#

Like over a decade

onyx fjord
#

Didn't see that in old gen

#

(being <1.13)

chrome beacon
grave plover
chrome beacon
#

It's easiest recreated when jumping and breaking a block

#

though I thought this was fixed by now

onyx fjord
#

Wonder what's mojangs stance on that

chrome beacon
#

Probably an issue on the bug tracker somewhere

grave plover
#

Sadge

onyx fjord
#

I wonder if there's a fix needed for client too in this case

quaint basin
chrome beacon
#

2014 nice

grave plover
#

LOL

onyx fjord
grave plover
#

Ok then back to raytracing I guess

quaint basin
onyx fjord
#

Just exempt creative from that

#

Or you'll end up with messed up items

quaint basin
onyx fjord
#

At least that's what I did when doing enchantments once

#

Creative copies the item from what I remember

quaint basin
#

I'm having strange behavior and I don't know if it's due to creative mode

onyx fjord
#

Creative sends back what it sees

#

That's why you end up with duplicated lore if adding lore through packets

quaint basin
onyx fjord
#

Hard to explain

#

Let's say you add a fake lore

quaint basin
#

I noticed that if the client sends any item to the server, that item will become the new item in the corresponding slot in the server-side player's inventory if they are in creative mode

quaint basin
onyx fjord
#

Creative client receives the item

#

And when doing something with it

#

Copies it essentially

chrome beacon
#

^^ creative inventory just copies items

quaint basin
quaint basin
chrome beacon
#

I have no idea what the question is

quaint basin
#

like

#

I don't know another way to say it xd

chrome beacon
#

If you add fake data to an item with packets and a creative players moves that item

#

The fake data will become part of the item

#

The client tells the server what item to set in the slot

quaint basin
#

I'm asking if the server receives a WINDOW_CLICK packet from a player in creative mode, and if that item corresponding to the "clicked" slot will become the new item in the inventory interacted with in the corresponding slot on the server side

#

Clicked in quotes because client can send fake packets

chrome beacon
quaint basin
quaint basin
#

I'm moving my item to a chest (instead of moving it in my own inventory) so that WINDOW_CLICK is called instead of CREATIVE_INVENTORY_ACTION, and the item with the lore that I'm seeing isn't the item that's on the server-side (the server-side item doesn't have the lore)

karmic tide
#

hey könnte mir einer meinen root server machen und meinen gekauften server verbinden
einfach per dm

undone axleBOT
thorn isle
#

how many tokens per second are you getting on it

#

did you vectorize it yet or are you running it with basic scalar arithmetic

#

last i checked a year or so back, i think they kind of botched the vectorization for the KV cache matmuls, but they might've fixed that now

keen olive
#

Hello, is there any reason I'm not able to resolve net.md-5:bungeecord-api:1.21-R0.4-SNAPSHOT using this repository URL https://oss.sonatype.org/content/repositories/snapshots on my gradle project?

keen olive
#

Thanks

robust helm
#

how to support multiple languages in spigot

#

or do i just switch to p*per?

#

tempting indeed

smoky anchor
robust helm
#

i only want to support like 2 languages but separate from the minecraft locale

chrome beacon
#

Send a component not a string

robust helm
#

that works in spigot?

chrome beacon
#

Yeah Spigot has components

thorn isle
#

did spigot have serverside translations

chrome beacon
#

No but you can do those yourself

robust helm
#

you mean the player.spigot().sendMessage method then?

chrome beacon
#

You can just send it as a regular string then 🤷‍♂️

#

Nothing Paper specific is required to send a message

#

Or do you want it to be based on the clients locale but without a resourcepack

robust helm
#

hmmm

#

i really just want to have 2 language-files that have key-message pairs

#

and in paper its simply Component.translatable("key");

robust helm
#

cause i want players to be able to do /language en/de or smth

chrome beacon
#

That's a translatable component

#

You can do that on Spigot as well

#

If you want to do it entierly server side just check getLocale on the player and send the appropriate message

robust helm
#

eeh ig i know nothing

robust helm
#

sorry to bother, ill look it up properly

chrome beacon
#

Load your messages in to a map where the key is language

robust helm
#

any wide-spread libraries for this?

#

or conventions for the language file format

chrome beacon
#

You do not need a library for this

#

And no there aren't really any conventions either it's up to you

hybrid spoke
robust helm
#

who knows what i might want to achieve

#

but thx yall

remote swallow
wet breach
#

i18n

#

you make language files where text is translated. All you need to do is have a method to track the language to use for a player. Easiest method is just let them use a command and you just store it in a DB of some sort.

#

but yeah a convention does exist for translations

torpid blaze
#

Hey, I don't know how this can be and I have never have had this issue before but the PlayerInteractEvent is not triggering all the time for non OP players. it depens on which block you right click. left click works all the time.
I am in the process of making a minigame with a lobby world, where every thing works as it should and a minigame map, which is a newly gernerated map with some spawn coppied in in the sky. and on this map the non admin player doesn't allways fire a playerinteract event when rightlicking a block. for some reason it is not random but specific blocks and when the players drops on the map, it seems to work for all blocks.
I have already comented out every other event and I have no other playerInteractevents but still doesn't change.

worldly ingot
#

Generally the case is that the client just doesn't send any interaction information because it doesn't need to. For example, right clicking a diamond block with an open hand doesn't do anything at all, so it doesn't feel the need to send an interaction packet

umbral ridge
#

😿

umbral ridge
#

or is it only on entities hm

worldly ingot
#

Entities always

young knoll
#

I mean you definitely get an interact event when you right click a block with an empty hand

#

How exactly that happens idk

#

Maybe choco personally triggers the event for you

worldly ingot
#

🙂

torpid blaze
#

I can't use the oninventoryopen because the enderchest has no handler and therefore I can't get the block right?

#

Or can I get the block the player is looking at?

#

well, it also works when having a compase in hand...

#

well, not even with the open inventory event its working. how does this make any sense

#

the same with normal chests. how can that be?

thorn isle
#

are you using some protection plugin to cancel the interaction

torpid blaze
#

Luckperms is on it

thorn isle
#

get eventdebugger and hook it into the interact event and see if someone is cancelling it before you get it

torpid blaze
#

I now tried without luckperms, still no success. now mine is the only plugin on it

#

I added a log to the start of the event listener, set priority to highest and set ignoreCancelled = false but still nothing. only when clicking on some blocks

#

its Like I can'T do anything really. I can also not place blocks everywhere

#

I am dumb I guess

#

could it be that the default spawnprotection is limiting something

young knoll
#

Yes

#

Spawn protection is rude

torpid blaze
#

I copied a devserver from another minigame and thought I removed it already

#

wow nice

#

sure why it still worked in the lobby

#

looks good. till thanks for you help!

topaz mauve
#

why when i use emojis to style the desc of my plugin but when i hit preview it vanish the emojis?

weak wasp
topaz mauve
#

okey, ty

half gust
#

Does anyone know how to make it a command that makes it so the player is in spectator and moving towards a location for a moment

(basically what I am trying to do is the player teleports to a planet, and it shows an animation of them going closer to a model of the planet)

eternal oxide
#

Mount the player on a Display Entity and translate the entity for movement

umbral ridge
thorn isle
#

I'm not sure if teleport interpolation works with mounted entities

young knoll
#

You can’t even teleport mounted entities with the api

#

Perhaps an invisible armor stand with gravity disabled and setting its velocity would be better

thorn isle
#

That's the standard old way of doing it

#

If teleport interpolation worked, it'd be better though

#

So it might be worth a shot

lilac dagger
#

can you guys download sources and documentation for spigot api?

#

for some reason i cannot

#

i fixed it, it was because buildtools generated the spigot api before and it wasn't downloading from the repo

#

i had to delete spigot api folder from the m2 folder

lilac dagger
#

damn

#

choco is fast

#

or was it a bot who removed the link

stable elbow
fathom fable
#

ok

dry forum
#

is it possible to make a 1st join system per world without storing the worlds the player has been in before in a file/database?

pseudo hazel
#

probably if you save it in the player or world data

#

it has to be saved somewhere

spiral magnet
#

I am trying to prevent crop items from dropping when water flows over them, I want them to just break without the drops. I can't seem to make it happen from inside the BlockFromToEvent. Is there a different event I should be looking at?

#

please ping me if anyone has any answers

young knoll
#

ItemSpawnEvent would work

#

@spiral magnet

shadow pumice
#

Hey! how can i check how demanding my plugin is on server resources? i'm using spark but the health report didnt even mention my plugin

pliant topaz
#

Can you send the spark report?

mortal hare
#

my hot take: single threaded async io is better over multithreading one. with single threaded approach you have the least latency and predictable performance without mutexes and locks and debugging mess. Sure it would use more ram than multithreaded processes since every concurrent part is now a process, but you can horizontally scale them easily and efficiently utilize core usage by pinning the processes to the specific CPU logical cores

mortal hare
#

unless your task is specific one which requires high computation power and not blocking, like video processing, encoding theres zero reason to use multithreading

digital veldt
#

how can i make a limbo with AUTHme so when you join the server you are in the middle of nowhere

mortal vortex
#

Ideally, you would want the players to be in survival, to prevent them from seeing other players (spectators can see each other) you would need to put them in invisible rather, but then since they are in survival they will be in freefall, so cancel PlayerMoveEvent.

#

Maintain a set of players

Set<UUID> limboPlayers = new HashSet<>();
/// ... you'll be updating it in the other event

@EventHandler
public void onMove(PlayerMoveEvent e) {
    if (limboPlayers.contains(e.getPlayer().getUniqueId())) {
        if (e.getFrom().getX() != e.getTo().getX() ||
            e.getFrom().getY() != e.getTo().getY() ||
            e.getFrom().getZ() != e.getTo().getZ()) {
            e.setCancelled(true);
        }
    }
}
#

Hope this helps @digital veldt.

thorn isle
#

the "throw infinite threads at it" kind definitely suffers in throughput and latency both

#

proper threading won't necessarily increase latency measurably

#

but yes, single-threaded code is much simpler to write, maintain, and reason about

#

which is why threaded code isn't the default

#

it does come with the drawback that sometimes it can be very difficult to scale it to run on multiple threads without major reinvention of the internals, and sometimes the api as well

slender elbow
#

good thing that this is a solved problem already

mortal vortex
#

Spigot is a solved problem

#

lets all use paper

#

shut this server down boys

lilac dagger
#

spigot isn't a problem(to be solved) tho

onyx fjord
#

use that

onyx fjord
digital veldt
#

bcz i want to make a limbo so that people who login into other people accounts wouldnt be able to press f3 and see the cordinates

mortal vortex
mortal vortex
#

And use WorldCreator

digital veldt
#

okay

mortal vortex
#

Do you use Multiverse or something?

#

If so you can use the multiverse API.

onyx fjord
digital veldt
#

so do i just put it in the plugin config because im a beginer with spigot

#

or plugins

mortal vortex
#

Yeah you would in this case but keep in mind this channel is usually for questions regarding the spigot API – as in, writing your own plugins in Java

shadow pumice
#

I have a question plz, so I'm gonna start working on a plugin, is it better that i make it for 1.21+ with Java SDK 21 or make it support 1.18+ with Java 17?
which would be more practical and sought after today

chrome beacon
#

Go with 1.21+ and Java 21

shadow pumice
chrome beacon
#

yeah

thorn isle
#

almost all servers are on either latest or 1.8

#

with small minorities on 1.13, 1.18, and 1.20

shadow pumice
#

ah ok ty
last question, for version 26.1 (ik its still in snapshot) will my plugin work on it? or do i have to recode it?

chrome beacon
#

Depends on what you do

#

but if you just use the API it should work

shy tinsel
#

Yo guys i am looking for a minecraft server dev. We are trying to grow our server and I am looking for a second dev. Dm me or add me if you would like to apply for this position. Or just join the discord server in my bio, make a ticket there and apply. See you on the server.

undone axleBOT
vagrant stratus
#

?paste

undone axleBOT
vagrant stratus
#

rip md's paste url

#

Yo does anyone happen to know if Spigot has built-in methods for literally any of these?
https://pastes.dev/rtsyGYKlMb

I 10000% half-assed the original implementation, and I'm working on other stuff so i don't want to sift through all of the docs just to double check lmao

vagrant stratus
#

RIP

#

I know paper's got API for at least one of them, but fuck that KEKW

mortal vortex
#
  1. No respawn
  2. I think Spigot has a setSpectatorTarget() which can be adjacent to your sendCameraPacket() however I believe that depends on gamemode being spectator.
  3. sendClientboundAnimatePacket() partially exists but only as swingMainHand() and swingOffHand(), any other arbitrary animations aren't accessible I believe.
vagrant stratus
#

broadcastEntityEvent -> EntityEffect

I think that's more or less the same. I'll have to double check how I'm actually handling that lol

#

As previously stated, I 1000% half-assed this KEKW

mortal vortex
#

?

vagrant stratus
#

Ahhh

#

How the fuck did i miss that originally

mortal vortex
#

No clue.

vagrant stratus
#

Actually. I might know KEKW

#

Also, the CraftBukkit & NMS implementations are different code wise.
Functionally the same mayhaps

vagrant stratus
#

Also yea, setSpectatorTarget requires the player to be spectator

vagrant stratus
#

Guess if I really wanted to, i could dig through the client code & see how the client implements those two effects and just make a utilty method but that's ehhhhh

mortal vortex
#

talking to urself rn gng

rotund ravine
buoyant viper
#

?jd-s

undone axleBOT
vagrant stratus
#

Oh yea, forgot Player#spigot exists cause it just outright sucks lmfaoo

subtle oriole
#

how to override other tabs? Currently the TAB plugin override my tab for my plugin

#

how to fix this?

#

is there any post on spigot I didn't find

chrome beacon
#

Just don't

#

Let the users disable the TAB plugins tab should they not want it

subtle oriole
chrome beacon
#

so? That does not change what I said

#

This is exactly how we end up with mixin hell in modding. People just trying to overwrite eachother with increasing priority

subtle oriole
# chrome beacon so? That does not change what I said

as a premium plugin you don't want to relay on the one who bought the plugin, not everyone have that experience to get where the issue coming from. That's why I want my plugin to override every other tab plugin

chrome beacon
#

Yeah now have fun when other plugins tries to do the same

#

TAB is also a premium plugin and they also want it to just work

#

Now you both will want to overwrite eachother

mortal vortex
#

Very true.

chrome beacon
#

and boom infinite priority loop

mortal vortex
#

Or use TAB’s API and kindly ask tab to fuck off during times you don’t want it in use.

chrome beacon
#

If you absolutely must have that, hook their API and tell it to backoff ^^

subtle oriole
#

So that's why I wanted my tab to have priority.. it only runs in running state matches not in lobbies

chrome beacon
#

What you want to do can be very intrusive and is a bad idea for a public plugin

#

If you implement your own lobby tab and ingame tab users won't need a different plugin for that part

#

Solving the issue in the cleanest way

subtle oriole
#

They have option to turn the tab off.. I'm just trying to avoid people with no knowledge that may have such a small issue and keep asking on Discord

subtle oriole
pseudo hazel
#

for minigames your 2 most common options should just be 1. they dont use a tab plugin on the minigame server so yours is used by default. or 2. They have a tab plugin and it just overrides yours

#

a magical third option where even though they have a tab plugin and you try to overwrite it anyways is just gonna be even more confusing

subtle oriole
#

Well I kinda changed my mind

I'll use TAB api instead and show in the config how they might turn off other tab plugins for this case

ivory sleet
#

yea integration is a very nice and usually wanted solution

#

def go with that

still pollen
#

How u guys learn java?

chrome beacon
#

Practice and reading existing project code

still pollen
#

hmm

ivory sleet
still pollen
wet breach
subtle oriole
#

it helps a lot

ivory sleet
#

yea, i think courses are great to walk you through the theory, but then its important to apply what you learn as well, more so reading others code as olivo said gives you perspective on how a concept can be used in a way that you may not have thought of

lilac dagger
#

what olivo said

#

practice writing, look into big projects

#

learn how they do things

#

compare between projects

#

see what you like more

#

and of course employ creativity too 😄

vagrant stratus
lilac dagger
#

modifying open source projects is also good

vagrant stratus
#

also true

mortal hare
#

basically a person constantly mocked me for using skript for building my server

#

i still thank that guy till this day since im graduating bachelor's degree of software engineering this year basically because of him lol

lilac dagger
#

they now know kotlin

#

😅

mortal hare
#

butterfly effect

thorn isle
#

now i will bully him for using kotlin

#

but yes, this is why i've always had such a strong distaste for skript

#

it's a crutch and a noob trap that countless would-be-programmers have got stuck in because they have "programming at home"

#

on one hand it's an okay entry gateway, but at the same time it's also powerful enough and with a learning curve steep and far enough for you to figure you won't bother learning anything else now that you've learned it

lilac dagger
#

Skript is good for a week or so

#

Then you can just hop to another language just fine

#

Even going straight into a programming language is cool

chrome beacon
#

I remember making a factions plugin in Skript

lilac dagger
#

Good job

#

But with your skill you could've done it in java as well 😄

chrome beacon
#

That was before I learned Java 💀

#

or any programming language really

ivory sleet
#

I heard Skript worked well with coding related llms cuz they dont need to pay as much attention to the syntax and designing infrastructure assuming if you were to use a real lang etc

still pollen
#

Watching plugins source codes and editing is good for learn?

lilac dagger
#

Yes

#

But also do make your own stuff as well

#

So you understand how to solve problems that come with developing your own stuff

still pollen
#

Ok2

lilac dagger
#

But yeah understanding someone's code is good and comparing between people is also good

#

You get to be a judge of code so you can write better code for yourself

still pollen
#

But how to understand the code as newbie? 😅

lilac dagger
#

Start with small projects

#

Build a hub plugin

#

Or something

ivory sleet
# shadow night so, less tokens basically

i mean yea, but there are a lot of ways to deal w grotesque token consumption already, more the fact that there's no question about design to begin with if you write skript (not saying there is no depth of design in skript, just probably very shallow unless they've recently added new shit to the language)

still pollen
ivory sleet
chrome beacon
#

Skript can honestly just be harder than doing it properly in Java

#

Having to find a bunch of addons that do what you want

#

and their magic words without any syntax help

ivory sleet
chrome beacon
#

yeah

ivory sleet
#

fair enough

shadow night
chrome beacon
#

yeah data pack creators do some crazy stuff

mortal hare
#

of skript functions just for this

#

💀

jagged thicket
#

do ppl use skript outside of mc

slender elbow
#

Skript is a scripting plugin for the Bukkit platform.

#

i doubt it

worldly ingot
#

I MEANNNN

#

It's made by the same author of Skript lol

#

But yeah outside of Minecraft (and Hytale), Skript isn't used anywhere. It's not its own programming language and a lot of its syntax is very much geared towards the Minecraft ecosystem

vagrant stratus
#

Actual programming language when

lilac dagger
#

Should i get on the bandwagon and move all my minigames to hytale? 😄

vagrant stratus
#

Only if you buy it for everyone KEKW

lilac dagger
#

The top mods do have a lot of downloads tho

#

Tho this doesn't corelate to actual owners of the game

#

Maybe it's just people checking the code

vagrant stratus
#

Probably

lilac dagger
#

I like to use this approach myself

echo basalt
#

bleh no

#

There are diff ways of doing it

lilac dagger
#

It's much easier to work with

vagrant stratus
echo basalt
#

I kinda made a custom data component system

vagrant stratus
lilac dagger
#

This is set to

echo basalt
#

yeah no

#

For just using items like wands or whatever I have an "item use action" component

#

that just runs a list of functions that are named and registered

#

Something like

#
public interface ItemUseAction {
  void handle(ItemUseContext context);
}
vagrant stratus
echo basalt
#
public class ItemUseContext {

  private final Player player;
  private final ItemStack item;
  private final ItemUseType type;

  private boolean cancelEvent;
  private boolean consumeItem;

  ...
}
vagrant stratus
#

Although I guess that fits this situation too 🤔

echo basalt
#

and then whatever

#

if you want to make an item that opens a menu when clicking just make an action called like "open-embedded-contents" or something, link it to the item