diff --git a/fabric/src/main/java/com/gmail/picono435/randomtp/fabric/RandomTPModFabric.java b/fabric/src/main/java/com/gmail/picono435/randomtp/fabric/RandomTPModFabric.java index 1e3a776..e7fc363 100644 --- a/fabric/src/main/java/com/gmail/picono435/randomtp/fabric/RandomTPModFabric.java +++ b/fabric/src/main/java/com/gmail/picono435/randomtp/fabric/RandomTPModFabric.java @@ -49,13 +49,10 @@ public void onInitialize() { ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> { PlayerState playerState = ServerState.getPlayerState(handler.player); - System.out.println("1"); if(!playerState.hasJoined) { RandomTPMod.spawnTeleportPlayer(handler.getPlayer()); - System.out.println("2"); playerState.hasJoined = true; } - System.out.println("3"); }); CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> { diff --git a/forge/src/main/java/com/gmail/picono435/randomtp/forge/RandomTPModForge.java b/forge/src/main/java/com/gmail/picono435/randomtp/forge/RandomTPModForge.java index 0a8adcc..d569e04 100644 --- a/forge/src/main/java/com/gmail/picono435/randomtp/forge/RandomTPModForge.java +++ b/forge/src/main/java/com/gmail/picono435/randomtp/forge/RandomTPModForge.java @@ -15,6 +15,7 @@ import net.minecraftforge.event.RegisterCommandsEvent; import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.event.server.ServerStartingEvent; +import net.minecraftforge.eventbus.api.EventPriority; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.server.permission.events.PermissionGatherEvent; @@ -67,7 +68,7 @@ public void init(ServerStartingEvent event) { RandomTPMod.getLogger().info("RandomTP successfully loaded."); } - @SubscribeEvent + @SubscribeEvent(priority = EventPriority.LOWEST) public void onPlayerJoin(PlayerEvent.PlayerLoggedInEvent event) { if(event.getEntity().level.isClientSide) return; PlayerState playerState = ServerState.getPlayerState(event.getEntity());