#411 Improve command migration handling, write tests

This commit is contained in:
ljacqu
2016-11-24 17:39:57 +01:00
parent e83935c11e
commit f6ed39b118
14 changed files with 248 additions and 57 deletions
+7 -5
View File
@@ -1,24 +1,26 @@
# This configuration file allows you to execute commands on various events.
# %p in commands will be replaced with the player name.
# For example, if you want to message a welcome message to a player who just registered:
# For example, if you want to send a welcome message to a player who just registered:
# onRegister:
# welcome:
# command: 'msg %p Welcome to the server!'
# as: CONSOLE
#
#
# This will make the console execute the msg command to the player.
# Each command under an event has a name you can choose freely (e.g. 'welcome' as above),
# after which a mandatory 'command' field defines the command to run,
# after which a mandatory 'command' field defines the command to run,
# and 'as' defines who will run the command (either PLAYER or CONSOLE). Longer example:
# onLogin:
# welcome:
# command: 'msg %p Welcome back!'
# # as: PLAYER # player is the default, you can leave this out if you want
# as: PLAYER
# broadcast:
# command: 'broadcast %p has joined, welcome back!'
# as: CONSOLE
#
# Supported command events: onLogin, onJoin, onRegister
onLogin:
welcome:
command: 'msg %p Welcome back!'
executor: 'PLAYER'
executor: 'PLAYER'