Anti-cheat fixes, settings and API (#287)

* Added options to disable movement checks and anti-instabreak and API methods to control this
* Fixed anti-flight false positives
* Fix flight toggle kick cannot be disabled
* Added PlayerIllegalMoveEvent
This commit is contained in:
Dylan K. Taylor
2017-01-25 09:40:48 +00:00
committed by GitHub
parent 77456702e9
commit 661f17b6e0
7 changed files with 121 additions and 16 deletions

View File

@ -1497,7 +1497,7 @@ class Level implements ChunkManager, Metadatable{
}
if($player !== null){
$ev = new BlockBreakEvent($player, $target, $item, $player->isCreative() ? true : false);
$ev = new BlockBreakEvent($player, $target, $item, ($player->isCreative() or $player->allowInstaBreak()));
if($player->isSurvival() and $item instanceof Item and !$target->isBreakable($item)){
$ev->setCancelled();