Colored nickname in different dimension 1.16.3

Discussion in 'Plugin Development' started by dangermaster, Oct 7, 2020.

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

    dangermaster

    Hi, do someone know how make a plugin with colored nickname in different dimension?

    Example:
    In the tab, I can see a different color of the nickname if I am in different dimensions, for example, in the overworld, I have a green nickname, Red in nether, purple in the end.


    I saw this plugin in the video of a Russian-speaking youtuber when he was playing on the server with friends.
    Аnd wanted to make the same feature on my private server. Does anyone know how to do this? Or is there already such a plugin on the Internet?

    Sorry for my English, i not from USA or other English-speaking country.
     
  2. Offline

    Kars

    1. Catch chat event and cancel it
    2. Use player.getWorld.getEnvironment() to get the dimension the player is in
    3. Send a different colored message depending on the dimension
    Easy.
     
  3. Offline

    dangermaster

    Do u can show me how its look like?
    cuz im a so stupid.
     
  4. Offline

    Kars

  5. Offline

    Yochran

    Code:
    if (player.getWorld().getName().equalsIgnoreCase("world") {
        player.setPlayerListName(ChatColor.GREEN + player.getName());
    } else if (player.getWorld().getName().contains("nether") {
        player.setPlayerListName(ChatColor.RED  + player.getName());
    } else if (player.getWorld().getName().contains("end") {
        player.setPlayerListName(ChatColor.PURPLE + player.getName());
    }
     
Thread Status:
Not open for further replies.

Share This Page