Reformat this
This commit is contained in:
parent
32a52e4f3f
commit
e17944f6cc
@ -12,20 +12,16 @@ import com.sk89q.worldguard.bukkit.WGBukkit;
|
|||||||
public class WGHook {
|
public class WGHook {
|
||||||
|
|
||||||
public static boolean isAllowedInRegion(HashSet<String> disabledRegions, Location location) {
|
public static boolean isAllowedInRegion(HashSet<String> disabledRegions, Location location) {
|
||||||
if (Bukkit.getPluginManager().getPlugin("WorldGuard") == null)
|
if (Bukkit.getPluginManager().getPlugin("WorldGuard") == null) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (disabledRegions.isEmpty())
|
if (disabledRegions.isEmpty()) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> aregions = WGBukkit.getRegionManager(location.getWorld()).getApplicableRegionsIDs(BukkitUtil.toVector(location));
|
List<String> aregions = WGBukkit.getRegionManager(location.getWorld()).getApplicableRegionsIDs(BukkitUtil.toVector(location));
|
||||||
for (String region : aregions)
|
for (String region : aregions) {
|
||||||
{
|
if (disabledRegions.contains(region)) {
|
||||||
if (disabledRegions.contains(region))
|
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user