CommandTrigger

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

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.


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    52779
  • Created
    Feb 28, 2013
  • Last Released File
    Never
  • Total Downloads
    0
  • License

Categories

Members

Recent Files

No files uploaded yet.