Player: Window system now only allows 1 window at a time

This commit is contained in:
Dylan K. Taylor
2019-06-15 18:19:09 +01:00
parent 312a755a27
commit 93b83b4189
10 changed files with 96 additions and 110 deletions

View File

@ -64,7 +64,7 @@ class Anvil extends Transparent implements Fallable{
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null) : bool{
if($player instanceof Player){
$player->addWindow(new AnvilInventory($this));
$player->setCurrentWindow(new AnvilInventory($this));
}
return true;