mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2026-04-08 16:10:26 +00:00
fix error being thrown getServerFor in Bungeecord/Velocity in the api closes #64
when plugins messing around with proxy internals (eg: limboapi) the field server in redis data of the player set to null which can become problematic for velocity due checking of null in velocity but i applied the same stuff to the bungeecord version aswell and document it in the javadocs
This commit is contained in:
@@ -20,6 +20,7 @@ import com.imaginarycode.minecraft.redisbungee.api.summoners.JedisClusterSummone
|
||||
import com.imaginarycode.minecraft.redisbungee.api.summoners.JedisPooledSummoner;
|
||||
import com.imaginarycode.minecraft.redisbungee.api.summoners.Summoner;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.JedisCluster;
|
||||
import redis.clients.jedis.JedisPool;
|
||||
@@ -81,8 +82,9 @@ public abstract class AbstractRedisBungeeAPI {
|
||||
* as well, and will return local information on them.
|
||||
*
|
||||
* @param player a player uuid
|
||||
* @return a String name for the server the player is on.
|
||||
* @return a String name for the server the player is on. Can be Null if plugins is doing weird stuff to the proxy internals
|
||||
*/
|
||||
@Nullable
|
||||
public final String getServerNameFor(@NonNull UUID player) {
|
||||
return plugin.getDataManager().getServer(player);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user