Skip to content

Commit

Permalink
fix breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Efnilite committed Sep 16, 2024
1 parent be3dc17 commit 7486ff9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/main/java/ch/njol/skript/expressions/ExprTime.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package ch.njol.skript.expressions;

import ch.njol.skript.Skript;
import ch.njol.skript.classes.Changer.ChangeMode;
import ch.njol.skript.doc.Description;
import ch.njol.skript.doc.Examples;
import ch.njol.skript.doc.Name;
import ch.njol.skript.doc.Since;
import ch.njol.skript.expressions.base.PropertyExpression;
import ch.njol.skript.lang.Expression;
import ch.njol.skript.lang.ExpressionType;
import ch.njol.skript.lang.SkriptParser.ParseResult;
import ch.njol.skript.util.Time;
import ch.njol.skript.util.Timeperiod;
Expand Down Expand Up @@ -39,7 +41,8 @@ public class ExprTime extends PropertyExpression<World, Time> {
private static final int TIME_TO_TIMESPAN_OFFSET = 18000;

static {
registerDefault(ExprTime.class, Time.class, "time", "world");
Skript.registerExpression(ExprTime.class, Time.class, ExpressionType.PROPERTY,
"[the] time[s] [([with]in|of) %worlds%]", "%worlds%'[s] time[s]");
}

@SuppressWarnings("unchecked")
Expand Down
4 changes: 2 additions & 2 deletions src/test/skript/tests/regressions/3281-itemamount fixes.sk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test "item amount fixes":
set time of world "world" to night # we dont want our poor zombie to die
set time in world "world" to night # we dont want our poor zombie to die
spawn a zombie at spawn of world "world"
set {_e} to last spawned zombie

Expand All @@ -9,7 +9,7 @@ test "item amount fixes":
assert item amount of {_e}'s tool = 10 with "Item amount of Zombie's tool should have been 10"
kill {_e} # ok maybe we do want him to die

set time of world "world" to day
set time in world "world" to day

drop dirt at location 20 above spawn of world "world"
set {_d} to last dropped item
Expand Down

0 comments on commit 7486ff9

Please sign in to comment.