Skip to content

Commit

Permalink
reload sync to avoid an IllegalStateException
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Nov 27, 2023
1 parent 2074459 commit e1e996b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void reloadCommand(
final CommandSender sender
) {
sender.sendMessage(Component.text("Reloading AnarchyExploitFixes...").color(NamedTextColor.WHITE));
plugin.getServer().getAsyncScheduler().runNow(plugin, reloadPlugin -> {
plugin.getServer().getGlobalRegionScheduler().run(plugin, reloadPlugin -> {
plugin.reloadPlugin();
sender.sendMessage(Component.text("Reload complete.").color(NamedTextColor.GREEN));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void reloadCommand(
final CommandSender sender
) {
sender.sendMessage(ChatColor.WHITE + "Reloading AnarchyExploitFixes...");
plugin.getServer().getScheduler().runTaskAsynchronously(plugin, () -> {
plugin.getServer().getScheduler().runTask(plugin, () -> {
plugin.reloadPlugin();
sender.sendMessage(ChatColor.GREEN + "Reload complete.");
});
Expand Down

0 comments on commit e1e996b

Please sign in to comment.