check if clusters are enables

This commit is contained in:
boy0001 2015-02-02 11:52:48 +11:00
parent 9a81e31cd6
commit c4d84bb070
2 changed files with 4 additions and 4 deletions

View File

@ -248,12 +248,12 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
}
Player player = event.getPlayer();
Location loc = event.getBlock().getLocation();
if (isInPlot(loc)) {
final Plot plot = getCurrentPlot(loc);
if (plot != null) {
if (event.getBlock().getY() == 0) {
event.setCancelled(true);
return;
}
final Plot plot = getCurrentPlot(loc);
if (!plot.hasOwner()) {
if (PlotMain.hasPermission(player, "plots.admin.destroy.unowned")) {
return;

View File

@ -91,7 +91,7 @@ import com.sk89q.worldguard.protection.flags.BooleanFlag;
public static boolean isPlotArea(Location location) {
PlotWorld plotworld = PlotMain.getWorldSettings(location.getWorld());
if (plotworld.REQUIRE_CLUSTER) {
if (Settings.ENABLE_CLUSTERS && plotworld.REQUIRE_CLUSTER) {
return ClusterManager.getCluster(location) != null;
}
return true;