Remind me to read the documentation next time... coreprotect is supposed to be called asynchronously lol

This commit is contained in:
Taah 2024-05-03 14:41:12 -07:00
parent 068dd28fd4
commit 129ef7b6bf

View File

@ -122,7 +122,7 @@ public class BanCMD extends PlexCommand
else if (plugin.getCoreProtectHook() != null && plugin.getCoreProtectHook().hasCoreProtect()) else if (plugin.getCoreProtectHook() != null && plugin.getCoreProtectHook().hasCoreProtect())
{ {
PlexLog.debug("Testing coreprotect"); PlexLog.debug("Testing coreprotect");
Bukkit.getGlobalRegionScheduler().run(plugin, scheduledTask -> Bukkit.getAsyncScheduler().runNow(plugin, scheduledTask ->
{ {
plugin.getCoreProtectHook().coreProtectAPI().performRollback(86400, Collections.singletonList(plexPlayer.getName()), null, null, null, null, 0, null); plugin.getCoreProtectHook().coreProtectAPI().performRollback(86400, Collections.singletonList(plexPlayer.getName()), null, null, null, null, 0, null);
}); });