#development
1 messages · Page 84 of 1
yeah but didn't notice it was default
🤔
Maybe try with reflection 🥲
I am looking for developers who can develop a paid server according to my requests.
this worked! thank you
Anyone able to help with marketing and advertising on my Minecraft server network? If so dm me asking for the price (commission based)
Yeah but it doesn’t let me say dm for price.
so don't do it
set a price
at least a range or a budget
But it’s commission
okay, state your budget for paying for commissions
Like 10%
okay so multiply your possible profit by 0.1
and set that as the range
and put a + at the end of you're really not sure
Erm
at least mention that it's commission based in the request lol
and a range for percentage
Any ideas how I make it so when copying a clipboard with WE (API), it doesn't copy entities?
forwardExtentCopy.setRemovingEntities(true); doesn't appear to do the trick
Which code can I use to edit the EssentialsX sound effects?
on the developer version uses sound: but on the stable version isn't using the same command.
What the heck is this class not found error https://paste.helpch.at/wurogebede.css
ServerVersion.kt:115
Is there any way to help the CheckItem expansion be updated? I desperately need it to take the minecraft:custom_data component in 1.20.6+ and it doesn't seem to do that. v2.7.5 does handle item components, just seemingly not the custom data one
How are you including Kotlin into your plugin?
oh ig I could look
I did not change anything, someone sent this to me
so I'm confused
Classic not relocating kotlin problem most likely
I've had this issue when I relocate Kotlin stuff. My guess is another plugin on the server also uses kotlin.
There's also an issue somewhere about Kotlin's Any type not relocating correctly, idk what the status of that is or recall if the context is relevant.
Ye.. it is an old project :))
old ancient
can i paste an error here?
should probably ask in #general-plugins as this is a coding help channel (unless it's a coding-related error but judging by #dev-general message I assume not)
and also make sure to post the entire error
its just 2 line error...
https://i.imgur.com/fzgRNFz.png
but ig you can also ask in #minecraft - I've seen ppl ask there as well
hmmm
can you just read it in #dev-general ?
I don't know what the issue is
ok...
Is this inefficient? It says that the tree function is made for debugging
String newMessage = MiniMessage.miniMessage().deserializeToTree(format,
Placeholder.parsed("group", group),
Placeholder.parsed("prefix", prefix),
Placeholder.parsed("suffix", suffix),
Placeholder.parsed("world", player.getWorld().getName()),
Placeholder.component("username", nameComponent),
Placeholder.parsed("message", TextUtil.applyColor(message, chatColor)),
TextUtil.papiTag(player)).input().trim();
return MiniMessage.miniMessage().deserialize(newMessage);
I use it because I need to trim the message before returning it
Yeah well this doesnt even work lol
Because I need to trim it to remove unnecessary spacing
The format is format: '<prefix> <username>:<reset> <message>'
But if the player doesnt have a prefix it will addd a space before the username, which it shouldn't
Anyone got an idea?
I think you can use text replace config, and replace \s+ (one or more space) with (space)
But that wouldn't fix the first space if the player doesn't have a prefix
Then it would have a space before the username which looks weird
Two text replacements? 
^\s+ (space at the beginning of the text) > space
Does this replace first char if it's a space?
It matches all spaces at the beginning of the text, and then you can replace them with whatever you want
Ohhh nice
Do you know if it can have multiple matches per replacement?
return MiniMessage.miniMessage().deserialize(format,
Placeholder.parsed("group", group),
Placeholder.parsed("prefix", prefix),
Placeholder.parsed("suffix", suffix),
Placeholder.parsed("world", player.getWorld().getName()),
Placeholder.component("username", nameComponent),
Placeholder.parsed("message", TextUtil.applyColor(message, chatColor)),
TextUtil.papiTag(player))
.replaceText(TextReplacementConfig.builder()
.match(Pattern.compile("^\\s+"))
.match(Pattern.compile("\\s+"))
.replacement("")
.build()
);
This replaces all spaces which I don't want
Fixed btw
I need help from someone experienced with NMS. I'm trying to create a copy of the anvil menu to move the slots around but I don't understand how the inventory is created.
This is what I currently have https://paste.helpch.at/kohesukumo.kotlin
like the.. vanilla anvil menu?
you can't move those slots around
not without a clientside mod, right?
That's why I'm trying to make a copy of the vanilla anvil menu with different slots
i feel like if this was possible i would have seen it been done
but idk
Then call replaceText twice?
Yeah had to change the regex as well
Currently getting this error tho https://paste.helpch.at/zaqelexivi.css
I'm using NMS and it's working on my local pc but not on external server. Both are on exact same 1.19.4 version, anyone got an idea why?
Using the dev bundle paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT")
is it possible to make damage be handled as if the player is wearing a set of armor that they aren't wearing? a simple armor damage multiplier isnt sufficient because explosion damage needs to be accurate
copy Minecraft's code
Isnt there an attribute or smt that gives armor ?
READ whole before you start typing about me skidding ty.
does anyone know of a good generator plugin (SRC)? I'd like to steal take ideas from how they handle the schedule related stuff & chunks (loaded/unloaded) to increase performance; or it would be good if you guys could actually give me an idea on how to handle these, I've been more or less unable to solve this issue myself without causing performance issues to the server.
Seems like you are taking the wrong approach to the problem
Instead of looking for what others did right, look what you did wrong.
Generators would only cause more problems I imagine since it's a blunt force approach Did not think this was about chunks
Tell us how YOU did it, and what's the performance problems
I have done generator plugins in 2 ways, both always seemless performance with thousands and millions of generators, but it took me 2 other tries to achieve it.
Figuring out what you did wrong is way more helpful than finding something that already works
Yes, generic.armor or smth
The thing I did wrong is basically make a schedule and made it run on all the available generators that are in the SQL db on a separate thread, which somehow also ended up effecting performance if it's just too much or the amount of time is just too low (like each second)
I've absolutely 0 clue on how to improve / fix this and want either some help or at least something I could take reference to, to improve my knowledge.
Is not enough to run things on a different thread, you still need optimization
exactly what I'm looking for
You could load the generators when the chunks are loaded for example, is not worth to pre-load 100 chunks for 100 gens if only 5 are active
I've absolutely no idea on how to optimize this, at first I was thinking of getting the 4 borders of the loaded chunk and not check again if it's loaded or not and remove once done with that chunk but idk how to do that pretty much so yeah I'm gonna have to dig into it more unless I get a better suggestion
how do I load the generators when chunks are loaded? is there an article that explains how to do such thing? I'd appreciate the referral to it
There is a chunk load event, that gives you the chunk that was loaded
Then get all gens in that chunk
And cache them
That might help a bit
There are also other things that can help
There is also a ChunkUnload event, you can use that to stop the generator (and resume on next ChunkLoad event) or unload it at all
If you are dropping items, might help to stack them
Less user friendly, but better is to also just get a count of generators placed of each type, then only cache a single generator of that type at that chunk, and drop the item times the amount of gens in that chunk, at that single generator
Removes the fact you have to loop through all of them
There are also some other things you can do, but that depends on how you want your gens to work.
Some people do the so called Vaults, which store all drops into them digitally
That's even more optimized
And then even more optimized is being able to stack gens in a single block
But again, these last 2 modify gameplay quite a bit, and most servers opt out of it and it usually is alright
Does anyone know how to make separate worldborder for different worlds?
I have this issue where the worldborder is being shared
I used
World world = Bukkit.getWorld(worldName);
if (world != null) {
WorldBorder border = world.getWorldBorder();
border.setCenter(initialX, initialZ);
border.setSize(initialSize);
this to set the worldborder,
And I am assuming that this saves the data into the level.dat in the world's folder
but the real problem is when a player joins the non native world, the worldborder is not what it should be
like, in server.properties, my level is named 'world' but my other world is named world2 for example
and even if i set the worldborder for world2 200 in the plugin, the server will only load the worldborder from 'world''s level.dat
tyvm
Not dropping items, adding them to db to show them later in the GUI, since that's basically what the modpack does (trying to recreate it 1:1)
Sounds like we both misunderstood the type of generators you were speaking about
What mod are you trying to recreate?
tho I doubt I'll be able to recreate it 1:1 with the villagers, plants, etc being like that even with armor stand/npcs but I'm trying my best to replicate as much as I possibly can
Ig you can replicate the blocks using block display entities, and for the entities inside, spawn one, disable its ai and stuff and shrink it down by using https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html#GENERIC_SCALE
I appreciate what you've provided me ❤️ this will make things easier for me, thank you.
That is REALLY cool, good luck
Note this only works on latest versions
I believe only 1.20.6 and higher? that's enough, I'm not looking into support 1.8; though it would be cool if it was 1.20.4 and higher
Display entities were added in 1.19 or something, the scale attribute is newer but you might have luck
Although, I don't see any reason to support anything but major releases and at most the latest patch (e.g. 1.19.4 is the latest patch of 1.19)
If all you’re doing is showing them in a GUI, you don’t even have to tick them because you can just calculate the amount of items when the GUI is opened.
Display entities have always had scale via transformations.
Living entities use attributes
ping mb
Ye and I was talking about living entities. If you open that link to the mod, in the pictures you will see some tiny villagers and other entities inside blocks
Exactly
You just have to calculate the between now and last opened
And ofc the amount already stored
You could also pick a random amount every time and tell the user they’re wrong if they say something about it
do you think it would be possible to use NMS or bukkit methods to re-calculate the damage with different armor on?
ez, spawn a fake player with various levels of armor on and measure the damage dealt
this is just so cringe
just copy NMS damage method
honestly you could probably generate a lookup table of all the combinations
woah buddy
or just COPY A FUNCTION
nah
cmd c cmd v
cringe
this isn't possible
you can't have a lookup table for damage and armor
does Papers entity#damage not respect the damage with armour
he doesn't want to respect damage with armor
oh
how come
he wants to deal damage as if a player has armor
how would you lol
you'd need literally like a million values in it
Why
ok and?
just. copy the damage function
so player has no armour but it........ the damage they receive is reduced by invisible armour
ya
so I'm saying like. just copy the damage function
and handle it like that
question
and it would be inaccurate still?
couldn't you just set an attribute to the player
probably
this statement should destroy your reputation as a developer
all due respect
lookup tables?
lookup tables for nondiscrete 3 dimensional functions
bro all people used from the 1970s to the 90s are lookup tables
you're doing the equivalent of saying instead of calculating x^2 one should simply have a lookup table for all possible values
That's how we used to do math 👴
calculating stuff by finding it on a times table square is insane work
people use lookup tables for fast bit manipulation, for trig function lookup, maybe for log shit idfk but definitely not for multiplication
things with a defined small range of values
It was moreso for things like logs
not a continuous function for which one needs to have 2 continuous inputs
and handle hundreds of damage
you can have discrete values and interpolate
20 different armor values x 1000 damage values
and 20 different toughness values
toughness is fake
byeah
so instead of copy pasting you would
- have a non negligible error in your result
- have a map of at least 400,000 inputs
- have to do all the work to get those inputs in the first place
index into that map of 400,000 every time a player takes damage
the benefit being that you dont have to maintain your code for every single change to how damage through armor is calculated
One map for allat?
you would have to make a new 400,000 hash map
ok?
the benefit is. you don't have to copy and paste. one extra time.
oh no 8mb of memory
1.5 gB
ah yes 1562 megabytes of memory for an inaccurate damage calculation
or wait
fuck I'm stupid
yes
that's kilobytes
you are
okay fine 1.5 MB
you're suggesting a 400k hashmap instead of copying 1 function
which is slower and less accurate
yeah, if it means my code doesnt have to be updated in a few years
😏
objectively bad solution to save 5 seconds of work
If you cared about perf, you'd use Rust
"copying a function"
Objectively bad solution compared to Rust really
indexing into a 400k hashmap every damage event
just
are we talking about the same numbers
I'm out here trying to optimize my code down from 200 microseconds to 50 with SIMDs
seems like a waste of time to worry about microseconds for a mc plugin
seems like you don't actually know what you're talking about
ok
🩷
0.2 ms vs 0.05 ms
0.0002 seconds vs 0.00005 seconds
Yeah idk man, seems like you're working too hard
no I'm joking sort of
the microsecond measurements are when I benchmark with JMH
but it's significantly slower on an actual server
taking milliseconds
the meshing for some large objects takes up to 500ms with a previous algorithm
and even though it's asynchronous it's obviously unacceptable
or at least unacceptable by my standards??
but apparently my standards are significantly higher than most because how the fuck does one suggest indexing into a 400k hashmap every damage event as a legitimate suggestion
"or at least unacceptable by my standards??" 🤓 ☝️
Apple User DETECTED
it's my dad's ):
L
what if you set the armor, damage the player (if there's a way to damage the player + armor?), then reset the armor?
so player gets dmg, you cancel the event, you set the armor, artificially damage the player and then reset it?
if you look through paperweight or nms there's probably a much more seamless way to do it but yeah ig
yeah
how would you do this with explosion damage though
similar concept, since iirc you can get the raw damage from the event
^^
or there may be a way without looking through nms using damagemodifiers or something - remove the armor damage modifiers and replace it with your own
i forget what they're called
yeah but how do you manually damage the player in a way that the armor affects it
you might be able to just modify the event, or I was originally assuming #development message would work as well
https://media0.giphy.com/media/Quz7YOOjcOZqW6MMTf/giphy.gif
https://media0.giphy.com/media/cMK6vI8EgSWA1Tzete/giphy.gif
your suggestion won't work for these 2
if you notice one spawns an iron golem then damages it, the second makes a crop grow
true, but same issue as above; in other words: can't be made like that
I also thought at first to make it like that since I could then easily just edit the DB and check when it was last open and what the data was but that doesn't solve the IronGolem spawning & getting damaged and the Crop Growth
just noticed mentioned both of u mb
Tbh I think you can also make a custom 3d model for the animation and just spawn the item.
I would use packets for the displays anyways, so you can do those async
And even if not, you could tick those and not the other types
yeah.. except I'm using packets but idk how to do a proper schedule without performance issues
Unless you have a lot of them, you really shouldn't have to worry about it
Wdym by proper schedule?
Send the packets only to players that are in a radius to the generator
I've been using packetevents + EntityLib for this, my code rn was more or less ArmorStand creation but at one point I just started slowly moving to entities.
But still, I'm unsure how I will be able to handle the schedule as to when I should be spawning X iron golem in Y iron farm
You can just do what Minecraft does and tick the blocks, or something like
Map<Integer, Collection<YourBlock>> blockTicks;
void scheduleTick(int tick, YourBlock block) {
// put into map
}
void tickBlocks() {
Collectiom<YourBlock> toTick = blockTicks.remove(currentTick);
// tick blocks
}
soo pretty much listen to a tick and update on each tick // see when was the last tick and compare to new tick if it's X ticks away it would run the "schedule" for that farm?
Wouldn't this cause issues on restart tho? as far as I remember when I was testing ArmAnimation per tick I noticed the tick id being reset on restart
Well you're going to have to save your data
If you don't use packets you can just use persistent data containers, but if you use packets you're going to have to store the locations somewhere
I'm more or less saving my data in a database: https://github.com/Anthony01M/EasyVillagers/blob/1.0/src/main/java/xyz/berrystudios/easyvillagers/database/model/CustomBlocks.java (not fully committed code)
this is pretty much done ish, I just track the player movement data, will have to make it so that it views it later on and remove when they aren't near
Hold on, you don't cache data from db??
On every BlockBreakEvent you query the db to see if the block is a custom block ☠️
atm yes on github, I've implemented the cache on local
dies
I'm using AlessioDP's fork of libby to download dependencies at runtime (I know that Spigot now has a feature which solves this problem but that wouldn't work in Bukkit and other servers unrelated to Spigot). Someone has any idea on how to use this library? I can't find much detailed information on how to use it and looking at the code of other plugin which use this confuses me
https://github.com/AlessioDP/libby/tree/gradle#usage
are there certain questions that you have? I'm assuming that you put those in onLoad
also AlessioDP is in here so you can probably ping them as well
I struggle with the libraries once they are loaded (supposedly). I've put them on the onLoad method, following that usage guide you just sent. On first place, my IDE does not aknowledge libby for some reason, probably a VSCode bug, as I had set that up on my maven project and the lib is getting bundled in the jar as expected.
I also have some questions:
Should I still import the packages as I did before? If I do I get an error that says it couldn't find the library and if I don't it simply just fails to resolve to a type.
When I relocate a package (such as libby itself, the readme instructs to do it) both the IDE and the server can't import it. Import cannot be resolved. This may be probably my fault, but I don't seem to find out what's wrong so I would appreciate some help with this.
Lastly, should I set up Libby in the same class which imports the requested libraries? The readme file does not menction how to use the loaded libraries, so I'm a bit confused on that
@long gust sorry for the ping, but I would be so grateful if you could help me out
Should I still import the packages as I did before?
yeah, although using compileOnly/provided scope
When I relocate a package (such as libby itself, the readme instructs to do it) both the IDE and the server can't import it. Import cannot be resolved.
can you show your build.gradle/pom.xml?
Lastly, should I set up Libby in the same class which imports the requested libraries?
I'm not sure what you mean by this
In the first question I mean on the class itself. Should I still do import com.example.whatever? That is kind of related to the third question. If I try to import a package which can't be found Java throws an error The import com.example.whatever cannot be resolved. What should I do with this?
yes (original package)
and I'll need to see the pom.xml/build.gradle
Let me put it in a pastebin, give me a minute
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
• HelpChat Paste - How To Use
Just to throw this in here - essentially nobody uses just Bukkit, and if you’re developing with the Spigot API, people are going to need to be using a Spigot-compatible server where you can use the library loader.
oh yeah that too
I don't think Bukkit by itself exists anymore as a server jar?
So I would seriously recommend looking at that or just shading your libraries
Well CraftBukkit technically but yeah basically no
hm
I used to use the Spigot library loader, but I'm changing it because someone opened an issue due to the plugin not working on craftbukkit
☠️
I would say that CraftBukkit is not supported lmao
In the year 2024, it is unbelievable that someone is still using CraftBukkit
Because all the dependency downloaders have basically stopped development since Spigot and especially Paper now both have their own native ones
Just googled it, it seems like it is still supported. They have some 1.21 versions on the getbukkit website
ohh there's a --compile craftbukkit flag
note that getbukkit is unofficial and illegal (?)
Tbh I just googled bukkit and it was the first result. I don't remember using bukkit at all so I thought that was the official site
Look at this graph of server software usage
Less than 1 thousand servers yeah
Compared to 90 thousand paper, 32 thousand Spigot, and the dozens of thousands of compatible forks
So all in all, it is 100% not worth your time to redo your whole dependency setup for one of the 0.01% of CraftBukkit users
Ok, thanks for the help
Lol CB 
yeah even spigot themselves stopped supporting it or distributing it for production use
Anyone know how to make a plugin
I got code
But I don't know how to make it to plugin
Google it
I mean I have the code
I don't know how to make it into a plugin
@lyric gyro
@torn heart
Yo
Ixume
You now how to
In this channel, can I ask for help with anything that's not related to PlaceHolderAPI?
For development topics, yeah!
Hi! I'm trying to set an item to an ItemDisplay via packets, and it works fine, but when I try to set AIR, it doesn't work. It only works when I set a material that isn't air. I assign the ItemStack this way and then send a PacketPlayOutEntityMetadata to update the entity. Does anyone know why this is happening?
code:
@Override
public void setItemStack(ItemStack itemStack) {
net.minecraft.world.item.ItemStack nmsgItemStack = CraftItemStack.asNMSCopy(itemStack);
itemDisplay.a(nmsgItemStack);
Bukkit.broadcastMessage("set ItemStack: "+CraftItemStack.asBukkitCopy(itemDisplay.t()).getType());
PacketPlayOutEntityMetadata metadata = new PacketPlayOutEntityMetadata(itemDisplay.an(), itemDisplay.ar().c());
players.forEach(player -> ((CraftPlayer)player).getHandle().c.b(metadata));
}
since you're using obfuscated methods you should probably say which version you're working with
I can't help you rn but that might increase the odds of someone knowing the issue
what does an item display of air even look like? is it just invisible?
and, for "it doesn't work", how? does it just not change the item display at all? does it throw an error or something?
It doesn't throw any errors. When you set an empty item, it should simply become invisible, but it doesn’t happen. If I set another item, it changes perfectly; this only happens with empty items/air
1.21.1
I couldn't solve this, but I used the setViewRange method. Setting it to 0 makes the entity invisible
Yeah I wouldn't be surprised if this was a limitation somewhere on purpose to stop you setting it to air
either like ProtocolLib, Spigot, or the client
man I gotta say, just recreating your example, Paperweight/Mojang Mappings are so nice man
val itemDisplay = ItemDisplay(EntityType.ITEM_DISPLAY, (clickEvent.player.world as CraftWorld).handle)
val itemStack = ItemStack(Material.AIR)
val nmsItemStack = CraftItemStack.asNMSCopy(itemStack)
itemDisplay.itemStack = nmsItemStack
val metadata = ClientboundSetEntityDataPacket(itemDisplay.id, itemDisplay.entityData.packDirty()!!)
clickEvent.player.world.players.forEach { (it as CraftPlayer).handle.connection.send(metadata) }
so readable!
the Kotlin highlighting in Discord does leave a lot to be desired, though
xD
One question. Have you tried it? Although, by default, it comes with an empty item, so it should be changed to a stone, for example, and then after X seconds, put an empty one back
I have not, I just wanted to see if I could recreate your code and look at the decompiled code to see if there were any specific checks to prevent this, as I know it starts out as AIR, 0, but I didn't see anything.
Might be client-related honestly, not sure
I hate not being able to post an image here >.<
?imgur
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.
@tawny cobalt #1257956030315495496
hi!!! Does anyone know the best way to create an inventory back button? The behavior I'm looking for allows a player to go from a container back into their default inventory screen (the one with the 2x2 crafting square)
You can not open a player's inventory sadly
Probably not, the inventory is client side I think
oki, thank you for the info
Hi :)
Just to be clear: You want to go from one container (i.e. an Ender Chest) back to a Players inventory? Without commands, I assume? Just an item that will take you "back"?
Isn't the players' inventory already visible when you are inside that container?
The crafting box and equipment is not
yeah
good point.
Anyone know how to install blisssmp
not the right channel (ask in #general-plugins) but do you mean
because if so, note that they have a discord server for support, and also they have a "How to Install" section - did you follow those steps?
they have a discord server for support, and also they have a "How to Install" section - did you follow those steps?
I can't send invite links here, but it's on the spigot page
Dm me privately
...ok
Hey
public void onPlayerDropItem(PlayerDropItemEvent event) {
Player player = event.getPlayer();
ItemStack item = event.getItemDrop().getItemStack();
ItemMeta meta = item.getItemMeta();
if (meta != null) {
String displayName = meta.getDisplayName();
if (MAGIC_WAND_NAME.equals(displayName) || CHEST_OPENER_NAME.equals(displayName)) {
event.setCancelled(true);
player.sendMessage("You cannot drop this item!");
}
}
}```
i have this code which cancels the item dropping of 2 items and it works. but if i open my inventory than go to the item with my mouse and click q to drop it i recive the message taht i cant drop it but it just dissapears from my inv and is not on the ground.
Can some1 help me?
please ping me when you answer me
you just need to cancel the inventory event as well then
Anyone knows how to make a plugin
as Aki mentioned you have to listen to InventoryClickEvent, but note that it's also possible to drop the item by clicking/dropping the item outside of the inventory as well so make sure to account for that
Is this only Minecraft related or is it also Discord related?
General programming, doesn't have to be minecraft
I need a template I’ve already tried this, but didn’t get it to work properly
so, in other words, you wanna be spoon fed?
Exactly
https://www.google.com/search?q=discord+music+bot+github
try some of these
they likely want a pre-made bot
not really a #development question tho
I just need its codes for the music, so I can implement it into my bot
um
then this
- JDA Discord server
which can be found on the link that matt said as well
They wont feed me with a template 🙄
Ofc not, that's not what this channel is for lol
If you want to get fed ask chat gpt or something like that
already tried 😂
mb then gang
I'm having some trouble with display entity rotations, specifically item displays.
I'm trying to rotate an item to face the same direction as a Vector (for ex. the direction a mob is looking at).
I figure out how to do it, and for some items like swords I also need to take into account their default rotation because they are tilted.
Has anyone done anything similar/know how I can go about it?
Also if you could ping when you reply that would be greatly appreciated.
does just rotating by 45 degrees around the x or z axis not work
That might work for making it straight, but I also need it to face a specific direction
just do both
That's what I'm trying to do lol
are you using org.joml
Yes
it has a rotateToVector function
do that then also rotate by 45 or -45 degrees around x or z axis, I forgot
rotateTo expects two vectors as inputs, a fromDir and toDir, I'm not really sure what the fromDir is though
Y unit vector
just choose one of the unit vectors
it doesn't really matter
you just account for each one in different ways
I think I used Y for my thing
Okay I'll try that, thank you
Thank you very much, that worked
Nice
hi
how to make Executable Items premuim to allow defaout players to get the item
how to change change the op to default in executable items premuim
- permission plugin
- ask in EI Discord
Has anyone used yq to manipulate yaml? I need some help D:
https://github.com/mikefarah/yq/discussions/2134
i would recommend just doing a little python script or similar
much easier to work with, and lets you actually do programming lang stuff like that easily
Yeah, fair.
Ye that doesn't work D:
try converting it to json and use jq instead? maybe it's just a bug with that project
or yeah you could do it easily with a python script
oops 12 hours late
yq or jq seem nice, but is too much work to learn how to use them so Ill just make a script 
whats the event for a dropper dropping an item? BlockDispenseEvent isn't working
anyone know of a documentation viewer that can like combine openapi (for rest API) and asyncapi (for websockets) specifications
ping if reply
Does anyone here know what machine learning model format is this?
How can i use YouTubeAPI in my plugin?
Here's an old documentation that I found: https://developers.google.com/youtube/v3/quickstart/java
It's a bit old, but you can use it with a few adjustments (like using implementation instead of the deprecated compile in your build.gradle.kts). The part where it states the necessary steps to get it working are all still the same, so it should still help you a lot.
i used that
i'm stucked about Jackson library
its not working
so, server couldnt see jackson library
What "is not working" about Jackson library? We can maybe help you if you say what problem you're facing.
Are you using Gradle or Maven?
gradle
Could you please run gradle dependencies task, copy and paste the result into this website https://paste.helpch.at/, then send the link here?
oh i cant reach there
thats my error
What do you mean? Aren't you developing the server ATM or something?
sure, i can send it via pastebin
I'm trying to make a Paper plugin that will print live stream memberships to the chat using the YouTube API.
Whatever works best for you, I just need to see the dependency tree that this task prints so that I can confirm my suspicion.
its 20kb
and i cant paste to pastebin
Okay, it's what I thought, the issue you are facing is called dependency version misaligment.
The fix for this is really simple, could you please share your build.gradle.kts file with me so that I can see what dependencies you are explicitly declaring?
Yea sure.
there's no .kts
just build.gradle
That's fine
Yeah yeah, I'm testing the fix first in my IDE so that I don't send you a fix that doesn't fix anything xD
Okay thank you so much.
Ok, so the possible fix is:
Replace
implementation 'com.google.api-client:google-api-client:2.0.0'
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.34.1'
implementation 'com.google.apis:google-api-services-youtube:v3-rev20230123-2.0.0'
implementation 'com.google.http-client:google-http-client-gson:1.42.3'
With
implementation platform("com.google.api-client:google-api-client-bom:2.6.0")
implementation "com.google.api-client:google-api-client"
implementation "com.google.oauth-client:google-oauth-client-jetty:1.36.0"
implementation "com.google.apis:google-api-services-youtube:v3-rev20240514-2.0.0"
Let me know if that doesn't fix your issue.
i guess I didnt understand correctly
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
implementation 'com.google.api-client:google-api-client:2.0.0'
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.34.1'
implementation 'com.google.apis:google-api-services-youtube:v3-rev20230123-2.0.0'
implementation 'com.google.http-client:google-http-client-gson:1.42.3'
implementation 'org.yaml:snakeyaml:1.30'
}```
What should i change?
Should i change everything or just these?
he literally gave u what u have to replace
Just replace the lines I told with the content I sent.
Oh okay
i did it. but still same error:
java.lang.NoClassDefFoundError: com/google/api/client/json/JsonFactory
at uk.foudre.youtubeToMinecraft.YoutubeToMinecraft.onEnable(YoutubeToMinecraft.java:12) ~[YoutubeToMinecraft-0.1.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-196]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-196]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:642) ~[paper-1.20.1.jar:git-Paper-196]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:553) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:635) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:434) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1100) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ClassNotFoundException: com.google.api.client.json.JsonFactory
at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:142) ~[paper-1.20.1.jar:git-Paper-196]
at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:103) ~[paper-1.20.1.jar:git-Paper-196]
at java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
... 13 more
[14:15:59 INFO]: [YoutubeToMinecraft] Disabling YoutubeToMinecraft v0.1```
building:
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE
> Task :assemble UP-TO-DATE
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build UP-TO-DATE
BUILD SUCCESSFUL in 124ms
3 actionable tasks: 3 up-to-date
17:14:52: Execution finished 'build'.```
Now that I saw, you have another issue, don't you?
You're missing shadow plugin...
I'm getting same issue
Please take a took on the official guide of shadow plugin: https://gradleup.com/shadow/
i mean
I was having the same problem with the first code I posted, that is, before I changed it.
But basically, this plugin will include the library files on your plugin JAR so that the classes are present in runtime, this way your plugin will work.
I dont know anything about how can i use that.
Yeah, because your issue is more basic, by default Java doesn't include dependencies (such as google-api-client library) in your plugin jar. This plugin will do that for you.
Oh i understood that.
Yeah, that's why I sent you the instructions on how to use it. I could send you a snippet, but I only have a snippet for the KTS version of build.gradle, so you'll have to use the official guide instead.
Yes, now I need to figure out how to use this plugin.
It's pretty basic. The gist is that you add it to your plugins block, and a new Gradle task called "shadowJar" will appear. You'll use it instead of the normal build task. After you run this new task, a new file called your-plugin-name-all.jar will appear in your build/libs directory. This jar will be your "fat jar"/"uber jar", that is, the jar with all your plugin dependencies embedded in it.
That's it, I'm going for now, but you should be able to figure out the rest using the official guide, ChatGPT, stackoverflow and other useful websites, good luck ma man!
Thank you so much.
Guys
i can't enter the helpch.at website
my dns does not recognize it
what can I do?
Literally read announcements...
ty
Just mirrored the com.extendedclip.deluxemenus 1.14.0
and me.clip.deluxetags to my repo to work with
👍
My placeholders randomly break, like they just stop parsing completely and at random times
I have two placeholder classes and they both have the persist overrided to true
any idea?
why do you have multiple in the same plugin?
I wanted to separate them a bit
Are they listed on /papi list installed? @misty light
yes, it still shows up
I thought this would be the issue, so I made it just one, and it still breaks at times
it's breaking a ton of stuff, any ideas?
papi version 2.11.5
like it works for a few hours then breaks
I tried making is a separate papi expansion and it still broke
like one that goes in /papi/expansions folder

