From bd63ff84e7e2b8c8dd7297ec79abee2d7ff9e872 Mon Sep 17 00:00:00 2001 From: Thanos paravantis Date: Fri, 1 Jan 2016 15:30:16 +0200 Subject: [PATCH] Add missing DeathEffectData and DeathText. --- .../mineware/effect/DeathEffectData.java | 75 +++++++++++++++++++ .../game/games/mineware/effect/DeathText.java | 18 +++++ 2 files changed, 93 insertions(+) create mode 100644 Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/effect/DeathEffectData.java create mode 100644 Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/effect/DeathText.java diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/effect/DeathEffectData.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/effect/DeathEffectData.java new file mode 100644 index 000000000..0c2e851ae --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/effect/DeathEffectData.java @@ -0,0 +1,75 @@ +package nautilus.game.arcade.game.games.mineware.effect; + +import java.util.ArrayList; + +import org.bukkit.Location; +import org.bukkit.entity.ArmorStand; +import org.bukkit.entity.Item; +import org.bukkit.entity.Player; + +import mineplex.core.hologram.Hologram; + +public class DeathEffectData +{ + private Player _player; + private Location _death; + private ArrayList _foodItems = new ArrayList(); + private ArmorStand _chickenHead; + private Hologram _hologram; + + public DeathEffectData(Player player, Location death) + { + _player = player; + _death = death; + } + + public void addFoodItems(ArrayList foodItems) + { + _foodItems = foodItems; + } + + public boolean hasDroppedFoodItems() + { + return !_foodItems.isEmpty(); + } + + public void setChickenHead(ArmorStand chickenHead) + { + _chickenHead = chickenHead; + } + + public boolean hasFinished() + { + return _foodItems.isEmpty() && _chickenHead.isDead(); + } + + public void setHologram(Hologram hologram) + { + _hologram = hologram; + } + + public Player getPlayer() + { + return _player; + } + + public Location getLocation() + { + return _death; + } + + public ArrayList getFoodItems() + { + return _foodItems; + } + + public ArmorStand getChickenHead() + { + return _chickenHead; + } + + public Hologram getHologram() + { + return _hologram; + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/effect/DeathText.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/effect/DeathText.java new file mode 100644 index 000000000..4a1b350b1 --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/effect/DeathText.java @@ -0,0 +1,18 @@ +package nautilus.game.arcade.game.games.mineware.effect; + +import mineplex.core.common.util.UtilMath; + +public class DeathText +{ + private String[] _text = { + "Nom nom nom!", + "Bawk Bawk!", + "Delicious Meal!", + "Nom nom, bawk!" + }; + + public String getRandom() + { + return UtilMath.randomElement(_text); + } +}