mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-26 13:19:55 +00:00
item: populate missing return type information
This commit is contained in:
parent
11cae2f0c0
commit
e6ba3ce8a6
@ -49,6 +49,8 @@ interface Consumable{
|
|||||||
* Called when this Consumable is consumed by mob, after standard resulting effects have been applied.
|
* Called when this Consumable is consumed by mob, after standard resulting effects have been applied.
|
||||||
*
|
*
|
||||||
* @param Living $consumer
|
* @param Living $consumer
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function onConsume(Living $consumer);
|
public function onConsume(Living $consumer);
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,8 @@ abstract class Durable extends Item{
|
|||||||
* Sets whether the item will take damage when used.
|
* Sets whether the item will take damage when used.
|
||||||
*
|
*
|
||||||
* @param bool $value
|
* @param bool $value
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUnbreakable(bool $value = true){
|
public function setUnbreakable(bool $value = true){
|
||||||
$this->setNamedTagEntry(new ByteTag("Unbreakable", $value ? 1 : 0));
|
$this->setNamedTagEntry(new ByteTag("Unbreakable", $value ? 1 : 0));
|
||||||
|
@ -123,6 +123,9 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
/** @var Item[] */
|
/** @var Item[] */
|
||||||
private static $creative = [];
|
private static $creative = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public static function initCreativeItems(){
|
public static function initCreativeItems(){
|
||||||
self::clearCreativeItems();
|
self::clearCreativeItems();
|
||||||
|
|
||||||
@ -140,6 +143,8 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
/**
|
/**
|
||||||
* Removes all previously added items from the creative menu.
|
* Removes all previously added items from the creative menu.
|
||||||
* Note: Players who are already online when this is called will not see this change.
|
* Note: Players who are already online when this is called will not see this change.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function clearCreativeItems(){
|
public static function clearCreativeItems(){
|
||||||
Item::$creative = [];
|
Item::$creative = [];
|
||||||
@ -154,6 +159,8 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
* Note: Players who are already online when this is called will not see this change.
|
* Note: Players who are already online when this is called will not see this change.
|
||||||
*
|
*
|
||||||
* @param Item $item
|
* @param Item $item
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function addCreativeItem(Item $item){
|
public static function addCreativeItem(Item $item){
|
||||||
Item::$creative[] = clone $item;
|
Item::$creative[] = clone $item;
|
||||||
@ -164,6 +171,8 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
* Note: Players who are already online when this is called will not see this change.
|
* Note: Players who are already online when this is called will not see this change.
|
||||||
*
|
*
|
||||||
* @param Item $item
|
* @param Item $item
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function removeCreativeItem(Item $item){
|
public static function removeCreativeItem(Item $item){
|
||||||
$index = self::getCreativeItemIndex($item);
|
$index = self::getCreativeItemIndex($item);
|
||||||
|
@ -46,6 +46,9 @@ class ItemFactory{
|
|||||||
/** @var \SplFixedArray */
|
/** @var \SplFixedArray */
|
||||||
private static $list = null;
|
private static $list = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public static function init(){
|
public static function init(){
|
||||||
self::$list = new \SplFixedArray(65536);
|
self::$list = new \SplFixedArray(65536);
|
||||||
|
|
||||||
@ -285,6 +288,7 @@ class ItemFactory{
|
|||||||
* @param Item $item
|
* @param Item $item
|
||||||
* @param bool $override
|
* @param bool $override
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
* @throws \RuntimeException if something attempted to override an already-registered item without specifying the
|
* @throws \RuntimeException if something attempted to override an already-registered item without specifying the
|
||||||
* $override parameter.
|
* $override parameter.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user