#help-development
1 messages · Page 1254 of 1
is there any event detect when player is charging for horse jump event ?
PlayerInputEvent probs
hey how to create npc on netty packets?
I'm working on a bot detection system for my Minecraft server using Machine Learning (ML) and Deep Learning (DL). The goal is to analyze player behavior in real-time to identify suspicious activities like automated movements or clicks that indicate bot behavior.
- Running ML/DL inference directly on the Minecraft server can negatively impact performance, especially during high traffic or bot attacks.
- I'm considering using asynchronous operations to offload computations and prevent blocking the main thread, but I’m not sure if it will be scalable or effective under heavy load.
What is the impact of running ML/DL models in real-time on a Minecraft server? Are there specific considerations for minimizing latency and maintaining server responsiveness? Is using asynchronous operations enough to prevent performance degradation during inference, or are there other techniques (like parallel processing or batching) that can help? Would offloading inference to an external server or cloud be a better solution for scaling this system?
Thanks in advance!
works entirely the same in the context of minecraft as it does with anything else
you definitely don't want to run your inference on the main thread, that much is obvious; but other techniques or doing things asynchronously aren't any different from any other, minecraft-unrelated, use case
entirely depends on the hardware available and the size of your model
try it and see basically
machine learning for bot detection sounds like a terrible idea, you'd have better luck just making a plugin which detects certain heuristics that are common to bots
it's been done before, iirc it was matrix or something that did it
it's actually amazingly accurate, I did it once, I fed it like ~2 minutes of movement and it has some 70% accuracy lol
it was completely unusable and allowed people to killaura one another through walls
on your limited tests, sure
10/10 force pushed straight to prod
but in practice, it sucks balls
detecting good kill aura is hard no matter the technique, so I can understand that but bot detection? I don't think that's ever been a problem in minecraft servers
at most you'd have players using that one mod that automates building, but that's mostly a non-issue
what is with all the different distributions
I know the with JCEF one that embeds chromium, don't know what fastdebug for it means though
then there's JBR FreeType, which last I knew is just a font renderer?
kekw
JBR is also required for a custom window bar for jewel, so who knows
I don't think this is ideal is it
so much for handling the exception kek
I love stackoverflows!
if all your exceptions are meant to be rethrown for some reason, go ahead
many programs do that out of convenience, I am unsure of the benefit there though
in my tick loops and everything for game instances I have try/catches for GameInstanceException s which stop the instance immediately
I should probably just use the same logic in there
as long as your engine doesn't depend on exceptions to be stopped, that sounds fine to me
apparently fastdebug is just a flag when compiling the JVM for triggering asserts while keeping all optimizations as well as debug symbols
but unless you're looking at JVM bugs, that's just not necessary, so I guess that answers my question
does this look good
apart from the language
idk I'm not really a kotlin person
what in the generics is that
also why do you not have a game to make for your own library
make bedwars
hmm sure
I just have zero creative ideas tbh
or recreate yesterdays update
this?
well im not saying you gotta make all the menus exactly the same
just make an approximation
maybe
idk just giving ideas
I think I'll go with bedwars for now
yeah
just need to make an actual schematic API now-
hey, Can you help me to resolve my problem?
When i dont send a Packet my Scoreboard appear but if i send a packet my Scorebord disappears... idk why
I want set a Texture/icon on my Scoreboard with my ressourcePack
public class ScoreboardTest implements Listener {
private final ProtocolManager protocolManager;
public ScoreboardTest(ProtocolManager protocolManager) {
this.protocolManager = protocolManager;
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
createBasicScoreboard(player);
sendCustomTextPacket(player);
}
private void createBasicScoreboard(Player player) {
ScoreboardManager manager = Bukkit.getScoreboardManager();
Scoreboard board = manager.getNewScoreboard();
Objective objective = board.registerNewObjective("Test", Criteria.DUMMY, ChatColor.RED + "Test");
objective.setDisplaySlot(DisplaySlot.SIDEBAR);
TextComponent textComponent = new TextComponent();
textComponent.setText("\u0037");
textComponent.setFont("customfont:images");
String jsonMessage = ComponentSerializer.toString(textComponent);
objective.getScore("Test0").setScore(0);
objective.getScore("Test1").setScore(1);
objective.getScore("Test2" + jsonMessage).setScore(2);
player.setScoreboard(board);
}
private void sendCustomTextPacket(Player player) {
PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.SCOREBOARD_OBJECTIVE);
packet.getStrings().write(0, "Test");
packet.getChatComponents().write(0,WrappedChatComponent.fromJson({\"text\":\"\u0037\",\"font\":\"customfont:images\"}"));
try {
protocolManager.sendServerPacket(player, packet);
} catch (Exception e) {
e.printStackTrace();
}
}
}
yeah thats p much a given for any minigame framework
?paste please
or, you know, just depend on world edit to do it for you
I'll be using FAWE for it yea
I haven't played bedwars in years this is gonna be annoying
the concept is pretty simple
i know you arent creative (since those are your own words) but you dont have to carbon copy bedwars xD
just make something up as you go
I mean, all there is to bedwars is 3 type of generators, a base which you have to protect, an item shop and an upgades one, in essence
everything else is up for interpretation
wait what, abstract events don't need handler lists do they
Error while registering listener for event type class net.radsteve.axi.game.instance.event.GameInstanceInitializeEvent: org.bukkit.plugin.IllegalPluginAccessException: Unable to find handler list for event net.radsteve.axi.game.instance.event.GameInstanceEvent. Static getHandlerList method required!
public abstract class GameInstanceEvent<T : GameInstance<T>>(
/** The associated game instance. */
public open val instance: GameInstance<T>,
) : Event()
public class GameInstanceInitializeEvent<T : GameInstance<T>>(
instance: GameInstance<T>,
) : GameInstanceEvent<T>(instance) {
override fun getHandlers(): HandlerList {
return HANDLER_LIST
}
public companion object {
@JvmStatic
private val HANDLER_LIST: HandlerList = HandlerList()
@JvmStatic
internal fun getHandlerList(): HandlerList = HANDLER_LIST
}
}
wonder if it is because it is marked as internal
lol
How do anti cheats detect hacks like baritone? Macro type
Big changes of yaw or something like that?
what is baritone and macro type in this context
Like mods that keep farming for you or follow a pathfind
well, that kind of mod is easily detectable if they do things like you mentioned
what if I can just do huge turns of my mouse really precisely
then sorry not sorry, gotta send an email to server owner with video proof of your amazing minecraft turning abilities
Usually timing between input
@john hypixel
jokes aside, ideally you'd have more than a single heuristic to detect the hack
Im sure theres many small things they check
I don't think anyone here has built an anticheat recently but in essence it is all they do, build heuristics which closely check player behavior for anything in the extremes
your best bet is trying out the hacks for yourself and checking what are obvious tells of its behavior, and check if they're detectable from the server side
But that could be bypassed if the hack is pressing w
What’s an heuristic check?
Hey that's me there
it is!
**@**jvmstatic moment
imagine I pasted that without a codeblock
haha
Their reaction was also something like "wtf why did that ping someone" lmao
I wouldn’t be sure if they could be capable of identifying a hack just by yaw turns if the way there are going forward is by pressing w
Unless heuristic is something amazing I don’t know
there was a guy named eventhandler or something here at one point
looks like he's finally realized to change his username
Lol
loosely defined rules around a behavior, i.e. checking for extreme yaw turns is a type of heuristic
you'd pile up these heuristics until they reasonably detect the behavior in question reliably, notwithstanding the false positives
I see
So it depends on the previous user behaviour to know if they are cheating or is it in general?
Hello quick question trying to learn NMS and using ProtocolLib for 1.21.1 to open a window. Im trying this packet.getModifier().write(1, MenuType.GENERIC_9X3); but it throws Cannot cast org.bukkit.craftbukkit.v1_21_R1.inventory.CraftMenuType to net.minecraft.world.inventory.Containers if i try MenuType from net.minecraft.world.inventory.MenuType i get a java.lang.ClassNotFoundException: net.minecraft.world.inventory.MenuType Is there someone that could point me in the right direction? thank you
is there a particular reason you're trying to open an inventory through packets?
Nope just attempting to learn honestly but i want to work it out im just confused
MenuType is a pretty recent API addition, probably not what ProtocolLib is looking for
if you want to know what kind of elements a packet wants, your best bet is listening to the packet in question and printing all the relevant information
that and also checking the minecraft wiki for documentation on the protocol
public MenuType getType() { return this.type; }
Yeah
But seems like a task I can’t do lol
ProtocolLib probably has a wrapper for it instead of having to depend on NMS
Eventually you will realise someone else has done the same thing 10x better lol
Yeah wouldnt be surprised
Fr fr
More Protocol Lib bullshit
I mean, anticheats aren't a particularly hard task, just very tedious as you have to spend a lot of time refining the heuristics, and making sure the restrictions it imposes don't negatively affect the experience for your players
ncp forever
something most of the free ones get wrong is not taking latency into consideration so it ends up being shitty for anyone with more than 150ms of latency
It is when you have to keep updating it every few weeks
*if you want to stay on top of cheaters
Still fun to learn though
expiration date is null
how do i fix it
check if it's null before using it
?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! 🎉
if i didnt learn java i wouldnt have this plugin
like literally
You're asking how to make an if statement to check if somethings null
i know how to do it
Then why are you asking how
but idk what to place before the = sign
you would because you were spoonfed half of it
what is thing
the thing you want to do
I'll do it for 50
that too
i know where the issue is
you are passing null to the format method
check that the thing you pass is not null before passing it
Is it possible to send players to another server (on the same network/proxy) from spigot?
would the Player#transfer method achieve the same thing or is that not supported by bungeecord
also, are cookies passed around properly when using plugin messages to transfer?
ig since it is stored in the client it should
Would sort of defeat the purpose of bungee
lol
Ok
depends whether bungee uses the transfer packet or uses the traditional approach
i assume when it uses the traditional approach it doesnt pass cookies+
cookies are retained until the client goes back to the server list screen, basically
a player connected to a bungee proxy is always connected to the "same server" and so will retain cookies set, no matter which backend they get forwarded to by the proxy
transfer packets are different in that they count as a different session (e.g. will fire handshaking/auth logic again) but connections triggered by a transfer packet are treated specially by the client in that cookies are retained
Thank you
not necessarily, bungee still provides proxy-level plugins and API which one may want for cross-server communication
none of which you can really use if you transfer the player off the bungeecord proxy onto some other server
all of that communication relies on the player being connected to the target server through bungee; the data piggybacks on the player's own connection between the proxy and the backend
I'm having some trouble with config files. When I initially create my config file, it has all these headings:
'Prophecy Texts:
Crimson Comet Start Location:
Crimson Comet End Location:
Crimson Comet Start Time:
Crimson Comet End Time:
Sunlight Splash Ticks: 50
Moonlight Splash Ticks: 50
Crimson Comet Regen Ticks: 120
Voidlight Wither Ticks: 70
Darklight Blindness Ticks: 70
Sunlight Lore:
Moonlight Lore:
Crimson Lore:
Voidlight Lore:
Darklight Lore:
Undersunlight Lore:'
However, after I run the following code:
List<String> prophecies = this.getConfig().getStringList("Prophecy Texts");
prophecies.removeIf(t -> Long.parseLong(t.split(" ")[0]) < System.currentTimeMillis());
this.getConfig().set("Prophecy Texts", prophecies);
this.saveConfig();
The file becomes
'Prophecy Texts: []'
losing all the other headings. How can I fix this?
I assume it's something saveconfig related
but idk
If I save a bit of text into the config file, the text gets overwritten, is that normal behavior for saveconfig!?
@ancient plank
I wonder if the empty values get parsed to 0
I haven't used spigot's built in yamlconfig stuff in a while
well no, because even the values with numbers get deleted @young knoll
i could recheck and reset all the config values but i feel like that is nuts
that's just an aeso moment
empty values get parsed as null which are then removed all together
not entirely true
If they're all config sections set them to {} ad a default value
If it's a list []
Well all those values with numbers are certainly less than currentTimeMills
seems the problem has been identified
right
have fun with that
yaml is not new
neither are we
but hey if you know the problem not sure why you came here 🙂
so what file is better
file?
format
depends on your needs, what is easier for you, and preference
in regards to plugins, any format just about will do
xml, ini, yaml, toml, hcl
doesn't matter really what you choose, except maybe who ever uses your plugin I suppose
right so for those who want the real answer, you can just set copydefaultvalues to true in the config options, to avoid the nulling you do need to add a placeholder
and how does this contradict that using empty values is treated as null and thus removed?
it was specified earlier to use a default value as well
and then for the values set, well you ended up in the end setting it to empty values
since in the beginning you obtained empty values
anyways, not sure why you are here asking for help in the end though if you know what is wrong all along
is there a way to create void worlds faster? I'm currently using WorldCreator with void generator and it's pretty slow for generating minigame arenas tbh
it takes a few seconds and the server lags
or should i just use a void world template instead
and copy and paste it
keeping a void world and just copypasting it is probably better though, that way you don't have to worry about generation
would i have to recreate a new void world for each version
hmm
i could have something where it creates it for each new server version in a folder
and just uses that as a template to copy and paste
but is keep spawn in memory false + fixed spawn location fast enough?
going to test right now
wish i could do it async because its an io operation
i mean
i feel like some amount of fuckery could be done
biggest issue is that there might be some async catcher sitting deep down in the implementation (speculative) else fuckery would be allowed
looking for a plugin developer(willing to pay)
Dm me
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
no. to make a me a plugin for an smp i created, not a too complicated one but i need a developer.
yes. "request or offer" and you're requesting
go to that link
ok
player.setOp(true)
// Do something
player.setOp(false)
Is this really dangerous, or is it just a myth? If it is dangerous, has there ever been any proof of concept for the potential exploit?
Yeah that can be a bit dangerous
but sometimes you don't really have a choice
put that set op false in a try finally
to make sure it always runs
Literally everyone agrees on that but i am yet to see any poc
If that really exploitable, if would been a disater already. I saw many wide-used plugins still doing that and nothing ever happened
Assuming the "do something" part never fails.
Which it can
The only thing that may happen is the host machine blacked out before player.setOp(false) is executed.
depends on what //Do something is
at times, if u know every line of //Do something, it may be harmless to the greater degree of things
why do you need a proof of concept for something that is self explanatory
do you need a proof of concept of using the command op in how a person you op has the ability to do just about anything they want?
You're right! I made a poor choice of words. What I actually want to know is whether this thing can be exploited directly by attackers, without taking random events into account (such as unexpected crashes or blackouts).
a hacker can really just wait for a crash
tbh
that's not a problem. server can be configured to terminate itself on crash.
in terms of programming code, an attacker would only be able to make use of code if you allowed unvetted jars to be loaded
and clean up op list on server start
what are unvetted jars
otherwise their only alternative is to somehow be allowed to use the command to op or to spoof uuid (only happens on offline mode)
jars you didn't bother checking if they are malicious or not or simply unaware if it was designed poorly
given permission plugins exist you shouldn't use op lists at all
not even for yourself
This
yes
But the truth is it's unlikely that we are skilled enough to make everything
making use of permissions instead allows you to reduce the amount of damage someone could do and forces them to have to take over your account to make it possible if we are not factoring offline mode
For now I just write a plugin that check all command events
Even op can't execute commands unless they somehow gained access to my username and masked my ip
except you are managing a list of ops. Someone opped can op other people and bypasses basically all checks
online mode is indeed harder but not impossible
how can they bypass the checks if they are hardcoded?
because you are not controlling the server
the plugin literally change the command behavior
at least not directly
they can't change that
except you are ignoring the jar route 😉
jars can override what you have done unless you changed the server code itself
anyways, its your server if you don't care about the dangers I see it pointless to be asking about it
it seriously depends on what Do something really is, generally speaking player connections are ticked and packets are processed at the beginning of a tick loop, but there are times during a server tick where packets can be processed too; if your //Do something happens to trigger some code that lets the server process packets mid tick-loop, the player's packets will be processed while the player is op, meaning they can do anything as they are op; but again, it really depends on what the "Do something" actually does
it's definitely possible
executeMidTickTasks comes to mind, iirc triggered by sync chunk unloads, not sure if it processes packets though
while possible as in anything is possible, the probability of it actually happening is extremely low. Reason people don't bet on it is because permissions exist
in practice though i think this should be mostly safe as long as you remember to de-op in a finally block, at least i don't remember ever hearing of anything going wrong with this despite this being a fairly common thing to do
it just comes down to principle, like using the same password on every site
sure, it works and you'll probably never get hacked, until it does happen
password1234
if you really want to make it watertight, you could add in a pre command process listener that permits only and exactly the expected command through
i doubt anyone really does this though
I have an economy plugin and i want to use the same database across two servers. Should i introduce a slight delay before loading the player's economy data from the database when they connect, in order to prevent fetching outdated values if the data hasn't been saved yet when the player disconnected? I'm saving the data in an async task when the player disconnects, that's why I'm asking if I need to add a small delay before loading the data. I imagine this could cause issues if the player disconnects from server A and connects to server B quickly.
yes you will need to wait for fresh data
cross server transfers are very fast (bungee)
is 5L is enough ?
it will vary
There is no way to know how long it will take as there are too many variables
Ok so i need to try and see
is there a better way that i didn't know instead of putting delay before fetching the data ?
whatever database scheme supports locking columns
redis is a good way for synchronization/communication as well
So using redis to cache the player economy and save it into mysql every X time. And when a player connect if he is not in the redis i fetch the mysql data to add him ?
i personally dislike redis as a key-value store, it seems awfully underbaked for it
i mostly use it just for pubsub messaging
Oh yeah i can just stay with mysql and just use pubsub to send the player econnomy stored in my K V Map from server A to the K V Map from server B right ?
that works, or you can use the pubsub messaging as a "cache synchronization" system much like in processors; "i need this data" -> server owning the data pushes the data to main memory (mysql) -> sends "data is up to date" -> server(s) needing the data fetch it
or you can instead of saving it to the main storage send it via a pubsub message as you described too, that works as well
I'm not very familiar with redis yet so I'll try this
This seems the simplest to me.
should work
just need to be wary of races where the client gets tossed around multiple servers faster than the redis messages can keep up
e.g. you might have a player going from servers A -> B -> C, and B ends up sending the kv map to C before it gets the real kv map from A, and you end up with bogus data
a way that doesn't require messaging at all and is maybe the most robust is to have an extra column in your data for exclusive lock; as long as the row is held by another server, other servers will consider the row stale; and a server first has to atomically mark itself as the row's exclusive owner before loading it into the cache
this has problems with server crashes where the server holding the lock never releases it; throw timestamps at it to recover
or use redis, or use database synchronization primitives, or 🤡 well, fuck around with it, synchronizing a cache reliably and effectively across multiple machines is far from trivial
ohh I hadn't thought of that im gonna try this so but i didn't realy good understand how this should work
When a player disconnects from Server A, i save their data to MySQL asynchronously After that, Server A send a signal to the other servers that the data is updated like an update notification (Pub/sub) with the data saved. Server B receive the message and use the data send by server A ?
yes, that's probably the simplest way of doing it
So in the end it comes down to the same as putting a delay before fetching the data, but in this case with redis I know exactly when the data has finished saving so i don't need to worry about putting 5L delay or 15L or 20L
pretty much yes
okay i think i got it
though with messaging there's always the consideration of messages not getting sent or getting lost on the network
so you'll want to pair that with a wait still, maybe 30 seconds
my redis server is on the same host of the server so that fine ?
so if you don't get a "data is saved" message by then you assume the server responsible for it died or something broke somewhere and just load whatever is in the database
well... the server the player comes from might crash before it's done saving
don't want to permanently deadlock the player if that happens
I got it thank u very much ! will try that right now
late to the party but if the player disconnect, just having an expiring cache would solve that
But server B didn't have the same cache actualy im not sharing the cache from server A / B each server have the plugin installed with their own cache I don't really understand how a expiring cache would solve that? That mean that i need to have the same cache for both server
ah I misunderstood the problem, you were having issues synchronizing the data while transfering players, I was thinking reconnection
if that's the case, yeah then Redis is usually the choice people use for that scenario
though distributed caches are a pain in the ass in their own merit, it's the easiest choice
it's either that or having a shared database, which for each one of those, a systems engineer cries in the morning
and what about only use redis as database since redis have persistence also. I can store all data in redis and when the player go in server B since there are using the same redis i don't need to worry about synchronizing
make a saving interval, check if server is lagging or is about to be restarted/crashed, save on user logout, load on user join, make sure your tables are setup and you have a decent password/user and running internally :D
also you might wanna take a look at this https://www.spigotmc.org/resources/rediseconomy⚡-unlimited-currencies-cross-server-open-source.105965/
(don’t skid just view and read to understand, then try to make your own version :))
this plugin use pubsub systeme like we say above
it could work, as long as the write speed is an IO/engine issue rather than a network one
if it is a network one, you're pretty much in the same place whether you use redis or mysql
i don't think that we will have network issue since everything is on same network
ah, you're hosting the database on the same machine as the servers?
yep
if that's the case, I don't see how mysql could be so slow as to not receive the write before the player switches servers, have you measured your write speeds?
process to process communication isn't instant either but it's considerably faster than network io
if this was for high frequency lookups like permission checks it'd probably be unacceptable, but economy which is probably called at most once or twice a tick is fine
i didn't have issue at this time i was just asking if i need to add a delay before fetch data if player leave server A to go on server B
I'd assume they containerized everything so not quite process to process but yeah
same thing under the hood if it's on the same physical machine
when it goes out the socket that's when you see higher delays
yeah but the abstractions also can hurt quite a bit unless you have setup it in a way that's a non-issue
you should add a loading delay
and don’t allow users to use the economy while in that loading period/state
I'd measure your database write/read speed, if it is fast enough that it takes less than a player transfer, then I wouldn't even worry about adding delays
and shared memory is probably out of the window, though i don't think plugins/redis would do that anyway
if it isn't fast enough, then you can probably play a little with the mysql settings in order to make it fast enough
yeap so little delay or just use redis as pub/sub
both are fine imo
delays are a bit of a bandaid since there's no guarantee that disk io or whatever won't randomly be saturated because of some automatic backup or god knows what else at the exact time of transfer
I mean, if you wan to go the RDB route, that's fine too, just annoying as you'd have to migrate your data as well as your current code
if disk io is the issue, just configure the database to do less IO 😛
the approach of sending a "i'm done saving the data" plugin/pubsub message from the server the player is transferring from, and then waiting for either that or a 10-30 second timeout on the receiving server, is probably the easiest solution
waiting as in blocking in the async player prelogin event
it also depends on how critical the data, and how you want to tackle issues such as crash of the server or even of the whole instance
if you can't afford to lose the data, then not writing to disk isn't much of an option
the most easy if just add a delay before fetch but this is not the optimal solution i think so the second most easy solution is that one yeah
it'll get written to disk anyhow, the messaging is just to make sure we don't expect the write to conform to some magic timespan we pull out of the hat
because one day it won't and then someone loses their money
mm yes
Ooor you can use a microservice and have everything go through that
hm u lost me lol
is that not the same solution of @thorn isle
No because we don't wait as much
Instead of waiting for the save to go through we tell in advance what we're saving with a lower latency
we're not really interested in when the saving starts but when it's done
eh.. why
to make sure we don't load stale data
we wouldn't be loading stale data
if you load before saving you won't get the saved data, yes?
we write to a low latency cache before writing to high latency persistent storage
we default to reading from that low latency cache before persistence
make a send and receive channel for ur data, if you want to add extra verification make it send that data and receive then if the player is already connected on a different pub after switching servers with the old values instead of the new ones, make a state where the player is not able to use the economy then update them then change states.
i really doubt a mysql transaction to save someone's economy balance is going to take more than 50ms
So i can send the data that is currently being saved to server B and use that data instead of send "data is finish save u can fetch it now" if i understand ?
not really worth throwing another cache in between
by low latency I mean like <3ms
(redis)
mysql takes as long as 1.5s to connect from my metrics
you'd presumably keep a persistent connection
or i can simply use redis for storing whole data with persistence also and use the same redis for both server 😂
there's no way
I haven't seen a transaction take more than a second in the same machine
you gotta pool connections
connecting from scratch can take a while for sure
I've had supabase take like 3s before 😭
supabase the service or supabase self-hosted?
cloud
well, that is understandable, there's no telling the environment in that scenario
yes put your economy data in the cloud
well that was for very different data
we're exclusively cloud hosted at "work"
and the connection wasn't even a bad one 😭
put your data in the cloud and let copilot vibe your sql queries
because planetscale ooooo reliability
my data is in a box in the basement
DROP ALL TABLES; lgtm running that on prod rn
planetscale so good, too bad they went paid-only
what even is planetscale I don't remember
you can have my box in the basement for 2/3rds of that
$40/month for fancy sql is crazy
so should i use only redis for saving all data with persistence and connect both server to same redis or use mysql -> redis as pubsub or use ecloud / copilot ?
autoscales
just set up kube
this is very much an engineering question that has no valid solution
MySQL on steroids
i still think a simple "data on remote is up to date" message on save and then blocking for that or a timeout on join is the simplest solution while being decently robust
redis persistence sounds good to me if you're fine with migrating your data
otherwise redis pubsub and mysql
ram sink
just make a microservice that has proper locking
and a local cache and whatever
the nice bit about this is that you can throw it on the lowest priority in the async prelogin listener and all of your database reads will read up to date data out of the box
they're hosting all on the same machine illusion
without any migrations or code changes or whatever
i can migrate all data on redis yeah
microservice isn't exclusively about latency
shut up non
microservice arch only works if it isn't hosted in the same place though
what about megaservices
what about cutie services
that's a me
no that's a me
I recommend AOF rather than RDB if you don't want to force your disk too much, at least while running the server
can i use this method for all my plugins and not only the economy plugin ? if one day i need sharding ?
i dont realy know if redis persistence good enough
honestly, you could use a sqlite database for a minecraft server and that'd get you far enough in most cases
yeab but im doing this because we are planing to shard the server and we don’t want to impact our players where they switch server
so i can’t use sqlite
if you are planning to shard the server, as long as you have a separate instance for redis, it should be fine
then again, I see no benefit in using something like redis instead of whatever sql database if it is gonna end up sharded tbh, but I haven't used redis that extensively to tell you for sure how well it scales in this scenario
from what I've heard, it does just fine, so ultimately it isn't a bad choice
you'll have to figure out things like doing microservices if latency ends up becoming an issue, but that's that
because we use the same machine for everything right ?
sql is good
since we are on the same machine sql should be fine also for sharding ?
SQL-based approach is the standard choice when it comes to the sharded scenario, since it gives you a lot of flexibility on how to query your data
the issue with redis would be the fact that it is just a KV, so there'd be no structure on the data other than the player <-> balance relationship or similar, you'd have to rethink how you save your data in order to have things like total server balance, as you can't just do SELECT * FROM economy_balance
in the case of balance itself, it isn't nowhere near as much of an issue as you'd mostly care about the player <-> balance relationship, which is in fact just a KV, so a column-row approach provides little benefit, but when it comes to different type of data where you want to have more than a singular relationship, it starts becoming less than ideal, if anything
you'd also have to account for the fact that redis puts everything on memory, meaning the larger your server gets, the more memory it'll hog from your instance, mainly why people only prefer it as a distributed cache rather than their main storage
there's also completely different, middle-ground choices like mongodb but I don't have as much to say in that area as I don't actively play with those
(it's web scale)
it all depends on your access patterns
if you need multiple servers doing low-latency writes (like say doing shop sign transactions on the main thread) there basically is no winning move and you're just fucked and need to redesign your system
if there's only one low latency writer (presumably the server the player is on) that is doable
if other servers need to also read that data and maybe do atomic transactions on it, you need to get into muh cache coherency bullshit
if other servers only need to read relatively up to date data, like say /bal on a player on another server, that's doable without anything complicated
ok but you can also make a data where you just store all the plus and minus transactions if you want to know the total economy on your server no ?
im not a dev btw
just following this topic
that's called a ledger and yes that's a valid technique
yes, but then you'd basically be making a table out of KVs, which is as said less than ideal
but the issue with a ledger is that you typically want to modify it atomically which is a no-no for a remote db + main thread access because you will end up blocking
actually i just realized that i'm still teleporting the player right after the world created so its no use either way... should i use paperlib and use teleportAsync?
paperlib's teleportAsync just delegates to normal teleport on spigot as far I am aware
if there's a fixed spawn point, it shouldn't lag as much tho? Have you tried it?
but the memory impact when you just store player + how much economy he has in his balance his not even noticeable no ?
do you mean ram when you say memory ?
fast, but for some reason on my production server its slow
if you use it in place of a database, that means the economy of all players will be in memory at all times
probably because of worldguard, multiverse, and other plugins combined i feel...
and that data set is unbounded and potentially thousands of players
i dont know tho
they were considering using redis for all player data in some part of the conversation, which I imagine would be the case if they completely replace their mysql database. In that scenario it'd get ugly real fast
and when you add to it something more complicated than just a number, it gets out of hand real fast
and yes, I do mean ram when saying memory
e.g. imagine storing the inventory contents of 10,000 players in memory
im gonna stick with sql for everything
yes but like, how much informations do you need to potentially saturate even 2gigs of ram ?
because i use lot of relational query like query all generator from generator table attached to a player
unless you have 10k players
players accumulate over the years
even a server with 20 concurrent players tops can easily have 10,000 historical players
if you only need the data for 3 months and reset everyone each 3 months
that entirely depends on the data, a single itemstack can be as high as 8mb compressed (a shulker box ful of written books, but yeah)
less than you might expect
not talking about items, just economy..
for economy alone, you probably won't hit any sort of measurable memory footprint until a few thousand players
if it is just economy, you'd probably not have to worry about it too much, it's just integers and player uuids
i know because i ran pex (which stores all permissions in a big bukkit yamlconfig) with ~10,000 players
now the maxbans name trie for the same number of users... that's almost a gigabyte
muh fucking 20-fold nested Map<Character, Map<Character, ...>> maps
even for a server that reset every 3 month using redis for everything for sharding is not good i think
for only economy yeah but sharding mean also inventory, location, etc
as an aside, if you're "sharding" on a single machine, maybe look into folia
that's basically that exactly
considering that u are sharding 2 miroir map that never change like spawn etc, you didnt need to store chunk etc and sync the map this can still be an issue using only redis
it breaks compatibility with most bukkit plugins but most major and popular plugins have support for it
and it's much smoother than do-it-yourself sharding on one machine will ever be
is folia in a state where you don' have to have a full-time developer working for you to utilize it now, I haven't touched the paper discord in a while
and you can use a single database and a single cache and not have to worry about cache coherence nonsense
i don’t think so now
depends on your plugins i suppose
i see lot of plugins work on folia
towny and slimefun and many others do support it out of the box, but smaller/spigot plugins might not
as soon that u are developping wholes plugin by yourself u can directly use folia anyway
eh well the api breakage is mostly around schedulers
Tbf tho, just because plugins work on folia doesn’t imply they have been given proper care implementation wise, they may still be under synchronized, just that no one has yet to encounter it
the diffs in towny were basically search and replace everywhere on Bukkit.getScheduler
I'd use folia even less if I were a server owner developing the plugins lol
it's time wasted making sure folia and the plugins behave correctly rather than actually improving the server
threading and concurrency are one of the hardest things to get right in programming
the traditional approach of having multiple survival instances works fine, players don't mind too much
yeah i don't really plan to move to folia either
i'll just throw async x and y patches at the server internals until it stops lagging to shit
next on the chopping block is the fucking entity tracker
How does packet based vanish and unvanish work?
you first send packets as if the player had quit, i.e. destroy entity packet iirc, and then you suppress any outgoing packets pertaining to that player from reaching other players
since no information about the player is going out to the other players, they physically can't see the vanished player no matter how modified their client is
just "pertaining to that player" is a little bit nebulous; there are still ways to infer another player being somewhere by e.g. entity collisions, items being picked up, or chests being opened; those will have to be handled on the server, typically by cancelling the related events
spigot's hide/show player methods use packets
yeah they basically do all this out of the box, minus the listen+cancel pickup/collision events
e.g. if a hidden player within view distance picks up an item, the item pickup packet is sent to destroy the item entity, and not knowing what to do with it (since the hidden player doesn't exist as far as it's aware) the client will assume that it itself picked up the item
playing the item pickup animation with the player itself as the recipient
maybe i should try and delay the teleport?
im not sure tbh
your best bet is making a spark report to figure the exact issue
my bets are on the random spawn point methods still being called for some reason
you'd just have to start profiling, make the world and teleport, end profiling
Yeah
or if you don't want to deal with profiling, you can try the copying worlds approach too
then your only choice is profiling
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>```
Help, this is don't work
Dependency 'org.spigotmc:spigot:1.12.2-R0.1-SNAPSHOT' not found
It worked before
?nms
read the above blogpost
unless you didn't mean to use NMS, in which case just add -api to the artifact name and make sure you have the spigot repository in your repositories block
Thanks
iirc, ancient versions dont require mappings
I didn't even notice the version lol
rather than not requiring them, they do't exist lmao
True 
not that it couldn't be generated, but I doubt anyone cares enough to do that
Although, it's quite interesting that they didn't pick 1.8.9 🤔
1.12 is a popular version because it's the last pre-flattening one
and iirc the chunk system performance got fucked hard in 1.13
if you can generate obfuscated -> spigot mappings for 1.12.2, which is totally doable, you can even use the exact same configuration as above but with yarn or something
1.8.8
Javier did you already work with mongodb ?
Why Im getting exception here? It shoudl cancel the task right<
new BukkitRunnable(){
@Override
public void run() {
crateManager.spawnAll();
respawnTask.cancel();
respawnTask.runTaskTimer(QAdventure.instance, 0, configFile.getConfig().getInt("settings.timer-update-interval") * 20L);
}
}.runTaskLater(this, 20L);
cancelling the task doesn't make it eligible to be scheduled again i don't think
oh, thats why.. so I will set it to null and create new one, that should do. Thanks a lot
u can have like an internal runnable otherwise that u just pass to the bukkit runnable otherwise
otherwise intensifies
lol
Fkn Kotlin
the invocation operator overloading in kotlin is my favorite, now any method can do anything from a semantic pov, how splendid (or should I say anything can be a method)

Player #$ "chat message" ?
Player hashtag money
oh its more like, if u have (equivalent in java)
String string = "wow";
string(); //this is overloadable
ofc that isnt valid java, but just to demonstrate ^^
I dont get it
Okay let's say we have some class
Parser parser = new Parser();
kotlin would allow me to turn parser into a function object (sort of)
so I'd effectively be able to call
parser() as a method, ofc this assumes that Parser.invoke() is defined some where, invoke() is not a normal named function mind u.
I think this is extremely obscure and one reason I avoid kotlin to some degree are due to these features that 3rd party libraries use limitlessly, u just dont know what the code does anymore, unless things are named extremely well
so its kind of just a method with no name?
If all of these are only one value like in the preview, you can make them value classes
It's also very bad practice to use it
invoke? no
It makes code confusing to look at and will only allow you to go-to-definition whilst on the parenthesis
I use it like once in my game engine
I use it for invocations when I'm passing lambdas around but I don't declare it for my own stuff
Hello 🙂 I'm writing my custom-made factions plugin, and have some data that I need to access a lot (factions data, players data, claims data). These are stored in a SQLite file.
Should I cache them in my plugin ?
If yes, what would be the best approach to cache them ?
If not, should I try using any other faster DB than SQLite ?
Yes cache them
Player data for example can be loaded when a player joins. If you're querying a player that's offline you can keep it in a data structure like a map for a bit of time before unloading it
Libraries like Caffine can help with that type of caching
As for the db SQLite is fast enough
I'm trying to create a minion plugin and here's the code on how I spawn the entity https://paste.md-5.net/matudurero.cs and I want to create a function to pick up the minion by shift + left clicking it. I've tried to use EntityDamageByEntityEvent and the event is not called when I left click (damage) the minion, probably because of the setInvulnerable(true) option, got any idea?
This is how I debug it.
@EventHandler
private void onDamage(EntityDamageByEntityEvent event) {
Bukkit.broadcastMessage("Entity damage called");
}
i think your only ticket is to listen to player interact event for left click air and raytrace for the entity in front of them
entity interact events only fire for right clicks
Found this on spigot forum but that's not the case right now. I'm using 1.21.4
Going to play around a little bit and might need to raytrace it manually.
Other alternatives:
You could not have the marker be invulerable and instead disable damaging it manually via events
Or I believe the client still sends entity interaction packet, so you could check that
I decided to listen to PlayerArmorStandManipulateEvent, so shift right click to pickup the minion, need to use this because PlayerInteractEntityEvent doesn't get called.
Are you the owner of SpigotMC?
yes
only if you are purchasing spigotmc for USD $5,000,000
otherwise, no never heard of 'im
I'm sure one could sell spigot for more if they really wanted to market it
of course everybody would buy it for less
buying an open source project 
SPGT stocks 
I mean the site more so than the project
the ROI gonna be wild when you get to chill on donations
and take 30% cut on sales
standard google play, apple store cut btw
well yeah but those dominate their markets
and have the fun advantage of being gatekeeper AF
spigotmc nowadays is just another player, albeit still a big one
especially apple store
And it's tires would be called Apple cores
If apple made a car, it would be electric and you'd have to tun it on its roof to plugin it in
true
how can i make my plugin working from 1.20 - 1.21.4
if it doesn't use any NMS, it may work just as is
Hello, although the codes are correct, shapedrecipes are not working on my server, can you help me?
then that means its not correct
kind of a paradox in that statement don't you think?
I can send you the codes if you want?
I don't get any error messages but the recipes don't work
?
It doesn't work in any plugin. It used to work but now it doesn't work.
Did you update recently?
Did you check if the way recipes are handled changed?
yes
(Not sure if required) Did you update the players recipe?
I guess I did whatever was necessary
look please
Loop through online players and run discoverRecipe
Check if that fixes it
Or, if you're not loading recipes while players are online, add discoverRecipe to the join event
hello can someone help me with Orebfuscator i downloaded it but it doesnt work dm me if you can help me
Software architecture question:
let say i have class which manages object references by creating specific implementation of objects themselves, thus enabling to have parse dont validate approach of not having to check validity of the player object if it was passed like a parameter;
public interface Player {
void sendMessage(string text);
void unregister();
}
public class InMemoryPlayer implements Player {
private final Map<UUID, Player> players;
public InMemoryPlayer(Map<UUID, Player> players) {
this.players = players;
}
public void sendMessage(string text) {
// ...
}
public void unregister() {
this.players.remove(this);
}
}
public interface PlayerManager {
Player addPlayer(UUID id);
Player getPlayer(UUID id);
}
public class InMemoryPlayerManager implements PlayerManager {
private final Map<UUID, Player> players = new HashMap<>();
public Player addPlayer(UUID id) {
if (this.players.containsKey(id)) {
throw new IllegalArgumentException("Player with id: " + id + " is already added to the player manager");
}
return this.players.put(new InMemoryPlayer(id));
}
public Player getPlayer(UUID id) {
return this.players.get(id);
}
}
this looks neat, also syntax is cleaner since you can do:
PlayerManager manager = new InMemoryPlayerManager();
Player player = manager.addPlayer(playerId);
player.sendMessage("Hello!");
player.unregister(); // Removes it from player manager
but then this approach introduces cyclic dependency inside implementation of the InMemoryPlayer where it requires to have a Map containing itself in order to function properly (which in theory can cause memory leaks?).
My question
is there any way to solve this without removing declaring every single method from Player interface inside PlayerManager leaving Player with only data as that would that introduce precondition check whether supplied Player object is inside the registry before you can proceed executing sendMessage for example?
my main concept of creating Player class instead of putting every method under one single class PlayerManager is that you wouldnt need to do runtime checks whether the player belongs in the player manager
public interface PlayerManager {
void addPlayer(Player player);
Player getPlayer(UUID id);
public void sendMessage(Player player, string text); // You could move such methods in player manager but then you have to check whether player belongs in the manager itself at runtime for each method.
}
seems a pointless design decision for Player
that's just an example
my main motive is that if you construct implementations in the manager side you can then avoid having to check whether Player object really belongs to this manager in the first place
A Player object should never be stored in your plugin. Being specific.
... that's just an example it has nothing to do with bukkit api
theres no point in wrapping a class such as in your eample, when you can just use the object itself
what rules you decide to define if it shoudl even be in the manager is upto you
that's the point. you can but then you need to check whether Player object that passed as a method parameter inside PlayerManager is legitimate PlayerManager that's registered there.
by wrapping it you avoid it since the manager constructs the object for you
but then there's cyclic depedency like this
syntax is cool tho
if you are completely wrapping all methods anything outside the PlayerManager shoudl never have any access to an actual Player object
it'd be more helpful if you show a real use case
I am also unsure how this correlates at all to parsing tbh
you dont validate object for each operation of the class object (sendMessage() inside Player already knows that its in the PlayerManager, since it was constructed there)
if i've putted lets say sendMessage(Player player, String message inside PlayerManager now i need to check whether Player is inside PlayerManager also allows for wrong input in the first place
that isn't about parsing, it's just a KV relationship
if the point of sendMessage(Player player, String message) is to send messages to a player which is contained in the PlayerManager in question, then all you'd have to do is have a wrapper class for Player (or if it is your own class and not someone else's, just add the method there) and make sure you only ever pass around Player objects which are contained in the PlayerManager
make sure you only ever pass around
Playerobjects which are contained in thePlayerManager
that's the whole point ofPlayerManager#addPlayer(UUID id)it builds a wrapper forsendMessageto safely send message, by ensuring at compile time that you cant input wrong objects just like you can withPlayerManager#sendMessage(Player player, String message)
This isn't python
guys, i have a lava block that i cant lose. Im cancelling the BlockFormEvent to prevent the water from transforming it on obsidian, but that just makes the lava to disappear. How can i fix this?
Cyclic references don't cause memory leaks
cant you set the location that gets transformed or something to lava?
event.getBlock().setType(Material.LAVA);
idk if that works tho
no
Is there anyway to stop things like banners, or any similar things from dropping into their item form if the support block is broken or changed? Like for example base block of banner being changed to redstone. Are there any ways for this in spigot?
In paper there’s a BlockBreakBlockEvent
But what’s an alternative for spigot
switching to paper
1 million dollars and ill do it
you can try your luck with block physics event but you won't like it and the server won't either because it fires approximately 10 morbillion times per tick
what if I tried combining PlayerDropItemEvent and ItemSpawnEvent?
and i cancel all item drops that arent players
if you just want to prevent them dropping the item, rather than prevent them from being broken altogether, that's a bit easier
those two events should get you decently far
you can also try for example setting an unobtainable custom name or other identifier on the banner, and then delete any spawning items that have that identifier
this way no matter how the block is broken, the drop is removed
Um what?
he's a python programmer
Anyway know how to get the inventory action "PICKUP_ONE" to trigger?
declaration: package: org.bukkit.event.inventory, enum: InventoryAction
Couldn't find anything on it
does it even exist?
and for that matter how do you get "pickup some"
and PLACE_SOME 🙏 😭
place some happens when topping up a stack with more items on your cursor that'd fit in the stack
so you don't place ALL from your cursor, nor do you place ONE from your cursor (as you would with e.g. right click), but SOME
not sure if pickup some ever happens with the vanilla client
i could see pickup one happening for stacks of 1, though that could might as well be pickup all
Thanks bro 🙏
Tried that mostly
tbh Ima just keep those events thatt seem unoccuring with what I think they'd work with, I'm just making a storage system rn and I'm being tedious cuz it's easy to dupe with virtual storage systems
can you someone send me everything i need to know around implanting offlineplayer() into my code cause ways knew of dont work
What are you trying to do? And what isn't working?
I made a punishment GUI plugin so when doing /punish IGN I have a selection of wools each being a punishment and each having a set of offences and each I click will check which offence they are on and mute or ban etc for the right amount of time but /punish IGN only works for online players that are currently active
i think #OfflinePlayer consumes a lot of resources
Is there a way to update datapack information at runtime or push information. I was tryna create custom advancements and was just going to create a wrapper then convert it to json and was wondering if I can have it put it into the datapack folder.
you can load the advancement json in UnsafeValues#loadAdvancement
Oh I could just build a json file in my plugin folder then just load that. Also, would their be anyway todo that with enchantments?
it doesn't need to be a file, you pass the json as a string directly
and there is no supported api for dynamically loading enchantments no
internals land for that
I currently followed a guide on custom enchantments but keep getting a tags error.
Hence I was looking into enchantment datapack stuff with spigot. Since spigot dosen't provide for it.
You can absolutely bundle a datapack in a plugin
But the plugin will load and copy it to the datapack folder too late
So you have to then restart the server
I would assume their is a way to modify at runtime with checking files.
?
the server only loads data packs (effectively) once during startup
it does not automagically reload modified files
I thought their was a datapack reload command I must of been thinking of something else lmao
there is, but not everything data packs offer can be reloaded
There is. /minecraft:reload.
don’t think it works on servers tho
for example dimension definitions
yeah it does
but it's severely limited due to the many things that are simply not hot reloadable
stuff like advancements and functions is for example
does this get saved to the world data or how does it save the advancements already created.
Yes, the method’s Javadocs state so at least
Did you end up going the advancement route with your challenge editor? I thought it would’ve been too restrictive
I am kinda still debating. I feel like advancements would relieve the need for like 10 event handlers. Since they may get called all the time. like on block break event.
I don’t really see a problem with having a lot of event handlers tbh, rather if it is gonna work the way I believe it is, that might be your only option
I mean issue is having a bunch of lists of classes. I'd want to sort them out into their own list so it will just return if there is no challenges made for it. The issue is server load as these check everytime a player does an event advancement or not.
List<Challenge> mine;
List<Challenge> smelt;
etc, etc.
Advancements count as its own list as well.
is there anyway to increase speed while moving underwater ?
like increase boat speed ?
hmm
I want to increase the movement speed of this horse underwater
but I cannot see any event that trigger this
EntityMoveEvent doesn't call
same for VehicleMoveEvent
is it being lead
You could technically just check the blocks around the horse and see if it is water and determine if it is under water yourself
I mean I cannot find any event tracking that the horse is moving
?stash for me
how would i run code on an items nbt changing? i need to reevaluate placeholders in an items lore when the nbt chnages
how is the lore being changed?
placeholders, using PAPI
you mean the lore needs updating if a placeholder changes
Then you need to find a way to track when the placeholder needs updating
placeholders in lore is a bad idea
why?
because teh placeholder is replaced when you create the item
yeah thats my best bet
it doesn't actually exist in the lore after creation
yeah, but i'm making a custom item system, the lore is stored in a class of the custom item so i can just read it from that on update
i need dynamic gemstone slots and coin values
So any item which once HAD the placeholder no longer does once its created. It could be stuck in a chest and unloaded after, but will never be updated as its just text in the lore after creation. The placeholder no longer exists on it
but i can just do meta.setLore(lore); and lore is stored in a class as a template of the lorw
or how would you recommend adding dynamicly updated gemstone slots and price values to the lore?
the lore displayed by the client is just text. it has no placeholders
You would have to monitor every inventory that is opened, every item that is dropped or picked up
yeah, so i would do like meta.setLore(placeholder.parse(lore)); and lore is still a template that i can refer to each update
oh true...
that would suck
there is also no event sent when teh player opens their own inventory so you would have to scan all player inventories any time a placeholder needed updating
hmmm, damn
is there a compact sidebar plugin for intellij?
i want to see 1 million files
what
You would not believe your eyes
If 10 million file-flies
that sounds like dodging the actual problem
which is either bad organization or way too many files
Hello, how can I get a head as ItemStack from an URL in spigot 1.8.8 ?
AuthLib fuckery
final UUID uuid = ;
final ItemStack is = ;
final String texture = ;
return Bukkit.getUnsafe().modifyItemStack(is, "{SkullOwner:{Id:\"" + uuid + "\",Properties:{textures:[{Value:\"" + texture + "\"}]}}}");
okay thanks
How can I prevent players from shift clicking items from a custom inventory? I have registered the InventoryCLickEvent and I am checking if event.getClick.isShiftClick, but that doesnt do anything.
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
mb forgot to paste the link
https://hastebin.com/share/lofalayano.csharp
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
does the sound play?
I think it does lemme double check
also, do NOT close an inventory in the InventoryClickEvent
What should I do then?
Ohh this might be it because after a shift click the inventory gets closed and the shift clicked item is added to the inventory
Yup I put it inside a task that runs a tick later and it works perfectly now. Thanks
does anyone know an item that supports a custom color that doesnt crash the game when too many? because this is my situation with only 100 pixels
Has anyone made a free VPS with Oracle? I have one, but it won't let me make internal connections. How do I connect from outside to the VPS database? I'm supposed to have everything configured correctly. But it doesn't work for
MySQL isn't accessible from outside by default
same goes for mariadb
You need to tell it to bind to 0.0.0.0 if you want to access it
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
Is it possible to undo an force push?
I put it to 0.0.0.0, I also have a redis and I can't access it either.
I also made sure I had the firewall configured properly.
very carefully
how? 🙂
I did make some commits from GitHub website for creating md files and things, and then I did push my code from intellij to github and clicked force push, so everything in the md files got removed
and all the commits about the md files also
F
i dont particularly remember since i only did it once by merging my repo with a Fork that hadnt touched anything yet, but this may be a better start than whatever tf i was doing
why cant i name a package "new">
new is a reserved keyword, you use it to instantiate things
packages are part of the fully qualified name of a class
?paste
ok
any gradle experts here? https://paste.md-5.net/ivepaloxig.sql
that is, if you have a class in some/package/SomeClass its simple name is SomeClass but the fully qualified name is some.package.SomeClass, if you were to put new there, it'd confuse the compiler
what command are you running, show your build script, build settings, etc...
what gradle version?
it is the gradle version
well rather, it is the gradle version imposing a kotlin version that is too old, which produces the mismatch
old gradle versions aren't pulling in too old kotlin versions
in all cases though, update to 8.13
inb4 they're in like gradle 7.x
I skimmed through this and at the very least, it should've been fixed at some point:
https://slack-chats.kotlinlang.org/t/13262198/hi-i-m-trying-to-implement-a-gradle-plugin-that-is-a-script-
funky embed
I'm amazed google picked up the slack convo at all, is that a slack thread or something?
hi, how can I glow entity only for certain player?
that's very nice, fixed one of the big issues I have with discord chats, which is the fact that there's zero discoverability on old issues
that link requires login tho
Player#sendPotionEffectChange
just make an account 
you have to wait to be accepted which is meh
I already have one, but I doubt most people do lol
I only had to wait for like 2h
mine took like 4h but at that point, you've already moved to try something else lol
I asked a question in the #reflect channel a month ago and still got no proper response
I love how even the kotlin team is completely flabbergasted at Gradle's architecture, as far as classloading issues go anyway
that's surprising considering their slack is somewhat active still
yeah I mean fairs
the reflect channel really isn't
you don't have to on the gradle slack tho :p
thank god they just send you an email code and don't ask for a password, I had forgotten which email I used for it and apparently didn't add it to my bitwarden vault lol
magic links are kinda meh but are fine tbh
it was either my google or my proton account anyway
why do I have this draft
<
For example, I have a resource on spigot, can I edit the documentation on it?
3
_<
Yes, click the edit resource button if you want to update the Spigot page
Sure
not sure why but my warning emoji has a square to the right of it? It displays it properly though
using UTF-8 to save my properties file
oh shit
got a screenshot and client logs?
yea that'd be it
variation selectors yay!
not exactly
those terms dont work together the way youre using them
List<EntityData> entityData = new ArrayList<>();
entityData.add(new EntityData(23, EntityDataTypes.BLOCK_STATE, 1));
entityData.add(new EntityData(17, EntityDataTypes.FLOAT, 20f));
entityData.add(new EntityData(20, EntityDataTypes.FLOAT, 1f));
entityData.add(new EntityData(21, EntityDataTypes.FLOAT, 1f));
int id = SpigotReflectionUtil.generateEntityId();
WrapperPlayServerSpawnEntity spawn = new WrapperPlayServerSpawnEntity(
id,
UUID.randomUUID(),
EntityTypes.BLOCK_DISPLAY,
SpigotConversionUtil.fromBukkitLocation(player.getLocation()),
0,
0,
new Vector3d()
);
WrapperPlayServerEntityMetadata metadata = new WrapperPlayServerEntityMetadata(
id,
entityData
);
User user = PacketEvents.getAPI().getPlayerManager().getUser(player);
user.sendPacket(spawn);
user.sendPacket(metadata);
why the block display not spawn?
Use EntityLib from Tofaa
it does not work
I don't know why it doesn't work
thanks for coming to my ted talk
jokes aside, you can probably use this mod on your client: https://modrinth.com/mod/gadget to dump the packets you sent and compare them to an entity packet sent by the API/natural spawning
gadget is archived now 😔

really? They should update their modrinth description smh
Why packets 😂
how do i get a sign to already have text on it. i'm currently sending three packets to try and get an editable sign with text already on it. blockchange, blockmetadata, and opensigngui. the sign places, and the gui opens, but the sign doesn't have any text on it, am i missing something?
That's all you need to do
Make sure you put the text on the same side as the text editor opens
weird, the only thing i could think that could be wrong is the nbt but i don't think thats wrong
Is there a reason to use packets for it
I think the API covers all there is as far as signs go
how would you do it without packets?
Player#sendBlockChange then Player#sendSignChange and finally Player#openSign
thanks
Hey, so i wanted to make by code with some stuff online but it justs doens't work, can someone help me?
https://paste.md-5.net/ofikenanev.java
notworking
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
Explain your issue
Why is my config failing to read 2 identical lines?
Lines:
- ''
- ' §7| &fAlive: &5%alive_size%'
- ' §7| &fDead: &5%dead_size%'
- ' §7| &fTokens: &5%tokens_%player%%'
- ''
- §7§oEdit this in the config of Neon.```
You see, the first line is a space but in the actual scoreboard it isn't.
let me send the scoreboard code too ig
I'm going to assume the scoreboard team already exists
the way we got around this in the old days was by appending color codes to every empty line
why not use the new scoreboard components? they'll let you get rid of those numbers on the right as well, and won't care about two lines being the same
iirc the api is Score::setDisplay or some such
I don’t think we have api for that
is it paper only? 🤡
it's almost like there's a pattern
in other news, it turns out my minimum viable implementation for threaded entity tracking actually worked out without any major changes
minimum viable as in i just comment the shit out in ChunkMap::tick and do it in a thread pool
haven't had the server crash yet at least, but we'll see 🤡
next i will uh take a look at doing some of the simpler ai goals off the main thread
🤔
