Add 1.14 compatibility

This commit is contained in:
Gabriele C
2019-04-23 17:18:42 +02:00
parent 85194fa94d
commit 5b97841699
11 changed files with 27 additions and 26 deletions
@@ -7,6 +7,7 @@ import fr.xephi.authme.initialization.Reloadable;
import fr.xephi.authme.service.BukkitService;
import fr.xephi.authme.service.CommonService;
import fr.xephi.authme.service.GeoIpService;
import fr.xephi.authme.settings.properties.PluginSettings;
import fr.xephi.authme.settings.properties.RegistrationSettings;
import fr.xephi.authme.util.PlayerUtils;
import fr.xephi.authme.util.lazytags.Tag;
@@ -65,7 +66,7 @@ public class WelcomeMessageConfiguration implements Reloadable {
createTag("{IP}", PlayerUtils::getPlayerIp),
createTag("{LOGINS}", () -> Integer.toString(playerCache.getLogged())),
createTag("{WORLD}", pl -> pl.getWorld().getName()),
createTag("{SERVER}", () -> server.getServerName()),
createTag("{SERVER}", () -> service.getProperty(PluginSettings.SERVER_NAME)),
createTag("{VERSION}", () -> server.getBukkitVersion()),
createTag("{COUNTRY}", pl -> geoIpService.getCountryName(PlayerUtils.getPlayerIp(pl))));
@@ -90,6 +90,9 @@ public final class PluginSettings implements SettingsHolder {
public static final Property<Boolean> USE_ASYNC_PRE_LOGIN_EVENT =
newProperty("settings.useAsyncPreLoginEvent", true);
@Comment("The name of the server, used in some placeholders.")
public static final Property<String> SERVER_NAME = newProperty("settings.serverName", "Your Minecraft Server");
private PluginSettings() {
}