How to get player prefix(Vault)

Discussion in 'Plugin Development' started by Quaro, Mar 30, 2013.

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

    Quaro

    Im trying to get player prefix but getting error:

    import net.milkbowl.vault.chat.Chat;

    Player player = event.getPlayer();
    String prefix = Chat.getPlayerPrefix(player);
     
  2. Offline

    kaskoepoes112

    what's the error..
     
  3. Offline

    Quaro

    "Cannot make a static reference to the non-static method getPlayerPrefix(Player) from the type Chat"

    Player pl = event.getPlayer();
    String prefix = Chat.getPlayerPrefix(pl.getWorld(), pl.getName());

    Cannot make a static reference to the non-static method getPlayerPrefix(World, String) from the type Chat

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

    Quaro

  5. Offline

    jayfella

Thread Status:
Not open for further replies.

Share This Page