mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
fix: correctly process chunks when using worldguard region blacklists (#2789)
- fixes #2399
This commit is contained in:
parent
705df34c12
commit
4fe9c6bd74
@ -1,5 +1,6 @@
|
|||||||
package com.fastasyncworldedit.bukkit.regions;
|
package com.fastasyncworldedit.bukkit.regions;
|
||||||
|
|
||||||
|
import com.fastasyncworldedit.core.configuration.Settings;
|
||||||
import com.fastasyncworldedit.core.regions.FaweMask;
|
import com.fastasyncworldedit.core.regions.FaweMask;
|
||||||
import com.fastasyncworldedit.core.regions.RegionWrapper;
|
import com.fastasyncworldedit.core.regions.RegionWrapper;
|
||||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||||
@ -158,6 +159,9 @@ public class WorldGuardFeature extends BukkitMaskManager implements Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FaweMask getMask(com.sk89q.worldedit.entity.Player wePlayer, MaskType type, boolean isWhitelist) {
|
public FaweMask getMask(com.sk89q.worldedit.entity.Player wePlayer, MaskType type, boolean isWhitelist) {
|
||||||
|
if (isWhitelist && Settings.settings().REGION_RESTRICTIONS_OPTIONS.WORLDGUARD_REGION_BLACKLIST) {
|
||||||
|
return new FaweMask(RegionWrapper.GLOBAL());
|
||||||
|
}
|
||||||
final Player player = BukkitAdapter.adapt(wePlayer);
|
final Player player = BukkitAdapter.adapt(wePlayer);
|
||||||
final LocalPlayer localplayer = this.worldguard.wrapPlayer(player);
|
final LocalPlayer localplayer = this.worldguard.wrapPlayer(player);
|
||||||
final Location location = player.getLocation();
|
final Location location = player.getLocation();
|
||||||
|
@ -482,7 +482,7 @@ public interface Region extends Iterable<BlockVector3>, Cloneable, IBatchProcess
|
|||||||
}
|
}
|
||||||
return set;
|
return set;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ public class RegionIntersection extends AbstractRegion {
|
|||||||
BlockVector3 regMin = region.getMinimumPoint();
|
BlockVector3 regMin = region.getMinimumPoint();
|
||||||
BlockVector3 regMax = region.getMaximumPoint();
|
BlockVector3 regMax = region.getMaximumPoint();
|
||||||
if (tx >= regMin.x() && bx <= regMax.x() && tz >= regMin.z() && bz <= regMax.z()) {
|
if (tx >= regMin.x() && bx <= regMax.x() && tz >= regMin.z() && bz <= regMax.z()) {
|
||||||
return region.processSet(chunk, get, set, true);
|
set = region.processSet(chunk, get, set, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return set; // default return set as no "blacklist" regions contained the chunk
|
return set; // default return set as no "blacklist" regions contained the chunk
|
||||||
|
Loading…
Reference in New Issue
Block a user