mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-01-03 14:37:34 +01:00
Add option "customJoinMessage" #1044
This commit is contained in:
parent
979d8b98c4
commit
dcf046dfc5
@ -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 Dec 31 15:11:17 CET 2016. See docs/config/config.tpl.md -->
|
<!-- File auto-generated on Thu Jan 05 01:38:39 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,
|
||||||
@ -297,6 +297,12 @@ settings:
|
|||||||
broadcastWelcomeMessage: false
|
broadcastWelcomeMessage: false
|
||||||
# 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,
|
||||||
|
# use 'none' to use the original one.
|
||||||
|
# Available variables:,
|
||||||
|
# {PLAYERNAME}: the player name (no colors)
|
||||||
|
# {DISPLAYNAME}: the player name (with colors)
|
||||||
|
customJoinMessage: 'none'
|
||||||
# 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?
|
||||||
@ -453,4 +459,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 Dec 31 15:11:17 CET 2016
|
This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Thu Jan 05 01:38:39 CET 2017
|
||||||
|
@ -170,6 +170,11 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String customJoinMessage = settings.getProperty(RegistrationSettings.CUSTOM_JOIN_MESSAGE);
|
||||||
|
if (customJoinMessage.isEmpty() && ! customJoinMessage.equalsIgnoreCase("none")) {
|
||||||
|
event.setJoinMessage(customJoinMessage.replace("{PLAYERNAME}", player.getName())
|
||||||
|
.replace("{DISPLAYNAME]", player.getDisplayName()));
|
||||||
|
}
|
||||||
if (settings.getProperty(RegistrationSettings.REMOVE_JOIN_MESSAGE)) {
|
if (settings.getProperty(RegistrationSettings.REMOVE_JOIN_MESSAGE)) {
|
||||||
event.setJoinMessage(null);
|
event.setJoinMessage(null);
|
||||||
return;
|
return;
|
||||||
|
@ -73,6 +73,15 @@ public class RegistrationSettings implements SettingsHolder {
|
|||||||
public static final Property<Boolean> DELAY_JOIN_MESSAGE =
|
public static final Property<Boolean> DELAY_JOIN_MESSAGE =
|
||||||
newProperty("settings.delayJoinMessage", false);
|
newProperty("settings.delayJoinMessage", false);
|
||||||
|
|
||||||
|
@Comment({
|
||||||
|
"The custom join message that will be sent after a successful login,",
|
||||||
|
"use 'none' to use the original one.",
|
||||||
|
"Available variables:,",
|
||||||
|
"{PLAYERNAME}: the player name (no colors)",
|
||||||
|
"{DISPLAYNAME}: the player name (with colors)"})
|
||||||
|
public static final Property<String> CUSTOM_JOIN_MESSAGE =
|
||||||
|
newProperty("settings.customJoinMessage", "none");
|
||||||
|
|
||||||
@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 =
|
||||||
newProperty("settings.removeUnloggedLeaveMessage", false);
|
newProperty("settings.removeUnloggedLeaveMessage", false);
|
||||||
|
Loading…
Reference in New Issue
Block a user