Going through stash...

Discussion in 'Spigot Plugin Development' started by ramidzk, Apr 15, 2017.

  1. I'm going through craftbukkit's repository and then I was a pretty weird line of code:

    Code (Text):

    if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null)

  2. What in the world does
    Code (Text):
    System.getProperty("IReallyKnowWhatIAmDoingISwear") == null //"IReallyKnowWhatIAmDoingISwear" When was that an environment  variable???
  3. Disables annoying startup delay when it isn't set

    This can easily be seen if you included the whole block and not just the if condition
  4. People complained about it.
    They fixed it.
    Add that as an environment variable to your system and you skip the message.
    • Like Like x 1
  5. They're not environment vars, they're CLI options set with '-Dkey=value', right?
  6. Confused it with System.getenv() :p
    But yeah, if you enter "java <args> -DIReallyKnowWhatIAmDoingISwear=true -jar <jarname>.jar" it'll work.
  7. Choco


    That flag is meant to be obscure on purpose. Spigot servers have a startup delay for a reason and it's to encourage server owners to update their servers. If everyone knew the flag, it would be rather pointless to have it in the first place. This flag isn't necessarily meant to be public, but it's here now ... soooooo, yea! The flag is really only meant to be used by developers that are rather annoyed by not updating when testing their plugins. I, for one, use this flag simply because I update when I need to for either a new feature or a bug fix. In the case of a server owner, they should update at least once every 3 days or so which is the intention of the delay.