Inheritance: extends Task
Example #1
0
 public function __construct(Main $plugin, Player $player)
 {
     parent::__construct($plugin);
     $this->setHandler($plugin->getServer()->getScheduler()->scheduleDelayedTask($this, 20 * 2));
     $this->plugin = $plugin;
     $this->player = $player;
 }
 /**
  * @param BasePlugin $main
  * @param $queueId
  * @param $garbageable
  * @param $flag
  *
  * @internal Only use in BasePlugin.php
  */
 public function __construct(BasePlugin $main, $queueId, $garbageable, $flag)
 {
     parent::__construct($this->main = $main);
     $this->queueId = $queueId;
     $this->garbageable = $garbageable;
     $this->flag = $flag;
 }
 public function __construct(damageEffect $owner, $particle, Level $level, $event)
 {
     parent::__construct($owner);
     $this->particle = $particle;
     $this->level = $level;
     $this->event = $event;
 }
 public function __construct(Entity $target, Player $whose, $tick)
 {
     parent::__construct(Archery::getInstance());
     $this->tick = $tick;
     $this->whose = $whose;
     $this->target = $target;
 }
Example #5
0
 public function __construct(Plugin $owner, Player $player, Position $position, $lobby)
 {
     parent::__construct($owner);
     $this->player = $player;
     $this->position = $position;
     $this->lobby = $lobby;
 }
Example #6
0
 public function __construct(Plugin $owner, $text, $lobby)
 {
     parent::__construct($owner);
     $this->plugin = $owner;
     $this->text = $text;
     $this->lobby = $lobby;
 }
Example #7
0
 public function __construct(Plugin $owner, BedWarsGame $Game, Vector3 $Position, $Type)
 {
     parent::__construct($owner);
     $this->Game = $Game;
     $this->Position = $Position;
     switch ($Type) {
         case 'b':
             $this->Type = 336;
             break;
         case 'i':
             $this->Type = 265;
             break;
         case 'g':
             $this->Type = 266;
             break;
         default:
             $this->Type = 1;
             break;
     }
     if (($this->Mode = $owner->spawner_mode) == 0) {
         $this->Position->x = $this->Position->x + 0.5;
         $this->Position->z = $this->Position->z + 0.5;
     } elseif ($this->Mode == 1) {
         if ($this->Game->Level->getBlock($this->Position)->getId() != 54) {
             $this->Game->Level->setBlock($this->Position, Block::get(54, 0), true, true);
         }
         if (!($chest = $this->Game->Level->getTile($this->Position))) {
             $chest = new Chest($this->Game->Level->getChunk($this->Position->getX() >> 4, $this->Position->getZ() >> 4, true), new Compound(false, array(new Int("x", $this->Position->getX()), new Int("y", $this->Position->getY()), new Int("z", $this->Position->getZ()), new String("id", Tile::CHEST))));
             $this->Game->Level->addTile($chest);
         }
     }
 }
Example #8
0
 public function __construct(Main $plugin, $duration)
 {
     parent::__construct($plugin);
     $this->plugin = $plugin;
     $this->duration = $duration;
     $this->current = 0;
 }
Example #9
0
 public function __construct(Main $plugin)
 {
     parent::__construct($plugin);
     $this->plugin = $plugin;
     $this->plugin = $this->getOwner();
     $this->players = array();
 }
 public function __construct(SimpleLogin $owner, EventListener $listener, Player $player)
 {
     parent::__construct($owner);
     $this->player = $player;
     $this->listener = $listener;
     $this->db = PluginData::getInstance();
 }
Example #11
0
 public function __construct(MyPlot $plugin, Plot $plot, Player $issuer = null, $maxBlocksPerTick = 256)
 {
     parent::__construct($plugin);
     $this->offset = 1;
     $this->plotBeginPos = $plugin->getPlotPosition($plot);
     $this->level = $this->plotBeginPos->getLevel();
     $plotLevel = $plugin->getLevelSettings($plot->levelName);
     $plotSize = $plotLevel->plotSize;
     $roadWidth = $plotLevel->roadWidth;
     $halfRoadWidth = round($roadWidth / 2);
     // the road width that concerns this plot
     // mwvent - added offset of half a road width
     $this->plotBeginPos->x -= $halfRoadWidth;
     $this->plotBeginPos->z -= $halfRoadWidth;
     $this->roadWidth = $halfRoadWidth;
     $this->xMax = $this->plotBeginPos->x + $plotSize + $roadWidth + $this->offset;
     // mwvent added roadwidth as part of regen
     $this->zMax = $this->plotBeginPos->z + $plotSize + $roadWidth + $this->offset;
     $this->height = $plotLevel->groundHeight;
     $this->bottomBlock = $plotLevel->bottomBlock;
     $this->plotFillBlock = $plotLevel->plotFillBlock;
     $this->plotFloorBlock = $plotLevel->plotFloorBlock;
     $this->roadBlock = $plotLevel->roadBlock;
     $this->wallBlock = $plotLevel->wallBlock;
     $this->maxBlocksPerTick = $maxBlocksPerTick;
     $this->issuer = $issuer;
     $this->pos = new Vector3($this->plotBeginPos->x, 0, $this->plotBeginPos->z);
 }
Example #12
0
 public function __construct(SimpleWarp $plugin, Warp $warp, Player $player)
 {
     parent::__construct($plugin);
     $this->warp = $warp;
     $this->player = $player;
     $this->position = $player->getPosition();
 }
 public function __construct(Plugin $owner, Item $item, $id)
 {
     parent::__construct($owner);
     $this->plugin = $owner;
     $this->item = $item;
     $this->id = $id;
 }
