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