Chat as offline player

Discussion in 'Plugin Development' started by WhatAaCow, Apr 9, 2014.

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

    WhatAaCow

    Hei,
    i want to send a message with a given player name to the chat trough my plugin with all formattings from player messages which are on the server but with broadcastMessage() there is no formatting.

    Example:
    if player "Notch" chats:
    if i send a broadcast with my own message (can't specify playername, therefore won't work):
    what i want:
    i don't want to hard code thinks like:
    Code:java
    1. broadcastMessage("<"+playername+"> "+msg); // doesn't support any formatting
    First idea:
    use chat function with an offline player but doesn't support it.

    Any other ideas?
     
  2. Offline

    St3venAU

    what do you mean by broadcastMessage not supporting formatting? You can format the message however you wish.
     
  3. Offline

    WhatAaCow

    St3venAU hm, if i use something like iChat and format the player messages from:
    to
    then i can't get the formatting which i need and is applyed by iChat
     
  4. Offline

    Tomasko

  5. Offline

    WhatAaCow

    Tomasko Didn't because AsyncPlayerChatEvent needs an online player but i only have a given string (playername) and no player
     
Thread Status:
Not open for further replies.

Share This Page