Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when removing goods from the auction house #109

Open
Wayder228 opened this issue Apr 25, 2022 · 4 comments
Open

Error when removing goods from the auction house #109

Wayder228 opened this issue Apr 25, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Wayder228
Copy link

Wayder228 commented Apr 25, 2022

Issue description

Write the issue description here

Steps to reproduce the issue

  1. When removing goods from the auction, the server crashes!

OS and versions

  • PocketMine-MP: 4.2.0
  • Plugin version: Latest + release
  • Server OS: linux

Error/Crash log (If available)

Error: Only arrays and Traversables can be unpacked
File: plugins/AuctionHouse.phar/src/shock95x/auctionhouse/menu/ExpiredMenu
Line: 55
Type: Error

THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: AuctionHouse

Code:
[46] 	}
[47] 
[48] 	public function renderListings(): void {
[49]         foreach($this->getListings() as $index => $listing) {
[50] 			$item = clone $listing->getItem();
[51] 
[52] 			$expiredItem = Locale::get($this->player, "expired-item");
[53] 
[54] 			$lore = str_ireplace(["{PRICE}"], [$listing->getPrice(true, Settings::formatPrice())], preg_filter('/^/', TextFormat::RESET, $expiredItem));
[55] 			$lore = Settings::allowLore() ? [...$item->getLore(), ...$lore] : $lore;
[56] 			$item->setLore($lore);
[57] 
[58]             $this->getInventory()->setItem($index, $item);
[59]         }
[60]        	parent::renderListings();
[61] 	}
[62] 
[63] 	public function handle(Player $player, Item $itemClicked, Inventory $inventory, int $slot): bool {
[64] 		Await::f2c(function () use ($player, $slot, $itemClicked, $inventory) {
[65] 			$storage = DataStorage::getInstance();
@Shock95 Shock95 added the bug Something isn't working label May 5, 2022
@SiahRBLX
Copy link

When buying from AH or removing i get a black screen

@Wayder228
Copy link
Author

При покупке в AH или удалении получаю черный экран

you need invcrashfix this is a plugin, but this plugin has a bug even with this plugin - removal of item.

@SiahRBLX
Copy link

I have... same issue

@Wayder228
Copy link
Author

У меня... такая же проблема

Are you a developer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants