mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 23:37:45 +00:00
Implemented Vector3 List and AxisAlignedBB Pool to decrease object allocation
This commit is contained in:
@@ -98,7 +98,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(new Vector3($x, $y, $z));
|
||||
$target->teleport(Vector3::createVector($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