ggz.common
Class ChatType

java.lang.Object
  extended by ggz.common.ChatType

public class ChatType
extends java.lang.Object

Each time we send a chat to the server, it will have one of these types associated with it.


Field Summary
static ChatType GGZ_CHAT_ANNOUNCE
          An announcement, usually triggered with /wall.
static ChatType GGZ_CHAT_BEEP
          A beep.
static ChatType GGZ_CHAT_NORMAL
          A normal chat, just a message sent to the current room.
static ChatType GGZ_CHAT_PERSONAL
          A personal message to another player.
static ChatType GGZ_CHAT_TABLE
          A table-wide chat.
static ChatType GGZ_CHAT_UNKNOWN
          An unknown/unrecognized chat type - likely either a future chat op or a communications error.
 
Method Summary
 java.lang.String toString()
           
static ChatType valueOf(java.lang.String type_str)
          Converts a string to a a ChatType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GGZ_CHAT_UNKNOWN

public static final ChatType GGZ_CHAT_UNKNOWN
An unknown/unrecognized chat type - likely either a future chat op or a communications error. It can either be ignored or handled generically.


GGZ_CHAT_NORMAL

public static final ChatType GGZ_CHAT_NORMAL
A normal chat, just a message sent to the current room.


GGZ_CHAT_ANNOUNCE

public static final ChatType GGZ_CHAT_ANNOUNCE
An announcement, usually triggered with /wall. Only admins can do this, and it is announced in all rooms.


GGZ_CHAT_BEEP

public static final ChatType GGZ_CHAT_BEEP
A beep. We beep a player, and their client will run the beep.


GGZ_CHAT_PERSONAL

public static final ChatType GGZ_CHAT_PERSONAL
A personal message to another player. It consists of both a message and a target player.


GGZ_CHAT_TABLE

public static final ChatType GGZ_CHAT_TABLE
A table-wide chat. It goes only to players at the current table.

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

valueOf

public static ChatType valueOf(java.lang.String type_str)
Converts a string to a a ChatType. If the string doesn't match exactly then GGZ_CHAT_UNKOWN is returned. The recognised strings are normal, announce, beep, private and table.

Parameters:
type_str - The string to convert.
Returns:
The chat type that corresponds to the given string.