🤨
I figured it out using a "work around"
lmfao
in other words checker framework sucks
final Object object = new Object[] {game};
it doesnt let me just pass game into varargs automatically so i have to define a stupid Object variable for it
@IntrinsicCandidate
public final native @PolymorphicSignature Object invoke(Object... args) throws Throwable;
i can't pass game directly because it isn't annotated with @Nullable
and game could be null
And some weird schenanigans, idk
This is the only stuff i dislike about checker, cause when the weird platform specific stuff goes back and bites your ass and it doesn't help but just waste time
have you tried what happens with a regular varargs method (i.e. one without the annotations but otherwise equal)?
welp
but whatever
Share the full code
Someone can make a texture for rank
Someone definitely can
they want u to suppress it
it's a lot of crap 😭 but unoptimized code shouldnt be completely breaking it
I would recommend having a print statement
to see if onRequest is being called
hurr, it's a production server with up to 100 players on, I don't wanna spam console either 😭
I'm never able to recreate the bug on my local testing, only happens hours into the server being up
but Ima say no
because
when I do /papi parse me %stringutils_tjoidwjaiod_djwaij%, normally, it throws an error, but when the issue happens, it just returns that
then test it in a non-prod?
create a small dev server
and test it there
.
the issue shouldn't be machine-specific
I usually create a copy of my exact server for dev
yeah ik, but his issue is running in local for hours
ah
it appears the issue only happens after hours
leave the computer for a couple hours 😎
Anyone ran into discord command registering issues?
I can't seem to register my commands.
I tried PUT https://discord.com/api/v10/applications/<app-id>/guilds/<guild-id>/commands
for like 3 days now, I get an error message:
"Max number of daily application command creates has been reached (200)"
I only have like 20 commands.
For some reason I can create a single command via the POST method. (Not all of them one-by-one, but I picked one random command I have and for some reason it worked)
Does it make sense to create a gradle.properties to hold variables such as dependency versions etc.?
It's a standard for mods, though I have never seen it being done for plugins hence I am asking
Better to use version catalog for that
TOML file for example is what I use on basically everything https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
How come? In that case why does Fabric/Neoforge use gradle.properties?
Ah I see it allows to easily share dependencies between different projects
Though how would I do that with plugins? If I have say 6 plugins that depend on one other dependency
Version catalog is a fairly new gradle feature so it hasn't been adopted by a lot of the older projects
And you're mistaking gradle projects with projects, think of them more like modules, but that's not really the best usecase for it, just a single project benefits from it too since you'd have all dependencies on a single file
If you want a quick example, version catalog https://github.com/TriumphTeam/nova/blob/master/gradle/libs.versions.toml
Usage https://github.com/TriumphTeam/nova/blob/master/core/build.gradle.kts
What's the benefit to it over gradle.properties?
A few, you'd be setting group and artifact in the catalog as well, while on properties most just do version
Bundles, allows you to bundle dependencies and add them all as one
Works a bit nicer on kts, getting property values on kts is a bit more ass
That's all I can think about right now but still good enough
You can also publish version catalogs to share with other projects, you'd have to copy and paste with properties
But at the end of the day it's up to you, use what you find best, i personally love having everything in a file that is easy to import
Is triumph cmd still up to date? I saw the latest push was about two years ago
About that - does the variable name have to match with the name of the artifact when it comes to writing the libraries?
no I don't think so
How does that work then? How does the toml know what artifact I am referencing
ex you'd put ```toml
guava = { module = "com.google.guava:guava", version.ref = "guava" }
Ah I am blind clearly
Haha
for artifact names, is the standard not to have capital letters at all
and have dashes where spaces would go?
yeah
What about repositories? Where do those go when using a libs.version.toml?
The example that Matt gave they are not defined anywhere
Or do you define them in the settings.gradle?
uh
ah
I forget what its called
but I think he just has it defined there?
like a build script "template"
idk what its officially called since I haven't used that feature myself
Where should I be defining the repositories then in my case? Can I have them in the toml file?
in your case I think it's fine to just have it normally
Ah just in the build.gradle?
since this is an unrelated feature
yeah
Wait am I mistaken or can I have the repositories in the project build.gradle, no need to repeat it in each module?
It seems redundant to repeat the repository in each build.gradle
uhhh I don't know the answer to this
looking at one of my previous projects, I made a function to add the repositories in each module + base
but I would try it out
I had kt fun addRepositories(project: Project) { project.repositories { mavenCentral() // others } } and then ```kt
allprojects {
addRepositories(project)
}
Would you define that function in the project's build.gradle and then call it in each build.gradle?
only in the base build.gradle.kts (shouldn't be too hard to adapt to groovy/build.gradle?)
Oh yeah allprojects
That seems simple enough
Sorry for asking so many questions haha
np its #development :))
Is having the versions for each of the modules inside of the libs.version.toml wise? That way I have a single file where I can define the versions of my plugins instead of having to always dig up the build.gradle every time
yes
I think this would actually be a really nice usecase for libs.versions.toml bc for ex if you have dependency x in only modules x and y but not z, then you don't have to remember to update the versions twice etc
Yeahhh exactly
or do you mean like the actual plugin versions?
The more I do this whole change the more I think it's a good idea to have a monolithic repo for this whole thing lol
ohh wait I think I misunderstood what you meant
err I meant both I suppose 🥲
Since I think that my own plugins will always be using the latest version of my other plugins?
I can't think of an instance where they wouldn't
I'm trying to see where matt defines his version but it's nowhere to be found
🥲
or actually it might be this idk
idk
will have to hope n pray that matt makes a comeback
For now I'll try doing it this way
In my project build.gradle, should I have group and version?
If so, what would they be used for?
Does the function here replace the subproject's repositories with those provided? What if a subproject has a unique repository that no other modules should have
no it just adds
although I would just keep it all in that
since there isn't any harm in having a repo that isn't being used by that module
Fair enough
I also wrote an addPlugins() method:
void addPlugins(Project project) {
// Add common plugins to the project
project.pluginManager.apply(alias(libs.plugins.java.library))
project.pluginManager.apply(alias(libs.plugins.maven.publish))
}``` you recon this should work?
Yeah maybe, no clue though :/
Yeah
that's how I am doing alias(libs.plugins.maven.publish)
I saw that on the documentation
also, inside the allprojects{} I am doing other things like project.group = "it.klynet" for other things that I know will be the same for all modules
Is that alright?
yeah idk it should be fine
I tried doing project.java.sourceCompatibility = JavaVersion.VERSION_21 but the IDE complains that there is no candidates for java
Also another thing, is this block necessary?
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
}```
I don't remember if I added it myself while trying to troubleshoot something or if it's something that should be there
I used ```groovy
(project.extensions["java"] as JavaPluginExtension).sourceCompatibility = ...
I think so - I have it in my projects
Sorry for having pinged you btw, you seem to have done something similar to what I am trying to do
I'm also getting a warning about changing that to project.tasks.withType(Javadoc).configureEach instead wht
should migrate to kts sometime :)
First I gotta do this haha
lol fair
I can probably get ChatGPT to do the migration for me tbh, it should be capable of at least that, for how shit it is
Have you tried adding a addDependencies function?
I haven't, no since you don't need to add the dependencies to the base project
so you can just do the project.dependencies {} directly inside of the subprojects {}
wait
wait
yeah I suppose so but it's easier to just add the paper dependency through the project build.gradle right?
inside of allprojects
oh yeah here I kinda lied
you don't need a function here 🙃 I did it a wonky way which is why I had a function
wdym?
All of my build.gradles will need paper-api as a dependency right
oh if you only do it in the base dependencies {} then it won't go through to the submodules
Can't I just add that in the allprojects block, to avoid repetition?
yeah
or in my case I just did kts subprojects { dependencies { compileOnly("org.jetbrains:annotations:24.1.0") } }
annotations 😎
Ah wait
instead of allprojects i am better off doing subprojects right
Since I don't want the project build.gradle to also get all this stuff, instead only the subprojects
yeah || although tbh it probably won't really matter it'd be the correct thing to do :)) ||
This feels a bit too straight forward to be true haha
Rip I wanted to also add publishing in the subprojects part but there is no project.publishing I can use there
Are these needed in my project build.gradle?
Which version?
build-logic is where I have my convention plugins, these plugins act like gradle configuration, you configure them the way you want and apply to your project, meaning you don't need to repeat code
Is it possible to add publishings in the subprojects block in my project build.gradle? to be applied to all modules in my IntelliJ project?
You don't need to define it anywhere just make a file in the gradle folder and gradle will handle it if you are in newer versions
This might be reaching overoptimization levels at this point
But I'm curious to know if that is a possibility
I see, I mean so far so good I think
Just this publishing thing I wanna try sorting out
What I do is create a publishing convention plugin and add to each project that needs it
Isn't there a way to just have it in my subprojects block?
I'm not sure how I'd do that way you said
Yeah you can probably do it in the subprojects block, not sure how though, haven't used it in a while, but just doing tasks { publishing... } should work
there isn't a publishing block I can use within tasks from what I saw
you mean to do tasks { publishing { ... } }?
Make sure you're applying the maven publish plugin to the root build.gradle
ah
Is this not good enough?
subprojects {
apply plugin: 'maven-publish'
apply plugin: 'java-plugin'
...
Something like
plugins {
`maven-publish`
}
subprojects {
apply {
plugin("maven-publish")
}
tasks {
publishing {
// configure here
}
}
}
yeah that's what I'm doing
No idea how that'd be in groovy gradle
plugins {
id 'java'
alias(libs.plugins.java.library)
alias(libs.plugins.maven.publish)
}``` I got that
Yeah I don't see publishing being a thing
I added that, and in the subprojects block i added this:
apply plugin: 'maven-publish'
apply plugin: 'java-library'```
Though when I try doing tasks { publishing { ... } } it doesn't appear to be a valid option
Idk if im having a smooth brain moment or what but, im creating a countdown placeholder, that counts even fater the time has been passed as the %server% one just shows 0 after that
aka if its 9pm and countdown is at 8pm it will show that 8pm will be in 23h
int targetHours = Integer.parseInt(args[0]);
int targetMinutes = Integer.parseInt(args[1]);
int targetSeconds = Integer.parseInt(args[2]);
LocalTime now = LocalTime.now();
LocalTime targetTime = LocalTime.of(targetHours, targetMinutes, targetSeconds);
// Calculate the duration between now and the target time
Duration duration;
boolean isBefore = targetTime.isBefore(now);
// boolean isBefore = false;
duration = Duration.between(now, targetTime);
long hours, minutes, seconds;
if (isBefore) {
hours = duration.toHours() + 24;
minutes = Math.abs(duration.toMinutes()) % 60;
seconds = Math.abs(duration.getSeconds()) % 60;
} else{
hours = duration.toHours();
minutes = duration.toMinutes() % 60;
seconds = duration.getSeconds() % 60;
}
// Format the string as XXh XXm XXs
return hours + "h " + minutes + "m " + seconds + "s";```
i have this right now
but it doesnt count the hours correctly
Nvm stopped hating myself and used dates :p
int targetHours = Integer.parseInt(args[0]);
int targetMinutes = Integer.parseInt(args[1]);
int targetSeconds = Integer.parseInt(args[2]);
Calendar currTime = Calendar.getInstance();
Calendar targetTime = Calendar.getInstance();
targetTime.set(Calendar.HOUR_OF_DAY, targetHours);
targetTime.set(Calendar.MINUTE, targetMinutes);
targetTime.set(Calendar.SECOND, targetSeconds);
Duration duration;
if (targetTime.before(Calendar.getInstance())){
targetTime.add(Calendar.DATE, 1);
}
duration = Duration.between(currTime.toInstant(), targetTime.toInstant());
long hours = duration.toHours();
long minutes = duration.toMinutes() % 60;
long seconds = duration.getSeconds() % 60;
return hours + "h " + minutes + "m " + seconds + "s";```
for anyone that might need or just wondering ;)
well if it is 9pm then 8pm wpuld be in 23hours?
i wonder how your expected result and before you fixed it result diffelr
don't use Calendar, if you need dates, use LocalDateTime
I'm having some issues with GitLab, using it as a package registry.
We use it kinda as a "proxy", to access maven packages.
Locally, I have no problems building the project and the dependencies are found correctly.
If I deploy it to one of our servers, it can't seem to find the required deps:
* What went wrong:
Execution failed for task ':update'.
> Could not resolve all dependencies for configuration ':detachedConfiguration1'.
> Could not find org.springframework.boot:spring-boot-dependencies:2.7.15.
Searched in the following locations:
- https://[redacted]/api/v4/groups/1653/-/packages/maven/org/springframework/boot/spring-boot-dependencies/2.7.15/spring-boot-dependencies-2.7.15.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project :
> Could not find org.springframework.cloud:spring-cloud-dependencies:2021.0.8.
Searched in the following locations:
- https://[redacted]/api/v4/groups/1653/-/packages/maven/org/springframework/cloud/spring-cloud-dependencies/2021.0.8/spring-cloud-dependencies-2021.0.8.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project :
I checked and can verify, that these do exist, ex.:
https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-dependencies/2021.0.8/
Could this be a network issue?
It kind of worked but I'd have to add the 24h then take away an hour if minutes are over or seconds, just cba
Any reason?
Calendar is just a terrible and outdated API
Welp, ill refactor it if i get to it :D
i feel like theres like 3 implementations for time in java
Instant 😍
hey guys i need help, so when im adding an a icon to my game rich presence there is no "save changes" button
if anyone can help you can hop in dms!
?not-discord
Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.
Hey everyone I was starting a new spigot plugin project (the first one i do on 1.21 yet) and i dont really understand what happened with the Materials enum ? has it been separated in two enums (Itemtype BlockType) ? does anyone have specific documentation on that ?
huh wait what happened??
well you know the change they made in the experimental branch quite a long time ago ? to replace the material enum with two enums ItemType and BlockType ? well i have that without using the experimental branch, the Material class isnt there anymore it might be an error tho because the itemstack class still requires a material argument
public void onEnable() {
// Plugin startup logic
ItemStack item = new ItemStack(ItemType.PAPER.asMaterial(), 7);
BlockType.AIR;
Material.AIR;
}````
Here is the only valid way i found to create an itemstack that doesnt make my ide scream out even tough its very ugly, below that Blocktype air exists
material air doesnt
and i cant import the org.bukkit.Material class
maybe spigot has been imported the wrong way even tough i dont know how that could be possible, I also use the Minecraft Development plugin on intelliJ to create my projects and Maven as a build tool heres my spigot dependency btw : <dependencies> <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot-api</artifactId> <version>1.21-R0.1-SNAPSHOT</version> <scope>provided</scope> </dependency> </dependencies>
it's the normal one
well you know the change they made in the experimental branch quite a long time ago ?
tbh no - I haven't been following 🥲
but if it's experimental then I'd assume that there'd be issues
While this API is in a public interface, it is not intended for use by plugins until further notice. The purpose of these types is to make Material more maintenance friendly, but will in due time be the official replacement for the aforementioned enum. Entirely incompatible changes may occur. Do not use this API in plugins.
yeah i know its not supposed to be here thats why i dont understand 🥲
apparently I need to update IntelliJ, I'll try that out when Im home
Update it worked
how should i be writing tests for spi with the module system
from my understanding gradle patches the modules for tests so theyre also in the module
so i cant exactly add a provides declaration to the module
and i also cant create the META-INF/services file cuz its not an unnamed module
should i js be doing a black box test?
and create another gradle project for that?
It’s probably enough to have an additional source set and I‘d assume you can configure gradle to not patch modules for that
What was the option for gradle to use paper api, which requires java 17, and compile for java 8?
who is holding the gun to your head and forcing you compile for java 8 😭
Is for papi player expansion 🥲
i mean at this point, i say we just drop older versions
they can use a past version of the expansion
not like they need updates or anything lol
I'm all for it, but we need to discuss this with the others 
why can't you just depend on an older api?
new features i'm guessing
hmm, I was using the paper api, but it seems like I don't use anything paper specific, so I just switched to spigot 
It is all good now! But I would still like to know how to accomplish that
I know someone sent a message here about that but I can't find it 😢
What so I have to do for client side entities to be moved by water, pistons, etc.? I know I need to handle stuff by myself, but how? XD
For more context: we want to allow players to create mob farms with spawners, but big farms usually cause performance issues
so I was wondering if I could do something about that by using client side entities. Entities don't have AI, they just need to interact with water and take damage from fire, magma blocks, w/e else + players.
Let's say I manage to do all these, would I be able to call a fake EntityDeathEvent, EntityDamageByEntityEvent, etc. with these entities to let other plugins do their job? E.g. to drop random items or add skills experience.
Hello
Why does VoteParty run socket on main thead?
When a large number of players logged in, it started consuming 13% of the main thread
What socket?
For connections.
Also, check out #spigot-linking first 🙂
Oh ok, but im the developer of the server. Not the owner
@craggy inlet
Ask them to link their account. In the mean time, do you have a spark report? Idk what sort of socket it would use
Unable to load the data. Perhaps it expired? Are you using a recent version?
Oh it works for me
asd
Account linked
@cinder vine its my dev

GOD I HATE IMGUR ON MOBILE, IT ALWAYS OPENS RANDOM POSTS WHEN I ZOOM IN
Haha yeah
Welp, getOfflinePlayer strikes back again
I understand that the plugin is open source right?
This happens because it is running in the main thread, it would be better to run in a own thread.
Will VoteParty fix it?
I'm not sure when, Glare is busy with life, if you are a dev the fix should be easy to implement.
Yeah i know
The patch is already working on my side, I just came to ask why it was working like that.
Because
Only God and Glare probably knows, and at this point it might just be God 😔
I see..
Also the plugin "Votifier" seems to have similar issues
t tries to get player uuid via mojang api using socket connection in the main thread
Good thing they are both OS ❤️
Indeed, the problem is for ordinary users.

What he means is that you can PR your changes and it'll be fixed for all users
Bumping this 
I can pull request, but you can just make it runTaskAsynchronously
There's a saying.. pr or shut up 

Too rude
Realistic
I will, you can accept PR's or?
Probably
probably minor but shouldn't it use its own thread/executorservice? so that it runs immediately and not 2 ticks later (assuming the event has to be ran on the main thread again)
Since the event must be handled on the main thread, runTask is used to return to the main thread before calling server.pluginManager#callEvent
Yeah I mean that if you do runTaskAsync then that delays by another tick
Whereas with executor or thread it wouldn't delay
erm any1 know how to check the dpath or the classpath of the project in intellij, my project is loading from some other build library else where that run lwjgl 3.3.3 instead of the 3.3.4 i setup.
It is specifically designed to work within the Bukkit ecosystem. When you use this feature it takes care of the thread handling which is safer.
It is already a big change not to run it in the main thread, it was tested and indeed it is going well with more than 200 players using votes system
what
./gradlew dependencies --configuration runtimeClasspath
what
I actually tried to run it and erm im not sure
try /gradle
cant either, maybe I forgot to add gradle home to environment path ...
ops
?
wait what do you mean project directory? because the termial current cd is the project file...
oh yeah, you should probably include the gradle wrappers lol
especially in like git, so that other people can just use it straight up
i think i mess up the project creation process....
you should be able to just run the wrapper task in like IntelliJ to generate the wrappers
then you can easily use from the command line and figure out what's going on
what does PlaceholderAPI.setPlaceholders(string, player) do. does it really return the same as /papi parse player %server_online% for example?
also it probably has something to do with implementation fileTree('library') { include '*.jar' }
It parses and replaces all the placeholders in the given string
so if you have like four placeholders in one string, it'll do them all in one go
that is just a library folder for ImGui so it not related but i will do the wrapper first and check back with the command after
hey errr I try to make a new project and it seem like the the wrapper task was not executed, I look on SOF and they say to run gradle wrapper, and it return command not found
bro what is wrong with your gradle lmao
do you have it installed on your actual computer? or do you just use the IntelliJ one?
yes i have 8.5 and 8.7 installed
i tried add it to the environment path (again) already
but not in your PATH?
yeah
if you can't call it from the command line then your PATH is messed up
is this correct ?
why is your gradle not installed in like Program Files?
but i mean theoretically maybe? might need to do a bin subfolder
adding bin work now.... thanks
Now doesn't even cross 0.68%
nice
by this I meant that it takes 2 ticks to get back on the main thread
whereas with executor it'd only take 1
I mentioned that it's minor but if it's being merged into the official plugin, I just wanted to note that
Tbf I can't see why VoteReceivedEvent isn't just async by default, there is no reason for anything voting related to be on the main thread lol
yeah pretty rigth
I understand, but since it is official wouldn't it be better to use what Bukkit provides? So it would be more secure, and would not have this problem.
Another option would be to simply use UUID since the getOfflinePlayer method is deprecated and is not recommended.
I would say that java's built-in system is more "secure" than bukkit's :))
|| but "jokes" aside bukkit uses executor anyways, just delays it by a tick ||
but 1 extra tick isn't that big of a deal
Yeah, i think its just fine? Since it manages properly the threads
I dont think it matters that much for a vote if it is delayed by 1-2 ticks
It will matter, I want to see the message that I voted at the EXACT moment when I did, not some 1-2 ticks after, such bs
1/20th of a second killed my father
What the hell ?!?! I’m lagging my message came 2 ticks after !!!
whats the requirement for oraxen item material?
it doesn't really manage anything, in fact the BukkitScheduler implementation is hot garbage unfortunately, the only real reason to use it is to jump back to the server thread, for anything that should run on a separate thread I strongly suggest using one of java's built-in ScheduledExecutorServices from the Executors class
So im trying to load structure files that ive generated with a structure block and ive tried a few ways of actually getting and reading the file in the code, putting it in the resources folder and putting it in the main source code. When I try to build with it in my resources folder it throws this error: https://paste.helpch.at/jexudejuri.css and all the methods I have found on looking in the jar file can't actually see the nbt file. Is there any way for me to be able to put the structure file in the resources folder or another way?
Im using Intellij
I assume you have a maven/gradle task that replaces some placeholders in all your resources, such as the version. Limit that to only .yml files and other types.
does <filtering> affect that?
nvm i was using maven
gradle doesnt even patch iirc
to answer my own question yeah it does it seems to work now
thanks for the help though i probally would not have found that out
my issue is it goes straight diagnal you can see how that does not look natural because the mob is clipping into the block getting to the next location how can i fix that to make it natural https://paste.helpch.at/gibuzohiqe.java
I understand, I still think it is okay to use Bukkit methods in this case. Although we could use ForkJoinPool for a good implementation since it is going to be done.
For some reason, even though I am configuring the processResources task, the version and description in the plugin.yml of my plugin don't get filled in. This is what the relevant section in the build.gradle looks like: https://paste.helpch.at/uxobujiqux.js
the plugin.yml fills in everything but the description and the version, though I provide those in each subproject like such:
version = "1.1.0c"
description = "Some description"```
https://stackoverflow.com/a/58964285 maybe this will help
got it, it was a weird issue with functions in the build.gradle
Either way: how do you guys recommend going about automating back ups for my paper worlds within my Velocity network? It's all done through Docker as of right now.
yeah I mean my server network just uses Pterodactyl panel and we use the automated backups from that
pretty solid
I am hosting everything on my own linux server
like just raw, with just Docker compose or something?
if you're using iztg/minecraft-server or whatever that docker image is called, i think that has backup stuff
I am making my own image
https://paste.helpch.at/egenazexuk.typescript Is this the correct way to get a server's name through plugin messaging? It doesn't seem like it is working
I did register the incoming plugin channel
I guess you can not detect the messages sent from the same server?
This stream will only contain an object which class matches the attribute class right?
Optional<AttributeData> optionalAttribute = attributes.stream().filter(predicate ->
attribute.getClass().isInstance(predicate)
).findAny();
attributes is a set of AttributeData which attribute also is. However I need to check if the subclass is an exact match
Yes
What would the difference be if I check with equals()?
well they're completely different things
one checks for equality (reference or object depending on if it was overrided or not), and the other checks if its assignment compatible
Hey, does anyone know why the instance returned from PlaceholderAPIPlugin#getInstance() is null?
java.lang.NullPointerException: Cannot invoke "me.clip.placeholderapi.PlaceholderAPIPlugin.getLocalExpansionManager()" because the return value of "me.clip.placeholderapi.PlaceholderAPIPlugin.getInstance()" is null
You shade papi
dont be a shade to your papi
What?
shaded jars
send your pom.xml/build.gradle
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
• HelpChat Paste - How To Use
I have fixed it a while ago, thanks. I had to exclude it from my shade configuration.
.
Hi! I have coded a plugin for manage Minecraft"s Glow as a cosmetic.
Deluxe Tags manage scoreboard teams too. That generate issues while both plugins are being used.
Is there anything that I can do to hook my plugin with Deluxe Tags?
Delixe tags doesnt do that @tawny wedge
Deluxe Tags was overriding the minecraft team color. I found this on my own through attempting to manually change team colors through the vanilla commands. Each player was given their own "personal team" labeled with their username. Upon attempting to remove the player from said team, the tag disappeared then the player was re-added to the team less than a second later, putting the tag back as a result.
I HIGHLY doubt deluxe tags uses teams since you use a placeholder for the tag and players are not grouped by tag or anything
Ive just checked the code, it doesn't 🙂
hi, im trying to make a placeholderapi expansion in my plugin, but it doesnt seem to work. i dont understand why. It doesnt seem to even try to pass the placeholders to my plugin, am i doing something wrong?
When i do /papi parse me %telecominfo_ping% i just get %telecominfo_ping% back. Other plugin's placeholders work fine
Heres my class for the extension
package me.kardoskevin07.telecominfo.addons;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.kardoskevin07.telecominfo.TelecomInfo;
import org.bukkit.OfflinePlayer;
import org.jetbrains.annotations.NotNull;
import java.util.HashMap;
public class PapiAddon extends PlaceholderExpansion {
private final TelecomInfo plugin;
public PapiAddon(TelecomInfo plugin) {this.plugin = plugin;}
@Override
public @NotNull String getIdentifier() {return "telecominfo";}
@Override
public @NotNull String getAuthor() {return "008kevin";}
@Override
public @NotNull String getVersion() {return "1.0.0";}
@Override
public boolean persist() {return true;}
public String onRequest(OfflinePlayer player, @NotNull String s) {
if (s.equalsIgnoreCase("ping")) {
return "pong";
}
return null;
}
}
and my main class onEnable method: (sorry didnt fit in one)
public void onEnable() {
instance = this;
FileConfiguration config = this.getConfig();
saveDefaultConfig();
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
new PapiAddon(this).register();
getLogger().info("PAPI extension has been enabled");
} else {
getLogger().info("PAPI is not installed");
}
getLogger().info("Loaded successfully");
if (config.getBoolean("debug")) {
getLogger().warning("!!! Debug mode is enabled !!!");
}
this.getCommand("listCarriers").setExecutor(new ListCommand());
this.getCommand("carrierInfo").setExecutor(new InfoCommand());
}
is there any error in console?
make sure you're not shading PlaceholderAPI (if you don't know what that means, send your pom.xml/build.gradle)
no errors, one second and ill send it
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
• HelpChat Paste - How To Use
placeholderapi also sends this: https://paste.helpch.at/payusumino.md
oh i cant post images
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload or similar service to upload images/screenshots.
and heres the full log if it helps, but no errors https://paste.helpch.at/eneyaceder.mdel
Override canRegister and return true
Also, make sure you add papi as softdepend to your plugin
overriding canRegister fixed it, already was a softdepend
i didnt see that mentinoed on the wiki, here, might be just blind though https://wiki.placeholderapi.com/developers/creating-a-placeholderexpansion/#register-your-expansion
thanks for the help, appreciate it a lot
oh nice
sorry, forgot to check back 😖
i have a question
There is no time to wait! Ask your question @hardy sonnet!
how to command in delux menus
open chat
exemple
left_click_commands:
'[suggest_command] gamemode 1
Is there a painless way to store a Mob in one of the PersistentDataType's
hello gushs
hello gush
declaration: package: org.bukkit, interface: UnsafeValues
My initial idea was just to base 64 that bish
spigot 
meaning
it's paper api
you can store a byte[] in the PDC without having to b64 it
Im having a smooth brain moment, where can i get a instance of UnsafeValues
as the method isint static
@minor summit :)
Bukkit.getUnsafe()
that's awesome dude
any1 happened to know what this check item is call ?
What even is that?
ImGui
And you want to know the name of that element? Can you not check the code?
I just look around tho, it seem to be a normal menuItem that contain a boolean pointer
And for your question to check the code, for some reason searching the code on github does not return this demo window for some reason
https://github.com/ocornut/imgui/blob/864a2bf6b824f9c1329d8493386208d4b0fd311c/imgui_demo.cpp#L8222
I've literally googled "dear imgui demo" lol
oh, i was searching the java fork, thanks for it.
https://paste.helpch.at/iyucikinak.java
message-format: '§a§l%player% §f%message% %clantag%'
But placeholder is not working
which one? the clantag?
from what I see, this is what your message will be after the replacements
§a§lcj89898 §fHello %%clantag%%
It is its own placeholder because I coded via placeholderapi and, for example, the placeholder does not work on the scoreboard but with chat events
clantag is not a PlaceholderAPI placeholder though, fyi
papi placeholders are %identifier_placeholder% format
so %clantag% would not be correct
I'm curious as to what the purpose of replacing a single % with two %% is, but I could just not be seeing it
Also, just thinking about it
you might want to parse placeholderapi placeholders BEFORE replacing the %player% and %message% internal placeholders
otherwise, users could then type a placeholder into their message and have it parsed
So the reason i even asked this is cause im creating a mob lasso, got everything working,
but realized i need to check if a player has even rights to pickup a mob or putdown, is there a way i can do that easily like test if a player can hit him or something hiddenly, so i dont have to hook into all my protection plugins? :)
Im just gonna hook into the plugins, only 2 of em
@Override
public String onRequest(String identifier) {
return switch (identifier.toLowerCase()) {
case "domain" -> configManager.getConfig().getString("general-settings.server-domain");
case "prefix" -> configManager.getConfig().getString("general-settings.server-prefix");
default -> null;
};
return null;
}
C:\Users\ddeni\Documents\GitHub\sheduxdev\Lobbyleyici\src\main\java\shedux\dev\lobbyleyici\PlaceholderAPI.java:37: error: method does not override or implement a method from a supertype
@Override
^
whats wrong with that code bro
check the wiki - you either need a Player or OfflinePlayer parameter as well, I forget which

