當前位置: 首頁>>代碼示例>>PHP>>正文


PHP scheduler\PluginTask類代碼示例

本文整理匯總了PHP中pocketmine\scheduler\PluginTask的典型用法代碼示例。如果您正苦於以下問題:PHP PluginTask類的具體用法?PHP PluginTask怎麽用?PHP PluginTask使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了PluginTask類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 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;
 }
開發者ID:WonderlandPE,項目名稱:CTFPE,代碼行數:7,代碼來源:kickTask.php

示例2: __construct

 /**
  * @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;
 }
開發者ID:legoboy0215,項目名稱:LegionPE-Theta-Base,代碼行數:15,代碼來源:Queue.php

示例3: __construct

 public function __construct(damageEffect $owner, $particle, Level $level, $event)
 {
     parent::__construct($owner);
     $this->particle = $particle;
     $this->level = $level;
     $this->event = $event;
 }
開發者ID:nesgohood,項目名稱:PMMP-Plugins,代碼行數:7,代碼來源:EventCheckTask.php

示例4: __construct

 public function __construct(Entity $target, Player $whose, $tick)
 {
     parent::__construct(Archery::getInstance());
     $this->tick = $tick;
     $this->whose = $whose;
     $this->target = $target;
 }
開發者ID:HelloWorld017,項目名稱:ToAruArcher,代碼行數:7,代碼來源:SafeBurnThread.php

示例5: __construct

 public function __construct(Plugin $owner, Player $player, Position $position, $lobby)
 {
     parent::__construct($owner);
     $this->player = $player;
     $this->position = $position;
     $this->lobby = $lobby;
 }
開發者ID:Edwardthedog2,項目名稱:SpleefPE,代碼行數:7,代碼來源:Teleport.php

示例6: __construct

 public function __construct(Plugin $owner, $text, $lobby)
 {
     parent::__construct($owner);
     $this->plugin = $owner;
     $this->text = $text;
     $this->lobby = $lobby;
 }
開發者ID:Edwardthedog2,項目名稱:SpleefPE,代碼行數:7,代碼來源:Wait.php

示例7: __construct

 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);
         }
     }
 }
開發者ID:SuperAdam47,項目名稱:BedWarsPE,代碼行數:32,代碼來源:SpawnerTask.php

示例8: __construct

 public function __construct(Main $plugin, $duration)
 {
     parent::__construct($plugin);
     $this->plugin = $plugin;
     $this->duration = $duration;
     $this->current = 0;
 }
開發者ID:BB3900YT,項目名稱:PopupDisplayer,代碼行數:7,代碼來源:Task.php

示例9: __construct

 public function __construct(Main $plugin)
 {
     parent::__construct($plugin);
     $this->plugin = $plugin;
     $this->plugin = $this->getOwner();
     $this->players = array();
 }
開發者ID:EvolSoft,項目名稱:InvisibleLogin,代碼行數:7,代碼來源:PlayerTask.php

示例10: __construct

 public function __construct(SimpleLogin $owner, EventListener $listener, Player $player)
 {
     parent::__construct($owner);
     $this->player = $player;
     $this->listener = $listener;
     $this->db = PluginData::getInstance();
 }
開發者ID:organization,項目名稱:SimpleLogin,代碼行數:7,代碼來源:timeoutKickTask.php

示例11: __construct

 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);
 }
開發者ID:mwvent,項目名稱:WattzMCPE-MyPlot,代碼行數:28,代碼來源:ClearPlotTask.php

示例12: __construct

 public function __construct(SimpleWarp $plugin, Warp $warp, Player $player)
 {
     parent::__construct($plugin);
     $this->warp = $warp;
     $this->player = $player;
     $this->position = $player->getPosition();
 }
開發者ID:TBNRFrags2468,項目名稱:Economy,代碼行數:7,代碼來源:PlayerWarpTask.php

示例13: __construct

 public function __construct(Plugin $owner, Item $item, $id)
 {
     parent::__construct($owner);
     $this->plugin = $owner;
     $this->item = $item;
     $this->id = $id;
 }
開發者ID:JiangsNetworkAlpha,項目名稱:FireCracka,代碼行數:7,代碼來源:ExplodeCracker.php

示例14: __construct

 public function __construct($plugin, $cmd)
 {
     $this->plugin = $plugin;
     $this->cmd = $cmd;
     $this->start = false;
     parent::__construct($plugin);
 }
開發者ID:ecoron,項目名稱:TimeCommander,代碼行數:7,代碼來源:TimeCommand.php

示例15: __construct

 /**
  * @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;
 }
開發者ID:DWWf,項目名稱:pocketmine-plugins,代碼行數:12,代碼來源:PluginCallbackTask.php


注:本文中的pocketmine\scheduler\PluginTask類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。