menu
#5038414 A function with return type must return a value

Submitted by PocketMine-MP 3.22.0

General information

Version: 3.22.0
Git commit: c32c2146
Plugin involvement: Direct
Report date: 2021-07-22 18:25:10 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 1 seconds

System Information

PHP version: 7.4.21
Operating system: win
System banner: Windows NT DESKTOP-NHLIURJ 10.0 build 19043 (Windows 10) AMD64

Error information

Warning: a plugin was directly involved in this crash. Please contact the plugin author.
Message: A function with return type must return a value
File: plugins/Sell_18/src/SellHand/Main
Line: #65
Error level: E_COMPILE_ERROR
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
     * @param array $args
* @return bool
*/
public function onCommand(CommandSender $sender, Command $cmd, string $label, array $args): bool{
switch(strtolower($cmd->getName())){
case "sell":
/* Checks if command is executed by console. */ /* It further solves the crash problem. */
if(!($sender instanceof Player)){
$sender->sendMessage(TF::RED . TF::BOLD . "Error: " . TF::RESET . TF::DARK_RED . "Please use this command in game!");
return;
}

/* Check if the player is permitted to use the command */
if($sender->hasPermission("sell") || $sender->hasPermission("sell.hand") || $sender->hasPermission("sell.all")){

/* Disallow non-survival mode abuse */
if(!$sender->isSurvival()){
$sender->sendMessage(TF::RED . TF::BOLD . "Error: " . TF::RESET . TF::DARK_RED . "Please switch back to survival mode.");
return;
}

Loaded Plugins

  • Show

Server Settings

  • Show