java.lang.Cloneable
, CMCommon
, CMObject
, CMRunnable
, java.lang.Comparable<CMObject>
, Modifiable
, java.lang.Runnable
DefaultSession
, FakeSession
public interface Session extends CMCommon, Modifiable, CMRunnable
Modifier and Type | Interface | Description |
---|---|---|
static class |
Session.InputCallback |
The internal class to managing asynchronous user input.
|
static interface |
Session.SessionFilter |
|
static class |
Session.SessionStatus |
The status of the session, from opening handshake, to final goodbyes
|
static class |
Session.TickingCallback |
An input callback class type that uses its timeout value
as a tick period, and thus has no true timeout.
|
Modifier and Type | Field | Description |
---|---|---|
static int |
MAX_PREVMSGS |
for REPLY command, constant for maximum number of saved strings
|
static char |
MSDP_ARRAY_CLOSE |
For MSDP protocol, denotes array done
|
static char |
MSDP_ARRAY_OPEN |
For MSDP protocol, denotes array start
|
static java.lang.String |
MSDP_CHARSET |
|
static char |
MSDP_TABLE_CLOSE |
For MSDP protocol, denotes table done
|
static char |
MSDP_TABLE_OPEN |
For MSDP protocol, denotes table open
|
static char |
MSDP_VAL |
For MSDP protocol, denotes value start
|
static char |
MSDP_VAR |
For MSDP protocol, denotes variable start
|
static int |
TELNET_AARD |
TELNET CODE: AARD protocol
|
static int |
TELNET_ANSI |
TELNET CODE: 253 doubles as fake ansi telnet code
|
static int |
TELNET_ANSI16 |
TELNET CODE: 252 doubles as fake ansi 16 telnet code
|
static int |
TELNET_ATCP |
TELNET CODE: ATCP protocol
|
static int |
TELNET_AYT |
TELNET CODE: Are You There
|
static int |
TELNET_BINARY |
TELNET CODE: transmit binary
|
static int |
TELNET_COMPRESS |
TELNET CODE: text compression, protocol 1
|
static int |
TELNET_COMPRESS2 |
TELNET CODE: text compression, protocol 2
|
static java.lang.String[] |
TELNET_DESCS |
Array String-friendly descriptions of the various telnet codes.
|
static int |
TELNET_DO |
TELNET CODE: Indicates the request that the other party perform, or confirmation that you are expecting the other party to perform, the indicated option
|
static int |
TELNET_DONT |
TELNET CODE: Indicates the demand that the other party stop performing, or confirmation that you are no longer expecting the other party to perform, the indicated option.
|
static int |
TELNET_EC |
TELNET CODE: Erase character
|
static int |
TELNET_ECHO |
TELNET CODE: echo
|
static int |
TELNET_GA |
TELNET CODE: Indicates that the other party can go ahead and transmit -- I'm done.
|
static int |
TELNET_GMCP |
TELNET CODE: GMCP protocol
|
static int |
TELNET_IAC |
TELNET CODE: IAC
|
static int |
TELNET_LINEMODE |
TELNET CODE: Linemode
|
static int |
TELNET_LINEMODE_MODE |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_MODEMASK_ACK |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_MODEMASK_EDIT |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_MODEMASK_TRAPSIG |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_ACK |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_AO |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_AYT |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_BRK |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_CANTCHANGE |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_DEFAULT |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_EOF |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_EOR |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_IP |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_NOSUPPORT |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_SUSP |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_VALUE |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_XOFF |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LINEMODE_SLC_XON |
Some sort of TELNET protocol constant related to LINEMODE -- I've no idea what it does
|
static int |
TELNET_LOGOUT |
TELNET CODE: echo
|
static int |
TELNET_MSDP |
TELNET CODE: MSDP protocol
|
static int |
TELNET_MSP |
TELNET CODE: MSP SOund protocol
|
static int |
TELNET_MSSP |
TELNET CODE: MSSP Server Status protocol
|
static int |
TELNET_MXP |
TELNET CODE: MXP Extended protocol
|
static int |
TELNET_NAWS |
TELNET CODE: Negotiate About Window Size.
|
static int |
TELNET_NOP |
TELNET CODE: Indicates that there is nothing to do?
|
static int |
TELNET_SB |
TELNET CODE: Indicates that what follows is subnegotiation of the indicated option
|
static int |
TELNET_SE |
TELNET CODE: End of subnegotiation parameters
|
static int |
TELNET_SUPRESS_GO_AHEAD |
TELNET CODE: supress go ahead
|
static int |
TELNET_TERMTYPE |
TELNET CODE: sending terminal type
|
static int |
TELNET_TOGGLE_FLOW_CONTROL |
TELNET CODE: Remote Flow Control.
|
static int |
TELNET_WILL |
TELNET CODE: Indicates the desire to begin performing, or confirmation that you are now performing, the indicated option
|
static int |
TELNET_WONT |
TELNET CODE: Indicates the refusal to perform, or continue performing, the indicated option
|
static byte[] |
TELNETBYTES_END_SB |
How to end a telnet subnegotiation
|
static byte[] |
TELNETBYTES_GMCP_HEAD |
How to start a GMCP subnegotiation
|
static byte[] |
TELNETGABYTES |
Go ahead bytes
|
idConverter
Modifier and Type | Method | Description |
---|---|---|
boolean |
addSessionFilter(Session.SessionFilter filter) |
Adds a new text filter to this session, which can
modify any text immediately before it is sent
to the user.
|
boolean |
autoLogin(java.lang.String name,
java.lang.String password) |
If the session is in a non-logged in state (or even if it
is), this will automatically login the user with the given
name and password, and switch the session to the main loop.
|
java.lang.String |
blockingIn(long timeoutMillis,
boolean filter) |
Blocks the current thread until the user attached to this session
hits ENTER, returning the characters they enter.
|
void |
changeTelnetMode(int telnetCode,
boolean onOff) |
Change telnet mode by sending the appropriate command to the clients client.
|
java.lang.String |
choose(java.lang.String Message,
java.lang.String Choices,
java.lang.String Default) |
Prompts the user to enter one character responses from a set of
valid choices.
|
java.lang.String |
choose(java.lang.String Message,
java.lang.String Choices,
java.lang.String Default,
long maxTime) |
Prompts the user to enter one character responses from a set of
valid choices.
|
java.lang.String |
choose(java.lang.String Message,
java.lang.String Choices,
java.lang.String Default,
long maxTime,
java.util.List<java.lang.String> paramsOut) |
Prompts the user to enter one character responses from a set of
valid choices.
|
void |
colorOnlyPrint(java.lang.String msg) |
Lower-Medium-level text output method.
|
void |
colorOnlyPrint(java.lang.String msg,
boolean noCache) |
Lower-Medium-level text output method.
|
void |
colorOnlyPrintln(java.lang.String msg) |
Lower-Medium-level text output method.
|
void |
colorOnlyPrintln(java.lang.String msg,
boolean noCache) |
Lower-Medium-level text output method.
|
boolean |
confirm(java.lang.String Message,
java.lang.String Default) |
Prompts the user to enter Y or N, and returns what they
enter.
|
boolean |
confirm(java.lang.String Message,
java.lang.String Default,
long maxTime) |
Prompts the user to enter Y or N, and returns what they
enter.
|
java.lang.String |
getAddress() |
Gets the current telnet clients ip address.
|
java.lang.String |
getAfkMessage() |
Returns the reason given by the user that they are AFK.
|
boolean |
getClientTelnetMode(int telnetCode) |
Gets a client telnet mode flag.
|
java.lang.String[] |
getColorCodes() |
Returns a list of standard/foreground telnet coded strings
indexed by coffeemud color code.
|
ColorLibrary.ColorState |
getCurrentColor() |
Returns the current color code.
|
java.lang.String |
getGroupName() |
Returns the group name to which this session belongs
|
java.util.Enumeration<java.util.List<java.lang.String>> |
getHistory() |
Returns the entire command history cached by this session.
|
long |
getIdleMillis() |
Gets the number of milliseconds since a user entry was registered by this session
|
long |
getInputLoopTime() |
Returns the last time in milliseconds that this session began its input loop.
|
ColorLibrary.ColorState |
getLastColor() |
Returns the previous current color code.
|
java.util.List<java.lang.String> |
getLastMsgs() |
Returns a list of the last several message strings received by this user.
|
long |
getLastNPCFight() |
Gets the milliseconds timestamp since this user last registered a npc fight.
|
long |
getLastPKFight() |
Gets the milliseconds timestamp since this user last registered a pk fight.
|
long |
getMillisOnline() |
Gets the milliseconds elapsed since this user came online.
|
java.util.List<java.lang.String> |
getPreviousCMD() |
Returns a pre-parsed, pre-filtered list of strings
representing the last command entered by the user
through this session.
|
boolean |
getServerTelnetMode(int telnetCode) |
Gets a server telnet mode flag.
|
Session.SessionStatus |
getStatus() |
Gets the tick/thread status of this session object.
|
java.lang.String |
getTerminalType() |
Gets the terminal type the user has
|
long |
getTotalMillis() |
Gets the total milliseconds consumed by this session objects thread.
|
long |
getTotalTicks() |
Gets the total number of ticks consumed by this session object thread.
|
int |
getWrap() |
Gets the column number for engine word-wrapping.
|
char |
hotkey(long maxWait) |
Waits the given milliseconds for a key to be pressed, after which
it returns that key, or \0 if nothing pressed.
|
void |
initializeSession(java.net.Socket s,
java.lang.String groupName,
java.lang.String introTextStr) |
Negotiates various telnet options (or attempts to), and
prints the introTextStr to the user.
|
void |
initTelnetMode(int mobbitmap) |
Initializes a telnet mode between this session and the connected client by negotiating
certain fundamental flags, like ANSI, MXP, and MSP.
|
boolean |
isAfk() |
Returns whether this mob/session is currently Away From Keyboard
|
boolean |
isAllowedMcp(java.lang.String packageName,
float version) |
Returns true if this client supports the given package at the
given version.
|
boolean |
isAllowedMxp(java.lang.String tag) |
Returns true if the given max tag will be accepted by the client.
|
boolean |
isBeingSnoopedBy(Session S) |
Checks to see if the given session is snooping on this one.
|
boolean |
isFake() |
Returns true if this session is merely a placeholder,
and does not represent an actual user connection.
|
boolean |
isLockedUpWriting() |
Checks whether this session is currently over its
time limit trying to write data to its socket.
|
boolean |
isPendingLogin(java.lang.String otherLoginName) |
Returns whether this session is engaged in a login/account
menu transaction.
|
boolean |
isRunning() |
Whether this session is currently actively interacting with the user in
some way -- whether this session currently has "thread time".
|
boolean |
isStopped() |
Returns whether this session is done, or slated to be done.
|
boolean |
isWaitingForInput() |
Returns whether this session is waiting for input
|
void |
logout(boolean removeMOB) |
Allows the user to select a different character, taking them back to the login
prompt, or to the account character listing screen, whichever is appropriate.
|
MOB |
mob() |
Returns the player MOB attached to this session object.
|
void |
negotiateTelnetMode(int telnetCode) |
Change telnet mode by negotiating the command to the clients client.
|
void |
onlyPrint(java.lang.String msg) |
Low level text output method.
|
void |
onlyPrint(java.lang.String msg,
boolean noCache) |
Low level text output method.
|
ColorLibrary.ColorState |
popMarkedColor() |
Returns the marked color code.
|
void |
print(Physical Source,
Environmental Target,
Environmental Tool,
java.lang.String msg) |
Medium-level text output method.
|
void |
print(java.lang.String msg) |
Medium-level text output method.
|
void |
println(Physical Source,
Environmental Target,
Environmental Tool,
java.lang.String msg) |
Medium-level text output method.
|
void |
println(java.lang.String msg) |
Medium-level text output method.
|
void |
prompt(Session.InputCallback callBack) |
Puts the session into an input state, returning immediately.
|
java.lang.String |
prompt(java.lang.String Message) |
Prompts the user to enter a string, and then returns what
the enter.
|
java.lang.String |
prompt(java.lang.String Message,
long maxTime) |
Prompts the user to enter a string, and then returns what
the enter.
|
java.lang.String |
prompt(java.lang.String Message,
java.lang.String Default) |
Prompts the user to enter a string, and then returns what
the enter.
|
java.lang.String |
prompt(java.lang.String Message,
java.lang.String Default,
long maxTime) |
Prompts the user to enter a string, and then returns what
the enter.
|
void |
promptPrint(java.lang.String msg) |
Medium-level text output method.
|
void |
pushMarkedColor(ColorLibrary.ColorState newcolor) |
Sets the marked color code.
|
void |
rawCharsOut(char[] c) |
Lowest level user-output method.
|
void |
rawOut(java.lang.String msg) |
Lowest level user-output method.
|
void |
rawPrint(java.lang.String msg) |
Low level line-output method.
|
void |
rawPrintln(java.lang.String msg) |
Low level line-output method.
|
java.lang.String |
readlineContinue() |
Blocks for a short amount of time, returning an input
string only if the user happens to have hit enter.
|
void |
safeRawPrint(java.lang.String msg) |
Low level line-output method.
|
void |
safeRawPrintln(java.lang.String msg) |
Low level line-output method.
|
boolean |
sendGMCPEvent(java.lang.String eventName,
java.lang.String json) |
Potentially sends the GMCP event of the given name with the given json
doc.
|
boolean |
sendMcpCommand(java.lang.String packageCommand,
java.lang.String parms) |
Sends a properly formatted MCP command to the session, if it or its package is supported.
|
void |
setAccount(PlayerAccount account) |
Sets the player acount attached to this session object.
|
void |
setAfkFlag(boolean truefalse) |
Sets whether this mob/session is currently Away From Keyboard
|
void |
setAFKMessage(java.lang.String str) |
Returns the reason given by the user that they are AFK.
|
void |
setBeingSnoopedBy(Session session,
boolean onOff) |
Notifies this session that the given session is snooping it.
|
void |
setClientTelnetMode(int telnetCode,
boolean onOff) |
Sets a client telnet mode flag.
|
void |
setCurrentColor(ColorLibrary.ColorState newcolor) |
Sets the current color code.
|
void |
setFakeInput(java.lang.String input) |
Send this session fake input as if the user had typed it in.
|
void |
setGroupName(java.lang.String group) |
Sets the group name to which this session belongs
|
void |
setIdleTimers() |
Resets the internal idle timers.
|
void |
setInputLoopTime() |
Sets the last time in milliseconds that this session began its input loop.
|
void |
setLastColor(ColorLibrary.ColorState newColor) |
Returns the previous current color code.
|
void |
setLastNPCFight() |
Sets now as the milliseconds timestamp since this user last registered a npc fight.
|
void |
setLastPKFight() |
Sets now as the milliseconds timestamp since this user last registered a pk fight.
|
void |
setMob(MOB newmob) |
Sets the player MOB attached to this session object.
|
void |
setPromptFlag(boolean truefalse) |
Notifies this session to output the users prompt
again once it has reached a suitable lapse in
text output.
|
void |
setServerTelnetMode(int telnetCode,
boolean onOff) |
Sets a server telnet mode flag.
|
void |
setStatus(Session.SessionStatus newStatus) |
Sets the tick/thread status of this session object.
|
int |
snoopSuspension(int change) |
Increments or decrements the snoop suspension counter
by the given amount.
|
void |
stdPrint(Physical Source,
Environmental Target,
Environmental Tool,
java.lang.String msg) |
Higher-level line output method.
|
void |
stdPrint(java.lang.String msg) |
Higher-level line output method.
|
void |
stdPrintln(Physical Source,
Environmental Target,
Environmental Tool,
java.lang.String msg) |
Higher-level line output method.
|
void |
stdPrintln(java.lang.String msg) |
Higher-level line output method.
|
void |
stopSession(boolean removeMOB,
boolean dropSession,
boolean killThread) |
Force the current player to logoff, end the session, and/or kill the thread.
|
void |
wraplessPrint(java.lang.String msg) |
Medium-level text output method.
|
void |
wraplessPrintln(java.lang.String msg) |
Medium-level text output method.
|
copyOf, ID, initializeClass, name, newInstance
activeTimeMillis, getGroupID, getStartTime
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
static final int TELNET_BINARY
static final int TELNET_ECHO
static final int TELNET_LOGOUT
static final int TELNET_SUPRESS_GO_AHEAD
static final int TELNET_TERMTYPE
static final int TELNET_NAWS
static final int TELNET_TOGGLE_FLOW_CONTROL
static final int TELNET_LINEMODE
static final int TELNET_MSDP
static final int TELNET_MSSP
static final int TELNET_COMPRESS
static final int TELNET_COMPRESS2
static final int TELNET_MSP
static final int TELNET_MXP
static final int TELNET_AARD
static final int TELNET_SE
static final int TELNET_AYT
static final int TELNET_EC
static final int TELNET_ATCP
static final int TELNET_GMCP
static final int TELNET_SB
static final int TELNET_WILL
static final int TELNET_WONT
static final int TELNET_ANSI16
static final int TELNET_DO
static final int TELNET_ANSI
static final int TELNET_DONT
static final int TELNET_GA
static final int TELNET_NOP
static final int TELNET_IAC
static final java.lang.String[] TELNET_DESCS
static final java.lang.String MSDP_CHARSET
static final byte[] TELNETBYTES_GMCP_HEAD
static final byte[] TELNETBYTES_END_SB
static final byte[] TELNETGABYTES
static final int MAX_PREVMSGS
static final int TELNET_LINEMODE_MODE
static final int TELNET_LINEMODE_MODEMASK_EDIT
static final int TELNET_LINEMODE_MODEMASK_TRAPSIG
static final int TELNET_LINEMODE_MODEMASK_ACK
static final int TELNET_LINEMODE_SLC
static final int TELNET_LINEMODE_SLC_DEFAULT
static final int TELNET_LINEMODE_SLC_VALUE
static final int TELNET_LINEMODE_SLC_CANTCHANGE
static final int TELNET_LINEMODE_SLC_NOSUPPORT
static final int TELNET_LINEMODE_SLC_ACK
static final int TELNET_LINEMODE_SLC_XON
static final int TELNET_LINEMODE_SLC_XOFF
static final int TELNET_LINEMODE_SLC_EOF
static final int TELNET_LINEMODE_SLC_SUSP
static final int TELNET_LINEMODE_SLC_BRK
static final int TELNET_LINEMODE_SLC_IP
static final int TELNET_LINEMODE_SLC_AO
static final int TELNET_LINEMODE_SLC_AYT
static final int TELNET_LINEMODE_SLC_EOR
static final char MSDP_VAR
static final char MSDP_VAL
static final char MSDP_TABLE_OPEN
static final char MSDP_TABLE_CLOSE
static final char MSDP_ARRAY_OPEN
static final char MSDP_ARRAY_CLOSE
void initializeSession(java.net.Socket s, java.lang.String groupName, java.lang.String introTextStr)
s
- the socket the user connected fromgroupName
- the name of the thread group the session goes tointroTextStr
- introductory text string (Hello!)java.lang.String getGroupName()
void setGroupName(java.lang.String group)
group
- the thread group namejava.lang.String[] getColorCodes()
void onlyPrint(java.lang.String msg, boolean noCache)
msg
- the string to send to the usernoCache
- true to disable line caching, false otherwiserawCharsOut(char[])
void onlyPrint(java.lang.String msg)
msg
- the string to send to the useronlyPrint(String, boolean)
void rawOut(java.lang.String msg)
msg
- the string to send to the userrawCharsOut(char[])
void rawPrintln(java.lang.String msg)
msg
- the string to send to the userrawPrintln(String)
void rawPrint(java.lang.String msg)
msg
- the string to send to the userrawPrint(String)
void safeRawPrintln(java.lang.String msg)
msg
- the string to send to the usersafeRawPrint(String)
void safeRawPrint(java.lang.String msg)
msg
- the string to send to the usersafeRawPrintln(String)
void stdPrint(java.lang.String msg)
msg
- the string to send to the userrawPrint(String)
void stdPrint(Physical Source, Environmental Target, Environmental Tool, java.lang.String msg)
Source
- variable for special code parsing: SourceTarget
- variable for special code parsing: TargetTool
- variable for special code parsing: Toolmsg
- the string to send to the userrawPrint(String)
void stdPrintln(java.lang.String msg)
msg
- the string to send to the userrawPrintln(String)
void stdPrintln(Physical Source, Environmental Target, Environmental Tool, java.lang.String msg)
Source
- variable for special code parsing: SourceTarget
- variable for special code parsing: TargetTool
- variable for special code parsing: Toolmsg
- the string to send to the userrawPrintln(String)
void rawCharsOut(char[] c)
c
- string (as char array) to send out to the userboolean isLockedUpWriting()
boolean isFake()
boolean addSessionFilter(Session.SessionFilter filter)
filter
- the filter to addboolean isPendingLogin(java.lang.String otherLoginName)
otherLoginName
- another login name potentially matchboolean autoLogin(java.lang.String name, java.lang.String password)
name
- the usernamepassword
- the passwordvoid print(java.lang.String msg)
msg
- the string to send to the useronlyPrint(String, boolean)
,
promptPrint(String)
void promptPrint(java.lang.String msg)
msg
- the string to send to the useronlyPrint(String, boolean)
void print(Physical Source, Environmental Target, Environmental Tool, java.lang.String msg)
Source
- variable for special code parsing: SourceTarget
- variable for special code parsing: TargetTool
- variable for special code parsing: Toolmsg
- the string to send to the useronlyPrint(String, boolean)
void println(java.lang.String msg)
msg
- the string to send to the useronlyPrint(String, boolean)
void println(Physical Source, Environmental Target, Environmental Tool, java.lang.String msg)
Source
- variable for special code parsing: SourceTarget
- variable for special code parsing: TargetTool
- variable for special code parsing: Toolmsg
- the string to send to the useronlyPrint(String, boolean)
void setPromptFlag(boolean truefalse)
truefalse
- true to send another prompt, false otherwisevoid wraplessPrintln(java.lang.String msg)
msg
- the string to send to the useronlyPrint(String, boolean)
void wraplessPrint(java.lang.String msg)
msg
- the string to send to the useronlyPrint(String, boolean)
void colorOnlyPrintln(java.lang.String msg, boolean noCache)
msg
- the string to send to the usernoCache
- true to disable line caching, false otherwiseonlyPrint(String, boolean)
void colorOnlyPrint(java.lang.String msg, boolean noCache)
msg
- the string to send to the usernoCache
- true to disable line caching, false otherwiseonlyPrint(String, boolean)
void colorOnlyPrintln(java.lang.String msg)
msg
- the string to send to the useronlyPrint(String, boolean)
void colorOnlyPrint(java.lang.String msg)
msg
- the string to send to the useronlyPrint(String, boolean)
char hotkey(long maxWait)
maxWait
- the maximum milliseconds to waitjava.lang.String prompt(java.lang.String Message, java.lang.String Default) throws java.io.IOException
Message
- the prompt message to display to the userDefault
- the default response if the user just hits enterjava.io.IOException
- a disconnectprompt(String)
,
prompt(String, long)
,
prompt(String, String, long)
void prompt(Session.InputCallback callBack)
callBack
- the callback to modify and make when doneSession.InputCallback
java.lang.String prompt(java.lang.String Message, java.lang.String Default, long maxTime) throws java.io.IOException
Message
- the prompt message to display to the userDefault
- the default response if the user just hits entermaxTime
- max number of milliseconds to wait before timing outjava.io.IOException
- a disconnect or time outprompt(String)
,
prompt(String, String)
,
prompt(String, long)
java.lang.String prompt(java.lang.String Message) throws java.io.IOException
Message
- the prompt message to display to the userjava.io.IOException
- a disconnectprompt(String, String)
,
prompt(String, long)
,
prompt(String, String, long)
java.lang.String prompt(java.lang.String Message, long maxTime) throws java.io.IOException
Message
- the prompt message to display to the usermaxTime
- max number of milliseconds to wait before timing outjava.io.IOException
- a disconnect or time outprompt(String)
,
prompt(String, String)
,
prompt(String, String, long)
boolean confirm(java.lang.String Message, java.lang.String Default) throws java.io.IOException
Message
- the prompt message to display to the userDefault
- the default response if the user just hits enterjava.io.IOException
- a disconnectconfirm(String, String, long)
boolean confirm(java.lang.String Message, java.lang.String Default, long maxTime) throws java.io.IOException
Message
- the prompt message to display to the userDefault
- the default response if the user just hits entermaxTime
- max number of milliseconds to wait before timing outjava.io.IOException
- a disconnect or time outconfirm(String, String)
java.lang.String choose(java.lang.String Message, java.lang.String Choices, java.lang.String Default) throws java.io.IOException
Message
- the prompt message to display to the userChoices
- a list of uppercase characters that may be enteredDefault
- the default response if the user just hits enterjava.io.IOException
- a disconnectchoose(String, String, String, long)
java.lang.String choose(java.lang.String Message, java.lang.String Choices, java.lang.String Default, long maxTime, java.util.List<java.lang.String> paramsOut) throws java.io.IOException
Message
- the prompt message to display to the userChoices
- a list of uppercase characters that may be enteredDefault
- the default response if the user just hits entermaxTime
- max number of milliseconds to wait before timing outparamsOut
- an empty list to put any extra crap added to the end of the choice.java.io.IOException
- a disconnectchoose(String, String, String, long)
java.lang.String choose(java.lang.String Message, java.lang.String Choices, java.lang.String Default, long maxTime) throws java.io.IOException
Message
- the prompt message to display to the userChoices
- a list of uppercase characters that may be enteredDefault
- the default response if the user just hits entermaxTime
- max number of milliseconds to wait before timing outjava.io.IOException
- a disconnect or time outchoose(String, String, String)
void setBeingSnoopedBy(Session session, boolean onOff)
session
- the session to snoop on me.onOff
- true to turn on snooping, false otherwisesetBeingSnoopedBy(Session, boolean)
,
isBeingSnoopedBy(Session)
,
snoopSuspension(int)
boolean isBeingSnoopedBy(Session S)
S
- the session to check for a snoop on me.setBeingSnoopedBy(Session, boolean)
,
isBeingSnoopedBy(Session)
,
snoopSuspension(int)
int snoopSuspension(int change)
change
- the amount to change the snoop suspension counter bysetBeingSnoopedBy(Session, boolean)
,
isBeingSnoopedBy(Session)
,
snoopSuspension(int)
void stopSession(boolean removeMOB, boolean dropSession, boolean killThread)
removeMOB
- true to remove the mob from the gamedropSession
- true to force closed sockets, and removed sessionkillThread
- true to force a thread death, and false to be more lenientisStopped()
boolean isStopped()
logout(boolean)
,
isStopped()
void logout(boolean removeMOB)
removeMOB
- true to remove the mob from the gameboolean isAfk()
setAfkFlag(boolean)
,
setAFKMessage(String)
void setAfkFlag(boolean truefalse)
truefalse
- true if they are AFK, false otherwiseisAfk()
,
getAfkMessage()
java.lang.String getAfkMessage()
setAfkFlag(boolean)
,
setAFKMessage(String)
void setAFKMessage(java.lang.String str)
str
- the reason given by the user that they are AFK.setAfkFlag(boolean)
,
getAfkMessage()
java.lang.String blockingIn(long timeoutMillis, boolean filter) throws java.io.IOException
timeoutMillis
- milliseconds before InterruptedIOException thrownfilter
- true to allow normal coffeemud input filteringjava.io.IOException
- any exception generated during inputjava.lang.String readlineContinue() throws java.io.IOException, java.net.SocketException
java.io.IOException
- exceptions thrown, typically a timeoutjava.net.SocketException
- exceptions thrown, typically socket errorjava.util.List<java.lang.String> getPreviousCMD()
MOB mob()
setMob(MOB)
void setMob(MOB newmob)
newmob
- the player MOB attached to this session object.mob()
void setAccount(PlayerAccount account)
account
- the player account attached to this session object.mob()
ColorLibrary.ColorState getCurrentColor()
void setCurrentColor(ColorLibrary.ColorState newcolor)
newcolor
- the color to change it toColorLibrary.ColorState popMarkedColor()
void pushMarkedColor(ColorLibrary.ColorState newcolor)
newcolor
- the color to change it toColorLibrary.ColorState getLastColor()
void setLastColor(ColorLibrary.ColorState newColor)
newColor
- the color to change it toint getWrap()
java.lang.String getAddress()
Session.SessionStatus getStatus()
Session.SessionStatus
void setStatus(Session.SessionStatus newStatus)
newStatus
- the tick statusSession.SessionStatus
boolean isWaitingForInput()
long getTotalMillis()
long getTotalTicks()
long getIdleMillis()
setIdleTimers()
void setIdleTimers()
getIdleMillis()
long getMillisOnline()
long getLastPKFight()
setLastPKFight()
,
setLastNPCFight()
void setLastPKFight()
getLastPKFight()
,
getLastNPCFight()
long getLastNPCFight()
setLastPKFight()
,
setLastNPCFight()
void setLastNPCFight()
getLastPKFight()
,
getLastNPCFight()
long getInputLoopTime()
setInputLoopTime()
void setInputLoopTime()
getInputLoopTime()
boolean isRunning()
java.util.List<java.lang.String> getLastMsgs()
java.lang.String getTerminalType()
void setServerTelnetMode(int telnetCode, boolean onOff)
telnetCode
- the telnet codeonOff
- true to turn on, false to turn off the flagTELNET_ANSI
,
getServerTelnetMode(int)
boolean getServerTelnetMode(int telnetCode)
telnetCode
- the telnet codeTELNET_ANSI
,
setServerTelnetMode(int, boolean)
void setClientTelnetMode(int telnetCode, boolean onOff)
telnetCode
- the telnet codeonOff
- true to turn on, false to turn off the flagTELNET_ANSI
,
getClientTelnetMode(int)
boolean getClientTelnetMode(int telnetCode)
telnetCode
- the telnet codeTELNET_ANSI
,
setClientTelnetMode(int, boolean)
void changeTelnetMode(int telnetCode, boolean onOff)
telnetCode
- the telnet codeonOff
- true to turn on, false to turn off the flagTELNET_ANSI
,
TELNET_ANSI16
,
setClientTelnetMode(int, boolean)
,
setServerTelnetMode(int, boolean)
void negotiateTelnetMode(int telnetCode)
telnetCode
- the telnet codeTELNET_ANSI
,
TELNET_ANSI16
,
setClientTelnetMode(int, boolean)
,
setServerTelnetMode(int, boolean)
void initTelnetMode(int mobbitmap)
mobbitmap
- the mobbitmap the bitmap of mob flags to use as a guide in negotiationMOB.getAttributesBitmap()
,
MOB.Attrib
,
changeTelnetMode(int, boolean)
boolean isAllowedMxp(java.lang.String tag)
tag
- the tag to checkboolean isAllowedMcp(java.lang.String packageName, float version)
packageName
- the package to checkversion
- the version of the package to checkboolean sendMcpCommand(java.lang.String packageCommand, java.lang.String parms)
packageCommand
- the fully formed commandparms
- the variable parameters, already well formedboolean sendGMCPEvent(java.lang.String eventName, java.lang.String json)
eventName
- the event name, like comm.channeljson
- the json doc, like {"blah":"BLAH"}java.util.Enumeration<java.util.List<java.lang.String>> getHistory()
void setFakeInput(java.lang.String input)
input
- text to send.