Skip to content

CommandEnums 5.46.0 ​

final class · pocketmine\command\parameter\CommandEnums · source

Names and values of the enums shared by the built-in commands. The names are Bedrock's, so plugins describing the same kind of argument can reuse them (enums are shared by name in the command list sent to clients: always use these helpers or CommandParameter factories for these names, so the values match).

Constants ​

BOOLEAN ​

php
public const BOOLEAN = "Boolean"

COMMAND_NAME ​

php
public const COMMAND_NAME = "CommandName"

DIFFICULTY ​

php
public const DIFFICULTY = "Difficulty"

EFFECT ​

php
public const EFFECT = "Effect"

ENCHANT ​

php
public const ENCHANT = "Enchant"

GAME_MODE ​

php
public const GAME_MODE = "GameMode"

ITEM ​

php
public const ITEM = "Item"

Methods ​

difficulties() ​

php
public static function difficulties() : array

effects() ​

php
public static function effects() : array

enchantments() ​

php
public static function enchantments() : array

gameModes() ​

php
public static function gameModes(bool $withDefault = true) : array

Game mode names and letters accepted by /gamemode, including Bedrock's "default" (the server's default game mode) if $withDefault is true.

items() ​

php
public static function items() : array

Vanilla item IDs (without the minecraft: prefix) the server can create.

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