Merge branch 'stable'

This commit is contained in:
Dylan K. Taylor
2020-02-07 18:13:55 +00:00
88 changed files with 543 additions and 283 deletions

View File

@@ -38,7 +38,7 @@ class BanEntry{
/** @var string */
private $name;
/** @var \DateTime */
private $creationDate = null;
private $creationDate;
/** @var string */
private $source = "(Unknown)";
/** @var \DateTime|null */

View File

@@ -32,7 +32,7 @@ class PermissibleBase implements Permissible{
/** @var ServerOperator */
private $opable;
/** @var Permissible */
/** @var Permissible|null */
private $parent = null;
/** @var PermissionAttachment[] */

View File

@@ -28,7 +28,7 @@ use pocketmine\plugin\Plugin;
trait PermissibleDelegateTrait{
/** @var PermissibleBase */
private $perm = null;
private $perm;
/**
* @param Permission|string $name

View File

@@ -27,7 +27,7 @@ use pocketmine\plugin\Plugin;
use pocketmine\plugin\PluginException;
class PermissionAttachment{
/** @var PermissionRemovedExecutor */
/** @var PermissionRemovedExecutor|null */
private $removed = null;
/** @var bool[] */
@@ -84,7 +84,7 @@ class PermissionAttachment{
*/
public function setPermissions(array $permissions) : void{
foreach($permissions as $key => $value){
$this->permissions[$key] = (bool) $value;
$this->permissions[$key] = $value;
}
$this->permissible->recalculatePermissions();
}

View File

@@ -102,9 +102,7 @@ class PermissionParser{
if(is_array($data["children"])){
foreach($data["children"] as $k => $v){
if(is_array($v)){
if(($perm = self::loadPermission($k, $v, $default, $output)) !== null){
$output[] = $perm;
}
$output[] = self::loadPermission($k, $v, $default, $output);
}
$children[$k] = true;
}