#help-development
1 messages · Page 1341 of 1
and I even have benefits such as taking breaks whenever I want, calling off work whenever
guaranteed 40 hours of work
For how long have u been developping stuff ?
in MC or in general?
In mc
since pretty much its beginning
Oh wow
I helped make holograms a thing in MC 😛
W achievment
Wait, the old way?
this is the first plugin to ever provide holograms
holographic displays came out 3 months later I think it was
What was the old way
the old way is the horse age bug
It was like wither skulls or fucked up horses wasn’t it
once 1.8 hit, it turned into armorstands since mojang patched the horse age bug
yeah if you set the horses age to a negative value, it turned invisible and upside down too if I recalled
and all that was visible was the name tag
which is what is the hologram
holoapi's devs were not the ones to discover the bug
@wet breach can u do it?
someone else did that and we credited them for finding it, but we took that info and made it into a plugin 😄
Omg hes back
and well, here we are now with mojang making entity displays which is awesome
can u do it gng
Yeah gj tho
also because of holoapi and holographic displays mojang was forced to keep holograms
and the armorstand was chosen for that role
Yeah mojang has been doing good technical stuff recently
nothing at the time was better suited
@wet breach can u do it like send me the jar file??
was bro playing with me?
oh yeah, was a crazy time then
no bro
Sorry
I was there for the whole debacle of the DMCA stuff. I left BukkitDev shortly after that lmao
no
Oh
otherway around. A developer from bukkit dmca'ed Mojang
and tried to take down bukkit
yo @wet breach if u can make the jar u get 100 bucks
im dead ass ong no crosses
Mojang just never responded to the guy, they were upset because they were like one of the only devs to not get hired by mojang and have their rights to code paid off
so can u do it?
and so they felt cheated due to this and believed mojang was stealing or benefiting from bukkit code
so it was done in rage/retaliation
Yeah that sucks
Mojang owns bukkit just fyi
that was the other thing that developer didn't know
even though it wasn't really a secret and by the time they found out mojang had owned bukkit for a few years lol
anyways it was crazy XD
Oh yeah right
@lilac dagger make me it and i'll pay u
Wtf lol
Alright, which plugin?
this is my challenge i doubt u can do it btw, its a yes or no and u have to do it in a week 🙂
Can you make a server that runs Minecraft 26.2 Snapshot 4 by remaking paper to support 26.2, and supports paper & purpur 1.8.8 - 1.21.11 plugins by automatically remapping the plugins? It should support eaglecraft and bedrock edition (Port 19132), and should work with bungeeguard.
its ok if u cant btw
that
LOL bro def gonna give up
Ah
so can u?
bc he stopped typing
You know
omfg
This challenge sounds possible if i worked with all of these at once lol
wdym its one thing
But not sure about plugin bit
can you make me the jar file and i pay u $100
They all work differently i can't unify them to work from 1.8.8 to latest
Nah man
100 is nothing for this
@worldly ingot
this is my challenge i doubt u can do it btw, its a yes or no and u have to do it in a week 🙂
Can you make a server that runs Minecraft 26.2 Snapshot 4 by remaking paper to support 26.2, and supports paper & purpur 1.8.8 - 1.21.11 plugins by automatically remapping the plugins? It should support eaglecraft and bedrock edition (Port 19132), and should work with bungeeguard.
its ok if u cant btw
Only thing i see is a ban tbh
@fierce cipher i will do it for $2000 USD
I was generous
50% upfront
lol he got banned
thank mod
I muted him for a week. Might give him an opportunity to learn how we conduct ourselves in this community instead
haha
you think so?
I dont think he understands why he got muted
it might be a bit hard for him
Block block = world.getBlockAt(blockLocation);
// Updates the block Type first, then changes the state :
block.setType(material);
BlockState blockState = block.getState();
blockState.setData(materialData);
// If the block is directional, adjusts its facing
if (this.getDirection() != null && materialData instanceof Directional) {
Directional directionalData = (Directional) materialData;
RelativeBlockDirection relativeDirection = this.getDirection();
AbsoluteBlockDirection absoluteDirection = direction.getAbsoluteWith(relativeDirection);
directionalData.setFacingDirection(absoluteDirection.toBlockFace());
}
// Then updates the block
// blockState.setRawData(materialData.getData());
blockState.update();
}```
hum
Caused by: java.lang.IllegalArgumentException: Provided data is not of type org.bukkit.material.MaterialData, found org.bukkit.material.Bed
at blockState.setData(materialData);
I have 2 questions
First is why tf is this hapenning ? Like materialData is of type MaterialData
and if changing the materialData after using blockFace.setData() actually works
(I was using rawdata, which worked fine but I want to understand why this doesnt work)
(btw this is a method for placing structures)
nevermind I think this is because of block updates
I'm using setTypeIdAndData() now and it works
Here’s a challenge for u! Spigot, but. It’s on hypixel!
Is it possible to set an entity in a spawner using component data?
https://pastes.dev/xlz3F3M9MY I break the spawner and the entity appears on the item lore, but then when I place it on the ground, the spawner is missing the entity
I don't know what to do with this
You need to be opped to place it with entity data
im opeed
You may also need to be in creative
how can i do this on survival
Use the place event to copy data to the placed block
have some method to avoid that? https://pastes.dev/0IJkyxPycb
they've evolved from screenshots to photos of computer screens
I have an /orders plugin that works on multiple servers.
For item collection, I'm doing the following:
Adding an item to a lock in a global Redis server where that order ID cannot be collected if it's already in the lock where the addition has a 5-minute time limit. After successfully adding the item to the lock, then performing the operation on the database, and once the database operation is completed, then giving the items to the player and removing the order ID from the lock (only removing it if successful).
Currently, this has a problem: the server closes before the task in the main thread that distributes the items is finished.
I'm probably overcomplicating this and maybe I don't even need Redis. Does anyone have a better suggestion?
I'm going to remove the Redis lock and only use the database for this. If it returns 0, it means the operation on the database has already been completed and I won't deliver the items. I had a duplicate in this plugin (that's why I added the lock to Redis) where the person was using a mod called Delay Packets. This only allows sending multiple click packets absurdly fast, right?
Now I just need to know how to implement the logic for what happens if the server closes before delivering the items to player inventory
You can either use a distributed lock + timeout or use the db itself yeah
I'm having a headache right now if the server close before the scheduled task is executed
the timeout would expire and the lock would unlock
pair that with a db call and you can see if it locked and expired, or if it locked and succeeded
I'll only use the database for this:
I'll have two fields in the database: delivery_status and delivery_server_id.
I'll allow item collection only if delivery_status = IDLE and automatically update it to PROCCESSING along with delivery_server_id.
After this database operation is completed, I'll give the items to the player and schedule an update of delivery_status to IDLE.
If the item task isn't executed, then delivery_status will be idle. When a server with this plugin installed starts, I check if there's any row with delivery_status = processing and if server_id matches delivery_server_id, then I update the state to idle
What do you think of this approach?
I mean yeah that'd effectively use the db as a lock
Yes, I don't think redis it's worth here
But I don't think that advantage is worth the complication
just fyi DB's like mysql allow for creating functions within it to execute and you can have one that routinely runs to do cleanup
this way you don't have to create extra queries to do cleanup
My world is taking up 200 GB. How many chunks need to be generated to occupy all that space?
Hey, I was just wondering why most of java is using private variables + getters/setters, I feel like this is a bit restricting especially in an api
Like if there is a bug in a method to set a variable you have to find a workaround instead of accessing a public variable, because the variable is private
(Fireball setDirection hum hum)
If there's a bug you should report it and get it fixed. As for why there are getters and setters for stuff is a concept called Encapsulation. You can read about it in more detail on Wikipedia
but basically it keeps behavior contained so other parts of the code don't directly mess with the internal state of an object in a way that's not intended. A pro for APIs like Spigot is that it helps with maintaining backwards compatability. For example should a value no longer be represented by a primitive field but instead by a component or similar; Spigot can then just add the required conversion logic in to the setter/getter instead of having to check that field every tick for changes
yeah ok makes sense
but the bug is in the 1.8.8 api
sooo
its cooked
I found a fix but I barely understand the way its done lol
Well if you're on 1.8.8 you really should be using a maintained fork
or be maintaining one yourself
where can I find one tho ?
There are ton of them out there
just give it a search
Personally I recommend you just stay up to date
I want to do it in 1.8 lol
but you are talking about a fork of spigot right ?
because I cant really find a repo for spigot
?stash
?contribute
You can find information about contributing to Spigot at the following links:
https://www.spigotmc.org/wiki/cla/
https://www.spigotmc.org/wiki/guide-contributing-to-spigot/
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/README.md
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/CONTRIBUTING.md
^ you can skip account and cla stuff as you're not making a PR
Pull Request
yo, how do i change the player name above his head on newer versions?
like, make his name rainbow
whats the difference between a duck?
a duck and a what...
the beak
ty gaming nword
delicious
nms
Hello, I want to make a small "NPC" plugin, nothing too complicated, just having fake players that send a message / open a menu when clicked. I want to code it myself, but I'm unsure on how to do it. Should I create a NPC class and then for each different NPC, a subclass, with different actions for each. Or should I add a "type" field to each NPC (maybe via an enum) to differentiate them
I find the first option more elegant but im not sure
usually through text display displays iirc
So you want to hardcode your npcs
not make them configurable?
If you want to hardcode it then i would say yeah first option is easiest, just make an NPC class and extend from it
Hey, I have a problem. My account was hacked and the email was changed. What should I do?
?support
email that
probs have to get your account deleted
or if you don't care about it, I guess get a new one
I have a premium plugin like CMI.
then I guess you are emailing support and hoping they can do something for you
personally I would just buy the plugin again
😭
i did /spark heapsummay -save-to-file https://imgur.com/a/WwtJnlh
and i have two files. what should i use to see on app?
?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/
mb sry
Ok ty 🙂
https://pastes.dev/IE7rVVZc0l is this normal?
Is an error normal...
some would say yes
Haven’t seen that one before
this is not a error
are you trying to analyze a heap dump
did you take a memory allocation sample with spark yet? that's not the same as a heap dump, it's like the cpu time sampler but for allocs
my client doesnt want it
your client can't have rainbow names then
well, I guess if you're fine with a rainbow limited to a palette of 16 colors
though even that might prove difficult due to name length limit
one way that would be really annoying to do imo
replace all players with mannequins
they can have fully custom name
I can't think of any drawbacks rn
there is a ton
handling disguised entities is a pain in the ass due to entity data expectations
if u can use mannequins, whats stopping u from going the easy route w text displays
what do packets have to do with it
you can spawn text displays using packets if you want, but you are still going to have to use text displays
genuinely
I hate the 1.8 api
a stair is facing west, you get its facing, its west. A bed is facing west, you take its facing its... EAST
😭
And setFacing is reversed
Can I modify my spigot so it does things differently ?
just use worldedit or something to paste your structures rather than doing it manually
or alternatively use nms
lol
iirc bukkit also has blockdata (de)serialization methods that you ought to use rather than manually calling getters and setters for each property
well isnt spigot open source ?
couldnt I just modify how it behaves ?
oh
is bukkit the software and spigot just the api ?
that would make sense lol
kind of but not really
you can maybe try forking some 1.8 server project that has already done the legwork for you
but don't expect anyone here to handhold you through it
yeah ok
also, changing the way how the api behaves will break anything using the changed parts of the api
so unless you plan on writing all your plugins yourself, i'd advise against it
that what I was planning to do
I want to make a practice map thats a server
so it would only be used locally
hum
this is a bit overwhelming
I dont really understand the difference between bukkit, craftbukkit and spigot
in the server dir
public BlockFace getFacing() {
byte data = (byte) (getData() & 0x7);
switch (data) {
case 0x0:
return BlockFace.SOUTH;
case 0x1:
return BlockFace.WEST;
case 0x2:
return BlockFace.NORTH;
case 0x3:
default:
return BlockFace.EAST;
}
}```
absolute madness
1.8 moment
😭
I dont really know much about licenses and legal stuff, but since this is open source, I assume I can modify it and then publish it on github no ?
or are there issue related to the dmca ?
yeah
public void setDirection(Vector direction) {
Validate.notNull(direction, "Direction can not be null");
double x = direction.getX();
double y = direction.getY();
double z = direction.getZ();
double magnitude = (double) MathHelper.sqrt(x * x + y * y + z * z);
getHandle().dirX = x / magnitude;
getHandle().dirY = y / magnitude;
getHandle().dirZ = z / magnitude;
}```
normalizing the vector also modifies the speed
hahahahaa
😭
hum
soo
ig this doesnt really matter for now since this is a personnal project
are you doing this for the sake of learning how to do it or are you just aiming to get a "practice server" whatever that is done
I believe it's fine but just keep in mind you cannot share the jar
both kinda
oh
rip
why ?
because unless you are specifically in it to learn the grit, forking 1.8 is definitely not the easiest or most effective way of going about doing the latter
like if I recompile a modified version I cannot share the jar ?
yeah since this is a practice map for bedwars I have to do it in 1.8 unfortunately
wdym ?
write a plugin
not really
not to mention that you're not allowed to distribute your modified server jar since it will include copyrighted object code
so it will at best be a nice personal trophy or a paperweight
ok ok
BuildTools exists for a reason
ohh
the api works fine, and like i said, for pasting your practice map or whatever structure you're trying to paste, just add worldedit as a dependency and use its api; it exists on 1.8
ok ok
if you really insist on doing the block properties via setters yourself, just flip the BlockFace direction before setting it
that one thing is not worth taking the entire server apart and redoing it
yeah ok
I just dont really understand why I cant modify spigot and oopen source it
u would be redistributing Mojangs property, which is no-no
you can open source the spigot part probably, but not the jar
the spigot codebase is a series of modifications applied on top of mojang code
to do anything useful with it, it needs to be whipped with the mojang code
which is haram
lmfao
mojang is pork...
I think I dont really understand what bukkit and spigot are
this is why to get a runnable spigot jar you need to get buildtools, which will download the mojang code from mojang directly, and then apply the modifications on top of it, and locally produce the jar
oh ok
Bukkit is an API that outlines a way of interfacing with Minecraft
CraftBukkit is the implementation of Bukkit that does the interfacing with Minecraft
Spigot is additions to both
yeah just dont redistribute mojang code in source or compiled forms and u will be good
yeah ok
need spigotclip so bad
waiting for buildtools makes my brain go mush
i just built everything once
😄
plus i still need to go via build tools to get the local repo things
Anyone need a developer?
This is a channel where people ask for help with development... I think people who frequent this channel are already developers.
I have a bunch of pending slave labor that I could use a developer to do for free
Wow vcs… really great comment to make during black history month.
just wait until we get to pride month
lmao
can you detect what type of a value is returned when you use select statements? in sql
you can get the column names
yes but can you get column types?
i could make a converter class but i dont know.. its a mess
it feels like it could be done easier but i havent found a solution yet
the result set doesn't have a get type from column index/name
but i wonder if there's a query you can run
that gets the datatype
something like this maybe?
wish they had some kind of sql -> java data type mapper
i still have to manually check string and do something like Int (String) -> Int (data type)
yea
ill expose the ResultSet in my wrapper class
it also contains ResultState and like execution time.. etc..
Ew
how do you do it?
small ORM is fine I just don't like how you're doing stats :)
player id | statistic name | statistic value is a bit more flexible
yeah but you also have a column for each statistic type and that's inflexible
oh yeah, because i need to sort by column type
For leaderboards?
yes
You could just use a WHERE
SELECT playerId, statisticValue FROM statistics WHERE statistic_id = "bombs_defused" ORDER BY DESC LIMIT 10 or whatever the query is
and that lets you do custom statistics and reuse that code everywhere

so let me understand, you made a statistics table
player id'd with statistic value and name
and you put everything in there?
Yea
what happens if you have 20 statistics times 40k from players
Not everyone plays the game and sql is built for large volumes anyways
i guess you could index it
small numbers
worry when it becomes a problem yeah
sql engines are built for more than you could ever imagine
I mean grocery stores keep all their transactions + receipts for like 2 years at least
so
lame
cope
cringe
Well, i'd need to pull a lot more queries per joined player
It's cool but my schema doesn't change often
and what's the problem with that
the relational part of relational database is important 😔
that doesn't look all that different than using jdbc directly
its a little nicer isnt it?
i like to have things more explicit the way they are by default.. eg.: how do you know if query was successful? if there's no exception thrown? if there's no results? that's why i like things more explicit
I guess i could join all those but how long would such a query look 👀
Even the current approach is a bit long in 2 of my minigames
i wanna change that because right now its ok.. but since it's an object, i can pass anything i want in there and thats dangerous.. want to make it specific.. either a String which can be converted from any types like Integer, Boolean and would work fine, but pain in the ass comes from converting these.. so I dont know. because.. I could pass json as a parameter and effectively it's a string, but, I dont know how sql server will accept it
any mediocre database has built-in json types you can query inside of directly
what kind of database do you use lol
Sqlite doesn't as far as i know
sqlite definitely has json operations
not specifically a json column type but it lets you operate on them
although, sqlite doesn't really have types to begin with
Yeah, it has very few
no i mean
every time I try to abstract jdbc into something nicer I end up with a shittier jdbc
everything regarding types is a lie
Oh
every time i try jdbc, i end up liking mongodb
there is absolutely 0 type safety offered by sqlite
it's all stored equally, you can omit types entirely
I see
by default*
you can enable some or another pragma directive but, like, it's a waste of time anyway
And where's the fun in not building it from scratch
but if you want to save resources then that's going to take you nowhere
that sounds like a nightmare
wait, does mysql have types that java dont?
yes
christ, i have to make a mapper still
Jooq seems cool but i was thinking more on the line of hibernate's orm
And have like the crud plus some sorting
why are mushrooms growing like crazy everywhere
even on crafting tables
everywhere with a flat surface
inside houses
on wood planks
Fungi devour wood if i remember correctly
Moist wood plus leaves and that's a perfect place for a mushroom
Is this from world generator?
world generator is default
no there werent that many mushrooms here when i started but like they grow everywhere
Might be a small bug i dunno if this is intended
they do grow and spread in low light conditions, and i think soul fire lanterns or whatever these are called give exactly that level of light
guys, can someone help me with my plugin??
i have a problem that when i shoot an arrow
it goes sideway
spigot 1.8
pls
help me
It's really old tho
My guess is it has to do with entity id 0
Is there any other entities before you joined?
I think i had a similar bug on my 1.8 server
Setting the velocity too high also breaks things
yeah, the velocity is set in * 10
not really
do u know how to fix it?
But try this first
times 10 sounds like a lot
double speed = 10.0;
arrow.motX = dir.getX() * speed;
arrow.motY = dir.getY() * speed;
arrow.motZ = dir.getZ() * speed;
world.addEntity(arrow);
i use it
panda spigot?
Try first with a speed of 1.2
Does it still go sideways?
lemme try
wit
yeah, it still going sideway
but a little bit less
Might still be the entity id 0 i think
You can try the player.getEyeLocation().getdirection
Not sure it chsnges anything tho
it works but if i increase in velocity it goes sideway
Well, find the max spot
if i put: double speed = 5; the arrow still going sideway
Whst happens if a friend joins?
And tries to shoot
Does it go sideways still?
Let's see if my issue still exists
ok
@wanton fog does it still happen?
yeah
might be velocity prediction being messed up on this version
is it still the same on newer versions?
I believe so
Iirc it’s only the rendering that’s wrong though, the arrow still lands in the correct place?
Is there a Discord bot that can verify if users have purchased any of my plugins, submit reviews, etc.?
I doubt because of cloudflare
yess... scraping + cloudflare = pain in the ass
How do you stop knockback on Mannequins? is it just a matter of events, or is there a setter?
Are mannequin’s living entities?
If so you can use the knockback resistance attribute
guys, I want to change the player name using packets and teams, this is the closest I could do
how should I do it right?
im delaying the packets so i can /tp and see if it works
what version are you developing for that you still have obfuscated names
1.21.10
?nms
gradle
i just found out that i need to add the entry to the team with the new name
instead of the old one
which can cause an issue, since multiple players will have the same empty name
i need to confirm that with a 3rd player though
also, this doesnt load
sadge, they had useful blogposts
this was the popular gradle plugin for remapping with gradle
sadly it seems to have been archived recently. Should still work fine though
I want to programmatically open a container block (chest, barrel, etc.) for a player in a way that:
- Respects other protection plugins that may want to prevent a player from accessing the container
- Plays the chest open animation and sound
- Does not require the player to physically click the block
What event(s) do protection plugins (e.g. WorldGuard, GriefPrevention) typically cancel to prevent a player from opening a chest, and how can I check against those programmatically without the player physically clicking the block?
Also, does player.openInventory(container.getInventory()) correctly play the chest open animation and sound, or does that need to be handled separately?
My current best attempt:
// block is the container block, player is the player
PlayerInteractEvent fakeEvent = new PlayerInteractEvent(
player,
Action.RIGHT_CLICK_BLOCK,
player.getInventory().getItemInMainHand(),
block,
BlockFace.UP
);
Bukkit.getPluginManager().callEvent(fakeEvent);
if (!fakeEvent.isCancelled()) {
BlockState state = block.getState();
if (state instanceof Container container) {
player.openInventory(container.getInventory());
}
}
Is this the right approach? Does firing a fake PlayerInteractEvent correctly trigger protection plugin checks? And does player.openInventory() handle the animation/sound, or do we need to do something extra?
Actually, to clarify — the code snippet above is just meant to illustrate the intent, not as a serious attempt. I'm aware it has issues (e.g. logging plugins like CoreProtect would record it as a real interaction). I'm more interested in understanding the correct approach from scratch.
this is always difficult because bukkit has no first-class concept for "protection"
firing an interact event should in principle probably be enough for container access, but your mileage may wary depending on the protection plugin
iirc no, opening the inventory like that does not fire the sounds and open the lid, but i'm not 100%; try it and see
regarding the fake event, remember to cancel them before the monitor priority, as otherwise e.g. custom item plugins might fire off item use logic for the held item; again whether this works or not depends on which priority those plugins listen to at
also be aware that anticheat plugins might kick the player or cancel the event if you fire an interact event for a block that's far away
Is there a smaller subtitle I can send a player? I've done
player.sendTitle("", SUBTITLE, 0, TEMP_TICKS + 20, 20);
But the subtitle still appears very large on the screen. I could have sworn that I have seen other servers show smaller subtitles to players, ones that don't take up the entire screen.
there's the actionbar, but it's much lower and much smaller, shown over the hotbar
the title itself can be made smaller and moved around the screen with a custom font
thanks
Is there a known problem where AdvancementDoneEvents dont seem to be emitted on 26.1.2 servers?
Can someone help me? I need a developer
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
How to acually implement shield stunning back in to spigot?
Was that a thing?
is it no longer a thing?
i assume you the mechanic where hitting a shield with an axe knocks it down and "stuns" it for a bit
🤔
I thought that was just cooldown
i mean yeah it is, a cooldown to using the shield
yeah the cooldown is only active if it got hit by an axe and there is a kind of breaking sound that plays too
inb4 "i mean spiggot 1.8"
1.8 doesn't even have shields :c
inb4 they backported shields
yo, any ideas for a concurrent TreeSet?
it would be nice if i didnt to manually sync
java has a concurrent skip list map which you can iirc use as a tree set
yea, just found out
i recall it being one of the best performing concurrent sorted set implementations in the world
beaten only by some arm-specific impl using LL/SC nonsense
i just found out i actually need a concurrent list 😭
because im sorting my stuff by priority and i want to be able insert elements with the same priority
consider map<priority, set<T>>
there are concurrent linked list implementations i'm certain and i'm pretty sure the jdk has at least one, concurrentlinkeddeque perhaps, but iirc that's not indexable into
but a treemap that maps from priority to a bucket of elements all sharing the same priority will work just as well
command /smpstart: permission: vexon-smputil.smpstart trigger: execute console command "/minecraft:tp @a %player%" execute console command "/title @a title [{bold:true ,text:"START!",color:green ,underlined:true }]" execute console command "/minecraft:clear @a" execute console command "/minecraft:give @a golden_carrot 16" execute console command "/essentials:killall drops" execute console command "/minecraft:worldborder set 2500" execute console command "/minecraft:gamrule pvp false" wait 3 seconds execute console command "/title @a title [{bold:true ,text:"30 MINS NO PVP",color:dark_red ,underlined:false }]" execute console command "/minecraft:weather clear" execute console command "/minecraft:time set 1000" wait 30 minutes execute console command "/minecraft:gamrule pvp true" execute console command "/title @a title [{bold:true ,text:"PVP ON!",color:green ,underlined:false }]"
why doesen't it work (the title)
I recommend you ask about Skript in the SkUnity discord
but I'm going to assume it's because of the " "
Your command contains it so now it's confused to where the command end or starts
Why using skript effects and stuff, if you can use console commands 😭
that's a funny way to use a scripting language
yo guys fun fact, in 1.8.8, the bottom and top part of doors do not behave the same with Facings
😄
HAHAHA
funny right ?
you mean a known thing?
at the risk of repeating myself, have you tried doing this with the worldedit api yet
I will suffer
lol
Bed : getFacing() = same as MC, setFacingDirection = same as MC
Button (stone) : getFacing() = same as MC, setFacingDirection = same as MC
Button (wood) : idem
Chest
Ender Chest : getFacing() = same as MC, setFacingDirection = same as MC
Trapped Chest
Furnace
Dispenser : getFacing() = same as MC, setFacingDirection = same as MC
Dropper
Repeater : getFacing() = opposite to MC, setFacingDirection = opposite to MC (same as getFacing()) => This is a case of the use of "Spigot Facing" instead of "Minecraft Facing)
Comparator : Not Directional
Cocoa : getFacing() = same as MC, setFacingDirection = same as MC
DOORS :
All doors behave the same, however the top half of the door is not affected by getFacing() or setFacingDirection(), the raw data is always 8, which translates to the Facing WEST, with getFacing(). The bottom half handles the facing.
: getFacing() = opposite to MC, setFacingDirection = opposite to MC (same as getFacing()) => This is a case of the use of "Spigot Facing" instead of "Minecraft Facing) (Only for the lower half of the door)
GATES :
All gates behave the same
: getFacing() = the Direction to the left of the Minecraft Direction : SOUTH (Minecraft) = EAST (Spigot), WEST = SOUTH, NORTH = WEST, EAST = NORTH, setFacingDirection = same as getFacing()) => This is a case of the use of "Spigot Facing" instead of "Minecraft Facing, but this time, it is not using the opposite direction, but the direction to the left.
Ladder
Lever
Piston
Sticky Piston
Pumpkin
Jack o' Lantern
Redstone Torch
Torch
Skull
Stairs
Wooden Trapdoor
Iron Trapdoor
Tripwire Hook
Hi, whats the best way to create bungeecord with multiple hub servers?
Because in the config I need to setup an fallback server for bungeecord to work. But the fallback server can change, bacause lobby-1 can get reboot. And in the meantime the fallback server is offline players can't connect (they get an com.google.common.base.Preconditions.checkArgument(Preconditions.java:145))
And the screenshot code is not working when the fallback server is offline. How can I fix this?
Why not just use the priorities system inbuilt to bungee?
Because I add/remove servers automatically, we have a lot of instances
It would be ideal to have an event before the internal priority server is picked to modify the result and bypass the priority, but that is not possible. Or to change the priorities trough the API.
why are you rebooting the hub?
second why not make use of transfer packets and move them to another hub?
use velocity and the proxy connect event and write your custom logic for selecting which backend a player goes to on join
but the solution here is quite obvious, stop rebooting the hub so much
that shouldn't be a normal everyday thing and if it is you have issues that should be resolved so you don't have to do that
Its not like I am rebooting it every hour. But during update releases or night reboots (automatically) this problem occurs. And rebooting is a everyday thing, just to clear all cache etc
night reboots shouldn't be a thing
Alright I understand your point. But still I want to look for a solution because in the rare case I do need to reboot the lobbies, I dont want to lose a lot of players...
Does that bypass the priority check?
but yeah I routinely let mc servers run for months before rebooting them. Servers are capalble of that or should be. If you loose the proxy server you are going to lose players regardless where they are at, unless you can move them to another proxy. Since the hub is a mc server itself and instead of moving them to another mc server that may just be another game mode, you can just have them move to a minimal world/server of nothing. IE its an mc server that implements the bare minimum to allow connecting. Once your hub server comes back up, just move them all back. Bungee has api to move players to servers.
this depends a lot on the hardware that runs the servers
and the system
no
yes
if you are rebooting you are just ignoring a problem
Good I would like to change my name on the spigot page if possible
java didn't come out today
if you are not rebooting you are ignoring the problem
Java is used as a server everywhere
XD
why is it those places don't need to reboot but MC you must do so?
a lot depends on the system and hardware
what makes MC more special then any other software out there?
Sometimes its better not to argue with some people 😂 doesn't make any sense
if we want to discuss this further, i have to tell you how minecraft works
once you provide an example of this I will believe you otherwise its just a fallacy sorry
you are a fallacy
Java is simply not new, minecraft is not some revolutionary software either. It doesn't make use of anything different then other servers out there that runs on java.
Just google "is it good to reboot a minecraft server everyday?" and ALL forum post literally say the same.. lol
because they don't know java
I probably been running servers longer than you been alive or nearly so.
and I have been using Java since it came out
I have colleague it workers who been here for over 50+ years and don't know how to make an excel formula... 😂
cool, not talking math here
Just saying that time doesn't say anything. But alright. You win, I don't have time for this 🤓
if you are rebooting everyday it means you have a plugin that is causing issues and needs to be resolved. Sometimes the mc server code has a flaw in it, mojang isn't always perfect and that should be fixed too. But the fix is not rebooting, all that is doing is just avoiding fixing the problem that causes you to need to reboot to begin with
longest I have ran an mc server without rebooting it, is 1 year
I had to reboot because the system OS needed to reboot to update the kernel
either I am some mystical wizard only capable of running an mc server that long without a reboot or I actually know what I am doing
the proxy server needing to reboot is understandable because sometimes you get ghost connections locked up in the system and you can only clear it if the application that originally created it dies.
but the mc servers on the other hand not true since its the proxy that handles all the connections
this is why profiling your java applications is a thing
as well as why JVM arguments even exist
so you can tailor your JVM to your needs
works fine for me
Mostly shitty plugins needing u to do so
Ahh you already said that
Lol
let the dude reboot his stuff damn
in any case resilient systems should handle downtime gracefully
u should not need to restart a minecraft server Daily lowk
Could be a hardware issue?
The only hardware issue that would require rebooting a jvm would be failing ram or failing storage drive which if thats the case you have bigger issues than worrying about rebooting the jvm.
Yeah, I was thinking maybe RAM. Storage also makes sense
When it comes to servers rebooting should not be an everyday thing or be necessary. That is not how they are designed
If op is hosting on their own hardware I'd say they should check that out, otherwise their provider's machines are probably pretty good
If they want to implement graceful reboots to make it more convenient for their players that is fine. But my point has been rebooting daily just should not be necessary and if it is you have plugins or something causing problems and should be looked into to resolve.
I agree that having to reboot daily is unusual
Why are you using Skript like this?
you’re using a scripting language like a command block
Skript has a send title thing. You don’t need to daisy chain commands and hope they work.
Please dms me
Who would like to help me with the dms server, I will pay? someone who can handle the deluxe menu
?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/
handling delux menu is tough 🥀
Its actually pretty easy tbh, just use the advanced menu as the base
it was sarcasm
should have added /s mb
put it all on red, easy x2
Cough give all your money to the house cough
^
go work
Yes, I suspect it's aswm, but I'm not sure
And sorry for the delay
take an allocation sample with spark also
How would I go about adding a patch to spigot directly?
I'm looking to add a configuration option to the spigot.yml, but I don't know how to actually get to that point.
I understand how to contribute to/work with bukkit and craftbukkit, but not spigot.
Commit it to Spigot-Server and then run ./rebuildPatches
Spigot-Server as in the the folder generated by BuildTools?
Or is there something I'm missing on stash?
Yes, Spigot/Spigot-Server
(buildtools)

I think I have figured it out, but I'm not sure how to send these patches to stash now.
Does anyone know what spigot changes when it comes to chunk loading?
Cause I am having trouble with chunks not unloading and I can't seem to pin down why.
I also can't find any related settings that would mess with it either
there is a setting in spigot or bukkit.yml that lets you control when the server unloads chunks, maybe you have changed it
What setting specifically?
Chunk gc iirc, but I don't think it has done anything since mojang reworked the system in 1.13 or 1.14
https://pastes.dev/yBX1xTfrmj Here, the CraftPlayer instance remains active even after the player leaves for 12 hours because the lifetime is 12 hours?
If this code is executed for the player ofc
I think so yes though I'm not 100% sure if the player disconnecting will clear it
One would think it would, but reasonable assumptions are off the table in thus ecosystem
I asked if the instance remains active when the player logs out
Have you taken a spark alloc sample yet
I have 60 craftplayer instances with 10 onlines
What do you do with this dialog
to say the price of the item to put in /ah
Which craftplayer? I see a bunch of humanentities
Actually, this is for searching for items in /ah by a specific name
Which line are we talking about
Yeah but what are you doing with the object
Isn't a Human Entity a Craftplayer?
what object
The dialog
yes but i need to know what reference we are talking about
This fixes the leak, if there was one btw
??
if we're talking about the humanEntity variable which is passed to the lambda, yes, that is strongly referenced by the lambda
What fixes the leak
which in turn will be strongly referenced by the action callback system until the dialog gets unregistered from it
kk
which,
i doubt that
doubt what
that that has anything to do with a leak that'd be related to the humanEntity variable
have you taken an alloc sample yet? i'm not talking about a heap dump
I can send you the heap dump if you want
idk how do this
this can crash/lag the server?
to the same extent as spark sampler start can crash or lag your server
it's a sampler
--alloc makes it sample memory allocations instead of cpu time spent
spark sampler start --alloc
[21:36:02 INFO]: [⚡] Stopping the background profiler before starting... please wait
[21:36:02 INFO]: [⚡] Starting a new profiler, please wait...
[21:36:02 INFO]: [⚡] Allocation Profiler is now running! (async)
[21:36:02 INFO]: [⚡] It will run in the background until it is stopped by an admin.
[21:36:02 INFO]: [⚡] To stop the profiler and upload the results, run:
[21:36:02 INFO]: [⚡] /spark profiler stop
[21:36:02 INFO]: [⚡] To view the profiler while it's running, run:
[21:36:02 INFO]: [⚡] /spark profiler open
when should i stop?
it was the first thing i recommended because it's fast and easy and convenient and rules out allocation pressure problems, so it's a good first step
but i suppose we are pretty late for the first step by now
run it when you're having the issue
or more ideally, run it when you're not having the issue, to get a baseline; and then also run a separate session when you are having the issue, so you can compare
the same best practices as cpu time sampling apply
they can be NPC's and doesn't inherently mean player
in this context since it's a dialog it's almost certainly going to be a player, but the issue is that the Audience and like 10 other references in the class "are probably craftplayer", so just saying craftplayer doesn't really make for an answerable question
either way
yes, this is almost certainly a memory leak
i vaguely remember someone complaining about this at paper
the custom click action is basically just a command callback wrapper; the same problem iirc does or did apply to adventure/paper clickable text component callbacks
which i find extremely silly, and which is why i just do my own command callbacks with an explicit referent so you can reason about the gc and explicitly clear it if desired
i would probably do the same for dialogs; or if you want to keep using this as is, you can wrap the player you pass to the lambda in a weak reference
or in this case, since you get an audience of who clicked the button from the callback itself, just cast the audience to player - that's the player you showed the dialog to, there's no need to keep a strong reference to them
this will still leak any other references in the lambda, meaning shit like plugin reloads is going to leak like a sieve, but that is not as operationally significant as leaking player references
I can't really tell if this is doing anything either tbh.
Is there an easy way to revert/not include certain spigot patches when compiling spigot?
Or do I have to revert everything by hand?
I tried that already. Does not seem to work as I expected it to.
rip
Ohhhh wait
I had to run applyPatches after deleting the patch files
Frickin patch workflows man
F
Now for the fun part.
I get to binary search the entire patch history to find a little problematic one that I need to fix
I love having to do the shotgun blast approach
git bisect my beloved
bisect is too complex for my little head
I understand it and how it works, I just go stupid mode when I try to use it
aw poor baby
?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/
Can anyone help me with Minecraft server
yes, especially in #help-server
If anyone want custom plugin or best authentication plugin i can give you for Money
?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/
Yes
?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/
Yes dm
whaaaat
Read the effin bot message. This is no place to offer anything.
Also, the best authentication is not running an offline server ;)
Hello, i'm on intellij idea ultimate, do anyone know why nothing is imported after i sync gradle changes? I installed 1.21.11 version of spigot via buildtools just before, tried to restart my pc but nothing changed :(
build.gradle:
plugins {
id 'java'
id 'com.gradleup.shadow' version '8.3.0'
id("io.freefair.lombok") version "8.13.1"
}
group = 'me.mingolino'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compileOnly 'org.spigotmc:spigot:1.21.11-R0.1-SNAPSHOT'
}
targetCompatibility = sourceCompatibility = '21'
compileJava.options.encoding = 'UTF-8'
setLibsDirName('../server3/plugins')
Solution : it's not R0.1 but R0.2 for 1.21.11
need the spigot repository also
?wiki
The home of Spigot a high performance, no lag customized Bukkit Minecraft server API, and BungeeCord, the cloud server proxy.
if i installed spigot with buildtools, why mavenLocal() is not enough?
in my previous plugin, it was enough (in 1.21.6)
where?
Maybe you're using the remapped and haven't clicked it in buildtools
From your gradle
images are not allowed here, can i dm you?
they are for verified users btw
thx
yea i see. thanks
I'm getting this error in the playerQuitEvent. Is it because I'm trying to do block #getType on a unloaded world?
i don't know, i left my crystal ball at home
i forget to send the error lol: Chunk system has shut down, cannot process chunk requests in world '00000000-0000-0000-0009-01f7709f4042' at (0,0) status: minecraft:full
I have this error when doing block#getType in unloadMinionInternalLogic. The problem is that this method is only called if the world is loaded, so I don't understand why I'm getting this error.
After a serious amount of time testing, I have found that my issue does not stem from chunk loading, but rather entity activation range.
I spent far too long on this since initially the settings in the spigot config weren't applying, but for some reason, they work today.
I blame this on my hardware. I think I finally understand the need for ECC memory.
-# It's a damn shame it's so fucking expensive
Now I can finally move on to what I was originally going to do
Hey everyone! I’m currently developing a unique, first-of-its-kind Minecraft project: a 1:1 scale Anime Dungeon RPG.
The project features:
Cyber-style Hub: A mid-sized spawn with a futuristic aesthetic.
Custom NPCs: Fully integrated systems for trading and gear upgrades.
Multiverse Portals: A dedicated zone where each portal leads to a different anime-themed world.
RPG Mechanics: A custom leveling system and unique textures for full immersion.
I’m looking for passionate people to join the team. If you're interested in building something truly new, DM me for details!
?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/
stack trace
is the server shutting down?
no
is 8b59144e-7bbf-425d-a496-28bd07094e2b the same world the player was in?
not guaranteed
he can may be or not
World world;
try {
world = bukkitMinion.getLocation().getWorld();
} catch (IllegalArgumentException ignored) {
minionService.remove(bukkitMinion.getUuid(), false, false);
plugin.debug("Skipping minion unload on player quit because its world is unloaded: " + bukkitMinion.getLocation());
continue;
}
this doesn't check if a world is loaded
An exception is thrown if the world is unloaded, no?
/**
* Gets the world that this location resides in
*
* @return World that contains this location, or {@code null} if it is not set
* @throws IllegalArgumentException when world is unloaded
* @see #isWorldLoaded()
*/
@UndefinedNullability // Paper
World that contains this location, or {@code null} if it is not set
i have world null check after
World world;
try {
world = bukkitMinion.getLocation().getWorld();
} catch (IllegalArgumentException ignored) {
Bukkit.getLogger().warning("Skipping minion unload on player quit because its world is unloaded: " + bukkitMinion.getLocation());
continue;
}
if (world == null) {
Bukkit.getLogger().warning("Skipping minion unload on player quit because its world is unavailable: " + bukkitMinion.getLocation());
continue;
}
let me check what the source actually does
kk thanks
okay yeah it's a Reference now
consider using Location::isWorldLoaded for clarity however
/**
* Gets the world that this location resides in
*
* @return World that contains this location, or {@code null} if it is not set
* @throws IllegalArgumentException when world is unloaded
* @see #isWorldLoaded()
*/
@UndefinedNullability // Paper
public World getWorld() {
if (this.world == null) {
return null;
}
World world = this.world.get();
Preconditions.checkArgument(world != null, "World unloaded");
return world;
}
/**
* Checks if world in this location is present and loaded.
*
* @return true if is loaded, otherwise false
*/
public boolean isWorldLoaded() {
if (this.world == null) {
return false;
}
World world = this.world.get();
return world != null && Bukkit.getWorld(world.getUID()) != null;
}
this does not make sense
not sure what this is then, since the world is loaded but the chunk system is "shut down"; my only guess is the world is presently being unloaded, but that sounds a bit too coincidental to be true
The isWorldLoaded check has one more check which is to use Bukkit#getWorld
I believe this is an error in the paper api no?
I don't see how that makes sense.
looks fine to me
Why does location#isWorldLoaded use Bukkit#getWorld and location#getWorld doesn't, even though getWorld should guarantee that the returned world is loaded?
i don't know
So it doesn't make sense to you too xd
it makes sense in the sense that maybe the world exists in nms but not bukkit, or some such; i could see why that extra check could be there, but since it isn't documented, i don't know why it is there
either way, try that and see if it makes a difference
right
that's a java Reference<World>
i assumed it was some nms codec registry bullshit
getWorld only throws if the world has been unloaded and garbage collected
i.e. the world object no longer exists in the runtime
if it still exists in the runtime, because it's for example strongly referenced by some entity, it won't throw and will return the unloaded world
isWorldLoaded checks that the world object exists and that the world is actually still registered in the server and loaded
so @throws IllegalArgumentException when world is unloaded this is misleading or incorrect
i see
it isn't guaranteed to throw if it's unloaded, but it might
this should be clear ig
if (!bukkitMinion.getLocation().isWorldLoaded()) {
plugin.debug("Skipping minion unload on player quit because its world is unloaded: " + bukkitMinion.getLocation());
continue;
}
World world = bukkitMinion.getLocation().getWorld();
(...)
Do I have to change to this then?
however strictly speaking the doc doesn't say "if and only if the world is unloaded", so it's not strictly wrong
it's just misleading
yes is not wrong
yea
but should be more clear
i'll replace all this code:
World world;
try {
world = bukkitMinion.getLocation().getWorld();
} catch (IllegalArgumentException ignored) {
minionService.remove(bukkitMinion.getUuid(), false, false);
plugin.debug("Skipping minion unload on player quit because its world is unloaded: " + bukkitMinion.getLocation());
continue;
}
bukkitMinion.getLocation().isWorldLoaded()
if (world == null) {
minionService.remove(bukkitMinion.getUuid(), false, false);
plugin.debug("Skipping minion unload on player quit because its world is unavailable: " + bukkitMinion.getLocation());
continue;
}
by this
myes
are there any public codebases for the main core plugin for big mc servers, which I could learn and take inspiration from?
export const RegisterDataWriteError = {
USER_ALREADY_EXISTS: "USER_ALREADY_EXISTS",
} as const;
export type RegisterDataWriteError = ValueOf<typeof RegisterDataWriteError>;
export type GenerateUserId = () => UserId;
export type CreateUser = (username: Username) => Promise<UserId>;
export type WriteUser = (id: UserId, username: Username) => Promise<UserId>;
export type FindUserIdByUsername = (username: Username) => Promise<UserId | undefined>;
doesnt seem to fit anywhere
probably just apply basic dependency inversion logic to how it fits ur code base layers
and I mean, TS has STE and btw ur problem isn't really an FP problem
Ayooo, when did spigot get hashes?
{
"name": "4624",
"description": "Jenkins build 4624",
"refs": {
"BuildData": "1766f29a5430bb246f77e2fe24debb93a26a587d",
"Bukkit": "330fe805d8a4cdd955b4b8bad51ac9f018732745",
"CraftBukkit": "6faf826d9bdba7149233ed8eb8e1a4039b933669",
"Spigot": "566f9723ddc5625b20aaa5f7acee9e8328ba5399"
},
"hashes": {
"CraftBukkit": "ab935aa6306712dab3bd027c90be4bf3207a4a5cd7ca7fb7a5b5c00b97066069",
"Spigot": "b9387407a71e92f67be5b6dac91b5a633b8d672137945164ce92b1b36906ef7c"
},
"toolsVersion": 197,
"javaVersions": [69, 70]
}
Hmmm, these are not the kind of hashes I thought they were.
What are they for then?
Rather, what are they hashes of?
i don't know
Is it the git commit hash?
that would be the ref above
I get the feeling you do know and are gatekeeping
theyre hashes of the jars produced by Jenkins but unfortunately I dont think the build is 100% reproducible always yet
some stupid non reproducibility on some maven plugin or something that I didnt get far enough chasing down
but if you can reproduce them, then great job
every copy of spigot is personalized...
build twice on two different PCs and check if the hashes match
they probably wont
then use a tool like diffoscope to find out where they don't and try and fix it
if they do match, then yay I guess
As part of the jenkins pipeline or with BT the regular way?
I think any way
I doubt it's jenkins itself introducing the non-reproduceability
you'll see it was a year ago I was exploring this
CB commits:
a4b0b9b255a19c043bd0ad5f20acfd1481635a9c
debf62aecb049be4a6d0bcca3d3644c9d5f1d054
3f33bb772b7fcc83393483a76c6d7f3c37976251
shows specialsource and file system permissions were at least two issues that have been resolved
idk what's left
Wow, I didn't even know file permissions could contribute to the problem.
I know hashing is based on how you do it.
I just wouldn't have thought that permissions were involved in it.
it's because .jar files can have file permissions in them
so if the permission is different, the .jar is different and so the hash is different
Doing a quick look around and I see that maven 4.0 might have a solution
Need it to officially release tho
Im sure its possible in Maven 3, I just didn't get there for whatever reason
Ahh yea it is, I'm seeing that everything related to it is pointing to a maven-artifact-plugin and even the reproducability page says
There is no Maven version prerequisite. Everything happens at plugin level:
I take it I'm just supposed to slap the plugin into the craftbukkit/spigot pom and go from there?
I doubt that is the source of the non reproduciability
I would start by identifying the differences --- see above
diffoscope is best run in docker due to large amount of dependencies
As the Maven page says: " Really checking reproducibility requires to rebuild from a completely different setup: this is harder to do, even if containers may ease the task."
Aww man. I hate docker.
-# (Only cause I'm bad at using it)
You wouldn't happen to have a docker image for that would you? 👉 👈
This ubuntu downtime is really making it hard to install the things I need
u just got ghosted by the big md kek
Yea, my fault for askin fr fr
But actually, I can't even find a good/working mirror to download from and it's throwing a major wrench in this
I might have to revisit this when the ubuntu repos are back up and running
docker run -ti --rm -w $(pwd) -v $(pwd):$(pwd):ro registry.salsa.debian.org/reproducible-builds/diffoscope ./First.jar ./Second.jar
.
If I have multiple backend servers behind a Velocity server, is it possible for the asyncplayerpreloginevent event from multiple backends to be called for the same UUID simultaneously?
I don’t see how that would happen
Unless the backends are exposed directly, but they shouldn’t be
Do you know why HuskSync lets the player log in and blocks the user from performing any actions until inventory data, playtime, etc. are fetched, instead of blocking the player from logging in until everything is fetched?
No idea
Does Velocity simply redirect players to a specific server? Can't it redirect a player to server B even if they are being processed in the asyncplayerprelogin on server A?
Or the velocity have some validations
@tender shard https://github.com/WiIIiam278/HuskSync/issues/585 https://github.com/WiIIiam278/HuskSync/pull/614
should I enable or disable?
velocity runs in front of your minecraft server
asyncplayerlrogin should only be called at the server the player is sent to
you could have them connect to server A and in the prelogin event make velocity move the player to server B
but i dont see why you would need to do that
If I create a synchronization plugin that depends on this, I need to handle everything independently of the infrastructure
What I can do is add a lock to AsyncPreLoginEvent and release the lock until the data is fetched, and if another server is locked while processing this event, then set result as not_accepted
Yes; anything before login itself can happen on any number of backends in any order, including when the player is online and connected to another backend
.
So the player can be briefly connected to multiple backends at a time (though logged into just one at a time)
This is why husksync does the hacks it does
so i can do this
I think it's a better solution than HuskSync approach
Depends
of what
On what you need the data for and when
The data refers to the player's inventory/enderchest data etc and I need it as quickly as possible
It's pointless for a player to join the server if they can't do anything
Husksync needs to do it the way it does and has no other alternative because it has an api that promises the data is ready on join and only "owned" by one server at a time
Inventory sync is a prime example of this
I didn't understand that
if you're fancy, you could mess with configuration phase to add a configuration task specifically for fetching the inventory
inventory sync u mean this? https://modrinth.com/plugin/inventory-syncs/changelog
Ah yeah I guess the player would still be connected to backend A while joining backend B
I have discussed this problem and possible solutions with others here
is the inventory loaded though
It can be
does the player keep connection on both servers past configuration phase for that to be the case
The player joins one server before they leave the previous
In practice config usually takes enough for the player to quit the previous server before joining the next, but that is by no means a guarantee
And there are no async config prejoin events or such that you can manually delay without blocking the main thread
There is prelogin, but that happens before the proxy triggers the quitting on the previous server
you have to do some hackery to add your own configuration tasks, yeah
This is what I ended up doing as well
But simply preventing the player from entering server B if they haven't completely left server A yet
Well you can't without blocking the main thread
If the playerquitevent on server A is called, then the player's inventory can no longer be updated (unless some plugin does it)
Because the player won't leave the previous server before logging into the next
that's usually how proxies work, you can't avoid it unless you were using something like transfer packet which I assume can work differently
There are a few hacks, like kicking the player
That makes them quit before velocity sends them to a fallback server
that sounds fun
i was doing