mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Merge commit '097c260db'
# Conflicts: # resources/vanilla # src/item/enchantment/Enchantment.php # src/plugin/PluginDescription.php # src/pocketmine/entity/Effect.php # src/pocketmine/item/ItemFactory.php # src/pocketmine/plugin/PluginManager.php
This commit is contained in:
@ -26,7 +26,7 @@ namespace pocketmine\item\enchantment;
|
||||
use pocketmine\event\entity\EntityDamageEvent;
|
||||
use function constant;
|
||||
use function defined;
|
||||
use function strtoupper;
|
||||
use function mb_strtoupper;
|
||||
|
||||
/**
|
||||
* Manages enchantment type data.
|
||||
@ -233,7 +233,7 @@ class Enchantment{
|
||||
}
|
||||
|
||||
public static function fromString(string $name) : ?Enchantment{
|
||||
$const = Enchantment::class . "::" . strtoupper($name);
|
||||
$const = Enchantment::class . "::" . mb_strtoupper($name);
|
||||
if(defined($const)){
|
||||
return self::get(constant($const));
|
||||
}
|
||||
|
Reference in New Issue
Block a user