// Path: src/main/java/com/btk5h/skriptmirror/skript/custom/condition/ConditionCheckEvent.java
// public class ConditionCheckEvent extends CustomSyntaxEvent {
//   private final static HandlerList handlers = new HandlerList();
//   private boolean markedContinue;
//   private boolean markedNegated;
// 
//   public ConditionCheckEvent(Event event, Expression<?>[] expressions, int matchedPattern,
//                              SkriptParser.ParseResult parseResult) {
//     super(event, expressions, matchedPattern, parseResult);
//   }
// 
//   public static HandlerList getHandlerList() {
//     return handlers;
//   }
// 
//   public boolean isMarkedContinue() {
//     return markedContinue;
//   }
// 
//   public boolean isMarkedNegated() {
//     return markedNegated;
//   }
// 
//   public void markContinue() {
//     markedContinue = true;
//   }
// 
//   public void markNegated() {
//     markedNegated = true;
//   }
// 
//   @Override
//   public HandlerList getHandlers() {
//     return handlers;
//   }
// }
// 
// Path: src/main/java/com/btk5h/skriptmirror/skript/custom/effect/EffectTriggerEvent.java
// public class EffectTriggerEvent extends CustomSyntaxEvent {
//   private final static HandlerList handlers = new HandlerList();
//   private final String which;
//   private final TriggerItem next;
//   private boolean sync = true;
// 
//   public EffectTriggerEvent(Event event, Expression<?>[] expressions, int matchedPattern,
//                             SkriptParser.ParseResult parseResult, String which, TriggerItem next) {
//     super(event, expressions, matchedPattern, parseResult);
//     this.which = which;
//     this.next = next;
//   }
// 
//   public String getWhich() {
//     return which;
//   }
// 
//   public TriggerItem getNext() {
//     return next;
//   }
// 
//   public boolean isSync() {
//     return sync;
//   }
// 
//   public void setSync(boolean sync) {
//     this.sync = sync;
//   }
// 
//   public static HandlerList getHandlerList() {
//     return handlers;
//   }
// 
//   @Override
//   public HandlerList getHandlers() {
//     return handlers;
//   }
// }
// 
// Path: src/main/java/com/btk5h/skriptmirror/skript/custom/expression/ExpressionChangeEvent.java
// public class ExpressionChangeEvent extends CustomSyntaxEvent {
//   private final static HandlerList handlers = new HandlerList();
//   private final Object[] delta;
// 
//   public ExpressionChangeEvent(Event event, Expression<?>[] expressions, int matchedPattern,
//                                SkriptParser.ParseResult parseResult, Object[] delta) {
//     super(event, expressions, matchedPattern, parseResult);
//     this.delta = delta;
//   }
// 
//   public static HandlerList getHandlerList() {
//     return handlers;
//   }
// 
//   public Object[] getDelta() {
//     return delta;
//   }
// 
//   @Override
//   public HandlerList getHandlers() {
//     return handlers;
//   }
// }
// 
// Path: src/main/java/com/btk5h/skriptmirror/skript/custom/expression/ExpressionGetEvent.java
// public class ExpressionGetEvent extends CustomSyntaxEvent {
//   private final static HandlerList handlers = new HandlerList();
//   private Object[] output;
// 
//   public ExpressionGetEvent(Event event, Expression<?>[] expressions, int matchedPattern,
//                             SkriptParser.ParseResult parseResult) {
//     super(event, expressions, matchedPattern, parseResult);
//   }
// 
//   public static HandlerList getHandlerList() {
//     return handlers;
//   }
// 
//   public Object[] getOutput() {
//     return output;
//   }
// 
//   public void setOutput(Object[] output) {
//     this.output = output;
//   }
// 
//   @Override
//   public HandlerList getHandlers() {
//     return handlers;
//   }
// }


import ch.njol.skript.ScriptLoader;
import ch.njol.skript.Skript;
import ch.njol.skript.lang.Expression;
import ch.njol.skript.lang.ExpressionType;
import ch.njol.skript.lang.SkriptParser;
import ch.njol.skript.lang.util.SimpleExpression;
import ch.njol.skript.log.ErrorQuality;
import ch.njol.util.Kleenean;
import com.btk5h.skriptmirror.skript.custom.condition.ConditionCheckEvent;
import com.btk5h.skriptmirror.skript.custom.effect.EffectTriggerEvent;
import com.btk5h.skriptmirror.skript.custom.expression.ExpressionChangeEvent;
import com.btk5h.skriptmirror.skript.custom.expression.ExpressionGetEvent;
import org.bukkit.event.Event;
package com.btk5h.skriptmirror.skript.custom;


public class ExprMatchedPattern extends SimpleExpression<Number> {
  static {
    Skript.registerExpression(ExprMatchedPattern.class, Number.class, ExpressionType.SIMPLE, "[the] [matched] pattern");
  }

  @Override
  protected Number[] get(Event e) {
    return new Number[]{((CustomSyntaxEvent) e).getMatchedPattern()};
  }

  @Override
  public boolean isSingle() {
    return true;
  }

  @Override
  public Class<? extends Number> getReturnType() {
    return Number.class;
  }

  @Override
  public String toString(Event e, boolean debug) {
    return "matched pattern";
  }

