Fix: Horse protections can be entirely disabled.
Previously, horses were still protected from damage in land claims even when the config file said horses should not be protected.
This commit is contained in:
parent
c1de12fff1
commit
fa50376e46
|
|
@ -40,6 +40,7 @@ import org.bukkit.entity.Entity;
|
|||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Explosive;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Monster;
|
||||
|
|
@ -532,6 +533,9 @@ class EntityEventHandler implements Listener
|
|||
//monsters are never protected
|
||||
if(event.getEntity() instanceof Monster) return;
|
||||
|
||||
//horse protections can be disabled
|
||||
if(event.getEntity() instanceof Horse && !GriefPrevention.instance.config_claims_protectHorses) return;
|
||||
|
||||
//protect pets from environmental damage types which could be easily caused by griefers
|
||||
if(event.getEntity() instanceof Tameable && !GriefPrevention.instance.config_pvp_enabledWorlds.contains(event.getEntity().getWorld()))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user