From fd6de1c47c48467b2bd730b71f148c777469b190 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 12 Jul 2013 08:55:12 +1200 Subject: [PATCH] Get rid of multiple minecart watchers --- .../libraryaddict/disguise/DisguiseTypes/Disguise.java | 6 ++++-- .../DisguiseTypes/Watchers/MinecartChestWatcher.java | 9 --------- .../DisguiseTypes/Watchers/MinecartFurnaceWatcher.java | 9 --------- .../DisguiseTypes/Watchers/MinecartHopperWatcher.java | 9 --------- .../Watchers/MinecartMobSpawnerWatcher.java | 9 --------- .../DisguiseTypes/Watchers/MinecartRideableWatcher.java | 9 --------- .../DisguiseTypes/Watchers/MinecartTntWatcher.java | 9 --------- ...MinecartAbstractWatcher.java => MinecartWatcher.java} | 4 ++-- 8 files changed, 6 insertions(+), 58 deletions(-) delete mode 100644 src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartChestWatcher.java delete mode 100644 src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartFurnaceWatcher.java delete mode 100644 src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartHopperWatcher.java delete mode 100644 src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartMobSpawnerWatcher.java delete mode 100644 src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartRideableWatcher.java delete mode 100644 src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartTntWatcher.java rename src/me/libraryaddict/disguise/DisguiseTypes/Watchers/{MinecartAbstractWatcher.java => MinecartWatcher.java} (74%) diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java b/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java index 716f52f4..d56eb9c0 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java @@ -225,8 +225,10 @@ public class Disguise { boolean throwError = false; try { String name; - if (getType().isPlayer()) { - name = "Player"; + if (getType() == DisguiseType.MINECART_FURNACE || getType() == DisguiseType.MINECART_HOPPER + || getType() == DisguiseType.MINECART_MOB_SPAWNER || getType() == DisguiseType.MINECART_RIDEABLE + || getType() == DisguiseType.MINECART_TNT || getType() == DisguiseType.MINECART_CHEST) { + name = "Minecart"; } else { name = toReadable(getType().name()); } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartChestWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartChestWatcher.java deleted file mode 100644 index 84a8c842..00000000 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartChestWatcher.java +++ /dev/null @@ -1,9 +0,0 @@ -package me.libraryaddict.disguise.DisguiseTypes.Watchers; - -public class MinecartChestWatcher extends MinecartAbstractWatcher { - - public MinecartChestWatcher(int entityId) { - super(entityId); - } - -} diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartFurnaceWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartFurnaceWatcher.java deleted file mode 100644 index 9126f594..00000000 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartFurnaceWatcher.java +++ /dev/null @@ -1,9 +0,0 @@ -package me.libraryaddict.disguise.DisguiseTypes.Watchers; - -public class MinecartFurnaceWatcher extends MinecartAbstractWatcher { - - public MinecartFurnaceWatcher(int entityId) { - super(entityId); - } - -} diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartHopperWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartHopperWatcher.java deleted file mode 100644 index a1e518de..00000000 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartHopperWatcher.java +++ /dev/null @@ -1,9 +0,0 @@ -package me.libraryaddict.disguise.DisguiseTypes.Watchers; - -public class MinecartHopperWatcher extends MinecartAbstractWatcher{ - - public MinecartHopperWatcher(int entityId) { - super(entityId); - } - -} diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartMobSpawnerWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartMobSpawnerWatcher.java deleted file mode 100644 index 17d144f7..00000000 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartMobSpawnerWatcher.java +++ /dev/null @@ -1,9 +0,0 @@ -package me.libraryaddict.disguise.DisguiseTypes.Watchers; - -public class MinecartMobSpawnerWatcher extends MinecartAbstractWatcher{ - - public MinecartMobSpawnerWatcher(int entityId) { - super(entityId); - } - -} diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartRideableWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartRideableWatcher.java deleted file mode 100644 index e5e6c0d9..00000000 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartRideableWatcher.java +++ /dev/null @@ -1,9 +0,0 @@ -package me.libraryaddict.disguise.DisguiseTypes.Watchers; - -public class MinecartRideableWatcher extends MinecartAbstractWatcher{ - - public MinecartRideableWatcher(int entityId) { - super(entityId); - } - -} diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartTntWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartTntWatcher.java deleted file mode 100644 index 2a55ad12..00000000 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartTntWatcher.java +++ /dev/null @@ -1,9 +0,0 @@ -package me.libraryaddict.disguise.DisguiseTypes.Watchers; - -public class MinecartTntWatcher extends MinecartAbstractWatcher{ - - public MinecartTntWatcher(int entityId) { - super(entityId); - } - -} diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartAbstractWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartWatcher.java similarity index 74% rename from src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartAbstractWatcher.java rename to src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartWatcher.java index 055094e6..29b97b50 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartAbstractWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/MinecartWatcher.java @@ -2,9 +2,9 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; import me.libraryaddict.disguise.DisguiseTypes.FlagWatcher; -public abstract class MinecartAbstractWatcher extends FlagWatcher { +public abstract class MinecartWatcher extends FlagWatcher { - public MinecartAbstractWatcher(int entityId) { + public MinecartWatcher(int entityId) { super(entityId); setValue(16, (byte) 0); setValue(17, 0);