📜  Bukkit dev 付费账户 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:24.851000             🧑  作者: Mango

代码示例1
try {
// Create a URL for the desired page
URL url = new URL("[url]http://minecraft.net/haspaid.jsp?user=[/url]" + user);
// Read all the text returned by the server
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String str;
while ((str = in.readLine()) != null) {
getServer().broadcastMessage("The Player has Paid: " + str);
}
in.close();
} catch (MalformedURLException ex) {} 
catch (IOException ex) {}