mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2025-04-20 17:47:06 +00:00
fix cache issues
This commit is contained in:
parent
546ee7566d
commit
3d24d4a161
@ -3,6 +3,7 @@ package com.imaginarycode.minecraft.redisbungee;
|
|||||||
import com.google.common.cache.Cache;
|
import com.google.common.cache.Cache;
|
||||||
import com.google.common.cache.CacheBuilder;
|
import com.google.common.cache.CacheBuilder;
|
||||||
import com.google.common.net.InetAddresses;
|
import com.google.common.net.InetAddresses;
|
||||||
|
import com.google.common.util.concurrent.UncheckedExecutionException;
|
||||||
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;
|
||||||
@ -68,7 +69,9 @@ public class DataManager implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (ExecutionException e) {
|
} catch (ExecutionException | UncheckedExecutionException e) {
|
||||||
|
if (e.getCause() instanceof NullPointerException && e.getCause().getMessage().equals("user not found"))
|
||||||
|
return null; // HACK
|
||||||
plugin.getLogger().log(Level.SEVERE, "Unable to get server", e);
|
plugin.getLogger().log(Level.SEVERE, "Unable to get server", e);
|
||||||
throw new RuntimeException("Unable to get server for " + uuid, e);
|
throw new RuntimeException("Unable to get server for " + uuid, e);
|
||||||
}
|
}
|
||||||
@ -89,7 +92,7 @@ public class DataManager implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (ExecutionException e) {
|
} catch (ExecutionException | UncheckedExecutionException e) {
|
||||||
if (e.getCause() instanceof NullPointerException && e.getCause().getMessage().equals("user not found"))
|
if (e.getCause() instanceof NullPointerException && e.getCause().getMessage().equals("user not found"))
|
||||||
return null; // HACK
|
return null; // HACK
|
||||||
plugin.getLogger().log(Level.SEVERE, "Unable to get proxy", e);
|
plugin.getLogger().log(Level.SEVERE, "Unable to get proxy", e);
|
||||||
@ -115,7 +118,7 @@ public class DataManager implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (ExecutionException e) {
|
} catch (ExecutionException | UncheckedExecutionException e) {
|
||||||
if (e.getCause() instanceof NullPointerException && e.getCause().getMessage().equals("user not found"))
|
if (e.getCause() instanceof NullPointerException && e.getCause().getMessage().equals("user not found"))
|
||||||
return null; // HACK
|
return null; // HACK
|
||||||
plugin.getLogger().log(Level.SEVERE, "Unable to get IP", e);
|
plugin.getLogger().log(Level.SEVERE, "Unable to get IP", e);
|
||||||
|
Loading…
Reference in New Issue
Block a user