#help-development
1 messages · Page 605 of 1
I guess so
my main point was with it also being in onExecute
but i didnt really read which one was talked about
maybe you have 1 command but a few types of it eg,
setblock, alias: setblockx, setblocky, setblockz
you mean onCommand?
Its main reason dates back to when it was normal to provide help pages. But most of the time you wont really need it except for some other niche thing

i see
Is this format okay for storing authentication data?
Black1_TV:
algo: SHA-256
hash: 53a047d337611884f1241bb6374acc6d48fcd6d9692299396f02b5344221dcd3
salt: 705d30b93af6929e2821eff1ac0dc0370206b8d20623b31cb0e84b0d3ae2f33b
Or should I base64 encode it to a single string so it would be something like:
Black1_TV: U0hBLTI1Njo1M2EwNDdkMzM3NjExODg0ZjEyNDFiYjYzNzRhY2M2ZDQ4ZmNkNmQ5NjkyMjk5Mzk2ZjAyYjUzNDQyMjFkY2QzOjcwNWQzMGI5M2FmNjkyOWUyODIxZWZmMWFjMGRjMDM3MDIwNmI4ZDIwNjIzYjMxY2IwZTg0YjBkM2FlMmYzM2I=
or just use it like that:
Black1_TV: SHA-256:53a047d337611884f1241bb6374acc6d48fcd6d9692299396f02b5344221dcd3:705d30b93af6929e2821eff1ac0dc0370206b8d20623b31cb0e84b0d3ae2f33b
This (the 1st one) would be the most secure version but it's up to you and your personal preference..
hashes with salt are much more secure, they tend to add an extra layer of security by increasing the complexity of the hashed value.
So, what is the difference between it and label in CommandExecutor#onCommand?
none
All of them are salted the same way, just stored in yml file in different formats.
they're both called label internally
well it's common practice to store salt and the hash separately, but it's up to you
Thanks
hi!
how to call virtual anvil?
I use
Inventory anvilInventory = Bukkit.createInventory(player, InventoryType.ANVIL);
player.openInventory(anvilInventory);
The anvil opens, but I can't enchant items, all actions are cancelled. I think this is due to the fact that the inventory should be associated with the block
and what's the problem with classes? (pics)
it's good to store them separately because if in the future, you change the hashing algorithm, it'll be easier
and its also more readable I guess
Yeah so like if you update Java version and newer Java version includes better hashing algorithm then the server owner can change to it and notify all users that still have stored their password with old algorithm to just change it.
Java 8 seems to have SHA-256 as the "most secure" hashing algorithm included out of the box
Newer Java versions have more secure algorithm to choose from
but as plugin support Java 8+ then I should probably use SHA-256 as default as it's included in Java 8
You can yeah, it's also faster than any other algorithms, its known for that
So basically even if I die and plugin won't get updated anymore, it would still include the most up to date hashing algorithms that comes with newer Java versions.
Future proofing plugin for 500+ years in advance 😂
but will Java still be updated after 500+ years?
Probably not
yeah thats it xD java.security package will always contain sha-256, sha-512, etc.. its independent of any specific plugin updates
i couldnt possibly know 🤓
maybe in 500 years, we won't even have minecraft anymore
Sad
Basically Minecraft is a game that will still look decent after hundreds of years.
hopefully they don't make it into something that will need an rtx card as a minimum requirement
For example if you look at games that are 10 years old and try to make their graphics realistic it basically doesn't feel right now.
In a hundered years your casual intel is gonna have an integrated rtx card lol
Minecraft is a game that doesn't want to be realistic. So it has unique square look that looks decent even after 10 years
Yes
yeah, depends on the game engine i guess. minecraft was written from scratch.. with their wishy washy custom built engine developed specifically for that game, i think its called minecraft java edition engine or something
Better question would be if Intel would still exists...
Well, if minecraft would, why wouldn't intel
lol
I wonder how terraria will look in a hundered years... 1.17 final update number 17!!!
Minecraft has been one of the most popular game for years. Most games die or get replaced with sequels.
Minecraft is a game that never needs to have a sequel.
Well, neither bedrock, dungeons or legends will replace old good minecraft lol
Most likelly not, only because of the community / Java developers and the eco-system that developers have created.
except if Bedrock would be 1:1 copy so servers would still run in Java, but clients will run in Bedrock.
and Minecraft devs said that they plan for Bedrock to be 1:1 copy
Imagine if mojang/microsoft does some shit and people start protesting by not buying the game, refunding (those who are able to) and people just stop making content about minecraft
Well, takes them a while
It took them like several years to sync the versions
Code in Java is visable. So basically we just won't use their own official clients
There are already quite a lot of MC clients
Imagine somebody at mojang says one wrong word and poof, EVERYTHING is gone
im pretty sure the code is on github
Probably Bukkit, Spigot and Paper devs would get toggether and start releasing newer versions
What about others?
They vanished?
yeah
Or did they just evolve?
all but frostalf disappeared or went to work for jank
let say that Spigot / Paper devs work toggether and realease MC 1.30 for example
I bet forge will still add support for MC 1.30
and this is how we can contrinue developing on MC even tho the game "died"
maybe this can help you out.. i guess the AnvilInventory type class was never really completed?
https://www.spigotmc.org/threads/custom-anvil-inventory.421821/
Well, pretty expected
So basically the community can replace Microsoft completely
basically official MC developers
thanks
If something like that happens half mojang would probably not stop working on mc lol
By half mojang I mean the people
gnembon wont forget
yeah this would most likely just continue working XD
even if they won't get paid anymore. Like in free time
If I listen to InvClickEvent,
Do I need to listen to InvCreativeEvent too ? (I don't care if the action is done in creative I just need to know whenever inventory is clicked/interacted with, creative or not)
To put it straight forward, are there scenario where invCreativeEvent triggers but not InvClickEvent ?
no you dont have to, InventoryClickEvent is always fired regardless of the GameMode you've in
InvCreativeEvent is specifically related to creative mode inventory opening
No no no
That triggers InventoryOpenEvent
yes xD
InventoryCreativeEvent correspond to clicks AND drop from inventory in creative
Is the second scenario covered from InvClickEvent too when in creative ?
?jd-s
ohh right I see
aim to make all of ur stuff work in survival
I read the docs and what I'm telling you rn is what I saw in docs
just ignore creative events
you can combine them
or just use InventoryClickEvent that fires always
regardless of the gamemode
No no no
Take me for a mad person but I have made creative work 100% so far.
I catch when creative is about to synchronise the fake Armor back to the server and when it's the case I turn it back to how it's supposed to be.
I just feel way too many events trigger in creative
But would that cover the "when someone drops an item from their inventory in creative" scenario
I think not, you can use https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerDropItemEvent.html for that
welcome
I love your PFP btw
On a whole different subject,
Do you guys know how to retrieve an image of a chestplate (rendered, not as itemstack) from the front ?
(with default ressource pack )
Is vewy coot
thanks 😂
xD
i actually have like 7 cats
4 are small like the one in gif
btw what are some free and good plugin obfuscators?
SkullMeta meta = (SkullMeta) pick.getItemMeta();
meta.setOwner("1");
``` guys is this the correct way?
the parameter for setOwner is either an UUID or a player name as a string xD
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Skull.html#setOwner(java.lang.String)
yea
EventException: null its showing an error tho
its saying it cant pass event
Inventory inventory = Bukkit.createInventory(null, 46, "Welcome!");
ItemStack pick = this.createGuiItem(Material.SKULL_ITEM, "§6§lGet a class!", "§f§oYou will be granted with a class in random!");
SkullMeta meta = (SkullMeta) pick.getItemMeta();
meta.setOwner("804c4b20-e62b-4c3a-9a78-9b9ffc5e435e");
inventory.setItem(22, pick);
``` this is what i did basically
this.createGuiItem just gives an ItemStack
read the error. What is null?
you need to update the itemstack itemMeta too
SKULLs are way back in 1.8? around there? I haven't been coding in that version for awhile so i dont know what's different..
basically, pick.setItemMeta(meta);
any1 got plugin ideas
yes
what
Make geometry dash plugin
- must be compatible with non modded clients
- must not use any datapacks / ressource packs
how would u make a 2d game in 3d
utility/vanillatweaks
basically lets you change everything about the vanilla game from the config
like even mob spawning rates, default item damages, recipes, how much xp each mob drops, how much damage they deal, etc
very big project
[12:40:28 ERROR]: Could not pass event PlayerJoinEvent to CheeseRPG v1.0
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) [patched_1.8.8.jar:git-PaperSpigot-445]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.PlayerList.onPlayerJoin(PlayerList.java:314) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.PlayerList.a(PlayerList.java:173) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.LoginListener.b(LoginListener.java:144) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.LoginListener.c(LoginListener.java:54) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.NetworkManager.a(NetworkManager.java:231) [patched_1.8.8.jar:git-PaperSpigot-445]
this is the error
Have you tried my answer? #help-development message
yea ty
i forgot to set the meta
and also the chest size was wrong
Ok nice xD
but now i have a skeleton head
it doesnt show the correct head
https://minecraft-heads.com/custom-heads/decoration/59565-box this is the one i picked
Have you tried using the texture value instead?
how do i do that
its on the bottom of the page
how do i edit the lines on a sign
how would u make a 2d game in 3d
@silent steeple https://i.imgur.com/mB6fCfl.gif
lol
😛
and how do i use it in code
public void onSignPlace(BlockPlaceEvent e) {
Player p = e.getPlayer();
if (e.getBlockPlaced() instanceof Sign) {
Sign sign = (Sign) e.getBlockPlaced();
// how do i change the first line???
}
}
oh wrong import
i just realised wtf is a sign
why is it pronounced sein
when its sig n
String texture = Base64.getEncoder().encodeToString("texture-value".getBytes());
skullMeta.setOwner(texture);
I think that should work
do sign lines start at 0
Yes
you can change it with setLine()
ok
public void onSignPlace(BlockPlaceEvent e) {
Player p = e.getPlayer();
if (e.getBlockPlaced() instanceof Sign) {
Sign sign = (Sign) e.getBlockPlaced();
sign.setLine(0, String.valueOf(p.getAddress()));
}
}
so we gotta decode the base64
aight
Yeah
tried, its still a skeleton head
alr
You need to set damage to 3
damage?
can we send our spigot project here ?
Yes damage so it becomes a player head
There you go
public ItemStack getHeadWithData(String headName) {
ItemStack itemStack = new ItemStack(Material.PLAYER_HEAD);
SkullMeta skullMeta = (SkullMeta) itemStack.getItemMeta();
skullMeta.setDisplayName(ChatColor.WHITE + "Head: " + ChatColor.valueOf(main.configValues.getHeadColor(headName)) + headName);
List<String> itemLore = new ArrayList<String>();
itemLore.add(ChatColor.YELLOW + "HeadHunter " + ChatColor.GOLD + "Head");
itemLore.add(ChatColor.WHITE + "Points: " + main.configValues.getHeadPoints(headName));
itemLore.add(ChatColor.WHITE + "Skins: ");
if (getHeadSkinsByName(headName) != null)
for (String headSkin : getHeadSkinsByName(headName))
itemLore.add(ChatColor.YELLOW + headSkin);
skullMeta.setLore(itemLore);
String skinName = main.configValues.getRandomHeadSkinCharsComb(headName) == null ?
"" : main.configValues.getRandomHeadSkinCharsComb(headName);
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
profile.getProperties().put("textures", new Property("textures", skinName));
try {
Field profileField = skullMeta.getClass().getDeclaredField("profile");
profileField.setAccessible(true);
profileField.set(skullMeta, profile);
} catch (NoSuchFieldException | IllegalAccessException e) {
if (main.config.getBoolean("show-errors"))
main.getLogger().warning(e.getMessage());
}
itemStack.setItemMeta(skullMeta);
return itemStack;
}```
but i dont see anything related to damage
do u mean durability
can we send our spigot project here ?
Sure
Yeah
see the GameProfile line
If you're asking a development question
If you want feedback you can ask in #1100941063058894868
i see
TIL there's a code review thread
Code review with md when
@EventHandler
public void onSignPlace(BlockPlaceEvent e) {
Player p = e.getPlayer();
if (e.getBlockPlaced() instanceof Sign) {
Sign sign = (Sign) e.getBlockPlaced();
sign.setLine(0, String.valueOf(p.getAddress()));
}
}
anyone know why it doesnt do anything
so setting it to 3 does make it a head, but its glitched
You forgot to update the sign
lemme try
is sign.update() the method
Yes
Player player = event.getPlayer();
Sign sign = (Sign) event.getBlock().getState();
....
event.setLine(index, "text");
you're using BlockPlaceEvent?
yes
is skinName the base64
why not use org.bukkit.event.block.SignChangeEvent
Yes
cuz idc
ok
It's better and easier to access the modifiers
SignChangeEvent will fire when a sign is edited, when you're done with "editing the lines"
BlockPlaceEvent will fire when a block is placed and SignChangeEvent will just override anything you're trying to do with BlockPlaceEvent
Because its specifically for any sign type
@umbral ridge so how do i import GameProfile
also is it better to user paper api
to get the profile n stuff
import com.mojang.authlib.GameProfile
I always used SPIGOT api but yeah sure its your preference
xd
lol
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.8.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
yeah i dont know honestly i've never used it
this is what i tried
oh, im using inntellij atm
hello, if I send a file, there are 3 things that need to be added / edited, can anyone help?
I guess you can download the jar from their site? on downloads page? I guess its the api too
and then you can include it in maven/gradle as a dependency
i dont know much about thiws
Yeah it used to work around 2 years ago I hope it still does
?whereami
so now com.mojang is another dependency
does it also need a jar?
?nms
That's never been included in the Spigot API
It's part of authlib
You shoudl not be using GameProfile. Spigot has PlayerProfile now
1.8 users
I don't really remember how I did it
This is all I needed: depend: [ PlaceholderAPI, HolographicExtension, ProtocolLib ]
It's 2 years ago from when I was developing that plugin
And those are all the imports for it, in the class:
...
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
are you using 1.8?
is there a specific reason you are stuck on 1.8?
its for the pvp
cause its a pvp plugin
and the 1.8.8 spigot api has basically everything i need atm
just thought of adding player heads to make the gui look cool
Which the API cannot do in 1.8
i see
i dont think you have to resort to nms for that
but how do other servers have it then
Try this as well, one of the code snippet i found online, maybe it'll work
public ItemStack getPlayerHead(String playerName) {
ItemStack playerHead = new ItemStack(Material.SKULL_ITEM, 1, (short) SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) playerHead.getItemMeta();
if (skullMeta != null) {
skullMeta.setOwner(playerName);
playerHead.setItemMeta(skullMeta);
}
return playerHead;
}```
You do in 1.8 if you don't have the player name
but will it work with the base64
sm fix this it dont work
@EventHandler
public void onSignPlace(BlockPlaceEvent e) {
Player p = e.getPlayer();
if (e.getBlockPlaced() instanceof Sign) {
Sign sign = (Sign) e.getBlockPlaced();
sign.setLine(0, String.valueOf(p.getAddress()));
sign.update();
}
}
use SignChangeEvent
It won't
no
idk how to use that event
what is changing bruh
dis valid
@EventHandler
public void onSignPlace(SignChangeEvent e) {
Player p = e.getPlayer();
e.setLine(0, String.valueOf(p.getAddress()));
}
?
@EventHandler
public void onSignChange(org.bukkit.event.block.SignChangeEvent event) {
Player player = event.getPlayer();
Sign sign = (Sign) event.getBlock().getState();
String lines[] = {
event.getLine(0),
event.getLine(1),
event.getLine(2),
event.getLine(3)
};
...
}```
so
@EventHandler
public void onSignPlace(SignChangeEvent e) {
Player p = e.getPlayer();
Sign sign = (Sign) e.getBlock().getState();
sign.setLine(0, String.valueOf(p.getAddress()));
}
thanks for the reply
didnt work!
did you register events?
I have the same function body and it works for me 😄
yes
I'm in 1.20.1
X
At my property in cali the most i had was like nearly 30 cats
im on 1.8
damn xD
30
this is like the cat island
Its in the mountains. We breed cats and most stay outside for pest control a few every year get chosen to be inside cats. We find the extras homes when we have too many
how does this not work this is broken
@EventHandler
public void onSignPlace(SignChangeEvent e) {
Player p = e.getPlayer();
Block block = e.getBlock();
if (block.getState() instanceof Sign) {
Sign sign = (Sign) block.getState();
sign.setLine(0, String.valueOf(p.getAddress().getAddress().getHostName()));
sign.update();
System.out.println("set");
}
}
Again use the event variable to set the line
not the state
You check if the block is an instance of sign
Not the state
You cast state to sign when the block matches
e.update isnt a thing
no it's because of sign.setLine(), the sign object wont change the actual block but just the object initialized in the function body
do i need it
you have to use event.setLine...
That code will work fine outside of the event
no
so
@EventHandler
public void onSignPlace(SignChangeEvent e) {
Player p = e.getPlayer();
Block block = e.getBlock();
if (block.getState() instanceof Sign) {
Sign sign = (Sign) block.getState();
e.setLine(0, String.valueOf(p.getAddress().getAddress().getHostName()));
e.setLine(1, "test");
System.out.println("set");
}
}
Well either way i will leave it to you. About to clock out from work lol so dont have time to really look at it
XD
Nice
cat village
We work with an animal sanctuary in case we cant find homes too
It works for them because they can advertise kittens and cats etc
Ie we supply them
And we have a variety too from mancoons to calicos
it just doesnt work like wtf
Cool cool xD
We do you keep ignoring me
how am i ignoring oyu
calicos are funny xD But I do have an orange cat myself and I got it for free from one of colleagues, I think its expensive like $100
Idk what ..sort? is it though
that is what i am doung rn
You still have the instance of check
mancoons are huge, i've never heard of them
just googled them
they're like small lions
Orange cats are actually an anomaly just fyi. And you can only get them from cross breeding
@chrome beacon is this what u mean
@EventHandler
public void onSignPlace(SignChangeEvent e) {
Player p = e.getPlayer();
Block block = e.getBlock();
if (block.getType() == Material.SIGN || block.getType() == Material.WALL_SIGN) {
e.setLine(0, String.valueOf(p.getAddress().getAddress().getHostName()));
e.setLine(1, "ok");
System.out.println("set");
}
}
Oh really?? thats interesting, so they're kinda rare?
For a pure orange cat yes.
Yeah, my cat is all orange, but not her eyes though, her eyes are some sort of green?
thanks it worked
The common way of getting orange cats is cross breeding a taby with a calico but even then its not common to just have all orange and no other features
nice xD
I think orange cats are smart
nice xD they look adorable
They are the common ones you will see with the stubby tails
i was testing that sign plugin on a minehut server and someone joined and thought that it was their ip so they messaged me "recording"
lol
what about Ragdoll cats
Hi everyone, im trying to create a custom config file factory. But the default paths are not saving. Here is the code. https://paste.md-5.net/adefiriyag.java
Yeah ended up with these when my sister brought one to the property
Only had 1 litter of pure bred ones all the rest are a cross breed lol
Nice, so many cats xD
However i just love cats. I am planning on getting a pair of kittens probably some time soon
I currently do not live close to the cali property otherwise i would just take a couple from there lol
lol
im more of a cat person too
I like dogs too but if I ever had one it would be some small type
I like them because for the most part they take care of themselves
yes
they dont cause too much "drama"
my cat is outside for the most part of the day
she comes back in every evening and sometimes has a sleepover in the house xd
Lol
Also when it comes to laying down they are not particularly heavy and dont hog the bed
I train my cats like dogs too. But i use meow calls to call them and they usually show up lol. I am like the cat whisper in the family
😂 😂
If I knew cat language I'd talk to my cat
I had a cat that i named dog. Because it would really act like one. Even licked you etc
I used to have a cat that would fetch toys for me
a ball
she would run and come back with it
i dont know what is up with such catss why do they behave like that
but it was funny
I created the file but the defaults are nit saving
?configs
See this wiki page on how to use custom configuration files: https://www.spigotmc.org/wiki/config-files/
why when i go back to the lobby the scoreboard it stay hide
?conventions
^^ follow these
thx
What's the difference between setMaximumNoDamageTicks and setNoDamageTicks from LivingEntity? having a hard time understanding the description in the docs and why there's a maximum value? 😅
edit: figured out (i think) to anyone who is interested in the future,
maximum is like the amount of time until you can hit the mob again (eg 10 ticks)
then no damage ticks is just a value from 0-10 that counts up when you hit a mob starting from 0
if you want no hit delay, use setMaximumNoDamageTicks(0)
i already haver seen that like 1 million times man
in Eclipse, is there a .md file editor?
yes
What's it called, I've installed one but all I get is a white screen with no option to clikc on it and interact/edit it
look at teh bottom, theres tabs
You can change the default file association too
In your settings if you look for "File Associations" you can associate .md files with your newly installed editor so you don't have to swap each time
So why are you setting defaults like that
because I dont want to use the plugin instance to get the deafult, its a custom config factory
so you'd rather hardcode it?
Also no one said you need the plugin instance for anything
at the link you send, the use the plugin instance to get the config
the default built in plugin config support, yes
there is also a custom config section lower that you didn;t read
which one
You are adding a default which (by default) will not be saved
Thats not how defaults work
a default is used if the value does not exist. Defaults are not saved (by default) in the config
you can either use set instead of addDefault or you can #copyDefaults(true) to make defaults overwrite values
umm my bad, and thanks. Sometimes i'm stupid
ChatColor is deprecated what should i use?
it's not
its probably due to some redundancy in there and the fact that the defaults act on two different areas if you are not paying attention to which it is

oh forgot to tell you why I like manx's
they don't really meow lol
they chirp and when they do try to meow its like this weird soft crackling meow XD
"Use components instead"
they might be using paper possibly
where they deprecated a lot of stuff
that isn't deprecated in spigot
but now the thing, is when I set a value everytime I enable the plugin also, when is changed (the value) with restore to the .set() one
Oh ? xD I guess they're not so loud then like some cats, some cats can meow extremely loud XD
Also
they are one of those breeds that will really enjoy them cat towers
they like to be in high places 🙂
so if you feel the cat tower is being under used
just get a manx it will enjoy it XD
the manx kitten I had, loved to watch tv with me when I went to bed 🙂
I had a small tower for my orange cat where they can just scratch? but she destroyed it, it fell apart XD
really? my cat loves to watch tv too
shes directly staring at it sometimes
lol
So right now you're without a cat?
yep
cause I moved to Texas last year and housing wasn't consistent. Not ideal situation for pets and what not as well as for the owners
so it was easier to just not have a pet with me
Ahh
So i've got 4 small cats right and I was thinking of giving them away and I though, but that's not okay? They would be going away from their "parents", but they're all stray cats but you can pet them and they play
It's just that they're coming to my house every day and they cost money, food..
as long as you keep them in pairs they will be fine
I never have pets by themselves
Yes
yes 🙂
Double cat = double meowing, purring = double fun
well, when you have to leave for a bit, they won't be alone either lol
Right yeah, brother and sister cat situation
Double cat = two noisy bastards chasing eachother around in teh middle of the night.
is there a discord specific for protocollibs?
real
jree
hello i have a problem with my plugin, when i use the first command that place the player coordinate i a variable, and when i use the second command the player will teleport to the position seted by the first command, but that didn't work, can you help me?
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
Hi, How do you make a plugin multiversion? what should I be looking for?
Start by targetting the lowest version you want to support
Then add gradle or maven modules for the newer versions
and then only use classes that are supported on the current version
okay, so basically you build the plugin singularly for each version?
and change what needs to be changed for every version
Pretty much
thanks
😂
only use the API
SimpleDateFormat is troll but sure
Idk why they didn’t deprecate it
DateTimeFormatter
One it isn’t thread safe
And it operates with legacy date and time classes
Usually you wanna use time stuff that implements TemporalUnit, TemporalAccessor etc
Oh
it has ofPattern() static factory
Dw
You can invoke that static factory method and then invoke withZone or withLocale w/e you need
Yes
👍
i know but i have check my code, it is verified by people and it is good, so i will an exemple of a code for do this
Yeah well I’d say look at javadocs, but basically it can be time, date where it may be zones or offset or like other cultural impls
Doesn't the Java Tutorial have a tutorial on the Date-Time API
local time has no month
If I set a gamerule doDaylightCycle to false, I still can set the world time via code right?
how to open a sign gui and gets its input?
I tried using ClientboundOpenSignEditorPacket but didnt know how to get imput
Yes, idk if it applies to the new api tho
how can create recipe with two avaible items type at slot
Hello who can show me the code of a home plugin or any other code to copy the position of the player and then teleport it to the execution of another command
Could be BlockFromToEvent https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockFromToEvent.html
?paste
any help on this problem everything should be properly written also values from config.yml should be correct i just get this error every like 2 minutes or so
msglist.size() is zero
@EventHandler
public void onPlayerJoin(PlayerJoinEvent e) {
Player player = e.getPlayer();
if (player.hasPlayedBefore()) ;
{
e.setJoinMessage("player has joined the server");
} else if(!(player.hasPlayedBefore())) {
e.setJoinMessage("Player has joined joined the server for the first time!");
}
}
}
its still giving the error of else without if
remove the ; at teh end of the if line
it still says else without if
ty
btw
it just groups code
how can i change the cursor back
yep
Your current cursor is hand?
try to restart the program
i did
Hello, how can I get the height of a LivingEntity ?
With get height
okay thanks
It's just getHeight() but from the Entity class
Does CustomModelData apply to how armor looks when worn?
Minecraft bruh
Well you can get a model on the head due to how that's rendered (using a non-helmet item stack)
but for the rest of the armor no
Well
Cursed minecraft mechanics
I want to make specific armor look different that normal armor
Just texture or model?
Both
Just textures might work
The item texture obviously, but the model...
If I want to spawn particles at the players mainhand location, how would I know where that is?
is there something like that in optifine?
Doesn't look like it. It's been on the todo for years now
Well, I'm not making a mod like that myself, definitely
what event is fired when player copied item in creative?
declaration: package: org.bukkit.event.inventory, class: InventoryCreativeEvent
InventoryClickEvent could also be fired not sure
Try it
thanks
Warning with creative it's buggy as fuck and may not work as intended
💀
A lot of it is completely client sided
Yeah
The server doesn't recieve packets for quite a few things especially with the inventory
It probably works for item copying but just caution going forward creative inventory isn't fun to work with
It is so client sided that you could in theory give yourself any items using clients or the saved hotbar function
race condetion
it load the data in server b faster than it save it in server a [which is lobby]
what is the best way to handle this issuse?
without using runnable or delaying the load method?
you are transfering them so don;t send them before you have saved
its same plugin , same database but it must save before player join the second server he suppose to
when i do something in server A it should save it , and it does in that server , but if i join server B , it won't be displayed there
where are you saving data? sql?
MySQL
is your plugin handling sending the player to the second server?
its not a bungeecord plugin ..
its a spigot plugin
when PlayerQuitEvent is triggered i save the data
thats not what I asked at all
no its not
only when PlayerJoinEvent , PlayerQuitEvent i do the loading and saving .
then the only thing you can do is delay in teh async preLogin event until the data is updated
hmm, guys, I need to make a system where the player will basically go out of his body and for that I need to save the players inventory in a way that it stays even after a reload of the server (or the player rejoining). How do I do that the best way?
well, I need to save it and then remove it/modify it with the ability to restore it fully
I might've not explained enough
all ItemStacks are serializable
well, that does not tell me a lot
BukkitObjectOutputStream can convert them to bytes
what do I do? Databse? Json? Config?
hmm
any other ideas?
not using sql
so, what way of saving that would you recomend?
I already told him to delay the connection until sql updates
you could stor it on the player
pdc?
?morepdc
You can create custom persistent data types on your own, or use one of the many libraries available which have implemented those which match your needs. Learn about more persistent data types here: https://www.spigotmc.org/threads/more-persistent-data-types-collections-maps-and-arrays-for-pdc.520677/
use that lib and you can easily store an inventory in pdc
hmm, that sounds like a great idea I wouldn't come up with
it's alex as always
what was the way to send the player an actionbar message?
player#spigot
Hello, it's possible to summon a fake player using spigot api? if yes, how?
Also a player that appears on server counter
not using just the api
Using nms also?
yes
Any guide for summoning one?
is there some event for when some entity moves?
no
I need to be able to track when an entity falls
Mythic mobs + libs disguises does it as a side effect
well, you can check when it takes fall damage
hello
i was wondering if there are any changes since 1.14 to cancle the "swap" animation for items in hand
(because if you change the name of the item, it treats it as a new one, so it will do a hand animation that goes down and up again)
I found this forum about it that sais its not really posible
https://www.spigotmc.org/threads/change-item-in-the-hands-animation.470270/
but maybe someone found a work around that the cliendt doesnt think its a new item so it doenst even get a chance to do the aniamtion
Managed to spawn one, how can i make it permanent?
Ah entities following entities in sync. The age old issue.
If anyone figures it out they gonna be
also, where in F3 can you see that your game is lagging
The FPS thing
oh sorry, i ment the server
like, that the server is having a hard time
like, there is tx and rx for example, but i also have no idea what is normal for these numbers to be
Just check ping and tps
On the client you can't see tps in f3 afaik
For ping it'd be easier to just use a plugin than figure it out from sent and received packets
send is low so thats normal i think, but what is the avarage rx?
receive i have bwteen 200 and 350
AFAIK there is no normal amount
It depends
On
A lot
Dyou have plugins, dyou have other shit and stuff. Dyou have mods are you moving around or standing still are you minig chatting crafting etc
All changes it
i have a verry weird problem
whenever i constantly update an items meta every 20 ticks
i am unable to place and mine blocks when its not an empty hand
(so not even with the item i am updating, just any item will have this problem)
but this problem onlly accurs when i have an item with a scheduled reapting task to update it
any clue how this relates to eachother and how to fix or fgind a work around
you can;t update meta on an item you are using. it gets replaced and treated as a new item stopping the action
wait, but why is it stopping an action then that has nothing to do with that item
the item is littaraly not even in hand + when i have no item in hand (empty hand) this problem doesnt accur
private void sendActionBar(Player player, String message) {
player.sendActionBar(ChatColor.translateAlternateColorCodes('&', message));```
How can i fix this
and what might "this" be
it will not send the Action Bar
is there something to make mobs not reflect when the player goes to near?
which version are you
like, for what mc version are you making it
1.19.2
the sendActionBar method has been depricated since 1.17 as far as i know
ooo
it still works, but use the one which takes 4 args
can i create text from json?'
that wouldn't even compile
you could schedule a task for every item that is droped
but i dont think your server will like that when everyone is going to drop items so i woudnt do it that way
though i am no master so i might be not as bad as i think it would be
Loop over all existing Items once per tick (or once per second), check their time alive, and if greater than X, remove it
Spigot has a config setting for teh despawn timer on items dropped
item-despawn-rate
Hi everyone ! Do you know any tutorial for 1.19.4 spigot's tablist or a fast and lightweight tablist api ? thanks !
what exactly do you wanna do?
I'd like to do the basics, put a header, a footer, and why not add a prefix for the players. Unfortunately I can't find any tutorials online. I don't want to install a plugin. And most of the things I've found use deprecated methods, which I also want to avoid.
The tablist header and footer can be set using.
Player#setPlayerListHeader()
Player#setPlayerListFooter()
or if you want both
Player#setPlayerListHeaderFooter()
Yeah, and cant one use the players displayname for prefix etc?
Player#setPlayerListHeader()
Player#setPlayerListFooter()
Player#setPlayerListHeaderFooter()
All three are deprecated in 1.19.4
In addition, I wasn't specific enough. I'd like the tablist to always be at maximum size (i.e. all 4 columns).
In 1.8 I know that we use packets for this, but I have no idea how to do it in 1.19.4.
Why don't I have descriptions of methods and functions when mousing over them?
No they aren’t
You are not using the spigot api
The fuck if they are.
Yes, my bad, I've just seen that, I've been using Paper's API until now, it's not a big deal, I'll switch back to spigot then!
BukkitScheduler async tasks question
How do I install it?
he wasn't answering your question and by the way if you don't tell us your IDE and possibly os nobody will try to guess
He was answering his question.
he told RealDragonMA that he is not using Spigot api because these methods aren't deprecated... What's up with people...
try Ctrl+Q then F4 (when you click on a function first)
It works
Anyway I found the button download documentation in dependencies. Seems like this is what I need
Class loader shit
Why the ItemFlag isnt working?
@EventHandler
public void aboutToEnchantItem(PrepareItemEnchantEvent event){
ItemStack item = event.getItem();
if (item == null){
return;
}
if (EnchantingItemsOrBooks.getEnchants(item).size() > 0) {
EnchantingItemsOrBooks.formatEnchantLoreText(item);
System.out.println("this item is already enchanted");
return;
}
_________________________________________________________________________
public static void formatEnchantLoreText(ItemStack item){
ItemMeta meta = item.getItemMeta();
if(!meta.hasItemFlag(ItemFlag.HIDE_ENCHANTS)){
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
item.setItemMeta(meta);
}
List<String> lore = new ArrayList<>();
Map<Enchantment, Integer> enchants = EnchantingItemsOrBooks.getEnchants(item);
for(Enchantment enchantment : enchants.keySet()){
String enchantName = formatEnchantLoreLine(enchantment.getKey().toString());
int enchantLevel = enchants.get(enchantment);
lore.add(ChatColor.GRAY + enchantName +" "+ toRoman(enchantLevel));
}
item.setLore(lore);
}
when i comment the EnchantingItemsOrBooks.formatEnchantLoreText(item);, it gives me the default enchantments name, which only makes sense if the tag isnt working
Enchanted books are weird. They use the POTION_EFFECTS tag to write the data for some reason.
Every other ItemStack that can be enchanted uses the ENCHANTS flag to display them.
Ik, it's weird.
i did
itemstack.setItemMeta(...) WHERE
item.setItemMeta(meta)?
yes
you are using stored enchantments
can i add an ItemFlag to an item which already has the ItemFlag?
Yeah you could xD
What version are you on my buddy?
ItemStack::setLore was yeeted long time ago I believe (ItemMeta::setLore instead)
they fall under additional, the stored enchantments
i know there's the item.lore, but this way is easier
if i add the HIDE_POTION_EFFECS, or HIDE_ITEM_SPECIFICS, wont it hide every information from the item?
yep
im afraid to hide information that i dont want to
i just want to hide the enchantment text
but this is only necessary for enchanted books, right?

stored enchantments is a enchanted book thing yea
you are using it for some reason
idk why
Could someone help me. im trying to create an item forced into one of the players slot. and when any kind of interaction with the item (may it be drop click or try to drag out) it will open an inventory. How would i do that?
for working with anvils
they dont detect if it's not on the stored tag
misc?
Well then only hdie the specifics for enchanted books ?
HIDE_POTION_EFFECTS is a bad name
they added the HIDE_ITEM_SPECIFICS
Who’s they
?whereami
idk if its a paper or spigot thing
seems like its paper
anyway, thanks for the help!
¯_(ツ)_/¯
what do you mean by not using sql , use redis ?
its only for communcation i guess its not a type of database?
I already have 4 open 😭
Redis as a message broker
I already told you to stay with sql and delay in the async pre login event
cannot do asyncPreLogin event ..
if you are on 1.8 I can;t help you
my problem is : race condetion
it load the data in server b faster than it save it in server a [which is lobby]
I think elgar meant use redis to signal updates of the persistence database such that servers may know when to invalidate locally cached data
no using 1.19.4
Yk
then you can use async pre login
are these servers under a proxy?
your player is switching between servers and you are on 1.19+ so you can definitely use asyncpreloginevent
Is it possbile to track the CPU usage of chunks?

yes , my problem is if won't use any proxy , it will save , load the data correctly on both servers
but if i use proxy , and do /server lobby :
then i select the thing i want and do /server something
it won't load it on that server
Yeah right
I think rabbitmq carried this one for me
Maybe you’ll have to end up writing a bungee plugin
Just as a way to make it determinate
its a quests plugin of some kind ..
I think they mean that the order might be ->
lets say from servers A to B then B APPLE invokes before A quit event
that's my problem yeah
And I assume they sink the data on the quit event
Lol
Ah 
but if iam not using any proxy it will work just fine ...
is there a good decent way to fix this problem ..? should handle 100+ players or more ..?
i can send you the server ip if you wana test it and see what do i mean .. ..
how did you manage to fix it?
any messaging system fixes this
can i use redis ? for it?
yes
you only have to tell server B that server A is done saving data
and have server B block AsyncPlayerPreLogin until that message arrives
im unsure; but maybe bungeecord offers some good events you could rely on
before it loads data
thank you guys .. will try it ..
Best of luck
never used redis before so its big struggle :p
Checkout lettuce or redisson (:
alright , thanks

Jedis, yikes, but yeah go on
First of all
You 99% wanna use a JedisPool
To pool ur jedis connections
alright
Its like a thread pool but with jedis instances
i have a User class with UUID , Player , and ActiveQuests map
if iam not mistaken or i may be , this is how i can use it ?
Vapor.getPlugin(Vapor.class).getConfig();
why should we use DI when we can just do this
Looks fine just
One you explicate the dependencies of classes that depend on getConfig()
Two you depend on type and not instance, this leads to loosely coupled code
Three you can easier unit test by isolating the class
thanks
Four its more principled, for instance using the static singleton makes open closed principle much harder to get by (just one principle as an example)
Five, all of this leads to more flexible code which you’ll thank yourself for later when you wanna do changes, it becomes significantly more important the more lines your code base gets
yeah i just used it like this
FileConfiguration config = Vapor.getPlugin(Vapor.class).getConfig();
in a util class
Oh that’s probably not a utility class if it depends on stuff like that
You should probably just make it a normal class, no?
Myeah well I havenr seen ur code so ict
1 sec
@UtilityClass
public class VaporConstants {
private final FileConfiguration config = Vapor.getPlugin(Vapor.class).getConfig();
public boolean KITMAP_ENABLED = config.getBoolean("kitmap.kitmap_enabled");
public Integer BORDER_SIZE = config.getInt("map.border_size");
public Integer WARZONE_RADIUS = config.getInt("map.warzone_radius");
public Integer FACTION_SIZE = config.getInt("map.faction.faction_sizes");
public Integer ALLIES = config.getInt("map.faction.allies");
public Integer BALANCE = config.getInt("map.default_balance");
public Integer CLAIM_BALANCE_MULTIPLIER = config.getInt("map.claim_balance_multiplier");
public Integer BLOCK_OPERATION_SPEED = config.getInt("map.block_operation_speed");
// enchantment limiting
public Map<Enchantment, Integer> ENCHANTMENT_LIMITS = ImmutableMap.of(
Enchantment.DAMAGE_ALL, config.getInt("enchant_limiter.sharpness"),
Enchantment.PROTECTION_ENVIRONMENTAL, config.getInt("enchant_limiter.protection")
);
}
Lmk how to improve
If you wanna go about this the right way, just go with straight object mapping
never done that what does it go like
Its a bit more engineered of a design through
Hmm have you ever read luckperms code or sponges code?
no
Hmm I see, idk if perhaps, at this moment, this design is too complicated for you
what does it go like
hey, for obfuscating java plugins, I could use allatori right? but it's not free? are there any free alternativeS?
well Simon, let me simplify, use encapsulation, that means those getter methods rather than fields
And then pass the config through the constructor
(Lets skip object mapping for now)
never thought of it that way
The reason getter methods can be nice is if lets say you reload ur config
Then the methods will automatically yield the most updated values
i can just use the @Getter annotation from lombok right?
(There are other reasons as to why encapsulation is preferred)
Ehm, no
Because you don’t have an variables/fields
Basically what I mean
public int maxSize() {
return config.getInt("max_size");
}
also use int instead of Integer
(Unless you want it to be null?)
?
You’re using Integer
so
Which is nullable, and it is just an unnecessary wrap around int in ur case
Cuz getInt() is returning an int
So why use Integer?
there was a reason i did but i wrote the class a while ago
Could someone tell me why this doesn't work?
@EventHandler
public void onJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
ItemStack Menu = new ItemStack(Material.NETHER_STAR, 1);
for (Player pl : Bukkit.getOnlinePlayers()) {
player.getInventory().setItem(9, Menu);
}
}
why are you giving everyone a netherstar when 1 player joins
^
also you want it in slot 8
i will change that to be an menu item
hes not even he has 2 player instances
Actually
You are setting a nether star in slot 9 for the joining player
Once for every other player online
so if 50 players are online then they person who joined gets the netherstar 50 times?
Oh. How do you suggest i should change that then
What r u trying to do
Yes but since it’s setItem it just gets overwrote 50 times
yeah
Im trying to make whenever a player joins they will get an specific item on slot 9 which when interacted with in any kind of way it will open an inventory (im working on it 1 step at a time)
slots start at 0 first of all
for opening the inventory you can use PLAYER_INTERACT_EVENT and check RIGHT_CLICK_AIR
and then go on from there, Bukkit.CreateInventory, etc..
yeah i can prob figure the inventory out. you would be suprised how many guides on youtube specificly for inventorys lol
Thanks for telling me that. I will change and keep it in mind for the future
if you want to prevent the player from dropping the item out of the inventory / dragging it, you can use InventoryClickEvent, InventoryDragEvent, PlayerDropItemEvent
yeah so you should put slot 8
in the code
yeah i've seen those lines before. i will try adding them to either that slot or the item stack depending which one works
Yeah there are many xd
If I remember correctly you can just to <inventory>.setSlot(index, itemStack) or material im not sure, it's all on javadocs
btw. how would i change it so it only gives it once every time someone joins instead of it now giving it the amount of players that are online lol
Use PlayerJoinEvent
check if its the first time they join
that's what their in rn
if it is set the 9th slot with that item
just remove the if statement then?
i've already got a system like that set up. if someone joins for the first time its a special welcome msg if not its just an regular
i just checked it worked for like half a moment but then it disapeared. could you tell me why?
(the code)
@EventHandler
public void onJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
ItemStack Menu = new ItemStack(Material.NETHER_STAR, 1);
player.getInventory().setItem(8, Menu);
}
}
if you seen the netherstar for a second then maybe a different plugin is interfering?
im guessing mmoprofiles but i would have no clue how to bypass it except for it giving the player those items on an timer
which that would work fine now that i think of it
hi guys, i am making my first plugin ever but i am getting an error when loading it 🙂
[22:53:28] [Server thread/ERROR]: Could not load 'plugins/TestPlugin.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:152) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136) [patched_1.8.8.jar:git-PaperSpigot-445]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:293) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:202) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [patched_1.8.8.jar:git-PaperSpigot-445]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
i have that
name: MyFirstPlugin
version: '${project.version}'
main: me.bertram.myfirstplugin.MyFirstPlugin
api-version: '1.20'
authors: [Bertram]
description: My first plugin
it's under resources
don;t move it
I mean, make sure you are compiling with maven
are you building with maven?
yes
intelij?
yup

you are using artifacts not maven
so you have a task that runs the package goal 
maven window right side of screen
yes
in lifecycles run package
Mvn wrapper-> install
so what do i change?
i cant press the button
what button?
Hi guys im developing a website like aternos how can i list plugins in spigotmc's website like aternos?
pretty sure aternos does not list all plugins on spigot
they provide you a curated list of usable plugins
Can java code be compiled in real time
there is hot reload
Yes, but there would be some catches. What do you want to achieve?
Also real time is a rather variable definition. Don't expect compilation to happen instantly, regardless of which environment you are in.
Hey so i am making an addition to a plugin with permision. I keep getting java.lang.IllegalStateException: bStats Metrics class has not been relocated correctly!
I think I did it right, im very new to plugin dev so anyinfor would be great
Show how you're relocating bstats
And it is also worth noting how you are building your plugin
<configuration>
<relocations>
<!-- Relocate bStats to our own package -->
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>${project.groupId}.${project.artifactId}.utils</shadedPattern>
</relocation>
</relocations>
</configuration>
yeah ^^
i need help with that
some tutotial said to make an artifact and do it though that
but thats not how i learnd
Like, do you use eclipse's "Export" feature or do you use the IntelliJ artifact (or whatever it is called) feature?
Then don't. What you should use instead I cannot say
No use maven
how do i use maven, sorry this all very new to me
Probably not. I am not familiar with IJ to say what you should use.
But it should probably be labled "maven package" or "maven install" or similar
Do you have a pom.xml in your project?
i do, thats where the relocation is
i dont have a thing in the top right of my screen that says run
See the right side of IJ
wait im dumb
Should be a button called maven
i totally missed maven in the confiurator
Thank you guys for ur help! that def worlked!
Could someone help me make it so you cannot move the item it will give you?
@EventHandler
public void onJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
ItemStack Menu = new ItemStack(Material.NETHER_STAR, 1);
ItemMeta meta = Menu.getItemMeta();
meta.setDisplayName(ChatColor.GOLD + "Profile");
player.getInventory().setItem(8, Menu);
}
@EventHandler
public static void onInteract(PlayerInteractEvent event) {
if (event.getAction().equals(Action.RIGHT_CLICK_AIR) || event.getAction().equals(Action.RIGHT_CLICK_BLOCK))
{
ItemStack menu = event.getItem();
if (menu.hasItemMeta() && menu.getItemMeta().hasDisplayName()){
if (menu.getItemMeta().getDisplayName() == (ChatColor.GOLD + "Profile")) {
}
}
Player player = event.getPlayer();
Inventory Profile = Bukkit.createInventory(player, 27, ChatColor.GOLD + "Profile");
player = event.getPlayer();
player.openInventory(Profile);
}
}
Compare strings with .equals
Hey, how can you make on-hover messages configurable?
is it even possible? or you can't insert on-hover messages in normal message?
config.yml
message: "today is a {hover-msg} day." # {hover-msg} would be a message that can be hovered
code:
Player player = (Player) sender;
TextComponent message = new TextComponent("somewhat a nice");
message.setColor(ChatColor.GREEN);
message.setHoverEvent(new HoverEvent(Action.SHOW_TEXT, new Text("Hello World")));
player.spigot().sendMessage(ChatMessageType.CHAT, message);
How can I use TextComponent class to insert custom messages in the normal message?
I know it should be possible because default vanilla advancement messages come with a on-hover message at the end of the whole message
Oh? But then how do I figure out which part do I have to append
?
So I have a string right? "klajsdakljsd {hover-messag} aisdajd"
do I go through the string for each word? and check if its {hover-message}?
how do I get the input when the player closes the gui
and then add the onhover event for it