Fix Towny

This commit is contained in:
Acrobot 2013-05-03 01:56:54 +02:00
parent 94e94e99a2
commit f94ef396f0

View File

@ -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;
}
}