Heya, I love the new stable command. It's an amazing addition to the horse update and aligns EMC with most other MMOs in the way it is implemented. Great job! The only problem is that I use it a lot, and would really appreciate some shortcuts. The following might be one way to do it: /s = /stable st = store su = summon if you don't specify a stable slot to summon, it defaults to #1 So to store a horse, all I have to type is /s st, and to summon it again (assuming I didn't already store another horse) /s su. However, given how often we type these commnads now, you could even implement: /st = /stable store /su = /stable su (if you don't specify a stable slot to summon, it defaults to #1) Not that I'm lazy or anything , but it would be really handy!
Already quite a few as mentioned above, but heres full code/details: Code: @Override public boolean execute(CommandSender sender, String commandLabel, String[] args) { Player player = (Player) sender; Stable stable = Stable.getStable(player); String sub = (args.length == 0 ? "list" : args[0]); switch (sub.toLowerCase()) { case "unstable": case "summon": case "sum": case "get": if (args.length == 2) { try { if (stable.summonStabled(Long.parseLong(args[1]))) { sendMsg(player, "&aSummoned"); } } catch (NumberFormatException e) { sendMsg(player, "&cInvalid number"); return false; } } else { sendMsg(player, "&e /stable summon [#]"); } break; case "horse": case "stable": case "store": case "sto": case "put": if (stable.storeCurrent()) { sendMsg(player, "&aStabled your current horse"); } break; case "l": case "list": stable.printInfo(); break;
Thanks Aikar. Any chance of adding in something like: Code: if (args.length == 1) { try { if (stable.summonStabled(1)) { sendMsg(player, "&aSummoned"); } } catch (NumberFormatException e) { sendMsg(player, "&cInvalid number"); return false; to the summon section? Summoning a horse by default would be nice. Would be worth putting the shortcuts into http://empireminecraft.com/threads/guide-1-6-stables.28065/ as well. I had looked for shortcuts and had tried a few options, just not /st and sum or sto. Shortcuts are a bit random: chat has /c tell has nothing stables has /st (even though there is no /s command) summon and store are sum and sto. When you're choosing a shortcut do you roll a 3-sided dice?
It's 3, but when people share parts of the word you type, you may have to type 4 to ensure you get the person
Hehe! You mean there's even more inconsistency than just the length of the shortcut? I guess there's a second dice rolled to decide what to start the shortcut with! Seriously though, the shortcuts aren't documented (or are not trivial to find!). So although I don't mind being poked fun at, it would at least be nice to be able to find this info without having to make a post like this. Irrespective of the actual shortcuts, could you please make the summon command default to the first horse? It especially makes sense when you only have one horse stored, or even only have one stable slot!