mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-10-04 17:47:41 +02:00
added basic support of region teleport in ProtectedRegion
This commit is contained in:
parent
c9688a9c58
commit
18c2164049
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
package com.sk89q.worldguard.protection.regions;
|
package com.sk89q.worldguard.protection.regions;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
|
||||||
import com.sk89q.worldedit.BlockVector;
|
import com.sk89q.worldedit.BlockVector;
|
||||||
import com.sk89q.worldedit.Vector;
|
import com.sk89q.worldedit.Vector;
|
||||||
import com.sk89q.worldguard.LocalPlayer;
|
import com.sk89q.worldguard.LocalPlayer;
|
||||||
@ -68,6 +70,11 @@ public abstract class ProtectedRegion implements Comparable<ProtectedRegion> {
|
|||||||
*/
|
*/
|
||||||
private String leaveMessage;
|
private String leaveMessage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Point of region teleport.
|
||||||
|
*/
|
||||||
|
private Location teleportLocation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a new instance of this region.
|
* 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 {
|
public static class CircularInheritanceException extends Exception {
|
||||||
private static final long serialVersionUID = 7479613488496776022L;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user