Add shouldDie method, update zombie wrapper name
This commit is contained in:
parent
43f375fd86
commit
5e9f16424c
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user