Skip to content

Commit 67b36b3

Browse files
committed
1.3.4
1 parent 182ad7f commit 67b36b3

File tree

8 files changed

+34
-24
lines changed

8 files changed

+34
-24
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repositories {
2323

2424
dependencies {
2525
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
26-
compileOnly("com.github.SkriptLang:Skript:2.10.2")
26+
compileOnly("com.github.SkriptLang:Skript:2.12.0")
2727
implementation "org.joml:joml:${jomlVersion}"
2828
}
2929

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = 1.3.3
1+
version = 1.3.4

src/main/java/com/sovdee/skriptparticles/elements/expressions/constructors/ExprBezierCurve.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package com.sovdee.skriptparticles.elements.expressions.constructors;
22

33
import ch.njol.skript.Skript;
4+
import ch.njol.skript.doc.Description;
5+
import ch.njol.skript.doc.Examples;
6+
import ch.njol.skript.doc.Name;
7+
import ch.njol.skript.doc.Since;
48
import ch.njol.skript.lang.Expression;
59
import ch.njol.skript.lang.ExpressionType;
6-
import ch.njol.skript.lang.Literal;
710
import ch.njol.skript.lang.SkriptParser.ParseResult;
811
import ch.njol.skript.lang.util.SimpleExpression;
912
import ch.njol.util.Kleenean;
1013
import com.sovdee.skriptparticles.shapes.BezierCurve;
11-
import com.sovdee.skriptparticles.shapes.Circle;
12-
import com.sovdee.skriptparticles.shapes.Shape;
13-
import com.sovdee.skriptparticles.util.MathUtil;
1414
import com.sovdee.skriptparticles.util.Point;
1515
import org.bukkit.event.Event;
1616
import org.checkerframework.checker.nullness.qual.NonNull;
@@ -19,6 +19,15 @@
1919
import java.util.ArrayList;
2020
import java.util.List;
2121

22+
@Name("Particle Bezier Curve")
23+
@Description({
24+
"Creates a bezier curve between the given start and end points, using the given control points to change the curve."
25+
})
26+
@Examples({
27+
"set {_shape} to a bezier curve from {a} to {b} with control points {c} and {d}",
28+
"set {_shape} to a curve from player to player's target with control point (location 3 above player)"
29+
})
30+
@Since("1.3.0")
2231
public class ExprBezierCurve extends SimpleExpression<BezierCurve> {
2332

2433
static {

src/main/java/com/sovdee/skriptparticles/elements/expressions/properties/ExprShapeLWH.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,21 @@
1515

1616
@Name("Shape Length/Width/Height")
1717
@Description({
18-
"The length, width, or height of a shape. Changing this will change the size of the shape. Resetting or deleting it will set it back to the default value of 1.",
19-
"Be sure to use 'shape length' instead of just 'length' to avoid conflicts with other syntax."
18+
"The length, width, or height of a shape. Changing this will change the size of the shape. Resetting or deleting it will set it back to the default value of 1."
2019
})
2120
@Examples({
22-
"set {_shape}'s length to 5",
23-
"set {_shape}'s width to 5",
24-
"set {_shape}'s height to 5",
25-
"reset {_shape}'s length",
26-
"reset {_shape}'s width",
27-
"add 6 to {_shape}'s height"
21+
"set {_shape}'s shape length to 5",
22+
"set {_shape}'s shape width to 5",
23+
"set {_shape}'s shape height to 5",
24+
"reset {_shape}'s shape length",
25+
"reset {_shape}'s shape width",
26+
"add 6 to {_shape}'s shape height"
2827
})
2928
@Since("1.0.0")
3029
public class ExprShapeLWH extends SimplePropertyExpression<LWHShape, Number> {
3130

3231
static {
33-
register(ExprShapeLWH.class, Number.class, "[shape] (:length|:width|:height)", "lwhshapes");
32+
register(ExprShapeLWH.class, Number.class, "shape (:length|:width|:height)", "lwhshapes");
3433
}
3534

3635
private int lwh;

src/main/java/com/sovdee/skriptparticles/elements/expressions/properties/ExprShapeLocations.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525
"If you want the vectors relative to the center of the shape, use the 'shape points' expression."
2626
})
2727
@Examples({
28-
"set {_locations::*} to locations of (circle of radius 10) centered at player",
28+
"set {_locations::*} to point locations of (circle of radius 10) centered at player",
2929
"teleport player to random element of {_locations::*}",
3030
"",
3131
"# drawing the shape yourself: (skbee particle syntax)",
32-
"draw 1 dust using dustOptions(red, 1) at (locations of (circle of radius 10) centered at player)"
32+
"draw 1 dust using dustOptions(red, 1) at (particle locations of (circle of radius 10) centered at player)"
3333
})
3434
@Since("1.0.0")
3535
public class ExprShapeLocations extends SimpleExpression<Location> {
3636

3737
static {
38-
Skript.registerExpression(ExprShapeLocations.class, Location.class, ExpressionType.COMBINED, "[particle] locations of %shapes% [[centered] %direction% %location%]");
38+
Skript.registerExpression(ExprShapeLocations.class, Location.class, ExpressionType.COMBINED, "(particle|point) locations of %shapes% [[centered] %direction% %location%]");
3939
}
4040

4141
private Expression<Shape> shapeExpr;

src/main/java/com/sovdee/skriptparticles/elements/expressions/properties/ExprShapeScale.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
"Changing this will scale the shape accordingly. Resetting or deleting it will set it back to the default scale of 1."
1919
})
2020
@Examples({
21-
"set {_shape}'s scale to 2",
22-
"set scale of {_shape} to 0.5",
23-
"set scale of {_shape} to 2 * (scale of {_shape})",
24-
"reset {_shape}'s scale"
21+
"set {_shape}'s shape scale to 2",
22+
"set shape scale of {_shape} to 0.5",
23+
"set shape scale of {_shape} to 2 * (scale of {_shape})",
24+
"reset {_shape}'s shape scale"
2525
})
2626
@Since("1.0.0")
2727
public class ExprShapeScale extends SimplePropertyExpression<Shape, Number> {
2828

2929
static {
30-
PropertyExpression.register(ExprShapeScale.class, Number.class, "scale", "shapes");
30+
PropertyExpression.register(ExprShapeScale.class, Number.class, "shape scale", "shapes");
3131
}
3232

3333
@Override

src/main/java/com/sovdee/skriptparticles/elements/expressions/properties/ExprShapeSides.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
public class ExprShapeSides extends SimplePropertyExpression<PolyShape, Integer> {
2727

2828
static {
29-
register(ExprShapeSides.class, Integer.class, "side[s| count]", "polyshapes");
29+
register(ExprShapeSides.class, Integer.class, "side(s| count)", "polyshapes");
3030
}
3131

3232
@Override

src/main/java/com/sovdee/skriptparticles/elements/sections/SecParticle.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public class SecParticle extends Section {
8181
}
8282

8383
private Expression<org.bukkit.Particle> particle;
84+
@Nullable
8485
private Expression<Number> count;
8586
@Nullable
8687
private Expression<Vector> offset;
@@ -93,6 +94,7 @@ public class SecParticle extends Section {
9394
@Nullable
9495
private Expression<Boolean> force;
9596

97+
@SuppressWarnings("unchecked")
9698
@Override
9799
public boolean init(Expression<?>[] expressions, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult, SectionNode sectionNode, List<TriggerItem> triggerItems) {
98100
@Nullable EntryContainer entryContainer = validator.validate(sectionNode);

0 commit comments

Comments
 (0)