Class EntitySetupDescriptor

java.lang.Object
games.stendhal.server.core.config.zone.SetupDescriptor
games.stendhal.server.core.config.zone.EntitySetupDescriptor
Direct Known Subclasses:
PortalSetupDescriptor

public class EntitySetupDescriptor extends SetupDescriptor
A generic entity setup descriptor.
  • Field Details

    • x

      protected int x
      The entity's X coordinate.
    • y

      protected int y
      The entity's Y coordinate.
    • className

      protected String className
      The [logical] class name of the implementation.
    • attributes

      protected HashMap<String,​String> attributes
      The generic entity attributes.
  • Constructor Details

    • EntitySetupDescriptor

      public EntitySetupDescriptor(int x, int y)
      Create an entity setup descriptor.
      Parameters:
      x - The X coordinate.
      y - The Y coordinate.
  • Method Details

    • getAttributes

      public Map<String,​String> getAttributes()
      Get the generic entity attributes.
      Returns:
      A map of entity attributes.
    • getImplementation

      public String getImplementation()
      Get the implementation class name.
      Returns:
      The [logical] class name for the implementation.
    • getX

      public int getX()
      Get the X coordinate.
      Returns:
      The entity's X coordinate.
    • getY

      public int getY()
      Get the Y coordinate.
      Returns:
      The entity's Y coordinate.
    • setAttribute

      public void setAttribute(String name, String value)
      Set a generic entity attribute.
      Parameters:
      name - An attribute name.
      value - An attribute value.
    • setImplementation

      public void setImplementation(String className)
      Set the implementation class name.
      Parameters:
      className - The [logical] class name for the implementation.
    • setConnectorName

      public void setConnectorName(String connectorName)
      sets the connection name
      Parameters:
      connectorName - name
    • addPort

      public void addPort(String key, String expression)
      adds a port
      Parameters:
      key - key
      expression - expression
    • setup

      public void setup(StendhalRPZone zone)
      Do appropriate zone setup.
      Specified by:
      setup in class SetupDescriptor
      Parameters:
      zone - The zone.