Skip to content
Browse files

Try method changes to update chunk information automatically and relay

it to other players.
  • Loading branch information...
1 parent 4389bce commit 478473976162ec7fae652e4fae0ab298c2dbd2d1 @mkalus committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/de/beimax/simplespleef/game/GameStandard.java
View
4 src/main/java/de/beimax/simplespleef/game/GameStandard.java
@@ -1057,7 +1057,7 @@ public boolean onPlayerInteract(PlayerInteractEvent event) {
Block clickedBlock = event.getClickedBlock();
BlockState state = clickedBlock.getState();
// set block to air
- clickedBlock.setTypeId(Material.AIR.getId(), false);
+ clickedBlock.setType(Material.AIR);
// update chunk information
clickedBlock.getWorld().refreshChunk(clickedBlock.getChunk().getX(), clickedBlock.getChunk().getZ());
// notify trackers
@@ -1122,7 +1122,7 @@ protected void blockBreakInGame(BlockBreakEvent event) {
event.setCancelled(true);
floorBroken = true;
// set block to air
- block.setTypeId(Material.AIR.getId(), false);
+ block.setType(Material.AIR);
// update chunk information
block.getWorld().refreshChunk(block.getChunk().getX(), block.getChunk().getZ());
} else floorBroken = true; // block was broken

0 comments on commit 4784739

Please sign in to comment.
Something went wrong with that request. Please try again.