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

stop multiple detected nms version messages

This commit is contained in:
LoJoSho
2023-01-13 10:49:21 -06:00
parent 5f3858b757
commit ca4690ef60

View File

@@ -27,10 +27,10 @@ public class NMSHandlers {
String packageVersion = packageName.substring(packageName.lastIndexOf('.') + 1);
for (String version : SUPPORTED_VERSION) {
MessagesUtil.sendDebugMessages(packageVersion + " has been detected.", Level.SEVERE);
if (!version.contains(packageVersion)) {
continue;
}
MessagesUtil.sendDebugMessages(packageVersion + " has been detected.", Level.SEVERE);
try {
//Class.forName("org.bukkit.craftbukkit." + version + ".block.CraftBlock").getName();
handler = (NMSHandler) Class.forName("com.hibiscusmc.hmccosmetics.nms." + packageVersion + ".NMSHandler").getConstructor().newInstance();