|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.appius.user.GeneralUser
org.starhope.appius.user.User
public abstract class User
This class encapsulates all of the user/player information for the game. Most of the neat stuff is in UserRecord now, though.
UserRecord,
AbstractUser,
Serialized Form| Field Summary | |
|---|---|
private Gender |
gender
gender of the user |
private List<String> |
ignoreList
List of users being ignored |
private Timestamp |
lastActive
the time at which the user last was logged on, or the current time (plus 5 seconds) if they're on now. |
static int |
MAX_LOGIN_LENGTH
Maximum length of a login/username (in characters) |
static int |
MAX_PW_LENGTH
Maximum length of a password (in characters) |
static int |
MIN_LOGIN_LENGTH
Minimum length of a login/username (in characters) |
static int |
MIN_PW_LENGTH
Minimum length of a password (in characters) |
private int |
mySerial
unique instance ID |
private long |
pathController
Are we being controlled by a pathing routine? This should be the timer event for the next path-finding Kalendor
Activity. |
Semaphore |
positioning
Semaphore to lock down positioning updates by physics and such |
private long |
roundTripLag
round-trip lag/latency to/from the client |
private static AtomicInteger |
serial
the instantiation serial number for the next user instantiated |
private static long |
serialVersionUID
Serial Version Unique Identifier for Java Serialization. |
(package private) ServerThread |
serverThread
The server thread through which this user is connected. |
static int |
STAFF_LEVEL_ACCOUNT_SERVICE
Staff level for users able to view account (subscription) data |
static int |
STAFF_LEVEL_DESIGNER
Staff level for users able to edit the game world |
static int |
STAFF_LEVEL_DEVELOPER
Staff level for software developers |
static int |
STAFF_LEVEL_MODERATOR
Staff level for moderators (including life guards and tour guides) |
static int |
STAFF_LEVEL_PUBLIC
Staff level for public users (free or paid users) |
static int |
STAFF_LEVEL_STAFF_MEMBER
Staff level for all members of the staff (Sidereal employees) |
private boolean |
usePathFinder
Deprecated. testing only |
| Fields inherited from class org.starhope.appius.user.GeneralUser |
|---|
baseDefenses, baseStats, collisionBounds, currentRoom, facing, lastUserMovement, location, pathFinder, target, travelStartTime, userRecord, userVariables |
| Constructor Summary | |
|---|---|
protected |
User(Date birthDate1,
String avatarTitle,
String userNameRequest,
String passwordAnswer,
String passwordQuestion,
String password)
Create a new user account |
|
User(int id)
Instantiate a user object from an existing user account ID |
|
User(String newUserLogin)
Instantiate a user object from an existing user account ID |
|
User(UserRecord rec)
Instantiate the user who goes with a given record. |
| Method Summary | |
|---|---|
void |
acceptErrorReply(String command,
String error,
org.json.JSONObject result,
Room room)
|
void |
acceptGameAction(AbstractUser sender,
org.json.JSONObject action)
This is an overriding method. |
void |
acceptGameStateChange(GameEvent gameCode,
GameStateFlag gameState)
Notification of a GameEvent changing state for the room |
void |
acceptMessage(String title,
String caption,
String message)
Accept an administrative/moderator message with the full range of options. |
void |
acceptObjectJoinRoom(Room room,
AbstractUser object)
Accept notification of a user or object joining the room. |
void |
acceptObjectJoinRoom(Room room,
RoomListener object)
Notification that someone has entered the room. |
void |
acceptObjectPartRoom(Room room,
RoomListener object)
Accept notification of a user or object departing the room. |
void |
acceptOutOfBandMessage(AbstractUser sender,
Room room,
org.json.JSONObject body)
Accept an out-of-band message from a room. |
void |
acceptPrivateMessage(AbstractUser from,
String message)
Accept an incoming private message (“whisper”) from another user. |
void |
acceptPublicMessage(AbstractUser sender,
Room room,
String message)
This is an overriding method. |
void |
acceptPublicMessage(AbstractUser speaker,
String message)
This is an overriding method. |
void |
acceptSuccessReply(String command,
org.json.JSONObject jsonData,
Room room)
|
void |
acceptUserAction(Room r,
AbstractUser u)
User actions (go/do actions) propagate through this channel. |
void |
acceptUserVariableUpdate(AbstractUser user,
String varName,
String varValue)
This is an overriding method. |
void |
addBuddy(AbstractUser newBuddy)
Adds a user to this user's buddy list. |
void |
addDefaultFreeItem(int id)
Deprecated. use Inventory.addDefaultFreeItem(int, boolean) |
void |
addDefaultFreeItem(int id,
boolean forceActive)
Deprecated. use Inventory#addDefaultFreeItem(int,boolean) |
protected void |
addFreeClothing(InventoryItem clothingItem)
Deprecated. use Inventory.addDefaultFreeItem(int, boolean) |
void |
addGiftSubscription(int months,
int days)
Create a gift subscription for a user, to last the given number of months plus the given number of days. |
void |
addItem(int itemID)
Deprecated. use Inventory.add(InventoryItem) |
void |
addItem(InventoryItem item)
Deprecated. use Inventory.add(InventoryItem) |
void |
addRoom(int roomNumber)
|
void |
affirmFreeMember()
Affirm that this is a free (non-premium) member and remove clothing and patterns. |
void |
affirmPaidMember()
Ensure that this user has the benefits of being a paid member, effective immediately |
void |
approveName(AbstractUser abstractUser)
Approve the user's requested name, and make it active |
static void |
assertUserNameAvailable(String userNameRequested)
Deprecated. Use Nomenclator.assertLoginAvailable(String)
instead |
void |
ban(AbstractUser bannedBy,
String bannedReason)
Ban a user, preventing any future access to the server. |
void |
blog(String message)
send a message with various debugging information to the journals |
boolean |
canContact()
Can this person be contacted for marketing and other purposes? |
boolean |
canLogIn(String passGuess)
Determine whether the user can log in with the given password. |
boolean |
canMakePurchase()
Only adults are allowed to make purchases. |
static boolean |
canSeeSmartFoxServer()
Deprecated. |
boolean |
canTalk()
|
Room |
changeRoom(Room room)
Deprecated. use setRoom(Room) |
boolean |
checkPassword(String passwordGuess)
Returns true if the password is correct. |
static void |
configUpdated()
This is the callback that is called whenever the AppiusConfig reloads the configuration or has a runtime configuration value changed. |
static AbstractUser |
create(Date date,
String string,
String nick)
Deprecated. Use Nomenclator.create(Date,String,String)
instead |
boolean |
deleteMail(int messageID)
Mark a message as being deleted in the messages database. |
void |
doffClothes()
Get naked |
void |
doTransport()
WRITEME |
void |
enablePathFinder(boolean b)
Deprecated. testing only |
boolean |
equals(Object o)
This is an overriding method. |
boolean |
equals(User o)
Determine if two user objects are identical. |
void |
equip(InventoryItem item)
Equip an item |
boolean |
forgotPassword(String forgottenPasswordQ,
String forgottenPasswordA)
Send the user their forgotten password if they know the answer to their secret question. |
void |
generateSystemName()
Deprecated. Use UserRecord.generateSystemName()
instead |
static AbstractUser |
get(org.json.JSONObject object)
Deprecated. Use Nomenclator.get(JSONObject) instead |
org.json.JSONObject |
getActiveClothing()
Deprecated. use Inventory.getActiveClothing_JSON() |
Collection<InventoryItem> |
getActiveDecorations(int roomNumber)
get the decorations active (placed) in a room of this user's house |
InventoryItem |
getActiveItemByType(String oneTypeString)
Deprecated. use Inventory.getActiveItemsByType(InventoryItemType) |
Collection<InventoryItem> |
getActiveItemsByType(InventoryItemType t)
Returns the active item for an item type. |
Collection<InventoryItem> |
getActiveItemsByType(String t)
Deprecated. use getActiveItemsByType(InventoryItemType) |
int |
getAge()
Get the current age of the user. |
AgeBracket |
getAgeGroup()
Get the user's age bracket. |
abstract String |
getApprovalCookie()
Get a cookie object for sending mail. |
Date |
getApprovedDate()
|
String |
getApprovedDateString()
|
AvatarClass |
getAvatarClass()
|
String |
getAvatarLabel()
This is an overriding method. |
Colour |
getBaseColor()
get the base colour for this avatar (typically, a skin colour) |
Date |
getBirthDate()
|
Collection<String> |
getBuddyListNames()
Get the names of everyone on the user's buddy list. |
String[] |
getBuddyListNamesAsArray()
Get the names of everyone on the user's buddy list. |
static AbstractUser |
getByID(int id)
Deprecated. Use Nomenclator.getUserByID(int) instead |
static AbstractUser |
getByLogin(String login)
Deprecated. Use Nomenclator.getUserByLogin(String)
instead |
static AbstractUser[] |
getByMail(String mail)
Deprecated. Use Nomenclator.getUsersByMail(String)
instead |
static AbstractUser |
getByRequestedName(String userNameRequested)
Deprecated. Use Nomenclator.getUserByRequestedName(String)
instead |
Colour |
getChatBG()
|
Colour |
getChatFG()
|
String |
getConfirmationTemplate()
This is an overriding method. |
String |
getConnectedFrom()
Get the IP address or hostname from which the user is connected (if we can tell). |
String |
getDebugName()
This is an overriding method. |
String |
getDialect()
Get this person's preferred language-dialect. |
String |
getDisplayName()
Get the name to be displayed in user interface for this person. |
Date |
getEmailPlusDate()
|
String |
getEmailPlusDateString()
|
Colour |
getExtraColor()
|
String |
getFacing()
Get the string identifying the direction which this object is facing. |
String |
getForgotPasswordAnswer()
Get the forgotten password question |
String |
getForgotPasswordQuestion()
Get the forgotten password question |
InventoryItem |
getFurnitureBySlot(int slotNumber)
Get a home décor (furniture or structure) item from this user's inventory by its slot number |
boolean |
getGameFlag(String name)
Return the status of the indicated game flag. |
Gender |
getGender()
|
String |
getGivenName()
|
HashMap<Timestamp,HashMap<String,String>> |
getHistory(Date after,
int limit)
Returns the historical contents of this user's record. |
static int |
getIDForLiveUserName(String name)
Deprecated. Use Nomenclator.getIDForLiveUserName(String)
instead |
static int |
getIDForLogin(String name)
Deprecated. Use Nomenclator.getUserIDForLogin(String)
instead |
static int |
getIDForUserName(String name)
Deprecated. Nomenclator.getUserIDForLogin(String) |
Inventory |
getInventory()
WRITEME: document this method (brpocock@star-hope.org, Feb 19, 2010) |
String |
getIpAddress()
Deprecated. Smart Fox Server misspelling of getIPAddress() |
String |
getIPAddress()
|
int |
getKickedByUserID()
|
String |
getKickedMessage()
|
String |
getKickedReasonCode()
|
Timestamp |
getKickedUntil()
|
long |
getLag()
|
String |
getLanguage()
|
Timestamp |
getLastActive()
|
String |
getLastZone()
|
Coord3D |
getLocation()
Gets the current start coördinates |
String |
getLogin()
|
String |
getMail()
|
Date |
getMailConfirmed()
|
int |
getMySerial()
|
String |
getName()
|
Timestamp |
getNameApprovedAt()
|
long |
getNameApprovedByUserID()
|
Timestamp |
getNameRequestedAt()
|
static AbstractUser |
getOnlineUserByLogin(String login)
Deprecated. Use Nomenclator.getOnlineUserByLogin(String)
instead |
static Colour |
getOutlineColourForBaseColour(Colour baseColour)
Based upon configuration settings, determine the outline colour for a given base colour |
Parent |
getParent()
|
boolean |
getParentApprovedName()
|
int |
getParentID()
|
org.json.JSONObject |
getPassport_JSON()
|
String |
getPassword()
|
String |
getPotentialUserName()
This is an overriding method. |
String |
getReferer()
Get the referral/affiliate code from this user's initial signup |
static String |
getRev()
|
long |
getRoundTripLag()
|
long |
getSerial()
Get the unique instance serial number for this instance of this user. |
ServerThread |
getServerThread()
Get the Appius Claudius Caecus server thread (if any) associated with this User (if they are logged-in). |
String |
getSubversionRevision()
Return the Subversion revision level of this class's source code file, as supplied via the special "$Rev: " sequence. |
static AbstractUser |
getSystemUser()
Deprecated. Use Nomenclator.getSystemUser() instead |
Collection<UserEnrolment> |
getUserEnrolments()
|
UserEnrolment[] |
getUserEnrolmentsAsArray()
|
static String |
getUserNameForID(int id)
Deprecated. Use Nomenclator.getLoginForID(int) instead |
String |
getUserNameOrRequest()
return the user's login name, if they have one; or the name that they have requested, if it hasn't been approved yet. |
static Collection<AbstractUser> |
getUsersAwaitingNameApproval()
Get up to 20 users who are awaiting approval of their names. |
Map<String,String> |
getUserVariables()
Deprecated. use getVariables for consistency |
static String[] |
getZ$Z()
Z$Z |
Zone |
getZone()
Get the user's current Zone, if the user is online. |
Coord3D |
handleWalkFail(Room room,
Coord3D to)
Called from pathfinders and rooms when the user tries to go someplace and can't get there, to allow them to plot a course around obstacles. |
int |
hashCode()
Get a (hopefully unique) hash code for this user. |
boolean |
hasItem(int id)
Deprecated. use Inventory.hasItem(int) |
boolean |
hasItem(InventoryItem item)
Deprecated. use Inventory.hasItem(int) |
private boolean |
ignoring(AbstractUser speaker)
|
boolean |
isBanned()
|
boolean |
isBirthday()
|
boolean |
isCanceled()
|
boolean |
isCanContact()
Deprecated. use canContact() |
boolean |
isCanEnterChatZone()
Deprecated. GeneralUser.canEnterChatZone() |
boolean |
isCanEnterMenuZone()
Deprecated. use GeneralUser.canEnterMenuZone() |
boolean |
isCanTalk()
|
boolean |
isEphemeral()
|
static boolean |
isItGood()
Perform basic self-tests upon the User database to identify whether things are good enough to proceed with booting. |
boolean |
isKicked()
Returns true if the user has been kicked offline (and the time has not yet elapsed). |
static boolean |
isNameAvailable(String name)
Deprecated. Use Nomenclator.isLoginAvailable(String)
instead |
static boolean |
isNameForbidden(String userNameRequested)
Deprecated. Use Nomenclator.isLoginForbidden(String)
instead |
static boolean |
isNameValid(String userName)
Determines whether the name provided contains allowed characters for an user name. |
boolean |
isNeedsNaming()
Returns whether this account has a system-provided (not user-provided) name, or no name at all, and we need to prompt the user (or parent) to name it. |
boolean |
isNeedsParentAttention()
|
boolean |
isNPC()
Determine whether this user is a player-character, or non-player-character. |
boolean |
isOnline()
WRITEME: document this method (brpocock@star-hope.org, Oct 31, 2009) |
boolean |
isPaidMember()
|
void |
kick(AbstractUser u,
String kickReason,
int duration)
This is an overriding method. |
void |
kick(AbstractUser kickedBy,
String kickedReason,
long kickedMinutes)
Kick a user offline for a number of minutes. |
void |
kick(AbstractUser kickedBy,
String kickedReason,
Timestamp allowBack)
Kick the user offline, until a certain date & time. |
void |
liftBan(AbstractUser authority)
Lift the ban upon this user. |
void |
local_create()
Hook for special stuff to be done right after a new user account is created |
void |
loggedIn(String zoneName,
ServerThread newServerThread)
|
void |
loggedIn(String zoneName,
SocketChannel channel)
Deprecated. |
String |
login(String chapSeed,
String passwordGuess)
Validate the user's login attempt, returning a failure message if it could not happen (e.g. |
boolean |
nameNeedsApproval()
Returns true if this user has requested a name but it hasn't yet been approved by a Lifeguard |
boolean |
nameNeedsParentalApproval()
|
boolean |
needsNaming()
Returns whether this account has a system-provided (not user-provided) name, or no name at all, and we need to prompt the user (or parent) to name it. |
void |
notifyFurnitureInventory(Room room)
sent notification of the furniture inventory |
void |
parentApprovedAccount(boolean whether)
Call this method when the parent determines whether to approve or disapprove this account. |
void |
parentApprovedName(boolean whether)
|
void |
postLoginGlobal()
Perform global post-login handling — right now, just sends the Message of the Day if the zone isn't a "$" zone. |
void |
remindPassword()
This is an overriding method. |
void |
removeBuddy(AbstractUser otherGuy)
Don't want for him to be my buddy any more |
void |
rename(String newName)
Rename the user account, updating all necessary related records. |
void |
reportedToModeratorBy(AbstractUser u)
Another user reported this user. |
void |
reportedToModeratorBy(AbstractUser u,
String reason)
twheys@gmail.com Feb 17, 2010 |
void |
requestNewUserName(String userNameRequested)
Post a request to the lifeguards to get approval of a user name |
void |
requestParentApproval()
request parent approval |
void |
sendConfirmationForPremium()
Send a confirmation eMail for a premium user. |
void |
sendConfirmationMail()
Sends confirmation mail to whomever should receive it |
void |
sendEarnings(Room room,
String string)
|
void |
sendGameAction(GeneralUser from,
org.json.JSONObject data)
Deprecated. |
void |
sendMigrate(AbstractZone refugeeZone)
Send a notification to the user that s/he should reconnect to a different zone |
void |
sendOops()
WRITEME |
void |
sendPrivateMessage(AbstractUser from,
String message)
Deprecated. |
void |
sendPublicMessage(GeneralUser from,
String speech)
Deprecated. use acceptPublicMessage(AbstractUser, String) |
void |
sendResponse(org.json.JSONObject result)
|
void |
sendResponse(org.json.JSONObject result,
int room)
Deprecated. use sendResponse(JSONObject) |
void |
sendStaffPasswordReset()
Sends mail to user or parent when a staff member resets their password. |
private void |
sendSuccessReply(String source,
org.json.JSONObject reply,
AbstractUser sender,
int room)
Send a “success” reply to the client if one is connected |
void |
sendWardrobe()
WRITEME |
void |
sentConfirmationMail()
WRITEME: document this method (brpocock@star-hope.org, Sep 25, 2009) |
void |
setActive(boolean isActive1)
|
AgeBracket |
setAgeGroup()
Sets the age group based upon the user's date of birth. |
void |
setAgeGroupToSystem()
WRITEME |
void |
setApprovedDate(Date date)
|
void |
setAvatarClass(AvatarClass avatarClass)
set the avatar class for this user |
void |
setBaseColor(Colour newBaseColor)
WRITEME |
void |
setBirthDate(Date birthDate1)
|
void |
setCanceled(boolean isCanceled1)
|
void |
setCanContact(boolean canContact1)
|
void |
setCanEnterChatZone(boolean canEnterChatZone1)
|
void |
setCanEnterMenuZone(boolean canEnterMenuZone1)
|
void |
setCanTalk(boolean canTalk1)
WRITEME |
void |
setChatBG(Colour newChatBG)
|
void |
setChatFG(Colour newChatFG)
|
void |
setEmailPlusDate(Date emailPlusDate1)
|
void |
setExtraColor(Colour extraColor1)
|
void |
setFacing(String newFacing)
|
void |
setForgotPasswordAnswer(String answer)
WRITEME: document this method (brpocock@star-hope.org, Sep 25, 2009) |
void |
setForgotPasswordQuestion(String question)
WRITEME: document this method (brpocock@star-hope.org, Sep 25, 2009) |
void |
setGender(Gender setGender)
|
void |
setGivenName(String givenName1)
|
void |
setLastActive()
WRITEME |
(package private) void |
setLastActive(Timestamp timestamp)
|
void |
setLocation(Coord3D coord3d)
Set the user's location; but note that you should be using Room.putHere(AbstractUser, Coord3D) to position a
player |
void |
setLoggedIn(String ipAddress,
String zone)
Notify the multiverse that the user is logging in |
void |
setLogin(String from,
String zone)
Deprecated. use setLoggedIn(String, String) — less
ambiguous/misleading name |
void |
setLot(int newLotID)
Deprecated. use UserHouse.setLotID(int) |
void |
setLotID(int newLotID)
Deprecated. use UserHouse#setLotID (int) |
void |
setMail(String newMail)
WRITEME |
void |
setMailConfirmed(Date mailConfirmed1)
Sets the user capabilities to allow talking, and permits the user entry into both chat zones and menu-chat-only zones. |
void |
setMailConfirmSent(Date date)
|
boolean |
setNeedsNaming(boolean needsNaming1)
|
void |
setParent(Parent parent)
Set this to be a child account with the specified parent. |
void |
setParentByParent(Parent parent)
Set this to be a child account with the specified parent. |
void |
setPassword(String password1)
Changes the person's password |
void |
setPasswordAndPasswordRecovery(String question,
String answer,
String newPassword)
|
void |
setPasswordRecovery(String forgottenPasswordQuestion,
String forgottenPasswordAnswer)
Set the password-recovery question and answer pair |
String |
setRandomPassword()
WRITEME: document this method (brpocock@star-hope.org, Sep 25, 2009) |
void |
setReferer(String theReferer)
Set the referrer from whom we were sent this new user. |
void |
setRegisteredAt(Timestamp newRegisteredAt)
|
int |
setRoom(Room room)
Set the user's current room to the given room. |
void |
setRoundTripLag(long l)
Update the lag time associated with this user |
void |
setServerThread(ServerThread serverThread2)
Set the server thread controlling this user. |
void |
setStaffLevel(int newStaffLevel)
|
void |
setStartT(long when)
This is an overriding method. |
void |
setStructure(InventoryItem item)
Activate one structural element in lieu of any others that occupy the same slot. |
protected void |
setSubclassValues(ResultSet resultSet)
Set the values specific to a subclass of User |
void |
setTravelStart(long l)
WRITEME: Document this method brpocock@star-hope.org |
void |
setUserName(String newLogin)
|
void |
setUserNameFromUser(String userRequestedLogin)
Set a user name, requested by the user. |
void |
speak(Room room,
String string)
|
void |
startEnrolment(UserEnrolment userEnrolment)
|
org.json.JSONObject |
toJSON()
|
org.json.JSONObject |
toJSONRef()
This is analogous to toSFSXML() for the pure JSON “to
infinity and beyond” interface |
String |
toSFSXML()
|
String |
toString()
|
void |
updateWallet()
review your current wallet currency amounts, they may have changed |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.starhope.appius.user.AbstractPerson |
|---|
getResponsibleMail |
| Field Detail |
|---|
public static final int MAX_LOGIN_LENGTH
public static final int MAX_PW_LENGTH
public static final int MIN_LOGIN_LENGTH
public static final int MIN_PW_LENGTH
private static AtomicInteger serial
private static final long serialVersionUID
public static final int STAFF_LEVEL_ACCOUNT_SERVICE
public static final int STAFF_LEVEL_DESIGNER
public static final int STAFF_LEVEL_DEVELOPER
public static final int STAFF_LEVEL_MODERATOR
public static final int STAFF_LEVEL_PUBLIC
public static final int STAFF_LEVEL_STAFF_MEMBER
private Gender gender
private final transient List<String> ignoreList
private Timestamp lastActive
private final transient int mySerial
private final long pathController
Kalendor
Activity.
public Semaphore positioning
private long roundTripLag
transient ServerThread serverThread
@Deprecated private boolean usePathFinder
| Constructor Detail |
|---|
protected User(Date birthDate1,
String avatarTitle,
String userNameRequest,
String passwordAnswer,
String passwordQuestion,
String password)
throws AlreadyUsedException,
ForbiddenUserException,
NumberFormatException
birthDate1 - The player's date of birthavatarTitle - The name of the avatar (class) which the
player wants to use. This must be one of the fixed
string names of the Basic 8 Toots™userNameRequest - The user name requestedpassword - the user's passwordpasswordQuestion - the password recovery questionpasswordAnswer - the answer to the password recovery
question
ForbiddenUserException - If the user is administratively
prohibited from registering, e.g. due to a bad user
name
AlreadyUsedException - If the user name is not available
NumberFormatException - If the date of birth is irrational
public User(int id)
throws NotFoundException
id - user ID value
NotFoundException - if the user can't be found in the
database.
public User(String newUserLogin)
throws NotFoundException
newUserLogin - user login name
NotFoundException - if the user can't be found in the
database.public User(UserRecord rec)
rec - the user record| Method Detail |
|---|
@Deprecated
public static void assertUserNameAvailable(String userNameRequested)
throws AlreadyUsedException,
ForbiddenUserException
Nomenclator.assertLoginAvailable(String)
instead
Make the assertion that the user name supplied is available to be requested or assigned to this user.
Note that having another user request the name, which has not been either permitted or denied, will still throw an AlreadyUsedException.
This routine returns void, because it throws exceptions if the
name is forbidden or already used. For a boolean version, see
Nomenclator.isLoginAvailable(String)
userNameRequested - The name which is being requested
AlreadyUsedException - if the user name has been requested
or accepted already
ForbiddenUserException - if the user name is forbidden from
use (obscene, gives away personal information, or so
forth). See
Nomenclator.isLoginForbidden(String)@Deprecated public static boolean canSeeSmartFoxServer()
public static void configUpdated()
@Deprecated
public static AbstractUser create(Date date,
String string,
String nick)
throws AlreadyUsedException,
ForbiddenUserException
Nomenclator.create(Date,String,String)
instead
date - User's date of birthstring - Character class or type designatornick - User's requested nickname
AlreadyUsedException - if the nickname is not available
ForbiddenUserException - if the user account is not
permitted to be created, e.g. for having an obscene
user ID@Deprecated public static AbstractUser get(org.json.JSONObject object)
Nomenclator.get(JSONObject) instead
object - A JSON object with either an { id: userID } or {
login: userName }
@Deprecated public static AbstractUser getByID(int id)
Nomenclator.getUserByID(int) instead
id - The user ID to instantiate
@Deprecated public static AbstractUser getByLogin(String login)
Nomenclator.getUserByLogin(String)
instead
login - the user login name
@Deprecated public static AbstractUser[] getByMail(String mail)
Nomenclator.getUsersByMail(String)
instead
mail - The eMail address for which we are searching
@Deprecated public static AbstractUser getByRequestedName(String userNameRequested)
Nomenclator.getUserByRequestedName(String)
instead
userNameRequested - the user name for which we're searching
@Deprecated public static int getIDForLiveUserName(String name)
Nomenclator.getIDForLiveUserName(String)
instead
name - User name to look up
@Deprecated public static int getIDForLogin(String name)
Nomenclator.getUserIDForLogin(String)
instead
name - The user name (login)
@Deprecated public static int getIDForUserName(String name)
Nomenclator.getUserIDForLogin(String)
name - The user name (login)
@Deprecated public static AbstractUser getOnlineUserByLogin(String login)
Nomenclator.getOnlineUserByLogin(String)
instead
login - user login
public static Colour getOutlineColourForBaseColour(Colour baseColour)
baseColour - the base colour (will not be altered)
public static String getRev()
@Deprecated public static AbstractUser getSystemUser()
Nomenclator.getSystemUser() instead
@Deprecated public static String getUserNameForID(int id)
Nomenclator.getLoginForID(int) instead
id - The user ID value
public static Collection<AbstractUser> getUsersAwaitingNameApproval()
Get up to 20 users who are awaiting approval of their names. Will not return more than 20 users in a set, but could return an empty set.
XXX contains SQL
public static String[] getZ$Z()
public static boolean isItGood()
@Deprecated public static boolean isNameAvailable(String name)
Nomenclator.isLoginAvailable(String)
instead
name - The user name being checked
@Deprecated public static boolean isNameForbidden(String userNameRequested)
Nomenclator.isLoginForbidden(String)
instead
... A user name is “forbidden” if it matches a negative filter (if it contains forbidden word(s) or phrase(s)), or if it has previously been banned for some reason
userNameRequested - The name to be checked
public static boolean isNameValid(String userName)
userName - the user name to be checked
public void acceptErrorReply(String command,
String error,
org.json.JSONObject result,
Room room)
acceptErrorReply in interface AbstractUsercommand - The command which produced the errorerror - The error coderesult - The additional JSON data describing the errorroom - The room in which the user was
standing when the error occurred.AbstractUser.acceptErrorReply(java.lang.String,
java.lang.String, org.json.JSONObject,
org.starhope.appius.game.Room)
public void acceptGameAction(AbstractUser sender,
org.json.JSONObject action)
acceptGameAction in interface RoomListenersender - the senderaction - The game action. The verb is in
action.getString("action").RoomListener.acceptGameAction(AbstractUser,
JSONObject)
public void acceptGameStateChange(GameEvent gameCode,
GameStateFlag gameState)
RoomListener
acceptGameStateChange in interface RoomListenergameCode - The GameEvent whose state is changinggameState - The new stateRoomListener.acceptGameStateChange(org.starhope.appius.game.GameEvent,
org.starhope.appius.game.GameStateFlag)
public void acceptMessage(String title,
String caption,
String message)
acceptMessage in interface AbstractUsertitle - The title of the messagecaption - The caption; usually ADMIN for administrative
messagesmessage - The message body text
public void acceptObjectJoinRoom(Room room,
AbstractUser object)
room - the room in questionobject - the object leaving the roomRoomListener.acceptObjectJoinRoom(Room,
RoomListener)
public void acceptObjectJoinRoom(Room room,
RoomListener object)
RoomListener
acceptObjectJoinRoom in interface RoomListeneracceptObjectJoinRoom in class GeneralUserroom - The roomobject - The thing (probably user) enteringRoomListener.acceptObjectJoinRoom(org.starhope.appius.game.Room,
org.starhope.appius.game.RoomListener)
public void acceptObjectPartRoom(Room room,
RoomListener object)
acceptObjectPartRoom in interface RoomListeneracceptObjectPartRoom in class GeneralUserroom - The roomobject - The thing (probably user) departingRoomListener.acceptObjectPartRoom(Room,
RoomListener)
public void acceptOutOfBandMessage(AbstractUser sender,
Room room,
org.json.JSONObject body)
acceptOutOfBandMessage in interface RoomListeneracceptOutOfBandMessage in class GeneralUsersender - The user transmitting the out-of-band messagebody - The contents of that message (in JSO)room - The room in which the sender is found — and,
typically, also this recipient.RoomListener.acceptOutOfBandMessage(org.starhope.appius.user.AbstractUser,
org.starhope.appius.game.Room, org.json.JSONObject)
public void acceptPrivateMessage(AbstractUser from,
String message)
acceptPrivateMessage in interface AbstractUserfrom - The user “whispering” to this onemessage - The contents of the message
public void acceptPublicMessage(AbstractUser sender,
Room room,
String message)
acceptPublicMessage in interface RoomListenersender - The speakerroom - The room in which the words were spokenmessage - The spoken text or /emoteRoomListener.acceptPublicMessage(org.starhope.appius.user.AbstractUser,
org.starhope.appius.game.Room, java.lang.String)
public void acceptPublicMessage(AbstractUser speaker,
String message)
acceptPublicMessage in interface RoomListenerspeaker - The speakermessage - The spoken text or /emoteRoomListener.acceptPublicMessage(org.starhope.appius.user.AbstractUser,
java.lang.String)
public void acceptSuccessReply(String command,
org.json.JSONObject jsonData,
Room room)
acceptSuccessReply in interface AbstractUsercommand - the command sending the successful replyjsonData - additional JSON dataroom - the room in which the success happened
public void acceptUserAction(Room r,
AbstractUser u)
RoomListener
acceptUserAction in interface RoomListeneracceptUserAction in class GeneralUserr - the room in which the user is taking an actionu - the user taking an actionRoomListener.acceptUserAction(Room,
AbstractUser)
public void acceptUserVariableUpdate(AbstractUser user,
String varName,
String varValue)
acceptUserVariableUpdate in interface RoomListeneracceptUserVariableUpdate in class GeneralUseruser - The user updating their variablevarName - The name of the variable (key)varValue - The new value (null if unset)RoomListener.acceptUserVariableUpdate(org.starhope.appius.user.AbstractUser,
java.lang.String, java.lang.String)public void addBuddy(AbstractUser newBuddy)
addBuddy in interface AbstractUseraddBuddy in class GeneralUsernewBuddy - the user to be the new buddyAbstractUser.addBuddy(org.starhope.appius.user.AbstractUser)@Deprecated public void addDefaultFreeItem(int id)
Inventory.addDefaultFreeItem(int, boolean)
addDefaultFreeItem(int, boolean) with
“false” for the second parameter
id - the item ID.
@Deprecated
public void addDefaultFreeItem(int id,
boolean forceActive)
id - the item IDforceActive - if true, force the item to be active upon
adding it to the user's inventory@Deprecated protected void addFreeClothing(InventoryItem clothingItem)
Inventory.addDefaultFreeItem(int, boolean)
clothingItem - The item to be added to the user's inventory
as a free gift (or prize)
public void addGiftSubscription(int months,
int days)
Create a gift subscription for a user, to last the given number of months plus the given number of days.
To create a lifetime subscription, provide 1000 as the number of months.
addGiftSubscription in interface AbstractUsermonths - either 1000 (or any greater value over 1000) for a
lifetime subscription, or, the number of months for a
gift subscription.days - the number of days for a gift subscription. Ignored
for lifetime subscriptions.@Deprecated public void addItem(int itemID)
Inventory.add(InventoryItem)
addItem in interface AbstractUseritemID - The item's database ID number.@Deprecated public void addItem(InventoryItem item)
Inventory.add(InventoryItem)
item - The item to be added to inventory.public void addRoom(int roomNumber)
roomNumber - add a room to the user's housepublic void affirmFreeMember()
public void affirmPaidMember()
public void approveName(AbstractUser abstractUser)
throws PrivilegeRequiredException,
AlreadyUsedException
abstractUser - the user approving the name (requires
moderator privileges)
PrivilegeRequiredException - if the user approving the name
does not have moderator privileges
AlreadyUsedException - if the name is already in use by
someone else
public void ban(AbstractUser bannedBy,
String bannedReason)
throws PrivilegeRequiredException
ban in interface AbstractUserbannedBy - The moderator by which the user was banned.bannedReason - the reason for which the user was banned
PrivilegeRequiredException - if the user does not have
moderator-level (or better) privilegespublic void blog(String message)
message - the message to be recordedpublic boolean canContact()
AbstractPerson
canContact in interface AbstractPersonAbstractPerson.canContact()public boolean canLogIn(String passGuess)
passGuess - The user's attempted password
public boolean canMakePurchase()
Only adults are allowed to make purchases. Determine whether this user is allowed to make purchases, or if we should ask them to get their parents to buy things for them.
In the future, this might not be just a test to check whether the user is an adult. We might, for example, have kids with gift cards that will be able to make some purchases on their own.
public boolean canTalk()
canTalk in interface AbstractUser@Deprecated public Room changeRoom(Room room)
setRoom(Room)
room - the new room to be joined
public boolean checkPassword(String passwordGuess)
AbstractPerson
checkPassword in interface AbstractPersonpasswordGuess - the supplied password that we want to check
public boolean deleteMail(int messageID)
messageID - The message ID to be marked as deleted.
public void doffClothes()
doffClothes in interface AbstractUserdoffClothes in class GeneralUserAbstractUser.doffClothes()public void doTransport()
AbstractUser
doTransport in interface AbstractUserAbstractUser.doTransport()@Deprecated public void enablePathFinder(boolean b)
b - whether to use it or notpublic boolean equals(Object o)
equals in class GeneralUserObject.equals(java.lang.Object)public boolean equals(User o)
o - the other user
public void equip(InventoryItem item)
throws GameLogicException
item - The item to be equipped
GameLogicException - if the user does not have the item
public boolean forgotPassword(String forgottenPasswordQ,
String forgottenPasswordA)
forgotPassword in interface AbstractPersonforgottenPasswordQ - The question being answeredforgottenPasswordA - The answer provided
@Deprecated public void generateSystemName()
UserRecord.generateSystemName()
instead
@Deprecated public org.json.JSONObject getActiveClothing()
Inventory.getActiveClothing_JSON()
public Collection<InventoryItem> getActiveDecorations(int roomNumber)
throws NotFoundException
roomNumber - which room of the user's house
NotFoundException - if the room does not exist@Deprecated public InventoryItem getActiveItemByType(String oneTypeString)
Inventory.getActiveItemsByType(InventoryItemType)
oneTypeString - An InventoryItemType string
public Collection<InventoryItem> getActiveItemsByType(InventoryItemType t)
t - An Item type to match by.
@Deprecated public Collection<InventoryItem> getActiveItemsByType(String t)
getActiveItemsByType(InventoryItemType)
t - A string of the item type. Use Constants from
InventoryItem
public int getAge()
getAge in interface AbstractUsergetAge in class GeneralUserAbstractUser.getAge()public AgeBracket getAgeGroup()
AbstractUserAgeBracket.System.
getAgeGroup in interface AbstractUsergetAgeGroup in class GeneralUserAbstractUser.getAgeGroup()public abstract String getApprovalCookie()
AbstractPerson
getApprovalCookie in interface AbstractPersonAbstractPerson.getApprovalCookie()public Date getApprovedDate()
public String getApprovedDateString()
getApprovedDateString in interface AbstractUsergetApprovedDateString in class GeneralUsergetApprovedDate()public AvatarClass getAvatarClass()
getAvatarClass in interface AbstractUserpublic String getAvatarLabel()
getAvatarLabel in interface AbstractUserAbstractUser.getAvatarLabel()public Colour getBaseColor()
getBaseColor in interface AbstractUserpublic Date getBirthDate()
public Collection<String> getBuddyListNames()
GeneralUser.getUserListIterator(String)
getBuddyListNames in interface AbstractUserpublic String[] getBuddyListNamesAsArray()
public Colour getChatBG()
public Colour getChatFG()
public String getConfirmationTemplate()
getConfirmationTemplate in interface AbstractPersonAbstractPerson.getConfirmationTemplate()public String getConnectedFrom()
isOnline() for the usual caveats
public String getDebugName()
getDebugName in interface AbstractUserAbstractUser.getDebugName()public String getDialect()
AbstractPerson
getDialect in interface AbstractPersongetDialect in interface AbstractUsergetDialect in class GeneralUserAbstractUser.getDialect()public String getDisplayName()
AbstractPerson
getDisplayName in interface AbstractPersongetDisplayName in interface AbstractUsergetDisplayName in class GeneralUserAbstractPerson.getDisplayName()public Date getEmailPlusDate()
public String getEmailPlusDateString()
getEmailPlusDate()public Colour getExtraColor()
getExtraColor in interface AbstractUsergetExtraColor in class GeneralUserAbstractUser.getExtraColor()public String getFacing()
AbstractUser
getFacing in interface AbstractUsergetFacing in class GeneralUserAbstractUser.getFacing()public String getForgotPasswordAnswer()
AbstractPerson
getForgotPasswordAnswer in interface AbstractPersonAbstractPerson.getForgotPasswordAnswer()public String getForgotPasswordQuestion()
AbstractPerson
getForgotPasswordQuestion in interface AbstractPersonAbstractPerson.getForgotPasswordQuestion()
public InventoryItem getFurnitureBySlot(int slotNumber)
throws NotFoundException
slotNumber - the slot number for the user's inventory
NotFoundException - if the slot number doesn't refer to a
furniture item owned by the userpublic boolean getGameFlag(String name)
name - The unique identifier for the game flag
public Gender getGender()
public String getGivenName()
getGivenName in interface AbstractPerson
public HashMap<Timestamp,HashMap<String,String>> getHistory(Date after,
int limit)
getHistory in interface AbstractPersonafter - If non-null, specifies the date after which we want
to view records. To see all records, back to the
creation of the user record, supply a null.limit - If this is a positive number, it limits the results
to this number of records.
public Inventory getInventory()
AbstractUser
getInventory in interface AbstractUsergetInventory in class GeneralUserAbstractUser.getInventory()@Deprecated public String getIpAddress()
getIPAddress()
public String getIPAddress()
getIPAddress in interface AbstractUserAbstractUser.getIPAddress()public int getKickedByUserID()
getKickedByUserID in interface AbstractUsergetKickedByUserID in class GeneralUserAbstractUser.getKickedByUserID()public String getKickedMessage()
getKickedMessage in interface AbstractUserpublic String getKickedReasonCode()
getKickedReasonCode in interface AbstractUsergetKickedReasonCode in class GeneralUserAbstractUser.getKickedReasonCode()public Timestamp getKickedUntil()
getKickedUntil in interface AbstractUsergetKickedUntil in class GeneralUserAbstractUser.getKickedUntil()public long getLag()
getLag in interface AbstractUserAbstractUser.getLag()public String getLanguage()
getLanguage in interface AbstractPersongetLanguage in interface AbstractUserAbstractPerson.getLanguage()public Timestamp getLastActive()
public String getLastZone()
public Coord3D getLocation()
AbstractUser
getLocation in interface AbstractUserAbstractUser.getTravelStart()AbstractUser.getLocation(),
AbstractUser.getLocationForUpdate()public String getLogin()
public String getMail()
getMail in interface AbstractPersongetMail in interface AbstractUserAbstractPerson.getMail()public Date getMailConfirmed()
getMailConfirmed in interface AbstractPersonAbstractPerson.getMailConfirmed()public int getMySerial()
public String getName()
public Timestamp getNameApprovedAt()
getNameApprovedAt in interface AbstractUserpublic long getNameApprovedByUserID()
public Timestamp getNameRequestedAt()
getNameRequestedAt in interface AbstractUserpublic Parent getParent()
public boolean getParentApprovedName()
public int getParentID()
public org.json.JSONObject getPassport_JSON()
throws SQLException,
org.json.JSONException
SQLException - if the passport records can't be obtained or
interpreted
org.json.JSONException - if the passport can't be represented in
JSON formpublic String getPassword()
getPassword in interface AbstractPersonAbstractPerson.getPassword()public String getPotentialUserName()
getPotentialUserName in interface AbstractPersonAbstractPerson.getPotentialUserName()public String getReferer()
public long getRoundTripLag()
public long getSerial()
public ServerThread getServerThread()
getServerThread in interface AbstractUserpublic String getSubversionRevision()
HasSubversionRevisionReturn the Subversion revision level of this class's source code file, as supplied via the special "$Rev: " sequence.
As an example,the Subversion revision string for this file is "$Rev: 1968 $"
@Override
public String getSubversionRevision () {
return "$Rev: ";
}
getSubversionRevision in interface HasSubversionRevisionHasSubversionRevision.getSubversionRevision()public Collection<UserEnrolment> getUserEnrolments()
public UserEnrolment[] getUserEnrolmentsAsArray()
public String getUserNameOrRequest()
@Deprecated public Map<String,String> getUserVariables()
getUserVariables in interface AbstractUsergetUserVariables in class GeneralUserAbstractUser.getUserVariables()public Zone getZone()
getZone in interface RoomListenergetZone in class GeneralUserRoomListener.getZone()
public Coord3D handleWalkFail(Room room,
Coord3D to)
AbstractUser
handleWalkFail in interface AbstractUserhandleWalkFail in class GeneralUserroom - the destination roomto - the destination coördinates
GeneralUser.handleWalkFail(org.starhope.appius.game.Room,
org.starhope.appius.geometry.Coord3D)public int hashCode()
hashCode in class GeneralUserObject.hashCode()@Deprecated public boolean hasItem(int id)
Inventory.hasItem(int)
id - The item ID
@Deprecated public boolean hasItem(InventoryItem item)
Inventory.hasItem(int)
item - the item in question
private boolean ignoring(AbstractUser speaker)
speaker - the person who might be getting ignored
public boolean isBanned()
isBanned in interface AbstractUserisBanned in class GeneralUserAbstractUser.isBanned()public boolean isBirthday()
public boolean isCanceled()
isCanceled in interface AbstractUserisCanceled in class GeneralUserAbstractUser.isCanceled()@Deprecated public boolean isCanContact()
canContact()
@Deprecated public boolean isCanEnterChatZone()
GeneralUser.canEnterChatZone()
@Deprecated public boolean isCanEnterMenuZone()
GeneralUser.canEnterMenuZone()
public boolean isCanTalk()
canTalk()public boolean isEphemeral()
public boolean isKicked()
isKicked in interface AbstractUserisKicked in class GeneralUserAbstractUser.isKicked()public boolean isNeedsNaming()
public boolean isNeedsParentAttention()
public boolean isNPC()
isNPC in interface AbstractUserpublic boolean isOnline()
AbstractUser
isOnline in interface AbstractUserpublic boolean isPaidMember()
isPaidMember in interface AbstractUserisPaidMember in class GeneralUserUserRecord.isPaidMember()
public void kick(AbstractUser u,
String kickReason,
int duration)
throws PrivilegeRequiredException
kick in interface AbstractUseru - WRITEMEkickReason - WRITEMEduration - WRITEME
PrivilegeRequiredException - WRITEMEAbstractUser.kick(org.starhope.appius.user.AbstractUser,
java.lang.String, int)
public void kick(AbstractUser kickedBy,
String kickedReason,
long kickedMinutes)
throws PrivilegeRequiredException
kickedBy - The user who is kicking this user offlinekickedReason - The reason for which s/he is being kickedkickedMinutes - The duration for which s/he should be
kicked, in minutes. Read that again: minutes — not
msec!
PrivilegeRequiredException - if the person trying to kick
this user off doesn't have moderator privileges
public void kick(AbstractUser kickedBy,
String kickedReason,
Timestamp allowBack)
throws PrivilegeRequiredException
kickedBy - The user who is kicking this user offlinekickedReason - The reason for which s/he is being kickedallowBack - The time at which this user is permitted to be
online again.
PrivilegeRequiredException - if the person trying to kick
this user off doesn't have moderator privileges
public void liftBan(AbstractUser authority)
throws PrivilegeRequiredException
liftBan in interface AbstractUserauthority - WRITEME
PrivilegeRequiredException - WRITEMEAbstractUser.liftBan(org.starhope.appius.user.AbstractUser)public void local_create()
public void loggedIn(String zoneName,
ServerThread newServerThread)
zoneName - The name of the zone too which the user has
logged innewServerThread - The server thread in which the user is
logged in
@Deprecated
public void loggedIn(String zoneName,
SocketChannel channel)
zoneName - The zone name into which the user signed inchannel - The I/O channel on which the user is connected
public String login(String chapSeed,
String passwordGuess)
chapSeed - The CHAP random seed (or null, if no seed was
used)passwordGuess - The guessed password. This should be an
MD5sum if CHAP is being used (if the seed is not
null), or the plaintext password otherwise
public boolean nameNeedsApproval()
public boolean nameNeedsParentalApproval()
public boolean needsNaming()
public void notifyFurnitureInventory(Room room)
room - roompublic void parentApprovedAccount(boolean whether)
whether - whether the parent has approved the account; true
= approved; false = disapprovedpublic void parentApprovedName(boolean whether)
whether - True if the parent has approved the name; false if
they disapprove and want a system suggested name.public void postLoginGlobal()
public void remindPassword()
throws NotReadyException
remindPassword in interface AbstractPersonNotReadyException - if the reminder can't be sent because
the user has no confirmed mail address on fileAbstractPerson.remindPassword()public void removeBuddy(AbstractUser otherGuy)
removeBuddy in interface AbstractUserremoveBuddy in class GeneralUserotherGuy - who?AbstractUser.removeBuddy(org.starhope.appius.user.AbstractUser)
public void rename(String newName)
throws GameLogicException,
AlreadyUsedException,
ForbiddenUserException
Rename the user account, updating all necessary related records. Note, in particular, that Smartfox is wholly dependant upon user names, so all records related to Smartfox must be updated!
If the user is currently online, this will fuck up hilariously, I think.
This is an overriding method.
rename in interface AbstractPersonnewName - The new user name
GameLogicException - if the user is online (and therefore
can't be renamed)
ForbiddenUserException - if the user isn't allowed to
choose the name (e.g. filter violation)
AlreadyUsedException - if the new name is already taken by
someone elseAbstractPerson.rename(java.lang.String)public void reportedToModeratorBy(AbstractUser u)
reportedToModeratorBy in interface AbstractUseru - User that is reporting this user.
public void reportedToModeratorBy(AbstractUser u,
String reason)
twheys@gmail.com Feb 17, 2010TO reportedToModeratorBy Mail customer service with a report of users reporting each other. WRITEME twheys@gmail.com
reportedToModeratorBy in interface AbstractUseru - WRITEME twheys@gmail.comreason - WRITEME twheys@gmail.com
public void requestNewUserName(String userNameRequested)
throws AlreadyUsedException,
ForbiddenUserException
Post a request to the lifeguards to get approval of a user name
Does not work, is not used
userNameRequested - The user name which the user has
requested
ForbiddenUserException - if the user name is forbidden
(e.g. obscene or previously denied for any reason)
AlreadyUsedException - if someone has already requested or
used itpublic void requestParentApproval()
public void sendConfirmationForPremium()
public void sendConfirmationMail()
AbstractPerson
sendConfirmationMail in interface AbstractPersonAbstractPerson.sendConfirmationMail()
public void sendEarnings(Room room,
String string)
sendEarnings in interface AbstractUsersendEarnings in class GeneralUserroom - WRITEMEstring - WRITEMEAbstractUser.sendEarnings(org.starhope.appius.game.Room,
java.lang.String)
@Deprecated
public void sendGameAction(GeneralUser from,
org.json.JSONObject data)
throws org.json.JSONException
from - The user sending the game action (to this user)data - The game action data
org.json.JSONException - if the data can't be sent in JSON
public void sendMigrate(AbstractZone refugeeZone)
throws UserDeadException
sendMigrate in interface AbstractUserrefugeeZone - the zone to which the user should migrate
UserDeadException - if the user is no longer online anywaypublic void sendOops()
AbstractUser
sendOops in interface AbstractUserAbstractUser.sendOops()
@Deprecated
public void sendPrivateMessage(AbstractUser from,
String message)
acceptPrivateMessage(AbstractUser, String)
from - the user speakingmessage - the words spokenacceptPrivateMessage(AbstractUser, String)
@Deprecated
public void sendPublicMessage(GeneralUser from,
String speech)
acceptPublicMessage(AbstractUser, String)
from - The user speakingspeech - the words spokenacceptPublicMessage(AbstractUser, String)public void sendResponse(org.json.JSONObject result)
sendResponse in interface AbstractUserresult - WRITEMEAbstractUser.sendResponse(org.json.JSONObject)
@Deprecated
public void sendResponse(org.json.JSONObject result,
int room)
sendResponse(JSONObject)
result - the response datagram in JSONroom - the room from which the response is coming (or -1 for
not-specified) (ignored)public void sendStaffPasswordReset()
AbstractPerson
sendStaffPasswordReset in interface AbstractPersonAbstractPerson.sendStaffPasswordReset()
private void sendSuccessReply(String source,
org.json.JSONObject reply,
AbstractUser sender,
int room)
source - The method returning successreply - additional details of the success to be returned to
the clientsender - the user reporting successroom - the room in which the success happened, or -1 if not
specifiedpublic void sendWardrobe()
AbstractUser
sendWardrobe in interface AbstractUsersendWardrobe in class GeneralUserAbstractUser.sendWardrobe()public void sentConfirmationMail()
AbstractPerson
sentConfirmationMail in interface AbstractPersonAbstractPerson.sentConfirmationMail()public void setActive(boolean isActive1)
isActive1 - the isActive to setpublic AgeBracket setAgeGroup()
public void setAgeGroupToSystem()
AbstractUser
setAgeGroupToSystem in interface AbstractUsersetAgeGroupToSystem in class GeneralUserAbstractUser.setAgeGroupToSystem()public void setApprovedDate(Date date)
date - the approvedDate to setpublic void setAvatarClass(AvatarClass avatarClass)
avatarClass - the new avatar classpublic void setBaseColor(Colour newBaseColor)
AbstractUser
setBaseColor in interface AbstractUsersetBaseColor in class GeneralUsernewBaseColor - the baseColor to setAbstractUser.setBaseColor(org.starhope.appius.types.Colour)public void setBirthDate(Date birthDate1)
birthDate1 - the birthDate to setpublic void setCanceled(boolean isCanceled1)
isCanceled1 - the isCanceled to setpublic void setCanContact(boolean canContact1)
setCanContact in interface AbstractPersoncanContact1 - the canContact to setpublic void setCanEnterChatZone(boolean canEnterChatZone1)
canEnterChatZone1 - the canEnterChatZone to setpublic void setCanEnterMenuZone(boolean canEnterMenuZone1)
canEnterMenuZone1 - the canEnterMenuZone to setpublic void setCanTalk(boolean canTalk1)
AbstractUser
setCanTalk in interface AbstractUsersetCanTalk in class GeneralUsercanTalk1 - the canTalk to setAbstractUser.setCanTalk(boolean)public void setChatBG(Colour newChatBG)
newChatBG - the new chat background colourpublic void setChatFG(Colour newChatFG)
newChatFG - the chat foreground colour to setpublic void setEmailPlusDate(Date emailPlusDate1)
emailPlusDate1 - the emailPlusDate to setpublic void setExtraColor(Colour extraColor1)
setExtraColor in interface AbstractUsersetExtraColor in class GeneralUserextraColor1 - the extraColor to setAbstractUser.setExtraColor(org.starhope.appius.types.Colour)public void setFacing(String newFacing)
setFacing in interface AbstractUsersetFacing in class GeneralUsernewFacing - the facing to setAbstractUser.setFacing(java.lang.String)public void setForgotPasswordAnswer(String answer)
AbstractPerson
setForgotPasswordAnswer in interface AbstractPersonanswer - WRITEMEAbstractPerson.setForgotPasswordAnswer(java.lang.String)public void setForgotPasswordQuestion(String question)
AbstractPerson
setForgotPasswordQuestion in interface AbstractPersonquestion - WRITEMEAbstractPerson.setForgotPasswordQuestion(java.lang.String)public void setGender(Gender setGender)
setGender - the gender to setpublic void setGivenName(String givenName1)
setGivenName in interface AbstractPersongivenName1 - the givenName to setpublic void setLastActive()
setLastActive in interface AbstractUservoid setLastActive(Timestamp timestamp)
timestamp - the time at which this user was last activepublic void setLocation(Coord3D coord3d)
Room.putHere(AbstractUser, Coord3D) to position a
player
setLocation in interface AbstractUsersetLocation in class GeneralUsercoord3d - new locationAbstractUser.setLocation(org.starhope.appius.geometry.Coord3D)
public void setLoggedIn(String ipAddress,
String zone)
Notify the multiverse that the user is logging in
Set up the User records, indicating that the user has (in fact) logged in to the game. Record the IP address and Zone server.
XXX: contains SQL
ipAddress - The IP address (or something like it) from which
the user has logged-inzone - The active server zone into which the User has
logged-in.
@Deprecated
public void setLogin(String from,
String zone)
setLoggedIn(String, String) — less
ambiguous/misleading name
from - the login sourcezone - the zone into which the user logged in@Deprecated public void setLot(int newLotID)
UserHouse.setLotID(int)
newLotID - the new lot ID@Deprecated public void setLotID(int newLotID)
newLotID - the new lot ID
public void setMail(String newMail)
throws GameLogicException
AbstractUser
setMail in interface AbstractPersonsetMail in interface AbstractUsernewMail - the mail to set
GameLogicException - if attempting to set an eMail address
on a kid accountpublic void setMailConfirmed(Date mailConfirmed1)
setMailConfirmed in interface AbstractPersonmailConfirmed1 - the date and time at which the user's mail
was confirmed.public void setMailConfirmSent(Date date)
setMailConfirmSent in interface AbstractPersondate - the date on which the mail confirmation message was sentAbstractPerson.setMailConfirmSent(java.sql.Date)public boolean setNeedsNaming(boolean needsNaming1)
needsNaming1 - the needsNaming to set
public void setParent(Parent parent)
throws GameLogicException,
ForbiddenUserException,
AlreadyExistsException
setParent in interface AbstractUserparent - the parent to set
GameLogicException - if this user is an adult
ForbiddenUserException - if the parent has banned child
accounts (and therefore cannot adopt more)
AlreadyExistsException - if the parent has more than the
maximum allowed children.
public void setParentByParent(Parent parent)
throws GameLogicException
parent - the parent to set
GameLogicException - if this user is an adultpublic void setPassword(String password1)
AbstractPerson
setPassword in interface AbstractPersonpassword1 - the password to setAbstractPerson.setPassword(java.lang.String)
public void setPasswordAndPasswordRecovery(String question,
String answer,
String newPassword)
throws GameLogicException
setPasswordAndPasswordRecovery in interface AbstractPersonquestion - WRITEMEanswer - WRITEMEnewPassword - WRITEME
GameLogicException - WRITEMEAbstractPerson.setPasswordAndPasswordRecovery(java.lang.String,
java.lang.String, java.lang.String)
public void setPasswordRecovery(String forgottenPasswordQuestion,
String forgottenPasswordAnswer)
AbstractPerson
setPasswordRecovery in interface AbstractPersonforgottenPasswordQuestion - the questionforgottenPasswordAnswer - the correct answerAbstractPerson.setPasswordRecovery(java.lang.String,
java.lang.String)public String setRandomPassword()
AbstractPerson
setRandomPassword in interface AbstractPersonAbstractPerson.setRandomPassword()public void setReferer(String theReferer)
Set the referrer from whom we were sent this new user. This value can only be set once, and is permanent for that user. The valid referrer values are stored in a table. (WRITEME twheys@gmail.com what table?)
Yes, referer is misspelled in homage to HTTP
theReferer - a four-character identifierpublic void setRegisteredAt(Timestamp newRegisteredAt)
newRegisteredAt - the registeredAt to setpublic int setRoom(Room room)
setRoom in interface AbstractUsersetRoom in class GeneralUserroom - the room in which the user must exist
public void setRoundTripLag(long l)
l - milliseconds round-trip lagpublic void setServerThread(ServerThread serverThread2)
serverThread2 - The new server thread.public void setStaffLevel(int newStaffLevel)
newStaffLevel - the staffLevel to setpublic void setStartT(long when)
setStartT in interface AbstractUsersetStartT in class GeneralUserwhen - the time at which the user last made a conscious
change in their movementAbstractUser.setStartT(long)public void setStructure(InventoryItem item)
item - WRITEME
protected void setSubclassValues(ResultSet resultSet)
throws SQLException
resultSet - WRITEME
SQLException - WRITEMEpublic void setTravelStart(long l)
AbstractUser
setTravelStart in interface AbstractUsersetTravelStart in class GeneralUserl - WRITEMEAbstractUser.setTravelStart(long)
public void setUserName(String newLogin)
throws AlreadyUsedException,
ForbiddenUserException,
GameLogicException
newLogin - the userName to set
ForbiddenUserException - if the user name is not allowed
AlreadyUsedException - if the user name is in-use
GameLogicException - if the user is online and can't be
renamed
public void setUserNameFromUser(String userRequestedLogin)
throws AlreadyUsedException,
ForbiddenUserException
Set a user name, requested by the user. (Sends to lifeguards for approval)
Clears needsNaming.
userRequestedLogin - the userName to set
ForbiddenUserException - if the user name isn't allowed
AlreadyUsedException - if the user name has already been
used (or requested)
public void speak(Room room,
String string)
speak in interface AbstractUserroom - the room in which to speak. Typically, the user must
be present in that room.string - the speech (or emote)AbstractUser.speak(org.starhope.appius.game.Room,
java.lang.String)public void startEnrolment(UserEnrolment userEnrolment)
userEnrolment - the enrolment to be started for this userpublic org.json.JSONObject toJSON()
toJSON in interface AbstractUserAbstractUser.toJSON()public org.json.JSONObject toJSONRef()
toSFSXML() for the pure JSON “to
infinity and beyond” interface
public String toSFSXML()
toSFSXML in interface AbstractUserpublic String toString()
toString in class ObjectObject.toString()public void updateWallet()
AbstractUser
updateWallet in interface AbstractUserupdateWallet in class GeneralUserGeneralUser.updateWallet()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||