Player: fixed parameter name inconsistency

This commit is contained in:
Dylan K. Taylor 2022-01-22 01:33:31 +00:00
parent 82f1c2766c
commit 419bb9eba6
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -1812,16 +1812,16 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
return true; return true;
} }
public function toggleSwim(bool $swimming) : bool{ public function toggleSwim(bool $swim) : bool{
if($swimming === $this->swimming){ if($swim === $this->swimming){
return true; return true;
} }
$ev = new PlayerToggleSwimEvent($this, $swimming); $ev = new PlayerToggleSwimEvent($this, $swim);
$ev->call(); $ev->call();
if($ev->isCancelled()){ if($ev->isCancelled()){
return false; return false;
} }
$this->setSwimming($swimming); $this->setSwimming($swim);
return true; return true;
} }