mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-28 03:19:15 +00:00
emo work
This commit is contained in:
@@ -23,6 +23,8 @@ import com.hibiscusmc.hmccosmetics.util.MessagesUtil;
|
||||
import com.hibiscusmc.hmccosmetics.util.TranslationUtil;
|
||||
import com.jeff_media.updatechecker.UpdateCheckSource;
|
||||
import com.jeff_media.updatechecker.UpdateChecker;
|
||||
import com.ticxo.playeranimator.PlayerAnimatorImpl;
|
||||
import com.ticxo.playeranimator.api.PlayerAnimator;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@@ -91,6 +93,9 @@ public final class HMCCosmeticsPlugin extends JavaPlugin {
|
||||
saveResource("menus/defaultmenu.yml", false);
|
||||
}
|
||||
|
||||
// Player Animator
|
||||
PlayerAnimatorImpl.initialize(this);
|
||||
|
||||
setup();
|
||||
|
||||
// Commands
|
||||
@@ -223,6 +228,17 @@ public final class HMCCosmeticsPlugin extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
File emoteFolder = new File(getInstance().getDataFolder().getPath() + "/emotes/");
|
||||
if (emoteFolder.exists()) {
|
||||
PlayerAnimator.api.getAnimationManager().clearRegistry();
|
||||
File[] emotesFiles = emoteFolder.listFiles();
|
||||
for (File emoteFile : emotesFiles) {
|
||||
if (!emoteFile.getName().contains("bbmodel")) continue;
|
||||
String animationName = emoteFile.getName().replaceAll("bbmodel", "");
|
||||
PlayerAnimator.api.getAnimationManager().importAnimations(animationName, emoteFile);
|
||||
}
|
||||
}
|
||||
|
||||
getInstance().getLogger().info("Successfully Enabled HMCCosmetics");
|
||||
getInstance().getLogger().info(Cosmetics.values().size() + " Cosmetics Successfully Setup");
|
||||
getInstance().getLogger().info(Menus.getMenuNames().size() + " Menus Successfully Setup");
|
||||
|
||||
Reference in New Issue
Block a user