mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-27 20:46:31 +01:00
Fix Towny
This commit is contained in:
parent
94e94e99a2
commit
f94ef396f0
@ -15,6 +15,7 @@ import org.bukkit.event.Listener;
|
||||
* @author Acrobot
|
||||
*/
|
||||
public class Towny implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public static void canBuild(BuildPermissionEvent event) {
|
||||
Location chest = event.getChest();
|
||||
@ -79,7 +80,7 @@ public class Towny implements Listener {
|
||||
|
||||
private static boolean isInsideShopPlot(Location... locations) {
|
||||
for (Location location : locations) {
|
||||
if (!isInsideShopPlot(location)) {
|
||||
if (location != null && !isInsideShopPlot(location)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -93,7 +94,7 @@ public class Towny implements Listener {
|
||||
|
||||
private static boolean isInWilderness(Location... locations) {
|
||||
for (Location location : locations) {
|
||||
if (!isInWilderness(location)) {
|
||||
if (location != null && !isInWilderness(location)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user