From 63efbf40fbc5808571e7a161815810b4823fed2c Mon Sep 17 00:00:00 2001 From: filoghost Date: Sat, 31 Jul 2021 09:56:00 +0200 Subject: [PATCH] Rename methods --- .../plugin/hologram/tracking/LineTracker.java | 2 +- .../plugin/hologram/tracking/LineTrackerManager.java | 6 +++--- .../holographicdisplays/plugin/placeholder/TickingTask.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTracker.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTracker.java index d7e864c5..2efd2771 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTracker.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTracker.java @@ -46,7 +46,7 @@ public abstract class LineTracker { lineChanged = true; } - final void updateAndSendPackets(Collection onlinePlayers) { + protected final void update(Collection onlinePlayers) { boolean sendChangesPackets = false; // First, detect the changes if the flag is on and set it off diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTrackerManager.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTrackerManager.java index 46fea930..7712db24 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTrackerManager.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LineTrackerManager.java @@ -43,21 +43,21 @@ public class LineTrackerManager { return tracker; } - public void updateTrackersAndSendPackets() { + public void update() { Collection onlinePlayers = Bukkit.getOnlinePlayers(); Iterator> iterator = lineTrackers.iterator(); while (iterator.hasNext()) { LineTracker lineTracker = iterator.next(); - // Remove deleted trackers, sending destroy packets to tracked players + // Remove deleted trackers if (lineTracker.shouldBeRemoved()) { iterator.remove(); lineTracker.onRemoval(); continue; } - lineTracker.updateAndSendPackets(onlinePlayers); + lineTracker.update(onlinePlayers); } } diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/TickingTask.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/TickingTask.java index 9895ef31..5ad6ce96 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/TickingTask.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/placeholder/TickingTask.java @@ -28,7 +28,7 @@ public class TickingTask implements Runnable { tickClock.incrementTick(); try { - lineTrackerManager.updateTrackersAndSendPackets(); + lineTrackerManager.update(); } catch (Throwable t) { // Catch all types of Throwable because we're using NMS code if (tickClock.getCurrentTick() - lastErrorLogTick >= 20) {