mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
Fix for ezmodo, removed ezHealth
This commit is contained in:
parent
3a85abadfa
commit
83f1ed4a8f
@ -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;
|
||||
}
|
||||
|
@ -80,10 +80,8 @@ 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());
|
||||
|
@ -40,8 +40,7 @@ public class vMinecraftSettings {
|
||||
static ArrayList<String> ezModo = new ArrayList<String>();
|
||||
//An array of players currently toggled for admin chat
|
||||
static ArrayList<String> adminChatList = new ArrayList<String>();
|
||||
//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
|
||||
|
@ -264,6 +264,7 @@ class PlayerList
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================
|
||||
//Function: getPlayer
|
||||
//Input: None
|
||||
@ -368,3 +369,4 @@ class PlayerList
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user