aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/world
diff options
context:
space:
mode:
authorLéo Kosman <leo.kosman@proton.me>2024-08-24 18:27:07 +0200
committerLéo Kosman <leo.kosman@proton.me>2024-08-24 18:27:07 +0200
commit7f60288c07c356616fdee270ece7b2a625dcfdd1 (patch)
tree8bdcc1462d328994acf80f123fa0eaa6135f9f7f /src/main/java/world
parentb47d51c012675243911657e8e1a3e561074b8464 (diff)
perf: cancel TimerTask instead of cancelling timer
Diffstat (limited to 'src/main/java/world')
-rw-r--r--src/main/java/world/anhgelus/molehunt/Game.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/world/anhgelus/molehunt/Game.java b/src/main/java/world/anhgelus/molehunt/Game.java
index 7670805..b8d7136 100644
--- a/src/main/java/world/anhgelus/molehunt/Game.java
+++ b/src/main/java/world/anhgelus/molehunt/Game.java
@@ -135,8 +135,7 @@ public class Game {
timer.cancel();
timer = new Timer();
- borderTimeOffsetTimer.cancel();
- borderTimeOffsetTimer = new Timer();
+ borderTimeOffsetTask.cancel();
final var worldBorder = server.getOverworld().getWorldBorder();
// Stops the border shrinking.