mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-12-23 10:38:01 +00:00
Don't cache player count anymore
This commit is contained in:
parent
150fbf5600
commit
919c2f53c3
2
pom.xml
2
pom.xml
@ -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>
|
||||
|
@ -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);
|
||||
|
@ -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"]
|
Loading…
Reference in New Issue
Block a user