From ff8542c80ab625d39a5397b3f07ed891f6d9a940 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 21 Jul 2013 15:14:40 +1200 Subject: [PATCH] Use Disguise instead of entity id in watcher --- .../disguise/DisguiseTypes/Watchers/AgeableWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/ArrowWatcher.java | 5 +++-- .../disguise/DisguiseTypes/Watchers/BatWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/BlazeWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/BoatWatcher.java | 5 +++-- .../disguise/DisguiseTypes/Watchers/ChickenWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/CowWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/CreeperWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/DroppedItemWatcher.java | 5 +++-- .../disguise/DisguiseTypes/Watchers/EnderDragonWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/EndermanWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/GhastWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/HorseWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/ItemFrameWatcher.java | 5 +++-- .../disguise/DisguiseTypes/Watchers/LivingWatcher.java | 6 +++--- .../disguise/DisguiseTypes/Watchers/MagmaCubeWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/MinecartWatcher.java | 5 +++-- .../disguise/DisguiseTypes/Watchers/MushroomCowWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/OcelotWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/PigWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/PigZombieWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/PlayerWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/SheepWatcher.java | 5 +++-- .../disguise/DisguiseTypes/Watchers/SkeletonWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/SlimeWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/VillagerWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/WitherWatcher.java | 6 ++++-- .../disguise/DisguiseTypes/Watchers/WolfWatcher.java | 5 +++-- .../disguise/DisguiseTypes/Watchers/ZombieWatcher.java | 6 ++++-- 29 files changed, 108 insertions(+), 59 deletions(-) diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/AgeableWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/AgeableWatcher.java index f4377c28..1f28c575 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/AgeableWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/AgeableWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public abstract class AgeableWatcher extends LivingWatcher { - public AgeableWatcher(int entityId) { - super(entityId); + public AgeableWatcher(Disguise disguise) { + super(disguise); } public boolean isAdult() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ArrowWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ArrowWatcher.java index 4c93e92c..68cc84fc 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ArrowWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ArrowWatcher.java @@ -1,11 +1,12 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; import me.libraryaddict.disguise.DisguiseTypes.FlagWatcher; public class ArrowWatcher extends FlagWatcher { - public ArrowWatcher(int entityId) { - super(entityId); + public ArrowWatcher(Disguise disguise) { + super(disguise); setValue(16, (byte) 0); } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/BatWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/BatWatcher.java index 045fa2e1..4c2a6318 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/BatWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/BatWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class BatWatcher extends LivingWatcher { - public BatWatcher(int entityId) { - super(entityId); + public BatWatcher(Disguise disguise) { + super(disguise); } public boolean isFlying() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/BlazeWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/BlazeWatcher.java index 89d90166..bec7d583 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/BlazeWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/BlazeWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class BlazeWatcher extends LivingWatcher { - public BlazeWatcher(int entityId) { - super(entityId); + public BlazeWatcher(Disguise disguise) { + super(disguise); } public boolean isBlazing() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/BoatWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/BoatWatcher.java index 7a60f431..b0884ccc 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/BoatWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/BoatWatcher.java @@ -1,11 +1,12 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; import me.libraryaddict.disguise.DisguiseTypes.FlagWatcher; public class BoatWatcher extends FlagWatcher { - public BoatWatcher(int entityId) { - super(entityId); + public BoatWatcher(Disguise disguise) { + super(disguise); } public int getDamage() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ChickenWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ChickenWatcher.java index 8ee4b4de..592b9021 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ChickenWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ChickenWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class ChickenWatcher extends AgeableWatcher { - public ChickenWatcher(int entityId) { - super(entityId); + public ChickenWatcher(Disguise disguise) { + super(disguise); } } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/CowWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/CowWatcher.java index 036fb88a..249a9b11 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/CowWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/CowWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class CowWatcher extends AgeableWatcher { - public CowWatcher(int entityId) { - super(entityId); + public CowWatcher(Disguise disguise) { + super(disguise); } } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/CreeperWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/CreeperWatcher.java index 8fad1b2f..fe6b73dd 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/CreeperWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/CreeperWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class CreeperWatcher extends LivingWatcher { - public CreeperWatcher(int entityId) { - super(entityId); + public CreeperWatcher(Disguise disguise) { + super(disguise); } public boolean isFused() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/DroppedItemWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/DroppedItemWatcher.java index 4dde97aa..acbbb61a 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/DroppedItemWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/DroppedItemWatcher.java @@ -3,12 +3,13 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack; import org.bukkit.inventory.ItemStack; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; import me.libraryaddict.disguise.DisguiseTypes.FlagWatcher; public class DroppedItemWatcher extends FlagWatcher { - public DroppedItemWatcher(int entityId) { - super(entityId); + public DroppedItemWatcher(Disguise disguise) { + super(disguise); } public ItemStack getItemStack() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/EnderDragonWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/EnderDragonWatcher.java index d9a44764..cd87b94e 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/EnderDragonWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/EnderDragonWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class EnderDragonWatcher extends LivingWatcher { - public EnderDragonWatcher(int entityId) { - super(entityId); + public EnderDragonWatcher(Disguise disguise) { + super(disguise); } } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/EndermanWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/EndermanWatcher.java index 2b82201a..c0e2ebd1 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/EndermanWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/EndermanWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class EndermanWatcher extends LivingWatcher { - public EndermanWatcher(int entityId) { - super(entityId); + public EndermanWatcher(Disguise disguise) { + super(disguise); } public int getCarriedData() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/GhastWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/GhastWatcher.java index e0e160d6..8e8e3874 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/GhastWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/GhastWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class GhastWatcher extends LivingWatcher { - public GhastWatcher(int entityId) { - super(entityId); + public GhastWatcher(Disguise disguise) { + super(disguise); } public boolean isAgressive() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/HorseWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/HorseWatcher.java index 4c4afe1a..0d851bd1 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/HorseWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/HorseWatcher.java @@ -2,13 +2,15 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; import java.util.Random; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + import org.bukkit.entity.Horse.Color; import org.bukkit.entity.Horse.Style; public class HorseWatcher extends AgeableWatcher { - public HorseWatcher(int entityId) { - super(entityId); + public HorseWatcher(Disguise disguise) { + super(disguise); setValue(20, new Random().nextInt(7)); } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ItemFrameWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ItemFrameWatcher.java index ca42e71a..43f54240 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ItemFrameWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ItemFrameWatcher.java @@ -3,12 +3,13 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack; import org.bukkit.inventory.ItemStack; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; import me.libraryaddict.disguise.DisguiseTypes.FlagWatcher; public class ItemFrameWatcher extends FlagWatcher { - public ItemFrameWatcher(int entityId) { - super(entityId); + public ItemFrameWatcher(Disguise disguise) { + super(disguise); } public ItemStack getItemStack() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/LivingWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/LivingWatcher.java index ed86ae1b..f57d1245 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/LivingWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/LivingWatcher.java @@ -8,14 +8,14 @@ import net.minecraft.server.v1_6_R2.PotionBrewer; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; - +import me.libraryaddict.disguise.DisguiseTypes.Disguise; import me.libraryaddict.disguise.DisguiseTypes.FlagWatcher; public class LivingWatcher extends FlagWatcher { private HashSet potionEffects = new HashSet(); - public LivingWatcher(int entityId) { - super(entityId); + public LivingWatcher(Disguise disguise) { + super(disguise); } public void addPotionEffect(PotionEffect potionEffect) { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MagmaCubeWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MagmaCubeWatcher.java index 95de624e..bc3319c9 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MagmaCubeWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MagmaCubeWatcher.java @@ -1,8 +1,10 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class MagmaCubeWatcher extends SlimeWatcher { - public MagmaCubeWatcher(int entityId) { - super(entityId); + public MagmaCubeWatcher(Disguise disguise) { + super(disguise); } } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartWatcher.java index ed1a359d..44671be5 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartWatcher.java @@ -1,11 +1,12 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; import me.libraryaddict.disguise.DisguiseTypes.FlagWatcher; public class MinecartWatcher extends FlagWatcher { - public MinecartWatcher(int entityId) { - super(entityId); + public MinecartWatcher(Disguise disguise) { + super(disguise); } public float getDamage() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MushroomCowWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MushroomCowWatcher.java index 5f709e8f..c3e03e47 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MushroomCowWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MushroomCowWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class MushroomCowWatcher extends AgeableWatcher { - public MushroomCowWatcher(int entityId) { - super(entityId); + public MushroomCowWatcher(Disguise disguise) { + super(disguise); } } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/OcelotWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/OcelotWatcher.java index 44320b34..779ed7e8 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/OcelotWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/OcelotWatcher.java @@ -1,12 +1,14 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + import org.bukkit.entity.Ocelot; import org.bukkit.entity.Ocelot.Type; public class OcelotWatcher extends AgeableWatcher { - public OcelotWatcher(int entityId) { - super(entityId); + public OcelotWatcher(Disguise disguise) { + super(disguise); } public String getOwner() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/PigWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/PigWatcher.java index fc55df5c..4f6b31bb 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/PigWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/PigWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class PigWatcher extends AgeableWatcher { - public PigWatcher(int entityId) { - super(entityId); + public PigWatcher(Disguise disguise) { + super(disguise); } public boolean isSaddled() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/PigZombieWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/PigZombieWatcher.java index 368a09fb..724f3c55 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/PigZombieWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/PigZombieWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class PigZombieWatcher extends ZombieWatcher { - public PigZombieWatcher(int entityId) { - super(entityId); + public PigZombieWatcher(Disguise disguise) { + super(disguise); } } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/PlayerWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/PlayerWatcher.java index 83492482..caa39565 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/PlayerWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/PlayerWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class PlayerWatcher extends LivingWatcher { - public PlayerWatcher(int entityId) { - super(entityId); + public PlayerWatcher(Disguise disguise) { + super(disguise); } public int getArrowsSticking() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/SheepWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/SheepWatcher.java index 8a5eb067..7487c8cf 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/SheepWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/SheepWatcher.java @@ -1,11 +1,12 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; import me.libraryaddict.disguise.DisguiseTypes.AnimalColor; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; public class SheepWatcher extends AgeableWatcher { - public SheepWatcher(int entityId) { - super(entityId); + public SheepWatcher(Disguise disguise) { + super(disguise); setValue(16, (byte) 0); } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/SkeletonWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/SkeletonWatcher.java index fbab17d8..d6779a41 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/SkeletonWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/SkeletonWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class SkeletonWatcher extends LivingWatcher { - public SkeletonWatcher(int entityId) { - super(entityId); + public SkeletonWatcher(Disguise disguise) { + super(disguise); } } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/SlimeWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/SlimeWatcher.java index f8c01ff3..54526020 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/SlimeWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/SlimeWatcher.java @@ -2,10 +2,12 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; import java.util.Random; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class SlimeWatcher extends LivingWatcher { - public SlimeWatcher(int entityId) { - super(entityId); + public SlimeWatcher(Disguise disguise) { + super(disguise); setValue(16, (byte) (new Random().nextInt(4) + 1)); } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/VillagerWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/VillagerWatcher.java index 14db854e..9a57def9 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/VillagerWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/VillagerWatcher.java @@ -2,12 +2,14 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; import java.util.Random; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + import org.bukkit.entity.Villager.Profession; public class VillagerWatcher extends AgeableWatcher { - public VillagerWatcher(int entityId) { - super(entityId); + public VillagerWatcher(Disguise disguise) { + super(disguise); setValue(16, Profession.values()[new Random().nextInt(Profession.values().length)].getId()); } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/WitherWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/WitherWatcher.java index 25f1243a..ed55b6b8 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/WitherWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/WitherWatcher.java @@ -1,8 +1,10 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class WitherWatcher extends EnderDragonWatcher { - public WitherWatcher(int entityId) { - super(entityId); + public WitherWatcher(Disguise disguise) { + super(disguise); } } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/WolfWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/WolfWatcher.java index 3af8cd33..8c0580c7 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/WolfWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/WolfWatcher.java @@ -1,11 +1,12 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; import me.libraryaddict.disguise.DisguiseTypes.AnimalColor; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; public class WolfWatcher extends AgeableWatcher { - public WolfWatcher(int entityId) { - super(entityId); + public WolfWatcher(Disguise disguise) { + super(disguise); } public AnimalColor getCollarColor() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ZombieWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ZombieWatcher.java index b5bf4f81..35279355 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ZombieWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ZombieWatcher.java @@ -1,9 +1,11 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; +import me.libraryaddict.disguise.DisguiseTypes.Disguise; + public class ZombieWatcher extends LivingWatcher { - public ZombieWatcher(int entityId) { - super(entityId); + public ZombieWatcher(Disguise disguise) { + super(disguise); } public boolean isAdult() {