Skip to content

VanillaCommand ​

abstract class · pocketmine\command\defaults\VanillaCommand · source

Extends Command
Implements ParameterizedCommand

Constants ​

MAX_COORD ​

php
public const MAX_COORD = 30000000

MIN_COORD ​

php
public const MIN_COORD = -30000000

Methods ​

fetchPermittedEntityTargets() 5.46.0 protected ​

php
protected function fetchPermittedEntityTargets(\pocketmine\command\CommandSender $sender, ?string $target, string $selfPermission, string $otherPermission) : array

Like fetchPermittedPlayerTargets(), but the targets may be any entities (selectors like @e[type=cow]).

fetchPermittedPlayerTarget() protected ​

php
protected function fetchPermittedPlayerTarget(\pocketmine\command\CommandSender $sender, ?string $target, string $selfPermission, string $otherPermission) : ?\pocketmine\player\Player

Resolves a single player target (a player name or a selector matching one player), or the sender if no target is given, and checks the self/other permission.

fetchPermittedPlayerTargets() 5.46.0 protected ​

php
protected function fetchPermittedPlayerTargets(\pocketmine\command\CommandSender $sender, ?string $target, string $selfPermission, string $otherPermission) : array

Resolves player targets (a player name or a target selector), or the sender if no target is given, and checks the self/other permissions (both when the targets include the sender and other players). Returns an empty array if the sender lacks a permission (after telling them). Selector errors throw a TargetSelectorException, which the command map shows to the sender.

getBoundedInt() protected ​

php
protected function getBoundedInt(\pocketmine\command\CommandSender $sender, string $input, int $min, int $max) : ?int

getDouble() protected ​

php
protected function getDouble(\pocketmine\command\CommandSender $sender, string $value, float $min = self::MIN_COORD, float $max = self::MAX_COORD) : float

getInteger() protected ​

php
protected function getInteger(\pocketmine\command\CommandSender $sender, string $value, int $min = self::MIN_COORD, int $max = self::MAX_COORD) : int

getOverloads() 5.46.0 ​

php
public function getOverloads() : array

Overloads advertised to clients; none by default (the command is sent as taking free text).

getRelativeDouble() protected ​

php
protected function getRelativeDouble(float $original, \pocketmine\command\CommandSender $sender, string $input, float $min = self::MIN_COORD, float $max = self::MAX_COORD) : float

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.