Remove worldguard region integration
This commit is contained in:
parent
07d0e3d4a6
commit
94825e44a8
Binary file not shown.
Binary file not shown.
@ -19,7 +19,6 @@ import org.bukkit.material.WoodenStep;
|
|||||||
import com.cnaude.chairs.commands.ChairsIgnoreList;
|
import com.cnaude.chairs.commands.ChairsIgnoreList;
|
||||||
import com.cnaude.chairs.core.ChairBlock;
|
import com.cnaude.chairs.core.ChairBlock;
|
||||||
import com.cnaude.chairs.core.Chairs;
|
import com.cnaude.chairs.core.Chairs;
|
||||||
import com.cnaude.chairs.pluginhooks.WGHook;
|
|
||||||
|
|
||||||
public class TrySitEventListener implements Listener {
|
public class TrySitEventListener implements Listener {
|
||||||
|
|
||||||
@ -77,11 +76,6 @@ public class TrySitEventListener implements Listener {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Region allowance check
|
|
||||||
if (!WGHook.isAllowedInRegion(plugin.disabledRegions, block.getLocation())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Stairs stairs = null;
|
Stairs stairs = null;
|
||||||
Step step = null;
|
Step step = null;
|
||||||
WoodenStep wStep = null;
|
WoodenStep wStep = null;
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
package com.cnaude.chairs.pluginhooks;
|
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Location;
|
|
||||||
|
|
||||||
import com.sk89q.worldedit.bukkit.BukkitUtil;
|
|
||||||
import com.sk89q.worldguard.bukkit.WGBukkit;
|
|
||||||
|
|
||||||
public class WGHook {
|
|
||||||
|
|
||||||
public static boolean isAllowedInRegion(HashSet<String> disabledRegions, Location location) {
|
|
||||||
if (Bukkit.getPluginManager().getPlugin("WorldGuard") == null) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (disabledRegions.isEmpty()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<String> aregions = WGBukkit.getRegionManager(location.getWorld()).getApplicableRegionsIDs(BukkitUtil.toVector(location));
|
|
||||||
for (String region : aregions) {
|
|
||||||
if (disabledRegions.contains(region)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -35,8 +35,6 @@ max-chair-width: 3
|
|||||||
sign-check: false
|
sign-check: false
|
||||||
distance: 2
|
distance: 2
|
||||||
ignore-if-item-in-hand: false
|
ignore-if-item-in-hand: false
|
||||||
disabledWGRegions:
|
|
||||||
- exampleregionname
|
|
||||||
sit-effects:
|
sit-effects:
|
||||||
healing:
|
healing:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: Chairs
|
name: Chairs
|
||||||
version: 4.3
|
version: 4.4
|
||||||
description: Let players sit on blocks.
|
description: Let players sit on blocks.
|
||||||
website: http://dev.bukkit.org/bukkit-plugins/chairsreloaded/
|
website: http://dev.bukkit.org/bukkit-plugins/chairsreloaded/
|
||||||
authors:
|
authors:
|
||||||
|
Loading…
Reference in New Issue
Block a user