mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
Fixed CPU leak
This commit is contained in:
@@ -88,8 +88,7 @@ class TeleportCommand extends VanillaCommand{
|
||||
}
|
||||
|
||||
if(count($args) < 3){
|
||||
$pos = Position::clonePosition($target);
|
||||
$origin->teleport($pos);
|
||||
$origin->teleport($target);
|
||||
Command::broadcastCommandMessage($sender, "Teleported " . $origin->getDisplayName() . " to " . $target->getDisplayName());
|
||||
|
||||
return true;
|
||||
@@ -98,7 +97,7 @@ class TeleportCommand extends VanillaCommand{
|
||||
$x = $this->getRelativeDouble($target->x, $sender, $args[$pos++]);
|
||||
$y = $this->getRelativeDouble($target->y, $sender, $args[$pos++], 0, 128);
|
||||
$z = $this->getRelativeDouble($target->z, $sender, $args[$pos]);
|
||||
$target->teleport(Vector3::createVector($x, $y, $z));
|
||||
$target->teleport(new Vector3($x, $y, $z));
|
||||
Command::broadcastCommandMessage($sender, "Teleported " . $target->getDisplayName() . " to " . round($x, 2) . ", " . round($y, 2) . ", " . round($z, 2));
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user