Skip to content

Commit 595e17f

Browse files
committed
re-enable 2.9 support
1 parent 45ba9c2 commit 595e17f

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import ch.njol.skript.lang.parser.ParserInstance;
1212
import ch.njol.skript.registrations.EventValues;
1313
import ch.njol.skript.util.Direction;
14+
import ch.njol.skript.util.Getter;
1415
import ch.njol.skript.util.Timespan;
1516
import ch.njol.skript.util.Timespan.TimePeriod;
1617
import ch.njol.skript.variables.Variables;
@@ -39,7 +40,12 @@ public abstract class DrawShapeEffectSection extends EffectSection {
3940
public static final Timespan ONE_TICK = new Timespan(TimePeriod.TICK, 1);
4041

4142
static {
42-
EventValues.registerEventValue(DrawEvent.class, Shape.class, DrawEvent::getShape, EventValues.TIME_NOW);
43+
EventValues.registerEventValue(DrawEvent.class, Shape.class, new Getter<Shape, DrawEvent>() {
44+
@Override
45+
public Shape get(DrawEvent drawEvent) {
46+
return drawEvent.getShape();
47+
}
48+
}, EventValues.TIME_NOW);
4349
}
4450

4551
protected Expression<Shape> shapes;

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import ch.njol.skript.lang.Expression;
99
import ch.njol.skript.lang.SkriptParser.ParseResult;
1010
import ch.njol.skript.registrations.EventValues;
11+
import ch.njol.skript.util.Getter;
1112
import ch.njol.skript.util.Timespan;
1213
import ch.njol.skript.util.Timespan.TimePeriod;
1314
import ch.njol.util.Kleenean;
@@ -58,7 +59,12 @@ public class EffSecDrawShape extends DrawShapeEffectSection {
5859
"[sync:sync[hronously]] draw [the] shape[s] [of] %shapes% [%-directions% %-locations/entities%] [to %-players%]",
5960
"draw [the] shape[s] [of] %shapes% [%-directions% %-locations/entities%] [to %-players%] (duration:for) [duration] %timespan% [with (delay|refresh [rate]) [of] %-timespan%]"
6061
);
61-
EventValues.registerEventValue(EffSecDrawShape.DrawEvent.class, Shape.class, DrawEvent::getShape, EventValues.TIME_NOW);
62+
EventValues.registerEventValue(EffSecDrawShape.DrawEvent.class, Shape.class, new Getter<Shape, DrawEvent>() {
63+
@Override
64+
public Shape get(DrawEvent drawEvent) {
65+
return drawEvent.getShape();
66+
}
67+
}, EventValues.TIME_NOW);
6268
}
6369

6470
@Nullable

src/main/java/com/sovdee/skriptparticles/util/ReflectionUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class ReflectionUtils {
1414

1515
@Nullable
1616
public static Class<?> getOBCClass(String obcClassString) {
17-
String name = CRAFTBUKKIT_PACKAGE + obcClassString;
17+
String name = CRAFTBUKKIT_PACKAGE + "." + obcClassString;
1818
try {
1919
return Class.forName(name);
2020
} catch (ClassNotFoundException e) {

0 commit comments

Comments
 (0)