Fixed Kingdoms

This commit is contained in:
Auxilor 2020-10-31 11:33:36 +00:00
parent ae1fd6b7af
commit f1891cbcf1
3 changed files with 2 additions and 4 deletions

View File

@ -14,12 +14,10 @@ import org.kingdoms.managers.PvPManager;
import org.kingdoms.managers.land.LandManager;
public final class AntigriefKingdoms implements AntigriefWrapper {
private final LandManager landManager = new LandManager();
@Override
public boolean canBreakBlock(Player player, Block block) {
BlockBreakEvent event = new BlockBreakEvent(block, player);
landManager.onBreak(event);
LandManager.onBreak(event);
return !event.isCancelled();
}
@ -37,7 +35,7 @@ public final class AntigriefKingdoms implements AntigriefWrapper {
public boolean canPlaceBlock(Player player, Block block) {
Block placedOn = block.getRelative(0, -1, 0);
BlockPlaceEvent event = new BlockPlaceEvent(block, block.getState(), placedOn, player.getInventory().getItemInMainHand(), player, true, EquipmentSlot.HAND);
landManager.onPlace(event);
LandManager.onPlace(event);
return !event.isCancelled();
}

Binary file not shown.

Binary file not shown.