|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.properties.PList wyvern.kernel.maps.MapObject wyvern.lib.classes.StaticObject wyvern.lib.player.PlayerGrave
A gravestone created when a player dies.
Field Summary |
Fields inherited from class wyvern.kernel.maps.MapObject |
IN_MAP_EDITOR, listenerList_ |
Fields inherited from class wyvern.kernel.properties.PList |
readOnly_ |
Fields inherited from interface wyvern.lib.PropertyList |
PROPERTY_PACKAGE |
Constructor Summary | |
PlayerGrave()
|
Method Summary | |
static java.lang.String |
constructKilledByMsg(GameObject attacker)
Constructs a message such as "killed by a dracolich", or "killed by an evocation", or "killed by Rhialto". |
void |
destroy()
Destroys the gravestone so it can't be used again. |
java.lang.String |
getOwner()
Returns the name of the player whose death created this gravestone. |
int |
guildXPLost()
Returns amount of guild XP lost to this death. |
boolean |
hasOwner()
Returns true if there's a "player" property. |
void |
initialize()
Sets class-default properties. |
boolean |
isPKGrave()
Returns true if this is considered a "PK grave", meaning the player was killed by another player. |
static PlayerGrave |
makeGravestone(Player player,
GameObject attacker,
int xpLost,
int guildXPLost)
Creates a gravestone for the specified player. |
static PlayerGrave |
makeGravestone(java.lang.String player,
java.lang.String attacker,
int xpLost,
int guildXPLost)
Creates a PlayerGrave given the specified player's name, and the specified attacker description. |
boolean |
ownerIsOnline()
Returns true if the owner of the grave is currently online. |
boolean |
playerLostXP()
Returns true if at least 1 XP was lost with this death. |
void |
setInscription(java.lang.String name)
Sets the inscription to " |
void |
setOwner(java.lang.String name)
Sets the name of the player who died. |
int |
xpLost()
Returns amount of normal XP lost to this death. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PlayerGrave()
Method Detail |
public static PlayerGrave makeGravestone(Player player, GameObject attacker, int xpLost, int guildXPLost)
player
- the player who diedattacker
- the thing that killed themxpLost
- how much normal xp they lost from dyingpublic static PlayerGrave makeGravestone(java.lang.String player, java.lang.String attacker, int xpLost, int guildXPLost)
player
- the name of the player who diedattacker
- description of the attacker, e.g. attacker.toString()xpLost
- how many XP the player lost from dyingguildXPLost
- how much guild XP the player lost from dyingpublic static java.lang.String constructKilledByMsg(GameObject attacker)
public void initialize()
initialize
in interface GameObject
initialize
in class StaticObject
public boolean ownerIsOnline()
public boolean playerLostXP()
public int xpLost()
public int guildXPLost()
public java.lang.String getOwner()
public boolean hasOwner()
public void setOwner(java.lang.String name)
public void setInscription(java.lang.String name)
name
- the player's namepublic void destroy()
destroy
in interface GameObject
destroy
in class MapObject
public boolean isPKGrave()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |