net.jetrix
Class User

java.lang.Object
  extended by net.jetrix.User

public class User
extends Object

A user connected to the server. The user can be a player or a spectator.

Version:
$Revision: 545 $, $Date: 2005-01-05 18:16:04 +0100 (mer., 05 janv. 2005) $
Author:
Emmanuel Bourg

Field Summary
static int STATUS_AFK
           
static int STATUS_OK
           
static int USER_PLAYER
           
static int USER_SPECTATOR
           
 
Constructor Summary
User()
           
User(String name)
           
 
Method Summary
 int getAccessLevel()
           
 Set<String> getIgnoredUsers()
          Return the list of ignored players.
 Locale getLocale()
           
 String getName()
           
 Object getProperty(String key)
          Return an extended property.
 int getStatus()
           
 String getTeam()
           
 void ignore(String name)
          Add the specified name to the list of ignored users.
 boolean ignores(String name)
          Tells if the specified nickname is ignored by this user.
 boolean isPlayer()
           
 boolean isPlaying()
           
 boolean isRegistered()
           
 boolean isSpectator()
           
 void setAccessLevel(int accessLevel)
           
 void setLocale(Locale locale)
           
 void setName(String name)
           
 void setPlayer()
           
 void setPlaying(boolean playing)
           
 void setProperty(String key, Object value)
          Set an extended property for this player.
 void setRegistered(boolean registered)
           
 void setSpectator()
           
 void setStatus(int status)
           
 void setTeam(String team)
           
 String toString()
           
 void unignore(String name)
          Remove the specified name from the list of ignored users.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATUS_OK

public static final int STATUS_OK
See Also:
Constant Field Values

STATUS_AFK

public static final int STATUS_AFK
See Also:
Constant Field Values

USER_PLAYER

public static final int USER_PLAYER
See Also:
Constant Field Values

USER_SPECTATOR

public static final int USER_SPECTATOR
See Also:
Constant Field Values
Constructor Detail

User

public User()

User

public User(String name)
Method Detail

setName

public void setName(String name)

getName

public String getName()

setTeam

public void setTeam(String team)

getTeam

public String getTeam()

setAccessLevel

public void setAccessLevel(int accessLevel)

getAccessLevel

public int getAccessLevel()

setStatus

public void setStatus(int status)

getStatus

public int getStatus()

setRegistered

public void setRegistered(boolean registered)

isRegistered

public boolean isRegistered()

setPlaying

public void setPlaying(boolean playing)

isPlaying

public boolean isPlaying()

setSpectator

public void setSpectator()

isSpectator

public boolean isSpectator()

setPlayer

public void setPlayer()

isPlayer

public boolean isPlayer()

setLocale

public void setLocale(Locale locale)

getLocale

public Locale getLocale()

ignores

public boolean ignores(String name)
Tells if the specified nickname is ignored by this user.

Parameters:
name - the name of the user
Returns:
Since:
0.2

ignore

public void ignore(String name)
Add the specified name to the list of ignored users.

Parameters:
name -
Since:
0.2

unignore

public void unignore(String name)
Remove the specified name from the list of ignored users.

Parameters:
name -
Since:
0.2

getIgnoredUsers

public Set<String> getIgnoredUsers()
Return the list of ignored players.

Since:
0.2

setProperty

public void setProperty(String key,
                        Object value)
Set an extended property for this player.


getProperty

public Object getProperty(String key)
Return an extended property.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2008 Emmanuel Bourg. All Rights Reserved.