Jump to content

MadeByProxxy

Members
  • Posts

    1
  • Joined

  • Last visited

MadeByProxxy's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Okay, thank you. How can I use .getSource? It doesnt exists with me. Yeah I know.. I looked at that line again and its really stupid.. Thanks
  2. Hello, maybe its a very simple question, but I havent used Forge long. Iam coding a mod for a server. But how can I get the player, which is killing the Enderman? @SubscribeEvent public void onKill(LivingDeathEvent event) { if (event.entityLiving.getName().equalsIgnoreCase(Minecraft.getMinecraft().thePlayer.getName())) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("Test1")); Entity e = event.entity; if (e instanceof EntityEnderman) { i++; Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("§7Enderman killed: §e§l" + i)); } } } The player will get the message if an Enderman dies, but it doesn't matter who killed the enderman. But the player should only get the message, if he kills an Enderman. How can I do this? I am using Forge 1.8.9-11.15.1.2318 Thanks. (Sorry for my bad english)
×
×
  • Create New...

Important Information

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