Adjust code style
This commit is contained in:
parent
b9648393a7
commit
e922422922
@ -142,7 +142,7 @@ public class ProtocolLibService implements SettingsDependent {
|
||||
|
||||
this.protectInvBeforeLogin = settings.getProperty(RestrictionSettings.PROTECT_INVENTORY_BEFORE_LOGIN);
|
||||
this.denyTabCompleteBeforeLogin = settings.getProperty(RestrictionSettings.DENY_TABCOMPLETE_BEFORE_LOGIN);
|
||||
this.i18nMessagesSending = settings.getProperty(PluginSettings.I18N_MESSAGES) && Utils.majorVersion <= 15;
|
||||
this.i18nMessagesSending = settings.getProperty(PluginSettings.I18N_MESSAGES) && Utils.MAJOR_VERSION <= 15;
|
||||
|
||||
//it was true and will be deactivated now, so we need to restore the inventory for every player
|
||||
if (oldProtectInventory && !protectInvBeforeLogin && inventoryPacketAdapter != null) {
|
||||
|
||||
@ -113,7 +113,7 @@ public final class Utils {
|
||||
.substring(0, Bukkit.getServer().getBukkitVersion().indexOf("-"))
|
||||
.split("\\.");
|
||||
|
||||
private final static int mcFirstVersion = Integer.parseInt(serverVersion[0]);
|
||||
public final static int majorVersion = Integer.parseInt(serverVersion[1]);
|
||||
public final static int minorVersion = serverVersion.length == 3 ? Integer.parseInt(serverVersion[2]) : 0;
|
||||
private final static int FIRST_VERSION = Integer.parseInt(serverVersion[0]);
|
||||
public final static int MAJOR_VERSION = Integer.parseInt(serverVersion[1]);
|
||||
public final static int MINOR_VERSION = serverVersion.length == 3 ? Integer.parseInt(serverVersion[2]) : 0;
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ public class I18NUtils {
|
||||
* @param player The player
|
||||
*/
|
||||
public static String getLocale(Player player) {
|
||||
if (Utils.majorVersion > 15) {
|
||||
if (Utils.MAJOR_VERSION > 15) {
|
||||
return player.getLocale().toLowerCase();
|
||||
} else {
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user