From 5e9f16424cc43d1a326f5b41294dedf52fc5f2f0 Mon Sep 17 00:00:00 2001 From: Thanos Paravantis Date: Tue, 28 Jun 2016 20:38:32 +0300 Subject: [PATCH] Add shouldDie method, update zombie wrapper name --- .../game/games/mineware/challenge/Challenge.java | 16 +++++++++++----- .../mineware/challenge/other/ZombieWrapper.java | 8 ++++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/challenge/Challenge.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/challenge/Challenge.java index a3c790675..9fedab233 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/challenge/Challenge.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/challenge/Challenge.java @@ -107,7 +107,6 @@ public abstract class Challenge implements Listener */ public void onStart() { - } /** @@ -115,7 +114,11 @@ public abstract class Challenge implements Listener */ public void onEnd() { + } + protected boolean shouldDie(Player player) + { + return true; } public void start() @@ -230,11 +233,14 @@ public abstract class Challenge implements Listener Player player = event.getEntity(); - Location death = player.getLocation().clone(); - Data.addLostPlayer(player); + if (shouldDie(player)) + { + Location death = player.getLocation().clone(); + Data.addLostPlayer(player); - Host.getDeathEffect().playDeath(player, death); - handleDeath(player); + Host.getDeathEffect().playDeath(player, death); + handleDeath(player); + } } private void handleDeath(Player player) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/challenge/other/ZombieWrapper.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/challenge/other/ZombieWrapper.java index 5d5a2d37d..5e7e30c7f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/challenge/other/ZombieWrapper.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/challenge/other/ZombieWrapper.java @@ -38,7 +38,7 @@ public class ZombieWrapper UtilEnt.Vegetate(_wrapper); UtilEnt.ghost(_wrapper, true, false); - _wrapper.setCustomName(C.Bold + C.cRed + "Infected Zombie"); + _wrapper.setCustomName(C.cRedB + "Infected Zombie"); _wrapper.setCustomNameVisible(true); return _wrapper; @@ -54,7 +54,7 @@ public class ZombieWrapper { _wrapper.setFireTicks(0); } - + public Location getLocation() { return _wrapper.getLocation().clone(); @@ -109,12 +109,12 @@ public class ZombieWrapper { return _speed; } - + public void setTarget(Player target) { _wrapper.setTarget(target); } - + public Player getTarget() { return (Player) _wrapper.getTarget();