menu
#2387476 Call to undefined method roci\task\TaskGame::getServer()

Submitted by PocketMine-MP 3.8.0

General information

Version: 3.8.0
Git commit: 088fbf65
Plugin involvement: Direct
Report date: 2019-05-15 18:07:06 +0000 UTC

System Information

PHP version: 7.2.15
Operating system: win
System banner: Windows NT PORTATILE 10.0 build 17134 (Windows 10) AMD64

Error information

Warning: the Velenos plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method roci\task\TaskGame::getServer()
File: plugins/Velenos/src/roci/task/TaskGame
Line: #28
Error level: Error
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    public function __construct(Main $plugin)
{
$this->plugin = $plugin;
$this->second = 10;
}


public function onRun($currentTick): void
{
if (count($this->getServer()->getLevelByName("attesa")->getPlayers()) >= 1); {

$this->plugin->broadcastMessage("┬ža> Starting in " . $this->second . "secondi");
$this->second--;
if ($this->second == 0) {
foreach ($this->plugin->players as $player) {

$player->teleport($this->getServer()->getLevelByName("game")->getSpawnLocation());
}
}
}
#0 src/pocketmine/scheduler/TaskHandler(159): roci\task\TaskGame->onRun(integer 1)
#1 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 1)
#2 src/pocketmine/plugin/PluginManager(688): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 1)
#3 src/pocketmine/Server(2559): pocketmine\plugin\PluginManager->tickSchedulers(integer 1)
#4 src/pocketmine/Server(2335): pocketmine\Server->tick()
#5 src/pocketmine/Server(2196): pocketmine\Server->tickProcessor()
#6 src/pocketmine/Server(1775): pocketmine\Server->start()
#7 src/pocketmine/PocketMine(258): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string C:\Users\Carlo\Desktop\ServerPMMP\, string C:\Users\Carlo\Desktop\ServerPMMP\plugins\)
#8 (1): require(string phar://C:/Users/Carlo/Desktop/ServerPMMP/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show