mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Revisions to onDamage v2
This commit is contained in:
parent
aa3cb69fe8
commit
8899f2d4c4
@ -109,9 +109,7 @@ public class vMinecraftListener extends PluginListener {
|
|||||||
vMinecraftUsers.addUser(player);
|
vMinecraftUsers.addUser(player);
|
||||||
}
|
}
|
||||||
public boolean onDamage(PluginLoader.DamageType type, BaseEntity attacker, BaseEntity defender, int amount) {
|
public boolean onDamage(PluginLoader.DamageType type, BaseEntity attacker, BaseEntity defender, int amount) {
|
||||||
Player player;
|
if(defender.isPlayer()){
|
||||||
for(Player p : etc.getServer().getPlayerList()){
|
|
||||||
if (p.getId() == defender.getId() && p.getHealth() < 1){
|
|
||||||
if(type == type.CREEPER_EXPLOSION){
|
if(type == type.CREEPER_EXPLOSION){
|
||||||
damagetype = 1; //Creeper
|
damagetype = 1; //Creeper
|
||||||
} else if(type == type.FALL){
|
} else if(type == type.FALL){
|
||||||
@ -125,7 +123,6 @@ public class vMinecraftListener extends PluginListener {
|
|||||||
} else if (type == type.WATER){
|
} else if (type == type.WATER){
|
||||||
damagetype = 6; //Water
|
damagetype = 6; //Water
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user