Skip to content

Commit

Permalink
Fix goofiness
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxikle committed Jun 16, 2024
1 parent f35d553 commit f73c4e5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/java/net/cytonic/cytosis/data/RedisDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/**
* A class that holds the connection to the redis cache
*/
@SuppressWarnings("unused")
public class RedisDatabase extends JedisPubSub {

private final String ONLINE_PLAYER_NAME_KEY = "online_player_names";
Expand All @@ -32,11 +33,8 @@ public class RedisDatabase extends JedisPubSub {
* Initializes the connection to redis using the loaded settings and the Jedis client
*/
public RedisDatabase() {
String host = CytosisSettings.REDIS_HOST;
String pass = CytosisSettings.REDIS_PASSWORD;

HostAndPort hostAndPort = new HostAndPort(host, 6379);
JedisClientConfig config = DefaultJedisClientConfig.builder().password(pass).build();
HostAndPort hostAndPort = new HostAndPort(CytosisSettings.REDIS_HOST, 6379);
JedisClientConfig config = DefaultJedisClientConfig.builder().password(CytosisSettings.REDIS_PASSWORD).build();
this.jedis = new JedisPooled(hostAndPort, config);

onlinePlayers = jedis.smembers(ONLINE_PLAYER_NAME_KEY);
Expand Down

0 comments on commit f73c4e5

Please sign in to comment.