Skip to content

CommandOverloadMapper 5.46.0 ​

final class · pocketmine\network\mcpe\convert\CommandOverloadMapper · source

Converts the overloads of ParameterizedCommands into AvailableCommandsPacket overloads.

Methods ​

__construct() ​

php
public function __construct(array $commandNames = [])

commandNames() ​

php
public static function commandNames(array $commands) : array

Values of the "CommandName" enum for a player who can use the given commands: their labels and aliases.

map() ​

php
public function map(\pocketmine\command\Command $command) : array

Overloads of the command: its declared ones (if any) followed by the free-text "args" overload every command accepts, so the client never rejects a syntax the command understands. Commands implementing ExhaustiveOverloads get no free-text overload.

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