Does a command when server have x amount of people on

Discussion in 'Archived: Plugin Requests' started by grrocks, Oct 9, 2014.

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

    grrocks

    Suggested name: CommandStart

    What I want: When my server hits x amount of people it will do any command I setup ex. /match start.


    Ideas for commands: /cs config

    Ideas for permissions: CommandStart.admin

    When I'd like it by: The sooner the better no real rush!
     
  2. Offline

    simolus3

    Created and uploaded it here (it's called onX because I think that sounds better than CommandStart). If you see any bugs, please let me know.

    Config:
    commands_min will be executed when the amount of players is ≥ your number.
    commands_strict will be executed when the amount of players is = your number.

    If you don't like the list format used (["1", "2", "3", "4"]), you can use the first one of this as well.

    Comments:
    /onX list lists every command, whether it's strict and on what number of players it reacts.
    /onX ops lists every onX command operation. (list is the only one yet)
    The permission for every command is onX.command
     
  3. Offline

    Crud41


    Not that it really matters, but I noticed inside your plugin.yml you misspelled description. Might cause errors.
     
    VG.Developments likes this.
  4. Offline

    grrocks

    Thanks for making this but how do I execute commands like /match start, /feedall, ect
     
  5. Offline

    simolus3

    You put them into your config. Here's an example: It will execute /match start when they're 5 players online and /feedall + gives a message for every player joining
    Code:
    #This is the config for OnX Players
     
    commands_min:
    #Minimum: Executed when a player joins and the amount of players is
    #GREATER or EQUAL the number you specified
      1: ["feedall", "say A player joined. That means you all got something to eat!"]
     
    commands_strict:
    #Strict: Excecuted when a player joins and the amount of players is
    #EQUAL to the number you specified
      5: ["match start", "say They're 5 players online so the match has started!"]
     
    #For more information about lists in YAML (Bukkit Config), please visit
    # http://en.wikipedia.org/wiki/YAML#Lists
     
  6. Offline

    grrocks

    Thanks! I will try it out the messages work great
     
Thread Status:
Not open for further replies.

Share This Page