mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Adjust mask managers
- Add list of "exclusive" managers to config to aid users in having some sort of prioritisation. - Fixes #960 if PlotSquared is added to exclusive managers, otherwise, there's no particularly sane way of adding prioritisation without requiring a treemap be added to YAML config, or for us to decide upon it ourselves
This commit is contained in:
@ -304,10 +304,10 @@ public class FaweBukkit implements IFawe, Listener {
|
||||
return;
|
||||
}
|
||||
if (plotSquared.getClass().getPackage().toString().contains("intellectualsites")) {
|
||||
WEManager.IMP.managers.add(new com.fastasyncworldedit.bukkit.regions.plotsquaredv4.PlotSquaredFeature());
|
||||
WEManager.IMP.addManager(new com.fastasyncworldedit.bukkit.regions.plotsquaredv4.PlotSquaredFeature());
|
||||
LOGGER.info("Plugin 'PlotSquared' found. Using it now.");
|
||||
} else if (PlotSquared.get().getVersion().version[0] == 6) {
|
||||
WEManager.IMP.managers.add(new com.fastasyncworldedit.bukkit.regions.plotsquared.PlotSquaredFeature());
|
||||
WEManager.IMP.addManager(new com.fastasyncworldedit.bukkit.regions.plotsquared.PlotSquaredFeature());
|
||||
LOGGER.info("Plugin 'PlotSquared' found. Using it now.");
|
||||
} else {
|
||||
LOGGER.error("Incompatible version of PlotSquared found. Please use PlotSquared v6.");
|
||||
|
@ -124,20 +124,12 @@ public class WorldGuardFeature extends BukkitMaskManager implements Listener {
|
||||
final BlockVector3 pos1;
|
||||
final BlockVector3 pos2;
|
||||
if (myregion.getId().equals("__global__")) {
|
||||
pos1 = BlockVector3.at(Integer.MIN_VALUE, 0, Integer.MIN_VALUE);
|
||||
pos2 = BlockVector3.at(Integer.MAX_VALUE, 255, Integer.MAX_VALUE);
|
||||
pos1 = BlockVector3.at(Integer.MIN_VALUE, wePlayer.getWorld().getMinY(), Integer.MIN_VALUE);
|
||||
pos2 = BlockVector3.at(Integer.MAX_VALUE, wePlayer.getWorld().getMaxY(), Integer.MAX_VALUE);
|
||||
} else {
|
||||
if (myregion instanceof ProtectedCuboidRegion) {
|
||||
pos1 = BlockVector3.at(
|
||||
myregion.getMinimumPoint().getBlockX(),
|
||||
myregion.getMinimumPoint().getBlockY(),
|
||||
myregion.getMinimumPoint().getBlockZ()
|
||||
);
|
||||
pos2 = BlockVector3.at(
|
||||
myregion.getMaximumPoint().getBlockX(),
|
||||
myregion.getMaximumPoint().getBlockY(),
|
||||
myregion.getMaximumPoint().getBlockZ()
|
||||
);
|
||||
pos1 = myregion.getMinimumPoint();
|
||||
pos2 = myregion.getMaximumPoint();
|
||||
} else {
|
||||
return new FaweMask(adapt(myregion)) {
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user