promotional bannermobile promotional banner

CommandTrigger

Abandoned
Execute a command when a preset trigger occurs.

Execute a command when a preset trigger (or event) occurs.

Concept

This was originally inspired by a plugin request on the BukkitDev forums, but has been expanded in scope to cover a more general purpose.

CommandTrigger's very first release will allow you to run a command from the console automatically when:

  • A player joins the server
  • A player leaves the server

Installation

  1. Copy the JAR file into your /plugins directory
  2. Start your Minecraft server
  3. Edit the configuration file
    • Set enabled: true
    • Modify the example triggers (see below)
  4. Run /commandtrigger reload from your console window
  5. Add permission nodes to users (see below)

You're good to go!

Configuration

This is the default config.yml contents at this point in time.

The triggers in this examples are named 'example', 'saveonjoin' and 'saveonquit'. You can name your triggers whatever you like. Following each trigger name is the command that will be executed when the criteria for it are met (a player with the correct permission node has joined or left the game).

# CommandTrigger configuration file
# Request new features on BukkitDev
# Triggers only occur when the player has the permission (e.g. 'CommandTrigger.triggers.playerjoin.example')

settings:
  enabled: false
triggers:
  playerjoin:
    - example
      - msg {name} Welcome to the server!
    - saveonjoin
      - save-all
  playerquit:
    - saveonquit
      - save-all

The syntax for a trigger is as follows:

triggers: # DO NOT change this value.
  playerjoin: # Trigger type (playerjoin, playerquit)
    - example # Trigger name (anything you want)
      - msg {name} Welcome to the server! # Command to be executed

Permissions

PermissionDescription
CommandTrigger.adminGives access to run /commandtrigger reload
CommandTrigger.triggers.playerjoin.triggernameGives access to run a trigger with name triggername

Note: If you have any operators, or users with the *.* permission node, manually negate any permissions that you do not want to apply to them.

The CommandTrigger Team

profile avatar
  • 4
    Projects
  • 26.9K
    Downloads

More from _ForgeUser7484797

  • KeepItems project image

    KeepItems

    • 18.8K
    • Bukkit Plugins

    KeepItems allows you to prevent certain users from dropping or losing items.

    • 18.8K
    • February 21, 2013
    • Bukkit Plugins
  • LDLogger project image

    LDLogger

    • 7.1K
    • Bukkit Plugins

    LDLogger logs a number of events on the server, and reports them to staff in chat.

    • 7.1K
    • February 6, 2013
    • Bukkit Plugins
    • +2
  • PluginWall project image

    PluginWall

    • 908
    • Bukkit Plugins

    PluginWall

    • 908
    • November 24, 2012
    • Bukkit Plugins
  • KeepItems project image

    KeepItems

    • 18.8K
    • Bukkit Plugins

    KeepItems allows you to prevent certain users from dropping or losing items.

    • 18.8K
    • February 21, 2013
    • Bukkit Plugins
  • LDLogger project image

    LDLogger

    • 7.1K
    • Bukkit Plugins

    LDLogger logs a number of events on the server, and reports them to staff in chat.

    • 7.1K
    • February 6, 2013
    • Bukkit Plugins
    • +2
  • PluginWall project image

    PluginWall

    • 908
    • Bukkit Plugins

    PluginWall

    • 908
    • November 24, 2012
    • Bukkit Plugins