mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 22:22:18 -07:00
Replace getOnlinePlayers to provide a view. Adds BUKKIT-5668
By: Wesley Wolfe <wesley.d.wolfe+git@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package org.bukkit;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -89,10 +90,23 @@ public final class Bukkit {
|
||||
return server.getBukkitVersion();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method exists for legacy reasons to provide backwards
|
||||
* compatibility. It will not exist at runtime and should not be used
|
||||
* under any circumstances.
|
||||
*
|
||||
* @Deprecated
|
||||
* @see Server#_INVALID_getOnlinePlayers()
|
||||
*/
|
||||
@Deprecated
|
||||
public static Player[] _INVALID_getOnlinePlayers() {
|
||||
return server._INVALID_getOnlinePlayers();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Server#getOnlinePlayers()
|
||||
*/
|
||||
public static Player[] getOnlinePlayers() {
|
||||
public static Collection<? extends Player> getOnlinePlayers() {
|
||||
return server.getOnlinePlayers();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user