Minor: change bukkit service to return a plain collection of Player
- List is read-only and can be easily "upcast" to Collection<Player> - Remove awkward hack that was needed for mocking the method previously (issues with generics)
This commit is contained in:
@@ -233,8 +233,9 @@ public class BukkitService implements SettingsDependent {
|
||||
*
|
||||
* @return collection of online players
|
||||
*/
|
||||
public Collection<? extends Player> getOnlinePlayers() {
|
||||
return Bukkit.getOnlinePlayers();
|
||||
@SuppressWarnings("unchecked")
|
||||
public Collection<Player> getOnlinePlayers() {
|
||||
return (Collection<Player>) Bukkit.getOnlinePlayers();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user