more folia support shenanigans

This commit is contained in:
2024-04-16 16:46:52 +02:00
parent 7f74826e2c
commit 4096cfe152
6 changed files with 13 additions and 12 deletions
@@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
public class ReloadCommand {
public static void reload(CommandSender sender) {
Bukkit.getScheduler().runTaskAsynchronously(PreventStabby.getPlugin(), () -> {
Bukkit.getAsyncScheduler().runNow(PreventStabby.getPlugin(), (task) -> {
if (!PreventStabbyPermission.COMMAND_RELOAD.doesCommandSenderHave(sender)) {
PluginMessages.parseMessage(sender, PreventStabby.getPlugin().getConfigCache().no_permission);
return;