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

feat: basic 1.20.2 support

This commit is contained in:
LoJoSho
2023-09-24 10:59:24 -05:00
parent 6e02331c13
commit 775b9c299d
7 changed files with 234 additions and 4 deletions

View File

@@ -98,7 +98,7 @@ public final class HMCCosmeticsPlugin extends JavaPlugin {
if (!emoteFile.exists()) emoteFile.mkdir();
// Player Animator
PlayerAnimatorImpl.initialize(this);
if (!NMSHandlers.getVersion().contains("v1_20_R2")) PlayerAnimatorImpl.initialize(this); // PlayerAnimator does not support 1.20.2 yet
// Configuration Sync
final File configFile = Path.of(getInstance().getDataFolder().getPath(), "config.yml").toFile();
@@ -252,7 +252,7 @@ public final class HMCCosmeticsPlugin extends JavaPlugin {
}
}
EmoteManager.loadEmotes();
if (!NMSHandlers.getVersion().contains("v1_20_R2")) EmoteManager.loadEmotes(); // PlayerAnimator does not support 1.20.2 yet
getInstance().getLogger().info("Successfully Enabled HMCCosmetics");
getInstance().getLogger().info(Cosmetics.values().size() + " Cosmetics Successfully Setup");

View File

@@ -9,7 +9,7 @@ import java.util.logging.Level;
public class NMSHandlers {
private static final String[] SUPPORTED_VERSION = new String[]{"v1_18_R2", "v1_19_R1", "v1_19_R2", "v1_19_R3", "v1_20_R1"};
private static final String[] SUPPORTED_VERSION = new String[]{"v1_18_R2", "v1_19_R1", "v1_19_R2", "v1_19_R3", "v1_20_R1", "v1_20_R2"};
private static NMSHandler handler;
@Getter
private static String version;