Class NoLoginAreaFactory
java.lang.Object
games.stendhal.server.entity.mapstuff.area.NoLoginAreaFactory
- All Implemented Interfaces:
ConfigurableFactory
A base factory for
NoLoginArea
objects.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate an object.protected int
Extract the height from context.protected String
Get the message to send to the player.protected int
Get the new player X coordinate.protected int
Get the new player Y coordinate.protected int
Extract the width from context.
-
Constructor Details
-
NoLoginAreaFactory
public NoLoginAreaFactory()
-
-
Method Details
-
getHeight
Extract the height from context.- Parameters:
ctx
- The configuration context.- Returns:
- The height, 1 if unspecified.
- Throws:
IllegalArgumentException
- If the attribute is invalid.
-
getWidth
Extract the width from context.- Parameters:
ctx
- The configuration context.- Returns:
- The width, 1 if unspecified.
- Throws:
IllegalArgumentException
- If the attribute is invalid.
-
getMessage
Get the message to send to the player.- Parameters:
ctx
- The configuration context.- Returns:
- The message to send to the player.
-
getNewX
Get the new player X coordinate.- Parameters:
ctx
- The configuration context.- Returns:
- The new player X coordinate.
- Throws:
IllegalArgumentException
- If the attribute is missing/invalid.
-
getNewY
Get the new player Y coordinate.- Parameters:
ctx
- The configuration context.- Returns:
- The new player Y coordinate.
- Throws:
IllegalArgumentException
- If the attribute is missing/invalid.
-
create
Create an object.- Specified by:
create
in interfaceConfigurableFactory
- Parameters:
ctx
- The configuration context.- Returns:
- A new object, or
null
if allowed by the factory type. - Throws:
IllegalArgumentException
- If there is a problem with the attributes. The exception message should be a value suitable for meaningful user interpretation.
-