File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
paper-api/src/main/java/io/papermc/paper/event/world/border Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 66import org .bukkit .event .Cancellable ;
77import org .bukkit .event .HandlerList ;
88import org .jetbrains .annotations .ApiStatus ;
9+ import org .jetbrains .annotations .Range ;
910import org .jspecify .annotations .NullMarked ;
1011import java .time .Duration ;
1112
@@ -94,9 +95,9 @@ public long getDuration() {
9495 *
9596 * @param duration the time in ticks for the change
9697 */
97- public void setDurationTicks (final long duration ) {
98+ public void setDurationTicks (@ Range ( from = 0 , to = Integer . MAX_VALUE ) final long duration ) {
9899 this .duration = Math .clamp (duration , 0L , Integer .MAX_VALUE );
99- if (duration >= 0 && this .type == Type .INSTANT_MOVE ) {
100+ if (this .type == Type .INSTANT_MOVE ) {
100101 this .type = Type .STARTED_MOVE ;
101102 }
102103 }
You can’t perform that action at this time.
0 commit comments