Possible fix for #2046, removed embedded class names

This commit is contained in:
Shoghi Cervantes
2014-09-19 09:44:58 +02:00
parent 8c627bd0af
commit d312d2a143
13 changed files with 35 additions and 28 deletions

View File

@@ -485,8 +485,8 @@ class Item{
$meta = ((int) $b[1]) & 0xFFFF;
}
if(defined("pocketmine\\item\\Item::" . strtoupper($b[0]))){
$item = self::get(constant("pocketmine\\item\\Item::" . strtoupper($b[0])), $meta);
if(defined(Item::class . T_DOUBLE_COLON . strtoupper($b[0]))){
$item = self::get(constant(Item::class . T_DOUBLE_COLON . strtoupper($b[0])), $meta);
if($item->getID() === self::AIR and strtoupper($b[0]) !== "AIR"){
$item = self::get(((int) $b[0]) & 0xFFFF, $meta);
}