menu
#4530945 array_rand() expects parameter 1 to be array, bool given

Submitted by PocketMine-MP 3.15.1

General information

Version: 3.15.1
Git commit: 9f604842
Plugin involvement: Direct
Report date: 2020-09-16 01:25:19 +0000 UTC

System Information

PHP version: 7.3.22
Operating system: linux
System banner: Linux ea8d0dae-bca7-4803-9182-59f166a17c56 5.4.0-1024-gcp #24~18.04.1-Ubuntu SMP Sun Sep 6 03:37:03 UTC 2020 x86_64

Error information

Warning: the FFA-SuperStart plugin was directly involved in this crash. Please contact the plugin author.
Message: array_rand() expects parameter 1 to be array, bool given
File: plugins/FFA-SuperStart_v1.0.0 (1).phar/src/FFA/Events/Events
Line: #31
Error level: ErrorException
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  Entitys\NPCTops,
APIS\ScoreAPI
};

class Events implements Listener {

function onDamage(EntityDamageEvent $e){
$arenas = Loader::addConfig("arenas");
$entity = $e->getEntity();
$rand = array_rand($arenas->get("arenas"));
$arena = $arenas->get("arenas")[$rand];
if($entity instanceof Player){
if($arenas->get("arenas") != null){
if($entity->getLevel() === Server::getInstance()->getLevelByName($arena)){
if($e->getCause() === EntityDamageEvent::CAUSE_FALL || $e->getCause() === EntityDamageEvent::CAUSE_VOID){
$e->setCancelled(true);
}
}
}
}
#0 (): pocketmine\utils\Utils::errorExceptionHandler(integer 2, string[56] array_rand() expects parameter 1 to be array, bool given, string[87] phar:///home/container/plugins/FFA-SuperStart_v1.0.0 (1).phar/src/FFA/Events/Eve, integer 31, array[3])
#1 plugins/FFA-SuperStart_v1.0.0 (1).phar/src/FFA/Events/Events(31): array_rand(boolean )
#2 src/pocketmine/plugin/MethodEventExecutor(42): FFA\Events\Events->onDamage(object pocketmine\event\entity\EntityDamageEvent)
#3 src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object FFA\Events\Events, object pocketmine\event\entity\EntityDamageEvent)
#4 src/pocketmine/event/Event(88): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\entity\EntityDamageEvent)
#5 src/pocketmine/entity/Entity(933): pocketmine\event\Event->call()
#6 src/pocketmine/entity/Living(545): pocketmine\entity\Entity->attack(object pocketmine\event\entity\EntityDamageEvent)
#7 src/pocketmine/Player(3873): pocketmine\entity\Living->attack(object pocketmine\event\entity\EntityDamageEvent)
#8 src/pocketmine/entity/Living(652): pocketmine\Player->attack(object pocketmine\event\entity\EntityDamageEvent)
#9 src/pocketmine/entity/Human(627): pocketmine\entity\Living->entityBaseTick(integer 1)
#10 src/pocketmine/Player(1785): pocketmine\entity\Human->entityBaseTick(integer 1)
#11 src/pocketmine/level/Level(852): pocketmine\Player->onUpdate(integer 1844063)
#12 src/pocketmine/level/Level(785): pocketmine\level\Level->actuallyDoTick(integer 1844063)
#13 src/pocketmine/Server(2267): pocketmine\level\Level->doTick(integer 1844063)
#14 src/pocketmine/Server(2398): pocketmine\Server->checkTickUpdates(integer 1844063, double 1600219519.5273)
#15 src/pocketmine/Server(2154): pocketmine\Server->tick()
#16 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#17 src/pocketmine/Server(1588): pocketmine\Server->start()
#18 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
#19 src/pocketmine/PocketMine(304): pocketmine\server()
#20 (11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies