Inactive [MISC] bShortcut 1.1.0 - define Shortcuts for Commands [1000]

Discussion in 'Inactive/Unsupported Plugins' started by beecub, Apr 29, 2011.

  1. Offline


    bShortCut - Shortcuts:
    Version: 1.2.0
    Download bShortcut

    You dont want to type long commands or messages?, you wanna have a shortcut?
    This is your plugin.

    • define shortcuts for commands or messages
    • use variables
    • type one command, perform several
    The commands are not from this plugin.
    They are only examples!, You can set up every plugins commands here.
    /fc [item] instead of /fullchest [item]
    /clean instead of /item 1 64
    /wl [name] instead of /weather lightning [name]
    /trules instead of Rules are on our website. go there and read them

    Permissions for all commands are obtained. Someone who does not have the permission to use /item also cant use /item.

    /bShortcut - reloads config file (use it after changes in your config)

    &args - All arguments given to the command
    &player - Name of player whos performing the command
    &[number] - One of the given arguments. Example: &2
    &system - As first parameter in your perform message to write as "system". Example:
    - '&system&args'
    &onlineplayers - Somewhere in your perform message to use this replaced for every player online
    &permissions - Use this as single perform message to show the plugin you want to check the permission for this command. Permission will be bShortcut.user.[YourShortcut] (Example: bShortcut.user./test)
    Any suggestions?

    Show Spoiler

    The commands are not from this plugin.
    They are only examples!, You can set up every plugins commands here.

    Example - files:
    Show Spoiler

    Example 1:
    - /give &1 &2 &3​
    - /m &1 there you got &3 of &2 from me.​
    - My name is &player​
    - Iam &1 years old​
    /t: /time &args​
    /cleanstone: /item 1 64​
    /breload: /bShortcut reload​

    Example 2:
    /gi: /give &args​
    /mp: /manpromote &args​
    /md: /mandemote &args​
    /fc: /fullchest &args​
    /rd: /remove drops &args​
    /tell: /m &args​
    /lbp: /lb player &args​
    /lba: /lb area &args​
    /lbrb: /lb rollback &args​
    /li: /lightning &args​
    /inv: /invsee &args​
    /clear: /clearinventory &args​
    /plugins: /ttttt &args​
    /v: /vanish &args​
    - '&4 Attention! Serverreload several seconds lags. Dont move or press any key to stay logged in!'​
    - /save-all​
    - /reload​
    - '&4 Attention!, stopping server!'​
    - /save-all​
    - /stop​

    Version 1.2.0
    • More Wildcards (Variables)
    • Permissions support, not necessary
    Version 1.1.0
    • Variables
    • type one command, perform several
    Version 1.0.0
    • Initial Release
    Request?, i wanna do it. Give me Feedback. I want to hear your opinion. Thanks a lot :).
    Witek094, Mahagon, r3Fuze and 10 others like this.
  2. Offline


    how i do if i have ":" in the cmd ?
    exemple :

    /gimme 35:6:
    - hello
  3. Offline


    Its not working this way. You have to define on what command you want to react.
    - [your Reaction]
  4. Offline


    download works again !
  5. Offline


    Yes, migrated some of my websites, this caused an error with the downloads :)
  6. Offline


    /i: /item &1:&3 &2

    i realy need a way to escape the ":" char
    i have never see cmd whis a pipe " | " .

    I'm making a web site for my minecraft server and i allow user to edit the config fileon the fly :)
    so i have a message for you. ^^

    From all my friend :
    Your plugin is a blessing !
  7. Offline


    I have an idea for this. What if, somebody types the full command (not the shortcut), and it sends them a message that there is an alias for it! That way, I don't have to keep telling people that they can just type /a or /d instead od /tpaccept or /tpdeny. :)
  8. Offline


    thats nice
  9. Offline


    fantastic plugin, was thinking of writing something like this myself :)
  10. Offline


    Ey beecub your plugin is awesome but i have a question:
    How can you do a multiple option command? like this:
    /go up
    /go down
    Just an example.
  11. Offline


    Thanks for the plugin, I am finding it very useful for making rolling back griefing easier. A couple suggestions are adding a &world variable for the world the player is currently in, and adding conditional statements - ie: if(&1,&1,<defaultargs>).

  12. Offline


    Tested against 818.

    Should be possible.
    The PC Tech Guy and CoolOppo like this.
  13. Offline


    thx for 818 ^^
  14. Offline


    Hmm. I want to add in a command that has # in it. Im guessing this isnt working because it is a comment in Java or YAML or whatever. Any way to let me use a command that has a # in it
  15. Offline


    Hi there! I found a little bug in this plugin :> (and a possible fix)
    Lets say I set up this shortcut:
    /dt: /dothis &1 &2 &3
    And in-game I use "/dt a1 a2"
    this is what actually will be executed:
    "/dothis a1 a2 &3"
    Meaning it will add the unused &3 as an argument which causes a lot of commands to fail if they check for the amount of arguments...

    I know it would be better to use the &args variable instead of the &number (And I do use it) but others might get confused why their commands won't work)

    I altered your handleVariables()-method of the bConfigManager class a bit to solve this issue:
    bConfigManager.handleVariables() (open)
       static String handleVariables(Player player, String performMessage, String message) {
            String[] args = null;
            message = message.replaceFirst(" ", "");
            args = message.split(" ");
            for( int k = 0 ; k < 8 ; k++ ) {
               String repl = "";
               if( k < args.length )
                    repl = args[k];
                performMessage = performMessage.replaceAll("&" + (k + 1), repl);
            performMessage = performMessage.replaceAll("&player", player.getName());
            performMessage = performMessage.replaceAll("&args", message);
            return performMessage;

    I hope you can add something like this in a new, official version of your plugin. :D
    This may not be the best/fastest way, but I didn't know it better. Please let me know if you know how to do it better. :>

    [Edit 1]
    @Shaun Bennett
    The hash mark/pound (#) is indeed the comment-symbol in YAML and I don't know if there is a way for YAML to interpret it as a symbol (escape it). I'll try to find out and let you know!

    [Edit 2]
    Okay, I think the only way to escape the hash mark in YAML is with double quotes or maybe 2 single quotes - so try to use "#" (double quotes) or ''#'' (2 single quotes) instead of # only. And I think you have to put them around the whole command, like this: /sc: "/shortcut &1 bla # "

    [Edit 3]
    Same goes for you. Although it might be a bit late. Read edit 1 and 2. :p
  16. Offline


    Question: Can the shortcuts be called through the console (including arguments)?
  17. Offline


    i personally haven't been able to get it to work in the console, try it and see if it works :p
  18. Offline


    I would if I could, not got proper access to anything on this computer sadly and I've got to be at work soon. Was just hoping for an answer to try out later but by the sounds of it I won't have any luck if you can't get it to work.

    Cheers for the quick reply though. :)
  19. Offline


  20. Offline


    @Crimsonfox no - it doesn't work with the console. It's because this plugin is registering player commands (before they are executed) only :>
  21. Offline


    I looooooooooooove you !!!
  22. Offline


    Quick question, can one macro trigger another macro? I want /a tp do /tpaccept, and /tpaccept to just do /info tele, but I want /a to do the actual /tpaccept comment, not the macro set for /tpaccept. Do you know what I mean?
  23. Offline


    Yep, one macro can and will execute another macro if you set it up like that.
    If you set a macro-name to a command that already exists, both will be executed (afaik).
    You have to choose different names and then it should work.
  24. Offline


    Aww... That sucks.
  25. Offline


    Please help!
    When I ban a player it only does the one command even though I have it set to ban the player, roll them back using LogBlock and say to everyone on the server that they have been banned. It works for the ban perfectly and I have it set for McBans, but it doesn't work for the other things even though if I type them individually it works fine (except it still doesn't do a global ban). Here's my config:

    /ban &1:
    - /ban &1 g Griefing
    - /say &1 Has been banned and his actions have been rolled back.
    - /lb rollback player &1 since 9999d area 9999999
    - /yes

    EDIT: I tried to make it do just one command and it still didn't work for LogBlock! Here's how I have it configured:

    /rollback &2: /lb rollback player &2 since 9999d area 9999999
  26. Offline


    you cant have an alias the same name as any other command that is currently taken.
    instead of /ban &1 do /banfull &1 or something similar. as they are alias's they don't override commands.
    CoolOppo likes this.
  27. Offline


    Thanks! I'll try it soon.
  28. Offline


    Weird, it just says "Unknown Console Command" When I do that. D:
  29. Offline


    what version of bukkit are you using, with #928 and #935 a lot of plugin's commands have broken, this might be included.
  30. Offline


    RB 860
  31. Offline


    lame, i have no issues with it at all (same version), sorry i couldn't help out more.

Share This Page