diff --git a/src/main/java/ch/njol/skript/expressions/ExprTime.java b/src/main/java/ch/njol/skript/expressions/ExprTime.java index 8391e70a346..e2199e18a80 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprTime.java +++ b/src/main/java/ch/njol/skript/expressions/ExprTime.java @@ -1,5 +1,6 @@ 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; @@ -7,6 +8,7 @@ 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; @@ -39,7 +41,8 @@ public class ExprTime extends PropertyExpression { 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") diff --git a/src/test/skript/tests/regressions/3281-itemamount fixes.sk b/src/test/skript/tests/regressions/3281-itemamount fixes.sk index 2ef0b5710dc..38e22889d4c 100644 --- a/src/test/skript/tests/regressions/3281-itemamount fixes.sk +++ b/src/test/skript/tests/regressions/3281-itemamount fixes.sk @@ -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 @@ -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