mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-29 20:17:36 +01:00
Don't use the customJoinMessage if removeJoinMessage is enabled
This commit is contained in:
parent
6cf8789fe0
commit
044e3e3845
@ -166,7 +166,9 @@ public class PlayerListener implements Listener {
|
|||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onJoinMessage(PlayerJoinEvent event) {
|
public void onJoinMessage(PlayerJoinEvent event) {
|
||||||
final Player player = event.getPlayer();
|
final Player player = event.getPlayer();
|
||||||
if (player == null) {
|
|
||||||
|
if (settings.getProperty(RegistrationSettings.REMOVE_JOIN_MESSAGE)) {
|
||||||
|
event.setJoinMessage(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,10 +177,7 @@ public class PlayerListener implements Listener {
|
|||||||
event.setJoinMessage(customJoinMessage.replace("{PLAYERNAME}", player.getName())
|
event.setJoinMessage(customJoinMessage.replace("{PLAYERNAME}", player.getName())
|
||||||
.replace("{DISPLAYNAME]", player.getDisplayName()));
|
.replace("{DISPLAYNAME]", player.getDisplayName()));
|
||||||
}
|
}
|
||||||
if (settings.getProperty(RegistrationSettings.REMOVE_JOIN_MESSAGE)) {
|
|
||||||
event.setJoinMessage(null);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!settings.getProperty(RegistrationSettings.DELAY_JOIN_MESSAGE)) {
|
if (!settings.getProperty(RegistrationSettings.DELAY_JOIN_MESSAGE)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user