mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-23 11:06:14 +01:00
Snowmen no longer melt. Thanks to ACStache.
This commit is contained in:
parent
7ad0964f3d
commit
08b19e7b8e
BIN
MobArena.jar
BIN
MobArena.jar
Binary file not shown.
@ -18,6 +18,7 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Projectile;
|
||||
import org.bukkit.entity.Slime;
|
||||
import org.bukkit.entity.Snowman;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.entity.ThrownPotion;
|
||||
import org.bukkit.entity.Wolf;
|
||||
@ -45,6 +46,7 @@ import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||
import org.bukkit.event.entity.PotionSplashEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
|
||||
import org.bukkit.event.entity.EntityTargetEvent.TargetReason;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
@ -448,6 +450,10 @@ public class ArenaListener
|
||||
else if (damagee instanceof Player) {
|
||||
onPlayerDamage(event, (Player) damagee, damager);
|
||||
}
|
||||
// Snowman
|
||||
else if (damagee instanceof Snowman && event.getCause() == DamageCause.MELTING) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
// Boss
|
||||
else if (monsters.getBossMonsters().contains(damagee)) {
|
||||
onBossDamage(event, (LivingEntity) damagee, damager);
|
||||
|
Loading…
Reference in New Issue
Block a user