menu
#4656992 Argument 1 passed to rank\manager\RankStting::setColorRank() must be an instance of pocketmine\Player, instance of pocketmine\command\ConsoleCommandSender given

Submitted by PocketMine-MP 3.15.1

General information

Version: 3.15.1
Git commit: 9f604842
Plugin involvement: Direct
Report date: 2020-11-22 03:25:16 +0000 UTC

System Information

PHP version: 7.3.22
Operating system: linux
System banner: Linux pacmanlife.cf 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64

Error information

Warning: the RankSpeed plugin was directly involved in this crash. Please contact the plugin author.
Message: Argument 1 passed to rank\manager\RankStting::setColorRank() must be an instance of pocketmine\Player, instance of pocketmine\command\ConsoleCommandSender given
File: plugins/RankSpeed.v1 by TG.phar/src/rank/manager/RankStting
Line: #185
Error level: TypeError
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
		  unset($perms[$userr]);
$ps->set($rank,$perms);
$ps->save();
$pl->sendMessage("§l§bOKAY§f»§r§7permiso removido al rango:§e ".$rank);
} else {
$pl->sendMessage("§c§lERROR§f»§r§7este rango no existe, intentalo de nuevo..");
}
}

public static function setColorRank(Player $pl,string $rank,array $colors): void {
if(in_array($rank,self::getRanks())) {
if(strlen(implode($colors))==10) {
$colors = new Config(Rank::getInstance()->getDataFolder()."RANKS/list_colors.yml", Config::YAML);
$tt = str_replace("&","§",$colors);
$colors->set($rank,$tt);
$colors->save();
$pl->sendMessage("§l§bOKAY§f»§r§7 el rango:§e ".$rank."§7 cambio sus colores..");
} else {
$pl->sendMessage("§l§cERROR§f»§r§7 los colores no son validos, intenta de nuevo..");
}
#0 plugins/RankSpeed.v1 by TG.phar/src/rank/commands/Rankcommand(86): rank\manager\RankStting::setColorRank(object pocketmine\command\ConsoleCommandSender, string[5] Elite, array[5])
#1 src/pocketmine/command/SimpleCommandMap(248): rank\commands\Rankcommand->execute(object pocketmine\command\ConsoleCommandSender, string[4] rank, array[4])
#2 src/pocketmine/Server(1811): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[25] rank setcolor Elite &f &a)
#3 src/pocketmine/Server(1423): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[25] rank setcolor Elite &f &a)
#4 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\Server->pocketmine\{closure}()
#5 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
#6 src/pocketmine/Server(2157): pocketmine\snooze\SleeperHandler->sleepUntil(double 1606015516.3475)
#7 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#8 src/pocketmine/Server(1588): pocketmine\Server->start()
#9 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[22] /root/Servers/TG/PMMP/, string[30] /root/Servers/TG/PMMP/plugins/)
#10 src/pocketmine/PocketMine(304): pocketmine\server()
#11 (11): require(string[77] phar:///root/Servers/TG/PMMP/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies