From 18c2164049afe512125dd956057e642567d4bed3 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Thu, 24 Feb 2011 20:29:47 +0100 Subject: [PATCH] added basic support of region teleport in ProtectedRegion --- .../protection/regions/ProtectedRegion.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/com/sk89q/worldguard/protection/regions/ProtectedRegion.java b/src/com/sk89q/worldguard/protection/regions/ProtectedRegion.java index 23b53777..06830a94 100644 --- a/src/com/sk89q/worldguard/protection/regions/ProtectedRegion.java +++ b/src/com/sk89q/worldguard/protection/regions/ProtectedRegion.java @@ -19,6 +19,8 @@ package com.sk89q.worldguard.protection.regions; +import org.bukkit.Location; + import com.sk89q.worldedit.BlockVector; import com.sk89q.worldedit.Vector; import com.sk89q.worldguard.LocalPlayer; @@ -67,6 +69,11 @@ public abstract class ProtectedRegion implements Comparable { * Area message. */ private String leaveMessage; + + /** + * Point of region teleport. + */ + private Location teleportLocation; /** * Construct a new instance of this region. @@ -351,4 +358,19 @@ public static boolean intersects(ProtectedRegion region1, ProtectedRegion region public static class CircularInheritanceException extends Exception { private static final long serialVersionUID = 7479613488496776022L; } + + /** + * Return the teleport location for this region. + */ + public Location getTeleportLocation() { + return teleportLocation; + } + + /** + * Set the teleport location for this region. + */ + public void setTeleportLocation(Location teleportLocation){ + this.teleportLocation = teleportLocation; + } + }