Fixed T_DOUBLE_COLON

This commit is contained in:
Shoghi Cervantes 2014-09-19 09:48:02 +02:00
parent 3e1ea23036
commit ee7d84dfbd
3 changed files with 6 additions and 6 deletions

View File

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

View File

@ -95,12 +95,12 @@ class PluginDescription{
} }
if(isset($plugin["load"])){ if(isset($plugin["load"])){
$order = strtoupper($plugin["load"]); $order = strtoupper($plugin["load"]);
if(!defined(PluginLoadOrder::class . T_DOUBLE_COLON . $order)){ if(!defined(PluginLoadOrder::class . "::" . $order)){
trigger_error("Invalid PluginDescription load", E_USER_ERROR); trigger_error("Invalid PluginDescription load", E_USER_ERROR);
return; return;
}else{ }else{
$this->order = constant(PluginLoadOrder::class . T_DOUBLE_COLON . $order); $this->order = constant(PluginLoadOrder::class . "::" . $order);
} }
} }
$this->authors = []; $this->authors = [];

View File

@ -676,8 +676,8 @@ class PluginManager{
$ignoreCancelled = false; $ignoreCancelled = false;
if(preg_match("/^[\t ]*\\* @priority[\t ]{1,}([a-zA-Z]{1,})$/m", (string) $method->getDocComment(), $matches) > 0){ if(preg_match("/^[\t ]*\\* @priority[\t ]{1,}([a-zA-Z]{1,})$/m", (string) $method->getDocComment(), $matches) > 0){
$matches[1] = strtoupper($matches[1]); $matches[1] = strtoupper($matches[1]);
if(defined(EventPriority::class . T_DOUBLE_COLON . $matches[1])){ if(defined(EventPriority::class . "::" . $matches[1])){
$priority = constant(EventPriority::class . T_DOUBLE_COLON . $matches[1]); $priority = constant(EventPriority::class . "::" . $matches[1]);
} }
} }
if(preg_match("/^[\t ]*\\* @ignoreCancelled[\t ]{1,}([a-zA-Z]{1,})$/m", (string) $method->getDocComment(), $matches) > 0){ if(preg_match("/^[\t ]*\\* @ignoreCancelled[\t ]{1,}([a-zA-Z]{1,})$/m", (string) $method->getDocComment(), $matches) > 0){