diff --git a/vMinecraftCommands.java b/vMinecraftCommands.java index 2cff35139..f8e83d82c 100644 --- a/vMinecraftCommands.java +++ b/vMinecraftCommands.java @@ -489,7 +489,6 @@ public class vMinecraftCommands{ player.sendMessage(Colors.LightBlue + "Easy Mode ga yurusareru no wa shougakusei made dayo ne"); player.sendMessage(Colors.Red + "**Laughter**"); vMinecraftSettings.getInstance().addEzModo(player.getName()); - player.setHealth(vMinecraftSettings.getInstance().ezModoHealth()); } return EXIT_SUCCESS; } diff --git a/vMinecraftListener.java b/vMinecraftListener.java index 0318de5ae..3abb80a1e 100644 --- a/vMinecraftListener.java +++ b/vMinecraftListener.java @@ -80,11 +80,9 @@ public class vMinecraftListener extends PluginListener { //Use: Checks for exploits and runs the commands //===================================================================== public boolean onHealthChange(Player player,int oldValue,int newValue){ - if (player.getHealth() != vMinecraftSettings.getInstance().ezModoHealth() - && vMinecraftSettings.getInstance().isEzModo(player.getName())) { - player.setHealth(vMinecraftSettings.getInstance().ezModoHealth()); - - } + if (vMinecraftSettings.getInstance().isEzModo(player.getName())) { + return oldValue > newValue; + } else if (vMinecraftSettings.getInstance().globalmessages() && player.getHealth() < 1) { vMinecraftChat.gmsg(player, Colors.Gray + player.getName() + " " + vMinecraftSettings.randomDeathMsg()); } diff --git a/vMinecraftSettings.java b/vMinecraftSettings.java index 71f4c26ea..9679f1910 100644 --- a/vMinecraftSettings.java +++ b/vMinecraftSettings.java @@ -40,8 +40,7 @@ public class vMinecraftSettings { static ArrayList ezModo = new ArrayList(); //An array of players currently toggled for admin chat static ArrayList adminChatList = new ArrayList(); - //The max health for ezModo - static int ezHealth = 30; + private PropertiesFile properties; String file = "vminecraft.properties"; @@ -144,7 +143,7 @@ public class vMinecraftSettings { for(String ezName : tempEz) ezModo.add(ezName); - ezHealth = properties.getInt("ezHealth"); + log.log(Level.INFO, "vminecraft plugin successfully loaded"); @@ -192,7 +191,6 @@ public class vMinecraftSettings { public void removeAdminToggled(String playerName) {adminChatList.remove(adminChatList.indexOf(playerName));} public void addEzModo(String playerName) {ezModo.add(playerName);} public void addAdminToggled(String playerName) {adminChatList.add(playerName);} - public int ezModoHealth() {return ezHealth;} public String ezModoList() {return ezModo.toString();} //Random death message method diff --git a/vMinecraftUsers.java b/vMinecraftUsers.java index ce9e93364..cded3212a 100644 --- a/vMinecraftUsers.java +++ b/vMinecraftUsers.java @@ -264,6 +264,7 @@ class PlayerList } } + //===================================================================== //Function: getPlayer //Input: None @@ -368,3 +369,4 @@ class PlayerList } } +