How to change the nametag of the player and change the skin?

Discussion in 'Plugin Development' started by TheRayMirez, Apr 26, 2014.

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

    TheRayMirez

    Hi everyone,

    I want to know that when a player execute a command it change the skin and the nametag..? How i could do this?

    Thank You
     
  2. Offline

    Wizehh

  3. Offline

    TheRayMirez

  4. Offline

    Fantah

    Source:

    Code:java
    1. @EventHandler
    2. public void onPlayerTag(PlayerReceiveNameTagEvent e) {
    3. Player p = e.getNamedPlayer();
    4. e.setTag(ChatColor.GOLD + p.getName());
    5. }
    6.  
    7. public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
    8.  
    9. if (!(sender instanceof Player)) {
    10. return true;
    11. }
    12. Player p = (Player) sender;
    13.  
    14. if (cmd.getName().equalsIgnoreCase("tagme")) {
    15. TagAPI.refreshPlayer(p);
    16. }
    17. return true;
    18. }



     
  5. Offline

    LavaisWatery

    The only problem currently with TagAPI is if the players name is > then 16 the skin will be cut off and most likely a steve skin.
     
Thread Status:
Not open for further replies.

Share This Page