SteamWar/SpigotCore
Archiviert
13
0

Add Nodename to Startup

Dieser Commit ist enthalten in:
Chaoscaot 2021-06-22 21:00:28 +02:00
Ursprung 68373b1f3e
Commit cbeb221538

Datei anzeigen

@ -29,6 +29,11 @@ import de.steamwar.sql.SQL;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.logging.Level;
public class Core extends JavaPlugin{
private static Core instance;
@ -52,6 +57,11 @@ public class Core extends JavaPlugin{
@Override
public void onLoad() {
try {
Bukkit.getLogger().log(Level.INFO, "Node Name: " + new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("hostname").getInputStream())).readLine());
} catch (IOException e) {
e.printStackTrace();
}
setInstance(this);
}