Alias

Due to recent issues, I currently have no time to continue development for this plugin. The source code will be sent to anyone who asks, anyone who wants to continue development is free to do so - if you want access to this page, too, please message me.

alias.logo

Current Version: 1.1.0
Recommended Build: 1.2.5-R1
Thanks to Unscrewed for one awesome logo!

About

Have you ever found yourself typing the same command over and over? Do you want to simplify vanilla Bukkit commands without installing a great bunch of plugins? This plugin allows you to do so. With Alias, you can add aliases to existing commands, shortening the text you have to type.

Examples

Simplify the Bukkit "tp" command: /a set tp tp {name} {1}

Breakdown of the command:

  • /a - All aliases and alias commands must be prefixed by /alias, or the shorter /a, to prevent conflicts with existing commands
  • set - Sets a new alias. If you had another alias registered with that name, it will be overwritten and the old command will be displayed to you
  • tp - The name of the alias. In the future, you can invoke it by typing /a tp [your parameters]
  • tp - Here, the command that should be invoked begins. In our case, it is the teleport command
  • {name} - Every time you invoke this command, it will be replaced by your name. In other words, you save yourself typing your name every time.
  • {1} - This will be replaced by the first argument you pass to the alias, in our case the target player.

Now, instead of typing /tp <yourname> <other name>, you shortened it to /a tp <other name>. Shorter, isn't it?

Simplify Worldedit commands: /a set farm /pos1;/pos2;/expand {1} N;/expand {1} E;/expand {1} S;/expand {1}W;/set 60;/shift 1 D;/set 9;/shift 2 U;/set 59

Breakdown:

  • /a set farm - As seen above
  • /pos1 - Since worldedit takes two forward slashed, you need to add one here.
  • ;/pos2; - Chain multiple commands
  • /expand {1} N;/expand {1} E;[...] - Expand the area the same amount in all directions, with your feet now being at the center

Usage: /a farm <radius> - Creates an area (2*radius)+1 long and wide, makes it farmland, places water under it, places seeds on top of it.

The explanation of the rest of the commands can be looked up here. Please note that I do not have much experience with WorldEdit, so some of the used commands may be outdated or wrong. This is only supposed to be a proof-of-concept.

Commands

All commands start with either /a or /alias (Both are equivalent):

  • /a - Displays help
  • /a list <player> - List your (or <player>'s) aliases
  • /a remove [alias] - Removes alias with name [alias]
  • /a set [alias] [commands] - Registers a new alias with name [alias]
  • /a [alias] - Executes the command associated with [alias]
  • /a help <command> - Displays the general help or the help for <command>

Permissions

There is only one permission:

  • alias.list.others - Allows to see other people's aliases

Variables

Alias allows you to replace words with place holders, which will be filled in when you issue the command.

  • {name} - Will be replaced by your name
  • {health} - Will be replaced by your health in half hearts
  • {1}, {2}, ..., {n} - Will be replaced by the first/second/nth word after the alias. If you pass less arguments than there are placeholders, the place holders will be printed literally. If you pass more arguments, superfluous arguments are discarded. For example, if you have an alias s = say {1} {2}:
    • "/a s foo" will output "foo {2}"
    • "/a s foo bar" will output "foo bar"
    • "/a s foo bar asd" will output "foo bar"
  • {} - Will be replaced with the first argument
  • {n:} - Will be replaced with all arguments from n to the end (inclusive), separated by spaces
  • {:m} - Will be replaced with all arguments from the beginning to m (inclusive), separated by spaces
  • {n:m} - Will be replaced with all arguments from n to m (inclusive), separated by spaces

Questions and Answers

Q: Does Alias support command <X>?
A: As long as X is a vanilla bukkit command or you have a plugin the uses command X, yes. Otherwise, no.

Q: What is with permissions?
A: If a user attempts to use a command he has no permissions for, he will be denied.

Q: Do all users have the same aliases?
A: No. Every user has his own set of aliases, as does the console.

Q: Can I edit other users aliases?
A: No. As mentioned above, there is no reason to do so permission-wise, and people should be able to trust their aliases as much as standard commands. No one wants to risk getting lava dumped over their had by a moderator who messed with their alias.

Q: I tried to open "aliases.data", but it seems to be corrupted!
A: The aliases are not saved in plain text, but in a format that the JVM can easily load and save. This is both for speed and security reasons.

Files

There is one file: /plugins/Alias/aliases.data. This stores all players aliases in a non-editable, non-readable format. Please, don't try to edit it. You will only corrupt the file. Right now, there is no configuration file, as there is not much configure.

Planned Features

  • None right now - open to suggestions

Changelog

v1.1.0

  • Added range variables:
    • {} matches the first argument
    • {n:} matches everything from n to the end (inclusive)
    • {:m} matches everything from the beginning to m (inclusive)
    • {n:m} matches everything from n to m (inclusive)

Example usage: /a set b broadcast {1:} /a b <your text> is now equivalent to /broadcast <yourtext>

v1.0.0

  • First release

Contact

Ticket here or contact me on IRC: irc://irc.esper.net:6667/arcticraft (I'm not always active, but if you just talk to me, my bouncer will tell me when I come back)

You must login to post a comment. Don't have an account? Register to get one!

  • 9 comments
  • Avatar of Spiky2006 Spiky2006 May 31, 2014 at 09:24 UTC - 0 likes

    can you make so you cont have to do this like if i do /a set spw spawn, can you make it so i dont have to do /a spq and make it so it adds the command /spw

    My Server: es.mcph.co

  • Avatar of Sodak1337 Sodak1337 Mar 30, 2013 at 22:55 UTC - 0 likes

    can you make with this plugin chain commands like:

    citizens save, save-all, buttonlock save so you can call the cmd saveplugins and he do all the cmds before?

  • Avatar of pirmax pirmax Nov 24, 2012 at 00:27 UTC - 0 likes

    Hello,

    Please, add an update :)

    Pirmax.

  • Avatar of ishi1000 ishi1000 Oct 25, 2012 at 19:38 UTC - 0 likes

    hello i want to update this plugin and want to develop this plugin

  • Avatar of Cowboys1919 Cowboys1919 Jul 18, 2012 at 11:53 UTC - 0 likes

    @Joshyboshy09: Go

    How else would you set it up...?

    BFAK:Cowboys1919,90697005,5e2fe653d3f691ffbd1f071415f095e5f2f28189e54248428a37bf9e7c6b6e8a

  • Avatar of TheGame64 TheGame64 Jun 23, 2012 at 15:45 UTC - 0 likes

    GUYS GUYS !!!!! READ THIS!

    Download the v1.0.0 That is Alias :D

    !!!!!

  • Avatar of TheGame64 TheGame64 Jun 23, 2012 at 15:40 UTC - 0 likes

    WTF, ITS CURSEBAN WHY?????

  • Avatar of Joshyboshy09 Joshyboshy09 Jun 11, 2012 at 12:57 UTC - 0 likes

    ?? This is curseban not alias.

    And more people would get this if you didnt have to type /a and THEN the alias.

    Last edited Jun 11, 2012 by Joshyboshy09
  • Avatar of blha303 blha303 May 22, 2012 at 11:34 UTC - 0 likes

    Hi,

    Thought you should know, the latest version of this plugin that you posted is CurseBan, not Alias.

    I'll just use the 1.0.0 version instead.

  • 9 comments

Facts

Date created
Apr 17, 2012
Categories
Last update
Apr 17, 2012
Development stage
Release
License
Apache License version 2.0
Curse link
Alias
Downloads
2,402
Recent file

Authors