2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-23 04:28:01 +00:00

Don't cache player count anymore

This commit is contained in:
Tux 2015-12-06 02:58:37 -05:00
parent 150fbf5600
commit 919c2f53c3
3 changed files with 2 additions and 9 deletions

View File

@ -6,7 +6,7 @@
<groupId>com.imaginarycode.minecraft</groupId>
<artifactId>RedisBungee</artifactId>
<version>0.3.9-SNAPSHOT</version>
<version>0.3.8-INTERIM</version>
<repositories>
<repository>

View File

@ -60,7 +60,6 @@ public final class RedisBungee extends Plugin {
private ScheduledTask heartbeatTask;
private boolean usingLua;
private LuaManager.Script serverToPlayersScript;
private volatile int playerCount = 0;
/**
* Fetch the {@link RedisBungeeAPI} object created on plugin start.
@ -154,10 +153,6 @@ public final class RedisBungee extends Plugin {
}
final int getCount() {
return playerCount;
}
final int getCurrentCount() {
int c = 0;
if (pool != null) {
try (Jedis rsc = pool.getResource()) {
@ -268,7 +263,6 @@ public final class RedisBungee extends Plugin {
}
}
serverIds = getCurrentServerIds(true, false);
playerCount = getCurrentCount();
uuidTranslator = new UUIDTranslator(this);
heartbeatTask = getProxy().getScheduler().schedule(this, new Runnable() {
@Override
@ -281,7 +275,6 @@ public final class RedisBungee extends Plugin {
getLogger().log(Level.SEVERE, "Unable to update heartbeat - did your Redis server go away?", e);
}
serverIds = getCurrentServerIds(true, false);
playerCount = getCurrentCount();
}
}, 0, 3, TimeUnit.SECONDS);
dataManager = new DataManager(this);

View File

@ -1,6 +1,6 @@
name: RedisBungee
main: com.imaginarycode.minecraft.redisbungee.RedisBungee
version: 0.3.9-SNAPSHOT
version: 0.3.8-INTERIM
author: tuxed
# This is used so that we can automagically override default BungeeCord behavior.
softDepends: ["cmd_find", "cmd_list"]