mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-09 04:02:10 +01:00
cleanup
This commit is contained in:
parent
355c04c361
commit
b1b441fac2
@ -193,7 +193,8 @@ public class Utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Collection<? extends Player> getOnlinePlayers() {
|
@SuppressWarnings("unchecked")
|
||||||
|
public static Collection<? extends Player> getOnlinePlayers() {
|
||||||
if (getOnlinePlayersIsCollection) {
|
if (getOnlinePlayersIsCollection) {
|
||||||
return Bukkit.getOnlinePlayers();
|
return Bukkit.getOnlinePlayers();
|
||||||
}
|
}
|
||||||
@ -203,7 +204,7 @@ public class Utils {
|
|||||||
}
|
}
|
||||||
Object obj = getOnlinePlayers.invoke(null);
|
Object obj = getOnlinePlayers.invoke(null);
|
||||||
if (obj instanceof Collection) {
|
if (obj instanceof Collection) {
|
||||||
return (Collection) obj;
|
return (Collection<? extends Player>) obj;
|
||||||
}
|
}
|
||||||
return Arrays.asList((Player[]) obj);
|
return Arrays.asList((Player[]) obj);
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
|
Loading…
Reference in New Issue
Block a user