mirror of
https://github.com/CodeMC/WorldGuardWrapper.git
synced 2024-11-10 05:05:20 +01:00
Add region priority getter
This commit is contained in:
parent
8487298362
commit
c71a728254
|
@ -14,5 +14,7 @@ public abstract class AbstractRegion {
|
||||||
public abstract Object getFlag(String name);
|
public abstract Object getFlag(String name);
|
||||||
|
|
||||||
public abstract Map<String, Object> getFlags();
|
public abstract Map<String, Object> getFlags();
|
||||||
|
|
||||||
|
public abstract int getPriority();
|
||||||
|
|
||||||
}
|
}
|
|
@ -66,11 +66,16 @@ public class WorldGuardImplementation extends AbstractWorldGuardImplementation {
|
||||||
region.getFlags().forEach((flag, value) -> map.put(flag.getName(), value));
|
region.getFlags().forEach((flag, value) -> map.put(flag.getName(), value));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getFlag(String name) {
|
public Object getFlag(String name) {
|
||||||
return region.getFlag(flagRegistry.get(name));
|
return region.getFlag(flagRegistry.get(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return region.getPriority();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,11 @@ public class WorldGuardImplementation extends AbstractWorldGuardImplementation {
|
||||||
public Object getFlag(String name) {
|
public Object getFlag(String name) {
|
||||||
return region.getFlag(flagRegistry.get(name));
|
return region.getFlag(flagRegistry.get(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return region.getPriority();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user