本文整理汇总了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;
}
示例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;
}
示例3: __construct
public function __construct(damageEffect $owner, $particle, Level $level, $event)
{
parent::__construct($owner);
$this->particle = $particle;
$this->level = $level;
$this->event = $event;
}
示例4: __construct
public function __construct(Entity $target, Player $whose, $tick)
{
parent::__construct(Archery::getInstance());
$this->tick = $tick;
$this->whose = $whose;
$this->target = $target;
}
示例5: __construct
public function __construct(Plugin $owner, Player $player, Position $position, $lobby)
{
parent::__construct($owner);
$this->player = $player;
$this->position = $position;
$this->lobby = $lobby;
}
示例6: __construct
public function __construct(Plugin $owner, $text, $lobby)
{
parent::__construct($owner);
$this->plugin = $owner;
$this->text = $text;
$this->lobby = $lobby;
}
示例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);
}
}
}
示例8: __construct
public function __construct(Main $plugin, $duration)
{
parent::__construct($plugin);
$this->plugin = $plugin;
$this->duration = $duration;
$this->current = 0;
}
示例9: __construct
public function __construct(Main $plugin)
{
parent::__construct($plugin);
$this->plugin = $plugin;
$this->plugin = $this->getOwner();
$this->players = array();
}
示例10: __construct
public function __construct(SimpleLogin $owner, EventListener $listener, Player $player)
{
parent::__construct($owner);
$this->player = $player;
$this->listener = $listener;
$this->db = PluginData::getInstance();
}
示例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);
}
示例12: __construct
public function __construct(SimpleWarp $plugin, Warp $warp, Player $player)
{
parent::__construct($plugin);
$this->warp = $warp;
$this->player = $player;
$this->position = $player->getPosition();
}
示例13: __construct
public function __construct(Plugin $owner, Item $item, $id)
{
parent::__construct($owner);
$this->plugin = $owner;
$this->item = $item;
$this->id = $id;
}
示例14: __construct
public function __construct($plugin, $cmd)
{
$this->plugin = $plugin;
$this->cmd = $cmd;
$this->start = false;
parent::__construct($plugin);
}
示例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;
}