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
@Bodyash
What version of WorldGuard are you running?
@cnaude
No errors on start
Errors on death:
http://pastebin.com/FeZQhLJp
@smallpen
What is the specific version of WorldGuard you would like a build for?
@Bodyash
Can see your startup log? Are you seeing errors?
Latest ver. doesnt work for me (Spigot hack 1.7+1.8 and Protocollib hack)
@cnaude
Can you make version that not support worldguard 6.0 ? Because some plugin still not support worldguard 6.0 , and this issue "Don't restore when player is offline " been fixed is very awesome ! Please release another version !
Hello! Can I save only certain ID? I'll tried set to true this parameters "SingleItemDrops: true and SingleItemDropsOnly: true" and give player permissions scavenger.drop.1, but it's doesn't work. Any help, please.
Thanks a lot for the quick fix!
@Rescudo
Latest dev build should resolve this: http://h.cnaude.org:8081/job/Scavenger/23/
This doesn't seem to be working with the newest snapshots of WorldGuard. Players don't keep their inventory as expected, and I get exceptions in console whenever a player dies:
@laRoux87
What does your scavenger config.yml look like? Do your players have the scavenger.exp an savenger.level permission nodes? What version of CB are you running?
@cnaude
This hasn't been working for my players of late and I'm not sure why... Item recovery is still working but they are dropping their experience on all deaths. Any suggestions?
BUG: When TNT explodes and player dies, items are not restored, beacause it writes "Killed by another player" and I use DropOnPVPDeath: true
Hello,
thank you for this excellent plugin :) We use it for a long time but now I've found one problem when players lost their inventory because they were disconnected immediately after death. I believe that this problem is caused by another plugin or Bukkit, not by Scavenger, but I think you can resolve it by little modification, because Scavenger tries to restore inventory to a player even though he is offline. See this part of log:
[Scavenger] [DEBUG] Player: CraftPlayer{name=PlayerXXX}World: world DamageCause: ENTITY_ATTACK
[Scavenger] [DEBUG] [PlayerXXX]Checking for scavenger.scavenge or scavenger.scavenge.ENTITY_ATTACK
[Scavenger] [DEBUG] Adding: PlayerXXX
PlayerXXX was slain by Skeleton
[Scavenger] Player respawn PlayerXXX
[Scavenger] [DEBUG] Delayed restore for PlayerXXX
PlayerXXX lost connection: Internal Exception: java.nio.channels.CancelledKeyException
[Scavenger] [DEBUG] Getting: PlayerXXX
[Scavenger] [DEBUG] Enabling: PlayerXXX
[Scavenger] [DEBUG] Getting: PlayerXXX
[Scavenger] [DEBUG] Player PlayerXXX does NOT have scavenger.level permission.
[Scavenger] [DEBUG] Player PlayerXXX does NOT have scavenger.exp permission.
[Scavenger] [DEBUG] Removing: PlayerXXX
The problem is clear - player died, player was disconnected, Scavenger restored inventory, Scanvenger removed stored data. And when player is connected again he has empty inventory.
I downloaded source code and just added one condition into RestorationManager.restore():
public void restore(Player p)
{
if (!p.isOnline())
{
return;
}
...
and nowadays it works correctly :)
Please, could you check my solution and add checking of offline players by this or another way?
@cnaude
Maybe a permissions issue, there were no errors in the console. But no inventory restore either. Will retest to make sure. And thanks for checking.
@dangerousdale
I was unaware there was a problem with Scavenger and CraftBukkit 1.7.9. What exactly does not work? Are there errors on the console?
Edit: I just tested 1.5b with CraftBukkit 1.7.9 R0.2 and it worked without any issues.
Cant get this to work on 1.7.9 R2 including dev build 1.5b
Will you be updating this? Used to use this back in the days when you first released it, was always a trust worthy restore plugin.
@BladePlus
In he config.yml you can add world names to BlacklistedWorlds section. Or you can just use permissions to disable scavenger on individual worlds.
Is there a way to limit this from world to world?
Like I work for a server and we have 4 games in the server:
Minigames, PVP Survival, Safe Survival, and Creative
What we want to do is for the inventory on PVP and Safe to go with eachother but we want to prevent people taking things from creative to survival.
Thanks,
Blade.
@StaticBalls
No configuration needed. Simply use your favorite permissions plugin and give your players the following permissions.