Skip to content

Commit

Permalink
Fix using modified SchedulerAdapter methods;
Browse files Browse the repository at this point in the history
  • Loading branch information
HarvelsX committed May 17, 2024
1 parent 73f116d commit e14f4f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ public void onInventoryMoveItem(InventoryMoveItemEvent event) {
handleInventoryHolderUse(event, cause, targetHolder);

if (event.isCancelled() && causeHolder instanceof Hopper && wcfg.breakDeniedHoppers) {
getPlugin().getScheduler().runAtRegion(((Hopper) causeHolder).getLocation(), () -> ((Hopper) causeHolder).getBlock().breakNaturally());
getPlugin().getScheduler().executeAtRegion(((Hopper) causeHolder).getLocation(), () -> ((Hopper) causeHolder).getBlock().breakNaturally());
} else {
entry.setCancelled(event.isCancelled());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void onPlayerMove(PlayerMoveEvent event) {

player.teleport(override.clone().add(0, 1, 0));

getPlugin().getScheduler().runAtEntityLater(player, () -> player.teleport(override.clone().add(0, 1, 0)), 1);
getPlugin().getScheduler().runAtEntityDelayed(player, () -> player.teleport(override.clone().add(0, 1, 0)), 1);
}
}
}
Expand Down

0 comments on commit e14f4f4

Please sign in to comment.