#help-development
1 messages · Page 1158 of 1
I'd not argue with him. He's been given answers. He just doesn;t like that we do not agree with him
wouldnt all entities there be despawned though?
well
most of them
exlucding items and named mobs
Could you tell me if you have already done a benchmark?
A benchmark? really?
Situation 1: Do nothign unless the chunk is loaded naturally.
Situation2: keep a chunk loaded and update relevant entities in teh chunk constantly.
I wonder which would be the most performant
we have to take into account that: the chunk is always almost loaded, that is, the update would always be practically visible; chunkloadevent always runs through entities more than 200 times in 1 second. although I think it has less performance, I'll do it your way
Yes, DONT do that
Your server is up 24/7. Players are active on the server for 7 hours out of 24. Your server is running shit it does not need to for 17 hours a day.
In my opinion, what matters is saving the CPU when you really need it, not when you're sleeping.
and certainly interact with 300 players online in chunkloadevent constantly, every performance is welcome and I really think this is a costly operation
its important all the time. Do not have the server doing work it does not need to do.
3 chunks will kill my server xd
Now I bet that this chunkloadevent with a lot of players will be the heaviest thing that the timings will say, let's see
chunk load will only trigger for a chunk once, when a player moves near.
It doesn;t fire constantly, for a specific chunk
When players move away (after a while) the chunk unloads.
after some time? I give ./mv tp another world and the chunk I was in unloads right away
im on spigot 1.8.8 too
as you were the only player, yes
I am seeing how to do the implementation
If you were not on 1.8 you coudl timestamp the chunk
So if I want to update an armorstand I have to go through world.getentities?
oh forget
I don't know how I'm going to do this xd
i forget say
but it is only called if there is a player online
I see 0 reasons to loop over things that should not be loaded
that should be the number 1 thing to consider
It's basically a territory system and the person needs to dominate it to have the holgorama timer. This hologram will only be updated if this territory is counting down to the territory being dominated, but the person can dominate and then move away
everything else is just optimizing whatever is loaded
then save the time it started at
and when it gets reloaded, display the proper time gained or whatever
keeping a chunk loaded to loop through some armor stands you dont even see is ludricous
and will always bring down performance anyways
Hello, I need some help. Recently I made a project with Intelij, and tried to us Spigot-Api as a dependency, specifically 1.20.1. However it will not let me import anything from Spigot and I can't do anything with it. any ideas?
yo guys i have a class which extends PersistentDataType<String, Phone>
and the fromPrimitive method requires a @NotNull PersistentDataAdapterContext context
what do i pass in for that
for more then just ticking an armorstand
use maven or gradle
maven
it doesnt say that that method is detrimental to the performance
refresh the project
just because theer is API for it, does not mean its fast or good to use
Alright ill see if that works
and since you seem to be keen on performance here, that statement goes double
pssh lies, if its there it must be the best 😉
jk, steaf23 is correct
just because it is provided in the API doesn't necessarily mean it is always wise to it.
Sadly it did not fix the issue
😔
hi nerds
I personally use netbeans
oh ok
What does your pom.xml look like?
?paste
Don't have a pom.xl because basically what i'm making is a jar file for a plugin. Aka I'm making a ability for a already existing plugin called Project Korra
Aren't you using maven though?
Yeah
So how did you declare spigot as a dependency?
Project Structure
that isn't maven
If you're using maven, you need to add the dependency inside of the pom.xml instead of project structure
Just like so ^
huh. I assumed it was maven.. but i guess im wrong
project structure uses ant
different build system, but a build system like maven and gradle
Alright thank you i'll try to figure it out from now i'll update if something goes to shit lol
alright haha
well fortunately you haven't started anything, so starting over isn't detrimental
yeah
Aight so, i've been trying to figure this out. and I need 2 imports. Project Korra and Spigot API. Project Korra works fine. but Spigot refuses to import and I cannot use it. It is in external libaries, but I cannot import a thing from it.
Theres no error. It builds fine. but its somehow does not work..
well there are errors because i cannot import bukkit stuff
Which I don't rly get
how can it somehow not work
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
nah i never downloaded that
Want me to send you a picture
sure
Hey how to create an SubCommand with bungeecord?
You need to run BuildTools in order to use the Spigot API
?bt
yeah i already did that
Send the pom.xml in here instead just to make sure it's correct
I don't have a pom.xml because im not making a plugin. I'm making a addon onto a plugin
To make those systems that have an arena and cannot leave it if they are in combat with a red glass animation in which the glass only appears if they are close to the location, should I use playermoveevent or packets?
A pom isn't required to make just "a plugin". Maven is just a build system for java. The pom is what you declare the project to be with dependencies and repositories.
the pom.xml is just for the maven build system. It doesn;t matter what you are making, you can use Maven
I don't know its kind of weird. I chose Maven when making the project. but the pom.xml never generated
InteliJ or Eclipse?
InteliJ
you will always get a pom.xml
¯_(ツ)_/¯
?img show your project structure
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
want me to send a pic/
Send a pic in dms, and I'll send it here
That is interesting because maven is at the side, but there is no pom
is there an option to not generate a pom?
open the maven tab on the right and there shoudl be an option to update
oh yeah about that..
asoon as i clicked it , it disappeared lol
What about gradle 🤔
sounds like a knackered IJ install
does anyone have any idea if I want to spawn an armor stand with some text and make it invisible, how to make it invisible for the spectators as well, because by default they can see it transparently
I believe you can do it with teams
or just hideEntity
Even better just use text displays
It means that your IntelliJ is probably screwed up and needs to be reinstalled.
It looks like you have a really old version anyways.
Fr fr. Display Entities my beloved. ❤️
wouldn't hideEntity hide the text along with the armor stand as well?
Armorstands are kinda weird with spectator mode. It might.
You'll just have to try and see.
And if it doesn't work, then try testing with a text display.
firstly he mentioned teams, but idk which property in the team would change the visibility
@quaint mantle Can you also send the pics of the steps you took to create the maven project?
nah i deleted it im tryna redo it now
Looks like they redid the mcdev plugin again. (It's better tho)
yes
Ok. Could you explain what you meant that I could achieve it with teams?
Might also hide the text
so nvm
but basically putting the armorstand in to another team should hide it
should work with the invisibility effect not sure how it works with the invisible flag
Does anyone know how to save a list of data and restore it when the server restarts?
?configs
See this wiki page on how to use custom configuration files: https://www.spigotmc.org/wiki/config-files/
Database??
God no
Well that's okay depends on scope ig
I am creating a plugin with armor stands which can be selectable and can be moved, rotated, etc... everything works fine but when I restart the server, I can no longer interact with them, as if it had lost their property
Can I send you a video to make it more explicit?
not really but rather to be able to select it, which adds a glowing effect, to be able to move it by clicking with a certain item in the hand, etc...
is the item you hold in your hand still valid
I added something that removes all the armorstands that have this functionality, but when I remove it, it remains but we can no longer interact with them
yes but I just put that because it doesn't work. I don't have the final goal
I believe that my code adds during the creation of the armor stand to the ARRAYlist named displayEntities, but on restart. the list should not be restored. I think that's it, can I send my program, or parts that concern this problem?
oh, i mean duh
when you initialize a list like this its in memory
when the application shuts down this memory is cleared
you need to serialize this data and persist it to a file
I tried to store this list in a yml file. but I made one mistake after another. The solution may be there but I don't know how to store and re-use this list
what are you needing to save exactly
why does it need to be saved
i thought you were only modifying entities
yes I thought there was no need, but when I restart, the armor stands that I spawned before the restart can no longer be selected like in the video. suddenly I deduced that these armor stands must have been listed in a list which is reset on each restart but that is perhaps not the problem
i dont think anyone can help you without you showing your code
of course I'll send you my code, it's a bit long. but if you can't find what each part corresponds to, ask me
anyway im having some issues compiling my stuff, when i mvn clean install it says it cannot find things like Connection or Craftplayer. I'm working with nms here, and according to the logs it's failing because of this
class file has wrong version 65.0, should be 61.0, mojang mappings are bad class files i guess, but I use these in other projects too where it works just fine. any ideas?
Make sure all your maven plugins are up to date
All of them except special source are outdated
also set your java version to 21 instead of 17
ill check
here's what it does after restarting:
were the packets for these sky effects removed entirely since 1.17? i cant reproduce this at all https://youtu.be/HYrZTQB7ELU?si=QGT8ObKrresHolA4&t=78
This tutorial will show you how to change the sky to a variety of amazing colors for a player or for an entire world, create different atmospheres for every world!
Download Link: https://www.spigotmc.org/resources/skychanger.37524/
Get a super fast Minecraft server instantly delivered to you here: https://serverminer.com
If you have any quest...
sorry if videos like this are not permitted
What can i do?
Remove tracker 🔫
im guessing ur on mojmaps, that tut prob still used spigot maps
pretty sure that used invalid rain levels?
that bug has been fixed. And also even persisted when leaving the server, so really not something you should have used in the first place
You could look in to custom biomes
not sure if they allow controlling the sky though
they do
it does but the packets just use a numeric ID for each effect and these effects are totally different now
like these effects and their IDs used to be this which affect sky colors and stars and stuff, really cool
Hey what can i do?
https://i.ibb.co/gjC6m8P/image.png
but now they're these
it will be "start_raining" but again - the bug has been fixed
add the minecraft repo
bro didn't read the part saying it isn't possible anymore
its no longer possible to change the sky color with that packet
just use a biome instead. the client supports changing biomes at runtime just fine nowadays, without needing to re-send chunks
oh yeah i did not read that
i do not know how to read
unfortunate, i really liked the stars getting brighter effect
im guessing you cant do that any more
yeah that looks pretty cool tbf
but no, not really. can't even properly change the sky in a resourcepack
Shaders it is?
i try
shaders would be good if i didnt need this effect to be toggleable
yeah shaders in a resourcepack would work. but they are kinda unsupported, and love to break with some mods (looking at you, Optifine)
who uses optifine now a days
This is bukkit, f the mods
Sodium isn't much better in that regard. Its just a downside of making large changes to the renderer. and tbf - Mojang has always said that resourcepack shaders are unsupported
but it doesn't really solve the toggleable issue anyways, unless you do some fun things like just showing them when the time is exactly 12000 or something
specifically making them brighter would have been great
Does somebody knows why one hit is counted as two?
thats a private paste
but my guess would be that you have two hands and aren't checking for the hand
I assume you can't randomly set uniforms. But I have little experience (read: none) with shaders in minecraft, or hell - rendering in minecraft in general.
seems like they don't use shaders are at all, but are hardcoded
also someone on the Minecraft wiki went through the effort of making a table of all 780 stars and their positions, lmao
what autism does to a person
Biomes are your best bet to change the sky color now
that one unemployed friend on a tuesday
how could I make it so that a warden wont attack players no matter what? just the simple 'EntityTargetEvent' didnt seem to do anything :/
public void disengageWarden(EntityTargetEvent event) {
Entity entity = event.getEntity();
if (entity instanceof Warden) {
Entity targetEntity = event.getTarget();
if (targetEntity instanceof Player) {
//Player player = (Player) targetEntity;
event.setCancelled(true);
}
}
}```
ive done this sorta stuff with withers before and I was hoping it would work the same way with a warden but it didnt
this is so real
autism makes my brain go brr with shaders
Before I get too creative in code, is there a simple way for a user to move their mouse off the game screen? The only way I can think of is to open the inventory, but that covers much of the screen, which doesn't help with F3 open. This would be used from moving mouse to another app for whatever and then back or literally AFK from the game.
If there's nothing obvious, what's the general code approach for opening a tiny modal component like inventory, but extremely tiny?
Thanks!!
You don't have control over the client on the server
This seems like it'd be very invasive to implement too please be a good person and respect people's privacy
I was thinking of offering a chat command or some other option.
I think you misunderstand. This isn't related to privacy or controlling the client. When the server opens inventory we can move the mouse off-app. I'm just looking for another easy to do that.
Press T? Not sure why you need some other way of doing this. You can't control the client
This wouldn't be possible with code nor can I see the benefit of this
opening chat, an inventory, escape
Open F3 so you can see your coords or more detailed info. Now you want to record them in another app. So you tap ??? to move your cursor to your notes app or IDE.
Make a client mod to copy them to clipboard
f3 c
opening game to see 😆
If you don't wanna open the game use a mocking framework?
Serious lack of communication here. I;ll try again. Open F3 to see the entire screen. Now you want to record something in another app. The info might come from any field, not just coords but maybe from right side. Anything that gets opened, like E/Inventory or T/message/command blocks the screen. But yes, these options do allow for mouse-off from the app.
alt tab then
Not sure what this even has to do with development why can't you alt tab?
Or make a client mod to do something for you
I mean as a dev or player, I just want to write something down.
Alt-tab opens the Game Menu and covers part of the screen, as well as blurring the rest of it.
Press t 💀
That's pause on lost focus but you can't lose focus without one of the other options.
loose focus is triggered if you alt tab
if you disable pause on lost focus you can now alt tab without it blurring
There's legit a client setting to disable pause on loose focus
that is f3 p miles
That's it! Re-testing.....
This has nothing to do with plugin development
I'm beyond confused here
Hell it has nothing to do with code
Y2K, you're right but I didn't know if there was a way to do this in vanilla and client-side before going to code, which I'm happy to do if required.
the question was a bit confusing. but tbf, its a nice thing to disable if you are developing and testing a plugin
The F3+P is the solution to toggle the game reaction to lost focus. Then Alt+Tab to lose focus.
@knotty aspen understands
Is it possible to send custom skin data over the network and apply it to the user for the server only (not changing the users actual skin)
I thought there was a game profile thing or whatever
Didn’t gameprofile contain the textures too
So... TYVM @remote swallow 🙂
I got confused while trying to make sure that an item does not drop to the ground and remains in the player's inventory after the player dies.
I couldn't do it in onPlayerDeath
remove the item from getDrops on PlayerDeathEvent
to ensure they get the item 1 tick later make them respawn and add the item to their inv
like Fabulous mode shaders?
or modded shaders w Iris or OF
Fabulous mode shaders
You don't even actually need the F3 menu to get your current position
You can literally just press F3 + L and it will copy your location to the clipboard as a /tp command lol
That might not be the case if you have reduced debug info but I'm not sure
I’ll reduce your debug Choco
its c
smh
L is profiling. Because that makes sense
you work for hypixel but dont even know ur f3 keybinds
profiling is an L
who needs optimization
just get a better pc
Yes because performance is usually an issue with running Minecraft kek
public enum Items {
SERVER_SELECTOR, TELEPORT_BOW
}``` I'm learning Java at the same time as making a plugin, how could I return an ItemStack using an enum value
enums are no different than normal classes with some attributes, you can create a constructor and getter and setters
@eager flame
once you create your constructor your ide will yell at you to add the values to the enum fields, do that
Ah thank you guys
F3 C
i miss when F3 C was the crash game button
uhhh it's F3 + C iirc
F3 + Choco
can some1 help me... im making a npc than can rtp but it rtps in the flat world with the lobby in it and thats not what i need i need to get a different world for that i have mvtp and BetterRTP, if some1 can help me DM me!!!
how could i make that endermans alwaya attack the player
!
Set the target
declaration: package: org.bukkit.entity, interface: Mob
Then listen to https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTargetLivingEntityEvent.html, cancel if enderman want to set the target to null
I think you can create your own rtp function and use it on the npc.
THANK YOU
idk why i never knew about this but this is so good for playing survival
Hello. How to get base color from banner (which is itemstack) in 1.21? As I see BannerItemMeta.getBaseColor() no longer exist but Banner.setBaseColor(Dye) still exists
Thats my whole code and how it looked before 1.21:
ItemStack bannerItem = bannerExpr.getSingle(event);
if (bannerItem != null) {
BannerMeta bannerItemMeta = (BannerMeta)bannerItem.getItemMeta();
List<Pattern> patterns = bannerItemMeta.getPatterns();
ItemStack shield = new ItemStack(Material.SHIELD, 1);
BlockStateMeta bmeta = (BlockStateMeta)shield.getItemMeta();
Banner banner = (Banner)bmeta.getBlockState();
banner.setBaseColor(bannerItemMeta.getBaseColor());
banner.update();
for (Pattern pattern : patterns){
banner.addPattern(pattern);
banner.update();
}
bmeta.setBlockState((BlockState)banner);
shield.setItemMeta((ItemMeta)bmeta);
return new ItemStack[]{shield};
}
return new ItemStack[]{};
}
it simply generates shield with banner from banner item
It looks like Pattern has a getColor() method
Question about making /tpa (teleport request to another player). It seems i can send a request but when trying to grab the value from the Map it returns nothing even though the map size increased. https://paste.md-5.net/ayoqoretuk.java
If I add a debug log after 'put' by using 'get(targetUUID' it does return their uuid. but when i use /tpaccept it returns null
is it posible to create async scoreboard?
are you creating a new instance of Tpa for every command? (tpa, tpaccept, tpdeny)
getCommand("tpaccept").setExecutor(new Tpa());
getCommand("tpdeny").setExecutor(new Tpa());
```Was it supposed to be separate classes?
you create an instance for every command so the map contains different values for every command
the map contains different values when you execute /tpa than if you execute /tpaccept
make a manager and use di to pass it to each command
i would separate your tpa class into 3 classes since it doesn't many any sense for one command executor to manage 3 different commands
was trying to keep organized because i am making a class for each command on the server
background color is also pattern?
so something like
public class TpManager {
private final Map<UUID, UUID> tpaRequests = new HashMap<>();
// methods to modify tpaRequests like get, put, delete, etc.
}
thanks
but doing it this way is worse for organization imo. if you really need to just put each of the 3 tp commands into a tp package
you can compute scoreboard values asynchronously but you have to update them sync iirc
alr
i js asked cuz a friend that codes plugins has one of them
i mean he creates async scoreboards
Hey guys! I'm looking for help on best practice, allow me to list my implementation
I have a factions system in place and i want to sync to a database i have that holds player and faction info like territory, etc
Currently im testing by having each command like player joining faction lead to a database update, but probably dont want that since it's running on the main thread
I was thinking that when I finish, I would make the database updated every X amount of minutes, and also make said operation async. It would read from a manager I have running that would hold the actual hashmaps of player and faction data in use at the time.
Im trying to think of some cases where the database would need to be immeditaly updated though
it doesnt need a infinite clock saving it every X. just be sure that when a player gets kicked to save their data
that sounds good to me? every "command" could update the internal hashmap instantly while adding that operation to some sort of queue that the manager goes through every once in a while
to ensure that the database gets updated correctly and in order
server crashes are the only thing that i can think of that could delete data, but as long as your update interval isn't too long it shouldn't be that big of an issue
plus how often are your servers crashing anyways
thats why i said to save data when a player is kicked
server restarts and crashes kick ppl
if the server crashes it won't be able to update the database
because the server crashed
the plugin is no longer running
I am having an issue. Since upgrading my server and plugin API to 1.12.1, I am getting a annoying problem. If works fine for about 4 hours after every reboot, but then some commands fail ... It says "minecraft:null" so then I think "okay, it must be something null in my code" but the weird part is, it doesn't say anything is wrong in my file. Not sure what to do
org.bukkit.command.CommandException: Unhandled exception executing command 'sethome' in plugin utils
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:150)
at org.bukkit.craftbukkit.v1_21_R1.CraftServer.dispatchCommand(CraftServer.java:921)
at org.bukkit.craftbukkit.v1_21_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:50)
at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73)
at net.minecraft.commands.execution.tasks.ExecuteCommand.a(SourceFile:29)
at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(SourceFile:13)
at net.minecraft.commands.execution.UnboundEntryAction.a(SourceFile:8)
at net.minecraft.commands.execution.CommandQueueEntry.a(SourceFile:8)
at net.minecraft.commands.execution.ExecutionContext.a(SourceFile:107)
at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:414)
at ```
I will update the database every time the data is changed asynchronously.
but that can lead to races where 2 operations modify the same thing at once
right now my commands just update the hashmap and everything works as intended, just yknow it's per session because i havent hooked to database yet
yeah im trying to make async calls in specific scenarios so it doesnt get into a mess of concurrency but im not sure how to implement his
i mean ig you could add some sort of system to keep those in sync but at that point just do what op is saying
Has anyone else ever had [Sat 20:19:06 ERROR Minecraft] null since updating to 1.21?
Yes that’s the challenge, you could have a cache and update the database at the same time
im saying a race in the database
2 async database operations being performed at once can cause a race
well actually idk some databases might have protection against that? not sure
Yeah I have experienced that before
that doesn't look like a full stacktrace
It’s called deadlock for sql I think?
yeah so each operation gets added to a queue that gets executed all at once every once in a while
ensuring no races happen
Caused by: java.sql.BatchUpdateException: batch entry 0: [SQLITE_BUSY] The database file is locked (database is locked)
Aghhhhh... Another database issue 😭 ... I keep fixing so many and then I run into another one. This time it works for a long time and then runs into this issue
depending on if operation are being done async or sync you could have either have some syncrhonous implementation of Queue or just some FIFO implementation of Queue that holds operations, and then have a scheduler being run in your manager class (or main class) that locks the queue, polls every element and performs that operation on the database, then unlocks the queue
i mean super simple you could just have something like
public interface SqlOperation {
String getQuery();
}
then just impl that for every different operation that you have
when syncing the database you just run each query, waiting for it to finish, then starting the next one
probably the regex its doing? regex can get notoriously slow
mapping UUID to faction IDs
then what can i do 😭?
for the cached map?
manually create a split method?
a
would this be non blocking
yeah that would be async
alr
in a CompletableFuture most likely
or i can make it async
is there a better way to ensure this doesn't happen? is there a way I can check if a database is busy and do something to fix it before running a command?
(I'm new to databases)
but you'd also have to lock that queue to make sure operations aren't being pushed as you're executing them
which would mean having 2 queues
not sure if there's a better way to do that ive never really done anything like it before
hmm interesting
btw @worldly ice i think ur github link just redirects to github itself on ur website
the sql lib you're using should have something for that?
does it actually
I do connection.close() everytime, but its clear that I am missing something right?
I am trying to figure out too why it doesn't occur until after a long time.
What are the effects of making a new Connection() every time in Java to a database when you call the function, is it better to make a connecton outside and pass it in?
I don’t think you want to close SQLite database after every use or am I wrong?
Im pretty sure you do, beacuse thats how the busy error is caused
use a connection pool?
this is now fixed
Would this integrate with what I already have easily?
And how would this solve my issue?
(just curious)
It should solve your connection closed issue I believe.
Gocha, if I were to guess my commands may be failing after a long time beacuse its in a different memory location or memory thread.. if I understand HakariCP, it would pool all connections into one address or thread?
You can also use try-with-resources to ensure the connection, statements, resultset, etc closed after it's done.
I'm not sure about the technicality but when I switched to HikariCP most of my problems with database got solved.
I mean I can't explain it properly.
Huh, okay. I'll take your word for it then and see how it goes. Thanks 👍
No problemo, good luck!
So I deleted the old default java sql driver and installed hikari, and it seems to work as simple as that? you dont know until you try it I suppose!
Nothing I need to do? My implementation was just the simple sql stuff you normally do
I simply went into intelij, deleted sdbc or whatever its called and put this one in
you didn't delete the driver.....
fellow intellectuals I have returned with more questions!
is there a way to make an async event run upon server shut down such as backing up info to a database we have set up
No events trigger on server shutdown
Use ondisable from plugin to back your info onto the database
In this case blocking is alright
The server will wait till the plugin finishes
Hello, it may be posted somewhere, but I havent been able to find it. Is there an expected release date for a 1.21.2 jar?
uh what
are you seriously asking for when spigot is going to update for a version that isnt even out yet?
yes, there have been 5 snapshots, it stands to reason that the team has a plan for it already
eventually™️
im pretty sure they dont even begin anything until the update is fully released
and there definitely are no builds release for snapshots or pre releases
?eta
There is no ETA. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.
before paper atleast 

I mean makes sense
and also is there even a release date for 1.21.2
nope
1.21.2???
yeah
the creaky bundles update
I'm still at 1.18 in my head 😭
or whatever its called
1.16 here
fr was about to say but then remembered 1.18
these updates are going too fast fr
?1.18
You can build 1.18.1 using BuildTools https://www.spigotmc.org/wiki/buildtools/
java -jar BuildTools.jar --rev 1.18.1
lmao
why is that a tihng
i didnt ask for that
I still remember 1.7.10
?fixmuhlag
MUH BABI
radstevee definitely regrets to for the most part inform you that unfortunately, they essentially are unable to definitely assist with definitely your enquiry, which essentially is fairly significant. Please simply really ask again later or possibly kind of ask someone else about this enquiry, demonstrating that the person that ran this command generally regrets to kind of inform you that unfortunately, they for the most part are unable to generally assist with actually your enquiry in a subtle way. Thank you very sort of much for kind of your time and the person that ran this command specifically wishes you a really good day, so the person that ran this command really regrets to actually inform you that unfortunately, they literally are unable to definitely assist with very your enquiry, or so they particularly thought.
Install 1.17 with BuildTools: https://www.spigotmc.org/wiki/buildtools/
?1.19
You can build 1.19 using BuildTools https://www.spigotmc.org/wiki/buildtools/
java -jar BuildTools.jar --rev 1.19
💀
hey how can i know the packet name with the packet id?
?1.21.2
doesn't exist
also cba is the best command
do you mean getting the packet object and its key from id?
if so
?xy
👍🏻
nms GamePacketTypes
will need some reflection
I don't think those actually have the ids
oh
just use packetevents and be done with it
Problem: I want to set the biome of each block on my spawn island that gets pasted into a world dynamically. Therefore i set the biome of each "row" of blocks meaning an area with the same X and Z coordinate, but that spans across the whole Y range of the spawn.
I use this code for this and have tryied debugging it but am not skilled enough to read the error
Btw. the error always occours on the same block. Its 2 stone blocks and should be covered by the getBiomeType() function
What I want fixed: The code should execute without throwing an error on that spot.
Understand the error code
Error (and debug): https://pastecode.io/s/wrer6d17
is this okay? 😭 im so sleepy so sorry if it's so wrong
i don't wanna ruin anything important
Also abt the try/catch i didn't rlly thought abt it, just made intellij make it
am gonna correct it anyways
Caused by: java.lang.NullPointerException: Cannot invoke "com.sk89q.worldedit.world.biome.BiomeType.toString()" because the return value of "mondlw.laserserver.laserservermanager.utils.WorldUtils.getBiomeType(int, int, int, org.bukkit.World)" is null
....are you creating a new packet type
which seems impossible since your code cant return null from that function
also wtf is pastecode.io
use pastes.dev or the md paste thingy
?paste
but it cant return null
@Nullable
public static final com. sk89q. worldedit. world. biome. BiomeType PLAINS
shit
BiomeTypes.PLAINS and other can be null
the biometypes from worldedit are the problem
this is why I fucking hate java nullability
i hate the worldedit biomes
why cant i use normal biomes
i cant even get a deep dark biome or stuff like that
cross platform compat
then at least get a fucking equivalent of the mc biomes
there are MISSING biomes
in worldedit
the only thing the BiomeTypes does is get the vanilla biomes
are they dump?
am i the only one who thinks java generics is meh
i would love if java introduced c++ like templates
where you can generate multiple classes
for some applications generics would be better, but there are cases where you would prefer templates instead
noo
imagine how much smaller fastutil would be if it was implemented via templates
print money
DFU
Me when P16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>
proper tree-shaking algo with templates would be a lot better than generics tbh
same!!!
hell yeah
claps in 80% of the server being germen
🇩🇪
Diese Kommentarsektion ist nun Eigentum der Bundesrepublik Deutschland
sorry optic will stop now
its not bad, i like it for certain things
it saves memory
by not preallocating classes for multiple generic type parameters
I'm gonna erase myself
you can use C++ code in java if I am not mistaken. Kind of the whole reason JNI and the related stuff exist
because biometype isn't inherently necessary
if you need it to be necessary then toss some default in there
You can use most to native compiled languages with JNI I believe
Pretty sure C and rust work with JNI
yeah, you have JNA, JNI, JNR and some other stuff
Java Native *
that's just a nasty way of doing that
also cross compatibility is gone
you would still have to compile to platform-specific dynamically linked libraries
if it is required
imagine using .dlls for copy paste operation that should be bundled in JVM already
well they are
I mean for fancy features you can look at manifold, I think they have a templating system of some kind
I think templates would be too much for the simplicity and predictable nature of java
blame arrays being covariant
nowadays Java is trying to move away from JNI and adopting the new foreign function and memory API
so calling out to native isn't as mind-numbing as writing JNI-style C bindings
there always have been other ways to go about that though, like IPC
usually you'd have your native service handling all the platform specific stuff that for some reason the JDK might not handle well, and then have your Java app communicate with that
rarely you'll ever need a better implementation's than the JDK's though, as far as OS-level stuff goes
You are not mistaken, and also vice versa.
Anyone needs a go developer? Can do APIs and kubernetes.
Sir, this is a java discord
?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/
why so, just a fellow developer trying to get some work
sure, this isn't exactly the right place to ask for it since the forums exist, but I can't fault them for trying
I can. How about we all advertise
does anyone know of a good animation api for particles and item display entities and such
any idea why this error happens? https://pastebin.com/PtME6f3m
how to send message to player in action bar , plugin minecraft 1.21
npc's?
Bukkit.spigot()...
Bukkit.spigot()... ??
which is not a spigot issue
sendActionbarMessage or whatever
it's not work
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
@EventHandler
public void onPlayerItemHeld(PlayerItemHeldEvent event) {
Player player = event.getPlayer();
ItemStack item = player.getInventory().getItem(event.getNewSlot());
// Vérifie si l'item est un diamant
if (item != null && item.getType() == Material.DIAMOND) {
// Envoie un message dans la hotbar
try {
SEND ACTION BAR
} catch (Exception e) {
getLogger().warning("Erreur lors de l'envoi de l'ActionBar: " + e.getMessage());
}
}
}
declaration: package: org.bukkit.entity, interface: Player, class: Spigot
like this ? player.sendMessage(ChatMessageType.ACTION_BAR "10");
player.spigot().sendMessage(ChatMessageType.ACTION_BAR); and ??
...ACTION_BAR, "blah"
it gives me an error
you are using paper not spigot then
ah no my mistake
you need a component not a String
I'm not sure I understood, I use craftbukkit
TextComponent
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(message));
sorry I'm a beginner but I put that in my plugin and when I take a diamond in my hand, nothing new
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacy("test"));
get the item from teh event properly, not from that crazy code you have
ok ignore me, I'm talking rubbish
be certain yoru listener is registered
yes
are you actualy holding the item?
yes
not just in the inventory
no
I wonder if it's just not possible to do this in 1.21
is this skibidi or fanum tax
So if python were another language altogether you’d like it?
Thy tongue shall cease to wag in such an unseemly manner, lest it bring dishonor upon thee
💀
nah i just dont like it
I mean its stupidly easy and simple to write some mock system w py
which is nice if u just wna prototype on something
If python were rust he would
(I 100% agree)
I agree with that
And python is basically a C++ wrapper at this point anyways
I like the AI shit in it, but in general, like production shit, python is ass
https://www.modular.com/mojo python but compiled by LLVM, coming soon
Rust level performance. Python level code. Good idea? ||I think not.||
Nah I would not agree w this
borrow checker is just a downside
I open the spell menu by right-clicking on a block with a helmet to cast a spell without any problems, but we have another problem, When right clicking with the Helmet, it puts it on the player and this causes a bug
Is there a way to block it?
That's an immature opinion to have.
I am an advocate for manual memory management as a fan of the way Zig does it (explicit allocation w/ multiple types of allocators, including a standard library arena allocator)
But, simply put, even arenas have a cost. They might not be too good for restricted memory systems, so you're back to that malloc/free manual lifetime shit that borrow checking is built to avoid.
^ I like this
Garbage collection and reference-counting are no-gos for so many projects, if not because of the lack of native languages with either (only examples that come to mind are Go and Swift), then because of the time costs which makes it impractical in real-time software, game development, and various other projects.
Guys I'm getting crazy, how am I supposed to do gradient messages on bungeecord?
just wait until you find out the amount of jvm projects that are used in high frequency real-time needs
Rust's memory management is mostly just RAII in disguise.
No, I don't like the borrow checker and I consider it a downside to other alternatives
One may have an opinion
Yeah I hate memory management. Too many years of dealign with it
the borrow checker doesn't let me do the things I wanna do anyway (resource leaks)
Much nicer to have it done for you
I like Zig's approach, it's good
Box::leak, have fun
Memory leaks are not unsafe in Rust 'cause they can be done intentionally and they don't cause undefined behaviour.
looking forward to anyone who has time 🙂
I don't disagree with you there, my point is simply that there's a point to borrow checking so it's not inherently a downside.
If you don't like it, then so be it. I just didn't take too kindly to your phrasing.
gradient is just one different colour for each character
Either way, wrong channel for this so I'mma go
so, each character is its own TextComponent
with its own colour
all siblings of an empty parent TextComponent
I don't see any documentation on that
there was an old page for 1.16 but the class don't exist anymore
and clearly this is wrong
both tbh
i need somehow to handle both rgb and gradient
I mean gradients is just a different rgb for each character
and yeah with that code it's returning an empty message
i'm all ears
lemme check closely
pretty sure there's some Matcher#append you can use passing the StringBuilder.. i don't remember how exactly and I'm on mobile, wait
yeah something like
while (matcher.find()) {
matcher.appendReplacement(builder, ChatColor.of(matcher.group())
}
matcher.appendTail(builder);
return translateBlahBlah(builder.tS())
I believe
let's see
append replacement doesn't exist here, probably some java version requirements?
nvm i'm stupid
mh, maybe not
sorry i see this at this time, what do you mean?
you're calling the createClientboundPacket method
yes
i want to
like
it its: new Clientboundblablabla packet = new Clientboundblablabla(args)
I am trying to update my code. but i cant seem to update the Yml Annotation. But i can only see up to version v1.20
But want to update it to 21, or any new mc version for that matter
it hasnt been updated yet
how can i send bossbar packet to the client?
what the fuck is that
Api version??
the plugin annotations
what is that
for what?
spigot has a repo called plugin annotations whichs allows you to create the plugin.yml via annotations
why not create the plugin.yml manually?
why
why not?
but why yes
yea its the anotation plugin, and i also use it with kotlin
it's easiest to create manualy plugin.yml
who said that
me
if you use gradle you can use the bukkit yml plugin in build.gradle
because the annotation is like 5 lines, and so you can just put it together in your main file instead of 2 speerate files
you can very well create it in gradle ^^
i mean it's useful for plugins that for example register custom commands
what
for what version
Just use the API?
Use the API
^^
bossbar are for server
??
??
i want to send it to one single player
Yes
Player#sendBossBar?
Use the API
oh cool, i didnt know
The API has support for perplayer bossbars
does that update faster?
😳
yeah
It's actually BossBar#addPlayer mbmb
declaration: package: org.bukkit.boss, interface: BossBar
or well more of it has no updates, most of the stuff is strigs or future proof
damn you dont reflectively add ur commands?
come on rad lock in
also use the minecrell one
No I make my own Java agent which adds them to the NMS command map
why
has a built in library dep type
val pluginLibraries = mutableListOf<String>()
fun DependencyHandlerScope.library(notation: Any) {
compileOnly(notation)
pluginLibraries.add(notation.toString())
}
this works tho ig
but bukkitLibrary is easier
nerd
and you dont have to specify it, it just adds them
nuh uh

nah thats miles
both of you
i dont wear glasses
me neither
Is it possible to see what my velocity/factions of which resource of such plugin or of minecraft itself is consuming processor? I would like to decrease this usage, although my tps is at 20.0, this is with 60 players and my processing is at 40%
what
you want to know if it is your plugin consuming resources or just the server itself?
You'll want to use spark and check its plugin-specific metrics
often times, plugins won't show up as the cause since the cause is usually indirectly related to the plugin, i.e. some API method forced a chunk load, and that's all going to be on the server metrics and not the plugin's
that said, if you have 20 tps with a good mspt, then don't bother with it since you aren't having issues now, worry about it when you actually have issues
Yes, I will contact a YouTuber with 1 million subscribers without doing benchmarks
But in Spark I only know how to see what is decreasing the TPS, I would like to know how to see what is responsible for the processor usage
does anyone have a guide or wiki to create a Math.sin()
there's a way to make sin wave by infinite fractions
it's very slow tho
math sin i think uses a sin table
as I told you, it isn't possible to accurately know that information
Bro wants reinvent the weel
bro i mean to use math.sin
and what's so hard about that
you don't have to make fun of me ok
the information Spark gives is the best you're going to get
i don't have a guide or wiki to learn it
to learn what
Take a basic trigonometry class
how to use math.sin
what do you wanna do?
create an int that goes from 0 to 100 and then from 100 to 0, in a loop
what does that have to do with sine
you don't need sin for that
alr
alr
were you talking in the sense of a radian circle perhaps? Because that's different
do you use it? Since i have a bit of a hard time setting it up.
I cant seem to relosve the Unsupported class file major version 63 error when trying to Load the gradle changes. in my IntelliJ
It seems this error has to do with outdated java version of some sort, but upgrading that does not result in any change
that plugin works but you'd rather use jpenilla's resource factory instead
So how do people avoid better hosts and optimize their server?
by looking at spark reports
it provides enough information to make a reasonable guess of where performance is getting hit
what is the spigot equal to the minecraft-Component ?
but spark only analyzes the tps
i got quite the confusion
My TPS is at 20.0 but with 60 players my CPU is at 40%. I believe I can only host around 200 players but not because of the TPS but because of the usage.
use one of the convention plugins
that isn't really a good estimate of how many players your server can fit, still, 200 players is around where the limit for a minecraft server goes anyway
im on 1.8.8
and there are many servers with many players on one server
yeah, that isn't necessarily the case
?1.8
Too old! (Click the link to get the exact time)
there are very few servers that can afford not splitting up things into multiple instances, hence why you see so many servers with 20 lobbies
all of that said, even in 1.8.8 the limit is around there, but I wouldn't be sure how to even begin optimizing 1.8 builds, you're on your own there
you have nowhere near as many options
There are types of modes that cannot be separated into several servers unless you can separate a world into several hosts without delay.
I am aware, however it is what it is
minecraft servers are just not made to hold that many players to begin with
nowadays for such gamemodes people would use folia, however that isn't available for 1.8.8 so uh, good luck I guess
what does folia do?
where can i find that? i see 1 tester file and thats it
regionizing the world, which in turns uses more cores but you can retain more players that way as well
read the whole readme, don't just skimp over it
wdym regionizing the world?
separate a world into several hosts?
Folia is only going to be useful when players are spread out
Which mostly means survival servers, and idk who’s still running a survival server on 1.8
no, that is what projects like multipaper do, which is called horizontal scaling. folia or shreddedpaper allows for vertical scaling
it is true that projects like folia only really help when players are spread out, however that is ultimately the only way to scale a minecraft server beyond what's reasonably feasible
any other means require severely modifying the vanilla experience, which isn't good
What does folia do to help these types of servers? Multiple threads in one world?
it uses more threads/cores for the ticking logic, yes
that said, these projects are extremely experimental so without the money to have a development team behind it, you won't be able to run it
Ok I get it.
excellent advice 😅
it works now, tho i have 1 question, what do these convetions mean? Like, is it just a template, and can i use a bukkit template on a paper server?
it is a gradle concept, there's plugins and there is plugins which apply conventions
as you say, it is essentially a template so you don't have to use the "raw" plugin like you were attempting to do earlier
in this case, it has conventions for bukkit yaml (aka plugin.yml), paper yaml (aka paper-plugin.yml, you can read up about paper plugin in paper's documentaiton), then forge and fabric ones
however resource-factory is more of a general plugin that has facilities for generating resources like these convention plugins do
ah cool!
I was using annotation before. However, that wasnt updated for version 1.21 so thats why i wanted to switch to something that i dont have to wait for it to update.
And i assume that due to this being string based (the api version) it will pretty much work always right?
it should, yeah
okay, thanks! you have been a great help
np. Also I forgot to say, you don't have to explicitly set the name and version, as those are inherited from the settings.gradle.kts rootProject.name as well as the build.gradle.kts version field. Though you can still override them if you want them to be something different than these fields
oh lol
yea that saves 2 lines haha
i think in almost all cases they will be the same anyways
Please update Kotlin
2.0.20 has been out for a while
You are on.. 1.7.22
You can also just use property access syntax since (iirc) properties are delegates or have operator funs
Someone know how to add customs implementation of RecipeChoice to org.bukkit.craftbukkit.inventory.CraftRecipe? T*T
cuz i can't override this classes and i don't really know if i can add new stack from another way ^^'
Yea I believe you have to do that
but not sure
Touching api impl is unsupported whatever you're doing isn't smart don't do it
well how can i compare item from a custom data in ExactChoice?
cuz my items has UID that make the comparison always false :>
Don't provide a UUID that makes it always false then
i need theses uid
Unless you're inferring the comparison doesn't work at all which case it's a bug with item meta
Are the uid the same as the item you put in to craft?
nope
Then why do you expect it to work
Ofcourse it won't work you're violating the whole Exact part of Exact Choice
THEN
Is there an event of deleting an item? (Auto deleting)
Use the events
eww
Their are crafting events you'll just lose the luxury of the recipe books
Not even sure what this means but no no event tracks item deletion. You can use ItemDamageEvent or whatever it's called to see when it breaks or EntityDeathEvent to see if an item falls in lavq but that's the extent of it
I mean after 30 seconds of laying an item on the floor it is deleting itself
Like auto clearing
Called despawning
(Maybe more than 30 seconds I dont remember)
It's 5 minutes kekw
Yeah, thanks, i forgot
anyway gimme the way i could achieve that idc
?jd-s one second
just let me cook
The events
not that
Or fork craft bukkit
let me cook 
declaration: package: org.bukkit.event.entity, class: EntityRemoveEvent
You are not cooking at all
hello, I'm trying to cancel a craft through the autocrafter but i cant find any events or ways to do it. any ideas would be appreciated!
"gngngngngn" trust me even if we dont know each other
Hello fellow anime girl pfp. You're likely looking for this wonderful event
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/CrafterCraftEvent.html#<init>(org.bukkit.block.Block,org.bukkit.inventory.CraftingRecipe,org.bukkit.inventory.ItemStack)
declaration: package: org.bukkit.event.block, class: CrafterCraftEvent
thank you! love the pfp
damn bro don't you have a gf
i thought you said you did
I used to
I nolonger do
How dare you torment my broken heart 😭
rip
That’s an oof
anime pfp 💀
Hey wait
Cringe asf anime pfp
yeah I would never
friendly fire
nah
I'd say there's a 70% chance
already had me typing there's*
My ex domesticated me into correcting my wrong there their there's theirs
I'll never understand how people can confuse them
the only thing I always get confused about is these and those
I don't confuse them I'm just criminally lazy
What’s a R18
you don't have to know
You'll know when you grow up
I only know R34
rated 18
Oh
I found the original art, it was indeed not r18: https://twitter.com/TTuSee5/status/1416357755909144578
We are talking about ratings not rules
That's wild
Such R18 vibes ✨️
reverse image search scratches that 'tism in me
yesterday I spent 4 hours searching for Sweattypalms IDE background
did you also get it from the devianart comments