diff --git a/src/me/libraryaddict/disguise/commands/DisguiseCommand.java b/src/me/libraryaddict/disguise/commands/DisguiseCommand.java index 8245430e..124ed849 100644 --- a/src/me/libraryaddict/disguise/commands/DisguiseCommand.java +++ b/src/me/libraryaddict/disguise/commands/DisguiseCommand.java @@ -1,20 +1,12 @@ package me.libraryaddict.disguise.commands; import java.util.ArrayList; -import java.util.Collections; - import me.libraryaddict.disguise.BaseDisguiseCommand; import me.libraryaddict.disguise.DisguiseAPI; import me.libraryaddict.disguise.disguisetypes.Disguise; -import me.libraryaddict.disguise.disguisetypes.DisguiseType; -import me.libraryaddict.disguise.disguisetypes.MiscDisguise; -import me.libraryaddict.disguise.disguisetypes.MobDisguise; -import me.libraryaddict.disguise.disguisetypes.PlayerDisguise; - import org.apache.commons.lang.StringUtils; import org.bukkit.ChatColor; import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/src/me/libraryaddict/disguise/commands/DisguiseEntityCommand.java b/src/me/libraryaddict/disguise/commands/DisguiseEntityCommand.java index bdde2069..a5a43e59 100644 --- a/src/me/libraryaddict/disguise/commands/DisguiseEntityCommand.java +++ b/src/me/libraryaddict/disguise/commands/DisguiseEntityCommand.java @@ -1,20 +1,12 @@ package me.libraryaddict.disguise.commands; import java.util.ArrayList; -import java.util.Collections; - import me.libraryaddict.disguise.BaseDisguiseCommand; import me.libraryaddict.disguise.DisguiseListener; import me.libraryaddict.disguise.disguisetypes.Disguise; -import me.libraryaddict.disguise.disguisetypes.DisguiseType; -import me.libraryaddict.disguise.disguisetypes.MiscDisguise; -import me.libraryaddict.disguise.disguisetypes.MobDisguise; -import me.libraryaddict.disguise.disguisetypes.PlayerDisguise; - import org.apache.commons.lang.StringUtils; import org.bukkit.ChatColor; import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; public class DisguiseEntityCommand extends BaseDisguiseCommand { diff --git a/src/me/libraryaddict/disguise/commands/DisguiseHelpCommand.java b/src/me/libraryaddict/disguise/commands/DisguiseHelpCommand.java index f6bb7b61..dac4b6d1 100644 --- a/src/me/libraryaddict/disguise/commands/DisguiseHelpCommand.java +++ b/src/me/libraryaddict/disguise/commands/DisguiseHelpCommand.java @@ -5,19 +5,11 @@ import java.util.ArrayList; import java.util.Collections; import me.libraryaddict.disguise.BaseDisguiseCommand; -import me.libraryaddict.disguise.DisguiseAPI; -import me.libraryaddict.disguise.disguisetypes.Disguise; import me.libraryaddict.disguise.disguisetypes.DisguiseType; -import me.libraryaddict.disguise.disguisetypes.MiscDisguise; -import me.libraryaddict.disguise.disguisetypes.MobDisguise; -import me.libraryaddict.disguise.disguisetypes.PlayerDisguise; - import org.apache.commons.lang.StringUtils; import org.bukkit.ChatColor; import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; public class DisguiseHelpCommand extends BaseDisguiseCommand { diff --git a/src/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java b/src/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java index 87688cb9..bf914886 100644 --- a/src/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java +++ b/src/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java @@ -1,21 +1,12 @@ package me.libraryaddict.disguise.commands; import java.util.ArrayList; -import java.util.Collections; - import me.libraryaddict.disguise.BaseDisguiseCommand; import me.libraryaddict.disguise.DisguiseAPI; import me.libraryaddict.disguise.disguisetypes.Disguise; -import me.libraryaddict.disguise.disguisetypes.DisguiseType; -import me.libraryaddict.disguise.disguisetypes.MiscDisguise; -import me.libraryaddict.disguise.disguisetypes.MobDisguise; -import me.libraryaddict.disguise.disguisetypes.PlayerDisguise; - import org.apache.commons.lang.StringUtils; -import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; diff --git a/src/me/libraryaddict/disguise/disguisetypes/DisguiseType.java b/src/me/libraryaddict/disguise/disguisetypes/DisguiseType.java index f65fc7d2..6ee8dafd 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/DisguiseType.java +++ b/src/me/libraryaddict/disguise/disguisetypes/DisguiseType.java @@ -132,19 +132,12 @@ public enum DisguiseType { return DisguiseType.valueOf(entityType.name()); } - public String toReadable() { - String[] split = name().split("_"); - for (int i = 0; i < split.length; i++) - split[i] = split[i].substring(0, 1) + split[i].substring(1).toLowerCase(); - return StringUtils.join(split, " "); - } - private int defaultData; + private int defaultId; private int entityId; private EntityType entityType; private Class watcherClass; - private DisguiseType(EntityType newType, int... obj) { entityType = newType; for (int i = 0; i < obj.length; i++) { @@ -200,4 +193,11 @@ public enum DisguiseType { public void setWatcherClass(Class c) { watcherClass = c; } + + public String toReadable() { + String[] split = name().split("_"); + for (int i = 0; i < split.length; i++) + split[i] = split[i].substring(0, 1) + split[i].substring(1).toLowerCase(); + return StringUtils.join(split, " "); + } } \ No newline at end of file diff --git a/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java index 06f8d3c5..715a68c1 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java @@ -49,12 +49,12 @@ public class FlagWatcher { classTypes.put(ItemStack.class, 5); classTypes.put(ChunkCoordinates.class, 6); } - private Disguise disguise; - private HashMap entityValues = new HashMap(); /** * This is the entity values I need to add else it could crash them.. */ private HashMap backupEntityValues = new HashMap(); + private Disguise disguise; + private HashMap entityValues = new HashMap(); private boolean hasDied; private org.bukkit.inventory.ItemStack[] items = new org.bukkit.inventory.ItemStack[5]; @@ -226,6 +226,10 @@ public class FlagWatcher { setItemStack(i, itemstack[i]); } + protected void setBackupValue(int no, Object value) { + backupEntityValues.put(no, value); + } + public void setBurning(boolean setBurning) { setFlag(0, 0, setBurning); sendData(0); @@ -320,8 +324,4 @@ public class FlagWatcher { entityValues.put(no, value); } - protected void setBackupValue(int no, Object value) { - backupEntityValues.put(no, value); - } - }