menu
#2822612 Call to undefined method pocketmine\entity\Effect::setDuration()

Submitted by PocketMine-MP 3.9.4

General information

Version: 3.9.4
Git commit: 1be6783c
Plugin involvement: Direct
Report date: 2019-09-10 21:58:13 +0000 UTC

System Information

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

Error information

Warning: the ColorMatch plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\entity\Effect::setDuration()
File: plugins/ColorMatch.phar/src/ColorMatch/Arena/Arena
Line: #201
Error level: Error
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
            }*/
}

public function giveEffect($e, Player $p){
$effect = Effect::getEffect($e);
if($e === 1){
}
else{
}
$effect->setDuration(9999999999);
$effect->setVisible(false);
$p->addEffect($effect);
}

public function resetFloor(){
$colorcount = 0;
$blocks = 0;
$y = $this->data['arena']['floor_y'];
$level = $this->plugin->getServer()->getLevelByName($this->data['arena']['arena_world']);
for($x = min($this->data['arena']['first_corner_x'], $this->data['arena']['second_corner_x']); $x <= max($this->data['arena']['first_corner_x'], $this->data['arena']['second_corner_x']); $x += 3){
#0 plugins/ColorMatch.phar/src/ColorMatch/Arena/Arena(181): ColorMatch\Arena\Arena->giveEffect(integer 1, object pocketmine\Player)
#1 plugins/ColorMatch.phar/src/ColorMatch/Arena/ArenaSchedule(69): ColorMatch\Arena\Arena->startGame()
#2 src/pocketmine/scheduler/TaskHandler(159): ColorMatch\Arena\ArenaSchedule->onRun(integer 87737)
#3 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 87737)
#4 src/pocketmine/plugin/PluginManager(681): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 87737)
#5 src/pocketmine/Server(2569): pocketmine\plugin\PluginManager->tickSchedulers(integer 87737)
#6 src/pocketmine/Server(2345): pocketmine\Server->tick()
#7 src/pocketmine/Server(2205): pocketmine\Server->tickProcessor()
#8 src/pocketmine/Server(1784): pocketmine\Server->start()
#9 src/pocketmine/PocketMine(275): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[46] C:\Users\miguel\Desktop\PocketMine\PocketMine\, string[54] C:\Users\miguel\Desktop\PocketMine\PocketMine\plugins\)
#10 src/pocketmine/PocketMine(299): pocketmine\server()
#11 (1): require(string[101] phar://C:/Users/miguel/Desktop/PocketMine/PocketMine/PocketMine-MP.phar/src/pock)

Loaded Plugins

  • Show

Server Settings

  • Show