Add Nodename to Startup #109
@ -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);
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Bitte eher im onEnable machen (da Zugriff auf die Bukkit-API). Und ggf. eher Running on ... nennen.