/** * @param PluginBase $owner - plugin that owns this session */ public function __construct(PluginBase $owner, $privacy = null, $exPerms = null, $notice = null) { parent::__construct($owner); // We do it here so to prevent the registration of listeners $this->conlog = null; $this->privacy = $privacy; $this->exPerms = $exPerms; $this->notice = is_null($notice) || is_array($notice) ? $notice : [$notice]; }
/** * @param PluginBase $owner - plugin that owns this session * @param bool $hard - hard freeze option */ public function __construct(PluginBase $owner, $hard = true) { $bag = $owner->getServer()->getPluginManager()->getPlugin("GrabBag"); if ($bag && $bag->isEnabled() && MPMU::apiCheck($bag->getDescription()->getVersion(), "2.3") && $bag->api->getFeature("shield")) { $this->api = $bag->api; return; } parent::__construct($owner); $this->api = null; }
/** * @param PluginBase $owner - plugin that owns this session * @param bool $hard - hard freeze option */ public function __construct(PluginBase $owner, $hard = true) { $bag = $owner->getServer()->getPluginManager()->getPlugin("GrabBag"); if ($bag && $bag->isEnabled() && MPMU::apiCheck($bag->getDescription()->getVersion(), "2.3") && $bag->api->getFeature("freeze-thaw")) { $this->api = $bag->api; return; } parent::__construct($owner); // We do it here so to prevent the registration of listeners $this->api = null; $this->hard = $hard; }
/** * @param PluginBase $owner - plugin that owns this session */ public function __construct(PluginBase $owner) { $bag = $owner->getServer()->getPluginManager()->getPlugin("GrabBag"); $this->apis = [null, null]; if ($bag && $bag->isEnabled() && MPMU::apiCheck($bag->getDescription()->getVersion(), "2.3")) { if ($bag->api->getFeature("chat-utils")) { $this->apis[0] = $bag->api; } if ($bag->api->getFeature("mute-unmute")) { $this->apis[1] = $bag->api; } return; } parent::__construct($owner); $this->chat = true; }
/** * @param PluginBase $owner - plugin that owns this session */ public function __construct(PluginBase $owner) { parent::__construct($owner); // We do it here so to prevent the registration of listeners $this->fakeChest = null; }