Class PortalSetupDescriptor
java.lang.Object
games.stendhal.server.core.config.zone.SetupDescriptor
games.stendhal.server.core.config.zone.EntitySetupDescriptor
games.stendhal.server.core.config.zone.PortalSetupDescriptor
A portal setup descriptor.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected ObjectThe named destination portal (if any).protected StringThe destination zone name (if any).protected ObjectThe named portal identifier.protected booleanWhether replacing an existing portal at that location.Fields inherited from class games.stendhal.server.core.config.zone.EntitySetupDescriptor
attributes, className, x, yFields inherited from class games.stendhal.server.core.config.zone.SetupDescriptor
parameters -
Constructor Summary
ConstructorsConstructorDescriptionPortalSetupDescriptor(int x, int y, Object identifier) Create a portal setup descriptor. -
Method Summary
Modifier and TypeMethodDescriptionGet the destination identifier.Get the destination zone.Get the identifier.booleanDetermine if existing portals are replaced.voidsetAssociatedZones(String zones) For house portals.voidsetDestination(String zone, Object identifier) Set the destination zone/identifier.voidsetReplacing(boolean replacing) Set whether to replace any existing portal.voidsetup(StendhalRPZone zone) Do appropriate zone setup.Methods inherited from class games.stendhal.server.core.config.zone.EntitySetupDescriptor
addPort, getAttributes, getImplementation, getX, getY, setAttribute, setConnectorName, setImplementationMethods inherited from class games.stendhal.server.core.config.zone.SetupDescriptor
getParameters, setParameter
-
Field Details
-
identifier
The named portal identifier. -
destinationZone
The destination zone name (if any). -
associatedZones
-
destinationIdentifier
The named destination portal (if any). -
replacing
protected boolean replacingWhether replacing an existing portal at that location.
-
-
Constructor Details
-
PortalSetupDescriptor
Create a portal setup descriptor.- Parameters:
x- The X coordinate.y- The Y coordinate.identifier- The identifier,
-
-
Method Details
-
getDestinationIdentifier
Get the destination identifier.- Returns:
- An identifier.
-
getDestinationZone
Get the destination zone.- Returns:
- A zone name.
-
getIdentifier
Get the identifier.- Returns:
- An identifier.
-
isReplacing
public boolean isReplacing()Determine if existing portals are replaced.- Returns:
trueif replacing an existing portal at that location.
-
setDestination
Set the destination zone/identifier.- Parameters:
zone- The destination zone name.identifier- The named destination portal.
-
setReplacing
public void setReplacing(boolean replacing) Set whether to replace any existing portal.- Parameters:
replacing- Whether replacing an existing portal at that location.
-
setAssociatedZones
For house portals. -
setup
Do appropriate zone setup.- Overrides:
setupin classEntitySetupDescriptor- Parameters:
zone- The zone.
-