// Path: src/main/java/com/btk5h/skriptmirror/JavaType.java
// public final class JavaType {
//   private final Class<?> javaClass;
// 
//   public JavaType(Class<?> javaClass) {
//     this.javaClass = javaClass;
//   }
// 
//   public Class<?> getJavaClass() {
//     return javaClass;
//   }
// 
//   @Override
//   public boolean equals(Object o) {
//     if (this == o) return true;
//     if (o == null || getClass() != o.getClass()) return false;
//     JavaType javaType1 = (JavaType) o;
//     return Objects.equals(javaClass, javaType1.javaClass);
//   }
// 
//   @Override
//   public int hashCode() {
//     return Objects.hash(javaClass);
//   }
// }
// 
// Path: src/main/java/com/btk5h/skriptmirror/SkriptMirror.java
// public class SkriptMirror extends JavaPlugin {
//   private static SkriptMirror instance;
//   private static SkriptAddon addonInstance;
// 
//   public SkriptMirror() {
//     if (instance == null) {
//       instance = this;
//     } else {
//       throw new IllegalStateException();
//     }
//   }
// 
//   @Override
//   public void onEnable() {
//     try {
//       getAddonInstance().loadClasses("com.btk5h.skriptmirror.skript");
// 
//       Path dataFolder = SkriptMirror.getInstance().getDataFolder().toPath();
//       LibraryLoader.loadLibraries(dataFolder);
// 
//       ParseOrderWorkarounds.reorderSyntax();
//     } catch (IOException e) {
//       e.printStackTrace();
//     }
//   }
// 
//   public static SkriptAddon getAddonInstance() {
//     if (addonInstance == null) {
//       addonInstance = Skript.registerAddon(getInstance())
//           .setLanguageFileDirectory("lang");
//     }
//     return addonInstance;
//   }
// 
//   public static SkriptMirror getInstance() {
//     if (instance == null) {
//       throw new IllegalStateException();
//     }
//     return instance;
//   }
// }
// 
// Path: src/main/java/com/btk5h/skriptmirror/WrappedEvent.java
// public abstract class WrappedEvent extends Event {
//   private final Event event;
// 
//   protected WrappedEvent(Event event) {
//     this.event = event;
//   }
// 
//   public Event getEvent() {
//     return event instanceof WrappedEvent ? ((WrappedEvent) event).getEvent() : event;
//   }
// 
//   public Event getDirectEvent() {
//     return event;
//   }
// }


