Protected death loot doesn't take damage.
Previously, griefers could destroy it with fire or lava for example.
This commit is contained in:
1 parent
096c85ba9e
commit
ac68b95301
1 file changed
+9
@@ -574,6 +574,15 @@ public class EntityEventHandler implements Listener
|
||||
//horse protections can be disabled
|
||||
if(event.getEntity() instanceof Horse && !GriefPrevention.instance.config_claims_protectHorses) return;
|
||||
|
||||
//protected death loot can't be destroyed, only picked up or despawned due to expiration
|
||||
if(event.getEntityType() == EntityType.DROPPED_ITEM)
|
||||
{
|
||||
if(event.getEntity().hasMetadata("GP_ITEMOWNER"))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
//protect pets from environmental damage types which could be easily caused by griefers
|
||||
if(event.getEntity() instanceof Tameable && !GriefPrevention.instance.pvpRulesApply(event.getEntity().getWorld()))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user