feat: use ServerLifecycleEvents instead

This commit is contained in:
TheClashFruit 2023-06-27 13:21:36 +02:00
parent 3c7a68b8fc
commit c9bbe56876
Signed by: TheClashFruit
GPG key ID: CF4A319B9A73290C
3 changed files with 7 additions and 6 deletions

View file

@ -6,6 +6,7 @@ import me.theclashfruit.yadmb.event.MessageEvent;
import me.theclashfruit.yadmb.event.StartStopEvent;
import net.dv8tion.jda.api.entities.Activity;
import net.fabricmc.api.DedicatedServerModInitializer;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.fabricmc.fabric.api.message.v1.ServerMessageEvents;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
@ -25,8 +26,8 @@ public class YADMBServer implements DedicatedServerModInitializer {
throw new RuntimeException(e);
}
ServerTickEvents.START_SERVER_TICK.register(StartStopEvent::StartEvent);
ServerTickEvents.END_SERVER_TICK.register(StartStopEvent::StopEvent);
ServerLifecycleEvents.SERVER_STARTED.register(StartStopEvent::StartEvent);
ServerLifecycleEvents.SERVER_STOPPED.register(StartStopEvent::StopEvent);
ServerMessageEvents.CHAT_MESSAGE.register(MessageEvent::ChatMessage);

View file

@ -0,0 +1,4 @@
package me.theclashfruit.yadmb.command;
public class AboutCommand {
}

View file

@ -1,4 +0,0 @@
package me.theclashfruit.yadmb.commands;
public class AboutCommand {
}