mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-12 03:13:40 +01: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;
|
||||
|
||||
import org.bukkit.Location;
|
||||
|
||||
import com.sk89q.worldedit.BlockVector;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldguard.LocalPlayer;
|
||||
@ -68,6 +70,11 @@ public abstract class ProtectedRegion implements Comparable<ProtectedRegion> {
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user