mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Added armor items and max stack size for them.
This commit is contained in:
parent
1963d8fde0
commit
294e680d5d
@ -2182,7 +2182,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
}
|
||||
|
||||
|
||||
if($this->currentTransaction === null or $this->currentTransaction->getCreationTime() < (microtime(true) - 0.4)){
|
||||
if($this->currentTransaction === null or $this->currentTransaction->getCreationTime() < (microtime(true) - 0.5)){
|
||||
if($this->currentTransaction instanceof SimpleTransactionGroup){
|
||||
foreach($this->currentTransaction->getInventories() as $inventory){
|
||||
if($inventory instanceof PlayerInventory){
|
||||
|
31
src/pocketmine/item/Armor.php
Normal file
31
src/pocketmine/item/Armor.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
use pocketmine\block\Block;
|
||||
use pocketmine\entity\Entity;
|
||||
|
||||
abstract class Armor extends Item{
|
||||
|
||||
public $maxStackSize = 1;
|
||||
}
|
29
src/pocketmine/item/ChainBoots.php
Normal file
29
src/pocketmine/item/ChainBoots.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class ChainBoots extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::CHAIN_BOOTS, $meta, $count, "Chainmail Boots");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/ChainChestplate.php
Normal file
29
src/pocketmine/item/ChainChestplate.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class ChainChestplate extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::CHAIN_CHESTPLATE, $meta, $count, "Chain Chestplate");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/ChainHelmet.php
Normal file
29
src/pocketmine/item/ChainHelmet.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class ChainHelmet extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::CHAIN_HELMET, $meta, $count, "Chainmail Helmet");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/ChainLeggings.php
Normal file
29
src/pocketmine/item/ChainLeggings.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class ChainLeggings extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::CHAIN_LEGGINGS, $meta, $count, "Chain Leggings");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/DiamondBoots.php
Normal file
29
src/pocketmine/item/DiamondBoots.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class DiamondBoots extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::DIAMOND_BOOTS, $meta, $count, "Diamond Boots");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/DiamondChestplate.php
Normal file
29
src/pocketmine/item/DiamondChestplate.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class DiamondChestplate extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::DIAMOND_CHESTPLATE, $meta, $count, "Diamond Chestplate");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/DiamondHelmet.php
Normal file
29
src/pocketmine/item/DiamondHelmet.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class DiamondHelmet extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::DIAMOND_HELMET, $meta, $count, "Diamond Helmet");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/DiamondLeggings.php
Normal file
29
src/pocketmine/item/DiamondLeggings.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class DiamondLeggings extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::DIAMOND_LEGGINGS, $meta, $count, "Diamond Leggings");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/GoldBoots.php
Normal file
29
src/pocketmine/item/GoldBoots.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class GoldBoots extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::GOLD_BOOTS, $meta, $count, "Gold Boots");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/GoldChestplate.php
Normal file
29
src/pocketmine/item/GoldChestplate.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class GoldChestplate extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::GOLD_CHESTPLATE, $meta, $count, "Gold Chestplate");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/GoldHelmet.php
Normal file
29
src/pocketmine/item/GoldHelmet.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class GoldHelmet extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::GOLD_HELMET, $meta, $count, "Gold Helmet");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/GoldLeggings.php
Normal file
29
src/pocketmine/item/GoldLeggings.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class GoldLeggings extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::GOLD_LEGGINGS, $meta, $count, "Gold Leggings");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/IronBoots.php
Normal file
29
src/pocketmine/item/IronBoots.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class IronBoots extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::IRON_BOOTS, $meta, $count, "Iron Boots");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/IronChestplate.php
Normal file
29
src/pocketmine/item/IronChestplate.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class IronChestplate extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::IRON_CHESTPLATE, $meta, $count, "Iron Chestplate");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/IronHelmet.php
Normal file
29
src/pocketmine/item/IronHelmet.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class IronHelmet extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::IRON_HELMET, $meta, $count, "Iron Helmet");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/IronLeggings.php
Normal file
29
src/pocketmine/item/IronLeggings.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class IronLeggings extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::IRON_LEGGINGS, $meta, $count, "Iron Leggings");
|
||||
}
|
||||
}
|
@ -404,60 +404,79 @@ class Item{
|
||||
public static function init(){
|
||||
if(self::$list === null){
|
||||
self::$list = new \SplFixedArray(65536);
|
||||
self::$list[self::SUGARCANE] = Sugarcane::class;;
|
||||
self::$list[self::WHEAT_SEEDS] = WheatSeeds::class;;
|
||||
self::$list[self::PUMPKIN_SEEDS] = PumpkinSeeds::class;;
|
||||
self::$list[self::MELON_SEEDS] = MelonSeeds::class;;
|
||||
self::$list[self::MUSHROOM_STEW] = MushroomStew::class;;
|
||||
self::$list[self::BEETROOT_SOUP] = BeetrootSoup::class;;
|
||||
self::$list[self::CARROT] = Carrot::class;;
|
||||
self::$list[self::POTATO] = Potato::class;;
|
||||
self::$list[self::BEETROOT_SEEDS] = BeetrootSeeds::class;;
|
||||
self::$list[self::SIGN] = Sign::class;;
|
||||
self::$list[self::WOODEN_DOOR] = WoodenDoor::class;;
|
||||
self::$list[self::BUCKET] = Bucket::class;;
|
||||
self::$list[self::IRON_DOOR] = IronDoor::class;;
|
||||
self::$list[self::CAKE] = Cake::class;;
|
||||
self::$list[self::BED] = Bed::class;;
|
||||
self::$list[self::PAINTING] = Painting::class;;
|
||||
self::$list[self::COAL] = Coal::class;;
|
||||
self::$list[self::APPLE] = Apple::class;;
|
||||
self::$list[self::SPAWN_EGG] = SpawnEgg::class;;
|
||||
self::$list[self::DIAMOND] = Diamond::class;;
|
||||
self::$list[self::STICK] = Stick::class;;
|
||||
self::$list[self::BOWL] = Bowl::class;;
|
||||
self::$list[self::FEATHER] = Feather::class;;
|
||||
self::$list[self::BRICK] = Brick::class;;
|
||||
self::$list[self::IRON_SWORD] = IronSword::class;;
|
||||
self::$list[self::IRON_INGOT] = IronIngot::class;;
|
||||
self::$list[self::GOLD_INGOT] = GoldIngot::class;;
|
||||
self::$list[self::IRON_SHOVEL] = IronShovel::class;;
|
||||
self::$list[self::IRON_PICKAXE] = IronPickaxe::class;;
|
||||
self::$list[self::IRON_AXE] = IronAxe::class;;
|
||||
self::$list[self::IRON_HOE] = IronHoe::class;;
|
||||
self::$list[self::DIAMOND_SWORD] = DiamondSword::class;;
|
||||
self::$list[self::DIAMOND_SHOVEL] = DiamondShovel::class;;
|
||||
self::$list[self::DIAMOND_PICKAXE] = DiamondPickaxe::class;;
|
||||
self::$list[self::DIAMOND_AXE] = DiamondAxe::class;;
|
||||
self::$list[self::DIAMOND_HOE] = DiamondHoe::class;;
|
||||
self::$list[self::GOLD_SWORD] = GoldSword::class;;
|
||||
self::$list[self::GOLD_SHOVEL] = GoldShovel::class;;
|
||||
self::$list[self::GOLD_PICKAXE] = GoldPickaxe::class;;
|
||||
self::$list[self::GOLD_AXE] = GoldAxe::class;;
|
||||
self::$list[self::GOLD_HOE] = GoldHoe::class;;
|
||||
self::$list[self::STONE_SWORD] = StoneSword::class;;
|
||||
self::$list[self::STONE_SHOVEL] = StoneShovel::class;;
|
||||
self::$list[self::STONE_PICKAXE] = StonePickaxe::class;;
|
||||
self::$list[self::STONE_AXE] = StoneAxe::class;;
|
||||
self::$list[self::STONE_HOE] = StoneHoe::class;;
|
||||
self::$list[self::WOODEN_SWORD] = WoodenSword::class;;
|
||||
self::$list[self::WOODEN_SHOVEL] = WoodenShovel::class;;
|
||||
self::$list[self::WOODEN_PICKAXE] = WoodenPickaxe::class;;
|
||||
self::$list[self::WOODEN_AXE] = WoodenAxe::class;;
|
||||
self::$list[self::WOODEN_HOE] = WoodenHoe::class;;
|
||||
self::$list[self::FLINT_STEEL] = FlintSteel::class;;
|
||||
self::$list[self::SHEARS] = Shears::class;;
|
||||
self::$list[self::BOW] = Bow::class;;
|
||||
self::$list[self::SUGARCANE] = Sugarcane::class;
|
||||
self::$list[self::WHEAT_SEEDS] = WheatSeeds::class;
|
||||
self::$list[self::PUMPKIN_SEEDS] = PumpkinSeeds::class;
|
||||
self::$list[self::MELON_SEEDS] = MelonSeeds::class;
|
||||
self::$list[self::MUSHROOM_STEW] = MushroomStew::class;
|
||||
self::$list[self::BEETROOT_SOUP] = BeetrootSoup::class;
|
||||
self::$list[self::CARROT] = Carrot::class;
|
||||
self::$list[self::POTATO] = Potato::class;
|
||||
self::$list[self::BEETROOT_SEEDS] = BeetrootSeeds::class;
|
||||
self::$list[self::SIGN] = Sign::class;
|
||||
self::$list[self::WOODEN_DOOR] = WoodenDoor::class;
|
||||
self::$list[self::BUCKET] = Bucket::class;
|
||||
self::$list[self::IRON_DOOR] = IronDoor::class;
|
||||
self::$list[self::CAKE] = Cake::class;
|
||||
self::$list[self::BED] = Bed::class;
|
||||
self::$list[self::PAINTING] = Painting::class;
|
||||
self::$list[self::COAL] = Coal::class;
|
||||
self::$list[self::APPLE] = Apple::class;
|
||||
self::$list[self::SPAWN_EGG] = SpawnEgg::class;
|
||||
self::$list[self::DIAMOND] = Diamond::class;
|
||||
self::$list[self::STICK] = Stick::class;
|
||||
self::$list[self::BOWL] = Bowl::class;
|
||||
self::$list[self::FEATHER] = Feather::class;
|
||||
self::$list[self::BRICK] = Brick::class;
|
||||
self::$list[self::LEATHER_CAP] = LeatherCap::class;
|
||||
self::$list[self::LEATHER_TUNIC] = LeatherTunic::class;
|
||||
self::$list[self::LEATHER_PANTS] = LeatherPants::class;
|
||||
self::$list[self::CHAIN_HELMET] = ChainHelmet::class;
|
||||
self::$list[self::CHAIN_CHESTPLATE] = ChainChestplate::class;
|
||||
self::$list[self::CHAIN_LEGGINGS] = ChainLeggings::class;
|
||||
self::$list[self::CHAIN_BOOTS] = ChainBoots::class;
|
||||
self::$list[self::IRON_HELMET] = IronHelmet::class;
|
||||
self::$list[self::IRON_CHESTPLATE] = IronChestplate::class;
|
||||
self::$list[self::IRON_LEGGINGS] = IronLeggings::class;
|
||||
self::$list[self::IRON_BOOTS] = IronBoots::class;
|
||||
self::$list[self::GOLD_HELMET] = GoldHelmet::class;
|
||||
self::$list[self::GOLD_CHESTPLATE] = GoldChestplate::class;
|
||||
self::$list[self::GOLD_LEGGINGS] = GoldLeggings::class;
|
||||
self::$list[self::GOLD_BOOTS] = GoldBoots::class;
|
||||
self::$list[self::DIAMOND_HELMET] = DiamondHelmet::class;
|
||||
self::$list[self::DIAMOND_CHESTPLATE] = DiamondChestplate::class;
|
||||
self::$list[self::DIAMOND_LEGGINGS] = DiamondLeggings::class;
|
||||
self::$list[self::DIAMOND_BOOTS] = DiamondBoots::class;
|
||||
self::$list[self::IRON_SWORD] = IronSword::class;
|
||||
self::$list[self::IRON_INGOT] = IronIngot::class;
|
||||
self::$list[self::GOLD_INGOT] = GoldIngot::class;
|
||||
self::$list[self::IRON_SHOVEL] = IronShovel::class;
|
||||
self::$list[self::IRON_PICKAXE] = IronPickaxe::class;
|
||||
self::$list[self::IRON_AXE] = IronAxe::class;
|
||||
self::$list[self::IRON_HOE] = IronHoe::class;
|
||||
self::$list[self::DIAMOND_SWORD] = DiamondSword::class;
|
||||
self::$list[self::DIAMOND_SHOVEL] = DiamondShovel::class;
|
||||
self::$list[self::DIAMOND_PICKAXE] = DiamondPickaxe::class;
|
||||
self::$list[self::DIAMOND_AXE] = DiamondAxe::class;
|
||||
self::$list[self::DIAMOND_HOE] = DiamondHoe::class;
|
||||
self::$list[self::GOLD_SWORD] = GoldSword::class;
|
||||
self::$list[self::GOLD_SHOVEL] = GoldShovel::class;
|
||||
self::$list[self::GOLD_PICKAXE] = GoldPickaxe::class;
|
||||
self::$list[self::GOLD_AXE] = GoldAxe::class;
|
||||
self::$list[self::GOLD_HOE] = GoldHoe::class;
|
||||
self::$list[self::STONE_SWORD] = StoneSword::class;
|
||||
self::$list[self::STONE_SHOVEL] = StoneShovel::class;
|
||||
self::$list[self::STONE_PICKAXE] = StonePickaxe::class;
|
||||
self::$list[self::STONE_AXE] = StoneAxe::class;
|
||||
self::$list[self::STONE_HOE] = StoneHoe::class;
|
||||
self::$list[self::WOODEN_SWORD] = WoodenSword::class;
|
||||
self::$list[self::WOODEN_SHOVEL] = WoodenShovel::class;
|
||||
self::$list[self::WOODEN_PICKAXE] = WoodenPickaxe::class;
|
||||
self::$list[self::WOODEN_AXE] = WoodenAxe::class;
|
||||
self::$list[self::WOODEN_HOE] = WoodenHoe::class;
|
||||
self::$list[self::FLINT_STEEL] = FlintSteel::class;
|
||||
self::$list[self::SHEARS] = Shears::class;
|
||||
self::$list[self::BOW] = Bow::class;
|
||||
|
||||
for($i = 0; $i < 256; ++$i){
|
||||
if(Block::$list[$i] !== null){
|
||||
|
29
src/pocketmine/item/LeatherBoots.php
Normal file
29
src/pocketmine/item/LeatherBoots.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class LeatherBoots extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::LEATHER_BOOTS, $meta, $count, "Leather Boots");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/LeatherCap.php
Normal file
29
src/pocketmine/item/LeatherCap.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class LeatherCap extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::LEATHER_CAP, $meta, $count, "Leather Cap");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/LeatherPants.php
Normal file
29
src/pocketmine/item/LeatherPants.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class LeatherPants extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::LEATHER_PANTS, $meta, $count, "Leather Pants");
|
||||
}
|
||||
}
|
29
src/pocketmine/item/LeatherTunic.php
Normal file
29
src/pocketmine/item/LeatherTunic.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class LeatherTunic extends Armor{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::LEATHER_TUNIC, $meta, $count, "Leather Tunic");
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user