|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectBaseEntity
LivingEntity
HumanEntity
Player
public class Player extends HumanEntity implements MessageReceiver
Player.java - Interface for eo so mods don't have to update often.
Constructor and Description |
---|
Player()
Creates an empty player. |
Modifier and Type | Method and Description |
---|---|
void |
addGroup(java.lang.String group)
Adds the player to the specified group |
boolean |
canBuild()
Returns false if this player can not modify terrain, edit chests, etc. |
boolean |
canIgnoreRestrictions()
If the user can ignore restrictions this will return true. |
boolean |
canModifyWorld()
Don't use this, use canBuild() |
boolean |
canUseCommand(java.lang.String command)
Returns true if this player can use the specified command |
void |
chat(java.lang.String message)
Makes player send message. |
void |
command(java.lang.String command)
Makes player use command. |
boolean |
equals(java.lang.Object obj)
Tests the given object to see if it equals this object |
boolean |
getAdmin()
Don't use this! Use isAdmin |
java.lang.String |
getColor()
Returns the correct color/prefix for this player |
java.lang.String[] |
getCommands()
Set allowed commands |
fy |
getEntity()
Returns the entity we're wrapping. |
java.lang.String[] |
getGroups()
Returns this player's groups |
Inventory |
getInventory()
Returns this player's inventory |
java.lang.String |
getIP()
Returns the IP of this player |
java.lang.String[] |
getIps()
Returns allowed IPs |
int |
getItemInHand()
Returns item id in player's hand |
Location |
getLocation()
Returns the player's current location |
java.lang.String |
getPrefix()
Returns the prefix. |
boolean |
getSneaking()
Returns whether or not this Player is currently sneaking (crouching) |
int |
getSqlId()
Returns the sql ID. |
fy |
getUser()
Gets the actual user class. |
void |
giveItem(int itemId,
int amount)
Gives an item to the player |
void |
giveItem(Item item)
Gives an item to the player |
void |
giveItemDrop(int itemId,
int amount)
Gives the player this item by dropping it in front of them |
void |
giveItemDrop(Item item)
Gives the player this item by dropping it in front of them |
boolean |
hasControlOver(Player player)
Returns true if this player has control over the other player |
int |
hashCode()
Returns a unique hashcode for this Player |
boolean |
hasNoGroups()
Checks to see if this player is in any groups |
boolean |
ignoreRestrictions()
Don't use. |
boolean |
isAdmin()
Returns true if this player is an admin. |
boolean |
isConnected()
Returns if the player is still connected |
boolean |
isInGroup(java.lang.String group)
Checks to see if this player is in the specified group |
boolean |
isMuted()
Returns true if the player is muted |
void |
kick(java.lang.String reason)
Kicks player with the specified reason |
void |
notify(java.lang.String message)
Sends player a notification |
void |
removeGroup(java.lang.String group)
Removes specified group from list of groups |
void |
sendMessage(java.lang.String message)
Sends a message to the player |
void |
setAdmin(boolean admin)
Sets whether or not this player is an administrator |
void |
setCanModifyWorld(boolean canModifyWorld)
Sets whether or not this player can modify the world terrain |
void |
setCommands(java.lang.String[] commands)
Sets this player's allowed commands |
void |
setGroups(java.lang.String[] groups)
Sets this player's groups |
void |
setIgnoreRestrictions(boolean ignoreRestrictions)
Sets ignore restrictions |
void |
setIps(java.lang.String[] ips)
Sets allowed IPs |
void |
setPrefix(java.lang.String prefix)
Sets the prefix |
void |
setSneaking(boolean sneaking)
Force this Player to be sneaking or not |
void |
setSqlId(int id)
Sets the sql ID. |
void |
setUser(fy player)
Sets the user. |
void |
teleportTo(double x,
double y,
double z,
float rotation,
float pitch)
Teleports to the provided location |
boolean |
toggleMute()
Toggles mute |
java.lang.String |
toString()
Returns a String representation of this Player |
Methods inherited from class HumanEntity |
---|
getName |
Methods inherited from class LivingEntity |
---|
getBaseNoDamageTicks, getDeathTicks, getHealth, getLastDamage, increaseHealth, setBaseNoDamageTicks, setDeathTicks, setHealth, setLastDamage |
Methods inherited from class BaseEntity |
---|
getAirTicks, getBaseAirTicks, getFireTicks, getId, getNoDamageTicks, getPitch, getPlayer, getRotation, getX, getY, getZ, isAnimal, isLiving, isMob, isPlayer, setAirTicks, setBaseAirTicks, setFireTicks, setNoDamageTicks, setPitch, setRotation, setX, setY, setZ, teleportTo, teleportTo |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface MessageReceiver |
---|
getName |
Constructor Detail |
---|
public Player()
#setUser(es)
Method Detail |
---|
public fy getEntity()
getEntity
in class HumanEntity
public boolean isConnected()
public void kick(java.lang.String reason)
reason
- public void notify(java.lang.String message)
notify
in interface MessageReceiver
message
- public void sendMessage(java.lang.String message)
message
- public void giveItem(Item item)
item
- public void chat(java.lang.String message)
message
- public void command(java.lang.String command)
command
- public void giveItem(int itemId, int amount)
itemId
- amount
- public void giveItemDrop(Item item)
item
- public void giveItemDrop(int itemId, int amount)
itemId
- amount
- public boolean canUseCommand(java.lang.String command)
command
- public boolean isInGroup(java.lang.String group)
group
- public boolean hasControlOver(Player player)
player
- public Location getLocation()
public java.lang.String getIP()
public boolean isAdmin()
public boolean getAdmin()
public void setAdmin(boolean admin)
admin
- public boolean canBuild()
public boolean canModifyWorld()
public void setCanModifyWorld(boolean canModifyWorld)
canModifyWorld
- public java.lang.String[] getCommands()
public void setCommands(java.lang.String[] commands)
commands
- public java.lang.String[] getGroups()
public void setGroups(java.lang.String[] groups)
groups
- public void addGroup(java.lang.String group)
group
- group to add player topublic void removeGroup(java.lang.String group)
group
- group to removepublic int getSqlId()
public void setSqlId(int id)
id
- public boolean canIgnoreRestrictions()
public boolean ignoreRestrictions()
public void setIgnoreRestrictions(boolean ignoreRestrictions)
ignoreRestrictions
- public java.lang.String[] getIps()
public void setIps(java.lang.String[] ips)
ips
- public java.lang.String getColor()
public java.lang.String getPrefix()
public void setPrefix(java.lang.String prefix)
prefix
- public fy getUser()
public void setUser(fy player)
er
- public void teleportTo(double x, double y, double z, float rotation, float pitch)
BaseEntity
teleportTo
in class BaseEntity
public boolean isMuted()
public boolean toggleMute()
public boolean hasNoGroups()
public int getItemInHand()
public Inventory getInventory()
public boolean getSneaking()
public void setSneaking(boolean sneaking)
sneaking
- true if sneakingpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to testpublic int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |