mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Cancel PlayerInteractEvent automatically on left-click block when spawn protection is triggered
This commit is contained in:
@ -1585,7 +1585,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
*
|
||||
* @return bool false if spawn protection cancelled the action, true if not.
|
||||
*/
|
||||
protected function checkSpawnProtection(Player $player, Vector3 $vector) : bool{
|
||||
public function checkSpawnProtection(Player $player, Vector3 $vector) : bool{
|
||||
if(!$player->hasPermission("pocketmine.spawnprotect.bypass") and ($distance = $this->server->getSpawnRadius()) > -1){
|
||||
$t = new Vector2($vector->x, $vector->z);
|
||||
$s = new Vector2($this->getSpawnLocation()->x, $this->getSpawnLocation()->z);
|
||||
|
Reference in New Issue
Block a user