minecrafter / RedisBungee

The leading player synchronization system for BungeeCord
https://www.spigotmc.org/resources/redisbungee.13494/
Eclipse Public License 1.0
159 stars 123 forks source link

getPlayersOnServer(String::server name) seems to return Strings #35

Closed irworks closed 8 years ago

irworks commented 8 years ago

It seems that getApi().getPlayersOnServer(String::server name) does not return a real UUID Set. Iterating through the Set causes an java.lang.ClassCastException: java.lang.String cannot be cast to java.util.UUID Exception.

Code example:

List<UUID> playerstosend = new ArrayList<>();  playerstosend.addAll(Main.getInstance().getProxy().getApi().getPlayersOnServer(player.getServer().getInfo().getName()));

for (UUID tosend : playerstosend) { //and here we get our exception
...

It's also interesting that getApi().getPlayersOnline() does work perfectly fine, so the workaround iterating through all players and removing which serverInfo does not match to the requested one.