#help-development
1 messages ยท Page 54 of 1
if you want
or just learn java
idk what to do
Just do it
@echo basalt I found this online
no reason to stall for 2 weeks "should I learn this", you could've been ahead
ya
cool beans now just do the rest
If u do a diff lang then u gotta have a motivation, for me that was spigot, if you learn c++ then that might be games or js might be bots or sites
Any well-known non-esoteric lang is beginner friendly if you do the right thing
If you want to write a search engine in java you are going find that java is not beginner friendly, so would you with probably any other language
what the
hello what a problem
[0-9]{1,6}
why is this happening? I've tried everything that i could think of
at java.util.ArrayList.forEach(ArrayList.java:1513) ~[?:?]
at me.outspending.gencoreplus.Dropping.GenDrop$1.run(GenDrop.java:36) ~[GenCorePlus-1.0.0.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.jar:git-Paper-81]
at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[paper-1.19.jar:git-Paper-81]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1491) ~[paper-1.19.jar:git-Paper-81]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.19.jar:git-Paper-81]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1415) ~[paper-1.19.jar:git-Paper-81]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1188) ~[paper-1.19.jar:git-Paper-81]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:303) ~[paper-1.19.jar:git-Paper-81]
at java.lang.Thread.run(Thread.java:833) ~[?:?]```
code: (DEBUG)
public static void removePlayerGenerator(Player plr, Location loc) {
Bukkit.broadcastMessage(plr + " // " + loc);
Bukkit.broadcastMessage(map.get(plr.getUniqueId()).toString());
if (!map.get(plr.getUniqueId()).contains(loc)) return;
map.get(plr.getUniqueId()).remove(loc);
Bukkit.broadcastMessage(map.get(plr.getUniqueId()).toString());
}```
everything is set
Replace HashMap with ConcurrentHashMap
What's the difference?
one can be modified while it is iterated over, the other not
ah
would i just cast it to the correct one?
The root cause is that you have something like
for (Object o : collection) {
collection.remove();
}
which is not possible for any instance of ArrayList
I am not too sure if CopyOnWriteArrayList allows concurrent modification though, but I guess you can always try it out
i'll see
Though uh, it really seems as if you rather want a Set there
what would i do here?
Given little context, no idea
You just need to modify the new ArrayList<>() into a new CopyOnWriteArrayList<>()
public static Map<UUID, CopyOnWriteArrayList<Location>> map = new HashMap<>();```
im only editing the value
because the copyonwrite is only 1 arg
However if order does not matter I'd really use public static Map<UUID, Set<Location>> map = new HashMap<>();
And then have something like map.put(id, ConcurrentHashMap.newKeySet()); when you insert the collection into the map
hey there, do you guys know why this could be red?
bruh is sqlite not able to create a database by code lol
didn't define the maven repository?
it did all of the stuff automatically with the minecraft development plugin from intellij
intelliJ
Invalidate caches and restart
intellij moment
okay it works now thanks
nevermind it turned red again
seems like it fails to transfer from the repository
Repositories could be down idk
@EventHandler
public void AnvilEvent(PrepareAnvilEvent event){
if(!(event.getView().getPlayer() instanceof Player)){return;};
Player p = (Player) event.getView().getPlayer();
p.sendMessage("called");
ItemStack item = event.getInventory().getItem(0);
ItemStack item2 = event.getInventory().getItem(1);
Enchantment enchant = Enchantment.PROTECTION_ENVIRONMENTAL;
ItemStack check = new ItemStack (Material.ENCHANTED_BOOK, 1);
//check.addEnchantment(enchant, 4);
ItemMeta stackMeta = check.getItemMeta();
stackMeta.addEnchant(enchant, 4, true);
check.setItemMeta(stackMeta);
if(item == item2){
if(item == check) {
ItemStack result = new ItemStack(Material.ENCHANTED_BOOK, 1);
result.addEnchantment(enchant, 5);
event.getInventory().setRepairCost(38);
event.setResult(result);
} else {
p.sendMessage("not the right check type");
}
}
else{
p.sendMessage("not the same item");
}
}
not the same item gets printed when it was the item that i wanted to check for ๐คทโโ๏ธ
Weird, it does exist, wonder why it won't transfer https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.19.2-R0.1-SNAPSHOT/
I think == compares hashCodes which are normally different even if the contents are the same, depending on the equals implementation, it might be more accurate so try that
guys are there like tutorials on how to make room gens?
ah .equals() ?
no, it compares the identity of two objects
(So more or less the System hashcode)
Though two objects with identical System hashcode may have different identities
Well what I know is, if you have 2 strings with the same contents but not having string1 = string2 but rather string1 = "hi" string2 = new String("hi") or something like that, == doesn't say they are equal, lemme find an example
same applies to the Integer, Double, and any other instance of Object
The fact that "hi" == "hi" and "h" + "i" == "hi" return true is only caused because of the constant pool
FeelsIntern()Man
so using .equals() will compare both itemstack objects if both are the same, correct ?
uhh CREATE DATABASE not working in sqlite?
Yeah, that's why I said .equals can be safer as the object can override equals and do it's own custom implementation but if using == and equals doesn't change anything in ItemStack comparison, I apologize
yep
SQLite doesn't really have any concept of databases
Each individual SQLite file is a database
So if you want to CREATE DATABASE test, you would just make a new file called test.db (or whatever extension tbh)
it's also quite unusual to do CREATE DATABASE yourself, normally people don't have any permissions to create new databases
aight it was the issue thanks
I mean generally you'd do this in software lol
Same applies though
SQLite mmm
most hosters I know give you only 1 database, or only allow to create new ones through their web panel
SQLite has some oddities. You can't ALTER TABLE table ADD COLUMN name details IF NOT EXISTS in it either
IF NOT EXISTS isn't supported for ADD COLUMN, you just have to listen for an exception
ItemStack[] matrix = inventory.getMatrix();
if(matrix.length < 9) return;
for(RpgItems item : RpgItems.values()) {
if(inventory.getResult() != null) {
if(inventory.getResult().isSimilar(item.getItem().getItemStack())) return;
}
for(int i = 0; i < 9; i++) {
if(item.getItem().getRecipe().getIngredients().containsKey(i)) {
if(matrix[i] == null) {
log("null");
break;
}
if(!matrix[i].isSimilar(item.getItem().getItemStack())) {
log("other");
break;
}
} else {
log("no recipe");
break;
}
inventory.setResult(item.getItem().getItemStack());
return;
}
}
}``` did anyone know why my item is always other even when it's not?
You should go down with fps instead of pixels usually
uhh dont see any syntax mistakes i made
Do you need commas between statements? I only remember my MYsql
nvm
It's a list and I can't read
T
hehe
https://hastebin.com/ifowuyorew.java https://hastebin.com/arizemeloz.swift
I get this error on the toggling off, of the freeze command.. Also my events don't seem to be working (Yes they are registered in Main) This is the error:
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
i hope you know the 2nd one will overwrite the original entry?
So i don't need armorcontents too, contents will get armor anyway?
Anyway, my problem is the error and the events
I can play about with content saving later
Okay
setArmorContents makes no sense
you are passing in a way too large item stack array
which is causing you this error
Yes, i've removed this. My issue is the error but I think i've found a solution myself
how is the player inv length 4 :/
I fixed my issues.
seems like you don't refresh the connection
wdym by refreshing?
how you do that, is have a method that checks if its null and if so, establish a connection and return it
well that error occurs cuz the plugin isnt fully enabled :/
Well you can lose the file reference with sqlite with the server reload, so you need to refresh the reference
So dont allow that action if the plugin is not fully enabled
im using hikaricp with sqlite :/
oh hikari ๐คข
hikaricp does not work with sqlite
r-really?
it does absolutely nothing because sqlite is file based
reloading evil
+1
that is fine, but there is no such thing as connection pooling for file based DB's
yes you can use hikaricp to initiate a connection, but you can easily do it yourself too. And the point of hikaricp is connection pooling
ah bruh this sucks then
what is the point of using a lib if you can't use its main function
Hikari sucks...
doesnt connection pooling work with a file based db then?
no
you suck ||jk||
main reason it doesn't work with files is because of IO blocking on files
No because you dont have any connection
it doesn't suck
Yeah bruh
"did" yes
I have use it with Mysql and was a disaster
most likely because you configured hikari incorrectly
Mainly, but their docs sucks a lot
the thing most people don't do
is use the method that hikari provides after you have a connection object
to fetch a connection from the pool
they were pretty straight forward to me o.O
na im really bad with docs
jdbc ftw
If they are not self explained really good i dont understand
they were pretty straightforward to me
do they not have doccuments translated to any other languages
his english isn't very good so
I wouldn't expect him to understand everything they are tryna say
Yeah that the problem
unfortunately programming is predominantly english
Making a mob rn getting an error on super(EntityType.SILVERFISH, ((CraftWorld)) loc.getWorld()) on ((CraftWorld)
yep english is indeed the language of business aha
lets remove datasource from super class ig
https://github.com/FourteenBrush/xKingdoms/blob/6a32c8861537e1fc780de03ac5b5659b936bd5a7/src/main/java/me/fourteendoggo/xkingdoms/storage/persistence/impl/SqlitePersistenceHandler.java
Simple kingdoms plugin for Spigot. Contribute to FourteenBrush/xKingdoms development by creating an account on GitHub.
or leave it as null and override the getConnection method?
probs the latter
Dont use hikari sucks
cuz you had some bad experiences with it and mysql?
Dont f** please....
hikari uses jdbc o.O
Okay?
very based ๐ค
Sorry for being rude bruh but im really annoyed i have a bad day
hello spigot geeks, this not so creative person wants some stupid AF AND DUMB AND ULTRA DUMB plugin ideas so i can make a youtube video and get 1 billion views
im gettin angry when stuff doesnt work lol
could just override the getConnection. Will still need the datasource regardless
Oh you again! nice to see you
do we need the datasource in the sqlite class?
No, sqlite doesnt work with Hikari sucks
no brag but i made the 100th fork of vault
https://paste.md-5.net/kesamekeci.rb does anyone know what this exception means?
๐
yp
it doesn't need to specifically be in that class, but you need those two methods ran if you want to use sqlite
ayo what is your plugin about
it seems sus
so as long as they get ran, which you could do in onEnable() then no it doesn't need to be in that class specificaly
Hey bro dont start a dicussion please....
Its not necessary
lets change the constructor too then :/
Slimefun devs don't like my PR so I have to go nuclear
I think that can be that you are using a special character that is not allow
It says "HackServer" so that might be a bit against TOS
Yes, but to my understanding it should not contain any false chars
HEY dont fuck bro i have told you
If you are going to said stupid things please don do it....
It's just a CraftServer proxy
Oh sorry ty
Generated at runtime
try running a clean build
Yeah, but I'll guess I'll dump it into a file and see how decompilers react to it
Yeah maybe try that
anyways gn lol
are you by chance running any scripts in there?
https://paste.md-5.net/axesonusek.cpp is the source code of the class generating the class
on InventoryClickEvent im setting the eventcancelled to true if its if(ChatColor.stripColor(event.getView().getTitle()).equalsIgnoreCase("Items for Sale")) { this inventory but whenever i open this inventory i cant move stuff from the normal plays inventory is this normal or did i do something wrong
Dont use title to compare
what should i use
I would recommend comparing using full object
what is in Enchanments_plus
or is that the class that gets generated
Are you doing custom gui/menu/inventory right?
Ok
It's a packge if anything
So on the event get the top inventory
if(event.getInventory().equals(PlayerTradeItems.inventoryTradeItems(player))) ?
You can do it event.getViews().getTopInventory() if im not wrong
Ah you mean that
No, that will be the current inventory he is clicking
these are the two lines it is erroring at
https://paste.md-5.net/axesonusek.cpp#L145
https://paste.md-5.net/axesonusek.cpp#L44
ye i got top inventory lemme
try it
It's just static block that calls the injectHackloader method
The top inventory would be the custom one
I am going to assume its quite possible it has to do with the bytes
maybe you don't have the order correct?
The class failed the very primitive early verifiers, so it's one of the core attributes of the class that are invaldi
Dont use static methods they are not recommendaed
also keep in mind that the order things are in, in a class file when compiled does matter too.
for example, statics are intialized in the order they appear in the source file
yea it didnt work i did if(event.getView().getTopInventory().equals(PlayerTradeItems.inventoryTradeItems(player))) {
It's the only block and is basically
static {
try {
Hackloader.injectHackloader();
} catch (HackloaderInjectionException e) {
e.printStackTrace();
}
}
however in this case it wouldn't matter anything
Static is required in this case as I want to load before slimefun does
you should avoid giving false advice
im trying to make the result of the anvil display protection 5
@EventHandler
public void AnvilClick(InventoryClickEvent e){
Player p = (Player) e.getView().getPlayer();
ItemStack p5 = new ItemStack(Material.ENCHANTED_BOOK, 1);
EnchantmentStorageMeta meta = (EnchantmentStorageMeta) p5.getItemMeta();
meta.addStoredEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
p5.setItemMeta(meta);
if (e.getClickedInventory() instanceof AnvilInventory){
p.sendMessage("click");
if(e.getClickedInventory().contains(p5)){
p.sendMessage("click2");
if(!(e.getClickedInventory().getItem(2) == null)){
e.getClickedInventory().getItem(2).removeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL);
e.getClickedInventory().getItem(2).addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 5);
}
}
}
}
the only thing I can think of, is the format of the class file itself is not set to UTF8
java.lang.IllegalArgumentException: Invalid class name (must be an internal class name): de.geolykt.enchantments_plus.compatibility.hackloader.asm.tree.ClassNode@b9aedae
Oh lol, now to understand why it is happening
ah there we go
You were indeed right about https://paste.md-5.net/axesonusek.cpp#L44
Display? PrepareAnvilEvent
It should've been serverItf.name instead of serverItf
your error log tells you that ๐
I have no idea how you found it though
ah, im giving it a go
Make use of setResult(ItemStack) though instead of setting the item directly
Other than that, should work fine
notice it is refering to the initialization?
the only place you have init, is at line 44
That is clinit
Which is class initialization
init is the normal constructor
class initialization
cl init
class initialize
you are generating the class, like you said
(plus it wouldn't even run if it failed the verifier which it did)
anyways, the line was found where it is erroring ๐
suppose we could just move forward from there even if you don't understand how I found it XD
[20:14:52 ERROR]: Could not load 'plugins/enchantments-plus-4.1.0.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.VerifyError: Constructor must call super() or this() before return
Exception Details:
Location:
de/geolykt/enchantments_plus/compatibility/hackloader/HackServer.<init>(Lorg/bukkit/Server;)V @5: return
Reason:
Error exists in the bytecode
Bytecode:
0000000: 2a2b b500 0ab1
Well at least I understand this error message
Anyone know why the getRightClicked() and hasMeta() checks are pulling errors? Don't know any other way of doing it
can I use || ?
if(event.getInventory().getItem(0) == p5 || event.getInventory().getItem(1) == p5)
And it passed the verifier!
[20:17:54 WARN]: Caused by: java.lang.IllegalArgumentException: Can not set static org.bukkit.Server field org.bukkit.Bukkit.server to de.geolykt.enchantments_plus.compatibility.hackloader.HackServer
[20:17:54 WARN]: at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
[20:17:54 WARN]: at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
[20:17:54 WARN]: at java.base/jdk.internal.reflect.UnsafeStaticObjectFieldAccessorImpl.set(UnsafeStaticObjectFieldAccessorImpl.java:79)
[20:17:54 WARN]: at java.base/java.lang.reflect.Field.set(Field.java:799)
[20:17:54 WARN]: at enchantments-plus-4.1.0.jar//de.geolykt.enchantments_plus.compatibility.hackloader.Hackloader.injectHackloader(Hackloader.java:170)
(and yes I understand what I did wrong there too)
Anyone?
hover over the error and tell what you see
It's probably .hasItemMeta
?jd-s for the other method I'd need to check
i think e.getRightClick()
getRightClicked is PlayerInteractEntityEvent
Not this
You have PlayerInteractEvent
Yeah
So you need to put this in another listener
What? I need it in this one, I'm checking for right click, then running a command after various other checks
Then you gotta find a workaround, can't listen to two events at the same time
would need to see the entire source of that listener
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
You probably can just swap out the PlayerInteractEvent with PlayerInteractEntityEvent without any issues
Unless you want to listen if the player also interacts with a block
It's a freeze command, Its an ice block, if they right click another player with it it runs the command
So i can interactentity?
All works, just one more question, how do i know run a command from another class? Never done this before
Consult the documentation that really should not be witchcraft
Nevermind, done it ๐
how long does it take for a premium resource to get accepted? all forums ive found are 4 yrs old
About 4 years
Could someone help me with this error https://paste.gg/p/anonymous/1b59273a2a5441afb0182b7a5663257f
why would that be
In /pl is your plugin green or red
red
And do you see any errors on startup
So your plugin isn't enabled
im restarting i will check
This becomes the next important question
It's probably disabled due to a startup error
yep many errors
what order are the items returned by playerinventory.getcontents() in, and does it include all items? (empty slots, off hand, ect.)
how do I check if an Itemstack is a type of an armor piece ?
ItemStack item;
if(item.getType().isArmor()){ //isArmor ?
// is armor
}
i think this is to do with nms am i wrong? https://paste.gg/p/anonymous/534b4dc769a94ab085990a8a03ee63c4
Cannot invoke "ca.nicbo.invadedlandsevents.event.InvadedEventManager.getCurrentEvent()" because "this.eventManager" is null
Use a Set<Material> containing all armor types
๐
I figured I also can do it like this
Material m = item.getType();
String name = m.name().toLowerCase();
if (name.contains("helmet") || name.contains("chestplate") || name.contains("leggings") || name.contains("boots")){
//do stuff
}
can you prevent the anvil from giving you a result btw ? ๐ค
I have a scoreboard that updates every second with a different time, but for some reason randomly the scoreboard stops updating and becomes blank. Is this a common issue or is it most likely something with my code?
are you sure the if statement is true?
Update: It is indeed possible to use the processClass method to transform plugin classes. That being said it might not work in java versions beyond Java 17 as you need to sun.misc.Unsafe class in order to overwrite the final CraftMagicNumbers#INSTANCE field
Wow that sounds like an absolutely horrible idea
sounds like a great idea
sounds like a solid idea
Time to inject malware into those plugin classes \s
join message plugin
does http requests
I mean it's either that or fork
What is the 1.19 equivalent to the CraftPlayer (Intellij wont find the package to import)? I want to find out the players ping.
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
No errors, just doesnt return anything
If I set persistent data on a entity then kill it. Does it still have the data?
Whats the packet for loading blocks
Probably the player doesn't have the specific permission.
loading as in?
I do
The command doesn't return a single thing
I type it, does nothing
when joining and the server sends all the packets for the blocks to load in
Then you don't have the permission, double check it or make yourself op
I am op
Can you please try debugging?
I've even removed the permission, still nothing
For Mojmap it is ClientboundLevelChunkWithLightPacket @winter pagoda
Have you registered your command?
yeah just realised i mis typed the command oh god
in the Main class
breh
Shouldn't that return a command not found message?
public class IRONSILVERFISH extends EntitySilverfish {
anybody knows why EntitySilverfish gets red and doesn't do an import?
Do you depends on spigot or spigot-api
spigot
If so are you using mojmap or nah
nope
I have no clue then
Any idea why this won't perform the command?
Your formatting style is ... questionable
I have the spigot dependency integrated in my project. Still doesn't find anything for the CraftPlayer because the package "org.bukkit.craftbukkit" doesn't exist
Even then it is because you check for the ampersand, but you need to check ยง
ahhhhh
Actually I can use my cc utils
I'm new not sure how to use PDC
I need help understanding this error please, the only reference to UGPlayerProfile in this code is that its inside an instance of UGPlayerProfile
[13:01:23 WARN]: [Ultragens] Task #3 for Ultragens v1.0 generated an exception
java.lang.NullPointerException: Cannot invoke "com.earthagar.ultragens.Database.getGenerator(String)" because the return value of "com.earthagar.ultragens.UGPlayerProfile.access$000(com.earthagar.ultragens.UGPlayerProfile)" is null
at com.earthagar.ultragens.UGPlayerProfile$Spawner$1.run(UGPlayerProfile.java:110) ~[ultragens-1.0-shaded.jar:?]
Generator gen = db.getGenerator(blComp.getString("genID"));
blComp.getString("genID") is null
But then why is it saying that the main class is null?
its not
the return value of "com.earthagar.ultragens.UGPlayerProfile.access$000(com.earthagar.ultragens.UGPlayerProfile)" is null
right is that not saying what I just said?
the return value, not main is null
hmm I'll debug more
No, db is null
Javac generates a synthetic accessor method (access$000) since db is private and you are in a different class than it was declared at
i have the spigot api version 1.19.2-R0.1-SNAPSHOT dependency implemented but cant import the org.bukkit.craftbukkit package. Whats wrong?
or is there any other way that i can find out the players ping?
I am learning how to code plugins, and keep running into this error:
Method invocation 'getType' may produce 'NullPointerException
it happens whenever I am dealing with block related stuff (the error pops up when I try Block block = event.getHitBlock(); unless I add if (block != null). Is there any other way to fix this besides adding a bunch of if (block != null) statements?
package me.cryptopig.myfirstplugin.listeners;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.ExpBottleEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.player.PlayerBedLeaveEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import static org.bukkit.Bukkit.getServer;
public class RandomListeners implements Listener {
String playerName;
@EventHandler
public void onProjectileHitEvent(ProjectileHitEvent event) {
Block block = event.getHitBlock();
if (block != null) && (block.getType() == Material.dirt) {
block.breakNaturally();
}
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
getServer().broadcastMessage( "Someone has joined the server." );
playerName = event.getPlayer().getPlayerListName();
event.setJoinMessage("Welcome to the server, " + playerName + "!");
}
@EventHandler
public void onLeaveBed(PlayerBedLeaveEvent event) {
Player player = event.getPlayer();
player.setHealth(player.getHealth() - 3);
player.sendMessage("You have left a bed! Hope you had a good sleep!");
}
}
My code btw
Unless you are willing to add a bunch of asserts or telling the IDE to shut up - no
ok ty :)
how do i tell intellij to shut up lol
I'm an eclipse user
my condolences 
Based
Well... no... that's just a good error. Your IDE is doing a good job
ProjectileHitEvent#getHitBlock() can return null. You should be null checking it
That is extremely true
You can remove that null check if you want, but you're going to get exceptions in your console every single time any projectile hits an entity
Or... block != null
I can't believe I'm saying this, but languages like Kotlin have the Elvis (?) operator which will do both. block?.getType() == Material.WHATEVER)
I don't use Kotlin nor do I really advise you learning it, especially if you're just starting to learn Java, but figured I'd at least mention it because the Kotlin nutcases don't shutup about null safety lol
okok, thanks a lot!
elvis
is there an event for when a player makes a successful trade w a villager
?
or makes a trade through merchant gui
?jd-s and search trade or villager
javadocs are witchcraft !!1
Javadocs are hackers
Did you know kotlin has null safety?

Did you know java Optional is a thing (altho fkn verbose but anyhow)
How many degrees is yaw? 360?
-180
wdym if a console message is sent?
Hello, I'm workin on an plugin 1.18.2, where i shoot snowballs with a speed of 10 balls / s, but the LivingEntity I hit only gets damage on every 5th hit or so.
Does anyknow knows whats going on there?
Tried debugging?
Well, it seems not to be the plugin it self, when i throw snowballs normaly i have the same issue.
players get invulnerability ticks after being damaged
Is there a way to disable that?
Ok thanks a lot, i found an solution
someone have a simple plugin source with /tpa /tpaccept and /tpadeny
essentialsX
i want just the tpa so i can use in my plugin
Why don't you code it yourself, it's not that difficult
hey, so i have a "rank" system which stores the rank as a char. 'a', 'b' etc
when i can "getRank()" it returns a char
how can i set the rank to the next letter in the alphabet, when i only have a char
for example
getRank() returns 'a' so i need to setRank('b') but how would i get 'b'
does that make sense
because plugins, essentials, permissionsex doesn't work in versions 1.18.2
What
permission sex
Could make a String "abcdef..." and get your ranks char index in that string, then return the next index of that string after your ranks char
when i put plugins on my server they just turn red and don't work
pretty sure you can just +1 to a char and it goes to the next one
or smth like that if it exists ^^
mah
nah
(char)char.getNumericValue()+1;
oh right
yea wont show for some reason
is your getRank() returning a char or a String?
and im using Lombok so
Character.getNumericValue(rank)
https://paste.md-5.net/paqopetiqu.java
Why is this not working lol
Whenever i try to pickup an item this comes
Event_PickupAndCraft line 32
no one saw that
Looks like you are trying to add to an immutable list
well you're also checking if a list contains an itemstack, but the list is for strings
what happens when it gets to z?
go to whatever characters are after the alphabet
Could I somehow "refill" the inventory I'm making?
I'm saving the contents to a file and it saves just fine, but when I go to look at the modified one and call a new instance of the InventoryHolder, nothing in the inventory changes even though it should be pulling everything from the file
actually
I wonder if it's an ownership issue...
the items that I put in don't stay, it just gets reset
Still doesn't really explain why the stuff pulled from the config isn't being set as the inventory contents
or it can just not load the items
what
fml
I forgot the s in groups
Hi guys, I have a strange issue when teleporting very fast... https://pastebin.com/Qfb6QRAJ
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.
I don't know if it's bc of that or something else
but I'm not making any modification on iteration of a hashmap
so I don't know where to look ^^'
that error can be thrown with any kind of list or map, it's not exclusively maps
I mean yeah, but still, I'm not modifying any list/map during an iteration
And it doesn't point to any plugin's class
Probably better to ask in the Paper server
Ok, gonna try there, thanks ^^
is there any consistent interface I can use to tell if a block is "usable" but doesn't store items like an anvil, crafting table, smithing table
Does Container cover all of those?
ya nothing I can see
I already am using InventoryHolder anyway which is a higher interface
What are you trying to do?
I just want to know when a player right clicks them. I was hoping to avoid hard coding a list of materials
huh, I don't think those even have a block interface in Bukkit
ya I wasn't seeing anything. was hoping someone knew otherwise
Paper doesn't even have interfaces for them
is there a way to format the entity health when adding it to message?
Format how?
when i add like 100 max health and text shows me like 70.5391593593
just want the 70
or 70.5
you could use Math#round()
thanks
if you want to carry some decimals, you can format your strings
Is it possible to do something like this with YamlConfiguration ?
Why would you do it like that?
Is there no way to get the burn time of an item other than by just keeping a map manually?
You can make lists like that minus the dash.
skins:
skin1:
name: ""
parent: ""
custom-model-id: 1
skin2:
name: ""
parent: ""
custom-model-id: 1
skin3:
skin4:
skin5:
// etc
- because I will use custom property names in YAML, 2. even Bukkit use this approach
I guess you could also use the dash for the proper list syntax, but you can still iterate over this using #getConfigurationSection()#getKeys(false).
is that an image as background lol
is this common approach? does server owers not be confused by lack of - syntax, what do you think?
yes It makes me calm when my plugin throws exceptions
The most user friendly approach is the example I provided. You can use the dash, but it makes it a little harder for server owners to write their configs properly.
The only downsides to this approach are all development related. I'm not sure if that example can be grabbed as a list directly as you would need to iterate over that section to get the skin you want. (You would be doing that anyways if you were converting it to a list, but ๐คทโโ๏ธ )
I like to keep my configs simple to read and write. So things like serialized bukkit objects are not found in the configs that I make. How you structure your config really depends on how easy you want the end user to modify it.
Right, even this approach will be easier to me easier for generic mapping to objects
Java is saying the method doesnt exist. e is the same class as im editing wtf
It's the simple things we miss
A second pair of eyes is always useful lol
Mongo is bar far the best db and no one will change my mind
agree
It so good to work with
Having a getter and setter then one line to store / change it
๐
+1
How do i cancel entity collisions with a remapped entity
iirc regular nms had a method to override
does the persistant data container ever get deleted?
Is it possible to display custom ShapedRecipe here?
anyone know how to get a Rotation from where a projectile hit? i want to make it so an item frame is placed wherever said projectile hits
?whereami
the original message
nevermind
somehow this is automatically done for me
They mean if you can update your server to 1.19
Once done, update the API in your IDE
Once these two are done, SkullMeta will include the method that you need.
Let me know how it went ๐๐ป
Get the block face of the hit block
Why is my boolean not staying true?
public boolean editing;
public void onClick(Player player, int slot, ClickType clickType) {
player.closeInventory();
editing = true;
player.sendMessage(CC.translate("&aPaste a new token for the discord bot - this will require a restart of the bot!"));
player.sendMessage(String.valueOf(editing));
//prints true
}
//different class
public BotConfigMenu botConfigMenu = new BotConfigMenu();
@EventHandler
public void handleBotConfig(AsyncPlayerChatEvent event) {
Player player = event.getPlayer();
player.sendMessage("test");
//prints
player.sendMessage(String.valueOf(botConfigMenu.editing));
//prints false
if (botConfigMenu.editing) { //doesn't run this code
plugin.getDiscordFile().set("bot.token", event.getMessage());
botConfigMenu.editing = false;
player.sendMessage(CC.translate("&aYour discord token has been updated to &f" + event.getMessage()));
new BotConfigMenu().open(player);
}
}
already said nevermind but thanks
might need that again soon
Mb didn't read whats below it
all good all good
Cuz you created a new instance
How can I keep the same value?
Re use the same object which holds the updated boolean value
I did that, no? I got the same boolean from the class, all I did was got an instance of the class
Unless you mean make a new boolean and get the value from that one
Is the first class above the BotConfigMenu?
is BotConfigMenu editingstatic?
Nope
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
absolutely not
Thats abuse
also why is it public??
You can reference a singleton object but dependency injection is much better
more conventional to just make it private and use a getter, no?
If I make made it private then I can't get it from another class, no?
Using @Getter would make it a private method?
am I wrong?
You gotta make it static then, or encapsulate it and use getter setters
Aight so it'll work if I just do
@Getter
@Setter
boolean sdifoghu;
boolean = true;
other class
class.getSdfighdi;
you can use a public getter on a private variable
oh im not familiar with lombok
i generally dislike annotation processors (dont hurt me, just personal preference)
Lombok is amazing
especially when working with alot of variables for mongo
and I mean alot
My player data class stores around 100 variables
and I just go @Getter @Setter without having to make one for each
saves like 1000 lines
100 variables......
Well yeah - this is a massive plugin
I do
how would one identify where a memory leak is coming from
take a look at maps and stuff
can anyone give me a list of things that cause them
you could use eclipse's memory analyzer tool
spark
already tried
Make a heap dump
collections
timings?
collections
are the biggest cause
this is it
heap dump + MAT from eclipse
collections as in lists?
yep, lists, sets, also maps are a huge red flag too
if you have any maps that can me migrated to WeakHashMap, i would look into it!
yea your best bet is to use eclipse MAT with a heap dump
only list i currently have is a list for empty lore
which is just a list with nothing in it
when using MAT, it can give you a leak suspects report
there are many articles online that also explain some vocab
uhh theres many ways you can make a heap dump
i think MAT may be able to create one of a current runtime? im unsure tho, may also require vm flags
ill just use spark
/spark heapdump is a command
i mean if it works it works ig
MAT will also give a leak suspects report
when it comes to spigot servers
theres always a leak suspect that involves the world/level, you need to ignore that one
is your plugin the only plugin on the server
yes
i only have spark and my plugin
i wonder if i could add custom skins to my wip blood splatters
i imagine it would probably take a while to take the skin, put a blood overlay on it, and then change it to the outputted file
will play with that idea though
you could always cache it async when the player logs
ooh yeah
or just when the player joins with a new skin for the first time, create a folder for that player which contains their skin with different blood overlays
Okay, so this might sound nooby but I have a question. Is it easier to send a JSON String from socket to socket carrying the data needed or whole objects like Packets? For example my own PlayerWinPacket and then the client getting the Object and casting it to that object or Sending a json containing the type of object as string and then retrieving the data from there?
might take up alot of storage so they'll be auto deleted after 3 days of inactivity
youll need to serialize it no matter what
json is easiest to read in a text form
but if you need something more efficient that takes up little space and doesnt need to be human readable, a serliaized packet approach could work as well
Yeah I'm okay with the serializing part, just asking which one would be more convenient.
just up to what your goals are
It's a little hard here cause both work for me but Can't decide which one to go with xd
i mean
If let's say, an exception occurs, It would be easier to get the data from the object received just getting the string form of the JSON object to see what is wrong with it wouldn't it?
yes, gson adapters are typically easier to work with
Ah got it thanks.
when working with plain text over the internet
its never a bad idea to encrypt if you can
just use a pair of keys on each end to encrypt/decrypt data
i suppose if your data isnt confidential or private you dont need to worry about that step lol
its also a bit overkill anyways for mc server
Yeah just need data like Integers and Strings from a certain event. Nothing too serious...
target.damage(10)
if(target.isDead()) {
...
}```
I want to damage the entity then check if it died from that damage or not but this code doesn't seem to work
@desert frigate Use EntityDamageEvent to check if the damage killed the entity
check if the target's health minus the amount you want to damage is <= 0
yeah i just tried to see if the health of the mob is below of equal to the amount of damage im inflicting
Which event are you using?
not really an event
Yeah than check if the damage is >= the target's health, if so kill it, otherwise set it's health minus the amount you wanna remove
there isnt a event
yeah
and it's not working?
okay, just the code you posted didn't work then?
this code didnt work
this works
is there a way to "predict" the amount of exp a mob will drop
I was just wondering what the most optimal method for damaging entities near a location is.
My current method:
world.getNearbyEntities returns a collection, so I loop through all the mobs in the world, see if the collection contains that mob, and do damage to it
that seems like a bad way to do it though
Put it inside a delayed task then get the health from there
Delay it by 2L or 1L, just debug it if it's not getting the new health
Just loop through the collection
guys does anyone here play hypixel skyblock?
gross
:sadge:
I feel like this is a pretty basic question, so just going to apologize in advance.
I'm wanting to create a Bungeecord Party plugin that when a player connects to a server, information about their party is sent to the Server, so that information can be used in the Minigame plugin for creating teams and such. I'm not sure what the best way to go about this would be, and I'm yet to find any good resources online.
If someone could help me out with this or point me in the right direction, it would be much appreciated. Thanks ๐
I don't know Bungeecord that much, but iirc you can use Bungeecord Messaging Channels to communicate between plugins through bungee.
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Since it stays with the entity, does it also get deleted when the entity gets destroyed?
e.g the item gets thrown into lava or the mob gets killed
Well yea wouldn't that only make sense
That'd mean it would nolonger exist to persist on
I'd found some information on Plugin Messages, but wasen't sure if it was the best way to go about this. Thank you!
np
Is there a way that you can prompt a resource pack even if they declined the first prompt?
I'm trying to make a command to allow the users to get the prompt even once they declined it.
Yes
Player#setResourcepack
?bin
?paste
Why is this boolean not updating?
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
You don't update the boolean itself
public boolean syncNickName = plugin.getDiscordFile().getBoolean("bot.syncnickname");
will not update
when the file updates
it is set to the value that the file has AT THAT CURRENT TIME
What about here?
Would that update it in the config though? In my Boolean I use #get, will it work to update?
yes
Aight ill give it a try, thanks
also your if statements are inverted
if syncNickname is false you want to set it to be true
yea
When I use this, it doesnโt prompt them.
I have an event that handles if it declines and it triggers that every time.
do you have server resourcepack prompt disabled when you join
Well, I have it on โpromptโ, but if I decline the first initial prompt, I want a command that prompts them even if they declined the first initial prompt.
If that makes sense
if you decline it will automatically switch that to decline
Hmm, is there no way to make that not happen?
Dang, thatโs unfortunate. Yeah, Iโll kick them and tell them to enable it, thank you very much!
I believe there is
if you bool = true it will give them the prompt again, if they declined https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html#setResourcePack(java.lang.String,byte[],java.lang.String,boolean)
if they don;t have the resource pack it will disconnect them with a message
Could I get an example of this?
player.setResourcePack("pack_url", hash, "This server requires you enable resource packs!", true);
I see, Iโll try this out tomorrow! Thank you for the response :)
unless they have them disabled. You need to check https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerResourcePackStatusEvent.html
If the result of that event is DENY you kick them
yes you do, if they have it disabled the first line will be completely ignored
Players can disable server resources on their client, in which case this method will have no affect on them. Use the PlayerResourcePackStatusEvent to figure out whether or not the player loaded the pack!
I have another question, how difficult would it be to log if a user has enabled a texture pack or not? For example, store their name into a file with something like texture-pack: false or texture-pack: true?
Ah
Iโm trying to make a server that runs with and without a texture pack, but I just canโt wrap my head around how to do this in a file ๐
Can;t be done reliably. Once they log off or change the setting you won;t know
you can ensure everyone on yoru server has downloaded the pack is all
yeah if they change settings that will void that config useless
that sounds like a mega pain i the ass
wait wrong reply lol
I see, what appears to happen though, is I have setResoucePack on a join event and if they log off the server and log in again with the texture pack option disabled, itโll stay disabledโฆ
Then if they change it to prompt, it prompts them & enable just enables it.
I think in theory it could work, just may be a bit buggy
Yeah, the only things that need it is 2ish GUIs, chat, and tab :P
ah
Thats why you listen to the event I gave you
True, but back to the fileโฆ how would I log it? Haha
It will tell you if its disabled
why do you need to log it?
listen in the event and log their status
just listen to the event and store it in mem
Hmmm, okay. Iโve never stored anything that can be added, for example player data, so this will be quite interesting to figure out
if you kick them in the event for having it disabled you can know for sure everyone thats online is using your pack
well, using both, the setPack and the event
Yeah, Iโm not sure if players would quit the server if it requires something like that though
setPack kicks them if they decline it, the event kick them if its disabled.
I just have a few debatable questions ๐
Map<UUID, Boolean> resourcePackStatus = new HashMap<>();
@EventHandler
public void onJoin(PlayerJoinEvent event){
//set resourcepack
}
@EventHandler
public void resourcepackStatus(PlayerResourcePackSTatusEvent event){
if status == declines or failed download
resourcePackStatus.put(player, false)
else
resourcePackStatus.put(player, true)
}```
then you can keep track of who has what
I see, would this not fail if they log out of the server/the server restarts?
Oh perfect! Then, can I use these variables elsewhere?
If the server restarts no one is online so no data to keep
yeah obviously use a better structure
but thats the general flow of how it should go
Gotcha, Iโll be trying this out tomorrow! I really appreciate your guysโ help, I wouldโve for sure spent a week on this without you guys haha
does player death event only work for players? or
@EventHandler
public void onPlayerDead (PlayerDeathEvent e) {
if (e.getEntity() instanceof Player) {
//some code here
}
}
Cause i saw this code and was like hmmmmmmmmm ๐ค
yes
its in the name lol
EntityDeathEvent for any entity
so what is the point of thise code LMAO
sorta useless you can blind cast it
alright
maybe they just copied their old code over from EntityDeathEvent to PlayerDeathEvent
Does Location#add() and Location#remove() change the location object or does it return a clone of the instance?
change the current location
Ah, that's probably why my plugin isn't working lol
you can just do myLocation.clone().add(...) instead
I'm trying to connect my Bungeecord and Spigot servers through PluginMessages and am struggling to figure out how use this effectively..
All I want to do is send a message from spigot plugin -> bungeecord, and have bungeecord return something. Basically, I want to create a "getter" to get a value from bungeecord and send it to the spigot server upon request from the spigot server.
I have experience with spigot programming, but little to no experience with bungeecord. If someone could guide me in the right direction that would be great. I've looked at multiple resources online with little to no information on how to do what I'm trying to do. The basic PluginMessage tutorials and forums havenโt really helped me..
if anyone could help me, that would be great ๐
Thought so, thanks ๐
what is wrong with this code any why might give a stack overflow error?
public static void unregisterGUI(InventoryGUI inventoryGUI) {
if (inventoryGUI != null) {
for (InventoryItem inventoryItem : inventoryGUI.getInventoryItems()) {
if (inventoryItem.getAction() != null && inventoryItem.getAction() instanceof OpenInventory) {
unregisterGUI(((OpenInventory) inventoryItem.getAction()).inventoryGUI);
}
}
if (!inventoryGUI.getPages().isEmpty()) {
for (InventoryGUI page : inventoryGUI.getPages()) {
unregisterGUI(page);
}
}
inventoryManager.remove(inventoryGUI);
}
}```
I feel like this is probably something super basic, but the tutorials Iโve viewed havenโt really explained how to do something like this. Once again, If someone could help or push me in the right direction- that would be fantastic
hard to tell with your code
do you need more code?
assuming that for loop is calling the same inventory
make sure java unregisterGUI(((OpenInventory) inventoryItem.getAction()).inventoryGUI); isnt calling the same inventoryGUI
and you should be sweet
== should do fine
It appears that it didnt work
wait so OpenInventory has an inventoryGUI right
why do you need to unregister it, unless it's already registered?
yeah any inventoryGUI has to be registered
because I don't want previous inventories taking up memory
its constructed for each time it is opened
yeah, that way if you are doing database queries or something else weird it won't be old data
I could add an update method, but for now this should be enough
why not make GUIAction just point to a class that extens InventoryGUI
and instantiate it when its called
say i had 10 GUIActions for one inventory, that would mean it makes 10 extra inventories, and thus 9 theoretically useless ones
unless im understanding incorrectly
GUIAction is any action, not just open Inventory
I just made an OpenInventory action for ease of mind
yeah but i mean when OpenInventory.action is called, create the inventory on demand
instead of having an instance already waiting
Oh thats what I'm doing rn lol
oh lol
yeah but either one of those forloops in unregisterGUI is calling itself recursively
meaning either the OpenInventory GUIAction or pages contains itself
or one of the pages of either contains the parent gui
well thats the only reason it would be calling recursively
well the gui I am testing shouldn't have a gui because it doesn't meet the conditions
a page is just an overflow inventory
just print out the gui name or something in unregisterGUI and it will tell you what is calling itself
and my action looks something like this now
@Override
public void action(InventoryClickEvent event) {
if (inventoryGUI != null) {
InventoryUtil.registerGUI(inventoryGUI);
Player player = (Player) event.getWhoClicked();
player.openInventory(inventoryGUI.getInventory());
return;
}
throw new IllegalArgumentException("Inventory GUI does not exist.");
}```
creating the inventory in it is a bit iffy but registering works for me
its also slightly irritating that you need to open the inventory using the inventory util instead of player.openinventory
where are you creating the OpenInventory action itself
in my other project, its on a command
i feel this is more a matter of just refactoring data flow. you shouldnt need that many steps to unregister it
I have thought about keeping a map of a players inventories and looping through that map to unregister it
for my manager i just unregister it on close
yeah the problem is that you can go back to your previous inventory
unregistering it would be problematic
cant you just create a new instance again
possibly, but that require me changing the inventory construction all together
possibly using a consumer?
public class TestInventory extends CustomInventory {
public TestInventory(MinecraftEnhanced plugin, Player player){
super(plugin, player, UnicodeSpaceUtil.getNeg(8) + "&r&f\uF004", 27);
for(int i = 0; i < 9; i++){
int finalI = i;
slotMap.put(i, e -> {
Inventory inv = new TestInventory(plugin, player).getInventory();
player.openInventory(inv);
});
}
}
@Override
public Inventory getInventory() {
return Bukkit.createInventory(this, size, Util.formatColour(title));
}
}
This is my data flow for if i want to open the same inventory again
just create a new instance, it will auto close, unregistering it
no need to manually unregister
that is better, but for me that would change a lot of things
and I don't know if reconstructing the gui on navigation is entirely effective
then again, neither is my unregister method
effective or efficient?
both
i mean, you can reconstruct it with just the player right
dont need any external data
efficiency wise - its really negligible
creating an inventory barely uses any cpu cycles
so how would I go about doing that?
I keep thinking about using a consumer with the instructions and then calling that on open
on open -> register the inventory
on close -> unregister
open another inventory -> create new instance and register
thats how most people do it
rather than having the instance waiting to be opened, create it on demand
oh right, I was definitely over complicating that
so here I do both
//Make sure it wasn't just another inventory being opened.
if (!InventoryUtil.getInventoryManager().isGUI(player.getOpenInventory().getTopInventory())
&& player.getOpenInventory().getTopInventory().getType() == InventoryType.CRAFTING) {
if (gui.getOpenOnClose() != null) {
InventoryUtil.openInventory(player, gui.getOpenOnClose());
return;
}
}
if (gui.isUnregisterOnClose()) {
InventoryUtil.unregisterGUI(gui);
}```
breadcrumb lets say
and then unregister
alright I will test that out
well it works, thanks for the help. Something you just need to talk things over to realize how dumb you are actually being.
lmao no stress
just for negative characters so i dont have to manually calc them
you want the src?
That would be great
nws
That's using the negative space font, right?
Yes
Just want to confirm my memory that this is a key
so if I get all keys in a for loop then it will get all the ranks
Yes
Yes, you can also get every key by using the ".getKeys(true)" method I believe. Which would also return things like name, prefix,... If my memory serves me right
private @NotNull ShapedRecipe craftCocaine() {
ItemStack cocaine = new ItemStack(Material.SUGAR);
cocaine.addUnsafeEnchantment(Enchantment.DURABILITY, 1);
ItemMeta cocaineMeta = cocaine.getItemMeta();
assert cocaineMeta != null;
cocaineMeta.setDisplayName(ChatColor.DARK_PURPLE + "" + ChatColor.BOLD + "Cocaina");
cocaineMeta.setLore(Arrays.asList(
ChatColor.AQUA + "" + ChatColor.ITALIC + "Cocaina pura",
ChatColor.DARK_PURPLE + "Cuidado con los efectos..."
));
cocaineMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
cocaine.setItemMeta(cocaineMeta);
ShapedRecipe shapedRecipe = new ShapedRecipe(new NamespacedKey(this, "pure_cocaine"), cocaine);
shapedRecipe.shape("SSS", "SSS", "SSS");
shapedRecipe.setIngredient('S', Material.SUGAR);
return shapedRecipe;
}
One question, have changed the way you make custom recipes?
Show
If I wanted to get say the suffix for all, how would I? Like for every key I want to get the suffix
You can iterate through all the keys at the same level and then invoke getConfigurationSection followed by getString where you pass the "suffix" as the path (ofc always check for nullability)
On your cocainMeta.setDisplayName if you have the ChatColor.'s put .toString() on it to not havr an empty string
The way they do it works just fine
+ "" already does .toString()
No it doesnt
concatenation does
It does String::valueOf
whats the difference?
config.contains("Owner");
no
Man why 9 sugar > cocaine. Put some leaves in the recipe
toner.bame
im bored
I have never played a mini game
actually I've never played on anyone elses server
other than a few minutes on on streamers server
never been on hypixel or smth?
nope
oh thats even worser than me lol
remind me, players damaged by creeper explosions doesn't trigger the entitydamagedbyentity event right?
Hi! How can i make it so that when the player clicks an item in my inventory it opens an website on his pc (opens that "are you sure you want to open the following website?" screen) ?
send the player a textcomponent which will open a link when clicked
sincerely hoping thats a joke 
ya can
thanks
there's a click component that triggers open url
