Player resets on logout

Discussion in 'Archived: Plugin Requests' started by x2dot, Sep 29, 2012.

  1. Offline

    x2dot

    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?
     
  2. Offline

    np98765

    This would be really easy...

    Do you want their inventory deleted (including armor), or everything -- Hunger reset, XP gone, etc.
     
  3. Offline

    sharp237


    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? :mad: ", 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 :).
     
    filurp, exload and np98765 like this.
  4. Offline

    Muddr

    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..
     
  5. Offline

    nala3

    Mehh it would be easy even without doing that.
     
  6. Offline

    Musicguy

    I could do this simple task!
     
  7. Offline

    calebbfmv

    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. :p :D Arrogance at its finest!
     
  8. Offline

    np98765

    Fine, I see how it is. :p

    Let me tag jacklin213 because I think he started diving into the world of Java (although I may be wrong).
     
  9. Offline

    calebbfmv

    Good Idea.
    jacklin213
     
  10. Offline

    Kiakaha

    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.
     
  11. Offline

    x2dot

    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. =/
     
  12. Offline

    calebbfmv

    Dont worry, be HAPPY!
     
  13. Offline

    jacklin213

    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.
     
    Last edited by a moderator: May 29, 2016
  14. Offline

    calebbfmv

    Nice, not urgent, just a good idea for new people.
     
  15. Offline

    Royal_Soda

    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.
     
  16. Offline

    jacklin213

    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.
     
    Last edited by a moderator: May 29, 2016
  17. Offline

    Royal_Soda

    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());
    }
     
  18. Offline

    jacklin213

    y make it that complicated when u can do this
    Code:java
    1. @EventHandler
    2. public void onLoginEvent(PlayerLoginEvent event){
    3. Player p = event.getPlayer();
    4. PlayerInventory inventory = p.getInventory();
    5. inventory.clear();
    6. p.teleport(p.getWorld().getSpawnLocation());
    7. }


    nvm i c what i missed out thanks

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  19. Offline

    x2dot

    The name? Doesn't matter to me. Player Reset were the keywords when I tried to find a plugin that did this.
     
  20. Offline

    calebbfmv

    Nice job jacklin213! Proud of you man. Release it!

    Also, if anyone ever needs help, just tag meh!
     
  21. Offline

    jacklin213

    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.
     
    Last edited by a moderator: May 29, 2016
  22. Offline

    calebbfmv

    jacklin213
    Source Code?

    Just wanna nit-pick you to death :p
     
  23. Offline

    x2dot

    o.o, Wow, thanks! Cant wait till I can try it.
     
  24. Offline

    Musicguy

    We'll all be dead by the time that uploads to dev.
     
  25. Offline

    jacklin213

    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.
     
    Last edited by a moderator: May 29, 2016
  26. Offline

    calebbfmv

Share This Page