mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-23 04:28:01 +00:00
Merge branch 'master' of https://github.com/thechunknetwork/redisbungee
This commit is contained in:
commit
f391793e45
2
pom.xml
2
pom.xml
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<groupId>com.imaginarycode.minecraft</groupId>
|
<groupId>com.imaginarycode.minecraft</groupId>
|
||||||
<artifactId>RedisBungee</artifactId>
|
<artifactId>RedisBungee</artifactId>
|
||||||
<version>0.3.5-SNAPSHOT</version>
|
<version>0.3.6-SNAPSHOT</version>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee;
|
package com.imaginarycode.minecraft.redisbungee;
|
||||||
|
|
||||||
|
import com.google.common.net.InetAddresses;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import com.google.gson.JsonParser;
|
import com.google.gson.JsonParser;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
@ -24,7 +25,6 @@ import redis.clients.jedis.Jedis;
|
|||||||
import redis.clients.jedis.exceptions.JedisConnectionException;
|
import redis.clients.jedis.exceptions.JedisConnectionException;
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
@ -122,11 +122,7 @@ public class DataManager implements Listener {
|
|||||||
try {
|
try {
|
||||||
String result = tmpRsc.hget("player:" + uuid, "ip");
|
String result = tmpRsc.hget("player:" + uuid, "ip");
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
address = InetAddress.getByName(result);
|
address = InetAddresses.forString(result);
|
||||||
|
|
||||||
if (address == null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
ipCache.put(uuid, address);
|
ipCache.put(uuid, address);
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
@ -137,8 +133,6 @@ public class DataManager implements Listener {
|
|||||||
if (tmpRsc != null)
|
if (tmpRsc != null)
|
||||||
plugin.getPool().returnBrokenResource(tmpRsc);
|
plugin.getPool().returnBrokenResource(tmpRsc);
|
||||||
throw new RuntimeException("Unable to get server for " + uuid, e);
|
throw new RuntimeException("Unable to get server for " + uuid, e);
|
||||||
} catch (UnknownHostException e) {
|
|
||||||
return null;
|
|
||||||
} finally {
|
} finally {
|
||||||
plugin.getPool().returnResource(tmpRsc);
|
plugin.getPool().returnResource(tmpRsc);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: RedisBungee
|
name: RedisBungee
|
||||||
main: com.imaginarycode.minecraft.redisbungee.RedisBungee
|
main: com.imaginarycode.minecraft.redisbungee.RedisBungee
|
||||||
version: 0.3.5
|
version: 0.3.6
|
||||||
author: tuxed
|
author: tuxed
|
||||||
# This is used so that we can automagically override default BungeeCord behavior.
|
# This is used so that we can automagically override default BungeeCord behavior.
|
||||||
softDepends: ["cmd_find", "cmd_list"]
|
softDepends: ["cmd_find", "cmd_list"]
|
@ -1,3 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* Copyright © 2013 tuxed <write@imaginarycode.com>
|
||||||
|
* This work is free. You can redistribute it and/or modify it under the
|
||||||
|
* terms of the Do What The Fuck You Want To Public License, Version 2,
|
||||||
|
* as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
|
||||||
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee.test;
|
package com.imaginarycode.minecraft.redisbungee.test;
|
||||||
|
|
||||||
import com.imaginarycode.minecraft.redisbungee.util.NameFetcher;
|
import com.imaginarycode.minecraft.redisbungee.util.NameFetcher;
|
||||||
|
Loading…
Reference in New Issue
Block a user