I am looking for a plugin that resets the player's inventory and sends them back to the starting spawn on logout. Either death on logout or just a plain reset, either would work, anyone know if this is possible? or if it's already been done?
This would be really easy... Do you want their inventory deleted (including armor), or everything -- Hunger reset, XP gone, etc.
Usually if a request has [Simple] in the header then all the developers go crazy saying "If it's so simple why don' t you make it? ", which marks the begginging of a conflict between the devs and the person making the request. However, I think it is safe to say that if you put [Simple] in the header of this request it would be more of an understatement .
if it's a complete wipe of player info.. you could just add a task to delete the player.dat file, but you'd lose the last played time and stuff like that also..
Done done done! Many people say this is easy, but no ACTION! But as I think we should allow new people to make plugins, I would like someone (new) to create this for him before I release mine. Arrogance at its finest!
Fine, I see how it is. Let me tag jacklin213 because I think he started diving into the world of Java (although I may be wrong).
I could do this in Variable Triggers if you liked? It has a On Player Join event and i would jsut make it run essentials Clearinventory and then TP them to the spawn This would let them keep other player info like played time etc /whatever you want.
An entire reset, just an inventoryclear and tp.... anything would be great. I am not currently using essentials though, so if that was the route, I'd have to get that. But that's no big deal. And if yall think it's really that elementary, I'd rather someone new did it. But as for my preferences on the construction of the plugin, I dont care. I just need them to start over at spawn fresh, everytime they log out... or in. Sorry if this plugin is too simple. I guess I am just THAT ignorant on the subject. =/
wait so u want a plugin which wipes out a players inventory on logout as a well as teleporting them back to spawn? calebbfmv np98765 i have dived into the world of java but im on vaca now, im starting to look into this plugin but if it is urgent you guys can finish it off. Just a question: Do i need any other libraries appart from bukkit x2dot what name do u want for this plugin? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Well, I'm going to be honest here. I happen to be developing a plugin, and a portion of it, involves this same feature. I've already programmed it. Anyways, I see you want someone new to Java to complete this. My tip to them, instead of having this all happen upon log out, have it happen on join. This way, if the server crashes, or lags, etc, it won't have any problems.
i finnished it i just need to know what name he wants , thanks calebbfmv np98765 fully tested and working oh bummer now i need to go change my code lol EDIT: i just made it do that on login and logout ^o^ so it works now EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Just change it to PlayerJoinEvent, lol? Code: @EventHandler public void onPlayerJoin(PlayerJoinEvent event) { Player plr = event.getPlayer(); plr.getInventory().clear(); plr.getInventory().setHelmet(new ItemStack(Material.AIR, 1)); plr.getInventory().setChestplate(new ItemStack(Material.AIR, 1)); plr.getInventory().setLeggings(new ItemStack(Material.AIR, 1)); plr.getInventory().setBoots(new ItemStack(Material.AIR, 1)); plr.teleport(plr.getServer().getWorld("world").getSpawnLocation()); }
y make it that complicated when u can do this Code:java @EventHandler public void onLoginEvent(PlayerLoginEvent event){ Player p = event.getPlayer(); PlayerInventory inventory = p.getInventory(); inventory.clear(); p.teleport(p.getWorld().getSpawnLocation()); } nvm i c what i missed out thanks EDIT by Moderator: merged posts, please use the edit button instead of double posting.
The name? Doesn't matter to me. Player Reset were the keywords when I tried to find a plugin that did this.
k releasing it now http://dev.bukkit.org/server-mods/playerwipe/ EDIT by Moderator: merged posts, please use the edit button instead of double posting.
go ahead and de-compile lol u have my permission (feel free to nag at me, i made it as simple as possible i "think" i did use both playerloginevent and playerjoinevent) good point (they need to aprove of it) http://dev.bukkit.org/media/files/633/883/PlayerWipe.jar direct link to download EDIT by Moderator: merged posts, please use the edit button instead of double posting.