mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-26 02:57:52 +01:00
Fixed "async task can't be called from server thread"
This exception occurred at least on Bukkit.
This commit is contained in:
parent
f05108fe63
commit
a59e5d65ea
@ -74,7 +74,7 @@ public class Plan extends BukkitPlugin implements PlanPlugin {
|
|||||||
registerCommand("plan", command);
|
registerCommand("plan", command);
|
||||||
new RegisterCommandFilter().registerFilter();
|
new RegisterCommandFilter().registerFilter();
|
||||||
if (system != null) {
|
if (system != null) {
|
||||||
system.getListenerSystem().callEnableEvent(this);
|
system.getProcessing().submitNonCritical(() -> system.getListenerSystem().callEnableEvent(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ public class PlanBungee extends BungeePlugin implements PlanPlugin {
|
|||||||
command.registerCommands();
|
command.registerCommands();
|
||||||
registerCommand("planbungee", command);
|
registerCommand("planbungee", command);
|
||||||
if (system != null) {
|
if (system != null) {
|
||||||
system.getListenerSystem().callEnableEvent(this);
|
system.getProcessing().submitNonCritical(() -> system.getListenerSystem().callEnableEvent(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ public class PlanSponge extends SpongePlugin implements PlanPlugin {
|
|||||||
command.registerCommands();
|
command.registerCommands();
|
||||||
registerCommand("plan", command);
|
registerCommand("plan", command);
|
||||||
if (system != null) {
|
if (system != null) {
|
||||||
system.getListenerSystem().callEnableEvent(this);
|
system.getProcessing().submitNonCritical(() -> system.getListenerSystem().callEnableEvent(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class PlanVelocity extends VelocityPlugin implements PlanPlugin {
|
|||||||
command.registerCommands();
|
command.registerCommands();
|
||||||
registerCommand("planvelocity", command);
|
registerCommand("planvelocity", command);
|
||||||
if (system != null) {
|
if (system != null) {
|
||||||
system.getListenerSystem().callEnableEvent(this);
|
system.getProcessing().submitNonCritical(() -> system.getListenerSystem().callEnableEvent(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user