Setting server to hardcore mode possible?

Discussion in 'Plugin Development' started by Lightspeed, Dec 29, 2015.

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

    Lightspeed

    I would like to make sure the server is in hardcore from my plugin and if not set it to true.
     
  2. Offline

    Xerox262

  3. Offline

    Lightspeed

    I would like to set it.
     
  4. Offline

    Xerox262

    WorldData#g(boolean flag) through nms on version 1.8R_3

    That's the way I found atleast.

    Why can't you just set it in the server properties file?
     
  5. Offline

    Lightspeed

    Thanks offtopic but, is there a way to edit the server.properties file from bukkit/get it's location(not manually putting in location) from plugin.
     
  6. Offline

    Xerox262

    Ofcourse, why would you want to though, it's just making a lot more work for yourself, unless you're releasing this plugin to others. In which case accessing their server properties file would most likely be counted as malicious code.
     
  7. Offline

    Lightspeed

    Im making a Private plugin to make sure everything is set right.
     
  8. Offline

    mythbusterma

    @Lightspeed

    Because servers randomly change their settings files? Yes, it is possible, just look in the directory of the running program.
     
  9. Offline

    Lightspeed

    How can I get the directory from the plugin?
    From a method not a set url.
     
  10. Offline

    mythbusterma

    @Lightspeed

    Errr. We don't use URLs? Do you mean a "path?"

    After looking at the first result from Google:

    System.getProperty("user.dir")

    This returns the absolute directory from which the application was started.
     
    Lightspeed likes this.
  11. Offline

    Lightspeed

    Yes I mean path but, it usally calls it a url and I couldn't think of path.
    This is what I was looking for. :D
     
Thread Status:
Not open for further replies.

Share This Page