ME1312 / SubServers-2

SubServers – The Minecraft Server Management Platform
Apache License 2.0
91 stars 23 forks source link

Feature Request: add getTemplates to subAPI. #73

Closed alixplayz closed 2 years ago

alixplayz commented 2 years ago

What Should Be Added

I would really like to see something like subAPI.getTemplates to get a list of all the subserver templates there all.

Why It Should be Added

In my case I need to make a custom gui to start servers with specific templates. With getTemplates I could automatically add new templates to the gui without doing any modifying with the code.

What's The Alternative

Every time I want to add a new server/event to the gui, I have to go in and manually change the gui to add that.

ME1312 commented 2 years ago

ServerTemplate objects belong to the SubCreator instance of a Host. Once you get your hands on one, you will find that that method already exists.

alixplayz commented 2 years ago

How exactly would I call that from a Spigot Server running the SubServers.Client API?

ME1312 commented 2 years ago

By calling this one instead.