Module: command_meta.NOT
Overview
Module
Provides a /NOT <command>
command.
To execute the specified command, and reverse
the return values of SUCCESS
and FAILURE
.
Color Boxes
Note
◉ How it works?
- Execute the
target command
as the command source, and get thecommand return value
.
1.a. If the command return value
represents SUCCESS
(value > 0), then return FAILURE
(value 0).
1.b. If the command return value
represents FAILURE
(value = 0), then return SUCCESS
(value 1).
Example
◉ Use with other predicate
commands.
Issue: /IF NOT has-item? <player> minecraft:apple 16 THEN say You don't have 16 apples. ELSE say You have 16 apples.
Commands
Command
-
Command Syntax:
/NOT <GreedyString command>
-
Document: Execute the command as the console, and reverse the return values of
SUCCESS
andFAILURE
. -
Can be executed by console:
true
-
Required Level Permission:
4
-
Required String Permission:
null