import ch.njol.skript.Skript;
import ch.njol.skript.SkriptConfig;
import ch.njol.skript.lang.Literal;
import ch.njol.skript.lang.SkriptEvent;
import ch.njol.skript.lang.SkriptParser;
import com.btk5h.skriptmirror.JavaType;
import com.btk5h.skriptmirror.SkriptMirror;
import com.btk5h.skriptmirror.WrappedEvent;
import org.bukkit.Bukkit;
import org.bukkit.event.*;
import org.bukkit.plugin.EventExecutor;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
      return handlers;
    }

    @Override
    public HandlerList getHandlers() {
      return handlers;
    }

    @Override
    public boolean isCancelled() {
      Event event = getEvent();
      return getEvent() instanceof Cancellable && ((Cancellable) event).isCancelled();
    }

    @Override
    public void setCancelled(boolean cancel) {
      Event event = getEvent();
      if (event instanceof Cancellable) {
        ((Cancellable) event).setCancelled(cancel);
      }
    }
  }

  private static void registerEvent(Class<? extends Event> event, EventPriority priority, boolean ignoreCancelled) {
    PriorityListener listener = listeners[priority.ordinal()];
    Set<Class<? extends Event>> events = listener.getEvents();

    if (!events.contains(event)) {
      events.add(event);
      Bukkit.getPluginManager()
// Path: src/main/java/com/btk5h/skriptmirror/JavaType.java
// public final class JavaType {
//   private final Class<?> javaClass;
// 
//   public JavaType(Class<?> javaClass) {
//     this.javaClass = javaClass;
//   }
// 
//   public Class<?> getJavaClass() {
//     return javaClass;
//   }
// 
//   @Override
//   public boolean equals(Object o) {
//     if (this == o) return true;
//     if (o == null || getClass() != o.getClass()) return false;
//     JavaType javaType1 = (JavaType) o;
//     return Objects.equals(javaClass, javaType1.javaClass);
//   }
// 
//   @Override
//   public int hashCode() {
//     return Objects.hash(javaClass);
//   }
// }
// 
// Path: src/main/java/com/btk5h/skriptmirror/SkriptMirror.java
// public class SkriptMirror extends JavaPlugin {
//   private static SkriptMirror instance;
//   private static SkriptAddon addonInstance;
// 
//   public SkriptMirror() {
//     if (instance == null) {
//       instance = this;
//     } else {
//       throw new IllegalStateException();
//     }
//   }
// 
//   @Override
//   public void onEnable() {
//     try {
//       getAddonInstance().loadClasses("com.btk5h.skriptmirror.skript");
// 
//       Path dataFolder = SkriptMirror.getInstance().getDataFolder().toPath();
//       LibraryLoader.loadLibraries(dataFolder);
// 
//       ParseOrderWorkarounds.reorderSyntax();
//     } catch (IOException e) {
//       e.printStackTrace();
//     }
//   }
// 
//   public static SkriptAddon getAddonInstance() {
//     if (addonInstance == null) {
//       addonInstance = Skript.registerAddon(getInstance())
//           .setLanguageFileDirectory("lang");
//     }
//     return addonInstance;
//   }
// 
//   public static SkriptMirror getInstance() {
//     if (instance == null) {
//       throw new IllegalStateException();
//     }
//     return instance;
//   }
// }
// 
// Path: src/main/java/com/btk5h/skriptmirror/WrappedEvent.java
// public abstract class WrappedEvent extends Event {
//   private final Event event;
// 
//   protected WrappedEvent(Event event) {
//     this.event = event;
//   }
// 
//   public Event getEvent() {
//     return event instanceof WrappedEvent ? ((WrappedEvent) event).getEvent() : event;
//   }
// 
//   public Event getDirectEvent() {
//     return event;
//   }
// }


// Path: src/main/java/com/btk5h/skriptmirror/skript/reflect/EvtByReflection.java
import ch.njol.skript.Skript;
import ch.njol.skript.SkriptConfig;
import ch.njol.skript.lang.Literal;
import ch.njol.skript.lang.SkriptEvent;
import ch.njol.skript.lang.SkriptParser;
import com.btk5h.skriptmirror.JavaType;
import com.btk5h.skriptmirror.SkriptMirror;
import com.btk5h.skriptmirror.WrappedEvent;
import org.bukkit.Bukkit;
import org.bukkit.event.*;
import org.bukkit.plugin.EventExecutor;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

      return handlers;
    }

    @Override
    public HandlerList getHandlers() {
      return handlers;
    }

    @Override
    public boolean isCancelled() {
      Event event = getEvent();
      return getEvent() instanceof Cancellable && ((Cancellable) event).isCancelled();
    }

    @Override
    public void setCancelled(boolean cancel) {
      Event event = getEvent();
      if (event instanceof Cancellable) {
        ((Cancellable) event).setCancelled(cancel);
      }
    }
  }

  private static void registerEvent(Class<? extends Event> event, EventPriority priority, boolean ignoreCancelled) {
    PriorityListener listener = listeners[priority.ordinal()];
    Set<Class<? extends Event>> events = listener.getEvents();

    if (!events.contains(event)) {
      events.add(event);
      Bukkit.getPluginManager()
          .registerEvent(event, listener, priority, executor, SkriptMirror.getInstance(), ignoreCancelled);