Set prefixes per permissions

Discussion in 'Plugin Development' started by AguilaAudaz, Oct 4, 2013.

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

    AguilaAudaz

    Well this sounds, really "easy" but i CANT make the code, i dont understand this... if a player has a permission like "permission.normal" set a prefix on his name like a color, and if a player have "permission.vip" set a different prefix, really i need help, if someone know how to do this please tell me :(

    Noone?

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

    Tehmaker

    The easiest way to do this, would be to dispatch a command, and set the sender to the console... Just have the command be like ("pex user " + p.getName() + " prefix *insert the prefix here*");

    I don't remember by heart the exact method, but it is Bukkit. something. Just look for dispatch command or something along the lines of that.
     
  3. Offline

    JPG2000

    AguilaAudaz Use the AsyncPlayerChatEvent, and check if the player has a permission. If so, player.setName("(Prefix)" + player.getName())
     
    Mathias Eklund likes this.
Thread Status:
Not open for further replies.

Share This Page