Solved Getting the Killer (Creature)

Discussion in 'Plugin Development' started by FabeGabeMC, Mar 15, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    FabeGabeMC

    ShadowLAX
    It has nothing to do with the fact of making the mob messages work. I added that today.
    Plus, I have had this problem for over 2 weeks with no solution. I even contacted Tux2, and he had no idea what to do.
     
  2. Offline

    ShadowLAX

    FabeGabeMC After playing around with it, it seems that the variables k and kmt are always returning a player entity or entity type respectively, even if it wasn't a player that inflicted the last damage. Because of that, in the switch statements it is completing as if a player killed them, and is throwing an NPE because you can't get the name of a non-player entity. Why it is doing this, I have no idea.
     
  3. Offline

    FabeGabeMC

    So I should do it a little something like this?
    Code:java
    1. EntityType kmt = p.getKiller().getType();
    2.  


    ShadowLAX
    now all of a sudden my other messages don't work. :/

    Now THIS is really weird.
    All messages were not running just because of kmt?! Nonsense, wow.

    xTrollxDudex
    any suggestions on this?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  4. Offline

    FabeGabeMC

  5. Offline

    FabeGabeMC

Thread Status:
Not open for further replies.

Share This Page