menu
#10302363 Undefined constant pocketmine\block\VanillaBlocks::DRAGON_EGG

Submitted by PocketMine-MP 5.11.0

General information

Version: 5.11.0
Git commit: ce8fecc6
Plugin involvement: Direct
Report date: 2024-02-12 18:09:14 +0000 UTC
Server uptime: 0 days 0 hours 3 minutes 11 seconds

System Information

PHP version: 8.1.26
JIT status: Not available
Operating system: linux
System banner: Linux a80e14cd-ef29-42c8-b9e2-c81c3ea4fb9e 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30) x86_64

Error information

Warning: the Chest plugin was directly involved in this crash. Please contact the plugin author.
Thread: Main
Message: Undefined constant pocketmine\block\VanillaBlocks::DRAGON_EGG
File: plugins/Meteoryt/src/Chest/listener/block/BlockBreakListener
Line: #25
Type: Error
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

public function onBreak(BlockBreakEvent $e) {
$player = $e->getPlayer();
$name = $player->getName();
$block = $e->getBlock();




if($block->getTypeId() === VanillaBlocks::DRAGON_EGG && !$e->isCancelled()) {
switch (mt_rand(0, 2)) { //0 do 2 czyli od 0 case do 2 poniewaz jest 100% szansy ale itemy wypadaja randomowo po 1
case 0:
$item = VanillaBlocks::CHEST();
$itemName = "CHEST";
$player->getInventory()->addItem($item);
$count = mt_rand(5, 15);
$player->getInventory()->addItem(VanillaBlocks::CHEST(466, 0, $count));
break;

default:
#0 pmsrc/src/event/RegisteredListener(61): Chest\listener\block\BlockBreakListener->onBreak(object pocketmine\event\block\BlockBreakEvent#80536)
#1 pmsrc/src/event/Event(63): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\block\BlockBreakEvent#80536)
#2 pmsrc/src/world/World(2089): pocketmine\event\Event->call()
#3 pmsrc/src/player/Player(1791): pocketmine\world\World->useBreakOn(object pocketmine\math\Vector3#80537, object pocketmine\item\ItemBlock#80545, object pocketmine\player\Player#179918, true, array[0])
#4 pmsrc/src/network/mcpe/handler/InGamePacketHandler(496): pocketmine\player\Player->breakBlock(object pocketmine\math\Vector3#80638)
#5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(279): pocketmine\network\mcpe\handler\InGamePacketHandler->handleUseItemTransaction(object pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData#80554)
#6 pmsrc/vendor/pocketmine/bedrock-protocol/src/PlayerAuthInputPacket(296): pocketmine\network\mcpe\handler\InGamePacketHandler->handlePlayerAuthInput(object pocketmine\network\mcpe\protocol\PlayerAuthInputPacket#80614)
#7 pmsrc/src/network/mcpe/NetworkSession(462): pocketmine\network\mcpe\protocol\PlayerAuthInputPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#100503)
#8 pmsrc/src/network/mcpe/NetworkSession(400): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\PlayerAuthInputPacket#80614, string[119] ....&A.......C.:.B...C.......?..................>Yp...].;.....P........C^..B...C)
#9 pmsrc/src/network/mcpe/raklib/RakLibInterface(219): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[103] .c.abd......&.9>h.yh..^..V...vw:3.A.=H.LGK..AF&.....&.E....)v.5......e,L|.R.z...)
#10 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[112] .px..x.C(..>rN.:.a.....+..c......M .,.....kI.QGYW......O.s.I.Q..j,1......7n...a3)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(111): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#180458)
#12 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\TimeTrackingSleeperHandler->pocketmine\{closure}()
#14 pmsrc/src/TimeTrackingSleeperHandler(77): pocketmine\snooze\SleeperHandler->processNotifications()
#15 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
#16 pmsrc/src/Server(1699): pocketmine\snooze\SleeperHandler->sleepUntil(float 1707761354.1302)
#17 pmsrc/src/Server(1067): pocketmine\Server->tickProcessor()
#18 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#19 pmsrc/src/PocketMine(364): pocketmine\server()
#20 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show