Fix #34
This commit is contained in:
parent
1618da1083
commit
d0960911b8
@ -14,6 +14,7 @@ import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Trident;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||
@ -42,9 +43,12 @@ public class EngineCanCombatHappen extends Engine
|
||||
event.setCancelled(true);
|
||||
|
||||
Entity damager = event.getDamager();
|
||||
if ( ! (damager instanceof Arrow)) return;
|
||||
if (damager instanceof Arrow && !(damager instanceof Trident) )
|
||||
{
|
||||
damager.remove();
|
||||
}
|
||||
|
||||
|
||||
damager.remove();
|
||||
}
|
||||
|
||||
// mainly for flaming arrows; don't want allies or people in safe zones to be ignited even after damage event is cancelled
|
||||
@ -110,6 +114,7 @@ public class EngineCanCombatHappen extends Engine
|
||||
// ... fast evaluate if the attacker is overriding ...
|
||||
if (MUtil.isPlayer(eattacker))
|
||||
{
|
||||
|
||||
MPlayer mplayer = MPlayer.get(eattacker);
|
||||
if (mplayer != null && mplayer.isOverriding()) return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user