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
@ZwPBerserk
It currently only supports blacklisting certain WG regions. I'll see if I can add a feature to whitelist WG regions.
@cnaude
Here you go I provided my start up log and within it I give the scenario which happens when a player dies.
http://dev.bukkit.org/paste/11381/
And here is my config along with the plugins I am using, thank you in advance for your help.
http://dev.bukkit.org/paste/11382/
Hi,
How can i enable NO item loss in certain worldguard regions? Or in a faction warzone?
@cnaude
This happen just randomly.
@sayoui
Does this happen every single time or just randomly?
In the beginning I can used plugin Scavenger with deleting inv1.ser but when I restart my server this is appear
ProtocolLib Build #72 BuildTools Build #23
[21:14:49] [Server thread/INFO]: [Scavenger] Enabling Scavenger v1.6-23 [21:14:49] [Server thread/INFO]: [Scavenger] Configuration loaded. [21:14:49] [Server thread/INFO]: [Scavenger] Economy disabled. Item recovery will be free. [21:14:49] [Server thread/ERROR]: Error occurred while enabling Scavenger v1.6-23 (Is it up to date?) java.lang.RuntimeException: An internal error occured. at com.comphenix.protocol.reflect.accessors.DefaultMethodAccessor.invoke(DefaultMethodAccessor.java:20) [?:?] at com.comphenix.protocol.utility.StreamSerializer.deserializeItemStack(StreamSerializer.java:111) [?:?] at com.comphenix.protocol.utility.StreamSerializer.deserializeItemStack(StreamSerializer.java:236) [?:?] at com.cnaude.scavenger.RestorationManager.load(RestorationManager.java:121) [?:?] at com.cnaude.scavenger.RestorationManager.<init>(RestorationManager.java:36) [?:?] at com.cnaude.scavenger.Scavenger.onEnable(Scavenger.java:77) [?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) [spigot.jar:git-Spigot-c46583f-66f6bfd] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335) [spigot.jar:git-Spigot-c46583f-66f6bfd] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-c46583f-66f6bfd] at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.java:355) [spigot.jar:git-Spigot-c46583f-66f6bfd] at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.java:315) [spigot.jar:git-Spigot-c46583f-66f6bfd] at net.minecraft.server.v1_8_R1.MinecraftServer.q(MinecraftServer.java:402) [spigot.jar:git-Spigot-c46583f-66f6bfd] at net.minecraft.server.v1_8_R1.MinecraftServer.k(MinecraftServer.java:370) [spigot.jar:git-Spigot-c46583f-66f6bfd] at net.minecraft.server.v1_8_R1.MinecraftServer.a(MinecraftServer.java:325) [spigot.jar:git-Spigot-c46583f-66f6bfd] at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:211) [spigot.jar:git-Spigot-c46583f-66f6bfd] at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:494) [spigot.jar:git-Spigot-c46583f-66f6bfd] at java.lang.Thread.run(Unknown Source) [?:1.8.0_05] Caused by: java.io.IOException: Root tag must be a named compound tag at net.minecraft.server.v1_8_R1.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:62) [spigot.jar:git-Spigot-c46583f-66f6bfd] at net.minecraft.server.v1_8_R1.PacketDataSerializer.h(PacketDataSerializer.java:161) [spigot.jar:git-Spigot-c46583f-66f6bfd] at net.minecraft.server.v1_8_R1.PacketDataSerializer.i(PacketDataSerializer.java:196) [spigot.jar:git-Spigot-c46583f-66f6bfd] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.8.0_05] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [?:1.8.0_05] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [?:1.8.0_05] at java.lang.reflect.Method.invoke(Unknown Source) [?:1.8.0_05] at com.comphenix.protocol.reflect.accessors.DefaultMethodAccessor.invoke(DefaultMethodAccessor.java:16) [?:?] ... 16 more
@Jahb57
Please post your server startup log as well as Scavenger config.yml. Are there any messages displayed in game when a player dies? What other plugins are you running?
@cnaude
Yes thats the very one I am using and I have tried with both the latest scavenger build on bukkit dev and on your jenkins. I have tried deleting that file and it seems to have not changed anything. All other plugins which rely on protocolLib are running fine.
@Jahb57
Are you running the latest ProtocolLib? I just tested build 72 and it worked with Scavenger 1.6-23 and Spigot-081dfa5-7658819. You can also try deleting the inv1.ser file while the server is down.
http://ci.shadowvolt.com/job/ProtocolLib/72/
@cnaude
Sorry for the very late reply it was the holidays and im back but im using the latest protocollib and the plugin still does not seem to work.
http://dev.bukkit.org/paste/11265/
Only thing i could find in my console related to scavenger
@cnaude
Thanks can you add MyPet support for example pets inventories also drop if a player cannot afford item restoration http://dev.bukkit.org/bukkit-plugins/mypet/
@Jahb57
Yes. Just make sure you are using a version of ProtovolLib for 1.8.
Does this work with the latest 1.8 spigot builds?
Sorry don't read my past post, I find a plugin that makes what I need with absolutely nothing to configure and libs to download *o* . Your plugin is better and awesome but is too complicated for a noob like me :P
Excuse me, I don't undertand the englush perfectly. About enable the slot based recovery I have to do theeach player permission? or I have to do something to enable this function? I try to save only the items in the hotbar and the armor but I don't manage to do it X_X
I put this in bpermissions on the normal users group, doesn't work in this way? I have do this only one by one? or I missing something? - scavenger.scavenge - scavenger.free - scavenger.armour.0 - scavenger.armour.1 - scavenger.armour.2 - scavenger.armour.3 - scavenger.inv.0 - scavenger.inv.1 - scavenger.inv.2 - scavenger.inv.3 - scavenger.inv.4 - scavenger.inv.5 - scavenger.inv.6 - scavenger.inv.7 - scavenger.inv.9
My configuration is this: Global: Notify: true Color: gold TextColor: white SingleItemDrops: true SingleItemDropsOnly: false Debug: false Permissions: true OpsAllPerms: true WorldGuardPVPIgnore: false WorldGuardPVPOnly: false FactionEnemyDrops: false DungeonMaze: false OfflineMode: false Residence: false ResidenceFlag: noscv LanguageFile: english.yml DropOnPVPDeath: false SlotBasedRecovery: false RestoreDelayTicks: 10
Please help me, I almost finish my server configuration. Thanks!
Hi, I can't disable item recovery for OPs, i set the permission scavenger.free and scavenger.scavenge to false in the specific world but the inventory won't drop.
In the config.yml I have
Permissions: true
OpsAllPerms: false
Also I put the worlds in the blacklistet-worlds list.
The command /scvroff also does not work, the inventory is still saved.
I'm running worldguard 5.9 and Scavenger 1.5a on a 1.7.9 server. There are no errors in the log and the debug mode says:
[Scavenger] [DEBUG] Player: CraftPlayer{name=x}World: world DamageCause: FIRE_TICK
[Scavenger] Player respawn x
[Scavenger] [DEBUG] Delayed restore for x
[Scavenger] [DEBUG] Player x has NO restore. Nothing to restore.
I also tested to set scavenger.dropinv and scavenger.droparmour to true but the Inventory is still saved.
Please help me disabling item recovery for OPs.
@smallpen
Try 1.7 from here. It's built for worldguard 5.9. http://cnaude.org/minecraft/
@cnaude
I use worldguard 5.9.1 ! I try to use Scavenger 1.6.28 , but it didn't work with worldguard 5.9.1 !
I use this version (http://cnaude.org/minecraft/) with worldguard 5.9.1 , and it work very well !
@cnaude
5.9.1 build
@smallpen
@Bodyash
Please try the version from here: http://cnaude.org/minecraft/