Package pacManReloaded.common.messages
Class ChatMessage
- java.lang.Object
-
- pacManReloaded.common.messages.ChatMessage
-
-
Constructor Summary
Constructors Constructor Description ChatMessage(java.lang.String buffer)Constructor of the classChatMessage(java.lang.String from, java.lang.String info)Constructor of the class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFrom()"getter" for where the message comes fromjava.lang.StringgetInfo()"getter" for the info of the messageCommandgetType()"getter" for the type of the commandvoidsetFrom(java.lang.String from)"setter" for where the message comes fromjava.lang.StringtoString()the to String method, forms the message into a string, seperated by "|"
-
-
-
Constructor Detail
-
ChatMessage
public ChatMessage(java.lang.String buffer)
Constructor of the class- Parameters:
buffer- string which splits
-
ChatMessage
public ChatMessage(java.lang.String from, java.lang.String info)Constructor of the class- Parameters:
from- where the message comes frominfo- info of the message
-
-
Method Detail
-
getInfo
public java.lang.String getInfo()
"getter" for the info of the message- Returns:
- info of the message
-
getFrom
public java.lang.String getFrom()
"getter" for where the message comes from- Returns:
- where the messages come from
-
setFrom
public void setFrom(java.lang.String from)
"setter" for where the message comes from- Parameters:
from- where the message comes from
-
toString
public java.lang.String toString()
the to String method, forms the message into a string, seperated by "|"- Overrides:
toStringin classjava.lang.Object- Returns:
- string which contains the command type, the sender and the message info seperated by a "|"
-
-