Minor - don't read welcome message if unused

This commit is contained in:
ljacqu 2017-10-08 20:05:04 +02:00
parent 5b1d8c6429
commit 83d6d92a5c

View File

@ -94,8 +94,8 @@ public class WelcomeMessageConfiguration implements Reloadable {
* @param player the player for whom the welcome message should be prepared
*/
public void sendWelcomeMessage(Player player) {
List<String> welcomeMessage = getWelcomeMessage(player);
if (service.getProperty(RegistrationSettings.USE_WELCOME_MESSAGE)) {
List<String> welcomeMessage = getWelcomeMessage(player);
if (service.getProperty(RegistrationSettings.BROADCAST_WELCOME_MESSAGE)) {
welcomeMessage.forEach(bukkitService::broadcastMessage);
} else {