#help-development
1 messages ยท Page 1000 of 1
and if you noticed in the example, the username is just a TextComponent
because its merely a string
but if overall it needs to be a string though you could just convert everything to just a simple Textcomponent
Yes, but the example does use two TranslatableComponents, which is also what I'm trying to do.
And it uses addWidth to combine them.
Yeah because the names or those strings can be changed so it pulls that data for you, not that its asolutely necessary though
As far as I can tell.
Does anyone know how to use custom fonts in inventories?
yeah its like a string builder
doesn't always work sometimes
You need to use NMS or the Paper API
Err. Mkay. So what's the recommended best practice?
I don't want to use Paper as my Server Software so i don't know another option sadly. What is meant with "use NMS" NMS is really big?
to add that, you would need to have it be a text component first before adding it with addWith
So it does need the text component to be used explicitly?
NMS refers to the code written by Mojang
I thought it was unnecessary.
?nms
Read this on how to add it to the project ^
The example you referred does turns username into a text component before adding it
I think I might have missed that.
I will test that out.
it would make sense that it needs to be component of some kind
since you are using translatable component
Yeah i know but how could i use it in context of font? I have NMS in my code but how to style the text of the inventory font with it?
You use components as the inventory name
Instead of a String like the Spigot API does
But this don't work with the normal SpigotAPI
I mean with components
spigot and components isn't really a thing yet
?
After some test, it looks like interpolation is needed to smooth the animation but you need to put it inside the runnable. But even with standard block size it's hard to see differences between one with interpolation and another one without.
I mean Bukkit.createInventory(null, size, Component.text("<Text>").font(Key.key("inventories"))); doesn't work with Spigot only, it only works with Papers API
Yeah as I said you need to use nms
Not the Spigot API to have access to components in the inventory title
But what should i do with NMS to create the Inventory with the Name and the Font? NMS is really big.
You are pretty much fucked
Yes
Issue is that spigot's implementation of Container (MinecraftInventory) does not know anything about component titles
Yeah but how does Paper than implement something like the adventure api with components? I know, with Patches but what could i do to set the Font of a text in a inventory in Spigot?
paper is the only easy solution for that
your plugin cannot edit server source code
paper can
I know, but is there a way to use NMS or something like @chrome beacon said before?
not without half rolling your own packet based inventory logic
the illusion is almost perfect
But i can't use Paper on the Server as Software because we only use Spigot and don't want to use ever Paper. I hate Paper, it doesn't makes any performance better and my Permission System doesn't work with Paper as well. Because of this i even ask for another solution without Paper. But thanks for trying to give me that idea.
Ye I mean, spin our own inventory framework then ๐
spigot has close to no support for components
or wait for chocos pr
kekw
actually, idk if that touches inventory. It does ๐
just pull from his fork
wild permission system to not work on paper tho 
do you even change many permission-related things
it got redone with paper plugins
but like, unless the plugin is ripping out all of permission handling, it should be fine
yea but it shouldn't be breaking spigot plugins
Well, if they hack into NMS it would
kekw
Funny thing i know, but it does break the permission system. (coded from a developer from us)
Yea then presumably it injects itself into server internals and dies there
why even do that-
I mean, LuckPerms does that too
It uses Server internals but with Spigot it works and on Paper it doesn't.
I mean yea, to be expected
if you code something for spigot internals, why would it work on paper internals
spigot mapped?
LuckPerms we can't control so we try to only use selfcoded things as long as they don't to complex like PlotSquared or something like it.
no just, paper yanks internal things obviously
o
Idk how you'd be any kind of fork without changing internals 
yea but i mean how would that break spigot stuffs
spigot plugins work fine on paper
Well if they use internals (which seems to be the case) then they don't
if they call CraftBlock#a but paper removes #a and instead implements #b but makes the API still work, the plugin using CraftBlock#a would still die
i haven't had a single NMS references in two of my servers lmfao
this one from us don't. And we won't change something internal on our Plugin there.
If you actually have a specific case where only using spigot-api breaks on paper, that should probably be reported.
only playerlist-related and i used packetevents for that
how can i remove my name from the tablist in 1.8?
?1.8 moment
Too old! (Click the link to get the exact time)
I know, but i have no use if it is fixed in later versions, i need it now.
fork then
@wet breachOk, so what WORKS (but might not be optimal) is wrapping everything like:
new TextComponent(new TranslatableComponent("my.translation"))
And then I simply add all the TextComponents together with addExtra().
Which is exactly what someone yesterday told me NOT to do.
im using 1.8 for an auth server :|
remove info packet
how
And my second owner and my admins don't want to use Paper. idk if it is because of ideological reasons like with ProtocolLib breaking on reload. But i think they have there reasons. (Funny thing, refector 3 lines code and ProtocolLib dosn't crash anymore on reloading)
reloading is the issue
you shouldn't do that
I couldn't tell you why not, also I am not exactly an expert in regards to using components as I don't really use them. But at least you made progress and have managed to get it working. Now you can just improve it from there ๐
very funny, no it isn't
well, reloading breaks everything
never worked for my plugin without breaking DBs, etc
On developing plugins and always restart the server i can make 3-4 coffees in this time.
run a dev server and hot-reload
Just close the connection properly.
This discussion is stupid. Spigot does not have a concept of components in titles yet
You will have to spin it completely yourself, the API and its implementation won't help you
Doesn't solve the problem but is better than always saying "UsE pApEr". Thanks. But does NMS works with it or can work with it?
protocollib breaks on server reload due to the fact that protocollib needs to inject into the network manager and intercept packets. Thing is, when the server reloads all the plugins and some things in the server reload but network manager does not and it breaks the injection
And I couldn't have done it without your help. You're the best. Thank you.
Huh?
I mean, yea you have to use NMS for it
Not true, the only thing that breaks is the logger and this could be fixed by rewriting 3 lines code. Ideological bullshit from ProtocolLib.
Never had any problems with it after it.
don't use plib if it doesn't work for you then
then use a custom version of protocollib if that is the case, but I have had things break in regards to reflection when it comes to a sudo reload of an application
It works for me, but not for others because i forked it and refectored the 3 lines code but the original ProtocolLib and the devs don't want to patch this little issue.
then fix the other issues too :)
This is way harder than refectoring 3 lines.
but as for someone who said reloading breaks their db, that is because of a design flaw on your part
not just db, also lots of other stuff
lol yea i dont use protocollib because it f's with my nms for some reason
my servers depend on initializing playerdata on join, having players on during plugin load breaks it
Yes, but you if you account for null stuff and toss them out when reload happens and re-initialize it shouldn't be an issue
this is easily fixable
name me 1 thing, never had any problems with it.
i don't reload ๐คท
you pretend they joined again
and just go through the players that are there and re-initialize their stuff
no, this is funny but it doesn't.
Hi guys!
But you need to drink many coffee or tea in the time when you restart everytime the server.
Hello, Jonnite
hot reloading does have its issues still just fyi, just be careful of unintential mem leaks
Can someone help me ive been coding a plugin but my server keeps crashing I think I might know why but not sure how to fix it (Im quit new to coding)
yeah, i have lots of memory it just crashes in that case
If you only reload 5-10 times at the server time it and restart it after it, all works and no mem leaks should happen.
just show us your code and tell us your problem ๐
K
Expected it is an Dev Server and not an live server
my server starts pretty quickly on my computer
hot reloading with jetbrains runtime and proper flags does like, nearly everything
yea ofc
I didn't really understand what you were saying here
I cant send it all as it too long how else shold i send it; mcpaste?
?paste
if you have worries about mem leaks after reloading, this is not the case on a few reloads and not many actions on the server. (Only speaking from Dev-Servers that get only used for testing stuff)
reloading is not the same as hot reloading. The majority of memory leaks don't come from the server itself rather plugins that are poorly designed and don't handle reloading from the server
how can i remove the tablist of my server 1.8? help
in regards to hot reloading, if you don't understand how it works you may uninentially cause memory leaks when using it
https://paste.md-5.net/aforezufiw.cs so playing normaly is all fine but as soon as you give yourself a relic and have it in your inventory it starts freezing and crashing I think it might be something with the Click events or the Run() part the gives effect and scoreboard if you need the errors let me know
but what is the difference in reloading and hot reloading?
hot reloading replaces classes directly
server reload simply re-initializes everything
imagine ServerLoadEvent implemented Cancellable kekw
"simply" 
oh, but how does it work? I only know the option to replace your .jar and /reload your server after it.
its a jvm feature
^
jetbrains runtime
allows you to redeclare classes, methods and method bodies
at runtime
you have to register a jvm agent, and then you can replace classes that are already loaded
oh, like bytecode manipulation at runtime?
I hope this is the right info im new to this stuff
not out for jdk 21 tho :(
there is libraries like the one that is being mentioned here that helps take care of most of the work for you
I think it is better that i don't use it and only useing the good old /reload.
never hurts to broaden your knowledge
true
but if you don't want to venture into unknown then so be it not like anyone is forcing you lol
I am content myself with just restarting a server ๐
you have a flaw
easily correctable though
oh ok thats goodish
your flaw is you are creating a bunch of tasks that never die
when you should be checking if the task already exists as well as making an exit loop for your tasks so they can die
should start with that and see how that goes
How would I go about that or could you put that into simpler terms cus like a im new (ive said this hundreds of times lol)
in your events, you are creating tasks but I imagine the task being created there is no code in the task for it to simply stop
so over time, you end up with bunch of these tasks all checking and doing the same thing
so, to avoid this, simply create a map that holds the player uuid and the value being the task that was created
or something to that effect
then you just check the map from your events to see if there is already a task created for whatever you are doing and if there is don't create a new one
in the code that the task is performing you simply create a check that should fail at some point so that when that is reached you cancel the task from within the task
now the task can die when it needs to and go away
Ok thanks so much!
and then you just have a cleanup loop
that checks your map and see if the tasks exist still if they don't remove the player from the map
you obviously can optimize this and this is just basically a rough outline to point you in the right direction
how to add multiversion support to plugin?
Hi there! Today Iโm going to explain how to setup a multi-module project using maven to support different NMS versions. Important notes about this tutorial: Every step will have detailled screenshots using IntelliJ. I explicitly chose not to include everything as copy/pastable source code, but normal screenshots (you can click on them to show th...
If you are asking about spigot API, target teh lowest version you want to support.
If I made plugin on Java 17 for Minecraft 1.18.2 can I add support to 1.12.2 version?
So I need to use only nms to do that?
no, if you are talking about API
Or there is anything in spigot api
The answer is still the same, for API you target the lowest version you want to support
Where I need to target it
do you guys know the cleanest way to unpack a zip file?
๐
use try-with-resources bro
which one
you can split it into smaller methods to make it cleaner and easier to read
it seems your code guards against zip bomb however it doesn't seem to guard against zip slip
the zip file is internal
i don't worry about zip exploits
anyway, what's a zip slip?
zip slip is where it uses relative directory tricks to have a file get extracted to a different directory then from where you are extracting
Are you just extracting a zip inside of your jar?
i have a list of songs and i extract them on plugin start in the plugin folder
looks nice
yeah
what 

some messages appeared and were deleted
idk

Im currently having a problem with my maven dependencies because I am trying to use the API of another plugin (Worldguard and luckperms): I added the dependencies in pom.xml and added the depend flag for the plugins in the Spigot file.
I ran the build and it succesfully built the plugin, but I when I try to use the classes in code, it just doest show up in autocomplete and throws an error if i just type it in. Neither does it give me an option to import
There is also no file in external libraries corresponding to the dependencies i have
Have you tried reloading the maven project?
Can't upload images here

?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
It was for the guide 

A pom.xml created by minecraft plugin is good?
stop using maven
gradle is better
many bugs in dependencies
Im used to it right now, if there are too many bugs, ill switch. But rn i feel like its fine
switch to ant instead
gradle and maven fetch dependencies from the exact same repositories.
switch to the 2844km long javac command
it is subjective none is better none is worse
use what you're comfortable with and don't try to force others to conform to your preferences
for instance, in my own experience maven is better for java projects and gradle is better for kotlin
and we are NOT having a java vs kotlin discussion rn
ain't no way
unless its to use Eclipse ๐ then pressure everyone to conform.
i'll steal from your retirement funds
you know, kotlin actually-
actually ๐ค
can u force someone to click in their currently opened inventory
no
that's sad
I see, so I guess it's not possible to have multiple people assigned to one resource?
You can have them as co-authors afaik
FileInputStream.transfer?
let me see
InputStream::transferTo(OutputStream)
there's no file for input stream
Hi, any can help me in creating a command listener?
?commands
could only try
have you read the docs?
wait a listener, like command pre process event?
PlayerCommandPreprocessEvent
ye i cant read
what for?
if we execute any command it will send the player to the lobby server including "/"
on spigot plugin
simply send them to the lobby server when the event fires then
Hmm, I see, so I guess I'd have to send an email and see then
what code?
this is my code:
public class CommandListener implements Listener {
@EventHandler
public void onPlayerCommand(PlayerCommandPreprocessEvent event) {
Player player = event.getPlayer();
String command = event.getMessage();
if (!command.isEmpty() && command.charAt(0) == '/') {
if (!isCommandToExecute(player, command)) {
event.setCancelled(true);
}
}
}
private boolean isCommandToExecute(Player player, String command) {
FileConfiguration config = LimboCore.getInstance().getConfig();
boolean autoLobbyCommand = config.getBoolean("auto-lobby-command");
if (autoLobbyCommand && (command.equals("/") || command.startsWith("/lobby") || command.startsWith("/hub"))) {
player.performCommand("/lobby");
player.sendMessage(Utils.colorize("&aRedirected to lobby..."));
return false;
}
return true;
}
}
doesnt work
;/
ok..?
define not working
issue?
just why? make a normal command
what's the command from cafebabe to tell people to not just say "doesnt work"
?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.
noted
"does not working"
where did that bot learn english
also register the command?
i think it's on purpose
someone told me it is
literally register a command for "lobby" with an alias of "hub"
Yes, when we run the slash command or regular command, what is expected is that the player will be returned to the lobby server from limbo. but currently it doesn't work from the code I created.
you do not need the pre process event at all
so?
and why in the flippin world r u running actual code that isn't related to the return value
even if aliases were that way
player.performCommand("/lobby");
player.sendMessage(Utils.colorize("&aRedirected to lobby..."));``` shouldn't be in isCommandToExecute
it should be in an else statement
anyways what's the issue
please provide the code that you should mean
?pmc You MUST use plugin messaging channels to transfer players.
is it the same if I use velocity?
yes
okay
this also exists on the paper wiki fyi
?whereami
velocity is made by paper
exactly
i was telling them to consult the paper wiki as they made vel ๐
public class CommandListener implements Listener {
@EventHandler
public void onPlayerCommand(PlayerCommandPreprocessEvent event) {
Player player = event.getPlayer();
String command = event.getMessage();
if (!command.isEmpty() && command.charAt(0) == '/') {
if (!isCommandToExecute(player, command)) {
event.setCancelled(true);
}
}
}
private boolean isCommandToExecute(Player player, String command) {
FileConfiguration config = LimboCore.getInstance().getConfig();
boolean autoLobbyCommand = config.getBoolean("auto-lobby-command");
if (autoLobbyCommand && (command.equals("/") || command.startsWith("/lobby") || command.startsWith("/hub"))) {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(byteArrayOutputStream);
try {
out.writeUTF("Connect");
out.writeUTF("lobby");
player.sendPluginMessage(LimboCore.getInstance(), "BungeeCord", byteArrayOutputStream.toByteArray());
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
out.close();
byteArrayOutputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
player.sendMessage(Utils.colorize("&aRedirected to lobby..."));
return false;
}
return true;
}
}
``` like this?
wouldnt that only enable / /lobby and /hub when autoLobbyCommand is true?
ye
use a try with resources
and why does a method that returns a boolean have side effects
Success vs failure
Is there a way to get player's body's rotation?
I believe that's totally handled by the client
Then how to do something like this https://cdn.discordapp.com/attachments/1238887050283974819/1238887794005508166/Base_Profile_2023.08.31_-_00.43.04.09_Trim.mp4
Unsure. Has to be either some sort of riding entity or other layered model manipulation
I saw servers with this feature, so... It's not a mod or something like this, but I still don't understand how it works
i mean its called isCommandToExecute, not transferToLobby
Oh I found this plugin.. It's HMC Cosmetic Plugin
Yeah, they're making the armour stand ride the player
Granted it's packet based for some reason, but it's riding the player
Hm.. Maybe because of body rotation?
Ok, then other question... How to spawn a lot of particles? Not only 1 particle like do world.spawnParticle
only cycle?
I mean yeah, if you don't care about the specific configuration of these particles, you can use the "amount" argument to change how many are spawned and control their density with the offsetX, Y and Z arguments
But if you want them in very very specific positions, then yes, you have to spawn many particles in specific spots
maybe amount arguement could be useful in this situation
how do i disable AI of entity?
Pathfinder?
Zombie zombie;
zombie.setAI(false);
for example
no method for AI
I'm not sure that it works like supposed to
Like he said change Entity to Slime or LivingEntity doenst matter
You'll want to change the speed of the particle in that case
Sometimes particle speeds are stupidly high
Although if that's block break, I'm unsure if speed affects it
Hmm..
how do i set slime's size?
declaration: package: org.bukkit.entity, interface: Slime
When you cast it to a Slime you get all Methods and in the Javadocs you can see all the Methods
to slow particle make particles with negative offset?
between what numbers is slime size
No, It made things worse
You probably just want this
world.spawnParticle(Particle.BLOCK, block.getLocation().add(0.5, 0.5, 0.5), 1, block.getBlockData());
Try it out or google it most numbers are the same like in the minecraft wiki
Or whatever the BlockData is you want to pass
Thanks!
Yes, but instead of Particle.BLOCK - Particle.ITEM_CRACK
You should look into extends and implements of classes so you understand the difference of Entity LivingEntity and Slime. Slime implements all so it has all the Methods and its own
Worst case, if that doesn't work for whatever reason, you can try this as well
world.spawnParticle(Particle.BLOCK, block.getLocation().add(0.5, 0.5, 0.5), 1, 0.0, 0.0, 0.0, 0.0, block.getBlockData());
(and if you're in a verison pre-1.20.5, I think the particle is actually called BLOCK_CRACK, it got renamed)
Well.. It spawns only 1 particle, and it's too fast
Try the second one I mentioned then, and increase the "1" to something like 10
ok, thanks
It's possible that block particle was changed so it actually respects velocity now
Anyone have a clue how to generate Minecraft structures using NMS.
Shouldn't need to use server internals at all, we have API for it with the StructureManager
I'm trying to generate an Ocean Monument
Doesn't seem to be in the 1.20.6 API...
It most definitely is :p I'm looking at it right now
Well, it works, but I think that it should have little speed
The 4th 0.0 is the speed argument so you can toy with that a little bit. Maybe 0.05 or 0.1
The three 0.0's before it are the offsets, it will spread out the particle from the source position
what about
double velX = -0.5 + rand.nextDouble();
double velY = 2.2 + rand.nextDouble();
double velZ = -0.5 + rand.nextDouble();
no
Ah I've found it, thanks for the help IntellIJ wasn't showing it because yknow IntellIJ
Yeah, you can put those in the first three 0.0 arguments if you'd like, but that will just give them a random offset in either direction
Bukkit.getStructureManager() to get an instance of it ๐
Yeah, I figured.
Well, like it do vanilla particles when you break block
Interact events fire once for each hand
That's just you.
You have to account for that with event.getHand()
Yeah
Generally people tend to skip over the off hand interaction (especially if it's an empty handed right click action), but it's up to you
I believe sometimes it could be a user, since the event will trigger if the right mouse is held down.
like multiple times.
That is also possible as well, yes. But usually it's just a matter of checking for the hand
Usually for stuff like this people add a cooldown anyways. (esp for player interact events)
Thanks for help, it works!
this isn't a development question but i kinda fucked up and set my intellij idea font to max and now i can't reset it, does anyone know where intellij idea stores the settings?
Your app data
%appdata%/Roaming/IntellIJ
Jetbrains/Intellij
or whatever version you use
Finally I made something like custom block adder, lol
C:\Users\YOUR_USER\AppData\Roaming\JetBrains\IntelliJIdea2024.1\options
Would look something like this
hi i'm getting this error while trying to create JSONObject, attached che pom the error here's the code:
JSONObject jsonObject = new JSONObject();
jsonObject.put("name", "John");
jsonObject.put("age", 30);
jsonObject.put("city", "New York");
// Add additional values
jsonObject.put("married", true);
jsonObject.put("children", new String[]{"Alice", "Bob"});
// Specify the file name
String fileName = "example.json";
try (FileWriter fileWriter = new FileWriter(fileName)) {
// Write JSON content to file
fileWriter.write(jsonObject.toString());
System.out.println("JSON content has been written to " + fileName);
} catch (IOException e) {
System.out.println("An error occurred while writing JSON content to the file: " + e.getMessage());
e.printStackTrace();
I'd recommend doing fileWriter.flush()
and fileWriter.close()
But your issue is coming from JSON not being in ur jar file.
pom.xml
the font size isnt in any of the files
Are you building with artifact or maven?
What do you mean:
i got two files
he's using try-with-resources bro.
one is the name of the file itself and the other one is original-name
It's always best practice to close it .
? wtf
Use the non -original one
it does it for you
ok
It's just my preference I guess.
From previous times not using the close method it caused issues.
@glad prawn yeah just as I thought if you don't close it, it will not write to the file.
is Skull considered as a block?
yes
is everything a block that can be placed?
No.

no like armor stands and so an that are entities
is everything a block that can be placed and are not entities?
uhm
what are you trying to achive?
if you want to check if its a block use instanceof Block
i want to check item's size
to create simillar hitbox
using slimes
and modifying sizes of slimes
which particle replaced Particle.MAGIC in 1.20.5?
ok when you need help show the code you having trouble with
no problems
Do you mean the Enchantment Table Particles?
no the particles that are released from like splash potions of harming
Maybe Particle.SPLASH
i think those are like the swirlies from regular splash potions
harming potions create more star-shaped effects
Looks like Particle.CRIT maybe they just look the same
they look somewhat similar but they dont behave the same
so i think its something else
crit particle disappear in just a couple of ticks but harming potions stick around for some time
INSTANT_EFFECT
also twr automatically closes Closeable when it runs out of scope
alrighty
and about de googleapi (gson)?
nevermind
alredy solved
i didnt see the pom image
but thanks anyway
so im making a plugin so you cant put a certain item in a chest but the problem is they can put it in their offhand before and swap it in when they are in the chest anyone know how i could see them swapping it into the chest
You can listen for that with InventoryAction#HOTBAR_X actions. It includes the off hand
i don't have HOTBAR_X in my spigot
How can i create a entity from an EntityType ?
World#spawnEntity(Location, EntityType)
switch to the bukkit dependency
spigot deprecated and removed it (god complex developers and all)
how can i get the dropped items when calling the Block#breakNaturally(ItemStack) method?
does anybody know which method i need to create mixins for to know when a block starts burning ?
block.getDrops(ItemStack)
not that
what?
Then BlockDropItemEvent
im trying to recreate the BlockBurnEvent using mixins
not called
i think its this one Lnet/minecraft/block/Block;onBreak(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)V
Mixins?? Spigot got no mixins
Maybe ItemSpawnEvent?
not accurate
What do you mean?
a plugin may call that event
and it doesnt need to be strticly a block drop
petition to make the Block#breakNaturally() methods also call the BlockDropItemEvent: 1/3
What do you wanna do with these items?
is the player location the foot location?
i would think because theres an extra method to get the eye location but just try it out
Yeah all entity locations are the bottom of their hitbox
ty
get the eye location to be abit higher
You can just get the Block Drops and give them a nbt Tag so you can identify them then spawn them where the block would drop them and set the block to air. Now you can identify the Items when you need them in whatever event
how do i build a project with 3 pom files (it's a forked plugin so dont blame me)
its refusing to build it with the libraries
4 poms actually
just put everything into one
idk what they're using the 4 pom files for so it'll prob break stuff
it breaks stuff now so you dont have a choice or?
I dont think you can use more than one pom
Probably a multi module project
1 sec
im 99.99% sure its that
anyways how do u compile a multi module project
gradle build 
it's maven
it aint compiling some libraries with it
Well, are you shading them into the main project/output project
๐
nvm
they are listed as children in the root pom.xml ye?
no as modules
Well yea
there's a bundle package that has the best pom out of them all
i think im supposed to do something with that
is this a public repo? xD
yeah
link pls
the others dont make sense
the rest have some "provided" libraries that dont exist in a typical server
I mean, just mvn package should be fine here.
the output will be in the bundle's target folder tho
it doesnt compile the PacketManagement with it
that is a thirdparty thing
yeah ik
im supposed to get the bundle target one?
yea
im getting the root target..

why would u even use a multi module project ๐ญ
why not?
I would not call multiple modules compilated ยฏ_(ใ)_/ยฏ
What defines a module?
i barely deal with one pom, imagine dealing with 3
a build file
and a parent build file that builds all modules is also needed
Hierarchy kinda thing?
wait isn't a multi module project just a project with inner libraries by technicality
you can put it that way
Simplest form I probably can
perhapssssssssssssssss
not sure if that's completely valid, i haven't worked with multi module projects myself, i just know the structure and the general idea
Does anyone know any plugin to custom mobs (like with model engine) for free?
I'm pretty sure meg is one of a kind
meg?
model engine
Meh, it costs 20$
Couldn't tell you anything else that does what it does
For a 20$ single purchase for lifetime updates and simply the quality of meg aint that bad
- you can get support in their discord
(api / server side help btw)
Yeah, btw I'm not a holder of some kind of project/server so, I just wanted to test some thing with it
btw I found something like this
Try it I suppose, I couldn't tell you which is better though I'd bet on meg
Maybe I'm wrong, idk lol
I never really pay attention to those comparisons
I'd rather decide based on experience with said project
hah fr
You can use Animated Java datapack functions to do just models for free
Well.. Animated Java a little bit LAGGY
Animated Java made only with datapacks => Minecraft commands. Everything that made on minecraft commands is made on tick function => very laggy
You said free so
Well hephaestus engine & world seed entity engine maybe a good replacement
So it may not work with spigot?
If it says it only works in Minestom then I would take their word for it
It explicitly says it doesnt support Paper so I assume that would be the same for spigot
hmmm
If it really doesn't work with spigot, so, maybe I should give a try to hephaestus engine
It does look interesting so I'm also gonna check it out later, but tbh your best option may just be model engine
Maybe test and compare model engine and hephaestus since model engine has a free version
If model engine is better, I'd just pay the $20 instead of spending tens or hundreds of hours on a half assed version of it
model engine has a free version?
Yes but it has a 6 model limit or something like that
oh
Maybe some other small limitations as well not sure
Poor devs of Model Engine it seems like a lot of people were complaining about that is not model engine 4
lol
you know how the console prints text in colors if you add chat colors and stuff to messages right? How do I turn that off
I am debugging some message parsing stuff and I wanna see the color codes in the message that gets sent
like the &3 whatever in the actual console
Good luck
would you know any way I can actually see that string
because it either removes all the format information or it shows it in color
just replace ยง with & and you can the the color code in the console or what do you mean?
๐
does anyone happen to know Java 7 JDK vendors outside of azul?
openjdk?
that's unfortunately not a gradle toolchain vendor
And for whatever reason using Azul it decides to install Azul Zing which uhm I haven't heard about and doesn't work anyways
With not working I mean it instantly coredumps
Windows or linux?
how do i change java version of runServer task?
I mean, its going to pick your projects toolchain
why is the toolchain not at java 21?
linux
mainly because the codebase is already written in Java 7 (last commit was 10 years ago, sooo yea).
No that wasn't for you ๐
Did you download the regular azul jdk? Cause I think Azul Zing is something for their enterprise customers.
aint this java version
that is your project sdk
the gradle toolchain is something different
can you share your build.gradle.kts?
?paste
well I would like autoprovisioning to work. But I suppose I can always manually install the JDK
-java {
- toolchain.languageVersion.set(JavaLanguageVersion.of(17))
-}
+java {
+ toolchain.languageVersion.set(JavaLanguageVersion.of(21))
+}
also update the shadow plugin to https://plugins.gradle.org/plugin/io.github.goooler.shadow
lynx you love diffs dont you
I do
What is autoprovisioning in this context?
what about big diffs or do big diffs hurt and you like the small diffs
oh... i was searching for that
I work on paper 
thanks
Paper doesn't have big diffs? ๐ค
basically gradle downloading the JDK on the fly.
well
whats your answer
I guess I could use J8 and set the source and target versions appropriately
I love all sizes of diff
medium hits the spot just right
Ah well, not sure how reliable that method is.
I always install the jdk manually.
I think IJ has some auto download stuff, but I hardly use it.
I'd be surprised if any vendor under the sun (outside of zulu for whatever reason) still publishes java 7
given that shit has been EOL for so long, they'd have to maintain it themselves 
AdoptOpenJDK used to support it but the dumdums over at eclipse killed that project
The AdoptOpenJDK -> Adoptium move was terribly executed
I mean, isn't the jump to java 8 supposedly pretty seamless tho?
I'd get it to jump from java 8 to 9, that sounds like work
could also just use jdk 8 but configure source and target compatibility to java 7
I'm just the kind of person that will always use the lowest requirements necessary when creating/maintaining libraries so yeah
Is Java 7 still used though?
But I'll go with the JDK 8 + source and target compat 7 strategy
By like anyone?
supporting java 7 sounds more like a security risk than a feature 
The legacy minecraft community uses stone-age java versions, so I'd not be surprised
They can suffer
Would recommend going JDK 17+
Didn't minecraft run on java 6 at one point?
Most hosts are running between 17-19
Java 5 even
Sheesh
But good luck finding a Java 5 JDK lol
Can't go past JDK 8 unless I want to break windows builds lol (or just blindly cross-compile and hope that proton is a usable ABI compatibility test)
quickemu up a windows instance
That's what compatibility targets are for no?
You can use a Java 17 install to develop with, but set the IDE rules to only allow version specific code to be written and complied.
format patch when?
Well only problem is that that is likely going to cease in a few years. Kindof like how you cannot build Java 6 maven projects anymore if you don't have a Java 11 JDK active
I just want to discuss something. Is it possible to create single player engine that allows players to see them and integrate with them only if needed. The purpose of this is skyblock server and it would allow creating island for every player at 0 100 0 and load chunks based on packets for each player individualy?
Many plugins use one world per player strategies for this
how do i do something like:
Creeper creeper = get an instance of a creeper
Why isn't this working?
val componentSerializer = MiniMessage.miniMessage()
val player = joinEvent.player
player.sendMessage(
componentSerializer.deserialize(ServerUtil.PREFIXES.get("general").toString())
)
What I am trying is to send a message on the player join but I am hit with the following error:
java.lang.NoSuchMethodError: 'void org.bukkit.entity.Player.sendMessage(net.kyori.adventure.text.Component)'
Its not one world per player, the most stupid strategy i could think of
Its about sending world directly to one player and to each player send his individual world
Then save that
you are running on spigot
while compiling against paper-api
omfg, thanks
And if he connects to his island again load that island and send packets with that only to him
player sends his indiviual world in what sense?
how do i "create" a livingentity instance
What?
Modify the engine that it send packets with individual world for each player
What do you think about that @quiet ice
You can create skyblock server very easily and efficiency
Server does not require as much resources
so basically one server per player?
Yea you have skyblock islands so every player have their each island on coordinates 0 100 0
Or something more akin to whatever paper's multithreaded fork is (begins with f, forgot the rest tho)
No one server
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
I have buyed itemadder paid plugin buy it is not working
When player join the server i load his skyblock island convert it to packet and send it to him ONLY and do that for every player
So basically i create singleplayer on multiplayer server
And if needed i add one player to another player world
I have buyed itemadder paid plugin buy it is not working plz help anyone
go on itemsadder discord
^
this channel is # HELP - DEVELOPMENT
Link?
look for it
on the page
But I have buyed from here only spiggot
spigot is just a market place
Not a good approach
There are 3 main approaches to making per-player worlds / islands / whatever
One is to have a world per player
๐
You can easily serialize the entire world, but most plugins will struggle with encoding their data so you'll need to fork a lot of stuff
The other approach is to have a grid
If you don't care about sharding and just want a single server this is the ideal approach because you don't have to serialize anything and plugins work fine with this approach
It is however, not scalable
But it is what most public skyblock plugins do
I can program i will not be using other plugins
Why
The packet-based approach allows for a much higher player density per server but you have to re-implement and emulate most vanilla features
As in hijack every single mob to not target the players around you, collide with fake blocks
Yea i know that
Re-implement TNT, item dropping, liquids flowing, cobblestone and obsidian generation
I'd argue its probably going to be less density with how shitty vanilla feature implementations are via the API 
A proper big server I worked for had its entire prison division in a single server
All packet-based
I'll rewrite the whole engine
The easiest and likely "best" implementations is islands in teh same world (spread out) and simply lock players to their own area.
It ran at like 5tps but everything was async so ppl couldn't bat an eye
โจ async โจ indeed
tho prison at least is easier
islands with an unbuildable area around each.
We had 1500 people in a single instance
With the skyblock division they sharded it all
yea
So it is possible and can make it work but everything need rewrite?
its as possible as coding the server itself from scratch๐
Sounds like a hell lot of work for something that can be done in an afternoon with Slimeworldmanager
How is the hypixel skyblock handling this?
they use their own homemade slimeworldmanager
they made the damn thing to begin with
it's basically just their Housing system but with a different template
Could you tell me quick how is the slimeworldmanager working? What is it doing?
Instead of storing vanilla worlds with .mca files it's kept in memory and serialized to a database
Hey!
Have you read one of our dev blogs before? Here's one on our use of Grafana, a tool to generate a bunch of graphs about Hypixel. In these dev posts, we talk about how the technology works on the network.
Today, we'll explain how we handle the storage of player islands on Hypixel SkyBlock...
get sniped
rekt me
I have a feeling it's me being dumb, but why can't I do shadowJar with Shadow 8.1.1, Java 21 and Gradle 8.5?
That makes sense, it's great, then if player will enter island i can find least occupied server and load it there?
shadow is not maintained anymore, at least your version
oh
use gooler/shadow
The server allocation strategy can be simple or complex
thanks!
You can pick the least occupied server, which guarantees less load per instance but you end up having to use more resources keeping more instances alive
You can also use the most occupied server which guarantees less resource consumption but more load per instance
Any tutorial on how i could make custom ores that spawn in the world? I already know how to make custom model texures, i want to know how to do the spawning stuff
You can go with a hybrid where each instance needs to meet a certain "fill level" before it switches to the next
Look into BlockPopulator
worked great, thanks again
Thanks, will do!
Each of this strategies is great and have pros and cons
Yeah
hypixel uses mongo???????????
These strategies then have to pair with your "cloud" server instancing system to spin up new servers on the fly to meet demand
To be able to manage player spikes of a certain magnitude
Let's say each server handles 10 islands, and you have a hybrid strategy where it fills each server from 0->5 and then fills the least loaded one
If you have 10 instances you can manage 100 islands
But you want to be able to handle a player spike of 50 islands, which is about half your capacity
So you need to start spinning up new servers to ensure that you always have that half capacity available
k8s
how can i change this?????
Everyrhing is possible i Just wanted to discuss whats the best
?whereami
like to this
go to papermc for velocity support
Never worked with skyblock and this complicated approach to be able to keep up with housends of players
its an example
still
Then there's the question of how you actually deal with all the infrastructure stuff
you are using velocity
i would like change the text on bungee cord
no
Simultaniously or saving their data?
Hello everyone,
I'm in the process of setting up multiple cloned Skyblock servers and am exploring the best practices for synchronizing player data across these environments. I am particularly focused on ensuring consistent updates for player inventories, Ender Chest contents, economic details...
I made this little post here explaining a couple approaches
well then why not show a ss from your actuak server.. also #help-server is probably where you wanna be at
(if you're not making your plugin)
im gonna modify the code, but i dont know where is the part of that text
Just fork your proxy
Simultaniously
Whatever youโre using, bungee or velocity
Split the gamemode through multiple instances
Share playersโ progress through a proper database
Is there any fork with SlimWorldManager that supports 1.18 or 1.16?
You will need to implement a serializer to support your database
So you can store playersโ inventory, attritubes and such
Maybe stats and achievements
The modern one is a paper fork + plugin
Works on 1.20+
Yea i have all software on 1.18 and 1.16
So it would be the best for to work on that
Versions
yeah, but where is the part of that text in the code
i cant find that
Why not just always working on latest version?
i have all software on 1.18 and 1.16
update it
Nah too much time
I am asking why it cannot be updated
says the one wanting to make packet-based skyblock
Does it makes NMS calls and such?
why you speaking in big text
lol
It is easier for me to write 300 000 lines of code engine from scratch then updating whole proxy and software
evade the question
People using NMS should just PR to the server software so they donโt need to worry about updating to newer versions
What??
He can't read so i make the text bigger
LMAO
I thought they were serious
Love the trolls
I am not trolling
if its in api you dont have to maintain it, anyone once they update will have access to it instead of having to wait for you to have time to update and then release an update
since when is 1.16 latest kekw
that guy replied to my message where i answered his question
Yeah, thatโs what I mean
Thatโs why I prโed BlockState cloning to another location
If you worked for any company you know that if they code something they also stay on updated versions cuz it's easier and cheaper for them to use older software then updating
Still Java 8 is the most popular version of Java
Guess why
that makes 0 sense what you just said
All the software stays on that and companies don't update
you said the opposite as well
companies when 2052 rolls around and they cant use java 8 anymore
It might be because English is not my primary language, sorry for the inconvenient hope you understod what i meant
Itโs okay, it just seemed you were hallucinating being some googolplex developer
Java 8 is from 2014
Java 11 from 2018
Those 2 versions are used by 89% of the companies and entities. It is just cheaper and better to not update your software.
ok
but it's different to games
because you tend to want the latest new cool feature and gameplay aspect
if (args.length > 3) sender.sendMessage(ChatColorHex.translateHexColorCodes(ChatColorHex.Color("cosmeticos-hats.no-hat-permission-other"))), item);
It is but you do not you don't take into account what versions the target audience in your country or those playing on your server uses. For me it's mainly 1.18 and for this reason alone, updating to 1.20 or switching only to 1.20 makes no sense
Since 1.16 you can do pretty nice things such as custom models, items, inventories you can basically create game in game
too many )
error item));
Bees were added in 1.15 but if they were added in 1.19 you could implement them on your own in 1.16
how dare you call my beloved resourcepack magic fuckery nasty
No no
Bad word
Sorry
I thought nasty means something like "dope thing"
good thing
My bad
it's the opposite lol

I missuderstood the word nasty i thought it meant something tottaly oposite
But yea to sum up for those reasons updating to 1.20 dont make sense
what is ChatColorHex
Minecraft Color & and RGB
bungee api chatcolor can already read hex colors
yes
so what does the function Color do
anyone knows how can i fix it?
If you use IntelliJ update to 2024.1.1
ahh
the problem is that its updated
U sure?
@echo basalt if i could take a minute from you because i do not really understand one part of what is in here https://hypixel.net/threads/dev-blog-5-storing-your-skyblock-island.2190753/
They store .slime file in SeaweedFS and Mongo in the same time or what? They say they do store it in SeaweedFS and then they say that "The Seaweed FID are stored in Mongo " i dont get it could you explain?
SeaweedFS is their file system
They store the file in the file system, and then store the index of the file system in mongo
Along with metadata
Isn't seaweedfs just self-hosted S3?
Yea it is
So basically it's like
SeaweedFS is an array
And Mongo DB keeps the index of the array?
Never worked with that and Amazon S3
ey, updated it before and when opening it shows 2023.03..
Is this an okay way to store constants as my keys that I want to use?
You clearly didn't then. Or at leas updated from an ancient version to a less ancient one.
100% i clicked update
because its no longer there
Not a valid namespaced key. needs a namespace and key.
any way to update from settings then?
Hm if NamespacedKey was an interface you could make the enum import it
found
Anyways that enum approach is flawed, go with a final class full of constants
I've no clue if IJ can only do minor updates itself. I always use the Jetbrains Toolbox for the updates.
I dont understand
public final class Keys {
private Keys() {}
public static final NamespacedKey WEAPON = NamespacedKey.fromString("myplugin:weapon");
}
but okay
And if you want to have a .values() or some kind of mapping, just make a static method and hold a collection
public final class Keys {
private Keys() {}
private static final Map<String, NamespacedKey> REGISTRY = new ConcurrentHashMap<>();
public static final NamespacedKey WEAPON = register(NamespacedKey.fromString("myplugin:weapon"));
private static NamespacedKey register(NamespacedKey key) {
REGISTRY.put(key.getKey(), key);
return key;
}
public static NamespacedKey getByKey(String key) {
return REGISTRY.get(key);
}
public static Collection<Namespacedkey> values() {
return List.copyOf(REGISTRY.values());
}
}
