Merge branch 'release/3.3' into release/3.4

This commit is contained in:
Dylan K. Taylor
2018-10-21 18:17:07 +01:00
62 changed files with 120 additions and 49 deletions

View File

@ -384,6 +384,7 @@ abstract class BaseInventory implements Inventory{
/**
* Removes the inventory window from all players currently viewing it.
*
* @param bool $force Force removal of permanent windows such as the player's own inventory. Used internally.
*/
public function removeAllViewers(bool $force = false) : void{

View File

@ -244,6 +244,7 @@ interface Inventory{
* Returns whether the specified slot exists in the inventory.
*
* @param int $slot
*
* @return bool
*/
public function slotExists(int $slot) : bool;

View File

@ -88,6 +88,7 @@ class PlayerInventory extends BaseInventory{
/**
* @param int $slot
*
* @throws \InvalidArgumentException
*/
private function throwIfNotHotbarSlot(int $slot){
@ -100,6 +101,7 @@ class PlayerInventory extends BaseInventory{
* Returns the item in the specified hotbar slot.
*
* @param int $hotbarSlot
*
* @return Item
*
* @throws \InvalidArgumentException if the hotbar slot index is out of range
@ -160,6 +162,7 @@ class PlayerInventory extends BaseInventory{
/**
* Sends the currently-held item to specified targets.
*
* @param Player|Player[] $target
*/
public function sendHeldItem($target){

View File

@ -46,11 +46,11 @@ class ShapedRecipe implements CraftingRecipe{
* Array of 1, 2, or 3 strings representing the rows of the recipe.
* This accepts an array of 1, 2 or 3 strings. Each string should be of the same length and must be at most 3
* characters long. Each character represents a unique type of ingredient. Spaces are interpreted as air.
* @param Item[] $ingredients <br>
* @param Item[] $ingredients <br>
* Char => Item map of items to be set into the shape.
* This accepts an array of Items, indexed by character. Every unique character (except space) in the shape
* array MUST have a corresponding item in this list. Space character is automatically treated as air.
* @param Item[] $results List of items that this recipe produces when crafted.
* @param Item[] $results List of items that this recipe produces when crafted.
*
* Note: Recipes **do not** need to be square. Do NOT add padding for empty rows/columns.
*/

View File

@ -55,6 +55,7 @@ class DropItemAction extends InventoryAction{
* Drops the target item in front of the player.
*
* @param Player $source
*
* @return bool
*/
public function execute(Player $source) : bool{