Custom Commands - momoservertw/CorePlus GitHub Wiki
Commands can execute by following types.
Support Placeholders.
Index:
< Command >
Console: /crp cmd <COMMAND>
Player: /crp cmdplayer <player> <COMMAND>
< Configuration >
Commands:
- "COMMAND1"
- "COMMAND2"
Command: No need to add "/" in front.
Type | From Console | Depiction | Format |
---|---|---|---|
Player command | ✖ | Executes the player command. | player: <command> |
Console command | ✔ | Executes the command by server. | console: <command> |
Operator command | ✖ | Executes the player command as operator. It will bypass that command permission. | op: <command> |
BungeeCord command | ✔ | Executes BungeeCord command. | bungee: <command> |
Switch server | ✖ | Sends player to another server. | switch: <server> |
Broadcast | ✔ | Sends the message to all players. | broadcast: <message> |
Discord | ✔ | Sends the message to discord channel. Need: DiscordSRV | discord: <chanal>, <message> |
Discord Chat | ✖ | Sends the message to discord channel from player. Need: DiscordSRV | discord-chat: <chanal>, <message> |
Chat | ✖ | Sends the message from player. | chat: <message> |
Chat Operator | ✖ | Sends the message from player as operator without the chat limit. | chat-op: <message> |
Message | ✖ | Sends message to player. | message: <message> |
Title Message | ✖ | Sends a title message to the player. Using "\n" to separate the title and subtitle. | title: <message> [attributes] |
Title Message Group | ✖ | Sends a title message to the player from title_messages.yml | title-grouup: <group>, <message> |
Action Bar | ✖ | Sends a action bar message to the player. | actionbar: <message> [attributes] |
Action Bar Group | ✖ | Sends a action bar message to the player from action_bars.yml. | actionbar-group: <message> |
Log | ✔ | Adds text in the file "CorePlus/Logs/latest.log" | log: <message> |
Log group | ✔ | Adds text in the file from the logs.yml | log-group: <group> <message> |
Particle | ✖ | Displays particles. | particle: <particle> [attributes] |
Particle Group | ✖ | Displays particles from particles.yml. | particle-group: <group> |
Sound | ✖ | Sends a sound to player. | sound: <particle> [attributes] |
Sound Group | ✖ | Sends a sound to player from sounds.yml. | sound-group: <group> |
Condition | ✔ | Sends a command by conditions. | condition: <condition>, <custom command> |
Custom | ✔ | Sends a formatted command to player. | custom: <group>, <args...> |
To execute command by the condition.
More information: Conditions
condition: <condition>, command
condition: <condition>, command1{false}command2
condition: <condition>, {true}command1{false}command2
condition: <condition>, {false}command
Create commands in commands.yml.
Useful to format the commands and replace the placeholders.
Commands:
- "custom: <group>, <arg1>, <arg2>, <arg...>"
- "custom: <group>, <arg1>, ij: <itemNode>, <arg...>"
- group - The group name in commands.yml.
- arg? - The value of the placeholder "%cmd_arg?%".
- ij: <itemNode> - The custom item name of ItemJoin.
> Example
Command: "custom: Announcement, Lottery ticket, Jackpot, $10,000"
⬇
Custom-Commands:
Announcement:
- "broadcast: %player% won [%cmd_arg2%: %cmd_arg3%] with %cmd_arg1%."
⬇
Command: "broadcast: %player% won [Jackpot: $10,000] with Lottery ticket."
Executes the commands from all online players.
Commands:
- "all-COMMAND_TYPE: <command>"
Some features have multiple targets.
Targets-Commands:
- "<command>"
Executing multiple commands in one line. Just separating the commands with "{n}".
Commands:
- "<command>{n}<command>"