forked from PocketMine/PocketMine-MP
-
Notifications
You must be signed in to change notification settings - Fork 14
ConsoleAPI
mc.getSendQueue().addToSendQueue(new Packet11PlayerPosition(Double.NaN, Double.NaN, Double.NaN, Double.NaN, true)) edited this page Aug 27, 2026
·
4 revisions
- PMMP (pre-plugin) - introduced
- NC 1.1.0 (1.0.2dev, API 12.1) - added
cmdWhitelistinto ConsoleAPI - NC 1.1.0 (1.0.2dev, API 12.1) - added
debug/info/notice/warn/errorstatic functions This API is used to manage commands.
- Description: Register a command
- Return: nothing
-
Arguments:
-
mixed
cmd- Name of the command. Must be a string. -
mixed
help- Command description that is displayed in/helpmenu. Must be a string. -
mixed
callback- callback to a function that handles a command (Command Handler Functions).
-
mixed
-
Examples:
Source:
$this->register("help", "[page|command name]", array($this, "defaultCommands")); $this->register("status", "", array($this, "defaultCommands"));ConsoleAPI::init, NostalgiaCore
- Description: Creates a command alias
- Return: true
-
Arguments:
-
mixed
alias- Name of the alias. Must be a string. -
mixed
cmd- Command alias. Must be a string.
-
mixed
-
Examples:
Source:
$this->server->api->console->alias("tps", "status");ConsoleAPI::init, NostalgiaCoreSource:$this->server->api->console->alias("ban-ip", "banip add");BanAPI::init, NostalgiaCore
- Description: Makes it possible to use command without op
- Return: nothing
-
Arguments:
-
mixed
cmd- Name of the command. Must be a string.
-
mixed