[INACTIVE][MECH] NoDrop v0.2.3 - Control User Drops on Death [602-617]

Discussion in 'Inactive/Unsupported Plugins' started by Alex Nolan, Mar 14, 2011.

  1. Offline

    Alex Nolan

    NoDrop 0.2.3

    Download 0.2.3 [602-617] (4/2/11) | Static jar
    Older: 0.2.2 [527-556] (3/22/11), 0.2.1 [526-531] (3/16/11), 0.2.0 [526-531] (3/15/11), 0.1.0 [554] (3/14/11)

    Souce Code (Will be up shortly)


    This plugin came about from a request to keep OPs from dropping items on death to keep from ruining economies, etc, so I decided to take up the challenge. So far it is just very basic: If you are and OP two things will happen - one, you will not drop any items for others to pick up, and two, you will get your items back after you respawn. Plans for the near future include permissions along with a settings file to control both aspects.​

    Features
    1. Don't drop items on death for others to pick up
    2. Keep items after death
    3. Very customizable
    4. More coming soon.... (Please suggest some too)
    Commands

    Code:
    None planned?
    Settings (If you don't like permissions)
    Code:
    #options are 'all', 'ops', or 'not ops', select who you want the plugin to effect
    useFor: 'all'
    
    #use either drop or nodrop (only one), nodrop selects what you don't want dropping, drop selects what you do want dropping
    #custom words: 'helmet', 'boots', 'chestplate', 'leggings', 'equipped armor', 'held item', 'all'
    drop:
        - 41
        - 266
        - 'helmet'
    
    #what items should be kept on death
    keep:
        - 'held item'
        - 'equipped armor'
    Permissions
    Code:
    None so far :D
    Todo


    Changelog
    • 0.2.3
      • Updated for [602-617]
    • 0.2.2
      • Fixed old inventory bug
    • 0.2.1
      • Fixed settings, 'all' now works
    • 0.2
      • Fixed a major bug that would crash the client
      • Implemented settings :)
    • 0.1
      • Initial Build
     
    Unset likes this.
  2. Offline

    dak393

    been waiting for this hope you get it working correctly. Your sig link for this page is broken btw. Some suggestions would be a configuration on what items don't drop ex: (I don't want lightstone dropping). Also latter it would be great if you could prevent stacks of -1 (infinite stacks) and stacks of certain items over the normal amount (as in stacks of signs and stacks over 64) from dropping. Watching this thread hope to see some great progress :D
     
  3. Offline

    OrtwinS

    Oh yes, I will be watching this closely.

    Tip: I see this is for 554, might it be a good idea to stick with recommended builds? I"m using 531 for now to provide continuity for my users. Or at least keep a list of downloads with versions compatible with, say... the last 3 recommended builds?
     
  4. Offline

    Ganontc

    How do I make it for all players? Not only for OP's
     
  5. Offline

    Adam Bilbaeno

    I run a PvP server in which a set amount of items are given to a player during a fight.
    I would love for none of these items to drop when they die, not just for OPs.

    A list of item ids that can't be dropped on death would be fantastic as well.

    Something along the lines of
    /nodrop <item #> on
    /no drop <item #> off

    would be absolutely fantastic!
     
  6. Offline

    Achilles

    This is a really nice concept, I'm excited for this.
     
  7. Offline

    Nat Ryall

    I'd also like to allow this for everyone, rather than just OPs. Perfect plugin though, nice one!
     
  8. Offline

    Draugr

    I'd like to see an option to setup custom drop/no drop scripts or rules.

    For example on my server I'd like to see all players upon death will....

    1. Drop ALL or 1/2 of their Unequipped Inventory
    2. Retain all Equipped items (Armor, wielded item/weapon, etc...)
    3. All equip in chests at home, etc... are left untouched which is probably already the case.

    Thanks,
    John
     
  9. Offline

    Alex Nolan

    Thanks everyone :D. I've just implemented some of your ideas and the other suggestions sound good too :). Please let me know how everything works out plus how intuitive everything is and how things can be improved.
     
  10. Offline

    dak393

    I've been telling this to other devs lately too, you should add your plugin to CraftBukkitUpToDate and make your latest release a static jar (Easy way to do this for free is use dropbox)
    EDIT: didn't notice your static jar allready implemented :D Great work on this too you do amazing coding very fast.
     
  11. Offline

    Volume

    help, error -> "[NODROP] The settings file isn't properly set up. Please set it up before using the plugin. The plugin will be disabled until you do"
     
  12. You must copy the settings from the thread in the plugins/NoDrop/config.yml file.

    You should really make it generate right, plugin author :p


    EDIT: this configuration doesn't 100% work:
    Code:
    #options are 'all', 'ops', or 'not ops', select who you want the plugin to effect
    useFor: 'all'
    
    #use either drop or nodrop (only one), nodrop selects what you don't want dropping, drop selects what you do want dropping
    #custom words: 'helmet', 'boots', 'chestplate', 'leggings', 'equipped armor', 'held item', 'all'
    nodrop:
        - 'all'
    
    #what items should be kept on death
    keep:
        - 'all'
    
    Keep all doesn't work, I don't get any items back :/
     
  13. Offline

    Volume

    All delete after death =(
     
  14. Offline

    DiddiZ

    Sounds nice.
    Can you implement a percentage drop chance, like a player dies and drops 10% of the in the inventory?
    Would be great for PVP (and player moaning around "I lost my whole inventar, I hate you")
     
  15. Offline

    Alex Nolan

    Thank you, in my haste I sort of skipped that setting xD, it's fixed now though. About the settings file, I feel like if I put settings in the file people may get a behavior that they don't want/might never see that they can change the settings, but I guess I probably should...
    Sounds easy enough, I'll have it ready in my next release :D
     
    Good_ok likes this.
  16. Offline

    leslieliang

    May I suggest something? An option to turn on or off NoDrop. I run a survival server and am always scared of ruining my economy, but I also want to battle. If I battle someone, I won't drop anything and it would be kinda lame. So there should be a command like "/nd on" and "/nd off".
     
  17. Offline

    Adam Bilbaeno

    I too would love to see a feature like this
    If I could configure this mod so that theres a percentage you will drop one of your usable items (armor, weapons, clock, etc) or valuable resources it would make a lot of people happy.
     
  18. Offline

    DiddiZ

    Yehaa, i can't await this [​IMG]
    It will revive my pvp server [​IMG]
     
  19. Offline

    nmcnick

    very nice, only idea is, maybe you could make it so even if they dont have something in their inventory, they drop it?
    For getting a currency when you kill someone, or something like that.
     
  20. Offline

    Narodigg

    Server Version:
    Code:
    20:59:10 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-516-
    gdf87bb3-b531jnks (MC: 1.3)
    This is my \plugins\NoDrop\config.yml
    Code:
    #options are 'all', 'ops', or 'not ops', select who you want the plugin to effect
    useFor: 'all'
    
    #use either drop or nodrop (only one), nodrop selects what you don't want dropping, drop selects what you do want dropping
    #custom words: 'helmet', 'boots', 'chestplate', 'leggings', 'equipped armor', 'held item', 'all'
    nodrop:
    
    #what items should be kept on death
    keep:
        - 'all'
    ---I have even tried
    Code:
    #options are 'all', 'ops', or 'not ops', select who you want the plugin to effect
    useFor: 'all'
    
    #use either drop or nodrop (only one), nodrop selects what you don't want dropping, drop selects what you do want dropping
    #custom words: 'helmet', 'boots', 'chestplate', 'leggings', 'equipped armor', 'held item', 'all'
    nodrop:
        - 'all'
    
    #what items should be kept on death
    #keep:
    #    - 'all'
    When I die, I loose all of my inventory, its not even on the ground to pick back up.

    My aim is that users keep all of their inventory on them. As a replacement to deadmans chest in hmod that places your items in a chest where you died.

    Please help
     
  21. Offline

    Alex Nolan

    Hmm, from what i can see why the first one doesn't work is because you are saying don't not drop anything, a double negative leading everything to be dropped and there for you do not get it back after you die. With the second one I think you accidentally commented out the 'all'. Try this and see if it works:
    Code:
    #options are 'all', 'ops', or 'not ops', select who you want the plugin to effect
    useFor: 'all'
    
    #use either drop or nodrop (only one), nodrop selects what you don't want dropping, drop selects what you do want dropping
    #custom words: 'helmet', 'boots', 'chestplate', 'leggings', 'equipped armor', 'held item', 'all'
    nodrop:
        - 'all'
    
    #what items should be kept on death
    keep:
        - 'all'
    Well I could do this, but that sort of varies from what the original intent of this plugin was. I think there are some plugins like your description though that you can use in tandem with NoDrop.
     
  22. Offline

    PatrickFreed

    This is a life saver
     
  23. Offline

    Alex Nolan

    Glad you like it :D
     
  24. Offline

    Narodigg

    Well doesn't work as the plugin error on load at keep: being commented out with the -'all' no commented out.
    Do you want keep un-commented or the -'all' commented?

    Once you sort that out for me, if it still doesn't work.
    I will play process of elimination with my other plugins to see if they are causing conflict.

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

    Alex Nolan

    My bad, yes the keep needs to be un-commented as well OTL. I read too quickly, so it should actually be:
    Code:
    #options are 'all', 'ops', or 'not ops', select who you want the plugin to effect
    useFor: 'all'
    
    #use either drop or nodrop (only one), nodrop selects what you don't want dropping, drop selects what you do want dropping
    #custom words: 'helmet', 'boots', 'chestplate', 'leggings', 'equipped armor', 'held item', 'all'
    nodrop:
        - 'all'
    
    #what items should be kept on death
    keep:
        - 'all'
     
  26. Offline

    Narodigg

    Ok, this is the only plugin running. Other plugins have worked great but here I still come up with empty inventory and no items to pick up from the ground.

    Code:
    21:39:42 [INFO] Starting minecraft server version Beta 1.3
    21:39:42 [INFO] Loading properties
    21:39:42 [INFO] Starting Minecraft server on *:2120
    21:39:42 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-516-
    gdf87bb3-b531jnks (MC: 1.3)
    21:39:42 [INFO] Preparing level "world"
    21:39:42 [INFO] Preparing start region
    21:39:43 [INFO] [NoDrop] 0.2.0 is enabled!
    21:39:43 [INFO] Done (0.075s)! For help, type "help" or "?"
    /plugins/NoDrop/config.yml
    Code:
    #options are 'all', 'ops', or 'not ops', select who you want the plugin to effect
    useFor: 'all'
    
    #use either drop or nodrop (only one), nodrop selects what you don't want dropping, drop selects what you do want dropping
    #custom words: 'helmet', 'boots', 'chestplate', 'leggings', 'equipped armor', 'held item', 'all'
    nodrop:
        -'all'
    
    #what items should be kept on death
    keep:
        -'all'
     
  27. Offline

    Alex Nolan

    Oh, I see your problem, you are running v0.2 which I mistakenly left the 'all' option out of. I have since then made version 0.2.1 which should work for you.
     
  28. Offline

    Narodigg

    Issues resolved, I must speak to the extra effort Alex put in to resolve this issue.

    Thank you sir! [​IMG][​IMG]
     
  29. Offline

    cheepz

    Thank you SO much. This helps me TREMENDOUSLY.

    I found a very very slight problem.

    When an op types /kill this will appear.

    2011-03-16 23:21:05 [SEVERE] Could not pass event ENTITY_DEATH to NoDrop
    java.lang.NullPointerException
    at com.msm595.NoDrop.NoDrop.armors(NoDrop.java:129)
    at com.msm595.NoDrop.NDEntityListener.onEntityDeath(NDEntityListener.java:47)
    at org.bukkit.plugin.java.JavaPluginLoader$39.execute(JavaPluginLoader.java:324)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
    at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:111)
    at net.minecraft.server.EntityLiving.a(EntityLiving.java:393)
    at net.minecraft.server.EntityHuman.a(EntityHuman.java:378)
    at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:137)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:637)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:582)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:576)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)

    Otherwise, everything is perfectly fine I believe.

    Like I said, very slight minor problem, I'm just pointing this out for you.

    :)

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

    dak393

    In the next release could you add in some more custom words like 'all weapons' 'on hand' (slots 0-8)
     

Share This Page