mirror of
https://github.com/plexusorg/Module-HTTPD.git
synced 2024-11-23 20:25:00 +00:00
fix list
This commit is contained in:
parent
5823b0c790
commit
c7658647fc
@ -13,11 +13,10 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
public class ListEndpoint extends AbstractServlet
|
public class ListEndpoint extends AbstractServlet
|
||||||
{
|
{
|
||||||
List<String> players = new ArrayList<>();
|
|
||||||
|
|
||||||
@GetMapping(endpoint = "/api/list/")
|
@GetMapping(endpoint = "/api/list/")
|
||||||
public String getOnlinePlayers(HttpServletRequest request, HttpServletResponse response)
|
public String getOnlinePlayers(HttpServletRequest request, HttpServletResponse response)
|
||||||
{
|
{
|
||||||
|
List<String> players = new ArrayList<>();
|
||||||
for (Player player : Bukkit.getOnlinePlayers())
|
for (Player player : Bukkit.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
players.add(player.getName());
|
players.add(player.getName());
|
||||||
|
Loading…
Reference in New Issue
Block a user