From cc8eca3084f1b83f26ad2cde207d4dfd6657cbf2 Mon Sep 17 00:00:00 2001 From: PEMapModder Date: Fri, 2 Oct 2015 01:52:10 +0800 Subject: [PATCH] Fixed string class conflict --- src/pocketmine/item/Item.php | 20 +++++++++---------- .../item/{String.php => StringItem.php} | 12 +++++------ 2 files changed, 16 insertions(+), 16 deletions(-) rename src/pocketmine/item/{String.php => StringItem.php} (92%) diff --git a/src/pocketmine/item/Item.php b/src/pocketmine/item/Item.php index 46a4f04c7..2f4ec9719 100644 --- a/src/pocketmine/item/Item.php +++ b/src/pocketmine/item/Item.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -540,7 +540,7 @@ class Item{ self::$list[self::RAW_FISH] = Fish::class; self::$list[self::COOKED_FISH] = CookedFish::class; self::$list[self::ARROW] = Arrow::class; - self::$list[self::STRING] = String::class; + self::$list[self::STRING] = StringItem::class; self::$list[self::GUNPOWDER] = Gunpowder::class; self::$list[self::WHEAT] = Wheat::class; self::$list[self::BREAD] = Bread::class; @@ -583,7 +583,7 @@ class Item{ } } } - + self::initCreativeItems(); } @@ -992,7 +992,7 @@ class Item{ $this->name = $this->block->getName(); } } - + public function setCompoundTag($tags){ if($tags instanceof Compound){ $this->setNamedTag($tags); @@ -1000,7 +1000,7 @@ class Item{ $this->tags = $tags; $this->cachedNBT = null; } - + return $this; } @@ -1010,7 +1010,7 @@ class Item{ public function getCompoundTag(){ return $this->tags; } - + public function hasCompoundTag(){ return $this->tags !== "" and $this->tags !== null; } @@ -1244,7 +1244,7 @@ class Item{ return null; } - + public function getNamedTag(){ if(!$this->hasCompoundTag()){ return null; diff --git a/src/pocketmine/item/String.php b/src/pocketmine/item/StringItem.php similarity index 92% rename from src/pocketmine/item/String.php rename to src/pocketmine/item/StringItem.php index 19158ad1a..f6682ec3b 100644 --- a/src/pocketmine/item/String.php +++ b/src/pocketmine/item/StringItem.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,13 +15,13 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ namespace pocketmine\item; -class String extends Item{ +class StringItem extends Item{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::STRING, $meta, $count, "String"); }