Skip to content

ClearCommand ​

class · pocketmine\command\defaults\ClearCommand · source

Extends VanillaCommand
Implements ExhaustiveOverloads

Methods ​

__construct() ​

php
public function __construct()

countItems() protected ​

php
protected function countItems(array $inventories, ?\pocketmine\item\Item $target) : int

execute() ​

php
public function execute(\pocketmine\command\CommandSender $sender, string $commandLabel, array $args)

/clear [player: target] [item] [maxCount], or Bedrock's /clear [player] [item] [data] [maxCount] (data -1 or 0 matches the item's default variant; other values select a variant, e.g. a potion type).

getOverloads() 5.46.0 ​

php
public function getOverloads() : array

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