menu
#3761560 Call to a member function getName() on null

Submitted by PocketMine-MP 3.11.4

General information

Version: 3.11.4
Git commit: 13f28d84
Plugin involvement: Direct
Report date: 2020-02-13 12:52:30 +0000 UTC

System Information

PHP version: 7.3.13
Operating system: linux
System banner: Linux 194-67-105-200.cloudvps.regruhosting.ru 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64

Error information

Warning: the MineCS plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getName() on null
File: plugins/MineCS_v0.1.phar/src/minecs/util/PlayerUtil
Line: #22
Error level: Error
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
use pocketmine\network\mcpe\protocol\PlaySoundPacket;
use pocketmine\Player;
use pocketmine\scheduler\ClosureTask;
use pocketmine\Server;
use pocketmine\utils\TextFormat;

class PlayerUtil{
public static function isInDefaultWorld(Player $player){
return $player->getLevel()->getName() === Server::getInstance()->getDefaultLevel()->getName();
}

public static function teleportToSpawn(Player $player, bool $immobile = true){
if(!self::isInDefaultWorld($player)){
Loader::getInstance()->addFloatingsTo($player);
}

$spawnPos = new Position(0.5, 64.5, 0.5, Server::getInstance()->getDefaultLevel());

if($immobile){
#0 plugins/MineCS_v0.1.phar/src/minecs/util/PlayerUtil(26): minecs\util\PlayerUtil::isInDefaultWorld(object pocketmine\Player)
#1 plugins/MineCS_v0.1.phar/src/minecs/arena/fastgame/ffa/FastGameFFAArena(110): minecs\util\PlayerUtil::teleportToSpawn(object pocketmine\Player)
#2 plugins/MineCS_v0.1.phar/src/minecs/arena/fastgame/ffa/FastGameFFATimer(47): minecs\arena\fastgame\ffa\FastGameFFAArena->reset()
#3 src/pocketmine/scheduler/TaskHandler(169): minecs\arena\fastgame\ffa\FastGameFFATimer->onRun(integer 11963521)
#4 src/pocketmine/scheduler/TaskScheduler(206): pocketmine\scheduler\TaskHandler->run(integer 11963521)
#5 src/pocketmine/plugin/PluginManager(703): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 11963521)
#6 src/pocketmine/Server(2670): pocketmine\plugin\PluginManager->tickSchedulers(integer 11963521)
#7 src/pocketmine/Server(2403): pocketmine\Server->tick()
#8 src/pocketmine/Server(2250): pocketmine\Server->tickProcessor()
#9 src/pocketmine/Server(1811): pocketmine\Server->start()
#10 src/pocketmine/PocketMine(274): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[13] /root/minecs/, string[21] /root/minecs/plugins/)
#11 src/pocketmine/PocketMine(297): pocketmine\server()
#12 (1): require(string[68] phar:///root/minecs/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show