diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/DisguiseType.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/DisguiseType.java index 3853c519..f2ec1053 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/DisguiseType.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/DisguiseType.java @@ -195,8 +195,6 @@ public enum DisguiseType { TURTLE, - ZOMBIE_HORSE, - UNKNOWN, VEX, @@ -219,6 +217,8 @@ public enum DisguiseType { ZOMBIE, + ZOMBIE_HORSE, + ZOMBIE_VILLAGER; public static DisguiseType getType(Entity entity) { diff --git a/src/main/java/me/libraryaddict/disguise/utilities/UpdateChecker.java b/src/main/java/me/libraryaddict/disguise/utilities/UpdateChecker.java index 6967c03a..0b43289c 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/UpdateChecker.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/UpdateChecker.java @@ -83,10 +83,12 @@ public class UpdateChecker { File dest = new File(Bukkit.getUpdateFolderFile(), "LibsDisguises.jar"); - if (!dest.exists()) { - dest.mkdirs(); + if (dest.exists()) { + dest.delete(); } + dest.getParentFile().mkdirs(); + try { // We're connecting to spigot's API URL url = new URL(urlString); @@ -106,6 +108,7 @@ public class UpdateChecker { dest.delete(); DisguiseUtilities.getLogger().warning("Failed to download snapshot build."); lastDownload = 0; + ex.printStackTrace(); } return false; diff --git a/src/main/java/me/libraryaddict/disguise/utilities/listeners/DisguiseListener.java b/src/main/java/me/libraryaddict/disguise/utilities/listeners/DisguiseListener.java index 40629874..f488a662 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/listeners/DisguiseListener.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/listeners/DisguiseListener.java @@ -182,9 +182,17 @@ public class DisguiseListener implements Listener { } if (updateMessage == LibsMsg.UPDATE_SUCCESS || updateMessage == LibsMsg.UPDATE_FAILED) { - player.sendMessage(updateMessage.get()); + if (player instanceof Player) { + player.sendMessage(updateMessage.get()); + } else { + DisguiseUtilities.getLogger().info(updateMessage.get()); + } } else { - player.sendMessage(updateMessage.get(currentVersion, latestVersion)); + if (player instanceof Player) { + player.sendMessage(updateMessage.get(currentVersion, latestVersion)); + } else { + DisguiseUtilities.getLogger().info(updateMessage.get(currentVersion, latestVersion)); + } } }