  @SuppressWarnings("unchecked")
  @Override
  public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelayed,
                      SkriptParser.ParseResult parseResult) {
    if (!ScriptLoader.isCurrentEvent(
        EffectTriggerEvent.class,
// Path: src/main/java/com/btk5h/skriptmirror/skript/custom/condition/ConditionCheckEvent.java
// public class ConditionCheckEvent extends CustomSyntaxEvent {
//   private final static HandlerList handlers = new HandlerList();
//   private boolean markedContinue;
//   private boolean markedNegated;
// 
//   public ConditionCheckEvent(Event event, Expression<?>[] expressions, int matchedPattern,
//                              SkriptParser.ParseResult parseResult) {
//     super(event, expressions, matchedPattern, parseResult);
//   }
// 
//   public static HandlerList getHandlerList() {
//     return handlers;
//   }
// 
//   public boolean isMarkedContinue() {
//     return markedContinue;
//   }
// 
//   public boolean isMarkedNegated() {
//     return markedNegated;
//   }
// 
//   public void markContinue() {
//     markedContinue = true;
//   }
// 
//   public void markNegated() {
//     markedNegated = true;
//   }
// 
//   @Override
//   public HandlerList getHandlers() {
//     return handlers;
//   }
// }
// 
// Path: src/main/java/com/btk5h/skriptmirror/skript/custom/effect/EffectTriggerEvent.java
// public class EffectTriggerEvent extends CustomSyntaxEvent {
//   private final static HandlerList handlers = new HandlerList();
//   private final String which;
//   private final TriggerItem next;
//   private boolean sync = true;
// 
//   public EffectTriggerEvent(Event event, Expression<?>[] expressions, int matchedPattern,
//                             SkriptParser.ParseResult parseResult, String which, TriggerItem next) {
//     super(event, expressions, matchedPattern, parseResult);
//     this.which = which;
//     this.next = next;
//   }
// 
//   public String getWhich() {
//     return which;
//   }
// 
//   public TriggerItem getNext() {
//     return next;
//   }
// 
//   public boolean isSync() {
//     return sync;
//   }
// 
//   public void setSync(boolean sync) {
//     this.sync = sync;
//   }
// 
//   public static HandlerList getHandlerList() {
//     return handlers;
//   }
// 
//   @Override
//   public HandlerList getHandlers() {
//     return handlers;
//   }
// }
// 
// Path: src/main/java/com/btk5h/skriptmirror/skript/custom/expression/ExpressionChangeEvent.java
// public class ExpressionChangeEvent extends CustomSyntaxEvent {
//   private final static HandlerList handlers = new HandlerList();
//   private final Object[] delta;
// 
//   public ExpressionChangeEvent(Event event, Expression<?>[] expressions, int matchedPattern,
//                                SkriptParser.ParseResult parseResult, Object[] delta) {
//     super(event, expressions, matchedPattern, parseResult);
//     this.delta = delta;
//   }
// 
//   public static HandlerList getHandlerList() {
//     return handlers;
//   }
// 
//   public Object[] getDelta() {
//     return delta;
//   }
// 
//   @Override
//   public HandlerList getHandlers() {
//     return handlers;
//   }
// }
// 
// Path: src/main/java/com/btk5h/skriptmirror/skript/custom/expression/ExpressionGetEvent.java
// public class ExpressionGetEvent extends CustomSyntaxEvent {
//   private final static HandlerList handlers = new HandlerList();
//   private Object[] output;
// 
//   public ExpressionGetEvent(Event event, Expression<?>[] expressions, int matchedPattern,
//                             SkriptParser.ParseResult parseResult) {
//     super(event, expressions, matchedPattern, parseResult);
//   }
// 
//   public static HandlerList getHandlerList() {
//     return handlers;
//   }
// 
//   public Object[] getOutput() {
//     return output;
//   }
// 
//   public void setOutput(Object[] output) {
//     this.output = output;
//   }
// 
//   @Override
//   public HandlerList getHandlers() {
//     return handlers;
//   }
// }


// Path: src/main/java/com/btk5h/skriptmirror/skript/custom/ExprMatchedPattern.java
import ch.njol.skript.ScriptLoader;
import ch.njol.skript.Skript;
import ch.njol.skript.lang.Expression;
import ch.njol.skript.lang.ExpressionType;
import ch.njol.skript.lang.SkriptParser;
import ch.njol.skript.lang.util.SimpleExpression;
import ch.njol.skript.log.ErrorQuality;
import ch.njol.util.Kleenean;
import com.btk5h.skriptmirror.skript.custom.condition.ConditionCheckEvent;
import com.btk5h.skriptmirror.skript.custom.effect.EffectTriggerEvent;
import com.btk5h.skriptmirror.skript.custom.expression.ExpressionChangeEvent;
import com.btk5h.skriptmirror.skript.custom.expression.ExpressionGetEvent;
import org.bukkit.event.Event;

package com.btk5h.skriptmirror.skript.custom;


public class ExprMatchedPattern extends SimpleExpression<Number> {
  static {
    Skript.registerExpression(ExprMatchedPattern.class, Number.class, ExpressionType.SIMPLE, "[the] [matched] pattern");
  }

  @Override
  protected Number[] get(Event e) {
    return new Number[]{((CustomSyntaxEvent) e).getMatchedPattern()};
  }

  @Override
  public boolean isSingle() {
    return true;
  }

  @Override
  public Class<? extends Number> getReturnType() {
    return Number.class;
  }

  @Override
  public String toString(Event e, boolean debug) {
    return "matched pattern";
  }

  @SuppressWarnings("unchecked")
  @Override
  public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelayed,
                      SkriptParser.ParseResult parseResult) {
    if (!ScriptLoader.isCurrentEvent(
        EffectTriggerEvent.class,
        ExpressionGetEvent.class,