YTiStrafeNubzHD / EssentialsPE

Port of Bukkit Essentials for @PocketMine Servers
GNU General Public License v3.0
2 stars 1 forks source link

VANISH (and other commands) not working #5

Open AndreasHGK opened 6 years ago

AndreasHGK commented 6 years ago

Description

Doing /v results in an error: ALSO (i don't want to write seperate issues for every command) things i found not working as well: /tpa some more i already forgot

Versions

Crashdump or console errors

Server thread/CRITICAL Unhandled exception executing command 'v' in vanish: Argument 3 passed to pocketmine\entity\Effect::__construct() must be an instance of pocketmine\utils\Color, integer given, called in phar:///plugins/EssentialsPE_dev-20.phar/src/EssentialsPE/BaseFiles/BaseAPI.php on line 2287 14.06 13:57:12 [Server] Server thread/CRITICAL TypeError: "Argument 3 passed to pocketmine\entity\Effect::construct() must be an instance of pocketmine\utils\Color, integer given, called in phar:///plugins/EssentialsPE_dev-20.phar/src/EssentialsPE/BaseFiles/BaseAPI.php on line 2287" (EXCEPTION) in "src/pocketmine/entity/Effect" at line 141 14.06 13:57:12 [Server] Server thread/DEBUG #0 EssentialsPE_dev-20.phar/src/EssentialsPE/BaseFiles/BaseAPI(2287): pocketmine\entity\Effect->construct(integer 14, string Vanish, integer 127, integer 131, integer 146) 14.06 13:57:12 [Server] Server thread/DEBUG #1 EssentialsPE_dev-20.phar/src/EssentialsPE/BaseFiles/BaseAPI(2348): EssentialsPE\BaseFiles\BaseAPI->setVanish(pocketmine\Player object, boolean 1) 14.06 13:57:12 [Server] Server thread/DEBUG #2 EssentialsPE_dev-20.phar/src/EssentialsPE/Commands/Vanish(46): EssentialsPE\BaseFiles\BaseAPI->switchVanish(pocketmine\Player object) 14.06 13:57:12 [Server] Server thread/DEBUG #3 src/pocketmine/command/SimpleCommandMap(258): EssentialsPE\Commands\Vanish->execute(pocketmine\Player object, string v, array Array()) 14.06 13:57:12 [Server] Server thread/DEBUG #4 src/pocketmine/Server(1946): pocketmine\command\SimpleCommandMap->dispatch(pocketmine\Player object, string v) 14.06 13:57:12 [Server] Server thread/DEBUG #5 src/pocketmine/Player(2190): pocketmine\Server->dispatchCommand(pocketmine\Player object, string v) 14.06 13:57:12 [Server] Server thread/DEBUG #6 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(222): pocketmine\Player->chat(string /v) 14.06 13:57:12 [Server] Server thread/DEBUG #7 src/pocketmine/network/mcpe/protocol/CommandRequestPacket(54): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleCommandRequest(pocketmine\network\mcpe\protocol\CommandRequestPacket object) 14.06 13:57:12 [Server] Server thread/DEBUG #8 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(92): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object) 14.06 13:57:12 [Server] Server thread/DEBUG #9 src/pocketmine/network/mcpe/protocol/BatchPacket(114): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\CommandRequestPacket object) 14.06 13:57:12 [Server] Server thread/DEBUG #10 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(92): pocketmine\network\mcpe\protocol\BatchPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object) 14.06 13:57:12 [Server] Server thread/DEBUG #11 src/pocketmine/Player(3038): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object) 14.06 13:57:12 [Server] Server thread/DEBUG #12 src/pocketmine/network/mcpe/RakLibInterface(153): pocketmine\Player->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object) 14.06 13:57:12 [Server] Server thread/DEBUG #13 vendor/pocketmine/raklib/server/ServerHandler(98): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string 141.135.23.192 49247, raklib\protocol\EncapsulatedPacket object, integer 0) 14.06 13:57:12 [Server] Server thread/DEBUG #14 src/pocketmine/network/mcpe/RakLibInterface(94): raklib\server\ServerHandler->handlePacket() 14.06 13:57:12 [Server] Server thread/DEBUG #15 src/pocketmine/network/Network(89): pocketmine\network\mcpe\RakLibInterface->process() 14.06 13:57:12 [Server] Server thread/DEBUG #16 src/pocketmine/Server(2495): pocketmine\network\Network->processInterfaces() 14.06 13:57:12 [Server] Server thread/DEBUG #17 src/pocketmine/Server(2243): pocketmine\Server->tick() 14.06 13:57:12 [Server] Server thread/DEBUG #18 src/pocketmine/Server(2119): pocketmine\Server->tickProcessor() 14.06 13:57:12 [Server] Server thread/DEBUG #19 src/pocketmine/Server(1701): pocketmine\Server->start() 14.06 13:57:12 [Server] Server thread/DEBUG #20 src/pocketmine/PocketMine(305): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /, string /plugins/) 14.06 13:57:12 [Server] Server thread/DEBUG #21 /pmmp_1001_1.4.0.phar(1): require(string phar:///pmmp_1001_1.4.0.phar/src/pocketmine/PocketMine.php)

AndreasHGK commented 6 years ago

Ok, so you’re giving a potion to a player. I might be wrong, but can’t you just do setInvisible ? It is an existing function in pocketmine\player