1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-28 05:54:16 +02:00

(1.6.0) Switch to Paper plugin & support Folia

This commit is contained in:
Shy
2025-07-09 12:59:43 +02:00
parent a69c7cb426
commit 039b40bd53
13 changed files with 93 additions and 23 deletions
@@ -2,9 +2,11 @@ package de.shiewk.smoderation.paper;
import de.shiewk.smoderation.paper.command.*;
import de.shiewk.smoderation.paper.config.SModerationConfig;
import de.shiewk.smoderation.paper.input.ChatInput;
import de.shiewk.smoderation.paper.input.ChatInputListener;
import de.shiewk.smoderation.paper.listener.*;
import de.shiewk.smoderation.paper.storage.PunishmentContainer;
import de.shiewk.smoderation.paper.util.SchedulerUtil;
import io.papermc.paper.command.brigadier.Commands;
import io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents;
import net.kyori.adventure.text.TextComponent;
@@ -72,7 +74,12 @@ public final class SModerationPaper extends JavaPlugin {
registerCommand(commands, new BanCommand());
});
SchedulerUtil.scheduleGlobalRepeating(PLUGIN, CustomInventoryListener::onTick, 1, 1);
SchedulerUtil.scheduleGlobalRepeating(PLUGIN, ChatInput::tickAll, 1, 1);
container.load(SAVE_FILE);
LOGGER.info("Folia: {}", SchedulerUtil.isFolia ? "yes" : "no");
}
private void registerCommand(Commands commands, CommandProvider provider){