ugh removed.

Discussion in 'Resources' started by Peter25715, Sep 21, 2014.

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

    Peter25715

    Removed post.
     
  2. Offline

    Dragonphase

    Peter25715

    I see no reason to modify the player's name to change the color of their message when you could just prepend a color to the beginning of their message.

    Also, instead of defining specific permissions for each color, you could iterate through each color in the ChatColor enumeration and determine whether the player has permission to use that color:

    Code:java
    1. @EventHandler
    2. public void onChat(AsyncPlayerChatEvent event) {
    3. for (ChatColor color : ChatColor.values()) {
    4. if (event.getPlayer().hasPermission("chatcolor." + color.toString().toLowerCase().replace("_", ""))) {
    5. event.setMessage(color + event.getMessage());
    6. }
    7. }
    8. }
     
    AoH_Ruthless likes this.
  3. Offline

    Peter25715

    Dragonphase, I understand that, I already own a plugin that does NOT change the name. But this is a really simple way to let some people have this idea in their imaginations!
     
  4. Offline

    MineStein

  5. Offline

    ChipDev

    Lol, I know your feeling.

    (All my posts in recourses end up like this)
     
    Peter25715 likes this.
  6. Offline

    Onlineids

  7. Offline

    ChipDev

    iPhone :p
    *Hits and runs with my excuse*
     
  8. Offline

    Onlineids

    ChipDev iPhone has autocorrect :p
     
  9. Offline

    ChipDev

    My spelling was so outrageously incorrect, It couldn't even fix it.
    Not even bob the builder could fix it.
    But you could fix it 0.o
     
Thread Status:
Not open for further replies.

Share This Page