-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Set MOTD via API #64
Comments
The main issue with exposing any API from MiniMOTD is that not every platform relocates dependencies/MiniMOTD classes to the same location, due to:
Assuming either of these limitations are in place, best case scenario is that other plugins/mods using MiniMOTDs APIs would need to compile against and be compatible with each MiniMOTD platform separately, which imo is pretty ugly. |
I mean... Then it should be the goal of MiniMOTD to ship a universal API that uses generics and/or custom entities that each separate "module" (i.e. the bukkit version) wraps the required info around. Like similar to how I made a |
This is nowhere near as simple as you think it is. No idea what a |
Is your feature request related to a problem? Please describe.
Having to modify a file in order to set the motd, and then having to reload the plugin for it to become active.
Describe the solution you'd like
A developer API to be able to set the "current" motd, probably wont support multiple MOTD like the config unless there would be an easy way to implement this. This would allow people to incorporate the server list MOTD into their own plugins to make their server more interactable.
Example:
You want to do some development on the live server and you can't have player on for that, instead of having to go into the config and add a new line for he motd (including all the special colonizing you do to make your motd unique) you can just specify the maintenance motd in your plugin and have it change the active motd. After you're done you can tell MiniMOTD to switch back to the config motd.
MiniMOTD.getAPI().setMOTD("properly-formatted-string");
MiniMOTD.getAPI().resetMOTD();
Optional:
MiniMOTD.getAPI().setMOTD(List<String> properly-formatted-list-of-strings);
Another Example:
You throw events on your server and want to announce when they are happening in order to draw more plays to your server. Instead of having to prepare the server MOTD a day in advance (if you start your server daily like me). You can just make/commission a plugin that can set the motd to whatever you want using in-game commands and switch it back whenever. This makes for a nice way to interact with your playerbase and a great feature to add to your server. (Spigot again, because I don't restart my proxy)
If I had the knowledge to create a sophisticated plugin like this, this is definitely something I would include in it, just to give others that readiness to change the MOTD at any moment.
Describe alternatives you've considered
Having your plugin actively change the needed file then using plugman to reload it because I'm pretty sure you can't force MiniMOTD to reload itself, (This would only be possible on the spigot version, I use bungeecord)
Additional context
The text was updated successfully, but these errors were encountered: