#help-development
1 messages · Page 1396 of 1
ok
whoever done this
i hate you
public static boolean equals(ItemStack itemstack, ItemStack itemstack1) {
return itemstack.isEmpty() && itemstack1.isEmpty() ? true : (!itemstack.isEmpty() && !itemstack1.isEmpty() ? (itemstack.tag == null && itemstack1.tag != null ? false : itemstack.tag == null || itemstack.tag.equals(itemstack1.tag)) : false);
}
public static boolean matches(ItemStack itemstack, ItemStack itemstack1) {
return itemstack.isEmpty() && itemstack1.isEmpty() ? true : (!itemstack.isEmpty() && !itemstack1.isEmpty() ? itemstack.c(itemstack1) : false);
}
private boolean c(ItemStack itemstack) {
return this.count != itemstack.count ? false : (this.getItem() != itemstack.getItem() ? false : (this.tag == null && itemstack.tag != null ? false : this.tag == null || this.tag.equals(itemstack.tag)));
}
this is nms code of itemstack compare
for some reason equals and matches are reversed
how do I easily get the total amount of items matching a Material in the inventory of player?
that looks like obfuscated code lmao
yea
but it was mapped
by bukkit team
and for some reason equals and matches are reversed
this is NMS
#Inventory.all(ItemStack item).size();
The config isn't in the resource folder
what should i do with .runTaskLater?
Bukkit.getScheduler().runTaskLater(this,
() -> { p.setVelocity(e.getDamager().getLocation().getDirection().multiply(getConfig().getInt("knockback-of-players");
}, <delayInTicks>);
.runTaskLater(#PluginInstance, #Runnable(), #delayInTicks);
thanks
BukkitScheduler is deprecated in some flavours of spigot. Prefer using
new BukkitRunnable() {
@Override
public void run() {
}
}.runTaskLater(#PluginInstance, #DelayInTicks);
ok ty
Hello
I have a problem, when I try add %mcrealistic_thirst% to the plugin simplescore it show me this
I'm wondering making someone verify to receive their license key on discord to receive it after they have purchased it from spigot is breaking the premium guidelines?
The placeholder value is probably not inside the plugin itself but inside some kind of plugin or hook (for example PlaceholderAPI)
see plugin's documentation to hook your plugin with another plugin's placeholders
or if plugins placeholders are placeholderAPI implementation type seek for its documentation for getting placeholder values.
probably it is breaking it
spigot only allows low type of obfuscation on the market
Yo Pulse :)
How can I use that if I only have the .getType of the item?
Anyway your plugin is going to get leaked regardless of what you do
new ItemStack(Material)
And I need it to be exact, if I just put in the Material it displays the amount of full stacks
Can I have a link to the premium guidelines, please?
tried that but returns 0 for any amount in my inventory
Material sellitem_material = sellitem_seller.getInventory().getItemInMainHand().getType();
ItemStack sellitem_itemstack = new ItemStack(sellitem_material);
int amount = sellitem_seller.getInventory().all(sellitem_itemstack).size();
sender.sendMessage(String.valueOf(amount));
one question, how could i hide the plugin doing commands from the console
for example lets assume i use the method that makes the plugin do a command in the console, how could i make it hidden?
In this case, it wouldn't be allowed
ItemStack[] contents = #Inventory.getStorageContents();
int counter;
for (int i = content.length; --i > -1;) {
if (contents[i].getType() == Material.#SomeSort) {
counter += contents[i].getAmount();
}
}
@silver shuttle
Inventory.getStorageContents()*
mhm
only for a specific item?
Right okay, how do I make a server-side license verification then?
you don't
Is it possible to update inventory each tick without runnables ?
the plugin needs to run without restriction or internet connection
forgive me for the weird for loop. I like optimising it since it seems bytecode is more efficient
basically you aren't able to do anything anti-piracy related while complying with spigget's guidelines
which is fine
anti piracy is cancer
I wish premium plugins were open sourced and forced to follow the same license as Bukkit
🤷♂️
I might aswell switch over to McM or my own website then
I've saw some plugins go up for prices like 200$
do that then?
Material sellitem_material = sellitem_seller.getInventory().getItemInMainHand().getType();
ItemStack[] contents = sellitem_seller.getInventory().getContents();
int counter = 0;
for (int i = contents.length; --i > -1;) {
if (contents[i].getType() == sellitem_material) {
counter += contents[i].getAmount();
}
}
sender.sendMessage(String.valueOf(counter));
Whats wrong with this now?
and you will be cancer for perpetuating it
Sorry but Iam not completly sure what I have to do, propably because my english is bad ( I m from Czech Republic)
Is the plugin which you're currently trying to get placeholder values, coded by you?
I'm all for premium plugins but I prefer when they're open source 
chances are that your code probably isn't realistically valuable enough to fuss over it being stolen
nothing?
no
you should put your effort towards making it better, rather than playing cat and mouse with the piracy people
and anti piracy can easily be thwarted
You might want to go to #help-server
yeah, it's a game where everybody loses
inside the bot
easily, especially when you develop in Java
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
name of plugin would result you in getting a warning for tagging lots of people 😄
wtf
name of plugin
reverse name of plugin and remove of
plugin name?
without question mark
plugin name
plugin name
i saw your message getting deleted a few times
@queen dragon is shit that's why
dunno what that's about
yeah
it was my first message
well
then i tried it again
the bot disagrees
how strange
do you have any plugins NNYa
only one public one
can I see
look up villager lobotomizatornator
can anyone help me with a Bukkit maven issue?
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
so whats wrong now
You should look in to how you read stacktraces
i sent you the code tho
code is there
if (contents[i].getType() == sellitem_material) {
thats 48th line
contents[i] is probably null
^^
Material sellitem_material = sellitem_seller.getInventory().getItemInMainHand().getType();
ItemStack[] contents = sellitem_seller.getInventory().getContents();
int counter = 0;
for (int i = contents.length; --i > -1;) {
if (contents[i] != null && contents[i].getType() == sellitem_material) {
counter += contents[i].getAmount();
}
}
sender.sendMessage(String.valueOf(counter));
try this
maybe items are not air itemstack but null
yeah now it works. Thanks so much
well in NMS its NonNullList so there's no nulls, in bukkit its different
https://gyazo.com/25c8e15ff12f544fca7387642e12729a can anyone help with this? For some reason the Bukkit dependency wont import
bukkit repo died literally years ago
oh hey cat, you're here
just so you know this counts the total items in the inventory not whole items as a unit
for some reason I lurked across
hello stranger
don't worry, i'll be on the paper discord in a bit once all of my alts are done brewing
then I can pester you with yellow images again
You mean it counts all items of the given material right? Thats what I need
ItemStack[64] + ItemStack[4] = Total items 68
and not
ItemStack[64] + ItemStack[4] = Total items 2
and the batting crews will be awaiting
@silver shuttle
Is it possible to do sth like this in java ?
final Wheel wheel1 = car1.wheel, wheel2 = car2.wheel;
wheel1 == wheel2 //true
wheel1 == wheel2 //false because they have not the same instance
it took your mods like a month to notice me last time
yes thats perfect
and i wasn't even hiding
i just testes it it works great
are you banned in paper or something lmao
several times over
well its a class i guess
what did you do
provided help for 1.8 people
oh no
how could you
i know right
how can i add a comment to a config file?
and have different hashcodes
config.addDefault("#", "this is a doc"); ?
== compares identity
hashcode isn't relevant
.equals allows you to implement whatever equality checks you want
You cannot add coments that way
You can't use comments like that, saveConfig() will remove it, try headers
.equals() provided by class implementation of equality
== means if both object hashcodes match (same instance)
if you have to ask questions like that, you should probably go read up on OOP a bit..
new ItemStack(Material.AIR) == new ItemStack(Material.AIR)
I would like this is false bc not the same instance
that is an implementation note
thanks
and that will be false
and not relevant to what == or equals does
that would be false
hashcode has nothing to do with ==
I mean, if == is the case the hashcode will be the same unless you done fucked up
but, hashcodes equaling does not imply ==
would be kinda weird if == was true but the hashcodes were different
Would like to test instance of subobjects of object inside Set<>
if that's what you really want, create an identity hash set and call contains on it
Is there a way where I can make it so I can set player#hasPlayedBefore() to false?
not via api, I don't think
You can always delete the player data
noob here. i'm watching a tutorial where he put "Player player = (Player) sender; " and "Player" highlights pink, "player" highlights yello and "sendder" highlights blue. but for me in eclipse it doesnt highlight at all- what do i do to get it to highlight?
nnnnot necessarily
playerdata is in the primary world directory under the playerdata directory
either delete the entire directory or just the file of the player you want to erase
I mean, that folder is empty
Iam maybe just stupid, I know how to do it, but I cant find right ecloud
then it might be pulling from the usercache or something
Should I still delete it?
well
delete the whole serbur I suppose
not like there's much left after deleting the world and all player data anyway
Probably some addon idk. How it's high lighting isn't important. Also you should look in to basic java before starting with spigot
Go to #help-server
thanks
ok
Everyone is learning, no worries. Download PlaceholderAPI and put it as a dependency inside your project
when you do in order to get the placeholder value specify the string to the placeholder api instance:
String text = "Player's thirst: %mcrealistic_thirst%";
String thirst = PlaceholderAPI.setPlaceholders(#player, text);
#Player.sendMessage(thirst);
what happens if you're super thirsty
He's not coding anything
do you die
oh
Yes u are right
hmm
bukkit's .isSimiliar() works just fine
but NMS one seems to be funky
but i need as raw method as possible
equals has like no documentation
itemstack's issimilar usually redirects to nms equals though
so wtf
since craftstacks are just wrappers over nms data
and most itemstacks are craftstacks
yeah, i'm talking about you saying bukkit's issimilar working fine
my bad
see craftitemstack
I usually just look at the spigot api, I don't do much nms 
most itemstacks are actually craftitemstacks aka craftstacks
it doesn't directly redirect to nms stack's equals, no, but the impl is almost the same
NMS has a static .equals() method afaik
that is, it compares the nbt tag compound
literally read what i just said
oh
yes
but it returns that stone is equal to emerald_block lol
that's haram
yeah i don't know how that'd happen
i mean, the impl of it is this
public static boolean equals(ItemStack itemstack, ItemStack itemstack1) {
return itemstack.isEmpty() && itemstack1.isEmpty() ? true : (!itemstack.isEmpty() && !itemstack1.isEmpty() ? (itemstack.tag == null && itemstack1.tag != null ? false : itemstack.tag == null || itemstack.tag.equals(itemstack1.tag)) : false);
}
i might be blind, but I'm not seeing a material comparisn there
only the tag which holds the meta
or, well, nms doesn't use materials, but you know what i mean
yea
Item comparison
but why this does exist then
hell if i know
could be just one of spigots amazing mapping names
yea
probably
🤷♂️
the thing is
matches is bukkit's equals()
its strict on item amount
as you can see
literally copy the impl but drop the amount check i guess 👀
yeah well
maybe we just can't comprehend md69's infinite wisdom
as with things like VillagePlace and entityJoinedWorld
peak software development moment
reminds me of when I had to cobble together a reflective hack to stop slimefun from killing my server with its shit tier ticker task implementation
writing an entire class with nothing but reflection was great
anyone got experience with intellij plugins? keep getting this:
Caused by: java.lang.ClassNotFoundException: com.github.jwpjrdev.betterimportplugin.actions.ImportAction PluginClassLoader[PluginDescriptor(name=better-import-plugin, id=com.github.jwpjrdev.betterimportplugin, path=/Users/joshua/Desktop/better-import-plugin/build/idea-sandbox/plugins/better-import-plugin, version=0.0.1)] com.intellij.ide.plugins.cl.PluginClassLoader@4fd64a7c
the action is registered in plugin.xml and all that
<actions>
<action id="com.github.jwpjrdev.betterimportplugin.actions.ImportAction"
class="com.github.jwpjrdev.betterimportplugin.actions.ImportAction" text="ImportAction"
description="Triggered when the import hotkey is ran">
<keyboard-shortcut keymap="$default" first-keystroke="shift meta O"/>
</action>
</actions>
the only thing I can think of is that by default it was a kotlin project
and this file is Java
because I cba to deal with kotlin code
how does one remove attributes from
kotlin 👀
get the, uh, attribute modifiers from the item meta
and then remove them somehow
i don't quite remember how, but i do remember that attributes and modifiers are cancer to work with
indeed
also that looks like a line of lore rather than an actual attribute
true
what are we looking at
What I do bad?
at ray.Utils.setBlockFast(Utils.java:108)
also note the ArrayIndexOutOfBoundsException
what does that method even do
I try update light with ChunkSection
ah
Should I care about that?
maybe
Hey. I am having a problem if anyone can help me. I run a bungeecord server and I have been having this problem where after someone teleports, they become invisible to other players and their body gets left back at their pre teleport spot, but it doesnt move and it cant be moved. Killing that player does seem to fix the issue, but that isnt an option for me since most of the time players teleport to go into a minigame or something. I have read that this is a problem with vanilla minecraft, but I have not found any solutions for it.
Any help would be appreciated.
Why was it just this when others wouldn't be the problem xd?
getString is annotated as @Nullable
getWorld's parameter is annotated as @NotNull
getDouble returns a double, which is a primitive and cannot be null
beepity boop boop
that is why only the String one is raising the warning
oh i figured it out
understood, I guess it won't be a problem. Thanks ^^
if you want to be robust, grab the string into an intermediate variable and null check
ItemFlag.HIDE_POTION_EFFECTS exists
and give the end user an informative error message
if the end user configures a null value for that key, this will explode with an exception
but that's 'fine'
as you probably shouldn't configure a null value for that key
@wraith rapids IDE saved the warning by editing it in this way. Does it create a problem?
Objects.requireNonNull
is it possible to get a new line in a yml file? plugin.yml to be precise i have a no permission message and I want to get a new line:
permission-message: §4(!) §aThis plugin was made by §cBo0ked61! §b(Version §d1.4§b) §4(!)
that will still explode with an exception, yes
it just indicates your intent that you want it to be not null more clearly
xD
thanks
considering that the only way afaik that it could be null is if it's missing from the config period
the difference between now and then is that now you are willingly taking something that might be null and blowing up if it is, and then you weren't; you might not have realized that it was nullable, which would have been a programming mistake
which is why it was giving a warning then and not now; now your blowing up is intentional
that said yeah it isn't an issue and just wrapping it with that is fine
but if you want to be robust you could nullcheck it and print a message
you probably would also want to nullcheck the return value of Bukkit.getWorld, so the end user can see if they misconfigured their world
Locations with a null world tend to explode arbitrarily when passed around, which can be difficult to track down
Join event```java
package me.alpha.alpha.events;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.Bukkit;
public class Join extends JavaPlugin implements Listener {
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
System.out.println("Player Joined");
}
}```
Main class
@Override
public void onEnable() {
System.out.println("Ready!");
getCommand("kick").setExecutor(new Kick());
getCommand("ban").setExecutor(new Ban());
Bukkit.getServer().getPluginManager().registerEvents(this, this);
final FileConfiguration config = this.getConfig();
config.options().copyDefaults();
saveDefaultConfig();
}```
basically, when I join, it doesn't log to the console. Why
is your plugin enabled
yes
Are kick and ban in your plugin.yml? If not it would throw an npe and not register your events as it’s after that part of the code
yes kick and ban are in plugin.yml, those commands work fine
Is join your main class?
No, like I said, join is the event, my main class is, as you can see in the package of the Join event class, 'Alpha'
Can you send the entire main class
alright
package me.alpha.alpha;
import me.alpha.alpha.commands.Ban;
import me.alpha.alpha.commands.Kick;
import me.alpha.alpha.events.Join;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
public final class Alpha extends JavaPlugin implements Listener {
@Override
public void onEnable() {
System.out.println("Alpha is ready!");
getCommand("kick").setExecutor(new Kick());
getCommand("ban").setExecutor(new Ban());
Bukkit.getServer().getPluginManager().registerEvents(this, this);
final FileConfiguration config = this.getConfig();
config.options().copyDefaults();
saveDefaultConfig();
}
@Override
public void onDisable() {
System.out.println("Alpha has been unloaded");
}
}
Ok for the join class remove extends Java plugin,
And in your on enable change it ...registerEvents(this, this); to registerEvents(this, Join());
aight
can you take the functionality of a plugin (listeners, commands, etc.) and put it in the server jar itself
Only your main class needs to extend JavaPlugin
wait, you're sure it's this, Join(), instead of Join(), this? since the first argument is listener
Alright, thanks so much, it was the first one btw, but it's working now
That’s alright, glad it’s working now
Hey
I have a full list of cords in a yml file, but they are as a string
I need to loop through them and use them
but i cant use them
as location
Anyone has any idea how to make string a location?
CordinatesYML.getCordsFile().getList("Cords")
printing out this
will give me sht tons of cords in the console
Save x y z yaw pitch and world name to config, eg location.name.world and location.name.x etc... when loading location get all variables from config and create a location object Location loc = new Location(world, x, y, z);
Location is ConfigurationSerializable
no need to jump through hoops saving the dimensions and world separately
just config.set(path, location)
and config.getSerializable(path, Location.class)
I have this code:
Inventory clickedInventory = inventoryClickEvent.getClickedInventory();
clickedInventory.setItem(3, heldItem);
}
Only problem is that instead of actually putting it in the inventory, it just doubles the cursor item (?)
I'm assuming that it's just that as soon as the code puts it in that slot, it gets picked up as you click the slot
Would adding some kind of delay help with that?
package me.royalben10.keysFromMcmmoFishing;
import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin{
}
Opens the new class wizard to create the type.
Package: org.bukkit.plugin.java
public class JavaPlugin {
}
JavaPlugin cannot be resolved to a type
Someone asked me to post this as text
ok try to delete the module-info.java
The Java Platform Module System specifies a distribution format for collections of Java code and associated resources. It also specifies a repository for storing these collections, or modules, and identifies how they can be discovered, loaded and checked for integrity. It includes features such as namespaces with the aim of fixing some of the sh...
Well I can't explain that easily since I main python so yea here is the wiki
Could you be a bit more specific. That page does not mention anything related to module-info.
hmm
some lessons also years of experience of support
also
I also don't see how it would interfere with the class' ability to locate the relevant file
Then why did this tutorial tell me to create a module lmao
having module-info.java file is in the default package doesn't require requires <module>; statement that is why jpms is usefull
what tutorial are you using that told you to create a module info?
Rhetorical question
or are you confusing it with a Maven module?
maybe outdated java version
"How to make a Minecraft Plugin | Working in 2021"
Have it pulled up on my Ipad but ill see if I can find the link
Minecraft Hosting: http://pixelhost.org
We just expanded our website design services to Toronto Ontario, check out our brand new page for Toronto Website Design https://vervedev.com/toronto-website-design
In Episode 1 of how to make a Minecraft plugin we begin with the basics of setting up your first IDE (integrated development environment) an...
when you see the Working 2021 it is a red flag
lol yeah
I hate when content creators do that
exactly what I am saying
Yeah I saw something in the comments about that but I figured they had checked the video to make sure it still worked
I see no reference to a module-info though
well it is a 21 min video myb you missed it
unless he mentioned it verbally for some reason, there was nowhere in the video where he created one
another part it says ep 1
well anyway I am just glad it worked
I didn't create it either
oh your project probably auto created it if you're using Java 9+
It was created by defualt, prob because of my jdk version
Yep
Well I already created this package. Do I have to start over?
Eclipse has a checkbox when creating a project to create a module-info.java. You can uncheck that
Nope, you're fine
It's just the module-info.java that denotes it as modular
nothing check this guy I love his codes https://www.youtube.com/c/TheSourceCodeTutorials/videos
Hello and welcome to TheSourceCode,
Here at TheSourceCode, our main objective is to have people learn to code alongside me. We are not professional coders by any means. But we have gained lots of knowledge throughout our years and we hope to share it with you! We hope to teach you something new and we hope you guys teach us something new!
For what it's worth I know Java, i just haven't developed a plugin before. I am trying to write a hopefully simple plugin to replace an item with another when it is picked up by a player entity. Does the source code channel have a good video on creating your first plugin?
I don't really use java as I mentioned before since I only want python for blender there are many ways to learn there are even tutorials on the spigot page however a video is by far the easiest way to learn and just a quick reminder to check the dates on a video anyway here is a good one I found https://www.youtube.com/watch?v=GK4aQzxQSoQ
Intellij (Make sure you download the community edition!)
https://www.jetbrains.com/idea/
Java 8 JDK (You have to make a free Oracle account to download the JDK)
https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
Feel free to ask in the comments or drop a message in my discord server and I will be glad to help!
Please L...
Thanks again 🙂
This is literally the video I used to make my first plugin, it's pretty great
I didn't watch the whole series though, trying to learn on my own
beeeeep?
how to a coding Collision with glass?
What?
im quoting that
Colision with block message
You can check surrounding blocks with a move event I suppose
Or use the players velocity to check for blocks in a path
Mhm
Yes that forum has some suggestions as well
hi im trying to use the or || operator but it says it can't be applied to two strings likt this
e.getMessage().equalsIgnoreCase("shop" || "store")
on two separate lines?
You can connect them with || on the same line
You just need to call the method fully each time
Because || works on booleans, not strings
You could also uses arrays.asList(your, options, here).contains(string)
Probably a bit slower though
This is probably very niche, but SlimeWorldManager's discord is extremely inactive. Can someone please help me find the source of this stack trace? [02:57:46 INFO]: Levah issued server command: /swm create Test file [02:57:46 INFO]: [SWM] Creating empty world Test. [02:57:46 WARN]: [SlimeWorldManager] Plugin SlimeWorldManager v2.5.3-SNAPSHOT generated an exception while executing task 23 java.lang.UnsatisfiedLinkError: 'long com.github.luben.zstd.Zstd.compressBound(long)' at com.github.luben.zstd.Zstd.compressBound(Native Method) ~[?:?] at com.github.luben.zstd.Zstd.compress(Zstd.java:612) ~[?:?] at com.github.luben.zstd.Zstd.compress(Zstd.java:601) ~[?:?] at com.grinderwolf.swm.nms.CraftSlimeWorld.serialize(CraftSlimeWorld.java:171) ~[?:?] at com.grinderwolf.swm.plugin.SWMPlugin.createEmptyWorld(SWMPlugin.java:291) ~[?:?] at com.grinderwolf.swm.plugin.commands.sub.CreateWorldCmd.lambda$onCommand$1(CreateWorldCmd.java:84) ~[?:?] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:100) ~[patched_1.16.5.jar:git-Purpur-1015] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:58) ~[patched_1.16.5.jar:git-Purpur-1015] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.5.jar:git-Purpur-1015] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:834) [?:?]
Not running spigot
Oh true, my bad - ill head to purpurs discord
I feel md has some kind of bat signal for that
Or he just happens to look at his discord a lot, imagine that
xD
how does mineplex, cubecraft etc get on featured servers for bedorck
"paper" "purpur" "tuinity" "non-spigot" "airplane"
just gets notifications for that shit
They have bedrock servers
and why can't console players enter any IP address
they're partnered with minecraft
on console youre locked to only featured servers or realms
cant put an ip
Bedrock bad
yes
bedrock is trash
plain ridiculous i thought it was gonna be lit. cross platform servers
nope
cross platform mineplex woohoo
You know, I commend bedrock for bringing so many people together
And it has some decent tools with behaviour packs
But still, Java > Bedrock
What suggestions do you have?
For what
Use one of the ones from the thread
Or do some vector stuff using player.getLocation.getDirection
ok
in a tellraw command I could use {"translate":"space.80"} to place whatever is linked to that in my resourcepack in chat or my actionbar. how do I do this via spigot? I already have player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(mana_bar)); but im wondering how I also send a translate json component with the text
so next to my TextComponent.fromLegacyText(mana_bar) i also want to send a translate component
cant seem to find it in the spigot docs
ah
right next to your mana_bar in action bar or in the chat
okay then you might want to check https://www.spigotmc.org/wiki/the-chat-component-api/#the-component-builder-api-wip
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
with this you can append a component to another
like this
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new ComponentBuilder(translatable_component).append(TextComponent.fromLegacyText(mana_bar)).create());
thanks! helped a lot.
glad i could help 🙂
something weird i just ran into
this is how the icons look in my actionbar using my plugin
this is how it looks in my datapack
same resourcepack so they have the same ascent and height values
in my datapack I use unicode for both the icons and negative space which closes the gaps between the icons
doesnt seem to want to work in my plugin tho
TranslatableComponent space = new TranslatableComponent("space.100");
String negative_space = "\uF802";
String empty_mana = "\uE003";
String half_full_mana = "\uE002";
String full_mana = "\uE001";
String mana_bar = "";
int i;
for (i=1 ; i<=10; i++)
mana_bar += full_mana;
mana_bar += negative_space;
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new ComponentBuilder(space).append(TextComponent.fromLegacyText(mana_bar)).create());
return true;
this is my code
should work as far as I know
Hey, how can I add lwjgl64 to java.library.path
cursed code
use camelCase for variable names
not lower_snake_case
my bad so used to it lol
py
what's the event for summing primed tnt
EntitySpawnEvent is fired when tnt spawns.
But i guess you want to actually spawn it. Then either use World#spawn(Location, Class<Entity>) or World#spawnEntity(Location, EntityType)
Quick question, why does it matter if I name my variable this_name instead of thisName?
I do camel case when naming my variables, I'm just wondering why it matters.
because it's what everybody else does
it's the standard
if everyone's code is how they want it to be rather than the standard there is no standard
and readability plummets ⤵️
ah, I see.
smartest thing I've ever heard creeper say
fuck u too
I try to follow it
But I don’t newline willy nilly for that stuff
I prefer to just not write code that looks bad if it has a new line or not
Functional programming is an exception
whats the best way to make a request system from a player to player
so like someone does a command
that has some player in its args
and then that player has to do a command
to accept or deny the request
Piece by piece
You just have a map of requests and when a player runs the accept/deny command it checks if that request is in the map
And you can use json hover n click if you’re fancy
The request create command adds a request to a map
The accept/deny command checks the map and does whatever you want after accepting or denying
And if it IS in the map it gets removed
[22:19:29 ERROR]: Could not load 'plugins\BedMe-1.0-SNAPSHOT.jar' in folder 'plugins': uses the space-character (0x20) in its name
i got this error
why
nvm
created a function to create a compass that points to a player
the name doesn't change to "Tracking: Player", it stays as compass, any reason why?
public void giveTrackedCompass(Player compassReceiverPlayer, Player trackedPlayer)
{
ItemStack compass = new ItemStack(Material.COMPASS);
compass.setAmount(1);
compass.getItemMeta().setDisplayName("Tracking: " + trackedPlayer.getDisplayName());
compassReceiverPlayer.getInventory().addItem(compass);
compassReceiverPlayer.setCompassTarget(
new Location(compassReceiverPlayer.getWorld(),
trackedPlayer.getLocation().getX(),
trackedPlayer.getLocation().getY(),
trackedPlayer.getLocation().getZ()
));
}
You need to set the ItemMeta back on the ItemStack
oh okay ill do that, thank you
But be aware that this compass target does not follow a player
yeah i was going to add a right click event to update the position of it
worked, thank you
How can I make entity look at specific player?
Once or continuously?
Continuosly, well I already have a runnable to teleport. I just need the method.
or the location ig.
teleporting in a runnable... hm.
But ok. So you want to calculate a vector that points from the head of the mob to the head of the player
and set this vector as direction of your teleport location.
A vector from vecotr A to vector B is calculated using
vector dir = B.subtract(A)
Alright, I'll try it, thanks.
anyone know of any good tablist libraries that let me maniulate and add fake players to tab
How Do I get rid of a nullpointerException with @SupressWarning(..)?
I need to do something async, then run another task synchronously. I've noticed that in the JavaDoc it says Asynchronous tasks should never access any API in Bukkit. Great care should be taken to assure the thread-safety of asynchronous tasks. Is creating a new task thread safe?
Bukkit.getScheduler().runTaskAsynchronously(Builder.getPlugin(Builder.class), new Runnable() {
@Override
public void run() {
Optional<SlimeWorld> worldOptional = WorldLoader.loadWorld(world); // This is recommended async
worldOptional.ifPresent(slimeWorld -> Bukkit.getScheduler().runTask(Builder.getPlugin(Builder.class), new Runnable() {
@Override
public void run() {
slimePlugin.generateWorld(slimeWorld); // Has to be sync
}
}));
}
});
Yes
I'm doing stuff via reflection, and it's impossible that it will be a null
thanks
You always test for null if it can be null
you can always test
An npe happens when you get teh return of some method and try to use it without testing if its null
I know that but wait I 'll show you me code
I'm registering the command right above
with reflection
If you are getting an NPE its clearly not impossible lol
...
Debug the code check each variable/method for null
nvm, I see that I'm not explained myself good enough
https://wiki.vg/Protocol#Player_Info oh wow this is a wonderfully simple and intuitive packet
You are not registering with reflection. You are creating a new instance that has nothing to do with Spigot. Its not Spigots cvommand map you are using
CraftServer use that map
plugin command constructor?
The register method require a obj of that class
This is how you dynamically register commands ```java
List<Command> commands = new ArrayList<>(4);
commands.add(new AcceptCommand());
commands.add(new DenyCommand());
commands.add(new ConfirmCommand());
commands.add(new CancelCommand());
try {
final Field bukkitCommandMap = Bukkit.getServer().getClass().getDeclaredField("commandMap");
bukkitCommandMap.setAccessible(true);
CommandMap commandMap = (CommandMap) bukkitCommandMap.get(Bukkit.getServer());
commandMap.registerAll("commands", commands);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}```
this is the method that is called from Server.getCommand("mycommand")
JavaPlugin class
That above code is how to dynamically register commands. It works and is currently used in Towny
No, all you are showing is getting commands
Your registering is broken because you are doing it wrong
Which is why you are throwing npe
it works, except for you coming asking how to silence an npe with suppress warnings
The npe is thrown every time even if you register the command in the plugin.yml
You should not have ANY npe. You are doing it wrong
Maybe you are right
As I said, your registering reflection code is wrong. The above code I just posted is correct
I just told you. Use the code or don't. I'm not bothered
But why it works if I'm doing it wrong...
I checked the source code and I'm editing the same command map that your code is using
It's a warning into the IDE
Is there a stacktrace being thrown, yes or no?
Alright, then the IDE is telling you something CAN be null and you need to check for it, simple
just add a null check, that's all that it's asking for
what I was asking is how can it be null if I'm adding the command inside the commandMap that getCommand use
to retreive the command
because you're using reflection and the field and such can be null
getCommand is always nullable
that's why I always only execute code if it isn't null 
not checking for nullables is silly
it's annotated Nullable for a reason
.
Trying to detect a right click on a compass, then update the target, it's not detecting the right click.
Anyone know why?
@EventHandler
public void updateTrackedCompass(PlayerInteractEvent e) {
Action action = e.getAction();
Player player = e.getPlayer();
if ((action == Action.PHYSICAL) || (e.getItem() == null) || (e.getItem().getType() != Material.COMPASS)) { return; }
String trackedPlayerName = playerTrackingDict.get(e.getPlayer().getDisplayName());
Player trackedPlayer = Bukkit.getPlayer(trackedPlayerName);
if (trackedPlayer != null)
{
player.setCompassTarget(
new Location(player.getWorld(),
trackedPlayer.getLocation().getX(),
trackedPlayer.getLocation().getY(),
trackedPlayer.getLocation().getZ()
));
}
}
This event will fire as cancelled if the vanilla behavior is to do nothing (e.g interacting with air). For the purpose of avoiding doubt, this means that the event will only be in the cancelled state if it is fired as a result of some prediction made by the server where no subsequent code will run, rather than when the subsequent interaction activity (e.g. placing a block in an illegal position (BlockCanBuildEvent) will fail.
Is the event registered? Debug it.
Oh, I forgot I was supposed to register it.
happens to the best of us
Lol late night coding in a nutshell
How do i create an click event for inet.kyori.adventure.text.Component
Hey... i have a completely random problem out of no where... this morning i start intellij and open my project and then it don't found some of my import in the same package. I prefer to say that last day everything works well and i still can compil the project and it work... can't understand what's going on
the import are here but never used
okay it work thx
package index
You can start a timer in your onEnable
no i mean like
i want to use it in my onEnable
to detect if my plugin is being reloaded
why do you need to detect a reload?
If you just wish to detect reloads you could check if there are online players, it is usually a dead giveaway of a reload
not in the case of small servers
because my plugin halts the server for 5 seconds on startup
(intentionally)
um, why?
its an antivirus
Does anyone know why File.delete() won't work?
it warns server owners on startup
[06:33:38] [Server thread/INFO]: Attempting to delete mlg_1v1_1 (/home/container/./mlg_1v1_1) [06:33:38] [Server thread/INFO]: Attempting to delete mlg_1v1_2 (/home/container/./mlg_1v1_2) [06:33:38] [Server thread/INFO]: Attempting to delete mlg_1v1_3 (/home/container/./mlg_1v1_3) [06:33:38] [Server thread/INFO]: Attempting to delete mlg_1v1_4 (/home/container/./mlg_1v1_4) [06:33:38] [Server thread/INFO]: Attempting to delete mlg_1v1_5 (/home/container/./mlg_1v1_5)
File worldDir = new File(Bukkit.getServer().getWorldContainer().getAbsolutePath() + File.separator + s);
//If not found
if (worldDir.exists()) {
System.out.println("Attempting to delete " + worldDir.getName() + " (" + worldDir.getAbsolutePath() + ")");
worldDir.deleteOnExit();
}```
the worlds dont get deleted though?
Doesn;t explain why it halts the server
they could be locked
I don't think NMS stores an uptime though
There are plenty of ways to detect an reload though
its so you'd feel a noticeable slowdown in your startup
no point in doing it on reload tho
Sorry you are not makign much sense. A delay/slowdown in startup seems pointless
Listening for Commands for example are an easy way (you'd need to store it in a persistent file to remind your future self)
You might also look if worlds are loaded
@Override
public void onEnable() {
getLogger().info("Loading plugin...");
getLogger().info("Doing some complex computations...");
Bukkit.getPluginManager().registerEvents(this, this);
Bukkit.getScheduler().runTaskTimer(this, this, 1, 1);
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
getLogger().info("Done loading");
}
I guess it's meant to notify the owner of the malware? but you could just as easily say it one tick afterwards..
Place a chunk ticket on the Overworld spawn at teh end of your startup.
check for said ticket at teh start of yoru onload
it shoudl still be there if its a reload
how can i do that?
although, thats just a guess
Isn't that a paper-specific thing?
no
ah ok
You'll have to test its not cleared on a reload, but I'd guess its not
ill see in a hot sec
I wish there was a method to check if a reload was issued other than overriding the command or checking if anyone is online
Im not so sure about that as reloading disables all plugins and disabling a plugin releases its chunk tickets
yeah seems it gets cleared
A simple boolean should suffice.
onload:
Scan(!getServer().getWorlds().get(0).removePluginChunkTicket(0,0,this));```
onEnable: getServer().getWorlds().get(0).addPluginChunkTicket(0,0,this);
why are you removing?
it returns a boolean
im assuming the boolean tells wether it was successfully removed or not
your plugin instance will be different so you shoudl just check the presence of any ticket
oh
doesnt work either @eternal oxide
Scan(!(getServer().getWorlds().get(0).getPluginChunkTickets(0,0).size() > 0));
oh, one sec, meta is not wiped on a reload
Scan(ManagementFactory.getRuntimeMXBean().getUptime() < 120_000);
this should work
yep as far as i can tell
yep it works
I recall worlds not being loaded if you are initialising early enough, perhaps you can exploit this?
even easier... if (Bukkit.getWorlds().isEmpty()) //this is a fresh start
the uptime thing works fine
not always
how so?
If the JVM for some reason is reused or shared
doubt it
the world test will always work
if there are worlds its a reload. if empty its a fresh start
I mean, someone will try to host multiple servers within a single JVM
if (Bukkit.getWorlds().isEmpty()) {
System.out.println("Fresh Start");
} else
System.out.println("Reload");```
let me test that
inb4 a plugin loads their world in the onload
oh yeah, that works
I can update a few of my plugins to use that too
um, it just didn;t work for me
oh wrong method😛
Anyone know how to list the players how I want? I'm adding them from 0-80 but obviously doesn't list by order of input
well all my names are the same
surely it would've listed my index aswell if it was alphabetical
I want to override the nms ServerPing.Serializer, and return super.serializer(customServerPing, type, jsonSerializationContext) with reflection
Just invoking the method won't work, because I don't have a Type or JsonSerializationContext
I am trying to set the Gson in the PacketStatusOutServerInfo to my own Gson
Does anyone know how I can program a Daily Reward system?
Likely with the help of https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html and even more fun stuff
Can you just state what you need help with heh, Gson is always engaging
I am trying to set the Gson in the PacketStatusOutServerInfo so I can set my own ServerPing. Listening for packets is no option with raw NMS
So I am changing the Gson at ServerPing.class, I want there my own serializer
But I can't invoke the serialize method because I don't have a Type of JsonSerializationContext
I created my own class 'ServerPing' which is just a NMS ServerPing, but it will set the fields with reflection
ChatColor in console is usually a gamble
what is this
tvhee well I guess reflection is fine ?
too small can;t read
It says malware found several times
''malware found!!!!'''
is that your plugin?
no
Then not sure why you are asing in a dev channel
i didn't really ask you that
i wanted to know what this did @solemn shoal
worm.backdoor.Rafael100 ???
yes
antivirus for minecraft
people been complaining in yatopia discord about javassist errors
turns out its caused by backdoored plugins
that spread themselves to other plugins
Isn’t like plugman also injecting javassist at runtime in plugins
no?
Uh weird then
plugman doesnt even use javassist
javassist is a java library to do java bytecode manipulation lol
like, modify jars
like, all of the infected plugins still have their meta-inf intact
Yes I’m aware of that however I did encounter a plugin which injected javassist into other plugins so I was unsure whether it was plugman or not
Yeah would be more plausible
no idea
i have no reason to believe it hasnt existed for 3 years
the ones i have dont actually overwrite the main class, but rather append to it's onenable etc
that paste is the most invasive ive seen, just overwriting the entire class
you cant even tell its there because the plugins still work normally
Im getting this error when trying to load a kit: https://pastebin.com/T1V9bvTv I used this Thread to do it: https://www.spigotmc.org/threads/help-with-saving-load-inventory.246693/
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
notice how theyre working fine?
(tablist and scoreboard)
those are infected plugins lol
This is kinda scary lol
I mean it’s the superior server software 😛
regardless
theres a reason for the name
worm.backdoor.Rafael10
its a worm (spreads to other plugins)
with a backdoor (executes code from their own server on runtime)
with possible relations to Rafael10 (https://www.youtube.com/c/Rafael10Griefing/videos)
How would you invoke that method then?
Hmm damn
i mean
it makes sense right?
hes obviously using SOME exploit to run code on the server end to op himself
And another possibility is listening for packets of send a modified packet
really scary lmao
Yeah tvhee you could do that tho also
thats why im writing an antivirus for spigot n forks
Oo nice
thats why youre seeing that console output on my server
investigation around these malware plugins, and possibly finding others, goes on in the yatopia discord lol
but my dms are always open
Yeah, but how dare you going to detect? By packages or will you run some sort of check after every plugin load so that you can see if every plugin did something suspicious.
so far its just by checking jar contents
Ah
javassist has its own detection rule (PUL.javassist), but if .l1 and .l_ignore files are found aswell, itll mark it as worm.backdoor.Rafael10
Rafael10 got 100+ videos about griefing server xd
since .l1 and .l_ignore are marker files used by that strain of malware to mark files as already infected
i wonder how the server owners feels.
yeah
https://gist.github.com/aadnk/8016437 is an option, but for which packet do I need to listen, and how can I send a modified PacketStatusOutServerInfo ?
im accepting PR's btw, if you can add more malware to the detection list
Yeah I might write a plugin load checker if someone isn’t writing that already
for my thing?
Yeah
Oof
Are you writing a plugin that should detect malicious plugins?
yes
Uh idk one of the unknowns ?
12345...
Do you just detect based on a database of already known applications or are you also adding dynamic scans?
im writing my own detection rules
Just by name or heuristics?
yep
surely thats not supposed to be on a minecraft server right?
I would install it... as root
theres people who run their server as root
I do that too (if my server is inside a docker)
in the case of docker, thats fine
its disposable
but still
running stuff as root is a security flaw in itself
i once recovered a production system using nothing but docker @lost matrix
got screwed over in the middle of a dist upgrade, but we had rancher running on it, so i was able to make a docker container and escalate to the host
Is that only possible with mounted volumes? I couldnt think of a way to get from a docker to the host
ssh got disconnected in the middle of the upgrade, so we had to escalate to the host through docker just to get a screen session with the installer
well yes
if you mount some folder in your container to / on your host
and give the container the right permissions
you can chroot into your host
Thats what i suspected
anyways im gonna make my AV scan recursively from .
new NamespacedKey(plugin, "minecraft");
Guys do anyone know how to get dreams always flying pkugin
Yes create a plugin which adds recipes
Pls
anyone here use spigradle? how could I set it up so when I build with gradle it automatically spits it into my test server's plugin folder? (locally on my machine) using the gradle prepareSpigotPlugins command i believe.
If you know tell ne
Which error?
Show
Then I don't know
But why do you want to add with minecraft:item ? You can also do new NamespacedKey(plugin, name), then the item will be pluginname:item
How can I save all resource files? (I don't want to just create a List of all resources or hardcode this)
it probably doesn't want you to use minecraft: keys in that
using them is generally ill advised to begin with
no reason for you not to use your plugin's namespace anyway
What do you mean? Pls be clear
i don't recall there being a built in method for that
I am tellinghow do i get drean always flying plugin for minecrfat java do anyone know
Yes then do new NamespacedKey(plugin, name) as namespace
inb4 what is plugin
Yes
Caused by: java.lang.NullPointerException
at me.generallyblinky.bettercraft.bettercraftitem.BreakManager.onBlockBreak(BreakManager.java:29) ~[?:?]
this should be enough to answer your issue
Guys do i need forge to run dreams always flying mod
For mods you need forge or others mod clients
NullPointerException so either loc or whatever the other function returns is null
Main.mainInstance could be null
Main.mainInstance.blockManager.blockMap could be null
Main.mainInstance.blockManager.blockMap.get(blockId) could return null
Main.mainInstance.blockManager.blockMap.get(blockId).drop could be null
imagine if there was something like helpful or more detailed npe messages
they should add that in some future java version
Try printing everything:
System.out.println(Main.mainInstance.bloackManager);
System.out.println(Main.mainInstance.bloackManager.blockMap);
System.out.println(blockId);
System.out.println(Main.mainInstance.bloackManager.blockMap.get(blockId));
System.out.println(Main.mainInstance.bloackManager.blockMap.get(blockId).drop);
System.out.println(Main.mainInstance.bloackManager.blockMap.get(blockId.create()));
oh wait
Guys it is telling i need forge 1.12 or forge 1.13 but 1.13 doesn, t bow exist in minecraft
Or just write robust code and listen to what your ide tells you
What
real men split every deference on a new line
I use this:
https://paste.md-5.net/ekumusiroq.cs
so the line number is all you need
I mean forge 1.13 now doesn, t exsist
- it does
- wrong discord
It does
How do I spawn x amount of Items matching a given ItemStack at a location?
What
ItemStack#setAmount
This is spigot, not forge
unusable as amounts are going into thousands and the ItemStack as item is gonna be invisible
hmmm
Or for and count
and how would I check how much space a player has as inventory for a given item? Because different stack sizes
Also a possibility
Yo does anyone here know how I can quickly save all resources instead of hardcoding all of them?
// in plugin
this.saveAllResources();
instead of
this.saveResource("config1.yml", false);
this.saveResource("config2.yml", false);
....
while (todrop > 0) world.dropItemNaturally(location, itemToDrop.asQty(Math.min(todrop, itemToDrop.getMaxStackSize())))
not sure if the self-returning method to set a stack's amount is there on spigot though
might be paper only
public void dropItem(final Location location, final ItemStack item, final int exactAmount) {
final int maxStackSize = item.getMaxStackSize();
int stacks = exactAmount / maxStackSize;
int left = exactAmount % maxStackSize;
World world = location.getWorld();
for (int i = 0; i < stacks; i++) {
ItemStack drop = item.clone();
drop.setAmount(maxStackSize);
world.dropItemNaturally(location, drop);
}
if (left != 0) {
ItemStack drop = item.clone();
drop.setAmount(left);
world.dropItemNaturally(location, drop);
}
}
I told that when i go to dreams always flying mod it is telling i need 1.12 or 1.13 versions
ty
don't clone the item every time doofus
why not
ok then how do I check for the exact amount of a specific item a player has space for in his inventory?
I had some bad experiences with ItemStack references. But in this case its redundant.
I can't understand why it doesn't work :/
final UUID sId = UUID.fromString(topInventory.getItem(22).getItemMeta().getAttributeModifiers().get(new NamespacedKey(Logger.getInstance(), "UUID"), PersistentDataType.STRING));
I need forge to run it but 1.13 doesn, t exsist and 1.12 when i downloaded it after that when i try to open it it diesn, t come like we need to install it first that doesn, t coms
Im working on a PR for that. For now you need to either write a whole lot of logic or simply clone
the inventory and check the Map that is returned by the addItem method from Inventory
Is it a plugin or a mod, if it’s a plugin you don’t need forge, if it’s a mod you’re in the wrong discord
oh god, but how do plugins like shop plugins do it? Or kits for essentials
Gson serverPingSerializer = new GsonBuilder().registerTypeAdapter(serverPingServerDataClass, serverPingServerDataSerializerClass.newInstance())
.registerTypeAdapter(serverPingPlayerSampleClass, serverPingPlayerSampleSerializerClass.newInstance())
.registerTypeAdapter(serverPingClass,
//Start
new net.minecraft.server.v1_16_R3.ServerPing.Serializer()
{
@Override
public JsonElement serialize(net.minecraft.server.v1_16_R3.ServerPing var0, Type
var1, JsonSerializationContext var2)
{
return super.serialize((net.minecraft.server.v1_16_R3.ServerPing)
serverPing.getNMS(), var1, var2);
}
})
//End
.registerTypeHierarchyAdapter(iChatBaseComponentClass, iChatBaseComponentChatSerializerClass.newInstance())
.registerTypeHierarchyAdapter(chatModifierClass, chatModifierChatModifierSerializerClass.newInstance())
.registerTypeAdapterFactory((TypeAdapterFactory) chatTypeAdapterFactoryClass.newInstance()).create();
How to do this with reflection?
They probably drop items on the ground if the player has no space for them
they usually either drop the leftover items at your feet, or just don't charge you for items that don't fit in your inventory
^^ essentials has a config option to warn or to drop
essentials kits have a config option to say abort if no space or drop if no space
public void addOrDrop(final Player player, final ItemStack item) {
final World world = player.getWorld();
final Location playerLoc = player.getLocation();
player.getInventory().addItem(item).values().forEach(overhead -> world.dropItemNaturally(playerLoc, overhead));
}
Something like this
addItem returns a map of items that don’t fit, so it’s pretty easy to drop the rest
wait it returns the amount of items that didnt fit in the inventory?
myeah
maybe like
thanks lmao
read the javadocs or something
How can I add things like Material to autocomplete in a command?
So you do /xdelete (shows list of Material)
iirc there are several ways
the easiest of which is to implement tab executor
or was that what that was called
i literally can't remember
Yeah and make use of material.values and StringUtil.copyPartialMatches
just implement tab executor and let it return a pre-calculated list of materials
ok ty
If you can check quickly 🙂 #help-development message
spigot doesn't let you do tab completions asynchronously still I don't think
but that won't be an issue with a simple material list
okay
attribute modifiers are not stored in a PersistentDataContainer
Don’t use that
ChatColor.translateAlternateColorCodes
I'm forgetful...
int amount = Integer.getInteger(args[1]);