mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 15:19:56 +00:00
Fixed string class conflict
This commit is contained in:
parent
6013213159
commit
cc8eca3084
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* ____ _ _ __ __ _ __ __ ____
|
* ____ _ _ __ __ _ __ __ ____
|
||||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* 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::RAW_FISH] = Fish::class;
|
||||||
self::$list[self::COOKED_FISH] = CookedFish::class;
|
self::$list[self::COOKED_FISH] = CookedFish::class;
|
||||||
self::$list[self::ARROW] = Arrow::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::GUNPOWDER] = Gunpowder::class;
|
||||||
self::$list[self::WHEAT] = Wheat::class;
|
self::$list[self::WHEAT] = Wheat::class;
|
||||||
self::$list[self::BREAD] = Bread::class;
|
self::$list[self::BREAD] = Bread::class;
|
||||||
@ -583,7 +583,7 @@ class Item{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self::initCreativeItems();
|
self::initCreativeItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -992,7 +992,7 @@ class Item{
|
|||||||
$this->name = $this->block->getName();
|
$this->name = $this->block->getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCompoundTag($tags){
|
public function setCompoundTag($tags){
|
||||||
if($tags instanceof Compound){
|
if($tags instanceof Compound){
|
||||||
$this->setNamedTag($tags);
|
$this->setNamedTag($tags);
|
||||||
@ -1000,7 +1000,7 @@ class Item{
|
|||||||
$this->tags = $tags;
|
$this->tags = $tags;
|
||||||
$this->cachedNBT = null;
|
$this->cachedNBT = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1010,7 +1010,7 @@ class Item{
|
|||||||
public function getCompoundTag(){
|
public function getCompoundTag(){
|
||||||
return $this->tags;
|
return $this->tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hasCompoundTag(){
|
public function hasCompoundTag(){
|
||||||
return $this->tags !== "" and $this->tags !== null;
|
return $this->tags !== "" and $this->tags !== null;
|
||||||
}
|
}
|
||||||
@ -1244,7 +1244,7 @@ class Item{
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNamedTag(){
|
public function getNamedTag(){
|
||||||
if(!$this->hasCompoundTag()){
|
if(!$this->hasCompoundTag()){
|
||||||
return null;
|
return null;
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* ____ _ _ __ __ _ __ __ ____
|
* ____ _ _ __ __ _ __ __ ____
|
||||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@ -15,13 +15,13 @@
|
|||||||
*
|
*
|
||||||
* @author PocketMine Team
|
* @author PocketMine Team
|
||||||
* @link http://www.pocketmine.net/
|
* @link http://www.pocketmine.net/
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace pocketmine\item;
|
namespace pocketmine\item;
|
||||||
|
|
||||||
class String extends Item{
|
class StringItem extends Item{
|
||||||
public function __construct($meta = 0, $count = 1){
|
public function __construct($meta = 0, $count = 1){
|
||||||
parent::__construct(self::STRING, $meta, $count, "String");
|
parent::__construct(self::STRING, $meta, $count, "String");
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user