-
Notifications
You must be signed in to change notification settings - Fork 2
Function Configuration Document
This is a configuration document for various functions in the custom command configuration file. You can view the options and setting specifications that can be set for each function here.
When a custom command is input or executed, the following preset placeholders will be generated:
-
{length}: will be replaced with the length of the current command's subcommand array, which is how many subcommands there are currently. Example: Assuming this is a command named "/test", when entering or executing "/test subcmd1 subcmd2", "{length}" will be replaced with "2".Executing/Entering Command Placeholder Result "/test" {length} = 0 "/test subcmd1" {length} = 1 "/test subcmd1 subcmd2" {length} = 2 -
[Number]: will be replaced with the content of the subcommand at the specified position. Example: Assuming this is a command named "/test", when entering or executing "/test subcmd1 subcmd2", "[1]" will be replaced with "subcmd1", "[2]" will be replaced with "subcmd2". If you only enter "/test" and there are no subcommands, using a placeholder like "[1]" will not take effect.Executing/Entering Command Placeholder Result "/test subcmd1" [1] = subcmd1 "/test subcmd1 subcmd2" [1] = subcmd1, [2] = subcmd2 -
{main_command}: will be replaced with the current executing main command (when multiple aliases are set for the main command, this placeholder can be used to distinguish which main command was executed) -
{time_millis}: will be replaced with the current system millisecond time -
{sender}: will be replaced with the name of the command executor (if console, it is "CONSOLE") -
{sender_type}: will be replaced with the name of sender type.Sender Type Placeholder Result Server Terminal/Console Console Player Player Command Block CommandBlock Command Block Minecart CommandBlockMinecart
- Description: Each command executor setting 'Command-Executor' itself is a main function that can contain countless branch functions for handling various situations of input commands. Functions can be infinitely nested with consistent specifications.
Special note: Some settings support both YAML array format and object format
The options that can be used in this format are as follows:
Function settings: Messages, Broadcast, Commands, Server-Teleport, Reward-Items, Take-Items, Player-Functions, World-Functions Attribute settings: Conditions, Permission
For example, the Messages option can be in the following two formats:
Messages: 'Hello World'
Messages:
- 'Hello World1'
- 'Hello World2'
-
Functions: (Click to view)
- Send messages:
Messages - Broadcast:
Broadcast - Execute other commands:
Commands - Reward items:
Reward-Items - Take items:
Take-Items - Server teleport:
Server-Teleport - Send titles:
Titles(Can only be used by players) - Send action-bars:
Action-Bars(Can only be used by players) - Play sounds:
Sounds(Can only be used by players) - Set placeholders:
Set-Placeholders(Set or remove a placeholder that can be used anywhere) - Preset player functions:
Player-Functions(More functions provided by Bukkit API with a specific player as an instance) - Preset world function:
World-Functions(More functions provided by Bukkit API with a specific world as an instance) - Compound functions:
Compound-Functions(Put multiple functions into a list for execution) - Sub-functions:
Functions(Use this function as the main function and continue to nest the sub functions further down) - ...Comming soon...
- Send messages:
-
Attributes: (Click to view)
- Function permission:
Permission - Function conditions:
Conditions - Break out of a Functions block:
Break - Function priority:
Priority - Function execution sequence:
Sequence
- Function permission:
- Basic Setting Specification:
Command-Executor:
[FunctionName1]:
(Options...)
[FunctionName2]:
(Options...)
...
- Description: Each TAB Completer setting 'Tab Completer' itself is a main function that can contain countless branch functions, used to recognize the commands already entered in the current command line/chat bar, and return automatically filled content. It will return the merged results of all its recipes as the auto fill content after executing all functions. Functions can be infinitely nested with consistent specifications.
Special note: Some settings support both YAML array format and object format
The options that can be used in this format are as follows:
Function settings: Recipes, Exceptions
Attribute settings: Conditions, Permission
For example, the Recipes option can be in the following two formats:
Recipes: 'HelloWorld'
Recipes:
- 'HelloWorld1'
- 'HelloWorld2'
-
Functions: (Click to view)
- Recipes of TAB result:
Recipes - Exceptions of recipes
Exceptions - Sub-functions
Functions
- Recipes of TAB result:
-
Attributes: (Click to view)
- Function permission:
Permission - Break out of a Functions block:
Break - Function conditions:
Conditions
- Function permission:
- Basic Setting Specification:
Tab-Completer:
[FunctionName1]:
(Options...)
[FunctionName2]:
(Options...)
...
- Description: The messages to be sent when running this function.
- Example:
Command-Executor:
[FunctionName]:
...Another options...
Messages:
- 'Lite&3Command&9Editor &f&l>>> &aThis is the text for examples, which can be single or multiple lines'
...Another options...
- Description: The broadcast to be sent when running this function.
- Example:
Command-Executor:
[FunctionName]:
...Another options...
Broadcast:
- 'Lite&3Command&9Editor &f&l>>> &aThis is the text for examples, which can be single or multiple lines'
...Another options...
- Description: Other commands to be executed when running this function.
- Format: [ExecutionType]:[Command]
"ExecutionType" can be "op", "server", or no write.
- Example:
Command-Executor:
[FunctionName]:
...Another options...
Commands:
- 'server:say hello' #Execute 'say hello' on console.
- 'op:gamemode creative' #Execute the 'gamemode creative' command with OP permission.
- 'spawn' #Execute the 'spawn' command normally.
...Another options...
- Description: The title message sent to the command executor (must be a player) when running this function.
According to the specifications set for a single title, multiple title messages can be sent in a top-down order.
- Function Specification:
Command-Executor:
[FunctionName]:
...Another options...
Titles:
- ...Title1...
- ...Title2...
- ...Title3...
...Another options...
- Title Specification:
Titles:
#The following are the specifications for setting the title message.
#The main-title and sub-title are mandatory option, while the rest are optional.
#Multiple title messages can be sent by using a "-" symbol as a separator before them.
- Title: '&dThis is title'
Sub-Title: '&bThis is sub-title'
Delay: 1.0 #Delay time (Unit: second)
Fade-In: 1.0 #Fade in time (Unit: second)
Stay: 5.0 #Stay time (Unit: second)
Fade-Out: 1.0 #Fade out time (Unit: second)
- Example:
Titles:
- Title: '&aTitle1'
Sub-Title: '&aSub-title1'
Delay: 0.4
- Title: '&aTitle2'
Sub-Title: '&bSub-title2'
Delay: 0.4
- Title: '&aTitle3'
Sub-Title: '&cSub-title3'
Delay: 0.4
- Title: '&aTitle4'
Sub-Title: '&dSub-title4'
Delay: 0.4
- Title: '&aTitle5'
Sub-Title: '&eSub-title5'
Delay: 0.4
- Description: The action-bar message sent to the command executor (must be a player) when running this function.
According to the specifications set for a single action-bar, multiple action-bars can be sent in a top-down order.
- Function Specification:
Command-Executor:
[FunctionName]:
...Another options...
Action-Bars:
- ...ActionBar1...
- ...ActionBar2...
- ...ActionBar3...
...Another options...
- Action-Bars Specification:
Action-Bars:
#The following are the specifications for setting the action-bar message.
#Multiple action-bars can be sent by using a "-" symbol as a separator before them.
- Text: '&dThis is a example text.'
Delay: 0.4 #Delay time (Unit: second)
- Example:
Action-Bars:
- Text: '&aActionBar1'
Delay: 0.4
- Text: '&bActionBar2'
Delay: 0.4
- Text: '&cActionBar3'
Delay: 0.4
- Text: '&dActionBar4'
Delay: 0.4
- Text: '&eActionBar5'
Delay: 0.4
- Description: The sounds sent to the command executor (must be a player) when running this function.
According to the specifications set for a sound, multiple sounds can be sent in a top-down order.
If there is no delay between sounds, multiple sounds will repeat and the same sound will increase the volume.
-
Sound list:
Click Here - Function Specification:
Command-Executor:
[FunctionName]:
...Another options...
Sounds:
- ...Sound1...
- ...Sound2...
- ...Sound3...
...Another options...
- Sound Specification:
Sounds:
#The following are the specifications for setting the sound.
#The sound are mandatory option, while the rest are optional.
#Multiple sounds can be sent by using a "-" symbol as a separator before them.
- Sound: UI_TOAST_CHALLENGE_COMPLETE
Delay: 1.0 #Delay time (Unit: second)
Pitch: 1.0
Volume: 1.0
Broadcast: false #Can everyone hear it.
- Example:
Sounds:
- Sound: ENTITY_EXPERIENCE_ORB_PICKUP
Delay: 0.4
- Sound: ENTITY_EXPERIENCE_ORB_PICKUP
Delay: 0.4
- Sound: ENTITY_EXPERIENCE_ORB_PICKUP
Delay: 0.4
- Sound: ENTITY_EXPERIENCE_ORB_PICKUP
Delay: 0.4
- Sound: ENTITY_EXPERIENCE_ORB_PICKUP
Delay: 0.4
- Description: When running this function, reward the command executor (must be a player) or other players with items.
-
Format:
[ItemID]or[ItemID]:[Amount]or[ItemID]:[Amount]:[TargetPlayer]-
[ItemID]can be the ID of an item or the name of an item in the ItemCollection. -
[Amount][Amount] can be a range value, generate a random number within a range in the format of [minimum-maximum]. For example, [1-32] refers to randomly giving 1 to 32 items. -
[TargetPlayer]can be a placeholder that is replaced with the player's name when the function executed. - Usage: "/litecommandeditor itemcollection create" can add the item in hand to ItemCollection with a specified name.
-
Note: For versions below 1.12.2, due to some items having special values, [ItemID] can be written as [ItemID-SpecialValue].
For example, the Golden Apple and the Enchanted Golden Apple are both GOLDEN_APPLE, but the regular Golden Apple has a special value of 0 and the enchanted Golden Apple has a special value of 1.
-
Item IDs:
Click Here - Function Specification:
Command-Executor:
[FunctionName]:
...Another options...
Reward-Items:
- ...Item1...
- ...Item2...
- ...Item3...
...Another options...
- Example:
Reward-Items:
- 'DIAMOND' #Give 1 diamond to the command sender
- 'APPLE:32' #Give 32 apple to the command sender
- 'EMERALD:10:Steve' #Give 10 emerald to Steve
- 'BREAD:16-32:Steve' #Randomly give 16 - 32 breads to Steve.
- 'Earth' #Give an item named Earth to the command sender (provided that there is indeed an item named Earth in the item collection)
- Description: When running this function, take items from the command executor (must be a player) or other players.
-
Format:
[ItemID]or[ItemID]:[Amount]or[ItemID]:[Amount]:[TargetPlayer]-
[ItemID]can be the ID of an item or the name of an item in the ItemCollection. -
[Amount][Amount] can be a range value, generate a random number within a range in the format of [minimum-maximum]. For example, [1-32] refers to randomly giving 1 to 32 items. -
[TargetPlayer]can be a placeholder that is replaced with the player's name when the function executed. - Usage: "/litecommandeditor itemcollection create" can add the item in hand to ItemCollection with a specified name.
-
Note: For versions below 1.12.2, due to some items having special values, [ItemID] can be written as [ItemID-SpecialValue].
For example, the Golden Apple and the Enchanted Golden Apple are both GOLDEN_APPLE, but the regular Golden Apple has a special value of 0 and the enchanted Golden Apple has a special value of 1.
-
Item IDs:
Click Here - Function Specification:
Command-Executor:
[FunctionName]:
...Another options...
Take-Items:
- ...Item1...
- ...Item2...
- ...Item3...
...Another options...
- Example:
Take-Items:
- 'DIAMOND' #Take 1 diamond from the command sender
- 'APPLE:32' #Take 32 apple from the command sender
- 'EMERALD:10:Steve' #Take 10 emerald from Steve
- 'BREAD:16-32:Steve' #Randomly take 16 - 32 breads from Steve
- 'Earth' #Take an item named Earth from the command sender (provided that there is indeed an item named Earth in the item collection)
- Description: When running this function, transmitted the command executor (must be a player) or other players to another server.
-
Format:
[ServerName]or[ServerName]:[TargetPlayer]
can be the name of an online player, or "[all]" meaning all online players.
Note: The current server must be in a BungeCord or Velocity proxy environment for this function to take effect
- Function Specification:
Command-Executor:
[FunctionName]:
...Another options...
Server-Teleport:
- ...Server1...
...Another options...
- Example:
Server-Teleport:
- 'Lobby' #Transfer the command executor to the Lobby server
- 'Lobby:Steve' #Transfer Steve to the Lobby server
- 'Lobby:[1]' #Transfer the player specified in the first sub command to the Lobby server
- 'Lobby:[all]' #Transfer all online players to the Lobby server
- Description: Set or remove a placeholder.
The placeholders here can be used anywhere and will not be cleared after the command execution is completed.
-
Format: Set:
[Key]:[Value]| Remove:[Key]:null- [Key] is the name of the placeholder, for example, if you set a key name called example, then the placeholder name is {example}
- [Value] is the content of a placeholder, which can be another placeholder that will be automatically replaced with the corresponding content of this article when used.
- [Key] and [Value] can both use other placeholders. However, note that the placeholders in [Key] are replaced when set, while [Value] is replaced only when the placeholder are in use.
- Note: You can use "HasPlaceholder:[KeyName]" in the Conditions settings to determine if a key name with the specified name exists in the current placeholder list.
- Function Specification:
Command-Executor:
[FunctionName]:
...Another options...
Set-Placeholders:
- [Key1]:[Value]
- [Key2]:[Value]
- [Key3]:[Value]
...Another options...
- Example:
Set-Placeholders:
- 'example_1': 'tesst' #Refers to setting a placeholder named {example_1} with the value of "test".
- 'example_2': '[Sender] {sender}' #{sender} will be replaced to sender's name. Therefore, the value of {example_2} will be replaced with "Sender [SenderName]" when using placeholder.
- 'example_1': null #Delete a placeholder named {example_1}
- Description: More functions provided by Bukkit API with a specific player as an instance.
-
Format:
[FunctionName]:[Player]:[Options]... -
Functions:
Click Here - Function Specification:
Command-Executor:
[FunctionName]:
...Another options...
Player-Functions:
- ...PlayerFunction1...
- ...PlayerFunction2...
- ...PlayerFunction3...
...Another options...
- Example:
Player-Functions:
- 'SetAllowFlight:{sender}:true' #Set the flight mode of the command executor (if a player) to on.
- 'SetDisplayName:{sender}:[Flying] {sender}' #Set the display name of the command executor (if a player) to: "[Flying] PlayerName"
- Description: More functions provided by Bukkit API with a specific world as an instance.
-
Format:
[FunctionName]:[WorldName]:[Options]... -
Functions:
Click Here - Function Specification:
Command-Executor:
[FunctionName]:
...Another options...
World-Functions:
- ...WorldFunction1...
- ...WorldFunction2...
- ...WorldFunction3...
...Another options...
- Example:
World-Functions:
- 'SetSpawnLocation:world:0:0:0' #Set the spawn location of the world "world"(World name) at positions x=0, y=0, and z=0
- 'SetDifficulty:world:PEACEFUL' #Set the difficulty of the world "world"(World name) to "Peaceful"
- Description: Put multiple functions into a list for execution.
Due to the fact that each function can only be executed once in a single function module by default, using compound functions allows the same function to run multiple times in sequence within a function module.
- Function Specification:
Command-Executor:
[FunctionName]:
...Another options...
Compound-Functions:
- Type: [FunctionType]
...Another options...
- Type: [FunctionType]
...Another options...
- Type: [FunctionType]
...Another options...
...Another options...
-
Function Types:
Type Action Delay Delay time (Unit: second) MESSAGE Send messages BROADCAST Broadcast COMMAND Execute other commands TITLE Send title messages ACTION_BAR Send action-bars SOUND Play sounds REWARD_ITEM Reward items TAKE_ITEM Take items SERVER_TELEPORT Server teleport PLAYER_FUNCTION Execute player functions WORLD_FUNCTION Execute world functions - Example:
Compound-Functions:
- Type: MESSAGE
Messages:
- 'This is a example text'
- Type: DELAY
Delay: 1.0
- Type: BROADCAST
Broadcast:
- 'This is a example text'
- Type: DELAY
Delay: 1.0
- Type: COMMAN
Commands:
- 'server:say This is a example command'
- Type: DELAY
Delay: 1.0
- Type: TITLE
Title: 'Example Title'
Sub-Title: 'Sub title'
Stay: 5
- Type: DELAY
Delay: 1.0
- Type: ACTION_BAR
Text: 'Example action bars'
- Type: DELAY
Delay: 1.0
- Type: SOUND
Sound: ENTITY_EXPERIENCE_ORB_PICKUP
Pitch: 1.0
Volume: 1.0
- Type: DELAY
Delay: 1.0
- Type: SERVER_TELEPORT
Server-Teleport: 'Lobby'
- Type: DELAY
Delay: 1.0
- Type: REWARD_ITEM
Reward-Item: 'DIAMOND'
- Type: DELAY
Delay: 1.0
- Type: TAKE_ITEM
Take-Item: 'DIAMOND'
- Type: DELAY
Delay: 1.0
- Type: PLAYER_FUNCTION
Player-Function: 'Chat:{sender}:This is a example text.'
- Type: DELAY
Delay: 1.0
- Type: WORLD_FUNCTION
World-Function: 'SetDifficutly:world:PEACEFUL'
- Type: DELAY
Delay: 1.0
This option can be used in both Command-Executor and TAB-Completer, with consistent formatting
- Description: Using this function as the parent function, continue to nest the sub-functions further down.
- Function Specification / Example:
#First layer function:
Command-Executor:
'Parent-function1':
#Second layer function
Functions:
'Sub-function1':
#Third layer function
Functions:
...Unlimited options...
'Sub-function2':
#Third layer function
Functions:
...Unlimited options...
'Parent-function2':
#Second layer function
Functions:
'Sub-function1':
#Third layer function
Functions:
...Unlimited options...
'Sub-function2':
#Third layer function
Functions:
...Unlimited options...
#Same format as above
Tab-Completer: {}
- Example:
#Assuming this is a command called "/test"
#First layer function:
Command-Executor:
'Main':
Conditions:
- '{length} == 0'
Break: true
Messages:
- 'This is the main function, only "/test" is written.'
'SubCommands':
Conditions:
- '{length} >= 1'
#Second layer function.
Functions:
'test1':
Conditions:
- '[1] == help'
Break: true
Messages:
- 'This is the first function of the second layer function,and accroding to conditions,this function will only be executed when writing "/test help".'
'test2':
Conditions:
- '[1] == say'
Break: true
Commands:
- 'server:say This is the second function of the second layer function,and accroding to conditions,this function will only be executed when writing "/test say".'
'Default':
Messages:
- 'This is the third function of the second layer function. When the input command does not meet the above functions, this default function will be executed.'
#Same format as above
Tab-Completer: {}
This option can be used in both Command-Executor and TAB-Completer, with consistent formatting
- Description: The permission required for the command executor to execute this function.
-
Format:
Permission: [Permission/Permission List] - Function Specification:
Command-Executor:
'Function1':
Permission: litecommandeditor.example.permission
...Another options...
#Same format as above
Tab-Completer: {}
This option can be used in both Command-Executor and TAB-Completer, with consistent formatting
- Description: After running the current function, no other functions after it will be executed
Note: As all functions under the same function module will be executed in top-down order, if this option is enabled, the current function module will stop after executing the current function. Mainly used in conjunction with the 'Conditions' setting.
-
Format:
Break: [true/false] - Function Specification:
Command-Executor:
#Assuming the name of this command is "/test"
'Function1':
#If first sub-command equal to 'rightcommand'
Conditions:
- '[1] == rightcommand'
Break: true #When the condition is met, the function module will be interrupted here.
Messages:
- 'This is the message of the command "/test rightcommand"'
'Function2':
Messages:
- 'Your command is incorrect!'
#Same format as above
Tab-Completer: {}
- Description: Priority used to adjust the execution sequence of function module.
The default priority value for all functions is 0. When the priority of functions under the same module is the same, a top-down priority will be taken.
On the contrary, the higher the priority value, the earlier the execution sequence.
-
Format:
Priority: [Number](Must be a integer) - Function Specification:
In the current settings, the sequence of function execution is 1. "Function1", 2. "Function2", 3. "Function3"
Command-Executor:
'Function1':
...Another options...
'Function2':
...Another options...
'Function3':
...Another options...
In the current settings, the sequence of function execution is 1. "Function3", 2. "Function2", 3. "Function1"
Command-Executor:
'Function1':
Priority: 1
...Another options...
'Function2':
Priority: 2
...Another options...
'Function3':
Priority: 3
...Another options...
- Description: Adjust the sequence of functions in the module.
-
Types:
Type Function SET_PLACEHOLDERS Set placeholders MESSAGE Send messages BROADCAST Broadcast COMMAND Execute other commands TITLE Send title messages ACTIONBAR Send action-bars SOUND Play sounds REWARD_ITEM Reward items TAKE_ITEM Take items SERVER_TELEPORT Server teleport PLAYER_FUNCTIONS Execute player functions WORLD_FUNCTIONS Execute world functions COMPOUND_FUNCTION Compound functions FUNCTION Sub-functions - Function Specification:
When this option is not set, the default function execution sequence of the plugin is consistent with the following settings:
Command-Executor:
'Function':
Sequence:
- SET_PLACEHOLDERS
- MESSAGE
- BROADCAST
- COMMAND
- TITLE
- ACTIONBAR
- SOUND
- REWARD_ITEM
- TAKE_ITEM
- SERVER_TELEPORT
- PLAYER_FUNCTIONS
- WORLD_FUNCTIONS
- COMPOUND_FUNCTION
- FUNCTION
...Another options...
When this option is set, the execution sequence of functions within the module will follow the sequence of this list (note that if the corresponding function name is not filled in, even if the function exists, it will not execute!)
Command-Executor:
#After set
'Function1':
Sequence:
- 'BROADCAST'
- 'MESSAGE'
Messages:
- 'This is the message for function 1, which will be sent after broadcasting.'
Broadcast:
- 'This is the broadcast of function 1, which will be sent first.'
#Before set
'Function2':
Messages:
- 'This is the message for function 2, which will be sent first.'
Broadcast:
- 'This is the broadcast of function 2, which will be broadcasted after sending the message.'
This option can be used in both Command-Executor and TAB-Completer, with consistent formatting
- Description: The conditions that need to be met while executing this function.
- Important: Preset Placeholders
-
Special note: By default, all spaces in conditional expressions will be removed. If the expression requires spaces, please wrap the string in double quotes.
Example:- Hello World! -> HelloWorld!
- Hello "The World"! -> HelloThe World!
-
Condition List: (Click to view details)
Action Condition Name Comparison object Comparison Has items HasItem Number attributes Number Has permissions Permission Has placeholders HasPlaceholder Regular expression matcher Matcher Player attributes Player Document World attributes World Document - Function Specification:
Command-Executor:
'Function1':
Conditions:
- ...Condition1...
- ...Condition2...
- ...Condition3...
...Another options...
Tab-Completer:
'Function1':
Conditions:
- ...Condition1...
- ...Condition2...
- ...Condition3...
...Another options...
-
List of logical operation symbols:
In single line condition setting, multiple conditions can be set and logical operation symbols can be used between them to define their correlation.
If multiple line conditions are set, it is equivalent to a logical AND, meaning that the function can only be executed if all multiple line conditions are true.Symbol Action && True when the conditions on both sides are true || True when one of the conditions on both sides is true -
List of logical judgement symbols:
In a single condition, logical judgment symbols can be used to determine the relationship between two objects.Symbol Action > Determine if the number on the left is greater than the number on the right < Determine if the number on the left is smaller than the number on the right >= Determine if the number on the left is greater than or equal to the number on the right <= Determine if the number on the left is smaller than or equal to the number on the right == Check if the text on both sides is the same (ignore capitalization, if it is a number, check if the numbers are equal) != Check if the text on both sides is different (ignore capitalization, if it is a number, check if the numbers are unequal) === Check if the text on both sides is exactly the same (if it is a number, check if the numbers are equal) !== Check if the text on both sides is not exactly the same (if it is a number, check if the numbers are unequal) - Example:
#This is the default condition type
Conditions:
- '{length} == 1' #Determine if the current number of sub commands is 1
- '[1] == testcmd' #Check if the first subcommand is testcmd
- '[1] != testcmd' #Check if the first subcommand is not testcmd
- '[1] > 2024' #Determine if the first sub command is greater than 2024
- '[1] < 2024' #Determine if the first sub command is smaller than 2024
- '[1] >= 2024' #Determine if the first sub command is greater than or equal to 2024
- '[1] <= 2024' #Determine if the first sub command is smaller than or equal to 2024
- '[1] === TestCmd' #Check if the first subcommand is testcmd (case matching)
- '[1] !== TestCmd' #Check if the first subcommand is not testcmd (case matching)
- '{length} > 1 && [1] == testcmd' #Check if the current number of sub commands is greater than 1 and if the first sub command is testcmd
- '{sender_type} == Console || Permission:examplecommand.use' #Determine whether the command sender is console or has permission examplecommand.use
#Format: "HasItem:[ItemID]:[Amount]:[TargetPlayer]" or "HasItem:[ItemID-SpecialValue]:[Amount]:[TargetPlayer]"
#[ItemID] can be the ID of an item or **the name of an item in the ItemCollection**.
#[Amount] must be a integer.
#[Target] can be a placeholder that is replaced with the player's name when the function executed.
#Usage: "/litecommandeditor itemcollection create" can add the item in hand to ItemCollection with a specified name.
#Add the symbol '!' at the forefront of the format It can make the judgment result opposite. For example, if 'HasItem:XXX' is used to determine if it exists, then '!HasItem:XXX'is used to determine whether there is none.
#Note: For versions below 1.12.2, due to some items having special values, [ItemID] can be written as [ItemID-SpecialValue].
#For example, the Golden Apple and the Enchanted Golden Apple are both GOLDEN_APPLE, but the regular Golden Apple has a special value of 0 and the enchanted Golden Apple has a special value of 1.
Conditions:
- 'HasItem:DIAMOND:1' #Check if the command executor has a diamond (if it is not a command executed by the player, it is judged as not meeting the condition)
- 'HasItem:DIAMOND:1:Steve' #Check if Steve has a diamond
- 'HasItem:EARTH:1:Steve' #Check if Steve has a item EARTH from ItemCollection.
- 'HasItem:GOLDEN_APPLE-1:1:Steve' #Check if player Steve has an Enchanted Golden Apple (version 1.12.2 and below)
- '!HasItem:DIAMOND:1' #Check if the command executor has no diamonds
#Format: "Number:[Text]:[Attribute]"
#[Attribute] as follow:
# IsInteger - Is it an integer (i.e. without decimals, ranging from -2147483648 to 2147483648, or -2^31 to (2^31)-1 )
# IsLong - Is it a long integer (i.e. without decimals, ranging from -9223372036854775807 to 9223372036854775807, or -2^63 to (2^63)-1 )
# IsFloat - Is it a single precision floating-point number (including decimals, ranging from 2^-127 to 2^127 )
# IsDouble - Is it a double precision floating-point number (including decimals, ranging from 2^-1024 to 2^1024)
# IsByte - Is it a byte (integer, ranging from -128 to 127, or 2^-7 to (2^7)-1 )
#Add the symbol '!' at the forefront of the format It can make the judgment result opposite.
Conditions:
- 'Number:[1]:IsInteger' #Determine if the first subcommand is an integer
- 'Number:[1]:IsLong' #Determine if the first subcommand is a long integer
- 'Number:[1]:IsFloat' #Determine if the first subcommand is a single precision floating-point number
- 'Number:[1]:IsDouble' #Determine if the first subcommand is a double precision floating-point number
- 'Number:[1]:IsByte' #Determine if the first subcommand is a byte
- '!Number:[1]:IsDouble' #Determine if the first subcommand is not a number
#Format: "Permission:[Permission]:[TargetPlayer]"
#Add the symbol '!' at the forefront of the format It can make the judgment result opposite.
Conditions:
- 'Permission:litecommandeditor.example' #Determine if the command executor has litecommandeditor.example permission
- 'Permission:litecommandeditor.example:Steve' #Determine if Steve has litecommandeditor.example permission
- 'Permission:litecommandeditor.example:[1]' #Determine if the player specified in the first subcommand has litecommanddedditor.example permission
- '!Permission:litecommandeditor.example' #Determine if the command executor does not have litecommandeditor.example permission
#Format: "HasPlaceholder:[PlaceholderName]"
#Check if the specified placeholder exists in the current placeholder list (can be used in conjunction with the function "Set-Placeholders")
#Add the symbol '!' at the forefront of the format It can make the judgment result opposite.
Conditions:
- 'HasPlaceholder:test' #Determine if there is a placeholder named {test} in the current environment
- 'HasPlaceholder:[1]' #Determine if there is a placeholder specified by the first subcommand in the current environment
- '!HasPlaceholder:test' #Determine if there is no placeholder named {test} in the current environment
#Format: "Matcher:[RegularExpression]:[Text]"
#Used to match whether the text conforms to regular expressions.
#Add the symbol '!' at the forefront of the format It can make the judgment result opposite.
Conditions:
- 'Matcher:[a-zA-Z0-9]{5}:MineCraft' #Determine whether "Minecraft" conforms to the regular expression "[a-zA-Z0-9]{5}" (the result is true)
- '!Matcher:[a-zA-Z0-9]{5}:MineCraft' #Determine whether "Minecraft" not conforms to the regular expression "[a-zA-Z0-9]{5}" (the result is true)
#Format: "Player:[Name]:[Attributes]"
#Add the symbol '!' at the forefront of the format It can make the judgment result opposite.
Conditions:
- 'Player:[1]' #Determine whether the player specified in the first sub command is online
- 'Player:[1]:IsFlying' #Determine whether the player specified in the first sub command is in a flying state
- '!Player:[1]' #Determine whether the player specified in the first sub command is offline
#Format: "World:[Name]:[Attributes]"
#Add the symbol '!' at the forefront of the format It can make the judgment result opposite.
Conditions:
- 'World:[1]' #Determine whether the world specified by the first sub command exists
- 'World:[1]:PVP' #Determine whether the world specified by the first sub command supports PVP
- '!World:[1]' #Determine whether the world specified by the first sub command not exists
- Description: Recipes of TAB result
-
Preset recipes:
- Text:
'[Text]'(It can be fixed text or a placeholder) - Online player list:
'players:[all/RegularExpression]'([all] refers to returning the names of all online players) - Item IDs:
'items:[all/RegularExpression]'([all] refers to returning the names of all Item IDs) - Sound IDs:
'sounds:[all/RegularExpression]'([all] refers to returning the names of all Sound IDs) - Inherit the recipe of the specified command:
'commands:[Command](Copy the TAB content of the specified command)
- Text:
- Function Specification:
Tab-Completer:
'[Function1]':
Recipes:
- ...Content1...
- ...Content2...
- ...Content3...
- Example:
#The following content will appear in the TAB list after merging when the command executor enters the command
Recipes:
- 'subcmd1' #Return fixed text subcmd1
- 'subcmd2' #Return fixed text subcmd2
- '{sender}' #Return sender name
- 'players:[all]' #Return the names of all online players (note to add [] to all)
- 'players:Steve' #Return the names of all online players that contain the five letters 'Steve' in their names
- 'players:[a-zA-Z0-9_]{7}' #Return player names with a length of 7 characters from all online player names (which can also be other regular expressions, here are only three examples)
- 'items:[all]' #Return all item IDs
- 'sounds:[all]' #Return all sound IDs
- 'commands:version ' #Return the TAB content when '/version ' is entered.
- Description: Delete the specified content in the recipes
- Function Specification:
Tab-Completer:
'[Function1]':
Exceptions:
- ...Content1...
- ...Content2...
- ...Content3...
- Example:
#Assuming that the recipes settings include the following contents
Recipes:
- 'players:[all]' #Return the names of all online players
Exceptions:
- '{sender}' #Delete the name of the command executor from the recipes, which is the name of all players except for the command executor