BetterAlias
Tired of entering tedious and repetitive commands? Wish you could group commands into one short and easy to use command?
With BetterAlias you can specify any number of aliases for your commands!
Features
- Create aliases for long repetitive commands:
becomes/permissions player setgroup <playerName> VIP
/vip <playerName>
- Combine multiple commands into one simple command
- Compatible with your existing permissions/plugin commands!
- Supports partial player name lookups (ie "e0n" to find "Ne0nx3r0")
Installation
- Add BetterAlias.jar to your plugins directory
- Once loaded an aliases.yml file will be created
- Customize the file and use /bareload to enable the changes.
- Use the examples inside aliases.yml to setup aliases for everyone to use! (or add a custom permission node for the command)
Usage
See the examples page.
Multiple Commands
Separate multiple commands with dashes (-):
tpthenkick: 1: - /tp !1p !name - /kick !1p
The examples file that comes with the plugin includes examples of every type
-
2013-02-08 09:38:13 [INFO] [BetterAlias] Enabling BetterAlias v1.0 2013-02-08 09:38:13 [SEVERE] Error occurred while enabling BetterAlias v1.0 (Is it up to date?) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at com.ne0nx3r0.betteralias.alias.AliasManager.loadAliases(AliasManager.java:90) at com.ne0nx3r0.betteralias.alias.AliasManager.<init>(AliasManager.java:30) at com.ne0nx3r0.betteralias.BetterAlias.onEnable(BetterAlias.java:15) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:383) at org.bukkit.craftbukkit.v1_4_R1.CraftServer.loadPlugin(CraftServer.java:308) at org.bukkit.craftbukkit.v1_4_R1.CraftServer.enablePlugins(CraftServer.java:290) at net.minecraft.server.v1_4_R1.MinecraftServer.j(MinecraftServer.java:327) at net.minecraft.server.v1_4_R1.MinecraftServer.e(MinecraftServer.java:306) at net.minecraft.server.v1_4_R1.MinecraftServer.a(MinecraftServer.java:265) at net.minecraft.server.v1_4_R1.DedicatedServer.init(DedicatedServer.java:149) at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:405) at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
@Ne0nx3r0
The /msg is my problem. It then says [PlayerWhoSend->PlayerWhoGetsPM] You were...
I just do not want this [...->...] thing. That was what i wanted to "hide". I just want the promoted player to get the message without it. :)
@re3ell
You could use:
Thanks for the update but i do not get to work two things:
1. How do you tell the reply command that i shall reply to the user (in argument)?
2. How do you use the reply command together with commands?
E.g. I want to use /promote as an alias for /pex promote <player> and give a message to the player that was promoted like: "You were promoted. Type /help for new commands."and a second message to the admin that promoted the player like: "<player> promoted successfully."
@re3ell
@xDeeKay
@lANTHONYl
@rockjolt375
Added various requested changes in v1.0
@Ne0nx3r0
Thank you very much.
@re3ell
I'm adding support for this in the next version
Is there a way to give a message to only the player that was promoted?
And is there a way to show the rank he was promoted to in this message?
E.g.
promote:
1:
- /pex promote !1p
- /sayonlytoplayer !1p You were promoted. Your new rank is %group.
- /sayonlytoplayer !1p Please type /help to get a list of your new commands.//
If this is not possible yet, could you please add this features?
@sandal25
I'm confused... Do you mean "!2" "!3", etc? If so, that's what is meant by "!x".
Could I make a suggestion? Could you possibly add a permission feature? Such as defining a permission for each alias.
For example, I made an alias called /staffactivity that when entered, shows the /seen results for the players defined. But since all my players have access to /seen [playername], they could all potentially use the alias. Although it may be harmless for them to use, I still only want certain groups to be able to use the alias.
Hey, I absolutely love this plugin! But there is a key feature that can greatly benefit this project.
That is allowing for 2nd & 3rd Parameter flexibility that is similar to the"!x & !1" functions.
In illustrating an example, lets say a given plugin can do: /commander player setfire
-and-
ex. /commander player water (or hit, or kill, move, send. etc etc...Lets say there are over 20 "commander player" cmds)
Is it possible to set a variable after the "player" part of the command so i can input a functional alias such as:
alias = /cp
server-config = /commander player !x
in-game input = /cp water
outcome = /commander player water
@Ne0nx3r0
how would there be any injections to worry about? if there are no arguments to process, and the alias needs a permission node to run, there shouldn't be much concern.
@lANTHONYl
The permissions are handled by whatever plugin receives the command.
I'm kind of wary about letting a command run as the console, due to the possibility of injections.
I'll keep this need in mind in future versions though.
Is there a permissions system for this plugin? Meaning that we can assign a permission to use an alias. Also, a runas sort of feature. I want to be able to give my staff members a way to switch in and out of their staff group without giving them the permissions to use the permission plugin... they'd be able to give themselves all permissions that way heh. That'd be no good.
So i'd need a command like /staff helper join with a required permission of staff.helper which would run the command /perm <player> addgroup helper as an OP or as the console. Make sense?
Is there a way to set delays in between commands? I might have set this wrong but here is my command:
What's happening is when I specify a name, they'll tp to me and nothing else. When I don't specify a name, it just runs tppos.
@Nomadadon
Change the 1 to a 0.
Also, notably console support isn't added yet. I'm working on that for the next version.
I have this at the top of my config.yml
updates:
1:
- /uptodate plugin
- /uptodate updates
am:
1:
- /automessage broadcast default 4
- /automessage broadcast default 5
- /automessage broadcast default 6
If I restart and do "am" or "updates" from my console I get a message:
>am
14:34:00 [INFO] Unknown command. Type "help" for help.
>updates
14:34:03 [INFO] Unknown command. Type "help" for help.
@Nomadadon
I've added an example of this above.
Can I do a multiple command alias? for instance, i have AutoMessage installed which i want to occasionally run 3 lines of. by hand I would do:
automessage broadcast default 4 automessage broadcast default 5 automessage broadcast default 6
am: 0: /automessage broadcast default 4 1: /automessage broadcast default 5 2: /automessage broadcast default 6
so I could do "/am" and have it run all 3 lines?
Im trying to do a multiple word command, but it doesnt seem to work, I want the command /money give to have the ability to detect players who are online at the time. So I was trying to make the allias
money give: 1: /money give !name !2 2: /money give !2p !3
but it doesn't work. Is there a way to have a multiple word, command.