Skip to content

Commit 2971ea4

Browse files
committed
Warning use int then keep int (unless they change in another snapshot)
1 parent 05bfe24 commit 2971ea4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

paper-api/src/main/java/org/bukkit/WorldBorder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,13 @@ default int getWarningTime() {
152152
*
153153
* @return The current border warning time in ticks.
154154
*/
155-
long getWarningTimeTicks();
155+
int getWarningTimeTicks();
156156

157157
/**
158158
* Sets the warning time that causes the screen to be tinted red when a contracting border will reach the player within the specified time.
159159
*
160160
* @param seconds The amount of time in seconds.
161-
* @deprecated Use {@link #setWarningTimeTicks(long)} instead
161+
* @deprecated Use {@link #setWarningTimeTicks(int)} instead
162162
*/
163163
@Deprecated(since = "1.21.11", forRemoval = true)
164164
default void setWarningTime(int seconds) {
@@ -170,7 +170,7 @@ default void setWarningTime(int seconds) {
170170
*
171171
* @param ticks The number of ticks.
172172
*/
173-
void setWarningTimeTicks(long ticks);
173+
void setWarningTimeTicks(int ticks);
174174

175175
/**
176176
* Gets the current border warning distance.

paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ public void setDamageAmount(double damage) {
9696
}
9797

9898
@Override
99-
public long getWarningTimeTicks() {
99+
public int getWarningTimeTicks() {
100100
return this.handle.getWarningTime();
101101
}
102102

103103
@Override
104-
public void setWarningTimeTicks(final long ticks) {
104+
public void setWarningTimeTicks(final int ticks) {
105105
Preconditions.checkArgument(ticks >= 0, "ticks cannot be lower than 0");
106106

107-
this.handle.setWarningTime(((int) ticks));
107+
this.handle.setWarningTime(ticks);
108108
}
109109

110110
@Override

0 commit comments

Comments
 (0)