Cuberite Forum
Aliases - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Releases (https://forum.cuberite.org/forum-2.html)
+--- Thread: Aliases (/thread-1945.html)



Aliases - xoft - 05-14-2015

This is a plugin for MCServer that allows players to define aliases for in-game commands and even chat messages. Server admins can define their aliases for console commands.

This makes it easier to use long commands - you can define a shorter version of the command, and even include the initial parameters. For example:
  • "/td" -> "/time set day": By using the simple "/td" command you can set the time to day in the world

  • "/ts" -> "/time set": Now you can use commands such as "/ts night" to set night in the world

  • (console) "kx" -> "kick xoft I hate you because": Now you can kick me really fast using the console command "kx no reason"


Commands

General
  • /alias list - Lists all your aliases
    Permission required: aliases.alias.list

    /alias remove - Removes an existing alias
    Permission required: aliases.alias.remove
    The following parameter combinations are recognized:
    /alias remove "From" - Removes the alias previously defined for "From"

    /alias set - Sets an alias from one command to another
    Permission required: aliases.alias.set
    The following parameter combinations are recognized:
    /alias set "From" "To" - Set an alias for command "From" as command "To"


Permissions
  • - aliases.alias.list - Allows players to show a list of all their currently defined aliases
    • Commands affected:
      - /alias list
    • Recommended groups: everyone
    - aliases.alias.remove - Allows players to remove an alias they have defined earlier
    • Commands affected:
      - /alias remove
    • Recommended groups: everyone
    - aliases.alias.set - Allows players to define their aliases
    • Commands affected:
      - /alias set
    • Recommended groups: everyone

Source: https://github.com/madmaxoft/Aliases
Download: https://github.com/madmaxoft/Aliases/archive/master.zip


RE: Aliases - NiLSPACE - 05-14-2015

AwesomeBig Grin


RE: Aliases - worktycho - 05-14-2015

Could we create an API to allow the aliases plugin to resolve conflicts? At the moment the last loaded plugin gets the command, but it would be good to create an ExecuteCommand API that specifies the plugin, so that if two plugins have the same command, the aliases plugin could remap one of the commands to a different name.


RE: Aliases - xoft - 05-14-2015

Plugins cannot register a duplicate command. That would require substantial changes to the server and is quite outside the scope of this plugin.
It is quite contrary - this plugin makes it easier to use longer command names, so it encourages plugin authors to use names that are less likely to cause a conflict.


RE: Aliases - Seadragon91 - 05-14-2015

Will the server write something into the console, if a command exists twice?


RE: Aliases - xoft - 05-14-2015

Yes, it will log an error message and the second plugin will not get its command registered. The BindCommand() will return false (but who checks, rightTongue )


RE: Aliases - Seadragon91 - 05-14-2015

OhConfused. Didn't know thatTongue