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:
nossr50 2010-12-02 17:25:02 -08:00
parent f99bb09d44
commit d3aff7d2d6

View File

@ -6,6 +6,9 @@ import java.util.logging.Logger;
//Author: nossr50, TrapAlice, cerevisiae
//=====================================================================
public class vMinecraftListener extends PluginListener {
public int bAttacker;
public int bDefender;
public int bAmount;
protected static final Logger log = Logger.getLogger("Minecraft");
//=====================================================================
@ -92,5 +95,12 @@ public class vMinecraftListener extends PluginListener {
public void onLogin(Player 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;
}
}