Solved Slight Issue With My Plugin

Discussion in 'Plugin Development' started by Garnetty, Dec 14, 2014.

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

    Garnetty

    So I've created a plugin that directly tells the player who killed them, but it's putting in the name in a weird way.

    Here's the code: [​IMG]
    And Here's The Outcome: [​IMG]

    Not sure what's causing it, help would be appreciated.

    Thanks, Garnetty
     
  2. Offline

    timtower Administrator Administrator Moderator

    1. Moved to plugin development.
    2. Use player.getKiller().getName() or getDisplayName
     
    pookeythekid likes this.
  3. Offline

    Funergy

    @timtower You forgot to do .getName();
    so it is player.getKiller().getName()

    and do a check if the killer is actually a player
     
    Last edited: Dec 14, 2014
  4. Offline

    Unica

    @Funergy

    getEntity() in PlayerDeathEvent already returns a player object.
     
  5. Offline

    Funergy

    @Unica oh lol I ment a check if the killer is a player
     
  6. Offline

    timtower Administrator Administrator Moderator

    I see getname in my snippets though.
     
    Unica likes this.
  7. Offline

    Garnetty

    Sorry for posting it in the wrong section, and thanks a bunch.

    Coding a custom KitPvP Plugin for my server and I want to remove public death messages, and this is my first time ever coding :p

    Resolved

    <Edited by bwfcwalshy: Merged posts, please use the edit button rather than double posting.>
     
Thread Status:
Not open for further replies.

Share This Page