#help-development
1 messages · Page 1127 of 1
thats what its meant to be!!!
About
Connects multiple minecraft servers via master server, cookie packets and transfers
Except yknow, proxies don’t send data between backend servers through the client
plugin messaging does, most people are smart and redis it tho
yeah its not a proxy
no it does not
did you ever hear the word "feature"
it's called a feature
plugin messaging uses the players connection
It doesn’t
you have no clue how plugin messaging on bungee works
it uses the players connection
well, I thought of one thing. A server that uses coordinate obfuscation by randomly offsetting the client's coordinates -- in this scenario, transfer destination coordinates being in plaintext in the cookie would be sensitive info
wrong
The proxy intercepts it
And stops it from actually going to the client
Afaik anyway
it borrows the players connection to send it
no
plugin messaging does use the players connection, but only on the server side hence why it requires a player on a server to even use
i would even put it as mid-sensitive info if you only put some data strucutres with no real sensitive data or anything because you could guess internal processings and data structures
if there is no players on the server plugin messaging fails
not bungee to client
and that's nothing you would ever want to reveal
Sadly :(
im not saying bungee to client
im saying it uses the connection of a player to go bungee -> server
Yes
And server to bungee
But that data never actually makes it to the client so it’s fine
no one cares about internal processing or data structures and not sure what data you are putting into a cookie file that would even allow this. Not even your normal web cookies store sensitive information like that in a cookie
I thought (pretty sure) PMC goes through a proxy, as Forge/client mods use PMC
Anything can use PMC
if you searlize something via gson you'd exactly know class strucutres
arent all sessions saved in cookies?
It’s just a special packet Mojang made for custom data
and that isn't useful unless you had access to the system
or you'd know any exploit to abuse / that would require such data?
You also gotta mind the cookie size limit
splitting
5kiB isn’t a ton
Not even your normal web cookies store sensitive information like that in a cookie
some website login systems use an encrypted JWE token that stores an internal id associated with your account, and because internal ids can sometimes reveal the order in which accounts are created, it would be bad if this were decrypted
if there happens to be an exploit in gson/json maybe?
enought for now but i will add splitting soon
there's no need for an exploit in gson?
you asked
you'd just leak class structures as mentioned
all I am saying is what you are claiming is not secure in the least
bro wtf u talking about
5120 bytes
if you want to use cookies for session verification and nothing more sure go for it, but you don't need a whole lib for it
???
what u talking
if you want to claim that storing sensitive information on a client is secure or the best idea it is not
bro
i am not claiming that
i just want people writing plugins
have the possibility
to store data on the client
which is discared after a session quit
Why not have a system that sends data directly from server to server
Via sockets or whatever
without the client knowing whats inside and him being able to alter the data
bc it wouldnt ensure session-persistency
that isn't secure and never will be
a player could also just quit and join on another server via transfer handshake, you'd need to verify all of this
when doing hobbyist projects I'd rather adhere to the cipherpunk's definition of secure, which is that implementation details can be revealed to all the bug-hunters but anything that is truly sensitive must be ridiculously encrypted
however do note, the more secure you make something the slower it becomes
I prefer not encrypting anything, too much of a hassle
and the more resources it takes
even google themselves dont leak their data structures
you know why there's protobuf
thats why i made an secure cookie api for it
i got you
bc it's fast, small and??
doesn't leak the structure just by existing
or would you want the server owners themself to impl smth like protobuf
yea, google adheres to the boring corporate definition of "secure" where every bit of obscurity helps prevent an attack, even if it isn't bulletproof
like putting raw data into it and then writing "yeah ur data, it can be seen by clients? why not???"
(well... boring but necessary)
i dont see any point in not making something as bulletproof as possible if it doesn't make any circumstances for anyone
and this attitude is shifting anyways, some companies have started intentionally exposing their API docs (for APIs only used internally or by a frontend) as a way to attract bug hunters
they pay people to break stuff if you are talking about the big corps
microsoft is one of the firsts to do this in terms of history. But its actually quite common they have their own teams of hackers and their sole purpose is to break stuff. Then you have the so called bounty program, this enlists the help of the general public without having to pay them standard wages and instead pay if they found a valid bug or exploit.
hi
is the commented line necesary?
i've always done it
but i never really knew if its 100% necesary to get the profile info updated
so any other tips than adding salts / iv?
or is it still insecure after all!
you don't store sensitive information that is detrimental if its known on the client
that is the opposite of security
bro
so
you are saying:
dont implement encryption because people should not store sensitive information in it?
or am i misunderstanding u?
if they store sensetive data in the cookie anyways its better encrypted lmao
the connection from client to server is already secure. Its not like someone can hijack the connection. Therefore, any data you store in the cookie should be what the client already knows and is just a convenience for the client.
it's never gonna be a convenience for the client... since the claim is intended for the server!
encrypted cookies exist for the web not because you don't want the client to know anything but because you don't want something else reading the cookie
the cookie packet can and will be spoofed easily, no point relying on any sensitive data even if ecrypted in it
- it shouldnt be meant to keep third parties from accessing the cookie data
- as already said; it's just from the concept better to keep as much data away from the client as possible, if you are saying that encryption is "INSECURE" and can be cracked if enough time spent on it, okay, you can do the same think for many other services then too
yea I mean it's obvious that you at least need a signing scheme
I've seen a few plugins get released that are using unsigned cookies ._.
so it was a bit refreshing to see this AES implementation even if it has a small weakness
bro cookies in the web are also persistent and also often meant for auth
I never said encryption is insecure, but in a broad sense it depends on the encryption you employ and how its implemented. So yes some forms of encryption are indeed insecure
unless you are using some sort of timeout system on the signing it could still be copied over
plaintext is wild though
oh yes, @azure zealot make sure you have like a 2 minute expiration on every cookie
to prevent replay attacks
almost forgot to mention that
so what are you trying to tell me with this, in a broad sense some poeple could also be dumb and send their keys to other people!
it expires after 10 seconds
not sure why you are so offended over proper standards?
already did, proper security standard is to not store anything outside of your control that is detrimental if its known
part of why I'm using JWT/JWE is that it just... has everything. Expiration checking, revocation lists, public key crypto, standardized json payload, etc.
okay so you say just the concept is invalid from security standpoint
so you'd say that if i transfer a client to another server i would make a request to my master server to tell him that there is some client data associated with that player and that he should transfer it to the other instance
Yeah that’s generally how it’s done
and then the master server should handle expiration etc.
and you'd have to check if the player was transfered
and the target server
that's just trash
most boring way to do this i can imagine
ye
its completely boring
and mc impld such a funny thing
why
would u not use it
and alf
u can alf
I would use it, but not for data that is important
alright, its not meant to store very important data in it anyway
But thank you for your personal thoughts
i will add aes gcm
if i'd transfer someone from a bw server to an endgame server i'd want to store received coins, minigame name etc. for the chat msg and title (just an example) and i dont want the client to access it
because i dont want to allow random clients to access more data than they are normally allowed to only because u are using that feature
one alternative to JWE that should be mentioned is PASETO
basically the JW standard but without all the footguns
but not as many languages have an implementation of it, so I'm hesitant to use it
yea... for stuff like inventory contents or ingame currency, I'm not sure it should even be stateless -- could be prone to dupe glitches if it isn't managed centrally via a database, and if it's centrally managed all your cookies have to do is verify that it came from a real server (which could be as simple as 256 bits of entropy stored in database or valkey pub/sub to facilitate each transfer)
the received coins part should always be verified and is the exact thing I was talking about. Instead I would probably put in there that you earned coins so the server knows to check that otherwise if it instead said you didn't earn coins then it would just save the server from doing a check that isn't necessary. This is the convenience I was talking about. However that little bit there is not detrimental if anyone knew about it or discovered that is in the cookie
Either that or you just really really hope everything is secure and people don’t start earning 99999999 coins
lol
it should be
keyword should
but you will find out its not though the hard way 😉
since that is really the only way you will know its not
hopefully if someone does exploit it, it doesn't cause a widespread economy problem
since one of the issues of economy is saturation
also data like this should not be stored in a cookie
ideally no because its best to not allow someone the ability to alter their coins at all
even if it is encrypted it only takes a single success
no one's gonna break a proper signing algorithm
thats what they said about SHA1
yeah but thats an invalid point for me again, you can say this for any encryption
we all know that it's not 100% reliable data but 99.99%
and the world moved on
but you can say this for everything
soo much stuff would be broken if you could just fake a JWT claim
it would be a worldwide disaster, not a minecraft server disaster
uh, right just moved on lmao, you can say that
yes thats why the point "it can be cracked if you are very unlucky" is completely pointless
everything can be cracked
oops i just did one hit with my discord JWT
now im in ur account
how disasterious!
just need to be very lucky
ffs i guess we need military grade security!
chances are 1 against 1000000000000000000
BUT ITS INSECURE
it's been slow... but my linux distro just banished usage of sha1! :D
(fedora)
oh i tried 2^255 combinations and i got the secret key now! THATS SO INSECURE
there is a few other algos you should ban your server from using, there is a list you can search up of all the outdated ones
recommend not letting your server use them, its actually a tactic to make a server use a less secure algo by doing an algo swap
yea, fedora has had a command for a while to banish all bad cryptography in one swoop, I have it set on my almalinux box
i am going to checksum the data with MD5
that is convenient
it affects what algorithms stuff like nginx or the package manager can use
do whatever you want, I can't stop you but md5 checksums can be spoofed
though obviously you could still accidentally introduce bad crypto
it has collisions
spoof it!
it has collision vulns
there is also an experimental mode for post-quantum cryptography... but the manpage says it will break everything and to not even try it
there is a reason why security and encryption are their own fields of study just fyi and actually fields you can go to school for specifically. There is a lot to them.
I wonder how it intends to work?
because quantum computers can break any encryption standard for any standard cpu
then go get your quantum computer
and the only way to protect these systems is to utilize a third party quantum computer to implement quantum encryption
oh I see, it doesn't disable old stuff yet, it just enables new post-quantum stuff for now ```
An experimental subpolicy enabling all the currently available
post-quantum and hybrid algorithms.
Not for production use.
May disappear with the next update.
group = +P384-KYBER768 +X25519-KYBER768
fortunately there is only 5 entities that even have a quantum computer so its very unlikely we will encounter issues with it for at least another decade if not 2 decades
nah, there are classical algorithms that are considered quantum resistant
thankfully I can just hack into them
okay emily!
alright so its for sure secure enought for now
go for it!
there is none at present. Not sure how they are determining its quantum resistant without testing it.
hack into the CAs buildings
so wie can stop the discussion now
it's not like quantum mechanics is a total mystery, I'm sure the devs of kyber (lattice-based cryptography) have good justification
@wet breach if you have any security concerns at the final version please contact us oki? :)
well no that isn't what I am saying. Most encryption standards are built on top of the principal in the time length it will take due to the fact most people don't possess the processing power required to lower that time length. Quantum computers have this processing power therefore instead of billion of years we are looking at a few years or maybe even shorter. We have yet to know since no one has released any findings so far which makes sense as one entity being the NSA isn't going to do so, and the 4 others being businesses are probably not spending their time testing these things lol
quantum computers don't have extra processing power per-se, they have quantum algorithms and different time complexities for different things
however what is known is that any encryption that works on x86 or related cpu's will be at risk and there isn't anything that can be done to mitigate this except to start utilizing third party quantum computers since quantum encryption would be ideal and quantum encryption can't be understood by tranditional computers.
the concern is that you can, right now, design a quantum algorithm (on paper) to half the strength of AES
if you have a source that says that, I'm curious
it's not really what the experts are saying, which is that:
- novel classical algorithms can be hardened to avoid quantum computers breaking them
- a quantum internet is really really difficult to design, so we might never have true quantum cryptography used for anything important
laughs in quantum phone
monday iphone 16 release
we are now entangled
i wanna pre order
the problem is in the key exchange
yea, it's not just AES but also RSA and elliptic curve weakening
but work is being put in to harden everything, not just the cipher
it will be interesting that is for sure
but as I said, good news we don't need to worry about this for at least maybe a couple more decades lmao
unless a magical progress happens with quantum computers that allows them to be smaller and easier to build then maybe we should be concerned XD
one interesting aspect is that hybrid encryption -- wrapping the old algorithms in the new -- is considered desirable, in case we screw up majorly and one of these lattice algorithms is defeated classically. I think that fedora setting I found enables one of these hybrid algorithms
yeah that was one of the things that was proposed last time I took a read in the security stuff regarding quantum
its quite possible
but I would be weary in using them though
mainly in regards to breaking stuff
yea
it might start being possible soon though, I think there is a proposal for post-quantum/hybrid in TLS
if you want to force your users to use the newest possible web browsers, that is
I would recommend it
but the dnf package manager would stop working if you disabled pre-quantum crypto
what is method in this context?
Where is this setting ? 😮
what the fuck
nah
i mean im sending like half a gig of chunk data but that's besides the point
500 megs is quite a lot of data
that would take 80 seconds to download over my broadband connection.

