Closed teracube closed 5 years ago
same error if i downgrade teaspoon on dev 271 anvil : true on config.yml before and after issue
https://poggit.pmmp.io/r/56640/TeaSpoon_dev-271.phar https://jenkins.pmmp.io/job/PocketMine-MP/1757/artifact/PocketMine-MP.phar
PocketMine-MP Crash Dump Tue Apr 23 08:40:06 CEST 2019
Error: Declaration of CortexPE\inventory\AnvilInventory::onClose(CortexPE\inventory\Player $who): void must be compatible with pocketmine\inventory\AnvilInventory::onClose(pocketmine\Player $who): void
File: plugins/TeaSpoon_dev-271.phar/src/CortexPE/inventory/AnvilInventory
Line: 40
Type: E_COMPILE_ERROR
THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: TeaSpoon v1.1.2
Code:
[31] *
[32] */
[33]
[34] declare(strict_types = 1);
[35]
[36] namespace CortexPE\inventory;
[37]
[38] use pocketmine\inventory\AnvilInventory as PMAnvilInventory;
[39]
[40] class AnvilInventory extends PMAnvilInventory {
[41] public function getDefaultSize(): int{
[42] return 3;
[43] }
[44]
[45] public function onClose(Player $who): void{
[46] foreach($this->getContents() as $item){
[47] foreach($who->getInventory()->addItem($item) as $doesntFit){
[48] $who->getLevel()->dropItem($this->holder, $doesntFit);
[49] }
[50] }
Backtrace:
PocketMine-MP version: 3.7.2 [Protocol 340]
Git commit: b4a8f8391b0fba26ed99bc5de0b3aaedcad4472f
uname -a: Linux g1 4.5.0-0.bpo.2-amd64 #1 SMP Debian 4.5.4-1~bpo8+1 (2016-05-13) x86_64
PHP Version: 7.2.15
Zend version: 3.2.0
OS : Linux, linux
https://poggit.pmmp.io/r/56640/TeaSpoon_dev-272.phar https://jenkins.pmmp.io/job/PocketMine-MP/1757/artifact/PocketMine-MP.phar