#help-development
1 messages · Page 1329 of 1
and when my great-great-great grandchildren do get value types, the type system will be lacklustre and half baked just like generics
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
We even almost got string templates D:
"oops it was bad nevermind let's try again in 10 more years"
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
✨
wait did that not make it in in the end
I seem to remember being disgusted by the proposed syntax
ooo python recently got template strings. Looks so cool
all the other languages get the cool things
but java backcompat is one helluva requirement I bet
even JS has template strings lol
meanwhile all java gets is "removed even more things from unsafe, vol 24"
yeah it's the fist and only preview that got removed
RIP
enjoy your 5x slower varhandles plebeians
ye preview iterations take forever sadly
not sure why they are obsessed with removing stuff from unsafe lol
in fact, it would be nice if they would replace the stuff first before removing >>
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
most of unsafe uses natives directly
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
not sure if embedded java allows such things
for example a final mean final JEP is contradictory if unsafe would still exist, tho iirc the current jep was just a preparation
flexible method bodies in shambles
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
makes sense, especially when you consider that embedded java doesn't have everything from normal java to begin with
hm? flexible method bodies?
I only know of the flexible constructor bodies
i think that was the one where you could define a method by replacing its body with a lambda or a method reference
think they meant that olivo
I had to deal with native library extensions in a react native project for android once. that was a pretty unique fresh hell
it was concise method bodies the one I was thinking about, just mixed them up in my memory
I thought it made preview, but it doesn't seem like it ever did. Just a lot of fuss on reddit
what i really do want is the record with'ers
such a simple feature and yet it's taking forever
the syntax for that one was rough tho
getting the structured concurrency api would be nice also
eh i think the syntax was okay-ish
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
there were some pinning issues w it early on, but yea its nice
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
i will be happy with them once they fix the synchronized mounting issue
wasnt that also just preview?
which is in i think 25
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
yeah but it is most likely going to stay
it isn't a crazy feature to have, no syntax changes either
C# is java without someone ever saying no to any feature
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)
oh yes, sealed interfaces are quite nice
records are going to be annoying in the future, they kinda rushed that one
especially in conjunction with the new switch; it's basically enums but not cancer
just waiting for value classes to be able to have my Result type
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
true, but they have some other issues with fully reified generics, no type erasure, javas type erasure is beneficial for other langs on the jvm
iirc C# suffers from function coloring w its async await and but ig structs w stack allocation and null safety is nice enough to make C# arguably superior
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
I wish it was that simple, it just ends up with a lot of young gen churn last time I tried it
LINQ alone made me stay with C# for ages
its pretty nice
and it's kind of something you need to verify with a benchmark and then analyze the c1/c2 produced by the jit afterward
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
I do find LINQ kinda mid, its kinda just like a lot of function calls but u omit the parenthesis
syntax sugar ig
it's builders/method chaining for people who spend 80% of their time working with databases
I do think it is nice you can make whatever objects compatible with it and (ab)use of the syntax in very colorful ways
I guess it's less the SQL-style writing of LINQ than the .Select() / .Where() style that I like
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
yea
it does feel more or less made for that
im not sure, but maybe they left that untouched to be tweaked through jvm flags for the consumer's needs? just a thought
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
I mean, not like shilling for Oracle is any better lol
there isn't and probably will never be, Java prefers to expose these as API rather than adding syntax for it
the best we can do as the consumer is increase the max inlining instruction size, but that has diminishing returns and produces its own issues
yeah understandable honestly
what i would like to see is some kind of escape analysis metadata added by the compiler to better inform the jit at runtime
i found the python async await approach one of the more interesting approaches
eh u got Future instead, but like the entire interrupted concept of java would complicate a simple await keyword
so you didn't need the entire call stack across the entire lifecycle of the object to be inlined to scalarize it
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
that sounds very fun and simple to learn
ah fair enough
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
reminds me a bit of asking chatgpt for a scala sample project using an AWS API and it had to include this glue between the scala async APIs and the java ones >__>
and those call stacks are just like 20 instructions too large to fit into the default inlining size
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
thats true
"one more factory layer would fix me"
lol
alright i need to go to bed but thanks for both the help and the chats
cheers!