Well, possibly a bit less since the speed often tends to be more than advertised
what isp
Just some random german ISP
which one
Actually, lemme quickly make sure I indeed have a bandwidth of 50 MBit/s and not 50 MByte/s

Entega
wtf is that
atp just buy a hetzner colocation rack and just live in there
less rent as well
Yep, it's 50 MBit/s
Local energy provider.
I told you it was a random one, but that's really the norm for rural areas.
Now funnily enough my mother calls the 50 MBit/s "high speed", yeah - I'm not sure what she is dreaming about.
On the other hand, I did (albeit) briefly experience the days where the connection was so garbage that waiting for a video to buffer was the norm.
telekom recommended me to use the 16mbit/s plan
how do I get an instance of a plugin without making a static variable
JavaPlugin.getPlugin(<ClassExtendsJavaPlugin>.class);
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
ill just take the other guys answer and not read allat
Just not call that method too often
why
It's plainly not be designed to be used without caching. It won't have terrible performance, but won't also be lightning quick (which the manual DI approach would be)
prolly the second one
-32 to +32?
I think so
that's 4200 chunks
just spawn a task for each chunk so you don't send them all at once
that also has that loading effect on the player
so the chunks look like they're actually generating
Nobody knows ?
if i make a task for each chunk, then it'll send all at once
also
the bottleneck is the fucking tcp stream
it cant take too many chunks
maybe i should implement compression
💀
does bro not know about the xz backdoor
the what
oh shit i just looked it up
lmao
💀
im sending 64x64 chunks
but
the client doesnt load them
tf
L client
fuck the notchian client fr
i wanna make a yt video showcasing how fast the server can send chunks
but the client starts lagging and doesnt load them
lmfao
imma lower the chunk radius to 16
wouldnt technically speaking 32 render distance be like
32x32?
instead of 64x64
so -16 ~ 16
ok then wait
250ms for 16 radius
let me try that
client is actually fucking 2fpsing
What's the universally accepted way to do clickable text and tooltips?
Chat component api?
TextComponent nextPage = new TextComponent(ChatColor.translateAlternateColorCodes('&', " &8[&d&m─>&8]"));
nextPage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/friend list " + (page + 1)));
nextPage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponent[]{new TextComponent(ChatColor.YELLOW + "Go to next page")}));
navigation.addExtra(nextPage);```
Here is a code and a new page appears on each click on the friends list.
Is it possible to disable the clicking action on the previous page when a new page appears?
There was a method but I forgot it
@blazing ocean
There's a method? I don't think you can change text that is already sent right?
That's some hella speedy chunkgen
thats pretty fast tho
its not chunkgen
thats not even chunkgen
then it's not interesting
fr
the client just starts bugging
but im sending chunks relative -16~16 on both x and z axis
vanilla client just dies
when are you determining it sent?
because there is indeed a queue, also due to how tcp works a packet must come back for a true completion
i mean its to be expected
im sending almost half a gig of packets every 200ms
the client just lags
well, a packet can't be half a gig, at most the largest a packet can be is 65535 bytes
packet s
of packets
its chunks, and im sending 4200 chunks every 200ms
but 500mb/s is still pretty good though
its localhost
there should be no network delay technically speaking
i guess the fact that the server can even send that much is fine lmao
i suppose yes
or the ip assigned from the router
0.0.0.0
then you are not using the 127.0.0.1
aint it the same thing
no
0.0.0.0 is public and 127.0.0.1 is private
0.0.0.0 says to bind to all available addresses
however, if the client is not connected on 127.0.0.1 its going through the router assigned ip
the reason this makes a difference is because 127.0.0.1 bypasses the stack
since its purely local and not bound to a hardware
where as your router assigned ip is bound to the hardware and its going through the hardware and coming back
so you're saying 127.0.0.1 should be faster?
it will always be faster since its not going to be passed to the NIC
there is a downside of using 127.0.0.1 as well, such as if I recall a reply packet isn't sent
so if you have something that relies on such things, using the loopback may not be ideal lol
every tcp packet has a reply to it
im not writing my own tcp protocol
but on the loopback this isn't implemented if I recall. I could be wrong
im using tcp provided by the tokio library
thats fine, but its good to know how tcp works because its part of why something goes slow
however sometimes you might rely on waiting for such things in terms of your queue
also, ping packets don't work on loopback as well, hence if you list your server using loopback address it will show as offline
huh
but yeah you should see an extreme speed improvement if you forced the server to specifically listen on 127.0.0.1
i love tracing so much tho
and if you connect the client to the loopback
the cool thing is the call location / trace or whatever isn't even reflected
its beautiful
perfection
i mean its almost similar to before
loopback is 127.0.0.1
also, if your nic is only capable of gigabit connection
then 500mb/s is all you are going to be capable of for your testing
this is because upload will consume 500mb/s and your client download is going to take 500mb/s
which equals a gigabit
if you test using router assigned ip that is
if trace is info, everything is gone
for release builds etc
I see errors
interesting
what's the equivalent to 1.15's TextComponent for 1.21?
or should I use bungee's TextComponent?
isnt md5.TextComponent still applicable?
Guys, is YamlConfiguration stupid?
first it errored while trying to convert it's own saved list into an itemstack array
now its giving me errors while trying to parse a field as a float because it decided that it should be a double
am I doing something wrong?
show code
When i removed a offline player in friend list;
The player _SinHa_a does not exit or is invalid
wha
kit.setSaturation(Methods.getDefault((Float) conf.get("saturation"), 0f));
kit.setItems(Methods.getDefault((ItemStack[]) conf.get("items"), new ItemStack[41]));
getFloat
I tried, doesnt exist
and a get() will never return an array when theres a list stored there, it will return a List, and btw there a ::getItemStackList
getDouble then
there isnt wdymm
what type is conf
YamlConfiguration
declaration: package: org.bukkit.configuration.file, class: YamlConfiguration
is it some new stuff?
what version ur on
im on 1.20.6
you sure conf isnt a map or smth?
YamlConfiguration conf = getConfiguration(name);
so it isnt ig
what does it say when you do getDouble
getDouble?
found it
wdym by getItemStackList
just getList and cast it
how do I cast a list to an array
list.stream().map(ItemStack.class::cast).toArray(ItemStack[]::new); 
jesus what is this
uh
cast a list to a list bruh
ItemStack[] items = new ItemStack[41];
if(objects != null){
for(int i=0; i<objects.size(); i++){
items[i] = (ItemStack) objects.get(i);
}
}
kit.setItems(items);```
this is better
trust
If you need performance over readability
I need readibility over performance
anyways, this wouldn't happen to decide that it wants to no longer retain the correct order and shuffle itself up?
why work with arrays in thhe first place
🤔
what else should I work with
use List maybe
does list have mutable size
yeah well I dont want that
why not?
I need 41 size arrays
why specifically 41?
inventory size
idk bro gl
lmao thx
if i cancel an item despawning, does it try to despawm immediately again, or does it reset the five minute timer?
?tas
all objects in java are stored on heap ??
so im not wrong then
yeah but statement makes no sense
i honestly dont even remember how to code in java
so i shouldnt be here
i just like chatting with all the cool people here
then go to #general xD
would using an item in cache be reliable?
ItemStack -> something
i wanna avoid frequent meta copies
You can always just cache the meta
@blazing ocean what do u think https://aliexpress.com/item/1005006033905180.html?afSmartRedirect=y
its like 2x more on the internet normally
if you want an item to never despawn automatically set its age to -32768
oh thats interesting
-inf or some nonsense like that?
how much is that in usd
no the number I inputed is the max negative
its hardcoded in the ss i sent
oh shit sorry wrong chat
no, notch was high while programming minecraft
by that i mean on some good stuff
lets move to #general my bad
Should i use json or a db for my miencraft plugin. if db then which one.
a json or a db?
depends on what you want to store and how much
Whats the issue here?
Its only getting executed once.
private void startParticleSpawner() {
Random random = new Random();
Bukkit.getScheduler().runTaskTimerAsynchronously(UserTeleportPortals.getInstance(), scheduledTask -> {
for (Portal portal : createdPortals) {
double randomHeight = random.nextDouble(0, 1.5);
Bukkit.getScheduler().runTask(UserTeleportPortals.getInstance(), () ->
portal.getSource().getWorld().spawnParticle(configDataProvider.getPortalParticle(), LocationUtils.toCenterLocation(portal.getSource()).add(0, randomHeight, 0), 1)
);
}
System.out.println("Particle Timer executed");
}, 20, 4);
}
as for which db supporting multiple options is a good idea
the age of the item will not increase if its set to that negative number. At 6000 for age which correlates to the ticks AKA 5 minutes the server will attempt to remove the item. If it gets canceled it ends up being random in when the server will attempt again to remove it.
At least try to support SQLite and MySQL
so in theory you could also just keep resetting the age too if you want to have a task that eventually lets it despawn
IE, if you wanted to let it last for 10 minutes you would just reset its age at least 1 time and then not reset it again
also to note, simulation distance of the player plays a role as well. If the item is outside of a players simulation distance it doesn't get ticked and render distance as well. If an item is in an unloaded chunk it also doesn't increase in age.
Pretty sure items also straight up have a no despawn tag now
Yeah it’s setUnlimitedLifetime in the api
interesting, I don't see that tag for vanilla so is that a spigot feature then?
considering you can have custom tags
Shouldn’t be
@smoky oak well there you go, other then age you can use the api for setting it to not despawn
thus, no need to rely on the event
well i was planning on using the event that spawns the item to set the time to -max
but the dont despawn tag works too
Unless it’s just a nice wrapper for setting the age to -32k
But I swear I remember seeing a snapshot add that tag
wonder if that is it, since I can't find the tag for it =/
ah well still convenient
a?paste
?paste
for pic
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
going to assume you have some plugin that does stuff with packets
using a proxy?
yes bungecord
Stay in #help-server
best gui api?
"best"?
💀
I'm looking for the best library to make guis
There are no best gui libraries
?gui
just make it yourself if youre biased enough to think its the best
I just found out that it is not necessary to have the plugin in the plugins folder as a Jar in order to use the plugin api. I've been told that this is not possible, but if it is, it begs the question why it is necessary to specify the required dependencies in the plugin.yml file why not just use the compile scope
What
Why do you need to add dependency settings to plugin.yml and download these jar files in general if you can load a jar file via compile scope?
what?
jar inside plugin
Dependency settings ensure your plugins loads after the dependency so the dependency is loaded first
That would be implementation
Some dependencies are designed to be shaded, others are not
For example you can't just shade the worldedit api
compile does not package the lib. shade does
teh point of libraries in plugin.yml is to keep teh distribution size of your jar down
2024 and we care about a few megabytes?
when you have to package multiple SQL libraries it quickly bloats
because those are also bloated 😔
Plus spigot has a 4mb upload limit!
what?
like hibernate?
my plugin use hibernate and now this 16 mb
yeah hibernate is pretty large
what do you even need hibernate for
thats something you use when you dont care what happens with your db
i was use spring jpa so it's not comfortable use jrbc))
ive never had a time where manually interacting with the sql api has taken me longer than setting up the whole orm thing
Well, when you use hibernate not for the first time it becomes easier than writing a lot of code.
u dont like hibernate making 53 queries for a single model ?
exactly
and i want to be able to debug thinks without having to look into the internals of it
what?
yea using an orm in a mc plugin doesn't make a lot of sense xd
What ?
using an orm doesnt make a lot of sense anywhere
How i can modify above player's head name with ProtocolLib (or other things)? :P
i don't want to use scoreboardmanager
Hello, I'm trying to build 1.21 with: java -jar BuildTools.jar --rev 1.21 --remapped. However, it tries always to build 1.21.1. How can I force BuildTools to build 1.21?
animations? It has transformation/translation
Hmmm, if I build a plugin against 1.21.1, will it still be able to run on 1.21 servers?
No one should be running a 1.21
just looking at craftbukkit, im wondering how much code would be gone if we used kotlins delegate feature 🤤
sadly
Ok, then the next issue I'm facing is this:
org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.spigotmc:minecraft-server:csrg:maps-spigot-members:1.21.1-R0.1-SNAPSHOT (absent): Could not find artifact org.spigotmc:minecraft-server:csrg:maps-spigot-members:1.21.1-R0.1-SNAPSHOT in minecraft-libraries (https://libraries.minecraft.net/)
Running with: java -jar BuildTools.jar --rev 1.21.1 --remapped
use java 21
$ javac -version
javac 21.0.4
$ java -version
openjdk version "21.0.4" 2024-07-16
[..]
$ update-alternatives --list java
/usr/lib/jvm/java-17-openjdk-amd64/bin/java
/usr/lib/jvm/java-21-openjdk-amd64/bin/java
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
$ update-alternatives --list javac
/usr/lib/jvm/java-17-openjdk-amd64/bin/javac
/usr/lib/jvm/java-21-openjdk-amd64/bin/javac
/usr/lib/jvm/java-8-openjdk-amd64/bin/javac
$ java -jar BuildTools.jar --rev 1.21.1 --remapped
[--rev, 1.21.1, --remapped]
Loading BuildTools version: git-BuildTools-5411f5b-186 (#186)
Java Version: Java 21
So as far as I see, I'm using 21? not 17 or so...
is player.sendTitle() the only way to send a title?
because subtitles dont work for me
Use latest BuildTools and run it in an empty directory
Let's see how you are sending them
p.sendTitle(" ", ColorTranslator.colorize("&3+1 Mining Skill - " + prcnt + "%"));
Try sending ChatColor.RESET as the main title instead of just a whitespace
Wdym still sends as title
What version are you on?
yes I think it does isEqual on the stacks to see if its the same item
what happens if you save a player into a variable but then he leaves the server? Can I somehow check if he is still on the server or something like that?
You would have an invalid player reference
sounds like a bad thing to have
then you probably have to loop over the inventory yourself
for item in inventory, etc
but what else is there besides the material and data
yeah
no becasue it depends on what you wanna look for
like why not use the remove function
what else is there to compare besides a material and the data
Player#isOnline
That worked! Thanks a lot!
how do i make someone glow with a specific color
like red, green, dark green, aqua or sum
is there a way ?
the glow colour is the team colour
To delete an offline player from the friend list, we get the player's uuid from friend.yml, and thus we find the player and delete him.
But there is a problem, when I delete a player from the friends list, it is deleted from the list of the player who deleted it, but not from the other player's list.
It remains registered in friend.yml
This only works when the player is offline.
oki
If we delete when the player is online, this problem is gone
how can I achieve PersistentDataContainer's functionality for ItemStack for versions where it didn't exist yet?
so pre 1.14
NBT
NBT-API plugin
Or NMS
This is how some friend systems work. If you want the friend entry to be removed from both parties, then you’ll need the uuid for both players.
And the data for both of them so you can remove them from each others friend list
do i have to create a new scoreboard for teams ?
or i can use main scoreboard
idk
which should i use
doesnt really matter, but keep in mind that the main scoreboard is the one being used for all the scoreboard commands
Morning everybody, guys I need some help here, I'm trying to get an armorstand with a player passenger move but I was trying to teleport the armorstand without the player and then add the player as passenger again (Looks buggy) so I want to smooth it Idk how. Thanks
is there a reason you need that particular armorstand?
Hmm well I was planning to set a 3D model in it's head so it would look like the player is riding some custom vehicle or smth
that isn't what I meant
if you want it to be smooth, spawn a new armorstand at the teleport location, dismount the player, teleport player, mount them back on armorstand already waiting, remove the old armorstand
That's what I said I did
Looks buggy
The point is, if I did that, player camera would be changing when teleported
Like if someone moved ur mouse or smth
you can change their yaw and pitch
Now my question is, if I keep removing the last stand, wouldn't it look weird when my 3d model dissapears right behind and then appears in front?
I mean I've seen some plugins that use this same thing and look so good, the stand moves towards the players looking direction and that
Not sure if they do it with an armostand tho but that's what came to my head
not sure what you mean, but in regards to removing the last stand you would do it after they have teleported
so it appears as though the stand instantly teleported since their vehicle will be there already since you made a copy of it and spawned a new one there before they even teleported
?ban @scarlet osprey ban evasion
Done. That felt good.
great now it looks like i was talking to myself :p
I ended up using a minecart and seems to work fine now since a minecart is mountable
?paste
test:
player-list:
9226563f-1b48-38e4-b2d1-b4b400e0b646:
playername: _SinHa_
player-uuid: 9226563f-1b48-38e4-b2d1-b4b400e0b646
_SinHa_:
player-list:
530fa97a-357f-3c19-94d3-0c5c65c18fe8:
playername: test
player-uuid: 530fa97a-357f-3c19-94d3-0c5c65c18fe8
when i deleted SinHa in my friend list.
test:
player-list: {}
_SinHa_:
player-list:
530fa97a-357f-3c19-94d3-0c5c65c18fe8:
playername: test
player-uuid: 530fa97a-357f-3c19-94d3-0c5c65c18fe8
RemoveCommand
https://paste.md-5.net/saxagiwode.js
FriendsDataManager
https://paste.md-5.net/qogaxinute.cs
When I remove a player from my friends list, if the removed player is offline, only my name is not removed from their friends list, and it still appears in the "friends.yml" file; the offline player's list isn't updated, and I'm struggling to find a solution for this issue.
When I remove a player from my friends list while they are online
everything works correctly, and the player is removed from both friends' lists However
if the player is offline when I remove them
they are only removed from my list
but not from the offline player's list in the "friends.yml" file
Hi, could someone please recommend some particle effect libraries for plugin development? I am making plugin for MC 1.21 and having trouble finding any.
Spigot api and basic trigonometry is enough
^
Hello does anyone know how I can maintain playertime without it resetting when I change worlds?
play time is per world
Use a database
just forEach all worlds and add up play time
does it save under the %playertime% placeholder?
I am trying to get the play time from papi
the placeholder is this: %playertime_time%
This is essentially the integrated time not that of a plugin
it doesn;t sound like you are writing a plugin then
im not writing a plugin just trying to get the playertime to work correctly through the config files of the server
im using essentials for the playertime rn
You need to ask in #help-server
it does, specially in APIs
🤨
how do i get access to the netty instance running on the server ?
anyone know?
before anyone says why would u need that blah blah balh i need it so if anyone knows how please tell me if not dont matter
Nms maybe
maybe its a pain tho i ws hoping in spigot there may just be a method to get access to it
and thta i coudlnt find it
Spigot is a bad api keep ur expectations low
Oh and btw I haven't use spigot in a while either
🤒🤒
rip i rlly need this functionailty my entirer plugin is based of it and as moth forks use spigot i was hopign they carry the same method over
anyone else iw ill stay active for a bit see if i can get somoen with high experience/knowledge
fr ferrumc better 🙏
i prefer the fork of the fork of the fork of the fork of the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the forkof the fork called ForkMC
of bukit

I fr got insulted
😔
NO lmao i ment liek a dev of spigot somoen who knows it inside out
Frfr no cap
What u think of new Readme? Looks good imo
Just need a add more shit to the server itself
U should totally contribute to ferrumc
@iron rivet https://github.com/Strikeless/MCBootstrapHook
wrong discord
id love to once i have the time
All g, I have not much experience with spigot anyways
send link again
what wrong with serilization
?
i saw that but i couldnt find the maven dependency
nothing?
People have beef with serialization in spigot server
i getting air
oh itys in jitpack
YAYAYYAYAYAYAAYAYAYAYAYAYAYAYAYAYAAY
FINALLY I CAN FINISH MY PLUGIN
SKIBIDYTOILET
mb
wth man
bro i have been trying to find out this for like a month
1 because i am dumb
2becasdue i am blind
3 because i am gay
that wa snot homophobia mods i acc am gay
looking great
cool
@blazing ocean this guys copying you
nuke his house
fr
there aint room for 2 gays here
Tyty
bet
why does the irl night sky look like someone just ran a noise function
chat is my brain cooked
true
its literally just black concrete poweder its funny
why is everything final?
its the finale
there is 0 documnetantion ith this library ;-;
i have to read'
brehbrehbrehbrehbrehbrehbrehbrehbreh
vanilla:
deprecates an enum used in 32 classes with no deprecation message or alternative
vanilla is so goofy i wonder what niotch was on when he first made it and what all thje microsoft devs are on when coding this game
real
when microsof t bought it they should hasve just rebuilt it from the ground up better
bedrock:
"PvP"
just use optimisation mods
use something like adrenaline, great modpack
Your monitor wont display all that
to get 2k consitentl but it aitn enough
💀
The human eye really can’t tell a difference past about 150
ik i have it locked at 1440 hz
no
144hz at 1440 fps
1440???
what kinda monitor does bro have
not how it works
next gen samvida monitor
144hz = only shows 144fps
If your monitor 144hertz it will show you 144fps.
but the game does not hitch
i am aware
of how montior frequencies work
however ideally u should run ur fps double ur monitor refresh rate
for the smoothest gamplay (if ur pc can handle it)
or just use vsync 🗿
EWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
VSYNC
aint no way
that increases ur
are you even aware of what it does
🗿
:skullislandEmoji:

BRO THIS LIBRARY IS ONLY TESTED ON 1.13 AS ITS HIGHEST VERSION
U LIL SKIBIDY TOILET
istg imkma steal the source of github and update it
steal the source of github
gg buddy
it was a joke ;-;.
github lawyers:
wait what is the apahce 2 lisence
i havent used it before
oh i can edit it gg
i think
do i need to hier a lawyer brehb
yews i can edit it gg
bruh i have to edit an entiter plugin just so my plugin will work :>(
just copy its code
and paste it within my own plugin?
and th en edit to work
ik i can within the lisence but it doent seem okay yk
Nobody?
i dont know but if your recievign this error then it is likely the case
Can you change the max stack of potions without NMS?
in 1.21+ yes
What about 1.20.4
How do i get all items of double chests in an area? I am worried that the entries get duplicated
how do i set persistent entity on spigot 1.8?
i think u need nms
nms
you must inject NBTTagCompound
Like this?
net.minecraft.server.v1_8_R3.Entity nmsEntity = ((CraftEnderCrystal) enderCrystal).getHandle();
NBTTagCompound tag = new NBTTagCompound();
nmsEntity.c(tag);
tag.setByte("PersistenceRequired", (byte) 1);
nmsEntity.f(tag);
}```
depends on if this is a custom tag only you will use?
yes
well yeah something like that, but please check what these obfuscated functions (c and f) actually do in code before using them for granted!
based on the video you provided I cannot seem to find the connection between your video and your question
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/LivingEntity.html#setRemoveWhenFarAway(boolean) does the same thing and exists since before 1.8
declaration: package: org.bukkit.entity, interface: LivingEntity
how could i store player data through restart,quit,etc
would i have to make a file for it
yamlconfiguration; persistentdatacontainer; database - take your pick
thanks
or be insane and make your own system
not like anyone would actually do that though 😅...
Any tip for this?
its not a living entity, its an ender crystal
for (chunk : nearbyChunks) for (tile : getTileEntities) if (chest) // check if double, get items
what do you mean by persistent entity then
Wont it get the same doublechest twice?
I mean there are 2 tiles double chests no?
well just get the half inventory corresponding to that half of the chest
are you trying to store some nbt data to the item to then retreive it by yourself or actually getting custom behaviour out?
declaration: package: org.bukkit.block, interface: Chest
I hope i remember incorrectly but i remember in the past one block had all the items of a double check and the other it had a reference to the main chest
Why do you want ALL double chests in a chunk? It may be better to only get specific ones when you need them
Unless it got changed
Will need to test regardless
getInventory vs getBlockInventory, see above
I want to prevent the ender crystal to disappear if the chunk unloads
wdym disappear, dont they come back when the chunk reloads?
i dont think so
because its an important entity and needs to stay on the world always
this doesn't make sense
I want to have the guarantee that the entity will always be in the location I spawned
the crytal shouldn't normally disappear when you unload it (and reload it)
Hi
Is someone good aat math?
i have this problem
In server-side, player has X health (40 for example), and i'm showing in client-side 20 hearts,
I have to make an operation to calculate how much health i have to give in the sendHealth packet
Anyone knows how?
There’s the health scaling api
But idk how well it behaves
Anyway you just calculate the ratio
If the player has 35/40 health that’s 35/40 or 0.875
Anyone know what could be causing this? I'm very confused
This is the code that is run
event.isCancelled = true
if (event.message == escapeSequence) {
forceEnd()
} else {
onAnswer.invoke(event.message.replace("/", ""))
timeoutTask?.cancel()
}```
```kotlin
fun forceEnd() {
timeoutTask?.cancel()
onExit.invoke()
}```
Take 20 * 0.875 and you get 17.5
Afaik you can set scaled health via Player#setScaledHealth
thx everyone
welp cancelling this event has been broken 😭 can't exactly fix this for any version under 1.21.1 but might as well salvage what I can
Okay this got me a little stumped. Works fine in 1.20.6 but silently fails in 1.21
Plugin is pretty simple
public class EventHandler implements Listener {
public Map<Material, Material> itemMap = new HashMap<Material, Material>();
public EventHandler(){
itemMap.put(Material.NETHERITE_HELMET, Material.DIAMOND_HELMET);
itemMap.put(Material.NETHERITE_CHESTPLATE, Material.DIAMOND_CHESTPLATE);
itemMap.put(Material.NETHERITE_LEGGINGS, Material.DIAMOND_LEGGINGS);
// ... etc
}
@org.bukkit.event.EventHandler(ignoreCancelled = true)
public void onPlayerItemMend(PlayerItemMendEvent event) {
// Make mending not work on netherite
if(itemMap.get(event.getItem().getType()) != null){
event.setCancelled(true);
}
}
@org.bukkit.event.EventHandler(ignoreCancelled = true)
public void onPlayerItemBreak(PlayerItemBreakEvent event) {
ItemStack item = event.getBrokenItem();
Material type = item.getType();
if(itemMap.get(type) != null){
item.setAmount(2); //Set amount to 2 so the break event still goes trough but we're not left with 0 items.
item.setType(itemMap.get(type));
}
}
}```
the PlayerItemMendEvent does get fired and handled correctly, but the PlayerItemBreakEvent never gets fired when server is 1.21 (but it does on 1.20!)
How can i fix this gltitch when he buried into the block?
https://imgur.com/a/vXhMhAd
?jira
?whereami
Hi, im trying to use protocolLib to detect a left and right click on a nms npc does anyone know how to get the data on whether it is a left or right click directly from the packet itself?
edit : figured it out
public void onPacketReceiving(PacketEvent event) {
PacketContainer packet = event.getPacket();
PluginPrint.println(packet.getEnumEntityUseActions().read(0).getAction().name());
}
packet.getEnumEntityUseActions().read(0).getAction().name() should return you ATTACK, INTERACT, or INTERACT_AT in string form.
yessir
I'm still using paper
o shit mb i accidentally pinged u
How did you accidentally ping that old message? XD
no i meant to just to turn ping off
I am having an issue compiling my plugin. com.jeff_media:CustomBlockData:jar:2.2.0 was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigotmc-repo has elapsed or updates are forced
I am not sure why it is looking for CustomBlockData in the spigotmc repo since I included Jeff's repo in my pom. <repository> <id>jeff-media-public</id> <url>https://hub.jeff-media.com/nexus/repository/jeff-media-public/</url> </repository>