ivand-sykt / MyAuth

MyAuth - Pocketmine authentication plugin
3 stars 2 forks source link

Boolean return required #9

Closed ggomezz closed 7 years ago

ggomezz commented 7 years ago

This is the error:

[01:26:11] [Server thread/CRITICAL]: Unhandled exception executing command 'login ********' in login: Return value of MyAuth\Commands\LoginCommand::onCommand() must be of the type boolean, none returned [01:26:11] [Server thread/CRITICAL]: TypeError: "Return value of MyAuth\Commands\LoginCommand::onCommand() must be of the type boolean, none returned" (EXCEPTION) in "MyAuth.phar/src/MyAuth/Commands/LoginCommand" at line 44

ggomezz commented 7 years ago

This server is running PocketMine-MP 1.6.2dev-378 「Unleashed」 implementing API version 3.0.0-ALPHA7 for Minecraft: PE v1.1.0.55 (protocol version 113) (No idea what MyAuth Version)

ggomezz commented 7 years ago

Doesn't stop people from using it, just gives them the critical warning because it is not Boolean. Still usable. (This issue is probably what the poggit lint thing is saying)

ggomezz commented 7 years ago

Would this work: public function onCommand(CommandSender $sender, Command $cmd, string $label, array $args): bool{

ivand-sykt commented 7 years ago

@ggomezz no.

ggomezz commented 7 years ago

Oh well, I tried to help