Changin the command registration in plugin.yml

Discussion in 'Plugin Development' started by Gurke1993, Mar 18, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Gurke1993

    Hey guys,
    i started programming bukkitplugins some weeks ago and one user of my plugins ran me in an issue. In one of my plugins iam using the command /bank deposit AMOUNT. He asked me to change this to /deposita AMOUNT (he is italian i guess :D). I told him that it wouldnt be a problem add a config option to change it to /bank deposita AMOUNT. Changing "bank" seems hard due to the fact that it is registered via plugin.yml.

    Now i want to know the following:
    Is it possible to change the plugin.yml ingame (via my plugin) in order to change /bank deposit AMOUNT to e.g. /lol deposit AMOUNT ?
     
  2. Offline

    maxp0wer789

    You could use the setAliases() method.
    Code:
    in onCommand()
     
    List<String> tmpAliases = new ArrayList<String>();
    aliases.add("lol");
    command.setAliases(tmpAliases);
    never used that, so i have no idea if it works, but it's worth a try
     
Thread Status:
Not open for further replies.

Share This Page