mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-26 19:18:53 +01:00
Add ProtectedRegion.copyFrom().
This commit is contained in:
parent
76f7ac8d8e
commit
501a7aa77a
@ -462,6 +462,24 @@ public void setFlags(Map<Flag<?>, Object> flags) {
|
||||
this.flags = new ConcurrentHashMap<Flag<?>, Object>(flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy attributes from another region.
|
||||
*
|
||||
* @param other the other region
|
||||
*/
|
||||
public void copyFrom(ProtectedRegion other) {
|
||||
checkNotNull(other);
|
||||
setMembers(other.getMembers());
|
||||
setOwners(other.getOwners());
|
||||
setFlags(other.getFlags());
|
||||
setPriority(other.getPriority());
|
||||
try {
|
||||
setParent(other.getParent());
|
||||
} catch (CircularInheritanceException ignore) {
|
||||
// This should not be thrown
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get points of the region projected onto the X-Z plane.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user