final i think update yAY

This commit is contained in:
ayunami2000 2022-04-08 02:55:41 -04:00
parent 78f3127dc9
commit 15d9eab91e
3 changed files with 25 additions and 7 deletions

View File

@ -164,11 +164,6 @@ public class Plex extends JavaPlugin
PlexLog.log("Punishment System initialized"); PlexLog.log("Punishment System initialized");
commandBlockerManager = new CommandBlockerManager(); commandBlockerManager = new CommandBlockerManager();
// todo: make this a service lmao --v
getServer().getScheduler().scheduleSyncDelayedTask(this, () -> {
commandBlockerManager.syncCommands();
PlexLog.log("Command Blocker commands loaded");
});
PlexLog.log("Command Blocker initialized"); PlexLog.log("Command Blocker initialized");
generateWorlds(); generateWorlds();

View File

@ -15,8 +15,6 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import java.util.regex.Matcher;
public class CommandListener extends PlexListener public class CommandListener extends PlexListener
{ {
@EventHandler(priority = EventPriority.HIGHEST) @EventHandler(priority = EventPriority.HIGHEST)

View File

@ -0,0 +1,25 @@
package dev.plex.services.impl;
import dev.plex.services.AbstractService;
import dev.plex.util.PlexLog;
public class CmdBlockerService extends AbstractService
{
public CmdBlockerService()
{
super(false, true);
}
@Override
public void run()
{
plugin.getCommandBlockerManager().syncCommands();
PlexLog.log("Command Blocker commands loaded");
}
@Override
public int repeatInSeconds()
{
return 0;
}
}