应edison要求,仅listen localhost
This commit is contained in:
parent
afae76d9dd
commit
301931866a
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ public class OnlinePlayerQueryService {
|
|||
|
||||
public void register() {
|
||||
try {
|
||||
HttpServer server = HttpServer.create(new InetSocketAddress(17611), 0);
|
||||
HttpServer server = HttpServer.create(new InetSocketAddress("127.0.0.1", 17611), 0);
|
||||
|
||||
server.createContext("/api/getOnlinePlayers", exchange -> {
|
||||
Collection<Player> players = plugin.getServer().getAllPlayers();
|
||||
|
|
Loading…
Reference in a new issue