menu
#3741950 Argument 2 passed to pocketmine\item\enchantment\EnchantmentInstance::__construct() must be of the type int, string given

Submitted by PocketMine-MP 3.11.1

General information

Version: 3.11.1
Git commit: 40a2211a
Plugin involvement: Indirect
Report date: 2020-02-11 14:50:03 +0000 UTC

System Information

PHP version: 7.3.13
Operating system: win
System banner: Windows NT NguyenHoaiAn 6.3 build 9600 (Windows Server 2012 R2 Datacenter Edition) AMD64

Error information

Warning: the MysteryCrate plugin was indirectly involved in this crash. This may be a false positive. Please contact the plugin author before opening a bug ticket.
Message: Argument 2 passed to pocketmine\item\enchantment\EnchantmentInstance::__construct() must be of the type int, string given
File: src/pocketmine/item/enchantment/EnchantmentInstance
Line: #41
Error level: TypeError
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
	/** @var int */
private $level;

/**
* EnchantmentInstance constructor.
*
* @param Enchantment $enchantment Enchantment type
* @param int $level Level of enchantment
*/
public function __construct(Enchantment $enchantment, int $level = 1){
$this->enchantment = $enchantment;
$this->level = $level;
}

/**
* Returns the type of this enchantment.
* @return Enchantment
*/
public function getType() : Enchantment{
return $this->enchantment;
#0 plugins/MysteryCrate.phar/src/JackMD/MysteryCrate/UpdaterEvent(179): pocketmine\item\enchantment\EnchantmentInstance->__construct(object pocketmine\item\enchantment\Enchantment, string[3] 50p)
#1 plugins/MysteryCrate.phar/src/JackMD/MysteryCrate/UpdaterEvent(216): JackMD\MysteryCrate\UpdaterEvent->getReward()
#2 src/pocketmine/scheduler/TaskHandler(159): JackMD\MysteryCrate\UpdaterEvent->onRun(integer 35342)
#3 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 35342)
#4 src/pocketmine/plugin/PluginManager(682): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 35342)
#5 src/pocketmine/Server(2567): pocketmine\plugin\PluginManager->tickSchedulers(integer 35342)
#6 src/pocketmine/Server(2343): pocketmine\Server->tick()
#7 src/pocketmine/Server(2203): pocketmine\Server->tickProcessor()
#8 src/pocketmine/Server(1785): pocketmine\Server->start()
#9 src/pocketmine/PocketMine(272): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[27] C:\Users\vps\Desktop\MCPE3\, string[35] C:\Users\vps\Desktop\MCPE3\plugins\)
#10 src/pocketmine/PocketMine(295): pocketmine\server()
#11 (1): require(string[82] phar://C:/Users/vps/Desktop/MCPE3/PocketMine-MP.phar/src/pocketmine/PocketMine.p)

Loaded Plugins

  • Show

Server Settings

  • Show