Bug fixes for animal vs splash potion protections.
This commit is contained in:
@@ -887,9 +887,8 @@ class EntityEventHandler implements Listener
|
||||
for(PotionEffect effect : effects)
|
||||
{
|
||||
PotionEffectType effectType = effect.getType();
|
||||
|
||||
//restrict some potions on claimed animals (griefers could use this to kill or steal animals over fences)
|
||||
if(effectType == PotionEffectType.JUMP || effectType == PotionEffectType.POISON)
|
||||
if(effectType.getName().equals("JUMP") || effectType.getName().equals("POISON"))
|
||||
{
|
||||
for(LivingEntity effected : event.getAffectedEntities())
|
||||
{
|
||||
@@ -903,6 +902,7 @@ class EntityEventHandler implements Listener
|
||||
if(claim.allowContainers(thrower) != null)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
GriefPrevention.sendMessage(thrower, TextMode.Err, Messages.NoDamageClaimedEntity, claim.getOwnerName());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -998,7 +998,6 @@ public class GriefPrevention extends JavaPlugin
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.TransferTopLevel);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user