-
Notifications
You must be signed in to change notification settings - Fork 0
Get Server Status 获取服务器状态
XiaoPangxie732 edited this page Nov 24, 2019
·
4 revisions
本页面将会告诉你如何获取服务器状态。
This page will tell you how to get server status.
有关获取服务器状态的方法均在Status
类中。
The methods for get server status are in the Status
class.
服务器列表均在StatusServer
枚举中。
Server list are in the StatusServer
enumeration.
一共有8个值可用,分别是:
A total of 8 values are available, respectively:
MINECRAFT_NET, SESSION_MINECRAFT_NET, ACCOUNT_MOJANG_COM, AUTHSERVER_MOJANG_COM, SESSIONSERVER_MOJANG_COM, API_MOJANG_COM, TEXTURES_MINECRAFT_NET, MOJANG_COM
服务器状态均在StatusType
枚举中。
Server status are in the StatusType
enumeration.
一共有3个值可用,分别是:
A total of 3 values are available, respectively:
GREEN, YELLOW, RED
public StatusType getStatus(StatusServer server) throws NullPointerException;
public String getAllStatus(boolean store);
public String getAllStatus();
public boolean getAllStatus(String path);
public void refresh();
-
getStatus(StatusServer)
用于获取单个服务器的状态。
getStatus(StatusServer)
Used to get the statuses of a single server. -
getAllStatus(boolean)
用于获取所有服务器状态并以properties的格式返回,当store
为true
时会将输出保存到桌面。getAllStatus(boolean)
Used to get all server statuses and return in the properties format. When thestore
istrue
, the output will be saved to the desktop. -
getAllStatus()
用于获取所有服务器状态并以properties的格式返回。
getAllStatus(boolean)
Used to get all server statuses and return in the properties format. -
getAllStatus(String)
用于获取所有服务器状态并存储至指定位置。
getAllStatus(String)
Used to get all server statuses and store to the specified path. -
refresh()
用于刷新服务器的状态。
refresh()
Used to refresh server status.