Jump to content

Fury

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Fury

  1. I'm making a mod called BadManners. Whenever you kill someone it sends a message with their name in it and follows with an "ez". Yes, I know I'm working in an ANCIENT version, but this version is most commonly used for PvP and the mod is directed towards the PvP community. Now, I'm using the onDeath event to find out the entity and see if it was killed by the player. This snippet of code works in singleplayer but whenever I go on a server getSourceOfDamage() always returns null. Is it perhaps that I can't get the people who died on a multiplayer server? @SubscribeEvent public void onDeath(LivingDeathEvent event) { attacker = event.source.getSourceOfDamage(); if (attacker != null) { if (attacker.getEntityId() == mc.thePlayer.getEntityId()) { mc.thePlayer.sendChatMessage(event.entity.getCommandSenderName() + " ez"); } } } (Attacker is defined as an entity). Thank you!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.