9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-19 15:09:19 +00:00

chore: update to latest HibiscusCommons; getNMSVersion api adjusted to new enums

This commit is contained in:
lojosho
2025-03-18 20:42:23 -05:00
parent e31f000de6
commit 1212ab2025
2 changed files with 5 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ allprojects {
compileOnly("io.github.toxicity188:BetterCommand:1.3") //BetterCommand library
//compileOnly("it.unimi.dsi:fastutil:8.5.14")
compileOnly("org.projectlombok:lombok:1.18.34")
compileOnly("me.lojosho:HibiscusCommons:0.6.0-85d65299")
compileOnly("me.lojosho:HibiscusCommons:0.6.2-d21ebed8")
// Handled by Spigot Library Loader
compileOnly("net.kyori:adventure-api:4.19.0")

View File

@@ -10,6 +10,7 @@ import com.hibiscusmc.hmccosmetics.gui.Menus;
import com.hibiscusmc.hmccosmetics.user.CosmeticUser;
import com.hibiscusmc.hmccosmetics.user.CosmeticUserProvider;
import com.hibiscusmc.hmccosmetics.user.CosmeticUsers;
import me.lojosho.hibiscuscommons.nms.MinecraftVersion;
import me.lojosho.hibiscuscommons.nms.NMSHandlers;
import me.lojosho.shaded.configurate.ConfigurationNode;
import org.bukkit.Color;
@@ -200,7 +201,9 @@ public final class HMCCosmeticsAPI {
* @return the NMS version of the server in string format, or {@code null} if setup is not complete.
*/
public static @Nullable String getNMSVersion() {
return NMSHandlers.getVersion();
MinecraftVersion version = NMSHandlers.getVersion();
if (version == null) return null;
return version.toVersionString();
}
/**