Thanks man this is really useful, I was looking for something like this in awhile. One question tho! I haven't tested it but does the location...
I don't think you can place armor stands in water.
First - Create a HashMap (Not an ArrayList) storing the NPC as a key and itemstack as a value. This will store all player's inventory contents....
Listen for PlayerQuitEvent, check if he was tagged if he is then store his inventory items in the HashMap after that do the rest as I said above.
Store player's inventory in hashmap, and then spawn your npc then listen for
EntityDeathEvent then simply add to the drops player's items:...
This might help: https://bukkit.org/threads/move-armorstands-in-pairs.398735/
Listen for BlockBreakEvent check if player is within the spawn location, for example:
if (Math.abs(playerx - certainlocationx) <= 3 && playery -...
Wouldn't it cause so many lag since every time a player moves you're looping for all players in the server?
Take a look at this link
I debug my code, found out the problem thanks man for the help.
"Do not set aside your happiness. Do not wait to be happy in the future. The best time to be happy is always now." - Roy T. Bennett
I'm working on a mini game plugin called Red Alert just like Volcano in Hpixel Party Games 1, basically the floor turns from...
File file = new File(plugin.getDataFolder(), "config.yml");
Separate names with a comma.