From d3aff7d2d69e54ebce00aa2e37cfdc6f5dfc65e0 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 2 Dec 2010 17:25:02 -0800 Subject: [PATCH] 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. --- vMinecraftListener.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vMinecraftListener.java b/vMinecraftListener.java index 14a017e21..a004079e3 100644 --- a/vMinecraftListener.java +++ b/vMinecraftListener.java @@ -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; + } } \ No newline at end of file