menu
#7863727 substr(): Argument #1 ($string) must be of type string, array given

Submitted by PocketMine-MP 4.10.1

General information

Version: 4.10.1
Git commit: a39938e6
Plugin involvement: Direct
Report date: 2022-11-24 19:13:58 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 25 seconds

System Information

PHP version: 8.0.24
JIT status: Disabled
Operating system: linux
System banner: Linux ip-172-31-82-132 5.10.0-19-cloud-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64

Error information

Warning: the PrivateRegionsPrototype plugin was directly involved in this crash. Please contact the plugin author.
Message: substr(): Argument #1 ($string) must be of type string, array given
File: plugins/PrivateRegionsPrototype.phar/src/PrivateRegionsPrototype/Main
Line: #193
Error level: TypeError
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
                    if(in_array("$args[1].json",$array_reg)){
$this->cur_rg = new Config($this->getDataFolder()."$PlayerDir/$args[1].json",Config::JSON);
$list[] = $this->cur_rg->get("members");
if (count($list) == 0){
$sender->sendMessage("§l§7[§4!§7]§r§8 В регионе §a$args[1] нет участников!");
}else{
$membersList = "|";

for($i=0;$i<count($list);$i++){
$membersList = $membersList." ".substr($list[$i],0,-5)." | ";
}

$sender->sendMessage("§aСписок участников региона §e$args[1]: §e$membersList");
}
}else{
$sender->sendMessage("§l§7[§4!§7]§r§8 Вы не владеете регионом §c$args[1]");
}



#0 plugins/PrivateRegionsPrototype.phar/src/PrivateRegionsPrototype/Main(193): substr(array[1], int 0, int -5)
#1 pmsrc/src/command/PluginCommand(50): PrivateRegionsPrototype\Main->onCommand(object pocketmine\player\Player#26630, object pocketmine\command\PluginCommand#22108, string[2] rg, array[2])
#2 pmsrc/src/command/SimpleCommandMap(205): pocketmine\command\PluginCommand->execute(object pocketmine\player\Player#26630, string[2] rg, array[2])
#3 pmsrc/src/Server(1448): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\player\Player#26630, string[16] rg members lerdo)
#4 pmsrc/src/player/Player(1437): pocketmine\Server->dispatchCommand(object pocketmine\player\Player#26630, string[16] rg members lerdo)
#5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(754): pocketmine\player\Player->chat(string[17] /rg members lerdo)
#6 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(51): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#116850)
#7 pmsrc/src/network/mcpe/NetworkSession(410): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#116775)
#8 pmsrc/src/network/mcpe/NetworkSession(373): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#116850, string[38] M./rg members lerdo..HQ.x0zf..3..n....)
#9 pmsrc/src/network/mcpe/raklib/RakLibInterface(182): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[41] S.../JW.M.MJ-*V.I-J.gx......*..Uc........)
#10 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[50] .rjb.........q.AR...^Y.KL<....n.dD..t.._#...!...RF)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(112): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#25027)
#12 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#14 pmsrc/src/Server(1707): pocketmine\snooze\SleeperHandler->sleepUntil(float 1669317238.3585)
#15 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#16 pmsrc/src/PocketMine(305): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[26] /home/admin/serikworld_PM/, string[34] /home/admin/serikworld_PM/plugins/)
#17 pmsrc/src/PocketMine(328): pocketmine\server()
#18 pmsrc(11): require(string[70] phar:///home/admin/serikworld_PM/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show