Class TeleportationRules
java.lang.Object
games.stendhal.server.core.config.zone.TeleportationRules
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Block teleporting in.void
disallowIn(int x, int y, int width, int height)
Block teleporting to a rectangular area.void
Block teleporting out.void
disallowOut(int x, int y, int width, int height)
Block teleporting from a rectangular area.boolean
isInAllowed(int x, int y)
Check if teleporting to a location is allowed.boolean
isOutAllowed(int x, int y)
Check if teleporting from a location is allowed.
-
Constructor Details
-
TeleportationRules
public TeleportationRules()
-
-
Method Details
-
disallowIn
public void disallowIn(int x, int y, int width, int height)Block teleporting to a rectangular area.- Parameters:
x
- x coordinate of the blocked areay
- y coordinate of the blocked areawidth
- width of the blocked areaheight
- height of the blocked area
-
disallowIn
public void disallowIn()Block teleporting in. -
isInAllowed
public boolean isInAllowed(int x, int y)Check if teleporting to a location is allowed.- Parameters:
x
- x coordinatey
- y coordinate- Returns:
true
if teleporting to the point is allowed,false
otherwise
-
disallowOut
public void disallowOut(int x, int y, int width, int height)Block teleporting from a rectangular area.- Parameters:
x
- x coordinate of the blocked areay
- y coordinate of the blocked areawidth
- width of the blocked areaheight
- height of the blocked area
-
disallowOut
public void disallowOut()Block teleporting out. -
isOutAllowed
public boolean isOutAllowed(int x, int y)Check if teleporting from a location is allowed.- Parameters:
x
- x coordinatey
- y coordinate- Returns:
true
if teleporting to the point is allowed,false
otherwise
-