Retrieve Server's Bungee Name From That Server?

Discussion in 'Spigot Plugin Development' started by ReadySetPawn, Aug 7, 2016.

  1. I don't work with BungeeCord a lot but I'm trying to get a server's BungeeCord name from within that server without referencing the Bungee instance. Is this possible?
     
  2. Thank you very much! One question though, is it possible to use the plugin messaging without having any players online and no player object readily available?
     
  3. From what this thread says, it appears as though you cannot, as you're getting the server from a specific player.

    Plugin messaging:

    Pros:
    • Requires little setup on your part
    • Already pre-built api in Bungee/Bukkit
    • Does not require you to open up a seperate port.
    Cons:
    • REQUIRES AT LEAST ONE PLAYER!
     
  4. That's very unfortunate =/ I'm working on an application that creates a network of servers and manages data among them and I would really like it if I could implement BungeeCord without having to reference the actual Bungee instance (for sake of convenience during setup).
     
  5. I don't really use Redis, would netty be fine for this or would it be really overkill?
     
  6. That plugin sounds perfect but it seems like a bit too much for what I need especially when looking at the price. I understand most big networks already have it but I want my application to have Bungee support without having to spend $12 on something you probably don't need (referring to smaller networks). I just need to cache a server name with my server object in the application :D The best option right now seems to just code a Bungee plugin myself and have it send the data over (using Redis). That's most likely what I'll do.
     
  7. @ReadySetPawn The plugin page links to the source, you can build it yourself :p
     
    • Informative Informative x 1
  8. You could always store the server-name in server.properties, and use Bukkit.getServerName() if you want a simpler option.
     
  9. True but I want to have it as convenient as possible for the owner/admin to setup. Not to mention, I still need to fetch more information about the Bungee instance than just the name alone.