Inventory Drop Chance
Inventory Drop Chance
Version: v1.6
(Follow me on Twitter for updates!)
Inventory Drop Chance is a plugin created by Staartvin from a request by DerekZil.
Do you want to your server to be a little more RPG-ish? Are people frustrated by losing items on death?
Well, then Inventory Drop Chance (IDC for short) is something for you! IDC allows admins to set a percentage of retained items on death. The retain percentage is configurable. When a player dies, x% of his/her inventory will be given back. The items that are not given back are dropped on the ground. All items get chosen randomly. This is to prevent players from cheating. You can also specify a delete percentage. IDC will then remove a percentage of the inventory (Those items aren't dropped nor given back). IDC also has custom WorldGuard flags that can be used. These flags are: 'xploss-percentage', 'retain-percentage' and 'delete-percentage'. You can also setup blacklisted or whitelist items. In short, this plugin is super customisable.
Features:
- Can give players x% of their dropped items back.
- Can delete a percentage of their inventory on death.
- Very lightweight
- Extremely simple
- Drop and play
- Permissions
- Multiworld support
- Group based (Example: Give a donor rank 20% loss, but a noob group 100% loss)
- WorldGuard integration (Custom flags 'retain-percentage' and 'delete-percentage')
- Whitelist and blacklists (Some items will always be dropped, some are always kept)
- Automatic version checking
Permissions:
- - idc.group.<groupname> A player with this permission is bound to a group. All percentages are based on a group. If a player hasn't got this permission, it will lose all their xp and items. Just like vanilla Minecraft.
- -idc.keepallitems A player with this permission will retain all of his items when (s)he dies.
- -idc.keepxp A player with this permission will keep all their xp.
- -idc.noticeonupdate A player with this permission will get noticed when a new version of IDC is available.
Commands:
- None yet
Pictures:
Messages shown when a player respawns
Donations
I'm a poor student and I'm developing this plugin in my free-time, if you like my plugin and want to help me, please donate. Donating is the best way to help me out, it goes towards more bug-fixing. Thanks! Donate is in the top right corner. ;)
Donators
Thanks to all the people who donated and downloaded this plugin! I love you all! <3 Especially thanks to my donators who gave me that little boost:
- WayGroovy with 5 dollars
- RsmKaelub with 10 dollars
- deathhzone with 5 dollars
Hey Staartvin,
I haven't posted here in a while and I wanted to give you a quick feedback update.
So far everything is going great and working smooth, except for 1 issue.
When running my server for a while, IDC seems to get a little quirky. I'm not sure when/how it happens, but without any notification in the console, on a players death they receive exp rather than lose it (not to mention the exp they dropped is still there).
Current MC: 1.5.2 Current IDC: 1.4.3
Will updating resolve this? Or should I attempt to replicate with a video?
Either way, keep up the great work! This is a defining plugin for my server to run as an RPG. I don't know what I'd do without it!
@shadvalentine
Hopefully this week.
@Staartvin
not trying to rush .. but do you have an eta on the fix?
@Al3XKOoL
It's a known error. I'm working on fixing it.
I get this error
@shadvalentine
Thanks. I'll fix it.
@JvS15NL
Any errors?
@Staartvin
found the error .. for some reason it was being filtered out ..
2013-09-15 10:24:24 [SEVERE] Could not pass event PlayerRespawnEvent to InventoryDropChance v1.5
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:36)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at net.minecraft.server.v1_6_R2.PlayerList.moveToWorld(PlayerList.java:425)
at net.minecraft.server.v1_6_R2.PlayerList.moveToWorld(PlayerList.java:382)
at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:1144)
at net.minecraft.server.v1_6_R2.Packet205ClientCommand.handle(SourceFile:30)
at net.minecraft.server.v1_6_R2.NetworkManager.b(NetworkManager.java:296)
at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:116)
at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37)
at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:590)
at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226)
at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486)
at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419)
at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
Caused by: java.lang.IllegalArgumentException: Item cannot be null
at org.apache.commons.lang.Validate.noNullElements(Validate.java:410)
at org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventory.addItem(CraftInventory.java:268)
at staartvin.inventorydropchance.Methods.returnItems(Methods.java:191)
at staartvin.inventorydropchance.listeners.IDCListeners.onPlayerRespawn(IDCListeners.java:184)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
... 17 more
Doesn't load in my plugin folder, restarted the server and reloaded
@tifel100
Set the default values in the config to 0.
@shadvalentine
It doesn't include an error line :( I can't fix it if it doesn't include an error line.
I put the permission "- idc.keepallitems" on my default rank to see if it would work, but it didn't keep all the items, it just read the Default group and kept 50% and lost 50%. How Can I make it so Defaults Keep all their items but lose their xp? :l
Edit: Also, I tried changing the default group to make it retain 100% of the items, but the player still drops his items...
Edit2: Ok I don't know how to get this plugin to work, I remove the disabled worlds that it automatically disabled, and then it redisabled them.. I don't get it!
that is all that shows up in the console
@shadvalentine
Can you give me the whole error?
[INFO] shadvalentine issued server command: /slay
8:00:25 PM CONSOLE: [INFO] shadvalentine died
8:00:27 PM CONSOLE: [SEVERE] Could not pass event PlayerRespawnEvent to InventoryDropChance v1.5
8:00:27 PM CONSOLE: java.lang.IllegalArgumentException: Item cannot be null
@Staartvin
I am using Inventory Drop Chance v1.5 . I haven't enchant something before died
@lanceryy
Are you using 1.5? If so, did you just enchant something before you died?
BUG!
When player die at 5 lv .then respawn can get 31LV !!! wowo. please fix it . my config:
@Staartvin
thank you for for your help. ^_^
@lanceryy
Thanks, I'll fix it.