mirror of
https://github.com/plexusorg/Module-HTTPD.git
synced 2024-12-22 16:04:59 +00:00
fix list
This commit is contained in:
parent
5823b0c790
commit
c7658647fc
1 changed files with 1 additions and 2 deletions
|
@ -13,11 +13,10 @@ import org.bukkit.entity.Player;
|
|||
|
||||
public class ListEndpoint extends AbstractServlet
|
||||
{
|
||||
List<String> players = new ArrayList<>();
|
||||
|
||||
@GetMapping(endpoint = "/api/list/")
|
||||
public String getOnlinePlayers(HttpServletRequest request, HttpServletResponse response)
|
||||
{
|
||||
List<String> players = new ArrayList<>();
|
||||
for (Player player : Bukkit.getOnlinePlayers())
|
||||
{
|
||||
players.add(player.getName());
|
||||
|
|
Loading…
Reference in a new issue