当前位置: 首页>>代码示例>>PHP>>正文


PHP PluginTask::__construct方法代码示例

本文整理汇总了PHP中pocketmine\scheduler\PluginTask::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP PluginTask::__construct方法的具体用法?PHP PluginTask::__construct怎么用?PHP PluginTask::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pocketmine\scheduler\PluginTask的用法示例。


在下文中一共展示了PluginTask::__construct方法的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::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。