mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Fixed ezModo, for reals this time.
This commit is contained in:
parent
1388780143
commit
2a1ff28af2
@ -86,10 +86,7 @@ public class vMinecraftListener extends PluginListener {
|
||||
//Use: Checks for exploits and runs the commands
|
||||
//=====================================================================
|
||||
public boolean onHealthChange(Player player,int oldValue,int newValue){
|
||||
//Invincibility for EzModo players
|
||||
if(vMinecraftSettings.getInstance().isEzModo(player.getName())){
|
||||
return false;
|
||||
}
|
||||
|
||||
//Sets a player as dead
|
||||
if (player.getHealth() < 1){
|
||||
vMinecraftUsers.getProfile(player).isDead(true);
|
||||
@ -162,7 +159,13 @@ public class vMinecraftListener extends PluginListener {
|
||||
}
|
||||
|
||||
public boolean onDamage(PluginLoader.DamageType type, BaseEntity attacker, BaseEntity defender, int amount) {
|
||||
|
||||
//Invincibility for EzModo players
|
||||
if(defender.isPlayer()){
|
||||
Player dplayer = defender.getPlayer();
|
||||
if(vMinecraftSettings.getInstance().isEzModo(dplayer.getName())){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user