#help-development
1 messages · Page 978 of 1
There was a bukkit dev that had a good laugh when he added ADD_SCALAR for a multiplication operation...

what the FRICK
yeah idk. But i love that i have this.
I will get my revenge
incredibly confused by how the GENERIC_SAFE_FALL_DISTANCE attribute works
is it measured in blocks?
@young knoll would you mind showing me the biome registry system you're using for that example you sent earlier?
Yes
Hey choco got any tips for packet manipulation? I suppose more general ones
Just use ProtocolLib or something
Not sure what else I can give in terms of advice ¯_(ツ)_/¯
Well thanks anyway haha... I'm not really understanding this at all
sweats
uh oh
?paste
im going to lose my goddamn MINDD trying to figure out how add_scalar works
i cannot get it to do anything consistently, it for some reason does the exact same thing if the scalar is 1 or 0
is it base + (base*scalar)???
im so confused by this
i just want to do fuckinggn
base*scalar
If you just want to multiply the base use the other one
multiply_scalar_1?
both these descriptions are incredibly vague as are the names
multiply_scalar_1 doesnt do what i want it to either
thats the thing tho
for a lot of these attributes it just doesnt fucking do that
some of them it does some others it doesnt
trying to set step height consistently sets it to double the base value even though the modifier is 1 or 0
i dont understand why its doing this
Is there any way to let bedrock players join a 1.20.4 server through geyser? Paper 1.20.5 isn't out yet and bedrock players can't access the server
Viabackwards I think can work there
Let’s see some code, also some debug prints would be helpful
this code consistently sets step height and safe fall distance to twice base value despite it setting scale, speed, interaction range, etc correctly
i dont understand why its doing this
basically the exact same code as before
im trying to get this implementation fixed and fully functional before trying to rewrite it
so i know exactly what values will work
unused attribute modifiers at the top cuz i just deleted a bunch of code while debugging
After you add all the modifiers print the base value out to double check
Do all ItemMetas now implement Damageable?
yes
base value is 0.6
i figured it out
i had residual modifiers left over in the list that werent getting removed for some odd reason
Yes but you should still check
Thank you
Didn’t they already
This also applies for the respective ItemMetas that support the new ItemStack components in 1.20.5 right?
I assume yes, thank you md 😄
Yes always have
Time to play rocket league cuz packets are frying mah brain
Wait until this guy finds out that Rocket League uses packets too
Aw shit
You can't escape them!
There's no API for can_break and can_place ItemStack components right?
Nope 😦 add one
The predicates are really complicated now
What is a good amount of logging? I do not want to spam the console with unnecessary info but the more info the more useful when debugging
Have a config option for debug logging
Got it, when debug is off, how much logging would you have in that case
None if none is needed
Good point, appreciate it!
Really depends on the project. If you have some kind of version fetching maybe you could log when it starts and ends. If you save player data in a bulk you could log that you started saving it and when finished. Or if you want to warn about a bug then warn it really depends on you and how much you want to share with the server logs
I have lots of API requests in my plugin, so thats where I am trying to decide whether to log when they fail currently
Well, if your API is spewing errors you'd want every last one to be logged.
Should I log successful attempts or not worth it, I was logging the data just incase something goes wrong id just look at console and see the response
I normally only log issues that need some kind of action or compromise the functionality of the plugin
ie a messed up config or some kind of unexpected io issue
Fair enough
I have this error when using "java -jar BuildTools.jar --rev 1.20.5"
https://paste.md-5.net/azireyukot.coffeescript
i just looked at changes to bukkit api. aren't all items are "damageable" now in 1.20.5? if I add eg: tool component to obsidian block with max damage component, it becomes damageable and does remove durability when mining blocks. or am i missing something?
Whats your question
in vanilla, any items can be converted into damagable items by adding max_damage component. when i look at the changes to bukkit api, i still see the Damagable interface. does that means setting max damage is still limited to specific items like IRON_PICKAXE?
All items are Damageable
ig that cool. ItemMeta doesn't seems to extends Damageable by default so I got confused.
will itemstacks that were serialized to a byte string in previous versions deserialize correctly in 1.20.5 with all the changes made to items?
sooo i'm still on implementing the data handling by 7smile7...
Apparently I can't read bc I always missed the CRUD part. I don't quite get what he left out in the tutorial that we're supposed to figure out ourselves ._.
https://www.spigotmc.org/threads/working-with-data.562421/
I have no idea what a byte string is so can’t answer that
my guess would be he means a base64-string from a bytearray
yeah
Still doesn’t really help, where did you get the base64 string from?
any configurationSerializable
ok ty
is recaf broken?
or did anyone find what registry access i have to make for packet deserialization
recaf treats these as non classes
is it cause of jdk?
@ me on an answer please :))
they probably didn't update damn
I looked and there is some jdk22 branch
where?
oh just the branch?
oh i see
nooo
they made these private
wth mojang
are they using reflections to call these now?
there's nothing calling them lol
ah nevermind
yay
no reflections for me
Why are you using packets for scoreboard???
saves me from having multiple scoreboards
1 for each player with teams mirroring
and objectives
just to display 1 or 2 different things on the scoreboard to players
How is scoreboard per player different from packet per player
i don't have to mirror other things
i just send the team once and that's that
this is an example of what i had to mirror:
i have some old code of what i used to have but it looks horrible
i did consider mirroring everything but i had some limitations or something
oh yeah, an example that is not covered in the api even if scoreboard per team: a team nametag being visible only to certain other teams
I switched to my ubuntu laptop and now Im getting this error when trying to compile my plugin ````Could not find artifact org.spigotmc:spigot-api:jar:1.19.2-R0.1-SNAPSHOT``` anyone got any ideas for this? already tried googling to no effect :D
didn;t add the repository
do you mean I have to add it manually somewhere? it's in pom.xml though
if you have it in your pom, post teh full error not a snippet
i mean it is added as dependancy. do you want the error with -X flag on or nah?
ty, just a sec
can't do anythign from a snippet
that's the full error that comes up without the -X flag
show us ur pom please
We need to see where its looking
99% sure somethings missinh
yep
so he IS missing the repo as I first said
hes prolly missing repo
https://paste.md-5.net/acifulakow.xml
theres the pom
so i need to add a local repo you say?
no repositories at all
u forgot the repo
?maven
havent needed any before xD
<repositories>
<!-- This adds the Spigot Maven repository to the build -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
you don;t need the repo if you run buildtools for the version you want
wonder why it worked on my win10
cause u ran buildtools there prolly
if the package already exists in maven
it wont download it
but on your laptop
probly yes, a year ago
that really was it :D now it's only complaining wrong target version. this was already helpful so thanks to you both
How would I put text into the player's chat box like not tab completions just paste anything into it like "hi"
you can't
I thought I saw a couple servers do it before tho?
It's like a click event i think
There is "suggest command" for when you click a text in the chat.
I do believe they changed it since 1.20.5 (or earlier) that you can only suggest commands.
That is the only way you can do that.
you click on text in your chat and it pastes it
alr
ty
that only works with commands iirc
Something like this?
private void sendClickableText(Player player) {
TextComponent healComponent = new TextComponent("Click me to get suggested /heal");
component.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/heal"));
player.spigot().sendMessage(healComponent);
}```
Yeah I'm pretty sure, though does it work with any text or only commands?
You're gonna have to try that yourself :p
Alright lol thnx either way
hopeofully it does
if not I'll just like
use a command
or sum
As I said, I believe changes to this were made (probably 'cause of tricking players into saying something - chat reporting)
So you're gonna have to try yourself if you target 1.20.5 (it may have happened in an earlier version)
It was made when they added chat reporting it's been there for a while now
Tried to use it before on 1.20.2 and it didn't work for me anymore
Perhaps I remember a different change similar to this
I mean it's probably gonna be 1.19.4+ but it's really only for admins anyway so if it doesn't work for everyone it isn't a big deal
1.19.3+*
FishHook hook = player.launchProjectile(FishHook.class, player.getLocation().getDirection().multiply(2)); why does my fishing hook juts disappear
ok it works when holding a fishing rod
im making a power plugin so people can have abilities, one of them was a grapling hook. If they right click a fishing hook would shoot out and then pull the player to the attatched block
- right clicking with air doesn't work because i assume the server doesn't get that packet
- now fishing rod hooks don't work with empty hands 😰
what i guess i could is tell the person to texture a fishing rood to a grapling hook. on right click set the item to a 'grapling hook" item. and then shoot the fishing hook.
Problem is, i come back to problem 1. How do i set the item to a grappling hook if they're not holding anything
so i assume i cannot check when a player right clicks with nothing in their hand, even using packets?
anyone know how to enable 'Pattern Matching in instanceof Expressions' in openjdk 11? i've got my ubuntu laptop throwing new hurdles at me :D
Does java 11 support that
it should be as a preview if i read correct information. if I can't find a solution to this I have to postpone my plugin's fixes.
I just cant seem to get it as a correct parameter on build part. the flag is --enable-preview --release 16
16 will not be in 11
it was introduced as a preview in java 14
does not exist in 11
damn
thankfully having multiple versions of java is a trivial exercise under linux
why do i even have this version
welp I just probably wait for my windows pc. im in a process of moving. been meaning to wipe clean this laptops hdd anyways.
if i do this will the "this" object contain the updated Game object?
game = new Game(sender, target, this, duelRestrictions, isInGame, isStartingIn5Seconds, plugin);
yes
Java is pas sby value, however that value is really a pointer. You just reassigned the pointer for game
i mean will the new Game object that i am creating contain the "this" object that contains the new game object?
"they contain themselves"
yea
if you are already passing all the contents of the request
just pass the request and give it getters
look im passing the request object to the game object that is in request object
and dont pass the other tuff
i dont understand
wdym
getters of game object methods?
Hello
is the playertoggleshiftevent called in an inventory?
What you recomend for start developing spigot plugins?
learn java basics first
Yea i know java basic
then jump right in
How?? By the wiki or you recomend a tutorial??
ill try some debugging
pick your favorite IDE, get abused for choosing yoru favorite IDE and become a dev
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
O thanks
this one should be safer huh?
With basic java is enough or maybe i should improve my skills?
A basic understanding of Java is required
if you feel like you have that give it a try
If you start to struggle you can always go back to just learning more Java
this is hurting my brain
step 2 is very important
indeed, and you need to hope you don't pick the worst one
Dr. Java my beloved
Thanks i would start and try it
this is a reference to the current object
i know
ill just leave this problem as it is
because i dont need the request.game object to be accessed from the game object anyway
The duel request holds sender and target still you are passing duel Request and sender/target individually
its just for easier access
@Getter (lombok)
Why is this not working? When I will not apply default attributes only my healthModifier it will not give armor to player only heaths. I need to have both default and custom attributes as well.
System.out.println("attributes: " + helmet.getType().getDefaultAttributeModifiers(EquipmentSlot.HEAD));
AttributeModifier healthModifier = new AttributeModifier(MaskManager.HEALTH_ATTRIBUTE_UUID, "mask_health", effectValue*2, AttributeModifier.Operation.ADD_NUMBER, EquipmentSlot.HEAD);
helmetMeta.addAttributeModifier(Attribute.GENERIC_MAX_HEALTH, healthModifier);
helmet.setItemMeta(helmetMeta);
System.out.println("attributes set: " + helmet.getItemMeta().getAttributeModifiers());
ItemMeta meta = helmet.getItemMeta();
helmet.getType().getDefaultAttributeModifiers(EquipmentSlot.HEAD).entries().forEach(entry -> meta.addAttributeModifier(entry.getKey(), entry.getValue()));
helmet.setItemMeta(meta);
Are you using 1.20.5 perhaps ?
No, 1.19.4
What is helmet.getType().getDefaultAttributeModifiers(EquipmentSlot.HEAD).entries().forEach(entry -> meta.addAttributeModifier(entry.getKey(), entry.getValue())); supposed to do ?
add default MC attributes to item, becose they are not there when I add custom one
I think they are there, the exception the thing is throwing indicates that
what item are you using for that exactly?
but they are not there player is not getting any armor when I will equip that helmet
modified helmet
default:
Try this command, see if it does the same thing
/give @p diamond_helmet{AttributeModifiers:[{AttributeName:"generic.max_health",Name:"generic.max_health",Amount:8,Operation:0,UUID:[I;-1671546010,1046365864,-1207318979,-1868297409],Slot:"head"}]} 1
interesting
can you try vanilla singleplayer too ?
I mean... even when I printed them they are not there but somehow they are or idk
ofc
If it is default on an item it does not show in the nbt
Ok, gonna work with this being an intentional thing
Do this, but create new UUID every time, a random one will suffice I bet.
I probably cant remove them right? I wanna prevent conflits when I will be not only one who will modified that item
this is vanilla sp?
yes
does it only happen with helmets
I think this is intentional.
If item has no attribute NBT it will get the default one.
If it does have attribute NBT it will pull from that.
No merging.
you need to find out what meta was on there are put it with your custom stuff
sounds bit stupid when there is method to add attribute modifier, but make sens
but its still probably a bug
+8 Armor
I wonder if it was fixed in .5 with the whole components stuff
probably not as steve6472 explained, but looks like I will need to create same attributes as vanila but with diferent UUID
so yep... its stupid but inteded... at least when I remove the custom attribute the defaults will be there
is there a way to somehow get the slot of the item in the inv that got dropped, efficient and reliably (i dont want players to replicate the items and drop them for gui functions)
do i just iterate over the contents of the top inventory and look for the slot if it matches the item?
oh
i didnt know there was
There is a method to get the default modifiers by the way
but they're getting that error tho
unless that's a 1.19 thing that is fixed in newer versions :pepelaugh:
Hmm?
^
Yeah that’s just how the game works
If there are any custom attributes the default ones don’t apply
Cuz idk mojank
yeah, but they were trying to add the default attributes alongside the custom one and it was erring
it certainly works on 1.20.4
Is it an expensive operation checking all inventory slots of all the players every 10seconds?
Looks like they were getting duplicate modifiers for some reason?
I’d have to look closer
hello, i have this piece of code that is supposed to change the text displayed when hovering the player count from the server list:
ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(Minerium.getInstance(), ListenerPriority.NORMAL,
PacketType.Status.Server.SERVER_INFO) {
@Override
public void onPacketSending(PacketEvent event) {
event.getPacket().getServerPings().read(0).setPlayers(names);
event.getPacket().getServerPings().read(0).setVersionName(Utils.chat("&7&lServeur en 1.20"));
event.getPacket().getServerPings().read(0).setPlayersOnline(Bukkit.getOnlinePlayers().size() - Utils.getVanishedPlayers().size());
event.getPacket().getServerPings().read(0).setPlayersMaximum((Bukkit.getOnlinePlayers().size() - Utils.getVanishedPlayers().size()) + 1);
}
});
the thing is that it doesnt work, and i get no error at all
couldnt u just do this with the ServerListPingEvent ?
this is in a serverlistping event
this works in 1.19.4, but not in 1.20.4
i use protocollib rn, but i'll check if theres methods with just the ServerListPing
Are you adding a new packet listener for every event then ?!
yes
^
That's.. not how that works
Pretty sure someone could make the server run out of memory with this if they just kept refreshing
Not really.
If you worry too much, you can check every player every 10 seconds but with different tick offset.
I guess i will save the results in an hashmap like a cache and if the result is wrong recheck
i see, but it doesnt work at all for now...
just to get over my paranoia
You could also just be pretty liberal with your checks. e.g. if you're looking for a very specific item, check the item's type first before pulling its ItemMeta
If I'm looking for a specific item with an NBT tag, I'll do something like this:
public static boolean isMyItem(ItemStack itemStack) {
if (itemStack == null || itemStack.getType() != Material.WHATEVER || !itemStack.hasItemMeta()) {
return false;
}
ItemMeta itemMeta = itemStack.getItemMeta(); // This is the expensive call
PersistentDataContainer container = itemMeta.getPersistentDataContainer();
return container.has("my_key") && container.get(key, PersistentDataType.BOOLEAN);
}
This way it has to go through 3 pretty common checks that strike out most possibility before accessing its ItemMeta
true doing that rn, am using the itemtype, as the itemmeta is already checked somewhere else
Hashmap caching + itemType check is enough ig
Is ItemMeta cloning any less expensive now
Since it’s already parsed out of NBT by the game
Hello! What its wrong with this? This its my first time doing a plugin so long and complicated and i used a bit of outer help. And i am kinda new to this spigot coding thingy
https://pastes.dev/AB9kVH6vyC
please tag me when responding
should be
also i am doing my servers core so it doesnt have the on Enable thingy
whats the java doc for effects?
Error log?
?notworking first
second: do not extend or implement bukkit classes unless the docs state you can
And whats the Material.matchMaterial() equivalent for effects
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
Do not create a new scoreboard every time a player moves
And try to follow java naming conventions public void PlayerMoveEvent(PlayerMoveEvent event) { should be playerMoveEvent(...) {
tag, read my messages above
Hey I remember seeing something thats better than Bukkit.getLogger.info() but i forgot what
Registry
bro ima die im tryna look up the docs but my internet is dying
Registry is basically how you should parse any type of string into game element
JavaPlugin#getLogger
Whats the difference? Is that just signing it with the plugin?
you cannot cast CraftScoreboard to Scoreboard
Do not extend the bukkit classes, not only do you not need to do that but it will mostly not work how you hope.
Yes
It adds the plugins name
Cool :)
also if you read the error you can understand where everything started, java is pretty detailed:
For instance the first line says
at me.neamar.mysticcorebun.Scoreboard.Scoreboard.createBoard(Scoreboard.java:36) ~[MysticCoreBun-1.1.jar:?]
Meaning that the exception started in the method createBoard() in the file/class Scoreboard.java at line 36
and then it tells you what called createBoard, in case the issue was somewhere near that
If you learn how to understand java errors it cuts a lot of time debugging
hmm ok imma try to solve it
Sorry but how do I use registry to get the type?
Registry<PotionEffectType>???
Registry.POTION_EFFECT_TYPE.match is depreciated.
i think i found the problem bcs near that was
?paste @EventHandler
public void onPlayerJoinBoard(onPlayerJoin event) {
createBoard(event.getPlayer());
And i removed the "board" from onPlayerJoinBoard
@dapper flower is it good?
or its gonna mess it up even more?
When putting direct java use the ` key on your keyboard (Not ' , or ", On Qwerty its left of the 1 key)
like so
```java
code here
```
Then your code will show up like
@EventHandler
public void onPlayerJoinBoard(onPlayerJoin event) {
createBoard(event.getPlayer());
ohh thanks i couldn't find the key
Just to simplify things, function names dont matter. Whats in the brackets does.
@EventHandler
public void functionName(PlayerJoinEvent event) {}
will be called whenever a player is joined
also don't ask if code is good
Just test it :)
oh thanks
the event is PlayerJoinEvent not onPlayerJoin tho
💀
I was just assuming they were correct
How do I use Bukkit Registries
?registry
Y'all which one would be more preferable, the goal is to have fully custom items (i.e. the majority of the items in a players inventory will be custom)
Option 1:
- Store items with a hashmap and have "item_id" as an NBT field
- pro: everything is always up to date as item stats would be pulled from the hashmap constantly
- con: since everything is constantly pulled from the hashmap potentially slower
Option 2:
- Store items with a hashmap and have "item_id" as an NBT field
- In addition to that when joining the server go through and update the players inventory adding and updating stuff like "crit_damage" into the items NBT
- pro: Only would have to update the players inventory when they join the server so it'd be a lot less work on the server
- con: not realtime up-to-date, though i could just update every players inventory when reloading
Option 3:
- Have a virtual inventory of the player which gets updated
- pro: up to date and doesnt require a billion hashmap accesses
- con: potentially really complicated to implement and is error prone
declaration: package: org.bukkit, interface: Registry
How are you going to access a hash map after server restart
How do i get a key of a potion effect
I could build it from a database on startup
i'm telling you as someone who has been doing this with their plugin.
don't
don't what?
its painful
#getType.name()
yeah but i need to
Just add a pdc to the item
Then when it's being used, check if it has your pdc
?pdc
I'd suggest looking into Oraxen and Itemsadder and see how they handle it. (But I know oraxen uses persistent data containers which is what @vast ledge just recommended)
ic
PotionEffectType is Keyed so you can just call getKey() on it.
ic alright
and then just update the items on reload/join
Is there a way to get a potion effect from string without using .match()?
No PDC is persistent.
doesn't need updating
Let me start my IDE and show an example
yes but the item stats might
I've been trying to use this but I'm not completely understanding the javadocs for bukkit registries
My hero 👀
It's called a Persistent Data Container after all
how would you guys recommend i store the fact that a player has potion effects (that need to be removed) on them?
Basically when they get the potion effect
ima mark the player
so that when the remove function is called it will just remove the marked effects
uh
List<Player>/
They do
Then add then to a pdc entry
as a hash or each individual one?
not too sure abt that
u shud probably do this
there is a chance they can have plenty of these effects
That makes no sense
cos with pdc you'd have to go through every single player that has ever joined
Stringify em
This isn't persistent
Well yea but do i make a new NamespacedKey for each of them?
slap it in a file on disable
Nah
And i'd have to make a new one whenever an effect that hasnt had a list for it made yet is called
If the server crashes?
cry
Type to key:
PotionEffect potionEffect = new PotionEffect(PotionEffectType.SPEED, 100, 1);
PotionEffectType type = potionEffect.getType();
NamespacedKey namespacedKey = type.getKey(); // Would be: "minecraft:speed" for example
String key = namespacedKey.getKey(); // Would be: "speed" for example
Key to type:
String key = "speed";
NamespacedKey namespacedKey = NamespacedKey.minecraft(key);
PotionEffectType type = Registry.EFFECT.get(namespacedKey);
O IT CAN?
That was a question...
A PDC can literally hold any object if you know how to serialize it properly.
NamespacedKey.minecraft IS A THING?!
yea but serializing makes me want to cry
You shouldn't have to write a function
i stg im blind i read "a pdc can"
with PDC you're gonna have to go through every single player that has ever joined every time removeEffect is called
no lols
its gonna call on player specific events
so
in particular its when they're in a boat
oh
and also i'd only have to loop through the players actively on the server anyways
then jsut use pdc yeah
cant remove effects from players that arent online
Also be proud i've been trying to clean up my code
public String giveItemUpgrade(Entity boat, ConfigurationSection section) {
if (section.getString("upgrade.item") == null) return null;
int amount = section.getString("upgrade.amount") == null ? 1 : Integer.parseInt(section.getString("upgrade.amount"));
if (boat.getPassengers().isEmpty()) return null;
if (!(boat.getPassengers().get(0) instanceof Player)) return null;
Player player = (Player) boat.getPassengers().get(0);
if (advancedMaterialHandler(section.getString("upgrade.item"), amount) == null) return null;
ItemStack item = advancedMaterialHandler(section.getString("upgrade.item"), amount);
ItemMeta itemMeta = item.getItemMeta();
itemMeta.getPersistentDataContainer().set(keys.getTemporaryItem(), PersistentDataType.BOOLEAN, true);
if (player.getInventory().firstEmpty() == -1) return messages.getString("player_inventory_full");
player.getInventory().setItem(player.getInventory().firstEmpty(), item);
return messages.getString("player_added_item");
}
then i misunderstood the quesiton
are you allergic to the enter key?
I live in sydney, real estate here is expensive. must be dense
(dense as in the code population)
Im a big fan of separating every scope with brackets.
But nice that you use safeguard statements at least.
Btw when ur posting Java please use
```java
for very good reason
there are some questional gifs on discord
byt yeah no you should really be leaving some blank lines
I mean they are if you properly link them...
They just need to verify
Honestly don't see why. blank lines dont do much for me. Same with brackets
Heh?
Unverified users can't send images or have gif previews
they make it easier to glance over at your code and understand the structure
Yea well like I said, they don't help me glance over my code easier
really? have you tried?
I honestly find no difference between the code i sent and spaced out bracketed code. other then difference in usage
yes used to
Heres a more normal bit of code
private ItemStack advancedMaterialHandler(String material, int amount) {
String namespace = material.split(":", 1)[0];
String id = material.split(":", 1)[1];
switch (namespace.toLowerCase()) {
case "minecraft" -> {
if (Material.matchMaterial(id) == null) return null;
return new ItemStack(Material.matchMaterial(id), amount);
}
case "itemsadder" -> {
if (CustomStack.isInRegistry(id)) return CustomStack.getInstance(id).getItemStack();
}
case "weaponmechanics" -> {
plugin.getLogger().warning("Weapon mechanics is not supported right now!");
return null;
}
}
return null;
}
private ItemStack advancedMaterialHandler(String material, int amount) {
String namespace = material.split(":", 1)[0];
String id = material.split(":", 1)[1];
switch (namespace.toLowerCase()) {
case "minecraft" -> {
if (Material.matchMaterial(id) == null) return null;
return new ItemStack(Material.matchMaterial(id), amount);
}
case "itemsadder" -> {
if (CustomStack.isInRegistry(id)) return CustomStack.getInstance(id).getItemStack();
}
case "weaponmechanics" -> {
plugin.getLogger().warning("Weapon mechanics is not supported right now!");
return null;
}
}
return null;
}```
it looks bald lmfao
eh I guess its something you gotta learn yourself
It adds cleanliness and even improves your maintainability.
Imagine if you later need to add debug statements or additional functionality.
Then
if (section.getString("upgrade.item") == null) return null;
Becomes
if (section.getString("upgrade.item") == null) {
Some code
return null;
}
Which is cumbersome and works against maintainability.
Every scope deserves an explicit separation.
Having dangling scopes is just not something i would ever indulge in.
oh ew why is that even valid syntax 😭
this honestly just seems like a person to person difference
This method should have a NamespacedKey as input
but whenever i post code here i will just edit it for the standard preferences
*it also sometimes, quite rarely, prevents a bug that is incredibly annoying to debug
it reads directly from yml
Sure, read it as a NamespacedKey directly from yml
7smile7, is Tuple used often in java or should I be creating a new class for a type?
Pair and similar classes shouldn't be a thing
^
wait explain?
Create discrete classes that contain the exact logic you need
Even if it's just 2 fields
Hm? I'm coming from a rust background, tuples are quite nice over there
If you want to add another field you'd need to restructure
They also don't provide discrete names for things (getLeft / getRight don't tell you much)
Either register a decoder for NamespacedKey which can directly be used as
FileConfiguration configuration;
NamespacedKey key = configuration.getObject("entry", NamespacedKey.class);
Or indirectly serialize to a NamespacedKey
FileConfiguration configuration;
String entry = configuration.getString("entry");
NamespacedKey key = NamespacedKey.fromString(entry);
ic, thanks
why? (I'm going to do it don't get me wrong, Just interested in what makes it better)
- Its fail-fast. If the config is erroneous, then you find out early.
- You need to maintain less code and can rely on the API more
Then
private ItemStack advancedMaterialHandler(String material, int amount) {
String namespace = material.split(":", 1)[0];
String id = material.split(":", 1)[1];
Becomes something more robust with actual named methods you can call:
private ItemStack advancedMaterialHandler(NamespacedKey materialKey, int amount) {
String namespace = materialKey.getNamespace();
String key = materialKey.getKey();
You should always prefer concrete Object implementations over having your data in ambiguous states like a raw Map, List or String.
You also get to depend on more mature checks (like regex patterns on namespaced keys) instead of creating duplicate code that emulates the same behavior
oh a bit of an unrelated question but what is it with plugins not supporting /reload
It's mostly about uh
Player states and stuff
Let's say you load player data when a player enters and save it when a player quits
Yeah
PlayerJoinEvent isn't triggered when you /reload so you're going to have online players with no data after the reload
sure it's not a nop but it's not too hard to just slap a for (Player player : Bukkit.getOnlinePlayers())
Basically all your entities and whatever else are there but you lose the context of everything
So you need to write code to re-obtain it
And it isn't always clear on how you should do it
For example what happens when you /reload a minigame plugin
Does the game keep running? How does it know its a reload and not the server stopping?
Or does it kick everyone out and nuke the worlds
i'd say this
Hypixel server restart vibes
/reload is not supported by Spigot in general.
It even tells you exactly that when you try to run the command.
Supporting this command would require many plugins to completely rethink their approach as the spigot
lifecycle for plugins simply doesnt contain any backbone for reloading.
Or was it another server? Idk
And why should we worry about this in the first place when you can just restart the server like usual
would /reload cause problems within spigot itself?
Generally not, but there is no guarantee that it doesnt randomly break as spigot disregards any concerns resulted from using /reload
ic
Thats what "not supported" means ^^
in that case another question, what's the point of having the command if you're not meant to use it
eh for debug purposes
Mainly for debug purposes. Its really just an artifact from the past.
but you shouldn't be debugging on a program state that is undefined anwyasy
Yeap
Okay, I see thanks
well I mean, its like any command line interface tbh, if you're a well experienced user and wanna be efficient commands can really help w that
👀 but why
Nope
i just did tho
You can track the xp yourself
Kind of? You can simply keep track of the exp yourself and simply map from your tracked data (long double etc) to the integer range.
The player never sees his own exp. Just the progess bar and level. So you can let him farm more exp, but the actual level cap is unchanged.
why make a custom xp system when minecraft has a perfecto xp system
thats not the integer limit
i was talking abt the integer limit of xp
which was too little, like 21.8k levels or smth
ah
This is the highest you can get. Around 2.1 billion.
But you need to keep track of the gathered experience yourself as mentioned.
i don't really need the xp, i use percentages to show how much xp is left
This error only happens on 1.20.5...
Jackson is downloaded as a transitive dependency but the annotations module is not
You mean by the spigot dependency loader?
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [sh, /home/superuser/SpigotBuild/apache-maven-3.9.6/bin/mvn, -Dbt.name=4123, clean, install]
at org.spigotmc.builder.Builder.runProcess0(Builder.java:1042)
at org.spigotmc.builder.Builder.runProcess(Builder.java:967)
at org.spigotmc.builder.Builder.runMaven0(Builder.java:936)
at org.spigotmc.builder.Builder.runMavenServer(Builder.java:905)
at org.spigotmc.builder.Builder.startBuilder(Builder.java:683)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:60```
openjdk 21
Yes, the dependency seems to be downloaded on 1.20.4 but not 1.20.5
It's a transitive dependency
Make sure you're up to date
This is either a bug or a temporary issue with my network or whatever, if it is a bug, it should be fixed
and if you are report it on jira
I used build tools yesterday
How do i know if i am outdated
/version
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [sh, /home/superuser/SpigotBuild/apache-maven-3.9.6/bin/mvn, -Dbt.name=4123, clean, install]
at org.spigotmc.builder.Builder.runProcess0(Builder.java:1042)
at org.spigotmc.builder.Builder.runProcess(Builder.java:967)
at org.spigotmc.builder.Builder.runMaven0(Builder.java:936)
at org.spigotmc.builder.Builder.runMavenServer(Builder.java:905)
at org.spigotmc.builder.Builder.startBuilder(Builder.java:683)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:60)
superuser@bulerman:~/SpigotBuild$ java --version```
Do what it tells you
View the Bukkit, CraftBukkit and Spigot changelog.
do what
Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
Use a supported java version for compiling
i use java 21
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-21-openjdk-amd64/bin/java 2111 auto mode
1 /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1711 manual mode
2 /usr/lib/jvm/java-18-openjdk-amd64/bin/java 1811 manual mode
3 /usr/lib/jvm/java-21-openjdk-amd64/bin/java 2111 manual mode
Press <enter> to keep the current choice[*], or type selection number:```
How are you compiling?
java -jar BuildTools.jar --rev 1.20.5
How old is this BuildTools jar?
Yeah, let me check myself
Same issue happens on latest spigot
?jira
so no way to build?
That was unrelated to you
then ill build 1.20.4
/usr/lib/jvm/java-21-openjdk-amd64/bin/java -jar BuildTools.jar --rev 1.20.5```
not a solution
wdym
??
What about with the GUI?
im building on a linux vps
how do you launch that gui btw
u dont have gui
X forwarding
Just double click the jar file.
Or
java -jar BuildTools.jar --gui
double clicking the jar didn't work
System?
gui command works
Kubuntu
1.20.4 seems to work fine
Hmmm, could be the issue we were running into with alternative distros.
Which gui library does buildtools use?
im on Ubuntu 22.04
The --gui flag was added to partially remedy that issue.
The GUI uses FlatLaf
Swing
Running without --gui doesn't launch a gui which explains why double clicking doesn't
opening links don't work
Well, we were shooting for windows like launching since some distros support it, but ultimately that functionality is really just .desktop files in disguise. :p
In 99% of distros, double clicking the jar will send it to java, java has everything related setup so as if you are launching any file format with the program that supports it
only works if file is executable
Is this with the GUI open?
Success! Everything completed successfully. Copying final .jar files now.
Copying spigot-1.20.4-R0.1-SNAPSHOT-bootstrap.jar to /home/superuser/buildtools/spigot-1.20.4.jar
- Saved as ./spigot-1.20.4.jar
superuser@bulerman:~/buildtools$```
Yes i was trying to click on source code button
All you have to do to open the link is using xdg-open command on linux
Ah, that's where we get into cross platform support issues. :3
Does that mean that you are running it in a headless env?
Or the kubuntu desktop?
It's not headless, otherwise the --gui parameter wouldn't have worked
Does 1.20.5 still not work for you?
hello, where can I take the token of someone head? Something like this
Not a big deal just add a switch case for OS name and each major OS (Windows, Linux and Mac) have commands you can use Runtime.getRuntime() to run
Is xdg-open available on all distros?
That token is just base64 json that contains the url to the skin
how do I dye a leather hourse armour item stack?
and how can I take it?
Also, does xdg still work with wayland?
There are websites that allow you to look that up
ok thanks ^^
Most of them
I haven't tried wayland yet so just curious.
or if you prefer just encode your own url link
Not sure, works on ubuntu 20.04 as i tested a long time ago
You don't need to be on X11 for the command to work, it just needs to exist
Some website?
?
That's what i observed but maybe it is because of XWayland
for this
namemc?
itemMeta = itemMeta.apply {
val leatherArmorMeta = this as LeatherArmorMeta
leatherArmorMeta.setColor(vanillaColour)
That's why I ask. Wayland is cool and getting better over time, but my best guess is that since xgd starts with x, it's likely built for xserver/xorg.
I would like to test it myself, but I don't have a lot of free resources or another computer to test out wayland atm.
Wayland is used by default in many user friendly distros, it works most of the time
what I have to do here?
It makes sense to run xdg-open instead of not working at all
See that give command
Wayland is nice as long as you don't have NVIDIA
It contains the texture
Although this will be a big undertaking since it would require splitting up some logic for OS specific commands.
BuildTools is kinda a jumbled mess right now.
Multiple OS is always a mess
Gets worse as you have to consider linux anything
Especially with display
You know what you should do?
You should help me rewrite the loading logic and web requests.
Hello, trying to update my 1.20.4 plugin to 1.20.5 and having some issues. For some reason it cant find the Material class
Cannot resolve symbol 'Material'

What
Show the code in question
C# 🔫
its too long
?paste
^^
Thats what... nvm
I think I messed somethin up with the java versions maybe?
Im on MacOs. Before running the buildtools for 1.20.5 I installed Java 21
openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment Corretto-21.0.3.9.1 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.3.9.1 (build 21.0.3+9-LTS
```java.lang.UnsupportedClassVersionError: org/bukkit/craftbukkit/bootstrap/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 62.0````
Looks like you're trying to use Java 18
To run the server or for the compiled plugin?
what's the output of /usr/libexec/java_home -V ?
Run the server
Class version 62 is Java 18
21.0.3 (arm64) "Amazon.com Inc." - "Amazon Corretto 21" /Users/georg/Library/Java/JavaVirtualMachines/corretto-21.0.3/Contents/Home
21.0.3 (arm64) "Azul Systems, Inc." - "Zulu 21.34.19" /Users/georg/Library/Java/JavaVirtualMachines/azul-21.0.3/Contents/Home
21.0.3 (arm64) "Azul Systems, Inc." - "Zulu 21.34.19" /Library/Java/JavaVirtualMachines/zulu-21.jdk/Contents/Home
18 (arm64) "Azul Systems, Inc." - "Zulu 18.28.13" /Library/Java/JavaVirtualMachines/zulu-18.jdk/Contents/Home
17.0.3 (arm64) "Azul Systems, Inc." - "Zulu 17.34.19" /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
17.0.1 (x86_64) "Oracle Corporation" - "Java SE 17.0.1" /Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home
11.0.14.1 (arm64) "Azul Systems, Inc." - "Zulu 11.54.25" /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
1.8.311.11 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
1.8.0_345 (arm64) "Azul Systems, Inc." - "Zulu 8.64.0.19" /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home
Amazon 😮
All this java stuff is way over my head lol
and java -version shows 21?
OpenJDK Runtime Environment Corretto-21.0.3.9.1 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.3.9.1 (build 21.0.3+9-LTS, mixed mode, sharing)````
looks good. which command are you using to start the server?
I added the jar to intelli J and click the green play button^^
It worked before
File -> Project Settings -> change SDK to 21. Or maybe also have to change it in the Run configurations
that works, thanks
I get the server running now, but still have the problem that intelliJ says it cant import Material. Funnily enough it still seems to build succesfully
Can I start a stream somewhere here to show you?
Idk if you can stream in the vc if you're not verified
Try reloading the pom.
didnt help
Exception java.lang.IllegalStateException: We don't have CustomModelData! Check hasCustomModelData first! [in thread "Server thread"]
what in the name of fuck does this mean
itemStack = ItemStack(material)
itemStack.apply {
itemMeta = itemMeta.apply {
val leatherArmorMeta = this as LeatherArmorMeta
leatherArmorMeta.setColor(vanillaColour)
setCustomModelData(customModelData)
lore(this@ColourableCosmetic.lore)
displayName(this@ColourableCosmetic.displayName)
}
}
(material is a leather hourse armour)
can I not set one
ohh
nvm it was getting customModelData from the item meta insted of cosmetic
kotlin at it again
How do I set a custom stack size?
declaration: package: org.bukkit.inventory.meta, interface: ItemMeta
oh damn thanks
I still have the problem, that my intellJ is flagging some random api classes as non-existent. Funnily enough I can still do a succesfull build.
https://ibb.co/7zX8GX7
https://ibb.co/KL0WQfM
Invalidate caches and restart
already tried
Try harder
Could it be related to the java version, which I used for running the buildtools?
What is a good jdk?
i don't think java has this@ColourableCosmetic
also why tf not just return null
Would I need to delete something before I rerun the buildtools with another java version?
graalvm
https://paste.md-5.net/yeyasehufu.cpp
So like is there a better way to make a biome registry of sorts? This is coll's example but I don't really wanna use reflection if possible
You can't not use reflection
boo
The registries all get frozen before your plugin is loaded
Oh fr that's I mean it makes sense but bleh
guys how does one keep up with the NMS api changing 😭
i just updated to 1.20.5 and my block send packet function is broken already
If you already ran BuildTools for 1.20.5 and it completed successfully, then there shouldn't be any issue with IntelliJ
or well more specifically how do I figure out which function to call
"NMS api" nms is not an api
?mappings
Compare different mappings with this website: https://mappings.cephx.dev
alright well then what do i call it
Use that for nms mappings comparisons ^
Just nms
So then when it comes to my seasons, I should probably write the temperature system before creating these biomes correct? The biome will be using the scale for different seasons / biomes
Also that being said, I'm not so sure how to integrate the temp system into these biomes
sure just update the item constantlty
hm no other way i know im afraid
Even with packets?
I mean you'd still have to "update" the item so I doubt
Hello, I discovered a bug with the hopper in 1.20.5, it crashed the server.
Oh shit. 1.20.5 fixed the mining fatigue thing I used for custom mining speeds
Fuck
1.20.5 now has an attribute for custom mining speed
player.block_break_speed
you gotta be fuckin' with me I was so worried for a sec
what does ?stash work?
What
Hm
does that exist in the api?
Bukkit is the API, CraftBukkit is its implementation
Did the enchantment enums change in 1.20.5?
there are only patches
Is that what you wanted to know?
most likely
Look at Bukkit & Craftbukkit
oh
then what the hell is spigot
It's weird, but spigot is the culmination of bukkit and craftbukkit. Not the Spigot project listed on stash.
Spigot is what, well, Spigot brings to the table
okay 1.20.5 just turned from "Oh fuck I hate this already" to "aweeeesom!!"
Spigot is all of the additional patches to craftbukkit that adds things like the spigot.yml and server performance tweaks.
Perhaps it's because it's more convenient, perhaps some DMCA artifact shit
pretty sure the patches is because of the dmca stuff
Updating patches sucks.
like when mojang sued
or whatever they did
bukkit creators
cuz of copyright?
that wasn't mojang
microsoft
?dmca
An unofficial explanation of the DMCA can be found here: https://www.spigotmc.org/wiki/unofficial-explanation-about-the-dmca/
Hmm. seems like I still want a custom system with packets but it's just gotten a bit more smooth since I don't need to rely on mining fatigue being a buggy
so I can set that to 0 and keep doing my own thing
awesome!
Hello! How can I spawn particles only in the same location as other particles were. Cause when I use many particles they spawn like aura around the player. But I need them to spawn only in player's eye location
player.spawnParticle(Particle.WATER_SPLASH, playerLocation, particleCount, 1, 0, 1.5, 0);
ig mojang kinda did cause it
Player#getEyeLocation
I have get player's eye location but the particles spawn around the player
Like aura
gotta do maths
there's some good threads on the forums with that kind of stuff
oh you mean you don't want it as an aura
is this the only code you use?
I'm not sure what the args on that spawnParticle is (bukkit particle api is horrible) but make sure you're not applying any offset
Location playerLocation = player.getEyeLocation();
int particleCount = 2;
if (CoolDownManager.checkCryCooldown(player.getPlayer())) {
CoolDownManager.setCryCooldowns(player.getPlayer(), Plugin.getInstance().getConfig().getInt("cooldowns.cry"));
for (Player nearbyPlayer : Bukkit.getOnlinePlayers()) {
if (!nearbyPlayer.equals(player) && nearbyPlayer.getLocation().distanceSquared(playerLocation) <= 12 * 12) {
nearbyPlayer.playSound(playerLocation, Sound.BLOCK_WATER_AMBIENT, 1.0f, 1.0f);
nearbyPlayer.sendMessage(Utils.color("&fИгрок " + ChatColor.GREEN + player.getName() + " &fпоплакал."));
}
player.spawnParticle(Particle.WATER_SPLASH, playerLocation, particleCount, 1, 0, 1.5, 0);
nearbyPlayer.spawnParticle(Particle.WATER_SPLASH, playerLocation, particleCount, 1, 0, 1.5, 0);
}
this is what you are invoking
now the only thing left to add from mojang is data driven blocks
and then the game is perfected and they can leave it be
oh ok thanks
Data driven custom entities are coming next. At least thats what the internals suggest with the data driven model animations added on the client.
Then blocks, and then custom UI elements. After that minecraft is practically a game engine.
Do we know what kinda ui elements?
damn kinda makes me wanna wait a bit instead of pushing my way through the current ways
Have some fun with the itemstack changes!
Blocks and UI elements are speculation. Custom animations are almost certain.
YEAHHH
THIS IS EXACTLY WHY I UPGRADED
AND NOW MINING IS EVEN COOLER
Sure is
i love mojang so much how could anyone hate such a great indie studio caring for their game
Wish I could say the same for psyonix D:
i mean sure its been 5 minutes and ive already found a bug or two with the new attributes but thats just gotta happen
@lost matrix Where do you report these kinda things ^
ive never been so hyped for a game in my life omfg
let alone to make shit for a game
Shoulda been on minecraft a long time ago man, it's always offered so many freedoms not only for the player but also the dev
I was making shit for minecraft in my first year or two
but kinda got frustrated and moved onto just game dev
Yes, thanks Intellij... (?)
kek
then I went "ew these game engines suck", so I moved to making my own game engine
but now i'm back cos it got hard
ah yes the pinnacle of development
IDEs are so magical arent they
Game engine gonna be a hard project for a solo dev D:
Yeahhhh
I'm still at it
but I decided to make a programming language for it and it's been rough
Why in the fuck
cos
I wanted the game engine to be revolved around an entity component system
so obviously the reasonable choice is to make a programming language dedicated to it
:kek:
I mean
it's kinda fun tbf
Sure that's one way but that's like 50x the work
How do you change the scale of an entity in 1.20.5 spigot?
WITH ATTRIBUTES BABYYYY
When did you start?
They are now
a year or two ago
Most of that time was spent learning how to make programming languages
with some graphics knowledge sprinkled in
and the occasional detour into "ooo shiny"
My only graphics knowledge is making a notepad with some extra modules in jfx
Who the hell enjoys front end? Psh front end devs are cringe
#LogicalThinking > #CreativeThinking
idk but i've been trying to trick one into joining me for years now
I even offered food but I have no idea what these mysterious creatures (frontend devs) are attracted to
other than spamming abstractions & new frameworks
wait no thats webdevs
In my experience, they're mostly attracted to prebuilt systems that they just get to play with
how do I look for usages in the spigot stash?
how can I find the instantiations of this class?
interesting
OH MY GOD SINCE WHEN IS THERE A MENU FOR ALL THE ITEMS YOU COULD ONLY GET VIA /GIVE
Are you unable to do so via your ide?
yes
intellij
seems to not find any library usages
What was that one server
I swear it was called DrugsMC
Also I love how your dealer frantically tried to get out of the shot
mmm
does get consumable in entity shoot bow event work if the bow used has mending? or will that return null
Wait do you mean the infinity enchantment?
In that case no arrow is being consumed so it will return null (probably)
AAAA I LOVE THIS UPDATE SO FUCKING MUCH ITS INSANE
OH MY GOD YOU COULD MAKE SO MANY GOOD MINIGAMES
Stop with the caps
Hes excited for the update ^^
thats an understatement
He seems to get excited a LOT
YEAH
yeah i mean the enchant
i have not been this excited for anything minecraft in so long its nuts
perhaps some ritilin?
That's like the magic cake from alice in wonder land kek
Having custom durability on any itemstack now is kinda cool
Sure makes custom items a lot more custom
excUsE ME WHAT
Big L
EG: Create a block with 1000 durability and max stack size of 1. Every time you place it, one durability is lost instead of the block item vanishing ^^
Whaaaa
i love this game so much
just today i was debating whether or not I should add a durability system cos it'd be so fucking annoying for not much usability (only works on tools)
aaAAAa
Would be nice for citybuild servers. No more inventories filled with items. Just load all your cobblestone into a single item and reload it at your chests.
Yeah new durability system for every single item, max stack size is now 1 for every item but they all have a durability of 16 / 64 :p
Wait, doesn't this mean we can have cool dank nulls in spigot?
Let's do it!
it does :)
Time to write some code?
I mean you sort of could before too
idk what a "dank null" is...
solves the inventory problem :D
a mod
I guess
What problem
Yall whats the api for setting the max stack sie
declaration: package: org.bukkit.inventory.meta, interface: ItemMeta
Cuz it's all attributes iirc
another question, why is ItemStack#getItemMeta nullable?
in what scenario would it be null
Oh
AIR ig?
Air has no meta
SKULL
skull? has meta
💀 to packets:(
yh for example
Alright done playing around now
how would I get and set the experience value of an experience bottle
I think thats hard coded to 3-11 on random
I dont see a property for this at least
its not, it's the Exp value in the item nbt tag.
so, how would I get the value and set the value
Show me where you got this information from
In my plugin, its getting the tag from the itemstack
)
