mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
*uhm u saw nothing*
This commit is contained in:
parent
5a3aeecd93
commit
22603a9085
1 changed files with 0 additions and 46 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue