From 18d81868042a8af15f0cd66e9835f7e03741219e Mon Sep 17 00:00:00 2001 From: ljacqu Date: Mon, 20 Feb 2017 21:18:13 +0100 Subject: [PATCH] #1026 List all available tags for commands.yml in comment --- .../settings/commandconfig/CommandSettingsHolder.java | 7 ++++++- src/main/resources/commands.yml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/xephi/authme/settings/commandconfig/CommandSettingsHolder.java b/src/main/java/fr/xephi/authme/settings/commandconfig/CommandSettingsHolder.java index 11557c09..7104cee2 100644 --- a/src/main/java/fr/xephi/authme/settings/commandconfig/CommandSettingsHolder.java +++ b/src/main/java/fr/xephi/authme/settings/commandconfig/CommandSettingsHolder.java @@ -24,7 +24,12 @@ public final class CommandSettingsHolder implements SettingsHolder { public static Map sectionComments() { String[] comments = { "This configuration file allows you to execute commands on various events.", - "%p in commands will be replaced with the player name.", + "Supported placeholders in commands:", + " %p is replaced with the player name.", + " %nick is replaced with the player's nick name", + " %ip is replaced with the player's IP address", + " %country is replaced with the player's country", + "", "For example, if you want to send a welcome message to a player who just registered:", "onRegister:", " welcome:", diff --git a/src/main/resources/commands.yml b/src/main/resources/commands.yml index e2001096..e0330bf9 100644 --- a/src/main/resources/commands.yml +++ b/src/main/resources/commands.yml @@ -1,6 +1,11 @@ # This configuration file allows you to execute commands on various events. -# %p in commands will be replaced with the player name. +# Supported placeholders in commands: +# %p is replaced with the player name. +# %nick is replaced with the player's nick name +# %ip is replaced with the player's IP address +# %country is replaced with the player's country +# # For example, if you want to send a welcome message to a player who just registered: # onRegister: # welcome: