Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by Jorngamernl, Feb 6, 2021.
is it possible to create an spigot server for bungeecord in an plugin?
Why would you even want that
i want to use it for my plugin
Do you really want to do that? What are you trying to achieve?
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.
You are clearly thinking wrong. What is your actual goal?
so you want to dynamically create new servers for your mini games?
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.
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.
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)
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.