this one? -XX:FreqInlineSize=
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
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
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
fair, I was curious about if this could impact much aside from already tweaking gzgc (I did it heuristically last time)
well yeah, generational gc's are made to churn
it still pisses me off, but there are more worthwhile places of optimization
Like removing herobrine!
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
Are you running BuildTools via the GUI?
Yep
Could you give the cli a try
look like it's starting, for now ^^'
Well got my 1.21.11 build so I think it worked ? ty
not sure why that seems to break when people run the GUI
mine works as expected
any way to choose build version ?
from cli I mean
got jre for sure but dont think so about anything else
403
make sure you download jdk to run buildtools
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
I do wonder if ur doing anything diff / using diff headers in the gui @chrome beacon
--rev <version>
yeah that's the only reason I can think of as well
but I haven't checked how that part works 🤷♂️
One message removed from a suspended account.
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
hmm true
Anyone know what this is about and why it stays ontop of my screen and cant be minimizzed
idk
Thanks buby, I forgot the part where I directly pinged you and asked for help
silly me
stop asking me idk
daft cunt'
by the looks of it, it just allows jetbrains IDEs to interact with kernel level events
Critical update you should critically download it
ZAYUMM
Or critical things will happen to your operating system
Don't want it operatingn't do you
must update it immediately
we do a little trolling everywhere
do u have like Rider or CLion installed
i think either of those IDEs install it
Nope never.
yeah ur ratted then idk
OHH YEAH
Is there an easy way to get a github action to build my plugin with remapped mojang jars?
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.
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
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
If you're willing to spend some money this would be a relatively easy plugin to hire someone to make
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
What happened to your pfp
i kinda just cleared everything, kinda boycotting discord ig u could say, unsubbed nitro also :>
u inspired me slightly olivo
👀
naaa thats crazy
💀
ur gonna regret this when post nut clarity kicks in
after 2 weeks you lose your nitro streak badge
maybe yea
Even if you resubscribe your Ruby badge is gonna go bronze again brochacho
well be that as it may, im not too fuzzed about it anymore as i dont spend so much time on discord these days
is it because of the age verification whatever thing
Do you believe in recycling? and if so would you recycle your helper role onto me?
is it even live yet? i haven't even noticed anything so far
tbh partly, but ive been considering this for a while
yeah he wont be able to communicate with neon anymore so he's ditching the platform
😭 what
at least your avatar is still orange
well that isnt for me to decide, i think spigot is one of few places i still visit ^^
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
lmao
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
Yeah they’re apparently going to monitor your usage and ask you to reverify if they think you’re a kid
fuck thats cringe
bruh i dont even say this shit anymore and im apparently a teen
oh it could be Australia's Teen Laws
bet you it doesn't determine anyone as an adult XD
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)
Tuff
Are you using the GUI?
run it from the CLI, it might be a bit better.
WELCOME
THANK YOU
should be fixed
Hmm I’m really just asking for a friend but he has no idea of anything and sucks at asking questions 😭 😭
He wants it like that so when people chat or look at the tab playerlist then everyone is able to see the number
Yeahh it seems quite simple
is it ok to block AsyncPlayerChatEvent with db calls?
eg.: join() from CompletableFuture
Preferably not
as it can sometimes be fired sync
if a plugin forces a player to send a message for example
if the async is because of the netty threads you can easily thread starve the thread pool
I just started developping java can someone help please
?learnjava
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! 🎉
I need human help and not some robot lessons
Help with what exactly then?
I just started i wanna be dev for smp
?ask
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!
Can’t be an astrophysicist without learning basic math
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
Got it
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
UUID , Name, LastLogin table
UUID as primary
why would I need LastLogin?
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
Oh also. I have though about that and if you change your name while being online?
There’s 2 name entries with my name
alright
It won’t apply till the player leaves the server
So you use the more up to date one
Alternatively have a second table with Name as primary but make it case insensitive
but for my table, uuid is UNIQUE and cant have 2 entries
And I believe that’ll allow for faster queries too since primaries keys are hashed or something
i guess it should just override on quit event and check on join event
There are also accounts with duplicate names :p
I'm talking about premium only
Yeah
Yeah
really? how does that happen? :D
With this scenario 2 players can have the same name in the db
But different uuid
not just that
where do i put this logic? in a separate plugin? lol
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
Whenever you’re looking up UUID from name in the db, you can get by name order by last login and limit to 1
yea
OR have a name uuid table that you can just lookup for names
yea i was thinking of that
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
It looks like Mojang has taken care of the accounts with the same name
so that's not an issue anymore :p
Um
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
Did you just GPT that
Yeah please don't do that
it helps a lot tho
If someone wanted an AI reponse they could ask an AI themselves
Mhm
So now you're just bothering people with an unwanted answer
No
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
VARCHAR for UUID 😭
fair enough
Plus it’ll just take up a tiny bit more space in the grand scheme of things and be minimally slower
don't make name unique
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
https://gist.github.com/w-lacki/51d396246c791ba24da11f6685686d05 I'm having a problem with this code. I'm replicating the item worth from donutsmp, and if I give the item with /give and then open the inventory and change the item's slot, the item loses its lore. How can I fix this?
What are you doing with packets and why
I need to change the lore of all items with a value https://imgur.com/a/dxs7VlI
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
Wouldn’t it be better to intercept the existing outgoing packets and add the lore
Yeah, he's looking for persistent lores which means actually using the item stack api
what packet?
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
Because the value of the item in the lore can change at any time, the item's value is associated with the plugin's cache and not the item itself
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
Hmm, can't you just update player inventories on join and every hour?
I think it’s set window item or something
I already intercepted this packet: https://imgur.com/a/IV1HSwj
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
thats why I'm doing this https://pastes.dev/c8uYJmHU5w
I think there’s also set window contents or something
just have WINDOW_ITEMS
the rest is like WINDOW_OPEN, CLICK_WINDOW etc
is that ProtocolLib?
Yeah
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
yeah this is an L for not using PacketEvents.
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
packetevents
LOOOOL
bro wtf
You guys criticize protocollib and recommend packetevents, but you can't even look at code using packetevents, lol
:p Looks like I was wrong. I saw Wrapped packets and thought PacketWrapper for a bit
Isnt PacketWrapper abandoned since years?
I read ur name as ligma the first time around
ye but some people still use 1.8 for some reason 
Yikes
I always use NBTComponents or however they're called to identify custom lore lines
I'm on 1.21
example:
Do you modify server-side?
sure
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)
}
And you call this method when?
then one can identify their own lore simply using "line instanceof StorageNBTComponent && line.tag().equals(whatever)"
whenever I want to update the lore
I need to update every time a player collects an item, etc., meaning I would have to call this every tick, which is a considerable overload
I don't think so, entity ticking is much much heavier and that also happens on every tick
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
if you're worried about the overhead of cloning itemmeta everytime, there's paper's DataComponent API - but obviously that only works on paper
I agree, but even so, my plugin will be one of those that will show higher tick consumption in Spark if i do this way
even so
I think I'll keep with my packet-level work. I think it's more efficient
I wouldnt be so sure, it still means you have to intercept literally EVERY single sent packet
I only need to intercept 2 packets and send one packet in the InventoryClickEvent under certain circumstances
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
You're saying that the packet on player click I'm sending is also being intercepted? Yeah, that's the only problem, but I think it's still more efficient
you do you, I wouldn't mess with packets unless it's absolutely neccessary
hello frostalf
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.
wdym
have you never seen a packet exception?
because people will see ur plugin name in the exception and u'll get contacted when u didnt do shit
It's not just that; I don't think it's good design practice
its like that time i may or may not have been affiliated with turkish arms dealers, and i got the blame for it
and what exactly are you basing this off of?
oh lol
voices in my head
i got them too bro dw
fair enough I suppose lol
xd
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
https://imgur.com/a/NLBnsa1 another reason is I've already created this wonderful code and I don't want to delete it
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.
don't have to delete it, I have code libraries where I keep code
netbeans and intelliJ allow having a code library 🙂
I usually do not agree with frostalf, but this time I do
lol
send me
Okay, I'm going to finish this, and if I find anything too complicated, I'll just go the traditional way
what are you trying to do btw? Aren't there regular events you could use instead?
I need to synchronize the client's inventory with the server
what about Player#updateInventory() ?
It doesn't work because it will update the client's inventory with the items with the real lore, and my lore with the item value is fictitious
ah ok yeah
I think you're going down a rabbit hole
updating the lore of an item is really not very expensive
It's more expensive and uglier because it takes longer to update
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
Forget what I said about being uglier, I got confused with something else
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
- synchronous chunk loading, and
- entity ticking
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
i don't know anything about donutsmp, nor have I ever heard about it, so I cannot say anything about that
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
You are cloning the cursorItem in your code as well
your code will perform worse than if you'd simply directly modify the item
Yes, but the frequency is much lower than iterating through 36 items for each online player every tick
You don't have to, you could simply only check the relevant item in the InventoryClickEvent
The overhead of cloning is probably less than adding lore to the item
I am not sure, and tbh I wouldn't care - benchmark it
Almost certainly yes; cloning is just creating objects; while setting an item's lore isn't copying, it involves synchronization with other things
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
Maybe because you have other, worse things. I don't know. But anyway, I'll finish this solution to see if it gets too complicated
although we'd have to do that tomorrow because it's 2:39am in germany right now and we don't have that many players at night lol
alrighty
No need, thanks for the help ❤️
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 🙂
You didn't sound rude, quite the opposite xd
I think I've finished my approach too
Easier than I thought
https://pastes.dev/rtVPdNAFt2 basically this
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
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
What's in your jitpack.yml file?
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
i'll try that, I haven't had jitpack file yet
It's okay.
You're learning.
It's apart of the process.
You're valid.
Keep going.
Always give it a shot.
huh, now jitpack is down? can't log in with github anymore on jitpack, i cleared the browsers cache and doesnt work XD
no buttons work on their site
nvm now it works again
It won’t. The idea of this is to just have the most recent player name tha joined the server associated with the right UUID
Data is stored in a separate table by UUID
Sounds like a bad approach
If you're doing self-updating lore and you control most items in the game just go it client-sided
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
Do make sure your gif isn't larger than 4mb
oh okay, thanks, and in what format on spigotmc?
I tried
.
If you know how to fix this, I would be grateful
and i did
WINDOW_ITEMS, SET_SLOT and SET_CURSOR_ITEM
actually 5 nowadays
what packets ?
WINDOW_ITEMS
SET_SLOT
SET_PLAYER_INVENTORY
SET_CURSOR_ITEM
Client.CREATIVE_INVENTORY_ACTION
i'll try
Desyncs still occur
i'll send u a video
what if someone changes their username while they're on the server, and another person tries to join with their previous username (which is still in effect until the other player disconnects)?
would they really have 30 days of uptime
would nobody disconnect or restart the server for a month
does player that changed their username while on the server gets kicked? or the other player that joined
I have no idea
see that can happen
Feel free to give it a try
need to handle everything
I mean what are you even doing with names that's so important?
It if needs to be super accurate use the uuid
just don't allow username changes
That’s up to Mojang though
grab the player profile pre-login and switch their name in for the original one based on the uuid
Kek
Just ban everyone who changes their name 🧠
that's what i do but
But why tho
if player changes their username while they're on the server
their old username is in effect until they disconnect
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
Do a minestom discord and just rename people to uuids
745th unique player to join? Your name is 745
to ensure unique names 
(people did this as a joke)
what i did was just have people refer to me by the first 3 letters in the id
i'm trying to implement this. But I think i see smth strange, is cloning necessary here? Doesn't SpigotReflectionUtils clone the bukkit itemstack? https://imgur.com/a/2YGUsRB
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
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
client hasn't complained
and packetevents probably does something funky to keep it compatible
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
In my mind, if I convert an itemstack from packetevents to Bukkit or vice versa, I absolutely have to create a "clone" bc need create a need bukkit itemstack instance
packetevents, mm, maybe
the server would still have to hash it
that sounds reasonable but last i looked around i couldn't find an impl for it
maybe my ide search was just being bad
wdym client? your customer?
or client like minemcraft client
yea
You were right. Do you have any idea how to solve this?
is this in creative or survival?
survival
creative happens too
The cause of the problem is the interception of the set slot packet
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
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
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
Does the state ID have anything to do with the hash?
https://imgur.com/a/6BRUWAQ Perhaps remove the item's lore when the client sends the click packet
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
https://pastes.dev/YvGOwEpQxl I click only once, and the window click is triggered 3 times
This code solved the problem. I was using writeItemStackModern instead of setCarriedHashedStack
https://imgur.com/a/MsmKe5z Now I just need to do the verification not by name. How can I do that?
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?
hovering? Like moving your mouse off the block?
Yes
What version are you on?
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
Hope for Minecraft 2.0.0 is lost
Yeah we jumping straight to Minecraft 26
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?
:/
Didn't Minecraft change this behavior a while back?
I often find myself "resuming" digging
I know there's been issues with block cancelling digging for years
Like over a decade
It's around all the way back in 1.6 (iirc)
I have no clue, I just wanted to implement custom block damaging and don’t want to add unnecessary raycasting
It's easiest recreated when jumping and breaking a block
though I thought this was fixed by now
True
Wonder what's mojangs stance on that
Probably an issue on the bug tracker somewhere
Sadge
I wonder if there's a fix needed for client too in this case
https://pastes.dev/HKFPsWSiJp If the user is in creative mode, will the item on the server side be the same as the 'original'?
2014 nice
LOL
Are you doing packet item stack work
Ok then back to raytracing I guess
yes
But I'm asking if this is the behavior with creative
At least that's what I did when doing enchantments once
Creative copies the item from what I remember
I'm having strange behavior and I don't know if it's due to creative mode
Creative sends back what it sees
That's why you end up with duplicated lore if adding lore through packets
wdym
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
hm
Creative client receives the item
And when doing something with it
Copies it essentially
^^ creative inventory just copies items
That's what I said here - but that's not the question
My question is about the behavior of WINDOWS ITEMS when the player is in creative mode, not CREATIVE_INVENTORY_ACTION itself
I have no idea what the question is
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
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
so does this answer your question
I don't know if the window click is called in this case xd
This is not happening
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)
hey könnte mir einer meinen root server machen und meinen gekauften server verbinden
einfach per dm
english please
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
how many tokens per second are you getting on it
did you vectorize it yet or are you running it with basic scalar arithmetic
if you haven't yet and are looking to, this is a good reference https://github.com/mukel/llama3.java
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
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?
It's on maven central
Thanks
how to support multiple languages in spigot
or do i just switch to p*per?
tempting indeed
support where exactly
text in game ? create RP and send translation components
or I think you can get the players locale and translate them serverside
yes, in-game.
so if i dont want to use a RP i should do like player.sendMessage(MessageUtils.resolve(player, "command.no-permission")) ?
i only want to support like 2 languages but separate from the minecraft locale
Send a component not a string
that works in spigot?
Yeah Spigot has components
did spigot have serverside translations
No but you can do those yourself
you mean the player.spigot().sendMessage method then?
Wait so you don't want it to come from the locale?
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
hmmm
i really just want to have 2 language-files that have key-message pairs
and in paper its simply Component.translatable("key");
but in spigot id need to do this as i need to get the language selection of the player
cause i want players to be able to do /language en/de or smth
This relies on a resource pack?
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
Just do this
sorry to bother, ill look it up properly
Load your messages in to a map where the key is language
You do not need a library for this
And no there aren't really any conventions either it's up to you
sounds like you want to achieve i18n https://www.baeldung.com/java-8-localization
you can have server side translations with minimessage/adventure stuff
well there is a convention that exists
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
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.
neat
Player interactions, especially right click interactions, are very, very wonky in general. Sometimes the client sends interactions, sometimes it doesn't, and sometimes it just relies on the hand swing animation.
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
😿
it doesnt send it at all? i though it sends it and triggers interaction event
or is it only on entities hm
Entities always
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
🙂
Do you get one or two?
I already though but the weird thibg is that the most important block I want to check for a click is on an ender chest, which would normally be interact. Furthermore it works fine for op players and in the lobby.
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?
are you using some protection plugin to cancel the interaction
Luckperms is on it
get eventdebugger and hook it into the interact event and see if someone is cancelling it before you get it
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
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!
why when i use emojis to style the desc of my plugin but when i hit preview it vanish the emojis?
Pretty sure emojis only work in the title. I have never seen them in a description before.
okey, ty
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)
Mount the player on a Display Entity and translate the entity for movement

