Rename methods

This commit is contained in:
filoghost 2021-07-31 09:56:00 +02:00
parent 56ca2125fa
commit 63efbf40fb
3 changed files with 5 additions and 5 deletions

View File

@ -46,7 +46,7 @@ public abstract class LineTracker<T extends BaseHologramLine> {
lineChanged = true;
}
final void updateAndSendPackets(Collection<? extends Player> onlinePlayers) {
protected final void update(Collection<? extends Player> onlinePlayers) {
boolean sendChangesPackets = false;
// First, detect the changes if the flag is on and set it off

View File

@ -43,21 +43,21 @@ public class LineTrackerManager {
return tracker;
}
public void updateTrackersAndSendPackets() {
public void update() {
Collection<? extends Player> onlinePlayers = Bukkit.getOnlinePlayers();
Iterator<LineTracker<?>> 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);
}
}

View File

@ -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) {