Fix door break

This commit is contained in:
Jesse Boyd 2017-03-18 00:49:41 +11:00
parent 1129a80329
commit 5262ff665a
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -492,8 +492,6 @@ public class MainListener {
return true; return true;
} }
if (!plot1.isAdded(pp.getUUID()) || !Permissions.hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_OTHER, true)) { if (!plot1.isAdded(pp.getUUID()) || !Permissions.hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_OTHER, true)) {
return false;
} else {
com.google.common.base.Optional<HashSet<PlotBlock>> destroy = plot1.getFlag(Flags.BREAK); com.google.common.base.Optional<HashSet<PlotBlock>> destroy = plot1.getFlag(Flags.BREAK);
BlockState state = l.getBlock(); BlockState state = l.getBlock();
if (destroy.isPresent() && destroy.get().contains(SpongeUtil.getPlotBlock(state))) { if (destroy.isPresent() && destroy.get().contains(SpongeUtil.getPlotBlock(state))) {
@ -502,6 +500,7 @@ public class MainListener {
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_DESTROY_OTHER); MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_DESTROY_OTHER);
return false; return false;
} }
return true;
}); });
} }