mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 15:35:31 +00:00
Merge branch 'release/3.4'
This commit is contained in:
commit
5936205760
@ -42,6 +42,8 @@ class Permission{
|
|||||||
* @param bool|string $value
|
* @param bool|string $value
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
*
|
||||||
|
* @throws \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public static function getByName($value) : string{
|
public static function getByName($value) : string{
|
||||||
if(is_bool($value)){
|
if(is_bool($value)){
|
||||||
@ -70,10 +72,11 @@ class Permission{
|
|||||||
|
|
||||||
case "true":
|
case "true":
|
||||||
return self::DEFAULT_TRUE;
|
return self::DEFAULT_TRUE;
|
||||||
|
case "false":
|
||||||
default:
|
|
||||||
return self::DEFAULT_FALSE;
|
return self::DEFAULT_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
throw new \InvalidArgumentException("Unknown permission default name \"$value\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user