mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-28 16:05:14 +01:00
Fixed Kingdoms
This commit is contained in:
parent
ae1fd6b7af
commit
f1891cbcf1
@ -14,12 +14,10 @@ import org.kingdoms.managers.PvPManager;
|
|||||||
import org.kingdoms.managers.land.LandManager;
|
import org.kingdoms.managers.land.LandManager;
|
||||||
|
|
||||||
public final class AntigriefKingdoms implements AntigriefWrapper {
|
public final class AntigriefKingdoms implements AntigriefWrapper {
|
||||||
private final LandManager landManager = new LandManager();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canBreakBlock(Player player, Block block) {
|
public boolean canBreakBlock(Player player, Block block) {
|
||||||
BlockBreakEvent event = new BlockBreakEvent(block, player);
|
BlockBreakEvent event = new BlockBreakEvent(block, player);
|
||||||
landManager.onBreak(event);
|
LandManager.onBreak(event);
|
||||||
return !event.isCancelled();
|
return !event.isCancelled();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +35,7 @@ public final class AntigriefKingdoms implements AntigriefWrapper {
|
|||||||
public boolean canPlaceBlock(Player player, Block block) {
|
public boolean canPlaceBlock(Player player, Block block) {
|
||||||
Block placedOn = block.getRelative(0, -1, 0);
|
Block placedOn = block.getRelative(0, -1, 0);
|
||||||
BlockPlaceEvent event = new BlockPlaceEvent(block, block.getState(), placedOn, player.getInventory().getItemInMainHand(), player, true, EquipmentSlot.HAND);
|
BlockPlaceEvent event = new BlockPlaceEvent(block, block.getState(), placedOn, player.getInventory().getItemInMainHand(), player, true, EquipmentSlot.HAND);
|
||||||
landManager.onPlace(event);
|
LandManager.onPlace(event);
|
||||||
return !event.isCancelled();
|
return !event.isCancelled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
lib/Kingdoms-1.9.2.0.0.2.jar
Normal file
BIN
lib/Kingdoms-1.9.2.0.0.2.jar
Normal file
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user