mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 11:45:30 +00:00
Add Restriction Interface
This commit is contained in:
parent
3e12a41a91
commit
c4ba06b58c
@ -156,10 +156,17 @@ class PlayerPermissions implements ArrayAccess
|
||||
//Thinking of doing $player->permissions[] = new EventRestriction("player.move");
|
||||
//$player->permissions->apply(new EventRestriction("player.move"));
|
||||
|
||||
interface Restriction
|
||||
{
|
||||
public function __construct($restriction);
|
||||
|
||||
public function __toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Class EventRestriction
|
||||
*/
|
||||
class EventRestriction
|
||||
class EventRestriction implements Restriction
|
||||
{
|
||||
/**
|
||||
* @var string $event
|
||||
@ -186,7 +193,7 @@ class EventRestriction
|
||||
/**
|
||||
* Class CommandRestriction
|
||||
*/
|
||||
class CommandRestriction
|
||||
class CommandRestriction implements Restriction
|
||||
{
|
||||
/**
|
||||
* @var string $command
|
||||
|
Loading…
x
Reference in New Issue
Block a user