mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-01 14:43:42 +01:00
#1044 Fix custom join message feature; change default to empty string
This commit is contained in:
parent
deb5c65f89
commit
47e6cc4885
@ -1,5 +1,5 @@
|
|||||||
<!-- AUTO-GENERATED FILE! Do not edit this directly -->
|
<!-- AUTO-GENERATED FILE! Do not edit this directly -->
|
||||||
<!-- File auto-generated on Sat Jan 07 11:07:10 CET 2017. See docs/config/config.tpl.md -->
|
<!-- File auto-generated on Sat Jan 07 11:33:48 CET 2017. See docs/config/config.tpl.md -->
|
||||||
|
|
||||||
## AuthMe Configuration
|
## AuthMe Configuration
|
||||||
The first time you run AuthMe it will create a config.yml file in the plugins/AuthMe folder,
|
The first time you run AuthMe it will create a config.yml file in the plugins/AuthMe folder,
|
||||||
@ -299,11 +299,11 @@ settings:
|
|||||||
# Should we delay the join message and display it once the player has logged in?
|
# Should we delay the join message and display it once the player has logged in?
|
||||||
delayJoinMessage: false
|
delayJoinMessage: false
|
||||||
# The custom join message that will be sent after a successful login,
|
# The custom join message that will be sent after a successful login,
|
||||||
# use 'none' to use the original one.
|
# keep empty to use the original one.
|
||||||
# Available variables:,
|
# Available variables:
|
||||||
# {PLAYERNAME}: the player name (no colors)
|
# {PLAYERNAME}: the player name (no colors)
|
||||||
# {DISPLAYNAME}: the player name (with colors)
|
# {DISPLAYNAME}: the player name (with colors)
|
||||||
customJoinMessage: 'none'
|
customJoinMessage: ''
|
||||||
# Should we remove the leave messages of unlogged users?
|
# Should we remove the leave messages of unlogged users?
|
||||||
removeUnloggedLeaveMessage: false
|
removeUnloggedLeaveMessage: false
|
||||||
# Should we remove join messages altogether?
|
# Should we remove join messages altogether?
|
||||||
@ -460,4 +460,4 @@ To change settings on a running server, save your changes to config.yml and use
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sat Jan 07 11:07:10 CET 2017
|
This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sat Jan 07 11:33:48 CET 2017
|
||||||
|
@ -173,7 +173,7 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String customJoinMessage = settings.getProperty(RegistrationSettings.CUSTOM_JOIN_MESSAGE);
|
String customJoinMessage = settings.getProperty(RegistrationSettings.CUSTOM_JOIN_MESSAGE);
|
||||||
if (customJoinMessage.isEmpty() && ! customJoinMessage.equalsIgnoreCase("none")) {
|
if (!customJoinMessage.isEmpty()) {
|
||||||
event.setJoinMessage(customJoinMessage.replace("{PLAYERNAME}", player.getName())
|
event.setJoinMessage(customJoinMessage.replace("{PLAYERNAME}", player.getName())
|
||||||
.replace("{DISPLAYNAME]", player.getDisplayName()));
|
.replace("{DISPLAYNAME]", player.getDisplayName()));
|
||||||
}
|
}
|
||||||
|
@ -76,12 +76,12 @@ public class RegistrationSettings implements SettingsHolder {
|
|||||||
|
|
||||||
@Comment({
|
@Comment({
|
||||||
"The custom join message that will be sent after a successful login,",
|
"The custom join message that will be sent after a successful login,",
|
||||||
"use 'none' to use the original one.",
|
"keep empty to use the original one.",
|
||||||
"Available variables:,",
|
"Available variables:",
|
||||||
"{PLAYERNAME}: the player name (no colors)",
|
"{PLAYERNAME}: the player name (no colors)",
|
||||||
"{DISPLAYNAME}: the player name (with colors)"})
|
"{DISPLAYNAME}: the player name (with colors)"})
|
||||||
public static final Property<String> CUSTOM_JOIN_MESSAGE =
|
public static final Property<String> CUSTOM_JOIN_MESSAGE =
|
||||||
newProperty("settings.customJoinMessage", "none");
|
newProperty("settings.customJoinMessage", "");
|
||||||
|
|
||||||
@Comment("Should we remove the leave messages of unlogged users?")
|
@Comment("Should we remove the leave messages of unlogged users?")
|
||||||
public static final Property<Boolean> REMOVE_UNLOGGED_LEAVE_MESSAGE =
|
public static final Property<Boolean> REMOVE_UNLOGGED_LEAVE_MESSAGE =
|
||||||
|
Loading…
Reference in New Issue
Block a user