menu
#4656978 Argument 1 passed to rank\manager\RankStting::reload() 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:04:31 +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::reload() 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: #221
Error level: TypeError
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
             }
$pl->setNameTag(self::getPrefixTag($name));
$pl->sendMessage("§b§lOKAY§f»§r§7se te entrego nuevo rango:§e ".$rank);
$owner->sendMessage("§b§lOKAY§f»§r§7se le entrego nuevo rango a :§e ".$name);
} else {
$owner->sendMessage("§c§lERROR§f»§r§7este rango no existe, intentalo de nuevo..");
}
}

public static function reload(Player $pl) : void {
$ps = new Config(Rank::getInstance()->getDataFolder()."RANKS/list_perms.yml", Config::YAML);
$users = count(Rank::getInstance()->getServer()->getOnlinePlayers());
foreach($users as $on) {
if(in_array(self::getRank($on->getName()),self::getRanks())) {
Rank::removeAttach($on);
foreach($ps->get(self::getRank($on->getName()),[]) as $perms) {
$attachment = Rank::getAttachment($on);
$attachment->setPermission($perms, true);
}
$on->setNameTag(self::getPrefixTag($on->getName()));
#0 plugins/RankSpeed.v1 by TG.phar/src/rank/commands/Rankcommand(63): rank\manager\RankStting::reload(object pocketmine\command\ConsoleCommandSender)
#1 src/pocketmine/command/SimpleCommandMap(248): rank\commands\Rankcommand->execute(object pocketmine\command\ConsoleCommandSender, string[4] rank, array[1])
#2 src/pocketmine/Server(1811): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[11] rank reload)
#3 src/pocketmine/Server(1423): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[11] rank reload)
#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 1606014271.1643)
#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