mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 23:59:53 +00:00
Fixed ItemFactory::fromString() meta handling bug introduced by 71c3c349766e348bf53a1beeefaf9a897bc0a954
This commit is contained in:
parent
f6b54f5116
commit
b480c63060
@ -353,7 +353,7 @@ class ItemFactory{
|
|||||||
if(!isset($b[1])){
|
if(!isset($b[1])){
|
||||||
$meta = 0;
|
$meta = 0;
|
||||||
}elseif(is_numeric($b[1])){
|
}elseif(is_numeric($b[1])){
|
||||||
$meta = $b[1];
|
$meta = (int) $b[1];
|
||||||
}else{
|
}else{
|
||||||
throw new \InvalidArgumentException("Unable to parse \"" . $b[1] . "\" from \"" . $str . "\" as a valid meta value");
|
throw new \InvalidArgumentException("Unable to parse \"" . $b[1] . "\" from \"" . $str . "\" as a valid meta value");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user