*uhm u saw nothing*

This commit is contained in:
GameHerobrine 2022-12-19 20:42:06 +03:00 • committed by GitHub
parent 5a3aeecd93
commit 22603a9085
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,46 +0,0 @@
<?php
class PermissionAPI
{
/**
* @var GroupBase[]
*/
public $groups = [];
/**
* @var PocketMinecraftServer
*/
private $server;
public function __construct(){
$this->server = ServerAPI::request();
}
public function init(){
$this->addGroup(new DefaultGroup());
$this->addGroup(new OperatorGroup());
}
public function getGroupByName($name){
return $this->groups[$name];
}
public function addGroup(GroupBase $group){
if($this->groupExists($group->name)){
return false;
}
$this->groups[$group->name] = $group;
return true;
}
public function groupExists($name){
return isset($this->groups[$name]);
}
public function removeGroup(GroupBase $group){
if(!$this->groupExists($group->name)){
return false;
}
unset($this->groups[$group->name]);
return true;
}
}