Solved Detecting if the server is running on Bukkit or Spigot

Discussion in 'Plugin Development' started by Betagear, Oct 20, 2015.

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

    Betagear

    I would like to do a check to test if the server has BungeeCord, to not throw errors if not.
    Can I do this by just testing if he has BungeeCord in PluginManager ?
     
  2. Offline

    megamichiel

    @Betagear
    The title is a bit misleading, but I'll show how to check both:
    1. To check if the server has spigot, perform a Class.forName to a class only found in the Spigot jar, something like one of their Chat classes
    2. To check if the server has BungeeCord, you would have to send a Plugin Message (not allowed to link to a page with info on it) to an online player, and wait for a response.

    Beware of this thread getting locked, as it asks for BungeeCord info and for that the server has to be in offline mode, and that is not supported here. If you need any more info about BungeeCord, I would go to the spigot forums.
     
  3. Offline

    Betagear

    Ok thanks.
     
Thread Status:
Not open for further replies.

Share This Page