More API work for modules

This commit is contained in:
2026-05-19 21:23:56 -04:00
parent cf15f33496
commit 2543c7f19e
6 changed files with 416 additions and 0 deletions
@@ -117,6 +117,7 @@ public abstract class PlexModule
*/
public void registerCommand(PlexCommand command)
{
bindCommand(command);
commands.add(command);
if (api != null)
{
@@ -277,6 +278,15 @@ public abstract class PlexModule
public void setApi(PlexApi api)
{
this.api = api;
commands.forEach(this::bindCommand);
}
private void bindCommand(PlexCommand command)
{
if (api != null)
{
command.bindApi(api);
}
}
/**