Example #14
0
 public function __construct($plugin, $cmd)
 {
     $this->plugin = $plugin;
     $this->cmd = $cmd;
     $this->start = false;
     parent::__construct($plugin);
 }
 /**
  * @param Plugin   $owner
  * @param callable $callable
  * @param array    $args
  */
 public function __construct(Plugin $owner, callable $callable, array $args = [])
 {
     parent::__construct($owner);
     $this->callable = $callable;
     $this->args = $args;
     $this->args[] = $this;
 }
Example #16
0
 public function __construct($plugin, callable $callable, array $args = [])
 {
     $this->plugin = $plugin;
     parent::__construct($plugin);
     $this->callable = $callable;
     $this->args = $args;
 }
Example #17
0
 public function __construct(Loader $plugin, $gametime, $waittime)
 {
     $this->plugin = $plugin;
     $this->gametime = $gametime;
     $this->waittime = $waittime;
     parent::__construct($plugin);
 }
Example #18
0
 public function __construct($plugin, $player)
 {
     parent::__construct($plugin);
     $this->player = $player;
     $this->plugin = $plugin;
     $player->sendMessage("Test");
 }
 public function __construct(HelperPlugin $owner, $cfg)
 {
     parent::__construct($owner);
     $this->canary = $cfg["canary-account"];
     if ($owner->auth->isEnabled()) {
         $this->dbm = $owner->auth->getDataProvider();
         $this->ok = true;
         // Assume things are OK...
         if (!$this->pollDB()) {
             // If this fails then canary account doesn't exist yet... create it
             $player = $this->getOwner()->getServer()->getOfflinePlayer($this->canary);
             if ($player === null) {
                 throw new \RuntimeException("canary account definition error!");
                 return;
             }
             $err = $this->dbm->registerPlayer($player, "N/A");
             if ($err === null) {
                 throw new \RuntimeException("Unable to register canary account!");
             }
         }
     } else {
         $this->ok = false;
     }
     $owner->getServer()->getScheduler()->scheduleRepeatingTask($this, $cfg["check-interval"] * 20);
     $owner->getServer()->getPluginManager()->registerEvents($this, $owner);
 }
Example #20
0
 public function __construct($plugin, $player)
 {
     $this->plugin = $plugin;
     parent::__construct($plugin);
     $this->interval = $plugin->interval;
     $this->player = $player;
 }
Example #21
0
 public function __construct(HungerGamesPlugIn $plugin, GameLevelModel $lv, $playerName)
 {
     $this->plugin = $plugin;
     $this->lv = $lv;
     $this->playerName = $playerName;
     parent::__construct($plugin);
 }
Example #22
0
 public function __construct(EconomyUsury $plugin, Item $guarantee, $playerName, $hostOwner)
 {
     parent::__construct($plugin);
     $this->guarantee = $guarantee;
     $this->playerName = $playerName;
     $this->hostOwner = $hostOwner;
 }
Example #23
0
 public function __construct(ExoSuit $plugin, Player $player)
 {
     parent::__construct($plugin);
     $this->plugin = $plugin;
     $this->player = $player;
     $this->energy = $this->plugin->energy[$this->player->getName()];
 }
Example #24
0
 public function __construct(Main $plugin, $gameNumber, $time)
 {
     $this->plugin = $plugin;
     parent::__construct($plugin);
     $this->gameNumber = $gameNumber;
     $this->time = $time;
 }
Example #25
0
 public function __construct(CustomAlerts $plugin)
 {
     parent::__construct($plugin);
     $this->plugin = $plugin;
     $this->plugin = $this->getOwner();
     $this->counter = 0;
 }
Example #26
0
 public function __construct(Plugin $owner, $level, PopupInfo $popupInfo, $mode)
 {
     parent::__construct($owner);
     $this->owner = $owner;
     $this->level = $level;
     $this->popupInfo = $popupInfo;
     $this->mode = $mode;
 }
 /**
  * @param Plugin $plugin
  * @param callable $callback
  * @param mixed[] $args
  * @param callable $onCancel
  * @param mixed[] $cancelArgs
  */
 public function __construct(Plugin $plugin, callable $callback, array $args = [], callable $onCancel = null, array $cancelArgs = [])
 {
     parent::__construct($plugin);
     $this->callback = $callback;
     $this->args = $args;
     $this->onCancel = $onCancel;
     $this->cancelArgs = $cancelArgs;
 }
Example #28
0
 public function __construct(Player $player, Player $target, MineCombat $plugin, $duration)
 {
     parent::__construct($plugin);
     $this->player = $player;
     $this->target = $target;
     $this->duration = $duration;
     $this->currentDuration = 0;
 }
Example #29
0
 public function __construct(Plugin $owner, $Level, PopupInfo $PopupInfo, $Mode)
 {
     parent::__construct($owner);
     $this->owner = $owner;
     $this->Level = $Level;
     $this->PopupInfo = $PopupInfo;
     $this->Mode = $Mode;
 }
Example #30
0
 public function __construct($plugin, $player, $targetWarp = null)
 {
     $this->plugin = $plugin;
     $this->player = $player;
     $this->targetWarp = $targetWarp;
     parent::__construct($plugin);
     $plugin->getServer()->getScheduler()->scheduleTask($this, 2);
 }