mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Setting up the foundation for specific death messages. This version will post information on attacker/defender entity IDs and dmg amount to the server console.
This commit is contained in:
parent
f99bb09d44
commit
d3aff7d2d6
@ -6,6 +6,9 @@ import java.util.logging.Logger;
|
|||||||
//Author: nossr50, TrapAlice, cerevisiae
|
//Author: nossr50, TrapAlice, cerevisiae
|
||||||
//=====================================================================
|
//=====================================================================
|
||||||
public class vMinecraftListener extends PluginListener {
|
public class vMinecraftListener extends PluginListener {
|
||||||
|
public int bAttacker;
|
||||||
|
public int bDefender;
|
||||||
|
public int bAmount;
|
||||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||||
|
|
||||||
//=====================================================================
|
//=====================================================================
|
||||||
@ -92,5 +95,12 @@ public class vMinecraftListener extends PluginListener {
|
|||||||
public void onLogin(Player player){
|
public void onLogin(Player player){
|
||||||
vMinecraftUsers.addUser(player);
|
vMinecraftUsers.addUser(player);
|
||||||
}
|
}
|
||||||
|
public boolean onDamage(PluginLoader.DamageType type, BaseEntity attacker, BaseEntity defender, int amount) {
|
||||||
|
bAttacker = attacker.getId();
|
||||||
|
bDefender = defender.getId();
|
||||||
|
bAmount = amount;
|
||||||
|
log.log(Level.INFO, "Attacker ID: " + bAttacker + ", Defender ID: " + bDefender + ", Amount: " + bAmount);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user