Clear Inventory On Leave

Discussion in 'Archived: Plugin Requests' started by PureGermanity, Jan 22, 2014.

?

I need a Mod Clears every Players Inventory When they Leave

  1. I have created this Mod for you, I hope i made your wide come true!

    100.0%
  2. I am working on it!

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. Offline

    PureGermanity

    Dear Mod Makers,

    What should the Plugin do: After a Player has left or been kicked from my Server, I would like their complete Inventory to be cleared! (including armor)

    Why I need It: I have The plugin Survival Games X, which I Use For Survival Games, and I need a Mod Maker to create a mod that clears every players inventory if they leave the server or are kicked. Survival Games X is set to restart after one game (on my server), but the inventories don't clear if they join if it has restarted. The Mod Makers themselves are sadly not replying to my Problem, and therefore I am asking you Mod Makers.

    P.S. Please send me the source code so I can edit the mod too!

    P.P.S For 1.6.4 R2.0 Please

    Thanks in the future!
     
  2. I don't know if this works but something like this maybe?
    Code:java
    1. @EventHandler
    2. public void onPlayerKick(PlayerKickEvent event){
    3. Player p = event.getPlayer();
    4. p.getInventory().clear();
    5. }
     
  3. Offline

    Joshuak52

  4. Offline

    PureGermanity

    Thanks Ill Check if it works

    Nope, I got a crash saying this http://hastebin.com/bixepeviko.rb

    I re-wrote the plugin with the link you gave me in Eclipse and it works, THANK YOU SO MUCH JOSHUAK52 (Sorry for the caps got excited)

    A Link to another Mod request of mine: http://forums.bukkit.org/threads/scoreboard-seconds-to-minutes.223199/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
  5. Offline

    DMMinecraft

    I am not developer but i can say that message on onDisable should be clear....is disabled and not enabled. And will this work for kick? Because i cant see it in the code. I need to use a plugin like this too so can you maybe make a permission because that way i can set permission for specific world and that is my sg world.
     
  6. Offline

    Joshuak52

    DMMinecraft just spelling erros I copied the onEnable and pasted it for disable lol sand yeah it works for the kick also and what kind of permission?
     
  7. Offline

    DMMinecraft

    Idk. Just add something like ci.clear and ci.buypass if someone have * for permissions so they can buuypass inv clear. You dont have to do this this is just a suggestion.
     

Share This Page