1 /**
2 * Copyright 2006 Matthew Purland (m.purland@gmail.com)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package net.sf.mud4j.character;
18
19 import java.util.List;
20
21 import net.sf.mud4j.ability.CharacterAbility;
22 import net.sf.mud4j.damage.Damageable;
23 import net.sf.mud4j.effect.Effectable;
24 import net.sf.mud4j.world.item.Item;
25
26 /**
27 * Interface for defining different types of players.
28 *
29 * @author Matthew Purland
30 */
31 public interface Character extends Damageable, Messageable, Effectable {
32 /**
33 * Get the name of the character.
34 * @return Returns the name of the character.
35 */
36 public String getName();
37
38 /**
39 * Get character abilities that the character has.
40 * @return Returns collection of character abilities.
41 */
42 public List<CharacterAbility> getAbilities();
43
44 /**
45 * Get character items that the character has possession of.
46 * @return Returns a list of items that the character has.
47 */
48 public List<Item> getItems();
49
50 /**
51 * Determines if the character has an ability.
52 * @return Returns whether the character has an ability.
53 */
54 public boolean hasAbility(CharacterAbility ability);
55
56 /**
57 * Does the player have a particular item?
58 * @param item Item for which the player might have.
59 * @return Returns if the character has an item.
60 */
61 public boolean hasItem(Item item);
62
63 /**
64 * Get level of character.
65 * @return Returns the level of the character.
66 */
67 public int getLevel();
68 }