Skip to content

Instantly share code, notes, and snippets.

@PJZ9n
Created June 5, 2020 02:29
Show Gist options
  • Save PJZ9n/7b6137e9f812945b8cf82239a2839d4d to your computer and use it in GitHub Desktop.
Save PJZ9n/7b6137e9f812945b8cf82239a2839d4d to your computer and use it in GitHub Desktop.
<?php
$rightClickBlockFilter = function (PlayerInteractEvent $event) use ($player): bool {
return $event->getPlayer() === $player && $event->getAction() === PlayerInteractEvent::RIGHT_CLICK_BLOCK;
};
$ignoreCancelled = function (Cancellable $cancellable): bool {
return !$cancellable->isCancelled();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment