content: package cloud.polars.animations.spigot;
  
  import cloud.commandframework.annotations.AnnotationParser;
  import cloud.commandframework.arguments.parser.StandardParameters;
  import cloud.commandframework.bukkit.BukkitCommandManager.BrigadierFailureException;
  import cloud.commandframework.bukkit.CloudBukkitCapabilities;
  import cloud.commandframework.execution.CommandExecutionCoordinator;
  import cloud.commandframework.meta.CommandMeta;
  import cloud.commandframework.paper.PaperCommandManager;
  import net.kyori.adventure.platform.bukkit.BukkitAudiences;
  import org.bukkit.command.CommandSender;
  import org.bukkit.plugin.java.JavaPlugin;
  
  import java.util.function.Function;
  import java.util.logging.Level;
  
  public class AnimationsSpigot extends JavaPlugin {
      private static AnimationsSpigot instance;
      private BukkitAudiences audiences;
  
      private PaperCommandManager<CommandSender> commandManager;
      private AnnotationParser<CommandSender> annotationParser;
  
      @Override
      public void onLoad() {
          instance = this;
      }
  
      @Override
      public void onEnable() {
          audiences = BukkitAudiences.create(this);
  
          try {
              commandManager = new PaperCommandManager<>(
                      this,
                      CommandExecutionCoordinator.simpleCoordinator(),
                      Function.identity(),
                      Function.identity()
              );
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
  
          if (commandManager.hasCapability(CloudBukkitCapabilities.BRIGADIER)) {
              try {
                  commandManager.registerBrigadier();
              } catch (BrigadierFailureException e) {
                  getLogger().log(Level.WARNING, "Failed to register Brigadier Mappings");
              }
          }
  
          annotationParser = new AnnotationParser<>(
                  commandManager,
                  CommandSender.class,
                  p -> CommandMeta.simple()
                          .with(CommandMeta.DESCRIPTION, p.get(StandardParameters.DESCRIPTION, "No description"))
                          .build()
          );
      }
  
      public static AnimationsSpigot getInstance() {
          return instance;
      }
  }
  