Solved When to use static access or not?

Discussion in 'Plugin Development' started by InflamedSebi, Apr 11, 2013.

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

    InflamedSebi

    Hay ... I was wondering what the difference is about:
    Code:
    Bukkit.getPluginManager()
    and
    Code:
    this.getServer.getPluginManager()
    the first one is a static access, i know... but does it matter? it should return the same values, so what to prefer?

    maybe one of them provides a better performance?
     
  2. Offline

    evilmidget38

    InflamedSebi It doesn't matter. There's no major issues with using one or the other. For the sake of laziness though, if you're working in your main class, I'd recommend just using getServer() rather than Bukkit.getServer() simply because it's less to type.
     
  3. evilmidget38
    getServer()'s methods are directly available in Bukkit class, so the static one is less to type actually :p
     
Thread Status:
Not open for further replies.

Share This Page