[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] Minecraft Login system

The code you’ve made is incomplete as @user681574 stated, so unfortunately your question will be answered in a vague way. It seems like you have to make objects appear when the player has successfully logged in as it is the easiest way possible. Another way is to make the players not able to register clicks/keys … 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] Lua timer script producing all-numeric value instead of proper time

It looks like you are saving the Unix Timestamp to your file, you can try and make it human readable using an online time converter (https://time.is/Unix_time_converter) Besides this, take some time to read the os.time() implementation details on this lua page: https://www.lua.org/pil/22.1.html The time function, when called without arguments, returns the current date and time, … 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] Installing Minecraft server from .exe instead of .jar

To start a minecraft server you normally make a batch file (under Windows). Just put the crfatbukkit.jar or whatever Server you are using into a folder an make a .bat file using your notepad. Just write java -Xmx1024M -jar craftbukkit.jar -o true PAUSE into the file and save it in the folder of the craftbukkit.jar. … Read more