Download Shortcut — Minecraft Mods — MetaMods

Shortcut

Active

Downloads

0

Last update

2 years ago

Versions

1.20 — 1.20.2
Server
Control

Shortcut

Shortcut is a Minecraft plugin that allows you to create custom command shortcuts without needing additional modules.

Important information: The plugin is completely safe when using the /reload command. All commands will be properly disabled and restored according to configuration changes.

Plugin Configuration

Each command is individually configured through a YAML configuration file. Here's the basic structure:

# Command name that will be used in-game (e.g., /command_name)
command_name:
  # Optional permission - any text
  # Without this permission, the command is unavailable
  permission: example.permission
  # Optional: players only
  # For non-players, the command will end immediately
  playerOnly: false
  # Optional: command usage description
  usage: /command_name <value>
  # Main block defining command actions
  executions:
    - {
        # Command to execute
        # %%0 is replaced with first argument, %%1 - with second, etc.
        # Placeholders can be used
        run: say %%0,
        # Who to execute the command as
        # Valid values: "sender" or "console"
        as: sender
    }
    - {
        # Message that the user will see
        # Supports formatting and placeholders
        display: Example message with §aformatting!
    }

Practical Example

Configuration example for "gmc" command:

This example uses placeholders - make sure you have PlaceHolderAPI installed if you want to use them

# Command name
gmc:
  # Required permission
  # Does not bypass original command checks!
  # Placeholders don't work here
  permission: command.gamemode
  # Players only
  # Placeholders don't work here
  playerOnly: true
  # Message for invalid usage
  # Placeholders don't work here
  usage: /gmc
  executions:
    # Executes "gamemode creative" command as console
    # Placeholders work here
    - { run: gamemode creative %player_name%, as: console }
    # Shows message to the executor
    # Placeholders work here
    - { display: "§0[§a✓§0]§r You have switched to creative mode" }

Let's examine key elements:

Component Value Description
Permission command.gamemode Defines required permission to execute "gmc" command
Player-Only true Restricts command execution to players only
Usage /gmc Displays correct command syntax

First Execution Action

Action Command Executed As
Execute command gamemode creative %player_name% console

Switches player's game mode to creative. The %player_name% placeholder is automatically substituted.

Second Execution Action

Action Message
Display message "§0[§a✓§0]§r You have switched to creative mode"

Shows confirmation message with color formatting.

Project members
bradbot1

bradbot1

Developer

Created: 10 Oct 2023

ID: 20216