mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-18 09:51:25 +02:00
Minor - don't read welcome message if unused
This commit is contained in:
parent
5b1d8c6429
commit
83d6d92a5c
@ -72,7 +72,7 @@ public class WelcomeMessageConfiguration implements Reloadable {
|
|||||||
@Override
|
@Override
|
||||||
public void reload() {
|
public void reload() {
|
||||||
List<String> welcomeMessage = new ArrayList<>();
|
List<String> welcomeMessage = new ArrayList<>();
|
||||||
for(String line : readWelcomeFile()) {
|
for (String line : readWelcomeFile()) {
|
||||||
welcomeMessage.add(ChatColor.translateAlternateColorCodes('&', line));
|
welcomeMessage.add(ChatColor.translateAlternateColorCodes('&', line));
|
||||||
}
|
}
|
||||||
messageSupplier = TagReplacer.newReplacer(availableTags, welcomeMessage);
|
messageSupplier = TagReplacer.newReplacer(availableTags, welcomeMessage);
|
||||||
@ -94,8 +94,8 @@ public class WelcomeMessageConfiguration implements Reloadable {
|
|||||||
* @param player the player for whom the welcome message should be prepared
|
* @param player the player for whom the welcome message should be prepared
|
||||||
*/
|
*/
|
||||||
public void sendWelcomeMessage(Player player) {
|
public void sendWelcomeMessage(Player player) {
|
||||||
List<String> welcomeMessage = getWelcomeMessage(player);
|
|
||||||
if (service.getProperty(RegistrationSettings.USE_WELCOME_MESSAGE)) {
|
if (service.getProperty(RegistrationSettings.USE_WELCOME_MESSAGE)) {
|
||||||
|
List<String> welcomeMessage = getWelcomeMessage(player);
|
||||||
if (service.getProperty(RegistrationSettings.BROADCAST_WELCOME_MESSAGE)) {
|
if (service.getProperty(RegistrationSettings.BROADCAST_WELCOME_MESSAGE)) {
|
||||||
welcomeMessage.forEach(bukkitService::broadcastMessage);
|
welcomeMessage.forEach(bukkitService::broadcastMessage);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user