fix clientversion check in guimanager

This commit is contained in:
jascotty2 2019-09-14 09:32:50 -05:00
parent a57a7a2d81
commit 2ce89ff705
2 changed files with 9 additions and 1 deletions

View File

@ -25,10 +25,18 @@ public enum ServerVersion {
return this.ordinal() < other.ordinal();
}
public boolean isAtOrBelow(ServerVersion other) {
return this.ordinal() <= other.ordinal();
}
public boolean isGreaterThan(ServerVersion other) {
return this.ordinal() > other.ordinal();
}
public boolean isAtLeast(ServerVersion other) {
return this.ordinal() >= other.ordinal();
}
public static String getServerVersionString() {
return serverPackageVersion;
}

View File

@ -103,7 +103,7 @@ public class GuiManager {
}
public void showPopup(Player player, String message, CompatibleMaterial icon, BackgroundType background) {
if (ClientVersion.getClientVersion(player).isServerVersionAtLeast(ServerVersion.V1_12)) {
if (ClientVersion.getClientVersion(player).isAtLeast(ServerVersion.V1_12)) {
PopupMessage popup = new PopupMessage(plugin, icon, message, background);
popup.add();
popup.grant(player);