how make particels in x y z and world with command lik /plc and suumon partcile in world : Spawn x: 123 y:41 z:12 and think you
PHP: $level->addParticle(new pocketmine\level\particle\RedstoneParticle(new Vector3($x, $y, $z))); I just used RedstoneParticle as an example
men think you but a cheinge the x y z ? or no and i can add this in aney commands take a look public function onCommand(PlayerJoinEvent $ev, CommandSender $sender, Command $command, $label, array $args){ if($sender instanceof Player) { $level->addParticle(new pocketmine\level\particle\RedstoneParticle(new Vector3($x, $y, $z))); lik this sorry for bad english
this is right ? ?php namespace ptc; use pocketmine\plugin\PluginBase; use pocketmine\command\CommandSender; use pocketmine\utils\TextFormat as Color; use pocketmine\command\Command; use pocketmine\Player; use pocketmine\level\particle\RedstoneParticle class main extends PluginBase { public function onEnable() { $this->getLogger()->info(Color::GREEN."[ptc] on!"); } public function onCommand(CommandSender $sender, Command $command,$level level , $label, array $args) { if($sender instanceof Player) { if(strtolower($command->getName()) == 'ptc') { if(count($args) < 1) { $level->addParticle(new RedstoneParticle(new Vector3($x, $y, $z))); return; } else { $sender->sendMessage(Color::Red."[ptc] eror"); return; } } } } }
PHP: $level->addParticle(new RedstoneParticle(new Vector3($x, $y, $z))); should be PHP: $level->addParticle(new RedstoneParticle(new Vector3($sender->x, $sender->y, $sender->z)));
oky but all thits is right ? <?php namespace ptc; use pocketmine\plugin\PluginBase; use pocketmine\command\CommandSender; use pocketmine\utils\TextFormat as Color; use pocketmine\command\Command; use pocketmine\Player; use pocketmine\level\particle\RedstoneParticle; class main extends PluginBase { public function onEnable() { $this->getLogger()->info(Color::GREEN."[ptc] on!"); } public function onCommand(CommandSender $sender, Command $command, $label, array $args) { if($sender instanceof Player) { if(strtolower($command->getName()) == 'ptc') { if(count($args) < 1) { $level->addParticle(new RedstoneParticle(new Vector3($sender->x, $sender->y, $sender->z))); return; } else { $sender->sendMessage(Color::Red."[ptc] eror"); return; } } } } } his give me "An unknown error........." you can help me in thits ? and think you for feedback #sorry_for_bad_english
What exactly is the error message? You should return true, if not it will show the usage to the sender