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