mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-23 04:28:01 +00:00
Reformatting and corrected several comments and messages.
This commit is contained in:
parent
95a2a33781
commit
32f0dffd85
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee;
|
package com.imaginarycode.minecraft.redisbungee;
|
||||||
@ -233,8 +233,7 @@ public class DataManager implements Listener {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case SERVER_CHANGE:
|
case SERVER_CHANGE:
|
||||||
final DataManagerMessage<ServerChangePayload> message3 = RedisBungee.getGson().fromJson(jsonObject, new TypeToken<DataManagerMessage<ServerChangePayload>>()
|
final DataManagerMessage<ServerChangePayload> message3 = RedisBungee.getGson().fromJson(jsonObject, new TypeToken<DataManagerMessage<ServerChangePayload>>() {
|
||||||
{
|
|
||||||
}.getType());
|
}.getType());
|
||||||
final String oldServer = serverCache.put(message3.getTarget(), message3.getPayload().getServer());
|
final String oldServer = serverCache.put(message3.getTarget(), message3.getPayload().getServer());
|
||||||
plugin.getProxy().getScheduler().runAsync(plugin, new Runnable() {
|
plugin.getProxy().getScheduler().runAsync(plugin, new Runnable() {
|
||||||
@ -254,6 +253,7 @@ public class DataManager implements Listener {
|
|||||||
private final String source = RedisBungee.getApi().getServerId();
|
private final String source = RedisBungee.getApi().getServerId();
|
||||||
private final Action action; // for future use!
|
private final Action action; // for future use!
|
||||||
private final T payload;
|
private final T payload;
|
||||||
|
|
||||||
enum Action {
|
enum Action {
|
||||||
JOIN,
|
JOIN,
|
||||||
LEAVE,
|
LEAVE,
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee;
|
package com.imaginarycode.minecraft.redisbungee;
|
||||||
@ -52,7 +52,10 @@ import redis.clients.jedis.exceptions.JedisException;
|
|||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.*;
|
import java.util.concurrent.Callable;
|
||||||
|
import java.util.concurrent.ExecutionException;
|
||||||
|
import java.util.concurrent.FutureTask;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
@ -346,7 +349,7 @@ public final class RedisBungee extends Plugin {
|
|||||||
if (redisCollection.contains(player))
|
if (redisCollection.contains(player))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Player not online according to Redis but not BungeeCord. Fire another consumer event.
|
// Player not online according to Redis but not BungeeCord.
|
||||||
getLogger().warning("Player " + player + " is on the proxy but not in Redis.");
|
getLogger().warning("Player " + player + " is on the proxy but not in Redis.");
|
||||||
tmpRsc.sadd("proxy:" + configuration.getServerId() + ":usersOnline", player);
|
tmpRsc.sadd("proxy:" + configuration.getServerId() + ":usersOnline", player);
|
||||||
}
|
}
|
||||||
@ -446,9 +449,9 @@ public final class RedisBungee extends Plugin {
|
|||||||
rsc.ping();
|
rsc.ping();
|
||||||
// If that worked, now we can check for an existing, alive Bungee:
|
// If that worked, now we can check for an existing, alive Bungee:
|
||||||
File crashFile = new File(getDataFolder(), "restarted_from_crash.txt");
|
File crashFile = new File(getDataFolder(), "restarted_from_crash.txt");
|
||||||
if (crashFile.exists())
|
if (crashFile.exists()) {
|
||||||
crashFile.delete();
|
crashFile.delete();
|
||||||
else if (rsc.hexists("heartbeats", serverId)) {
|
} else if (rsc.hexists("heartbeats", serverId)) {
|
||||||
try {
|
try {
|
||||||
Long value = Long.valueOf(rsc.hget("heartbeats", serverId));
|
Long value = Long.valueOf(rsc.hget("heartbeats", serverId));
|
||||||
if (value != null && System.currentTimeMillis() < value + 20000) {
|
if (value != null && System.currentTimeMillis() < value + 20000) {
|
||||||
@ -479,7 +482,7 @@ public final class RedisBungee extends Plugin {
|
|||||||
try {
|
try {
|
||||||
task2.get();
|
task2.get();
|
||||||
} catch (InterruptedException | ExecutionException e) {
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
throw new RuntimeException("Unable to create executor", e);
|
throw new RuntimeException("Unable to create HTTP client", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
getLogger().log(Level.INFO, "Successfully connected to Redis.");
|
getLogger().log(Level.INFO, "Successfully connected to Redis.");
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee;
|
package com.imaginarycode.minecraft.redisbungee;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee;
|
package com.imaginarycode.minecraft.redisbungee;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee;
|
package com.imaginarycode.minecraft.redisbungee;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee;
|
package com.imaginarycode.minecraft.redisbungee;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee;
|
package com.imaginarycode.minecraft.redisbungee;
|
||||||
@ -51,7 +51,6 @@ import redis.clients.jedis.Pipeline;
|
|||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.Callable;
|
|
||||||
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class RedisBungeeListener implements Listener {
|
public class RedisBungeeListener implements Listener {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,16 +21,19 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee;
|
package com.imaginarycode.minecraft.redisbungee;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import redis.clients.jedis.Jedis;
|
import redis.clients.jedis.Jedis;
|
||||||
import redis.clients.jedis.Pipeline;
|
import redis.clients.jedis.Pipeline;
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||||
public class RedisUtil {
|
public class RedisUtil {
|
||||||
// Compatibility restraints prevent me from using using HDEL with multiple keys.
|
// Compatibility restraints prevent me from using using HDEL with multiple keys.
|
||||||
public static void cleanUpPlayer(String player, Jedis rsc) {
|
public static void cleanUpPlayer(String player, Jedis rsc) {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee.events;
|
package com.imaginarycode.minecraft.redisbungee.events;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee.events;
|
package com.imaginarycode.minecraft.redisbungee.events;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee.events;
|
package com.imaginarycode.minecraft.redisbungee.events;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee.events;
|
package com.imaginarycode.minecraft.redisbungee.events;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,17 +21,20 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee.util;
|
package com.imaginarycode.minecraft.redisbungee.util;
|
||||||
|
|
||||||
import com.google.common.io.ByteStreams;
|
import com.google.common.io.ByteStreams;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
|
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||||
public class IOUtil {
|
public class IOUtil {
|
||||||
public static String readInputStreamAsString(InputStream is) {
|
public static String readInputStreamAsString(InputStream is) {
|
||||||
String string;
|
String string;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee.util;
|
package com.imaginarycode.minecraft.redisbungee.util;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee.util;
|
package com.imaginarycode.minecraft.redisbungee.util;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee.util;
|
package com.imaginarycode.minecraft.redisbungee.util;
|
||||||
@ -50,7 +50,8 @@ public class NameFetcher {
|
|||||||
Request request = new Request.Builder().url(url).get().build();
|
Request request = new Request.Builder().url(url).get().build();
|
||||||
String response = httpClient.newCall(request).execute().body().string();
|
String response = httpClient.newCall(request).execute().body().string();
|
||||||
|
|
||||||
Type listType = new TypeToken<List<Name>>() {}.getType();
|
Type listType = new TypeToken<List<Name>>() {
|
||||||
|
}.getType();
|
||||||
List<Name> names = RedisBungee.getGson().fromJson(response, listType);
|
List<Name> names = RedisBungee.getGson().fromJson(response, listType);
|
||||||
|
|
||||||
List<String> humanNames = new ArrayList<>();
|
List<String> humanNames = new ArrayList<>();
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee.util;
|
package com.imaginarycode.minecraft.redisbungee.util;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee.util;
|
package com.imaginarycode.minecraft.redisbungee.util;
|
||||||
@ -34,7 +34,10 @@ import com.squareup.okhttp.Request;
|
|||||||
import com.squareup.okhttp.RequestBody;
|
import com.squareup.okhttp.RequestBody;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
/* Credits to evilmidget38 for this class. I modified it to use Gson. */
|
/* Credits to evilmidget38 for this class. I modified it to use Gson. */
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* This is free and unencumbered software released into the public domain.
|
* This is free and unencumbered software released into the public domain.
|
||||||
*
|
* <p/>
|
||||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
* distribute this software, either in source code form or as a compiled
|
* distribute this software, either in source code form or as a compiled
|
||||||
* binary, for any purpose, commercial or non-commercial, and by any
|
* binary, for any purpose, commercial or non-commercial, and by any
|
||||||
* means.
|
* means.
|
||||||
*
|
* <p/>
|
||||||
* In jurisdictions that recognize copyright laws, the author or authors
|
* In jurisdictions that recognize copyright laws, the author or authors
|
||||||
* of this software dedicate any and all copyright interest in the
|
* of this software dedicate any and all copyright interest in the
|
||||||
* software to the public domain. We make this dedication for the benefit
|
* software to the public domain. We make this dedication for the benefit
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* successors. We intend this dedication to be an overt act of
|
* successors. We intend this dedication to be an overt act of
|
||||||
* relinquishment in perpetuity of all present and future rights to this
|
* relinquishment in perpetuity of all present and future rights to this
|
||||||
* software under copyright law.
|
* software under copyright law.
|
||||||
*
|
* <p/>
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
* <p/>
|
||||||
* For more information, please refer to <http://unlicense.org/>
|
* For more information, please refer to <http://unlicense.org/>
|
||||||
*/
|
*/
|
||||||
package com.imaginarycode.minecraft.redisbungee.util;
|
package com.imaginarycode.minecraft.redisbungee.util;
|
||||||
@ -36,7 +36,6 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import redis.clients.jedis.Jedis;
|
import redis.clients.jedis.Jedis;
|
||||||
import redis.clients.jedis.Pipeline;
|
import redis.clients.jedis.Pipeline;
|
||||||
import redis.clients.jedis.exceptions.JedisConnectionException;
|
|
||||||
import redis.clients.jedis.exceptions.JedisException;
|
import redis.clients.jedis.exceptions.JedisException;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
Loading…
Reference in New Issue
Block a user