Server Name

Discussion in 'Plugin Development' started by 17xDillz1997, Oct 15, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    17xDillz1997

    I'm wondering if there's a way to receive the server name from the server.properties?
    I tried this and it says 'Craftbukkit' for the 'Bukkit.getServer().getName()'
    Code:java
    1. @EventHandler
    2. public void onPlayerJoin(PlayerJoinEvent event)
    3. {
    4. event.setJoinMessage("Player Has Joined " + Bukkit.getServer().getName());
    5. }
     
  2. Offline

    TheCodingCat

    This is very simple 17xDillz1997
    Just create a
    new File("server.properties");
    then get the path to the name (not sure what it is I'm on my phone right now)
     
  3. Offline

    17xDillz1997

    No way other than doing that?
     
  4. Offline

    fireblast709

    17xDillz1997 Server#getServerName() (should also be available in the Bukkit class)
     
Thread Status:
Not open for further replies.

Share This Page