mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-10-22 12:20:26 +02:00
fix clientversion check in guimanager
This commit is contained in:
parent
a57a7a2d81
commit
2ce89ff705
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user