Skip to content

neikiri/CustomAliases

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CustomAliases

A lightweight command alias plugin for Bukkit-based Minecraft servers.

Author: neikiri
Version: 1.0.0
API: Bukkit 1.20+
Compatible with: Spigot, Paper, Purpur, and other Bukkit-based forks
GitHub: https://github.com/neikiri/CustomAliases


Features

  • Command shortcuts/alias add gm gamemode → typing /gm creative runs /gamemode creative
  • Full argument forwarding — all arguments after the alias are preserved exactly
  • Case-insensitive/GM, /gm, /Gm all resolve the same alias
  • Alias chaining — aliases can point to other aliases (resolved safely up to 10 levels deep)
  • Infinite loop detection — circular alias chains are detected and blocked at creation time and at runtime
  • Console support — aliases work for console commands too
  • Persistent storage — aliases are saved in config.yml and survive restarts
  • Hot reload/alias reload reloads configuration without restarting the server
  • Granular permissions — separate permissions for add, remove, list, info, and reload
  • Tab completion — permission-aware tab completion for all subcommands and alias names
  • Configurable prefix — customize the chat message prefix with & color codes

Commands

Command Description Permission
/alias add <alias> <command> Create a new alias customaliases.add
/alias remove <alias> Remove an alias customaliases.remove
/alias list List all aliases customaliases.list
/alias info <alias> View details about an alias customaliases.info
/alias reload Reload configuration customaliases.reload
/alias help Show help

Permissions

Permission Description Default
customaliases.admin Grants all management permissions (below) OP
customaliases.add Create aliases OP
customaliases.remove Remove aliases OP
customaliases.list List aliases OP
customaliases.info View alias details OP
customaliases.reload Reload configuration OP
customaliases.use Use aliases when typing commands Everyone

customaliases.admin is a parent permission — granting it automatically grants add, remove, list, info, and reload.


Configuration

plugins/CustomAliases/config.yml:

# Chat message prefix. Supports '&' color codes.
prefix: "&8[&6CustomAliases&8] &r"

# Aliases are stored here automatically.
aliases: {}

You can edit aliases directly in the config file and use /alias reload to apply changes.


Building

Requires Java 17+ and Maven 3.6+.

mvn clean package

The compiled JAR will be at target/CustomAliases-1.0.0.jar.


Installation

  1. Build the plugin or download the JAR from Releases.
  2. Place CustomAliases-1.0.0.jar in your server's plugins/ folder.
  3. Start or restart the server.
  4. Use /alias add <alias> <command> to start creating aliases.

Examples

/alias add gm gamemode
/gm creative              → executes /gamemode creative
/gm survival Steve        → executes /gamemode survival Steve

/alias add msg tell
/msg Steve hello world     → executes /tell Steve hello world

/alias add ci clear
/ci                        → executes /clear

/alias add s say
/s Hello everyone!         → executes /say Hello everyone!

Alias chaining:

/alias add gmc gamemode creative
/alias add surv gamemode survival

Now /gmc directly runs /gamemode creative and /surv runs /gamemode survival.


Project Structure

src/main/java/com/neikiri/customaliases/
├── CustomAliases.java          Main plugin class
├── AliasManager.java           Alias storage, lookup, chain resolution, loop detection
├── AliasCommandExecutor.java   /alias command handler (add, remove, list, info, reload)
├── AliasTabCompleter.java      Permission-aware tab completion
└── AliasListener.java          Intercepts player & console commands

License

This project is licensed under the MIT License — see the LICENSE file for details.

About

A lightweight command alias plugin for Bukkit-based Minecraft servers (Spigot, Paper, Purpur). Create custom command shortcuts with full argument forwarding.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages