Add Nodename to Startup
Dieser Commit ist enthalten in:
Ursprung
68373b1f3e
Commit
cbeb221538
@ -29,6 +29,11 @@ import de.steamwar.sql.SQL;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
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{
|
public class Core extends JavaPlugin{
|
||||||
private static Core instance;
|
private static Core instance;
|
||||||
@ -52,6 +57,11 @@ public class Core extends JavaPlugin{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoad() {
|
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);
|
setInstance(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren