Interface EntityManager

All Known Implementing Classes:
DefaultEntityManager

public interface EntityManager
Ruleset Interface for resolving Entities in Stendhal.
Author:
Matthias Totz
  • Method Details

    • addItem

      boolean addItem(DefaultItem item)
    • addCreature

      boolean addCreature(DefaultCreature creature)
    • addSpell

      boolean addSpell(DefaultSpell spell)
    • getCreatures

      Collection<Creature> getCreatures()
      Returns:
      a list of all Creatures that are used at least once.
    • populateCreatureList

      void populateCreatureList()
    • getItems

      Collection<Item> getItems()
      Returns:
      a list of all Items that are being used at least once.
    • getDefaultCreatures

      Collection<DefaultCreature> getDefaultCreatures()
      gets a list of all configured creatures
      Returns:
      list of default creatures
    • getDefaultItems

      Collection<DefaultItem> getDefaultItems()
      gets a list of all configured items
      Returns:
      list of default items
    • getEntity

      Entity getEntity(String clazz)
      Returns the entity or null if the class is unknown.
      Parameters:
      clazz - the creature class, must not be null
      Returns:
      the entity or null
    • getCreature

      Creature getCreature(String tileset, int id)
      returns the creature or null if the id is unknown.
      Parameters:
      tileset -
      id - the tile id
      Returns:
      the creature or null
    • getCreature

      Creature getCreature(String clazz)
      returns the creature or null if the clazz is unknown.
      Parameters:
      clazz - the creature class, must not be null
      Returns:
      the creature or null
      Throws:
      NullPointerException - if clazz is null
    • getDefaultCreature

      DefaultCreature getDefaultCreature(String clazz)
      Returns the DefaultCreature or null if the clazz is unknown.
      Parameters:
      clazz - the creature class
      Returns:
      the creature or null
      Throws:
      NullPointerException - if clazz is null
    • isCreature

      boolean isCreature(String tileset, int id)
      Return true if the Entity is a creature.
      Parameters:
      tileset -
      id - the tile id
      Returns:
      true if it is a creature, false otherwise
    • isCreature

      boolean isCreature(String clazz)
      Return true if the Entity is a creature.
      Parameters:
      clazz - the creature class, must not be null
      Returns:
      true if it is a creature, false otherwise
    • isItem

      boolean isItem(String clazz)
      Return true if the Entity is a Item.
      Parameters:
      clazz - the Item class, must not be null
      Returns:
      true if it is a Item, false otherwise
    • getItem

      Item getItem(String clazz)
      Returns the item or null if the clazz is unknown.
      Parameters:
      clazz - the item class, must not be null
      Returns:
      the item or null
    • getSpell

      Spell getSpell(String spell)
      Retrieves a Spell or null if the spell is unknown.
      Parameters:
      spell -
      Returns:
      the spell or null if spell is unknown
    • isSpell

      boolean isSpell(String spellName)
      checks if spellName points to an existing spell
      Parameters:
      spellName -
      Returns:
      true iff a spell with that name exists
    • getSpells

      Collection<Spell> getSpells()
      Returns:
      a collection of spells that are used at least once
    • getConfiguredSpells

      Collection<String> getConfiguredSpells()
      Returns:
      a collection of all available spells