Package games.stendhal.server.util
Class Area
java.lang.Object
games.stendhal.server.util.Area
- Direct Known Subclasses:
TrainingArea
An area is a specified place on a specified zone like (88, 78) to (109, 98)
in 0_ados_wall_n.
- Author:
- hendrik
-
Constructor Summary
ConstructorDescriptionArea(StendhalRPZone zone, int x, int y, int width, int height)
Creates a new Area.Area(StendhalRPZone zone, Rectangle2D shape)
Creates a new Area. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether an entity is in this area (e.boolean
contains(CreatureRespawnPoint point)
Checks whether a respawn point is within this area.boolean
Gets a list of players in the area.getShape()
Gets the shape.getZone()
gets the zoneint
hashCode()
toString()
-
Constructor Details
-
Area
Creates a new Area.- Parameters:
zone
- name of the mapshape
- shape on that map
-
Area
Creates a new Area.- Parameters:
zone
- name of the mapx
- xy
- ywidth
- widthheight
- height
-
-
Method Details
-
contains
Checks whether an entity is in this area (e. g. on this zone and inside of the shape)- Parameters:
entity
- An entity to check- Returns:
- true, if and only if the entity is in this area.
-
contains
Checks whether a respawn point is within this area.- Parameters:
point
- the point to examine- Returns:
true
if the point is within this area,false otherwise
-
getShape
Gets the shape.- Returns:
- shape
-
getPlayers
Gets a list of players in the area.- Returns:
- A list of all players in the area.
-
getZone
gets the zone- Returns:
- StendhalRPZone
-
hashCode
public int hashCode() -
equals
-
toString
-