diff --git a/src/main/java/net/ggodot/learningmod/LearningMod.java b/src/main/java/net/ggodot/learningmod/LearningMod.java index 79f6a3b..ef2fe6f 100644 --- a/src/main/java/net/ggodot/learningmod/LearningMod.java +++ b/src/main/java/net/ggodot/learningmod/LearningMod.java @@ -16,6 +16,7 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.BuildCreativeModeTabContentsEvent; import net.minecraftforge.event.server.ServerStartingEvent; +import net.minecraftforge.event.entity.player.PlayerEvent; // chatGPT import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -69,6 +70,14 @@ public class LearningMod LOGGER.info("HELLO from server starting"); } + // My shit and prayers + @SubscribeEvent + public void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) + { + // Do something when the server starts + LOGGER.info("Motherfucker just logged in"); + } + // You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent @Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) public static class ClientModEvents @@ -82,3 +91,4 @@ public class LearningMod } } } +