Chat Color Help

Discussion in 'Plugin Development' started by zachoooo, Mar 11, 2012.

  1. Offline

    zachoooo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    In my plugin I have a system in which it breaks up messages into an array. This way the words will wrap.


    My chat wrapper would convert that to:


    The only problem is that colors dont persist. Since the messages are split up into an array, the colors dont continue onto the next line. Does anyone have an idea on how to get the color that the old message was in and continue it onto the next line? Thanks in advance!
  2. Offline

    zachoooo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Anyone know how to do this?
  3. Offline

    deltahat

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Use the new util.ChatPaginator class. It's the foundation of the new help system and gives you proper word wrap, colors persisting across multiple lines, and a way to display really long messages across multiple screens. CommandSender.sendMessage() has also been overloaded to accept an array of strings so otter output of the ChatPaginator can be sent directly to the player.

    See the implementation of HelpCommand for an example.
  4. Offline

    zachoooo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    What RB were these fixes made in?
  5. Offline

    deltahat

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    The latest 1.2.3-0.2 beta.
  6. Offline

    zachoooo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Well I guess I have to wait for the new bukkit release to get this fixed then... Thanks for your help.

Share This Page