menu
#2470745 Cannot access private property Mastercoding\ServerCore\friend\FriendPlayer::$friends

Submitted by PocketMine-MP 3.8.2

General information

Version: 3.8.2
Git commit: 5c81da9b
Plugin involvement: Direct
Report date: 2019-06-12 13:28:54 +0000 UTC

System Information

PHP version: 7.2.16
Operating system: win
System banner: Windows NT DESKTOP-QFD1JMA 10.0 build 17763 (Windows 10) AMD64

Error information

Warning: the ServerCore plugin was directly involved in this crash. Please contact the plugin author.
Message: Cannot access private property Mastercoding\ServerCore\friend\FriendPlayer::$friends
File: plugins/ServerCore/src/Mastercoding/ServerCore/friend/FriendPlayer
Line: #127
Error level: Error
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
                array_pop($friends);
unset($friends[array_search($array[1], $friends)]);
$friend = implode(":", $friends);
if (count($friends) > 0) {
$friend .= ":";
}
$player = Server::getInstance()->getPlayerExact($array[0]);
if ($player !== null){
$friendPlayer = Friend::$players[$player->getName()];
unset($friendPlayer->friends[array_search($array[1], $friendPlayer->getFriends())]);
}
Server::getInstance()->getAsyncPool()->submitTask(new MysqlTask("UPDATE friend SET list = '$friend' WHERE playername = '$array[0]'"));
}
}, $name . ":" . $this->player->getName()));
Server::getInstance()->getAsyncPool()->submitTask(new MysqlTask("UPDATE friend SET list = '$text' WHERE playername = '{$this->getPlayer()->getName()}'"));
$this->player->sendMessage(Friend::PREFIX . $langPlayer->getText("friend.remove.suggest"));
}

public function removeInvite(string $name)
{
#0 plugins/ServerCore/src/Mastercoding/ServerCore/task/MysqlTask(43): Mastercoding\ServerCore\task\MysqlTask::Mastercoding\ServerCore\friend\{closure}(array Array(), string Mastercoding:MaNiZzYT)
#1 src/pocketmine/scheduler/AsyncPool(319): Mastercoding\ServerCore\task\MysqlTask->onCompletion(pocketmine\Server object)
#2 src/pocketmine/Server(2562): pocketmine\scheduler\AsyncPool->collectTasks()
#3 src/pocketmine/Server(2334): pocketmine\Server->tick()
#4 src/pocketmine/Server(2195): pocketmine\Server->tickProcessor()
#5 src/pocketmine/Server(1774): pocketmine\Server->start()
#6 src/pocketmine/PocketMine(266): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string C:\Users\Mastercoding\Desktop\Test\, string C:\Users\Mastercoding\Desktop\Test\plugins\)
#7 (1): require(string phar://C:/Users/Mastercoding/Desktop/Test/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show