Last active
July 15, 2017 15:09
-
-
Save eternalharvest/7bfee25a3aad96dd021ca5c8d870eeee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# class PlayerInventory { | |
public function onSlotChange($index, $before){ | |
$holder = $this->getHolder(); | |
if($holder instanceof Player and !$holder->spawned){ | |
return; | |
} | |
if($index < $this->getSize()){ | |
parent::onSlotChange($index, $before); | |
}else{ | |
$this->sendArmorSlot($index, $this->getViewers()); | |
$this->sendArmorSlot($index, $this->getHolder()->getViewers()); | |
} | |
} | |
# } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment