Scavenger
About Scavenger
This is a continuation of the Scavenger plugin originally written by SirHedgehog. This plugin will automatically recover items for players after they die.
Features
- Automatic item recovery at death.
- Individual item recovery based on permissions if enabled.
- Automatic level and experience recovery at death.
- Supports SuperPerms
- Supports Vault based economies.
- Persistent recoveries. If the server is stopped before a player can recover inventory the inventory is saved to disk.
- Slot based recovery
How to install
Just drop the jar file in your plugins directory and restart your server. Configure permissions.
Links
Hooks
Scavenger hooks into several plugins to play nice with their inventory controls.
- Multiverse-Inventories
- MultiInv
- Mob Arena
- PVP Arean
- Ultimate Arena
- Battle Arena
- WorldInventories
- Minigames
- xInventories
Scavenger also hooks into Residence to provide item recovery override per residence.
Scavenger also hooks into Factions to provide item recovery override in enemy territory.
Scavenger optionally hooks into authentication plugins via Authenticator. Update the config.yml accordingly. More info here.
Dependencies
- To use an economy plugin you will need Vault and an economy plugin.
Permissions
- scavenger.scavenge - Enable item recovery
- scavenger.scavenge.damage_cause
- scavenger.level - Enable level recover
- scavenger.exp - Enable experience points recovery
- scavenger.free - Free item recovery
- scavenger.reload - Reload config
- scavenger.drop.[ITEM] - If SingleItemDrops is true then don't recover these items.
- scavenger.keep.[ITEM] - If SingleItemKeeps is true then only recover these items.
- scavenger.self.on - Allows players to enable item recovery for themselves.
- scavenger.self.off - Allows players to disable item recovery for themselves.
- scavenger.disable - Allows players to completely disable Scavenger.
- scavenger.enable - Allows players to completely enable Scavenger.
- scavenger.list - Allows player to list all pending recoveries. (Purely informational)
If you enabled slot based recovery you will need to give each player a permission node for each slot.
- Armour:
- scavenger.armour.X - Armour slots where X is 0, 1, 2, or 3.
- Armor: 0 = boots, 1 = leggings, 2 = chestplate, 3 = helmet
- scavenger.armour.X - Armour slots where X is 0, 1, 2, or 3.
- Inventory
- scavenger.inv.X - Inventory slots where X is 0 to 35.
- Inventory bar: 0 - 8
- Inventory row 1: 9 - 17
- Inventory row 2: 18 - 26
- Inventory row 3: 27 - 35
- scavenger.inv.X - Inventory slots where X is 0 to 35.
- Offhand (shield etc...)
- scavenger.offhand.1
FAQ
Q) How do I explicitly keep items?
A) Set SingleItemKeeps true. Then use scavenger.keep.[ITEM] to keep the ITEM.
Q) How do I explicitly drop items?
A) Set SingleItemDrops true. Then use scavenger.drop.[ITEM] to drop the ITEM.
Commands
- /scvr - Reload configuration
- /scvron - Self enable scavenger
- /scvroff - Self disable scavenger
- /scvrlist - List all pending recoveries
Videos
Configuration
Donations
Doge: DEaQKfC9ivumNgs3feo53xndhjhd4PV5Yk
BTC: 3Nthksfx8fNKkUgZnHWRTaH4MjUMe4dQG8
ETH: 0xf65cB1960e176ea980545f525f687cF2354D310d
XCH: xch1jgtw6vxyy4wv302xlhyuzwtfen67w5yrvcwc2gz2us3fwtjp3uxq6hlzhc
Love that plugin! Awsome work!
Thank you very much for your time and your support.
@HansenXD
This may occur when using /reload. Try doing a full restart.
@cnaude
Ok I think I may of fixed it but now players are getting their items back but it comes up saying 'error: Restoration already exists, ignoring'
@cnaude
Still not working, all the players have the right perms and they are still dropping items.
@HansenXD
This is probably a permissions issue. You can verify that the user in question has the correct permissions by running the pex list command.
/pex user [username] list
@cnaude
Sure, http://pastebin.com/nvQnjWbw
@HansenXD
Can you paste your entire Scavenger/config.yml to pastebin.com?
@cnaude
No nothing just drops their items, But the plugin it self works fine as if you are an op then you keep your items so that is the main reason why am really confused and thought it might be perms.
@HansenXD
I've never used factions. I'll test it and see what's going on. Do you get any errors when a player dies?
@Joxiscraft
Maybe.. :)
@Joxiscraft
Am using factions and I think that is why mine is not working would you mind trying to help me I have listed my config and perms below
@cnaude
Hey, I have scv as a premium feature and it is not working, could you please help here is my perms and config file.
Global:
Notify: false
Color: gold
TextColor: white
SingleItemDrops: false
SingleItemDropsOnly: false
Debug: false
Permissions: true
WorldGuardPVPIgnore: false
Premium:
default: false
permissions:
- modifyworld.*
- herochat.join.*
- herochat.leave.*
- herochat.speak.*
- herochat.autojoin.*
- herochat.color.*
- herochat.pm
- scavenger.scavenger
- scavenger.exp
- nocheatplus.checks.chat.color
- craftipedia.portablecrafting
- craftipedia.use
inheritance:
- null
prefix: '&a&a'
suffix: '&f'
@Joxiscraft
I've been wanted to add this for a while now. I could create a Residence flag that disables Scavenger. This could be very dangerous and/or fun.
@sleite
Please try the latest dev version. I added an option called ChanceToDrop. The default is 0 which means there is no chance of randomly dropping an item. If you set the number to 5 then that means there is a 1 in 5 chance an item will drop. Increasing the number decreases the chance of dropping an item. I recommend not setting the number to 1. ;)
I find that even with the ability to set the amount of money to pay when you die my players still abuse this plug-in. They just die on purpose because they don't mind paying the fee to get back to town quickly. I don't want to raise the fee because it's not fair to new players that are not doing anything wrong.
SUGGESTION: As one of the payment methods, is it possible to make it so that a player loses a random inventory slot (1-40, including armor and weapons). That way players will think twice before jumping in to lava just to get home quickly. They MIGHT lose that stack of diamonds, or that diamond breast plate.
Thanks for a great plug-in.
@cnaude
Oh thanks =) I did not think of that even.
@ryvix
Ok I see what is going on now. The SkyBlockMultiplayer is saving the inventory, not Scavenger. Scavenger has no effect in a SkyBlock world. This is easy to test. Just remove Scavenger.jar from your plugins directory and test SkyBlock. You will see that the inventory is still saved.
@cnaude
I do have them set like that. But in another world for that group I have the positive ones set. I'm not sure why it isn't working. All I can think is it has something to do with the multiple worlds in the group which causes it.
What I am trying to do is I am trying to set it so people in the group in a normal world get their inv and xp saved if they die. But in the SkyBlockMultiplayer world they don't get it saved. So in my skyblock world I have the negative permissions just like that but it still saves their inv.
@ThiagoROX
If you enable debug mode in the config.yml you can see exactly what is going on in you logs. Send me the output. Also I am really having a hard time trying to understand what you are talking about.
@ryvix
Negative permissions in PEX is easy. Just place a hyphen right in front of the permission to make it negative. See example below. I always edit the file directly and then do a "/pex reload".
I do all of my Scavenger testing with PEX.
I can't seem to figure out how to make it do negative permissions in PEX in a multi world situation as described here: https://github.com/PEXPlugins/PermissionsEx/wiki/Advanced-permissions-setup#wiki-pex-multiworld
I don't actually have the modifyworld plugin since I don't use any of its features and the only one I would use, the notify players when their rank changes doesn't seem to work on my test, only using the main PEX plugin. So not sure if that matters or not.
EDIT: Didn't mention I actually have put all negative nodes for scavenger in but they just don't seem to work for me.