I'm not sure if teleport interpolation works with mounted entities
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
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
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
no bro just test
ok
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?
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
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
Can you send the spark report?
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
unless your task is specific one which requires high computation power and not blocking, like video processing, encoding theres zero reason to use multithreading
how can i make a limbo with AUTHme so when you join the server you are in the middle of nowhere
I would recommend taking a look at AuthMeAsyncPreLoginEvent.
Hook into this, then on Spigot's side, and the moment the player joins but before they authenticate, you teleport them to your limbo location.
As for the limbo world, look at WorldCreator to create a void world at startup.
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.
well there are many kinds of multithreading
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
good thing that this is a solved problem already
spigot isn't a problem(to be solved) tho
authme allows you to set a pre-login spawn location
use that
dont need this, authme alone can prevent movement for unlogged players
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
No idea because I’ve never used that plugin but this is #help-development I gave a general purpose solution, all I saw was the two events so I gave him a lead.
Yeah then use the PreLoginEvent
And use WorldCreator
okay
so do i just put it in the plugin config because im a beginer with spigot
or plugins
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
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
Go with 1.21+ and Java 21
ok ty, and may i ask for the reason? is it that there are fewer servers on versions younger than 1.21?
yeah
almost all servers are on either latest or 1.8
with small minorities on 1.13, 1.18, and 1.20
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?
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.
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
?paste
Looking to paste something? Try a code block or one of the following websites:
- https://pastes.dev/
- https://sourceb.in/
- https://mclo.gs/ (best for server logs)
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
No.
- No respawn
- I think Spigot has a
setSpectatorTarget()which can be adjacent to yoursendCameraPacket()however I believe that depends on gamemode being spectator. sendClientboundAnimatePacket()partially exists but only asswingMainHand()andswingOffHand(), any other arbitrary animations aren't accessible I believe.
dont think so
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
?
Spigot also has that.
declaration: package: org.bukkit, enum: EntityEffect
so idk what you mean
No clue.
Actually. I might know KEKW
Also, the CraftBukkit & NMS implementations are different code wise.
Functionally the same mayhaps
Yea, checked the animate packet one and the only ones I'm handing off to NMS are CRITICAL_EFFECT and MAGICAL_CRITICAL_EFFECT
Also yea, setSpectatorTarget requires the player to be spectator
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
talking to urself rn gng
Fun!
Player.Spigot#respawn()
?jd-s
Oh yea, forgot Player#spigot exists cause it just outright sucks lmfaoo
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
I get it, but my plugin is a minigame plugin and it have a tab that shows the teams and other info.. currently the TAB plugin overrides my plugin's tab
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
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
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
Very true.
and boom infinite priority loop
Or use TAB’s API and kindly ask tab to fuck off during times you don’t want it in use.
If you absolutely must have that, hook their API and tell it to backoff ^^
Yeah but the tab plugin shouldn't override a minigame plugin..
Also I'm trying to not get stuck into problems with every single tab plugin out there just to show the minigame tab over them
So that's why I wanted my tab to have priority.. it only runs in running state matches not in lobbies
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
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
Yeah that's why the tab is only showing up in running games not in lobby.
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
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
How u guys learn java?
Practice and reading existing project code
hmm
are you trying to learn something specific, or just Java in general?
trying to learn minecraft plugin develop
I use my eyes to read
For me the best shot was courses there are one on udemy
it helps a lot
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
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 😄
I used youtube to start & kinda just went from there by looking at projects, googling, decompiling, etc
modifying open source projects is also good
also true
i got bullied into learning it
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
i did bully someone for using skript lol
they now know kotlin
😅
butterfly effect
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
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
I remember making a factions plugin in Skript
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
Watching plugins source codes and editing is good for learn?
Yes
But also do make your own stuff as well
So you understand how to solve problems that come with developing your own stuff
Ok2
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
so, less tokens basically
But how to understand the code as newbie? 😅
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)
Starts from skript lang?
ideally not, i think you might be doing yourself a disservice even though skript might be somewhat easier in the very beginning
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
addons that are natively implemented in Java I assume?
yeah
fair enough
kinda reminds me of how datapackers have to do crazy stuff for basic programming things
yeah data pack creators do some crazy stuff
same i had like 20k lines of .sk files
of skript functions just for this
💀
do ppl use skript outside of mc
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
Actual programming language when
Should i get on the bandwagon and move all my minigames to hytale? 😄
Only if you buy it for everyone KEKW
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
Probably
Any ideas on how this can be improved or cleaned up? I'm sure there's something obvious lol
https://github.com/OpticFusion1/InteractableItems
Allows developers to easily create Interactable Items - OpticFusion1/InteractableItems
It's much easier to work with
I mean, this works but feels messy lmao
I kinda made a custom data component system
Yea, I'll probably just grab one at random and/or merge one or two that better fit my needs
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);
}
I mean, I could rewrite it to use https://www.spigotmc.org/resources/actionlib.117241/ instead but I need something more generic for interactables lol
public class ItemUseContext {
private final Player player;
private final ItemStack item;
private final ItemUseType type;
private boolean cancelEvent;
private boolean consumeItem;
...
}
Although I guess that fits this situation too 🤔