mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 15:49:54 +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:
commit
d0c8d64b40
@ -47,6 +47,7 @@ use function is_resource;
|
|||||||
use function json_encode;
|
use function json_encode;
|
||||||
use function json_last_error_msg;
|
use function json_last_error_msg;
|
||||||
use function max;
|
use function max;
|
||||||
|
use function mb_strtoupper;
|
||||||
use function mkdir;
|
use function mkdir;
|
||||||
use function ob_end_clean;
|
use function ob_end_clean;
|
||||||
use function ob_get_contents;
|
use function ob_get_contents;
|
||||||
@ -57,7 +58,6 @@ use function phpversion;
|
|||||||
use function preg_replace;
|
use function preg_replace;
|
||||||
use function str_split;
|
use function str_split;
|
||||||
use function strpos;
|
use function strpos;
|
||||||
use function strtoupper;
|
|
||||||
use function substr;
|
use function substr;
|
||||||
use function time;
|
use function time;
|
||||||
use function zend_version;
|
use function zend_version;
|
||||||
@ -172,7 +172,7 @@ class CrashDump{
|
|||||||
"depends" => $d->getDepend(),
|
"depends" => $d->getDepend(),
|
||||||
"softDepends" => $d->getSoftDepend(),
|
"softDepends" => $d->getSoftDepend(),
|
||||||
"main" => $d->getMain(),
|
"main" => $d->getMain(),
|
||||||
"load" => strtoupper($d->getOrder()->name()),
|
"load" => mb_strtoupper($d->getOrder()->name()),
|
||||||
"website" => $d->getWebsite()
|
"website" => $d->getWebsite()
|
||||||
];
|
];
|
||||||
$this->addLine($d->getName() . " " . $d->getVersion() . " by " . implode(", ", $d->getAuthors()) . " for API(s) " . implode(", ", $d->getCompatibleApis()));
|
$this->addLine($d->getName() . " " . $d->getVersion() . " by " . implode(", ", $d->getAuthors()) . " for API(s) " . implode(", ", $d->getCompatibleApis()));
|
||||||
|
@ -50,6 +50,7 @@ use function is_object;
|
|||||||
use function is_resource;
|
use function is_resource;
|
||||||
use function is_string;
|
use function is_string;
|
||||||
use function json_encode;
|
use function json_encode;
|
||||||
|
use function mb_strtoupper;
|
||||||
use function min;
|
use function min;
|
||||||
use function mkdir;
|
use function mkdir;
|
||||||
use function preg_match;
|
use function preg_match;
|
||||||
@ -58,7 +59,6 @@ use function round;
|
|||||||
use function spl_object_hash;
|
use function spl_object_hash;
|
||||||
use function sprintf;
|
use function sprintf;
|
||||||
use function strlen;
|
use function strlen;
|
||||||
use function strtoupper;
|
|
||||||
use function substr;
|
use function substr;
|
||||||
use const JSON_PRETTY_PRINT;
|
use const JSON_PRETTY_PRINT;
|
||||||
use const JSON_UNESCAPED_SLASHES;
|
use const JSON_UNESCAPED_SLASHES;
|
||||||
@ -131,7 +131,7 @@ class MemoryManager{
|
|||||||
if($m <= 0){
|
if($m <= 0){
|
||||||
$defaultMemory = 0;
|
$defaultMemory = 0;
|
||||||
}else{
|
}else{
|
||||||
switch(strtoupper($matches[2])){
|
switch(mb_strtoupper($matches[2])){
|
||||||
case "K":
|
case "K":
|
||||||
$defaultMemory = $m / 1024;
|
$defaultMemory = $m / 1024;
|
||||||
break;
|
break;
|
||||||
|
@ -25,7 +25,7 @@ namespace pocketmine\event;
|
|||||||
|
|
||||||
use function constant;
|
use function constant;
|
||||||
use function defined;
|
use function defined;
|
||||||
use function strtoupper;
|
use function mb_strtoupper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of event priorities
|
* List of event priorities
|
||||||
@ -84,7 +84,7 @@ final class EventPriority{
|
|||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public static function fromString(string $name) : int{
|
public static function fromString(string $name) : int{
|
||||||
$name = strtoupper($name);
|
$name = mb_strtoupper($name);
|
||||||
$const = self::class . "::" . $name;
|
$const = self::class . "::" . $name;
|
||||||
if($name !== "ALL" and defined($const)){
|
if($name !== "ALL" and defined($const)){
|
||||||
return constant($const);
|
return constant($const);
|
||||||
|
@ -26,7 +26,7 @@ namespace pocketmine\item\enchantment;
|
|||||||
use pocketmine\event\entity\EntityDamageEvent;
|
use pocketmine\event\entity\EntityDamageEvent;
|
||||||
use function constant;
|
use function constant;
|
||||||
use function defined;
|
use function defined;
|
||||||
use function strtoupper;
|
use function mb_strtoupper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages enchantment type data.
|
* Manages enchantment type data.
|
||||||
@ -233,7 +233,7 @@ class Enchantment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function fromString(string $name) : ?Enchantment{
|
public static function fromString(string $name) : ?Enchantment{
|
||||||
$const = Enchantment::class . "::" . strtoupper($name);
|
$const = Enchantment::class . "::" . mb_strtoupper($name);
|
||||||
if(defined($const)){
|
if(defined($const)){
|
||||||
return self::get(constant($const));
|
return self::get(constant($const));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user