From ca384f14d22d5391579bc029266da453b2aef95c Mon Sep 17 00:00:00 2001 From: "Blue (Lukas Rieger)" Date: Mon, 17 Aug 2020 00:55:05 +0200 Subject: [PATCH] Fix player update not working with more than one player --- .../main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java | 2 +- .../src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java | 2 +- .../src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java | 2 +- .../main/java/de/bluecolored/bluemap/sponge/SpongePlugin.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java b/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java index dc7d2cb8..b51cff4b 100644 --- a/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java +++ b/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java @@ -246,7 +246,7 @@ private void updateSomePlayers() { if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; if (playerUpdateIndex < onlinePlayerCount) { - onlinePlayerList.get(i).update(); + onlinePlayerList.get(playerUpdateIndex).update(); } } } diff --git a/BlueMapFabric/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java b/BlueMapFabric/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java index e4f2f6da..3ee2d02b 100644 --- a/BlueMapFabric/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java +++ b/BlueMapFabric/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java @@ -222,7 +222,7 @@ private void updateSomePlayers() { if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; if (playerUpdateIndex < onlinePlayerCount) { - onlinePlayerList.get(i).update(); + onlinePlayerList.get(playerUpdateIndex).update(); } } } diff --git a/BlueMapForge/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java b/BlueMapForge/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java index 321b6e09..992d6914 100644 --- a/BlueMapForge/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java +++ b/BlueMapForge/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java @@ -243,7 +243,7 @@ private void updateSomePlayers() { if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; if (playerUpdateIndex < onlinePlayerCount) { - onlinePlayerList.get(i).update(); + onlinePlayerList.get(playerUpdateIndex).update(); } } } diff --git a/BlueMapSponge/src/main/java/de/bluecolored/bluemap/sponge/SpongePlugin.java b/BlueMapSponge/src/main/java/de/bluecolored/bluemap/sponge/SpongePlugin.java index 607cd7f1..832e51a7 100644 --- a/BlueMapSponge/src/main/java/de/bluecolored/bluemap/sponge/SpongePlugin.java +++ b/BlueMapSponge/src/main/java/de/bluecolored/bluemap/sponge/SpongePlugin.java @@ -243,7 +243,7 @@ private void updateSomePlayers() { if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; if (playerUpdateIndex < onlinePlayerCount) { - onlinePlayerList.get(i).update(); + onlinePlayerList.get(playerUpdateIndex).update(); } } }