net.sf.mud4j.character
Class PlayerCharacter

java.lang.Object
  extended by net.sf.mud4j.character.AbstractCharacter
      extended by net.sf.mud4j.character.PlayerCharacter
All Implemented Interfaces:
Character, Messageable, Damageable, Effectable

public class PlayerCharacter
extends AbstractCharacter
implements Damageable

Player character for non-autonomous characters.

Author:
Matthew Purland

Constructor Summary
PlayerCharacter(Character character, ConnectionService connectionService)
           
 
Method Summary
 java.util.List<CharacterAbility> getAbilities()
          Get character abilities that the character has.
 java.util.List<Item> getItems()
          Get character items that the character has possession of.
 java.lang.String getName()
          Get the name of the character.
 boolean hasAbility(CharacterAbility ability)
          Determines if the character has an ability.
 boolean hasItem(Item item)
          Does the player have a particular item?
 void message(java.lang.String message)
          Message the character through the provided connection service.
 
Methods inherited from class net.sf.mud4j.character.AbstractCharacter
getDamageBehavior, getEffectBehavior, getLevel, setDamageBehavior, setEffectBehavior
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.mud4j.damage.Damageable
getDamageBehavior, setDamageBehavior
 

Constructor Detail

PlayerCharacter

public PlayerCharacter(Character character,
                       ConnectionService connectionService)
Method Detail

getAbilities

public java.util.List<CharacterAbility> getAbilities()
Get character abilities that the character has.

Specified by:
getAbilities in interface Character
Overrides:
getAbilities in class AbstractCharacter
Returns:
Returns collection of character abilities.

getItems

public java.util.List<Item> getItems()
Get character items that the character has possession of.

Specified by:
getItems in interface Character
Overrides:
getItems in class AbstractCharacter
Returns:
Returns a list of items that the character has.

getName

public java.lang.String getName()
Get the name of the character.

Specified by:
getName in interface Character
Overrides:
getName in class AbstractCharacter
Returns:
Returns the name of the character.

hasAbility

public boolean hasAbility(CharacterAbility ability)
Determines if the character has an ability.

Specified by:
hasAbility in interface Character
Overrides:
hasAbility in class AbstractCharacter
Returns:
Returns whether the character has an ability.

hasItem

public boolean hasItem(Item item)
Does the player have a particular item?

Specified by:
hasItem in interface Character
Overrides:
hasItem in class AbstractCharacter
Parameters:
item - Item for which the player might have.
Returns:
Returns if the character has an item.

message

public void message(java.lang.String message)
             throws java.io.IOException
Message the character through the provided connection service.

Specified by:
message in interface Messageable
Overrides:
message in class AbstractCharacter
Throws:
java.io.IOException


Copyright © 2006-2007 mud4j. All Rights Reserved.