Class PersonCommunicationService
Object
PersonCommunicationService
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearLog()
Clears the log.Returns the amount of money that you are carrying.Returns the log starting from the offset, or an empty string if the offset is past the length of the log.long
void
sendChatBubble
(User person, Person from, String aMessage) void
writeMessage
(String aMessage) writes a message to the log file of the character that contains all communication and messages.void
writeMessage
(Person aSource, String aMessage) writes a message to the log file of the character that contains all communication and messages.void
writeMessage
(Person aSource, Person aTarget, String aMessage) writes a message to the log file of the character that contains all communication and messages.
-
Method Details
-
clearLog
-
writeMessage
writes a message to the log file of the character that contains all communication and messages. The sentence will start with a capital.Important! : Use this method only for Environmental communication or personal communication , as it does not check the Ignore Flag. Use the
writeMessage(Person, String)
for specific communication between users.- Parameters:
aMessage
- the message to be written to the logfile.- Throws:
MudException
- See Also:
-
writeMessage
writes a message to the log file of the character that contains all communication and messages. The message will be interpreted by replacing the following values by the following other values:REPLACE WITH (if target) WITH (if not target) %TNAME you name %TNAMESELF yourself name %THISHER your his/her %THIMHER you him/her %THESHE you he/she %TISARE are is %THASHAVE have has %TYOUPOSS your name + s - Parameters:
aSource
- the source of the message, the thing originating the message.aTarget
- the target of the message, could be null if there is not target for this specific message.aMessage
- the message to be written to the logfile.- Throws:
MudException
- See Also:
-
writeMessage
writes a message to the log file of the character that contains all communication and messages. The message will be interpreted by replacing the following values by the following other values:REPLACE WITH (if source) WITH (if not source) %SNAME you name %SNAMESELF yourself name %SHISHER your his/her %SHIMHER you him/her %SHESHE you he/she %SISARE are is %SHASHAVE have has %SYOUPOSS your name + s %VERB1 es %VERB2 s - Parameters:
aSource
- the source of the message, the thing originating the message.aMessage
- the message to be written to the logfile.- Throws:
MudException
- See Also:
-
getLogSize
public long getLogSize() -
getLog
Returns the log starting from the offset, or an empty string if the offset is past the length of the log. Can also contain the empty string, if the log happens to be empty.- Parameters:
offset
- the offset from whence to read the log. Offset starts with 0 and is inclusive.- Returns:
- a String, part of the Log.
- Throws:
MudException
- in case of accidents with reading the log, or a negative offset.
-
getDescriptionOfMoney
Returns the amount of money that you are carrying.- Returns:
- String description of the amount of money.
-
sendChatBubble
-