[Solved] Java bukkit config file for player homes not allowing teleportation

You might want to check to see if “homesConfig.contains(“Homes.” + user.getName() + )” before you try to use it. I think getting something that the config file doesn’t contain will just return null. Here’s how you could check it if (!homesConfig.contains(“Homes.” + user.getName() + “.world”) || <just copy the first condition but for the different … Read more

[Solved] Strange behavior of ItemStack

This has tripped people up more than once. Doors are two-component items. ACACIA_DOOR represents the top-part of the door, while ACACIA_DOOR_ITEM represents the bottom-part and also the item id. Use ACACIA_DOOR_ITEM when creating an ItemStack. Tip: If you are unsure about an item id, launch Minecraft in creative mode and enable Advanced Tooltips by pressing … Read more

[Solved] “java.lang.NoClassDefFoundError: javax/mail/MessagingException” (Using spigot / Bukkit) (Eclipse) [closed]

1) Have you used following 2 jars ? mail.jar activation.jar 2) Try switching to latest jars if issue still persist. 3) Make sure jar are available in class-path and there are no version conflicts. 4) Try upgrading you java version to 1.6+ if using lower versions. 5) Add the jars to your WEB-INF/lib folder Add … Read more

[Solved] JavaInvalid value for getInt()

First of all, don’t do mysql query in the event, that make the server lag. You have to create hashmap with the data you want to link to mysql server and do a scheduler Async task that do the query. Example: package test; import java.sql.DriverManager; import java.sql.SQLException; import java.util.Map.Entry; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import org.bukkit.entity.Player; … Read more

[Solved] java.lang.IllegalArgumentException: Plugin already initialized. What’s going on?

The stacktrace clearly tells where is the problem. What is a stack trace, and how can I use it to debug my application errors? The error: java.lang.IllegalArgumentException: Plugin already initialized! … Caused by: java.lang.IllegalStateException: Initial initialization … at me.plugin.example.Main.<init>(Main.java:19) ~[?:?] Your code: @Override public void onEnable() { getServer().getPluginManager().registerEvents(new Main(), this); } //<– 19th line And … Read more

[Solved] Date Parsing Operation Crashes Server

The reason that my server keeps crashing is because it runs out of memory. (From: @Jon Skeet) The fact that you’re looping over a collection and conditionally adding to it looks suspect to me. It’s possible that it’s just looping forever, because it adds an item, then finds that item and adds another, then adds … Read more