XShortcut
XShortcut is a tool to create admin-defined commands, running multiple commands at once, e.g. to do semi-automatic World-Edit operations or doing permission- and right-management for your users. But many shortcut plugins have too less features if you want to create shortcut commands, e.g. returning text to a player, running commands as OP or checking if the arguments are valid. So I created XShortcut to enable more control over shortcut commands.
What can this plugin do?
For example, you want to create a shortcut for your permission manager, but it's hard to remember commands like /pex user <user> group set player. This plugin is able to create a command (e.g /player <player name>) to make your life easier.
Another usage is, for example protecting props for your users: Normally, you would select the corners of the prop and type expand 20 u, expand 20 d and /region define prop_<player>. With XShortcut, you can configure ONE command, doing these 3 commands. Instead of typing them, you only would have to run, for example, /protect <player>. The 3 commands are run in background by the plugin.
expand 20 u, expand 20 d and /region define prop_<player> ~ Merge~~> /protect <player>
Read the example section to find out what admins and players also can do!
Why XShortcut?
Because I used bShortcut (Very good shortcut plugin) before creating XShortcut. XShortcut is using XML instead of YML (i hate YML :P) to enable all features, I wanted for a shortcut plugin. The X stands for XML.
Features
- "Run as Player" commands
- "Run as OP" commands
- Normal commands (:
- "Return text to sender" commands
- Argument validitation (e.g. numbers, player names or only special values)
- Shortcut command restictions (Permissions, OP required)
Installation
Just extract the *.zip file into your server folder (where craftbukkit.jar is) and restart/reload your server.
Reference
Arguments (+Additional attributes)
Possible attributes for every argument: Placeholder, Type, Name
Argument Types + Additional attributes
- Text
- Number (min, max)
- AllowedVars (vars)
- Player (allowoffline=true)
- World
- Date
- Time
- DateTime
- Asterisk (Look at example how to use)
Commands
Command Types + Attributes
- Run (Command, Colored=true, Color-Char=%)
- Player (Command, Player [+Placeholder support], Colored=true, Color-Char=%)
- Op (Command, Colored=true, Color-Char=%)
- Return (Text, Colored=true, Color-Char=%)
Example
<XShortcut> <!-- You may insert comments :D --> <Command Name="/xreload" NeedsOp="true" Description="Reloads XShortcut. Ops Only."> <Commands> <Run Command="/xshortcut reload" /> <!-- Run a command (or write sth into the chat) --> </Commands> </Command> <!-- Arguments are registered in the "Arguments" tag --> <!-- There are many argument types: Player, Number, Allowedvars, Date, Time, Datetime, Text (Text = No checking ore sth else --> <Command Name="/vipkick" NeedsPermission="i.am.vip" Description="VIP may kick ..."> <Arguments> <Argument Type="Player" AllowOffline="true"/> <!-- Only kick valid players, AllowOffline defaults to true --> </Arguments> <Commands> <Op Command="kick %%1%%" /> <!-- Run as OP --> <Return Text="You kicked %%1%%. %bHaha!" /> <!-- Return a text to the command sender - With Color (%b)--> </Commands> </Command> <!-- Asterisk argument example (Annoy your players!!!) --> <Command Name="/sayas" NeedsOP="true"> <Arguments> <Argument Type="Player" Placeholder="#player#"/> <!-- First argument: Player - ok --> <Argument Type="Asterisk" /> <!-- Asterisk ??? --> </Arguments> <Commands> <Player Command="%%*%%" Player="#player#" /> </Commands> <!-- What will happen: if you run /sayas Notch hi i am Notch!, The player Notch will say "hi i am Notch!" Asterisk collects every argument after its occurence and will set a placeholder %%asterisk%% (You may set it as other placeholders). It acts like %%args%% (List all arguments). --> </Command> <!-- Allowed vars: Help pages and more --> <Command Name="/rules"> <Arguments> <Argument Type="Allowedvars" Vars="general"/> <!-- Allow only "general" as first argument - otherwise it will look for another matching command --> </Arguments> <Commands> <Return Text="#4Rule no1: #b?????" Color-Char="#" /> <Return Text="#4Rule no2: #baaaaaaaaaaaahn! No coloring!" Colored="false" /> <Return Text="#4Rule no3: %bDefault color char!" /> </Commands> </Command> <Command Name="/rules"> <Arguments> <Argument Type="Allowedvars" Vars="extra"/> <!-- Allow only "extra" as first argument - otherwise it will look for another matching command --> </Arguments> <Commands> <Return Text="#4Rule no4: #babcde" Color-Char="#" /> <Return Text="#4Rule no5: #bfghi!" Colored="false" /> <Return Text="#4Rule no6: %bjklmnop!" /> </Commands> </Command> <!-- Now an index for no argument --> <Command Name="/rules"> <Commands> <Return Text="%c/rules general"/> <Return Text="%c/rules extra"/> </Commands> </Command> </XShortcut>
-
View User Profile
-
Send Message
Posted Sep 29, 2012Is it possible to make an if statement?
-
View User Profile
-
Send Message
Posted Sep 2, 2012I don't quite understand this just from the first glance at it but, With this would I be able to make a command different like >>> I'm looking to make /money a command shortcut for /econ from the BOSEconomy plugin. So when a member types in /money in the PermissionsEX (PEX) group Member or any other group I set a permission node to, It can see that and figure out that it should display the /econ command.
I'm bad at explaining things like that. but if you understand what I'mma saying, would that work ?