We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83198b1 commit c5064aeCopy full SHA for c5064ae
src/main/java/ch/njol/skript/sections/SecLoop.java
@@ -228,6 +228,7 @@ public void exit(Event event) {
228
current.remove(event);
229
iteratorMap.remove(event);
230
previous.remove(event);
231
+ nextValue = null;
232
super.exit(event);
233
}
234
src/test/skript/tests/regressions/7989-secloop next value.sk
@@ -0,0 +1,10 @@
1
+local function loop():
2
+ loop 4 times:
3
+ assert previous loop-value is not set with "Previous loop-value should not be set"
4
+ assert loop-value is 1 with "Current loop-value should be 1"
5
+ assert next loop-value is 2 with "Next loop-value should be 2"
6
+ stop
7
+
8
+test "secloop next value":
9
10
+ loop()
0 commit comments