Fixed World Guard Initiation

This commit is contained in:
Driftay 2019-11-21 09:10:04 -05:00
parent 6c10cdd47d
commit 3710031b80
2 changed files with 3 additions and 4 deletions

View File

@ -89,6 +89,7 @@ public class FactionsPlugin extends MPlugin {
private boolean mvdwPlaceholderAPIManager = false; private boolean mvdwPlaceholderAPIManager = false;
private Listener[] eventsListener; private Listener[] eventsListener;
public List<String> itemList = getConfig().getStringList("fchest.Items-Not-Allowed"); public List<String> itemList = getConfig().getStringList("fchest.Items-Not-Allowed");
private Worldguard wg;
public FactionsPlugin() { public FactionsPlugin() {
@ -230,9 +231,7 @@ public class FactionsPlugin extends MPlugin {
Econ.setup(); Econ.setup();
setupPermissions(); setupPermissions();
if (Conf.worldGuardChecking || Conf.worldGuardBuildPriority) { if (Conf.worldGuardChecking || Conf.worldGuardBuildPriority) wg = new Worldguard();
Worldguard.init(this);
}
EngineDynmap.getInstance().init(); EngineDynmap.getInstance().init();

View File

@ -817,7 +817,7 @@ public abstract class MemoryFPlayer implements FPlayer {
int factionBuffer = FactionsPlugin.getInstance().getConfig().getInt("hcf.buffer-zone", 0); int factionBuffer = FactionsPlugin.getInstance().getConfig().getInt("hcf.buffer-zone", 0);
int worldBuffer = FactionsPlugin.getInstance().getConfig().getInt("world-border.buffer", 0); int worldBuffer = FactionsPlugin.getInstance().getConfig().getInt("world-border.buffer", 0);
if (Conf.worldGuardChecking && Worldguard.checkForRegionsInChunk(flocation) && !this.isAdminBypassing()) { if (Conf.worldGuardChecking && Worldguard.getInstance().checkForRegionsInChunk(flocation) && !this.isAdminBypassing()) {
// Checks for WorldGuard regions in the chunk attempting to be claimed // Checks for WorldGuard regions in the chunk attempting to be claimed
error = FactionsPlugin.getInstance().txt.parse(TL.CLAIM_PROTECTED.toString()); error = FactionsPlugin.getInstance().txt.parse(TL.CLAIM_PROTECTED.toString());
} else if (flocation.isOutsideWorldBorder(FactionsPlugin.getInstance().getConfig().getInt("world-border.buffer", 0))) { } else if (flocation.isOutsideWorldBorder(FactionsPlugin.getInstance().getConfig().getInt("world-border.buffer", 0))) {