#help-development
1 messages · Page 1179 of 1
sure things the player can see that move more then 20 ticks in a sec will be bugged
yes
but
why did the spigot authors
continue?
wouldnt the server be more efficent
Why would they not?
Sure, if the server could magically handle that
oh yahn
Because CSGO isn't procedurally generated, with multiple chunks being rendered concurrently.
To properly have a higher tick rate you have to modify a lot, path finding is tick based and a lot more
Based on the amount of questions you're asking, I'm assuming you haven't properly read the docs?
In BungeeCord, you use net.md_5.bungee.config.Configuration and net.md_5.bungee.config.ConfigurationProvider instead of Bukkit's FileConfiguration.
chat how do i make sure i can get the player count without it error when trying to get it from turned off servers?
u right
a "turned off server" will have no players
will it show errors tho?
when it tries to get the size of a
turned off spigot server?
I'm guessing you are getting an NPE?
Presumably it just won’t be in getServers()
Yeah, getServers() returns all the connected Servers. It simply won't have an entry if it's offline.
Object apiurl = ConfigurationProvider.getProvider(YamlConfiguration.class).load("config.yml").get("apiurl");
is this how i
get values from the config
and set as variables?
Here I'll dm you what I normally use. Just like the Config Util class I setup.
okay!
Look over it. It'll help
But tbh I haven't used bungeecord in ages. Other than that I can't help much
so i've just started thinking about relational databases lately and im very stuck on the idea of putting business logic on the database, basically creating headless application of your logic on the database with procedures triggers using SQL.
Here's my point on this:
- Sure this could induce vendor-lock in, but knowing that there's plenty of good relational open source database servers, i dont think that's an issue anymore.
- You and your business wouldnt need to reinvent the wheel in the long run, when you want to migrate your app to some kind of other technology like moving from Laravel to Java and backforth, as if you write standard SQL procedures and triggers, you can make cross compatible code between SQL databases. Also SQL code from 20 years ago would work just fine in today's world.
- You eliminate the latency of multiple SQL statements to access the same data for calculations within the client. Its just more performant overall
- Its not as if your project doesnt utilize the database technology anyways, so why not embrace it?
What do you guys think? I personally now then i think about it i adore the idea of creating headless low level version of business logic application in the database and leaving the clients to build the best user experience around it, acting like thin clients around low level database logic.
well unless your computation is very very expensive to compute on the database server i dont see a reason, to not compute it. Its not as if big corporations run all the database operations from one big dedicated server. they use bunch of caching technologies and CDN's to deliver to the clients, thus you can scale the SQL code from cache databases too.
In that case, I think tying business logic with particular protocols which are open to the public use is kinda bad (like HTTP, since it still has to follow MVC approach to handle business logic). Isolating logic as much as you can from external technologies in a way of blackbox design which computes the results you want from a database and then spits back to the technology you want to open to the public, like an API sounds like a good approach.
You are suggesting to turn a sql into a http server?
I'm not really sure what you are suggesting, but graphql is probably what you are looking for
not really. Im proposing an idea to to move as much of business logic from technologies which open your business logic to the public (like http servers)
SQL servers is just one of the solutions for this as most of the applications rely on them anyways and they can be pretty scalable and maintainable to run at least.
using SQL server for your business data logic handling or general purpose language with low level interface to get the computed results from database seems to me the most robust approach for handling maintainability in the long end, since you wouldnt need to touch business logic code if protocol related stuff changes, you would maintain only the glue code between your business logic black box application and the technologies which you are using for UX
another way of thinking is that you should treat your business logic as as a shared object (.so) or dynamic linked library (.dll) file within your project
you use that .dll in the glue code that invoke that particular logic wherever you want (HTTP services, RPC, etc)
we have procedures and triggers, which are basically more than enough for basic business needs
Right but you still need something to allow communication. Its not like you can just connect to the database directly and it start doing things like front end. A sql client could show front end and simultaneously be directly connected ie logged in to the db server.
well yeah, what you referring as a "sql client" i was refering as a glue code in whatever technology you want, it doesnt need to be particularly web based tho
you develop thin clients around headless SQL application
Otherwise your alternative is restful api's
But amazon aws is basically your calling though
What you describe is basically what it tries to do and provide lol
i just dont kind of get it why people use SQL servers only for storage and data integrity, its just wasteful
SQL can do procedural programming in itself
Because at its core that is the purpose of things like mysql
so why bother introducing latency with multiple requests
when you can develop couple triggers and procedures
and store the business logic there
and most importantly you implicitly ensure the data integrity from outside factors too, you wouldnt need to rely on separate application to input the data properly most of the time
Well it depends how well you know what you are working with. Mysql supports unix sockets and literally can handle millions of queries with just a few hundred megs of ram
There is virtually no latency with unix sockets
Hey guys, need a little help here. I'm developing a hunger game minigame plugin and I wanted to glow teammates only, but I encounter a problem where everytime player's metadata got updated (changing running state, sneaking state, etc.) the glow got removed and I found a way to reapply the glow by simply listening to those events, but it doesn't feel smooth at all because of the flickering, what would be the best approach to this to avoid the flickering issue?
packet interception
Here's a very old example of how to do so: https://paste.md-5.net/ruyetifure.cs
Might not work due to async entity getting but whatev
its more of a maintainability part that gets me. SQL syntax has been stable for a while now. You can run 10-15yr old SQL on multiple DB's and get the same result, as long as its standard SQL syntax.
If you have custom sql client which then gets used within multiple technologies that fine, as long as you wouldnt access database externally.
but i just dont get why would you write code in Web based technologies like PHP or JavaScript with bunch of libraries which tend to break quite constantly as web technologies improves at rapid pace. Its not as if your business code should tell what HTTP status code return. Its your custom sql client's responsibility to do that, not your business logic application's.
Thank you. I'm using packetevents, but I kinda get the idea.
Separation of concerns should be applied in such cases. "Glue code" for bridging the gap between HTTP server and your business logic should be developed as separate packages
I feel like the vendor lock-in problem is mostly applicable here. I write my code to support as many database types as possible because realistically some are more fit as a solution than others
Switching from SQL -> Mongo should be as painless as possible
As something like MySQL -> Postgres -> Planetscale would
well in that case, yes, but developing a custom headless client could be still beneficial to isolate most of the logic that's needed for the application to function at bare minimum
SQL is made to operate as a persistent storage server. Making your SQL server do most of your business logic introduces strain in the database that could be shifted to the application. Scaling your application consumes a different ratio of resources than scaling SQL
For example if your operations rely on processing a lot of data you'll probably allocate more compute power to your application and at a large scale you might run your application on purpose-built boxes with that in mind
Where you might, for example. use a small HDD / Flash drive and keep everything in memory
Attempting to scale SQL like that can cause issues as you need more compute but you're building for storage
yes i get that, but some people just straight up tie-in their apps with web technologies instead of totally isolating the code that could just work in "headless" mode in the first place
Microservices
You get to scale the parts of your application that need to be scaled with the hardware they need and the database acts as a database with no vendor lock-in
well yeah, if they don't get vendor locked-in from the application logic part
You can then run them on whatever cloud provider you want
with certain frameworks or libraries
You can easily switch database types as long as your code isn't complete garbage and you get pretty much no latency if you run the database in the same datacenter as the microservice
Private bandwidth is pretty much unlimited and latency is astronomically low
Price is slightly steep but not as steep as serverless and you can turn it up and down based on demand
Idk what bunch of libraries you are referring to for php since there is really only one library for mysql in php which is a native component. For javascript there might be more libraries but this is because javascript was never intended or designed to run backend rather front end so there isnt really a standard for such things.
Hi frostalf
hi frosty imma order lego
While sql may support what you are talking about you are forgetting you need to have something designed for the things you are talking about. mysql for example is something made already and is well known and works quite well for what it was designed to do. To make somethin like what you are talking about you either need to find it or make it and making it might seem easy but maybe not if scaling is a concern or optimizations etc
i think stating sql in this convo is a mistake here since i dont think that's the point here really is. The point is that i wanted to make its seems pretty reasonable in the long end to make your business logic as an application which acts like a blackbox and develop custom clients for it to suffice for different cases you need, if you need to expose it under web technologies, develop a client for HTTP server with custom routes, need RPC, develop a client for it etc
the main point i'm trying to make is that your business logic code part shouldnt depend on the protocols you have no control of
and only the "glue code" part should be maintained
I feel like your business logic should rely on standard protocols, not proprietary ones
And which protocols do you not have control over?
You get the benefit of being able to hire people that don't want to immediately rewrite your entire project
You also don't have control over the database implementation you're using, do you?
I guess what you are asking is why people dont develop custom servers or applications? Answer to that is time and money.
Make sure to optimize for engineering time and money $$
Hiring engineers to maintain your proprietary mess is gonna cost more than to run it the traditional way
Or take a lot more time
lets say i've written my business using HTTP server technologies like PHP, and now business wants to use that logic on some kind of thing which completely doesnt need HTTP protocol, and now that thing needs to depend on http protocol to properly run that business code. Now you need to rewrite your code in something else or make a wrapper around that application which is really a workaround around a problem which wouldnt have existed if you separated your code from the protocol itself
Depends on the protocol. Php is protocol agnostic
That it is, it does not rely on a protocol to operate
well kind of, but its web oriented
you usually run php with Laravel which uses MVC design but fair point
I dont use laravel
If laravel is the limiting factor then it would be that framework at fault not php itself
But i dont use frameworks with php exception being maybe bootstrap as i dont like making auth myself
I have used php for ssh and other protocols. It just depends what it is you want it to do and php can serve content over those protocols as well not just obtain data.
But it also depends on the server you are using to serve php too
But then we get into other things that can sudo replace a web server entirely
Like routers
Routers can do a lot with protocols as long as you program the protocol into the router which is not difficult. I have done it with mc and you can let the router handle what to do with the packets directly
So i have used a router to basically be a bungee without bungee
But you would never know the difference lol
Since php has a cli and is not entirely dependent on a web server you could just remove the web server entirely if it doesnt serve your purpose with whatever you are doing with php
php is just a bad example my bad, it can stand at its own thing, but when you add frameworks to your code and tie in HTTP request controllers, middleware with your serverside business logic, like laravel or with next.js framework, it gets messy. that's what im trying to prove
unless you expose your framework app as a http service in such cases, you cant do much
you just cant run such applications in "headless, standalone mode" thats independent from http
i meant it just a compromise over dev speed
but it backfires in the long end
Ok, well i wont disagree with that last point but most of that stuff is unnecessary and are used because that is what someone with php knowledge only would know how to use and setup. Reason why system admin is a job title and even specific courses in school to learn how to do lol
Reason not everyone goes the router protocol route is because not everyone has control over the firewall and even if you do you need a person who is knowledgeable in networking. So you have other stuff that gets used instead. Mainly because of limitations lol
it might sound like conspiracy but i believe why there's frameworks like these is kind of a planned obsolesence from the companies who use such flashy tech which design the products so that they can milk the money out of the customers for the maintenance of the product
Well it isnt a conspiracy that they want to lock in customers to their tech. However there is another side to it which involves contracts
Most companies cant offer support for stuff that isnt theirs or if they do its limited support
Its not a good business practice to offer guarantees if the guarantee is on something you dont make or have control over the final product of it
So you end up with frameworks that are company specific. But then you also have the free market trying to make it easier on the developer so you end up with more and other frameworks lol
Hey! I'm trying to make an ArmorStand look at player, so I used setRotation but seems that the pitch is ignored, yaw works good. Also I used setHeadPose and that worked perfectly, I don't want to use setHeadPose because I want that the position of the entire ArmorStand to look at the player. I'm using Spigot 1.21. Pitch is really important to me.
i believe using frameworks for business logic is just bad overall, isolating it as much as you can from frameworks and only using frameworks or protocols for glue code should be really ideal. Unless your trying to push product to the consumer fast or the product should be mediocre at best, in the long term you would spend more time maintaining the business logic due to changes in the framework. Isolating it from the UX part could save lots of time updating the app to be deployed properly, due to how much less code would be touched, since only the glue code would only need to be fixed
im repeating myself, but i get your points
imho things like a next.js or laravel might work for short-time, but after a while you get constant need to update your codebase to be compatible with the latest framework versions
it becomes a burden where it shouldnt if you separated the logic from the framework itself and left only the code thats reponsible for bridging the gap between the app and the framework
Is it possible to update an item’s meta (lore & custom data container specifically) without causing the item update animation when a player is holding it?
I've seen it done with NMS
But without NMS, I do not believe it to bbe possible
Is there an api to check if the block can be stripped using axes?
There might be a tag for that
🤔 applying a translation to a text display causes it to just disappear.. hm
What's the translation?
and are you sure you're setting it as a translation and not rotation/scale?
Yes
what version?
23 works fine
if everything's shifted it'd break
Best I can do is use reflection to fetch the display entity data synchronizer and use it to create the value
feels like overkill
does it show up in f3+b?
zero hitbox, pretty sure it doesn't
might be worth spamming more packets
I do send add entity / name packets like every second
i mean it's what I do ```kt
DataTracker.SerializedEntry(
DisplayEntityAccessor.getScale().id,
TrackedDataHandlerRegistry.VECTOR_3F,
Vector3f(0.1f, 0.1f, 0.1f)
),
or, mixins at least
I'd probably try that just to be sure tho
also, why not just use the API for this? hideByDefault or sth
Need these do be per-player
and that's a lot of entities to manage with bukkit
which can cause world leaks if I'm not handling it with care
and lots of setPersistent(false) calls
chunk saving etc
cba
hm, seems like my customer found an error that's completely unrelated
I'll take that ig
Guys, how can I make the player's name to follow the color from the prefix?
I'm using scoreboard team.
ChatColor.getLastColor
altho it doesn't support hex
there's getDisplayName but i couldn't get it working
ohh
you need team.setColor
Like where can I put that? it's separated between prefix, display name, and suffix.
ohhh
Damn that will definitely break something on my plugin because of how I set it up xd.
How does plugin like TAB modify that, the player name can be bold or whatever?
I think this one? https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html#setPlayerListName(java.lang.String)
declaration: package: org.bukkit.entity, interface: Player
i'm not sure if you can have it both bold and colored now
sure, but this won't edit it above the player
This one maybe? https://hub.spigotmc.org/javadocs/spigot/org/bukkit/scoreboard/Team.html#setDisplayName(java.lang.String)
declaration: package: org.bukkit.scoreboard, interface: Team
i'm not entirely sure how tab does it
i think it might be set display name but it didn't work for me int he scoreboard
You're right, setting it with Player#setPlayerListName will not set it on the nametag.
Yeah either packets or nms.
both are nms
the color being reset is only a bukkit thing
i have this code that changes the player name
So the only way to done this is through nms?
is it normal for Player#getCompassTarget to return null during player join?
even tho the method is marked as non null?
You can try to add a delay
i just skip it if it's null right now
the delay is not worth it, causes some other problem
even a tick?
yup
i have a method that does some thing when the party leader joins
it is also an issue that on join i don't have direct access to this method to delay it only
it'll be nice for this to work during join that's all
Just to add an option for you, you can add a TextDisplay as the passenger of a player, and set the Text of the display
pretty much lol
why wrong with this error? Invalid key. Must be [a-z0-9/.-]: snowdrop:location_key-75_64_69_world_snowdrop-block
i not have forbidden chars
_ is not in that list
ah
lol
Your sanitizeKey method looks a little broken
new NamespacedKey(plugin, this.key + "_" + suffix)
And the key is private final NamespacedKey key;
which will include the : character
I think this is the error ?
Also, I see no reason for this keys.computeIfAbsent(sanitizeKey(keySuffix)
Could just use the keySuffix, no need to do regex stuff in this case, which I believe is fairly slow
regex is slow?
I've been taught it is :D
Or at least doing Pattern.compile or whatever
Which I assume the replace method might do, I do not really know
But the point is that you're doing something pointlessly
i see
package name protection simular to namespaceKey protection?
if someone will create forbidden package name for world
can anyone tell me where can i find spigot api docs for 1.18.2? I only find 1.21.3
package index
tysm
so I'm a newbie and learning to develop spigot plugins so by the following code i expected that whenever i right click on poppy flower it will be changed to diamond but unfortunately it doesn't change and even didn't throw any error in console how can i achieve this behavior
public void onInventoryClick(InventoryClickEvent e) {
if (e.getWhoClicked() instanceof Player player) {
var clickedItem = e.getCurrentItem();
if (clickedItem.getType() == Material.POPPY) {
player.sendMessage("You clicked the flower!");
if (e.isRightClick()) {
clickedItem.setType(Material.DIAMOND);
ItemMeta diamondMeta = clickedItem.getItemMeta();
diamondMeta.setDisplayName(ChatColor.AQUA + "DIAMOND");
clickedItem.setItemMeta(diamondMeta);
}
} else if (clickedItem.getType() == Material.BEEF) {
player.sendMessage("You clicked the beef!");
} else {
player.sendMessage("You clicked something else.");
player.sendMessage(clickedItem.getType().toString());
}
}
}```
Non spigot related question.
How would one go on securing the Java application (client side anticheat for a server) so it can't be reverse engineered and bypassed by modifying the source code of the application
I'm looking to create it in Java not C based languages
umm i was watching a youtube video and it just worked for him
set the slot with the modified item stack
creative inventory doesn't send all the necessary packets, so it is unreliable
hmm noted tysm
there's InventoryCreativeEvent or something for creative inventory clicks specifically
yup it worked
I donated 10 dollars how can I change my name
?support I assume?
?name
Maybe when optic or choco is around they can handle that
?changename
Name changes on the forums are granted to those who have donated to the project. Donations are processed manually and generally take up to 24 hours. The donation widget can be found on the home page of SpigotMC at: https://www.spigotmc.org/.
Ah nice
if you're willing to work with the server, I'd do server-side integrity checks as well as code signing
you can't secure java applications
nor can you prevent reverse engineering
otherwise don't you think mojang would have done that with MC by now?
tbf it isn't in mojang's best interest given that they are open about letting people mod the game either way
Ah code signing so anticheat app can't be tempered with. Alright
that isn't how that works
but ultimately, anything a client can get their hands on cannot be fully trusted and will eventually be tampered with
What about using launch4j after creating the Java app?
Rootkit
jar signing just lets an application know that the jar has most likely not been modified and can be trusted
it doesn't prevent modification
there are pretty damn good obfuscators
Yh but experienced hacker could crack it easily. Obfuscsted or not
but ultimately nothing is impenetrable
experienced hackers will always get in your way
it's just an arms race
no matter the obfuscator it will never hide the java bytecode
I believe better protection needs to be done but idk if it's possible with Java
well, you can just ask nicely to not get your stuff hacked
Then do server side ac
Server side ac is horrible bro
depends how you implement it
Maybe it'd be good if it works together with client side
everyone assumes you must run everything in java in the server
you cannot trust anything a client gets their hands on, so the solution is to not let that happen at all
But even polar (best ac on the market) has bypasses
So doesn't every ac
not always, it just depends what kind of server you are trying to put ac on
everyone wants hardcore pvp, which is probably the most difficult to do ac on
however, since I don't care about pvp that much, I set limits lower 😉
I meant more in a general context, whatever your game might consider cheating I'm sure there are ways to hop over the ac
well for some things, but not everything
also, heuristics are your friend in regards to AC
But I suppose even if I create memory integrity check. Some good hacker could bypass it with a custom driver or hardware
especially if pvp is involved
Like arduino
have a large enough data set and its almost impossible to get passed heuristics
what are you making in java that would require memory integrity check?
Clientside anticheats will get bypassed
You can never trust the client
also forcing your users to install some random program to join your server???
but how hard can you make the job of a hacker so he can't bother anymore?
depends how bored they are
Some people find breaking systems like that fun and a challenge
as well as it passes the time
Checking if memory of the application running eg Mc client and client side anticheat wasn't tempered with
In Java it's harder but not impossible
since we are dealing with java I can make it to where it doesn't run such things
Like traditional memory scanning
Wdym?
Bro I'll make it and you try to crack it
anything you make in java can be modified to where it doesn't run
If you crack it props to you
I can read bytecode and do bytecode manipulations
so I guess good luck getting around hiding bytecode and prevent bytecode from being intercepted and changed
also, you don't have control over which JVM gets used either
to include custom ones
Runtime integrity check and code signing helps with that
no it does not
Bro client can do literally anything
you can't do a runtime integrity check if I modified your code to simply never get the opportunity to launch it
I could force which one is required to run the game
not even
Otherwise you can't join the server
I can fake the data 🙂
And I can too
I get it, you don't want to accept that Java simply isn't a language that was never designed to prevent reverse engineering and the sorts
but that is just how it is
I could create ByteCode hash check to see if it's modified and then it doesn't run the program
Then you just remove that check
Anything that runs on my computer is something that I can modify
If it has a check that checks whether something has been modified, I remove the check
there is no check you could put in place that I wouldn't be able to remove before the client runs
or spoof the data sent like frostalf said
In short: you cannot control the client
Bro what if I create a loader and make it so it verifies it externally on my vps for example?
And if there's no connection it doesn't run
yo nerds, quick question. Any idea on if there's a python lib to render a skin?
Need it for something

Doesn't change anything kek
Could just spoof the data
Exactly
Python FastAPI with a collection of Minecraft Skin rendering APIs. - Sindercube/Skindentity
An entire website just to render stuff? Yikes
you were not specific in your request
Wait till the reverse engineering, assembly master comes
It's README's also fucked KEK
Yeah bro go crack vanguard then
Crack what
someone probably already has
Just wanted to say that
Nobody has completely. Unless it's private
Most cracks like that will stay undisclosed, available only to certain groups of people so the developers cannot easily fix it
Publicly no
Ofc
If you post your crack publicly, you are gonna get it patched very quickly
Remember that one plugin we removed the license check for?
Who said that bro? I just said that I want to make it harder to crack
Yeah cus the dev said it's uncrackable kek
anything that runs on my system is under my control fyi. You can't stop me from doing memory dumps, poking at the binary code or using disassemblers to get an idea of some of the things it does etc.
Yup lol
Yeah as frosty said, you cannot make it impossible. You can obfuscate, but it's still super easy
that's the only repo I can go off of anyways it seems @wet breach
I've got a bunch of downloaded skins & was hoping to do a quick python script so I don't have to suffer w/ looking at the downloading forms lol
Eh, it's pointless, just leave it as is
"you cannot control the client"
- me, five minutes ago
Just hire more moderators 🗿
lol
Fair
I wish Java had better protection against ByteCode manipulation tho
I'm not even sure that site handles dealing with the skin texture id KEK
Doesn't need to
wait no, it can. These aren't B64'd though lol
doubt that's possible kek
Java was originally to cater to businesses and schools
hence why it doesn't have said protections because it wasn't needed for that audience
ugghhh gotta re-b64 them when loading ig
fucking hell
Wasn't mars rover made in Java?
and if there were protections, maybe we wouldn't have mc modding rn
yeah maybe not lol
Ah makes sense
I don't think the mars rover needs to be better protected against bytecode manipulation
Actually, I don't think I hate myself that much lol
I think they'd rather need to be able to do that
lol
So it really doesn't prove your point
Wouldn't surprise me if it was
I wasn't even trying to prove my point btw. I just said that mars rover is made in Java
not sure if there was a point they were making, but you are correct it does back up what I said however 😛
imagine changing the program of the mars rover on the go. That's neat
the original target audience simply didn't require such things lol
Always worried about mars rover getting bytecode manipulation by aliens
however Java became popular and more people became interested and its audience grew but there isn't a way now to add such things into java
especially without breaking everything in some update
we could fork java
if anything, the platform makes it easier to do such things
well if that happens, we can take it as proof that aliens exist
however it is more probable that the mars rover gets attacked by another rover though since at the present moment mars is currently inhabited by nothing but robots
imagine finding a random System.out.println("hi we are alien for you") in the mars rover code lol
lol that's not gonna render the http://textures.minecraft.net/texture/ID stuff
I'll just suffer w/ the downloaded forms
I think we need to focus on space more so that we can have a battle royale of robots on mars
I am sure people would love that
Some of these are so quite complex, so I was hoping there was a rendering library lmao
I agree
or imagine "Space Gladiators"
exactly
This needs funding
could you imagine nasa reporting that their rover was attacked by robots on mars XD

they can add it to the list of things they didn't think would happen but did
Found a three.js project which works... just need to somehow modify it so I can just go through the files in a directory instead of supply the file manually
https://github.com/bs-community/skinview3d
Probably easier to just modify the three.js code lol
Find the code, feed it into ChatGPT, ask it to do the thing
progress 😎
ChatGPT please evolve into SkyNet
bs community 💀
this would be nice
I've used this one before
Yea, it's nice. I dunno three.js though kek
or where the code to get the skin even is lol
oh it's in the html.
Hmm
I definitely need to figure something out though, I have 3.7k+ of these lol
Found one which uses JavaFX, gotta install an older version of Java.
Hopefully this does what I need, probably won't support newer skin types but that's (hopefully) an easier fix since I actually know Java lol
or just install javafx?
Used maven libraries still errors unless there's an actual install I can use which doesn't massively change stuff lol
oh I actually read the README entirely, might be useful after all.
Just thought it was the website itself
there are distributions that bundle javafx still, like Azul Zulu or Bellsoft
Eh. Trying to figure out that repo. example didn't work locally.
Guessing I have to throw it under XAMPP
nope 😄
JFX is a pain lol you can use it as expected but you need to ensure you should probably use their maven plugin
Also don't forget to use Java modules I've run into issues not using then
Idk if that still holds though
lol already got rid of that repo kek
probably just gonna deal with the downloaded skins. Don't got the money to commission someone for exactly what I need, and I've spent enough time trying to get third-party stuff to work
for (final var player : Bukkit.getOnlinePlayers()) {
if(shouldUpdate(player)) { // Checks if the player's UUID is in the "to update" set
// Edit one item in their inventory
}
}
```Would this be too heavy to run every say 5 ticks
That's fine
Yes run it async 
but keeping a direct reference to the player 🔫
lmfao
yeah I wrote that on discord didnt' want to type too much, but yeah no I use UUIDs for everything
getplayer should work too no?
assuming should update has a list of uuids
yeah, it's an example ig, the actual code is way more lightweight (iterate over an object list and check if one of three bools is true, has an UUID in case I need to get the player and update the inventory), but I figured "if this is light enough then the lighter one is fine"
the actual thing is like
for (final var user : this.userManager.listUsers()) {
if (user.optionsChanged() || user.languageDirty() || user.themeDirty()) {
user.updateItem();
}
}
oh this us cool
why final
Don't worry about it :3
why
It's not necessary
But it's not bad nor is particularly useful or particularly not useful
okay
i like the idea of final, but not that much in local variables
i feel like intellij let's you know if a variable* changes
chat how do u log stuff in a server network? I was going to use log4j with Loki as central log and stdout for everything but got no idea if thats smart.
Also I made a LoggingAPi which simply configures log4j and not sure if its smart
that is a fine approach, I haven't used it myself but heard good things about Loki
I like splunk more but only because I have never had to pay their licensing myself lol
how to create custom enchantment book? it needs to be added in anvil
and how do u set the central log host(loki/splunk)?
rn I use an environment variable, but then id have to set that for each container
any premium plugin ideas?
chess
D
Checkers
use no AI mobs for chess pieces
Call it "Slave Chess" where you have to beat the pieces with a stick or use a leash to make them move.
Chess was done already tho
Jpenilla has a good repo
make it unique, every time you whip a piece to make it move play an oooohhh sound
wtf
who's we bro u the only one saying chess with slaves 😭
Its a royal we
lol
Caused by: java.lang.IllegalArgumentException: Not bootstrapped (called from registry ResourceKey[minecraft:root / minecraft:game_event])
?paste
the whole thing pls
on spigot you can use NMS 😄
or you can use PDC, personally I'd go with the NMS approach but depends on the person
how with pdc, how to do it so it will work in anvil
I think you'd use
PrepareItemAnvilEvent
or ItemPrepareAnvilEvent
its called omsething like that
are you talking about this
es
?whereami
lol thats funny
I'd just make a datapack
2022
@slender elbow exposed as GPT confirmed
you bot
even this guy knows it
trying to get custom heads, get this error when modifying item stacks.
notNull(item, "item");
notNull(base64, "base64");
UUID hashAsId = new UUID(base64.hashCode(), base64.hashCode());
return Bukkit.getUnsafe().modifyItemStack(item,
"{SkullOwner:{Id:\"" + hashAsId + "\",Properties:{textures:[{Value:\"" + base64 + "\"}]}}}"
);
}```
how can i fix?
why are you not using the profile API for this
its old code, how do i do it now?
hm, the API doesn't support using the base64 value directly
Spigot 1.18.1 added the new PlayerProfiles class, which finally allows us to use custom heads without needing any reflection! You can obtain them as normal items, or actually place them down into the world. I’ll show you how both works: Creating a new PlayerProfile First, we gotta create a new PlayerProfile object. To do so,...
^^ covers how to do heads with modern api
thanks
doesn't the client do caching based on the UUID used there
if that's the case, it's probably better to not use the same uuid all the time, but I don't know for sure
I generate the uuid based on the texture url
I don't
thanks for sharing with us this piece of your infinite wisdom
😌
is there an updated guide
on creating custom enchants
Yes yes there is
link?
One sec I stg I posted jt earlier
You can just use a datapack
no datapack
NMS easier lowkey ngl especially if you wanna bundle with your plugin
So we don't have to resort to nms
Quite a bit of work to do it right

Yeah
Yeah I know a way to do it usi....
Nvm nvm
All plugins load to late I mean I know full well how to execute pretty much every aspect of such an api
It's just a ton of work and for me not worth the time or consequences of that work
dew it, I am sure it'll be merged as fast as chocos component support 
Can the Paper bootstrapper do it
yes
Yes
I believe so
Alr good to know
you'd have to get configuration phase working before even beginning to implement something like this which is kinda annoying
I gave up on byte serialization I really just wanna push through my 2 things I got rn tho
I left as a reviewer 💪
wtf
I saw -_-
heard there were some issues around it in spigot, not sure if it still applies
Y2K always ruining my dreams
config stage is indeed fucked on spigot
It's been there since July
You can always reopen it it's all done
just, don't use config stage
I'm just done maintaining it
because config stage sounds like reloading 
Smh making me maintain your old code
and it is a tad weird
I'd have merged it as it was tbh
see, thats why you aren't a spigot maintainer
Spigot should really try to push more experimental API, PRs list be looking a lot like wayland repo

MD doesn’t have time to merge new features anymore
Mojang keeps changing things every 2 months
!!!!!!!!
Yea, the constant mini feature drops make life a bit rough for the ecosystem
but, eh, its fine
Well, you just might need a team larger than one maintainer for the job
but that is just my opinion
Hear that @mdee5, he’s volunteering
I mean, the important undelying systems haven't changed a lot with these releases, so in the end it just comes to fixing compile time errors as well as adapting a few patches
there's a ton of work being done for item components and what not but spigot doesn't have API for that so it shouldn't be a problem lol
?nms
Well it has whatever it calls that ItemMeta#getXComponent bs
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<classifier>remapped-mojang</classifier> <!-- Important! -->
</dependency>
do i just put this
Mojang has gone ham with item components
read the article please
Not that I’m complaining
not trying to undermine md's hard work or anything, just the current state of affairs being rather frustating
I'm not going to walk you through what it tells you to do
I can finally make an edible Diamond sword that looks like tnt
Yea. If I was just one guy maintaining spigot and, yknow, make a living, I doubt there would be more work on the PR queue either
I like the new overlay stuff
I haven’t even looked into that a ton yet
I mean, paper has like a gazillion people in their team and their PR list don't be looking all that different
But I know it’s quite powerful
Gottem
ehhh
but it also has a ton more activity
while it is true that it'd be better with more human resources being able to take a hand at it, it ultimately falls apart when considering one has to have way too much knowledge in order to fairly review and merge these anyway
And then you get differing ideas into the mix
and lots of bikeshedding 😛
That’s why they wouldn’t let me on the paper team, I wanted to rewrite it in JavaScript
But apparently that doesn’t align with their long term goals for the software, smh
yeah I mean good thing I'm not in charge or we'd all be using ViewBuilders right now for literally everything
want to check if the player joined? Well their is an InventoryView builder for that
“Why does this potato have an inventory view?”
MenuType.POTATO.builder()
.check(player)
.logic((ItemStack possiblePotato) -> {
player.getInventory().addItem(possiblePotato);
}).build().open();```
@eternal night sneak peak at CabernetMC Api 😉
just showing you what ya'll are up against
sorry I was busy with comparing commits in the past 2 weeks 
was just too hurt by this
indeed 
tbf it is a bit unfair because all our update work is separate commits
but in the last 3 weeks, paper is chilling at 50 commits vs craftbukkits 16
lol, for the record, I do recognize that the magintude paper works at is completely different when compared to spigot, but it still suffers from much of the same problem
For now ™️
yeah wait till they bring in John Developer
what are you talking about
he's going to go crazy
spigot is perfection
tbh, the worst part about paper is the fact that rebasing and reviewing patches is annoying
it takes like 3 mins to me and I run a potato
The worst part about paper is they keep releasing builds which means userdev has to run again
i did this
I'm surprised you guys haven't come up with a way to optimize that workflow given y'all got to do it so often
Smh you better compensate me for all this CPU usage
Well, not for much longer 
well, more targeted than it is now, rather, paperweight was a huge step forward I'm sure
they're going to optimize it with a very soft spoon
Paper soft spoon
Coming with hytale, elder scrolls 7, half life 3, and me getting a girlfriend
coll
imma bet you a full minecraft account (not mine, I'll buy you a new one)
that soft spoon will be here before component PR is merged 
what comes first heat death of universe or component PR
Idk you guys have been talking about this spoon for a while
Probably since they hytale teaser tbh
fair fair
but you gotta think of it that way.
Every update we have to do with spigots ferflower fork is another day we get more depressed and delusional
last time I was on Paper's discord, there did seem to be actual progress towards turning off the tap, if one may call it that rather than just the hype around it that has been around for years
paperweight-core iirc is ready yea
userdev and patcher (fork plugin) are not iirc, but they should be somewhat easy
Are you prepared for 1000s of people complaining their spigot plugins aren’t working
uh
it won't happen immediately rather
Yea
at least until I make my PR "remove all deprecated spigot methods"
but my code is still red

the legacy text methods are gonna be the last ones to go 
clear cache and restart IDE
how can i do that
"clear cache"?
file menu
Fair enough
Couldn't you just keep around all the string methods and just YOLO them through MiniMessage kekw
that would be worse than removing 
Minimessage explodes with the § character
its okay § is but a suggestion
And by that I mean it just yells at you and refuses to do its one job
We just cope that we'll get hava string templates by then
Smh
at which life is good
before doing that, did you add special source properly to your pom, and did you sync the changes
is this concering
how to sync?
before i compiled and added the spigot1.21.1
it was allred
but now its normal
in the pom.xml^
remove the dependency to spigot-api
and you can sync by pressing the floating button that pops up when you change your pom
how do you get the SkullMeta set for a player head such as this one:
https://minecraft-heads.com/custom-heads/head/4132-steve-gold
when you only have the texture value
?skull
I got it
before i synced i had this much red but now i have more
Spigot 1.18.1 added the new PlayerProfiles class, which finally allows us to use custom heads without needing any reflection! You can obtain them as normal items, or actually place them down into the world. I’ll show you how both works: Creating a new PlayerProfile First, we gotta create a new PlayerProfile object. To do so,...
@barren peak
final PlayerProfile profile = Bukkit.createPlayerProfile(UUID.randomUUID());
final PlayerTextures textures = profile.getTextures();
textures.setSkin(new URL("http://textures.minecraft.net/texture/3bb612eb495ede2c5ca5178d2d1ecf1ca5a255d25dfc3c254bc47f6848791d8"));
profile.setTextures(textures);
final ItemStack item = new ItemStack(Material.SKULL);
final SkullMeta meta = (SkulLMeta) item.getItemMeta();
meta.setOwningProfile(profile);
item.setItemMeta(meta);
why does that use URL ugh
ik 😭 its so annoying
idk what happend but these went red again
URL does a bunch of unexpected stuff upon initialization
what does this mean when i press the sync logo?
did you run buildtools with --remapped
why did you add the spigot jar
spigot-api
it should be spigot
why did you not just read the guide I sent earlier
?nms
you don't need the file
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<classifier>remapped-mojang</classifier> <!-- Important! -->
</dependency>
from the guide you shuold beable to see what you did wrong
the spigot-remapped-mojang artifact gets installed to your local maven repository when you execute buildtools with the remapped flag
.
I can't blame people for skimping through guides like these tbh
yeah and so why did you switch to spigot-api
because it was there before
I said to remove spigot-api not spigot

did you sync again
well, it is recognizing craftserver now at least
is it called MinecraftServer in mojmap or something else
still there

wow
its like a chain of reactions
u fix one thing
and everything else
gets fixed
thanks
in Germany you would say, "Gänsehaut"
np
gansehaut
hawkeye in the flesh
would've never spotted that
haha
bro how tf you notice that
onLoad
you do realize that you put a method inside a method right
?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 do
please learn java before using the API it'll be helpful
only the logic that runs on load, not the method declaration/definition itself
looks good, just follow the rest of the guide now and you should be good
getAllTags is one of the methods that was earlier in the guide, you should have copied that too
or if you copied it in some other class, just reference it properly
maybe if you're struggling this hard with the code you should try datapacks
oh id id it
i forgot
to copy
scroll down
should i rename
oh i got it
he made a typo
they didn't, just the method name is now bindTag in the newer version, it was bindTags in 1.21.1 though
i see
i know basic stuff, i just never did complicated stuff
Type a period, and then see the methods that IntelliJ shows
Don’t send a screenshot of it to me, figure which method you think would work the best
Guides get outdated
Code gets updated
Code changes between versions
Old guides won’t always work
the guide is updated rather, since they're trying to adapt a 1.21.3 guide to 1.21.1
Oh, the same but vice versa
I know right, rarely the case lol
oh okay
do you know what i should
put
instead of or else null?
i have no clue
yes ive scrolled
through
the method is called getHolder in 1.21.1 it seems
When you type a period you need to look at the method name and IntelliJ suggests the methods that would make the most “sense” on top
Look at the ones on top and see the return types and the method name
thanks
I was really confused for a hot second since I was looking at what I thought was the 1.21.1 mappings forgetting that I had switched to the 1.21.3 ones and the method names matched lol
You need to define a variable for enchantId
I just jumped into this conversation so I don’t know the full code but do you mind sending the full code?
read the guide, it explains it there
don't just copy the code, read carefully what it says
im reading
im just wondering
for lines like that
like
i should put it under some event
like anvilenchant
that is part of the enchantment definition
all this code goes after the unfreeze call in onLoad

I mean, you wouldn't have all these issues if you were on 1.21.3 lol
I asked claude to make an API from the blogpost and it made one kind of similar to Paper's one lol
best claude
only if it was this simple
if you switched to 1.21.3 you could just ask chatgpt/claude/mistral to encapsulate the logic onto an API like me and then just do that
work smart not hard 💁
ugh
i just wanted to create a simple sistem
add some sort of meta data to a book
call it enchanted
let players combine the book and sword via anvil
then when they use the sowrd and attack
if sword has meta data custom enchant
give victim
an affect
😭
And it works?
That’s the craziest part
I feed it the whole guide so all it had to do was to create abstractions, LLMs excel at that kinda thing
I actually had to copy the outerHTML of the post, feed it to mistral and tell it to scrape all the text from it to only then feed it to claude to generate the API, couldn't have done that with just mistral since it does what you just described
claude is pretty good at staying concise
mistral is the completely free one, no strings attached
so you don't have a limit on how much you can use it
There’s gotta be a catch somewhere
(well, I'm sure there's a limit, I just haven't used it enough yet)
Computation time doesn’t grow on trees
their model isn't as good as the other ones
but is is good enough to give menial tasks like the above one so you don't waste all your claude/chatgpt tokens on a single response lol
also bigger context window
can u send me the guide
oh is it the same guide
@sly topaz what 1.21.3
if you're gonna use paper please go to their discord too, https://docs.papermc.io/paper/dev/registries
i wont
its default
on new
Is it possible to make a plugin add mod like features without making the player download it? (I haven’t started learning programming to make plugins yet) with custom items at least and probably blocks
Long answer -> Yes
Short answer -> No
Adding custom items, and blocks with plugins is very far from straightforward. It would require a pretty advanced knowledge of the plugin eco system packets, java etc etc. It would be extremely difficult especially for a beginner in programming. While you can hackily execute most things mods can do with plugins, the actual implementation is often times complicated
this also requires combination with resource pack too
These concepts are pretty far from first plugin type of project
as a first step you could maybe start with Custom items they're fairly easy as its just a resource pack with some model data, but blocks would probably hell on earth for a beginner
Hello, I am attempting to create a player head, however, when I add it into my GUI it shows up as without a skin (see code below)
// Convert the UUID to an offline player
OfflinePlayer player = Bukkit.getOfflinePlayer(adminUsers.get(i));
// Create the head of the player
ItemStack playerHead = new ItemStack(Material.PLAYER_HEAD);
// Get the meta of the skull
SkullMeta skull = (SkullMeta) playerHead.getItemMeta();
// Check if the skull is valid
if (skull != null) {
// Format the name of the player properly
skull.setDisplayName(Placeholders.formatPlaceholders("&c" + player.getName()));
// Set the owner of the skull
skull.setOwningPlayer(player);
// Save the skull's player data
playerHead.setItemMeta(skull);
}
I have confirmed that the item meta is updating because the name works, however, the skin is just a default head. Any ideas?
Lots of player skull questions today huh interesting.
Get the player profile of the admin and update it
Do note this should be done asynchronously so you'll need to set the item in the inventory once the request is completed
I tried that. I just found out what the true issue is. The player is offline so the head doesn't show the proper skin (Not the async part but I did the profile thing)
I gave you solution
You have to get the profile but then update it from the web request
oh so you want me to get the profile from an API? or via OfflinePlayer#getPlayerProfile()? Because doing the offline player one doesn't work, even after making it async and spawn into the GUI about 20 seconds later
Should not take 20 seconds 💀
Was for testing cuz the 1 second I put yieled no change
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/profile/PlayerProfile.html#update()
final InventoryView view = ...;
final OfflinePlayer player =....;
final PlayerProfile profile = player.getPlayerProfile();
profile.update().whenComplete((exception, profile) -> {
if (exception != null) {
... properly handle exception
}
final ItemStack stack = new ItemStack(Material.SKULL);
final SkullMeta meta = (SkullMeta) stack.getItemMeta();
meta.setOwningProfile(profile);
stack.setItemMeta(meta);
view.setItem(0, stack);
});
declaration: package: org.bukkit.profile, interface: PlayerProfile


