diff --git a/src/main/java/com/shanebeestudios/skbee/api/util/SkriptUtils.java b/src/main/java/com/shanebeestudios/skbee/api/util/SkriptUtils.java index 5b6a06a90..caea260c9 100644 --- a/src/main/java/com/shanebeestudios/skbee/api/util/SkriptUtils.java +++ b/src/main/java/com/shanebeestudios/skbee/api/util/SkriptUtils.java @@ -33,13 +33,13 @@ public class SkriptUtils { * @return True if parsed correctly else false */ public static boolean parseEffect(String stringEffect, CommandSender sender, Event parentEvent) { - Effect effect = Effect.parse(stringEffect, null); - if (effect == null) return false; - Event newEvent = new EffectCommandEvent(sender, stringEffect); ParserInstance parserInstance = ParserInstance.get(); parserInstance.setCurrentEvent("effect command", EffectCommandEvent.class); + Effect effect = Effect.parse(stringEffect, null); + if (effect == null) return false; + AtomicBoolean parsed = new AtomicBoolean(false); Variables.withLocalVariables(parentEvent, newEvent, () -> parsed.set(TriggerItem.walk(effect, newEvent))); parserInstance.deleteCurrentEvent(); diff --git a/src/main/java/com/shanebeestudios/skbee/elements/itemcomponent/types/Types.java b/src/main/java/com/shanebeestudios/skbee/elements/itemcomponent/types/Types.java index 9ea808f8b..32879697e 100644 --- a/src/main/java/com/shanebeestudios/skbee/elements/itemcomponent/types/Types.java +++ b/src/main/java/com/shanebeestudios/skbee/elements/itemcomponent/types/Types.java @@ -6,6 +6,7 @@ import ch.njol.util.Math2; import com.github.shanebeee.skr.Registration; import com.shanebeestudios.skbee.api.registry.KeyUtils; +import com.shanebeestudios.skbee.api.util.Util; import io.papermc.paper.datacomponent.DataComponentType; import io.papermc.paper.datacomponent.item.consumable.ConsumeEffect; import io.papermc.paper.datacomponent.item.consumable.ConsumeEffect.ApplyStatusEffects; @@ -60,7 +61,8 @@ public String toVariableNameString(ConsumeEffect consumeEffect) { .user("data ?component ?types?") .name("Data Component Type") .description("Represents the different types of data components.", - "See [**Data Components**](https://minecraft.wiki/w/Data_component_format#List_of_components) on McWiki for more detailed info.") + "See [**Data Components**](https://minecraft.wiki/w/Data_component_format#List_of_components) on McWiki for more detailed info.", + Util.AUTO_GEN_NOTE) .since("3.11.0") .register(); diff --git a/src/main/java/com/shanebeestudios/skbee/elements/other/expressions/ExprKnockbackAttackerVictim.java b/src/main/java/com/shanebeestudios/skbee/elements/other/expressions/ExprKnockbackAttackerVictim.java index cbd15c2b9..4d7001c9f 100644 --- a/src/main/java/com/shanebeestudios/skbee/elements/other/expressions/ExprKnockbackAttackerVictim.java +++ b/src/main/java/com/shanebeestudios/skbee/elements/other/expressions/ExprKnockbackAttackerVictim.java @@ -15,16 +15,16 @@ public class ExprKnockbackAttackerVictim extends SimpleExpression implements EventRestrictedSyntax { public static void register(Registration reg) { - reg.newSimpleExpression(ExprKnockbackAttackerVictim.class, Entity.class, "simple", - "[the] knockback (:attacker|victim)") - .name("Knockback Attacker/Victim") - .description("The attacker/victim in an entity knockback event.") - .examples("on entity knockback:", - "\tif knockback attacker is a player:", - "\t\tif knockback victim is a sheep:", - "\t\t\tcancel event") - .since("1.8.0") - .register(); + reg.newSimpleExpression(ExprKnockbackAttackerVictim.class, Entity.class, + "[the] knockback (:attacker|victim)") + .name("Knockback Attacker/Victim") + .description("The attacker/victim in an entity knockback event.") + .examples("on entity knockback:", + "\tif knockback attacker is a player:", + "\t\tif knockback victim is a sheep:", + "\t\t\tcancel event") + .since("1.8.0") + .register(); } private boolean useAttacker; diff --git a/src/main/java/com/shanebeestudios/skbee/elements/other/expressions/ExprKnockbackVelocity.java b/src/main/java/com/shanebeestudios/skbee/elements/other/expressions/ExprKnockbackVelocity.java index 34ad6ed3a..df1412715 100644 --- a/src/main/java/com/shanebeestudios/skbee/elements/other/expressions/ExprKnockbackVelocity.java +++ b/src/main/java/com/shanebeestudios/skbee/elements/other/expressions/ExprKnockbackVelocity.java @@ -17,14 +17,14 @@ public class ExprKnockbackVelocity extends SimpleExpression implements EventRestrictedSyntax { public static void register(Registration reg) { - reg.newSimpleExpression(ExprKnockbackVelocity.class, Vector.class, "simple", - "[the] knockback velocity") - .name("Knockback Velocity") - .description("The knockback velocity in an entity knockback event.") - .examples("on entity knockback:", - "\tset knockback velocity to knockback velocity * -1") - .since("3.16.0") - .register(); + reg.newSimpleExpression(ExprKnockbackVelocity.class, Vector.class, + "[the] knockback velocity") + .name("Knockback Velocity") + .description("The knockback velocity in an entity knockback event.") + .examples("on entity knockback:", + "\tset knockback velocity to knockback velocity * -1") + .since("3.16.0") + .register(); } @Override