1.16.5 Create server in plugin

Discussion in 'Spigot Plugin Development' started by Jorngamernl, Feb 6, 2021.

  1. is it possible to create an spigot server for bungeecord in an plugin?
  2. Why would you even want that
  3. i want to use it for my plugin
    • Agree Agree x 1
  4. Spigot in no way was intended to have a sub-server within itself. You'd have to make a completely new server application from scratch in Java, and even then I think Spigot would conflict with it. It's a very big endeavour for something like this - so I'd ask you if you could potentially achieve your goal with a more integrated and simple design; to save yourself from the headaches. :)
  5. You are clearly thinking wrong. What is your actual goal?
  6. so you want to dynamically create new servers for your mini games?
  7. This sounds like a recipe for disaster. Don't dynamically create your servers, have a subset of servers which are always running and allow your plugin to pick which one it wants to relay players to. Starting a server dynamically is never the correct solution. Pair this up with something like a hibernation thing (see: https://www.spigotmc.org/resources/hibernate.4441/) and you cut down the resource usage of it to the minimum.
    • Funny Funny x 1
  8. Drepic


    No sure why dynamic servers "are never the correct solution" Especially now that we have docker and especially for minigame servers which don't really need persistent data. Minigame servers seem to be a very good use-case for dynamic servers in fact.
    • Agree Agree x 2
  9. It would be not good in a Spigot Plugin. But as a Standalone Application it is indeed a good idea. There are many which attempted this and succeeded.
    Look at CloudNet for Example. https://www.spigotmc.org/resources/cloudnet-v3-the-cloud-network-environment-technology.42059/
    It creates new Servers dynamically by using Templates and even allows for persistent Servers(so-called static servers)
    • Agree Agree x 1
  10. Alright, maybe "never the correct solution" was a bit vague, what I meant is to never create a server from within a plugin. If you got an external tool that properly handles these things its a different matter, my statement was referring more to a generic "i am gonna make a plugin, and that plugin is gonna create servers!" thing. If you got an external application managing the servers, rather then the server itself, this can actually prove to be a smarter choice. But letting one game server instaniate other game servers is just volatile.
    • Like Like x 1