config manager: run shutdown hook after plugins

This commit is contained in:
Adam
2022-03-07 22:48:29 -05:00
parent 473a3042fb
commit d2fd37e543
2 changed files with 8 additions and 1 deletions

View File

@@ -910,7 +910,10 @@ public class ConfigManager
return object == null ? null : object.toString();
}
@Subscribe(priority = 100)
@Subscribe(
// run after plugins, in the event they save config on shutdown
priority = -100
)
private void onClientShutdown(ClientShutdown e)
{
Future<Void> f = sendConfig();

View File

@@ -38,5 +38,9 @@ import java.lang.annotation.Target;
@Documented
public @interface Subscribe
{
/**
* Priority relative to other event subscribers. Higher priorities run first.
* @return
*/
float priority() default 0;
}