SpigotMC / BungeeCord

BungeeCord, the 6th in a generation of server portal suites. Efficiently proxies and maintains connections and transport between multiple Minecraft servers.
https://www.spigotmc.org/go/bungeecord
Other
1.58k stars 1.11k forks source link

Forge - BungeeCord Change Server #2515

Open hbarreau opened 6 years ago

hbarreau commented 6 years ago

Hello, I am working on a Minecraft mod with Forge that modifies the game Discord status according to the seveur. So I did an event in my mod: FMLNetworkEvent.ClientConnectedToServerEvent This event fires well and changes my status when I log in from the multiplayer menu. But when I change my server via Bungeecord, it does not work, the event is not called. Do you know why ? Where can I find this part of BungeeCord? Thank you

andry08 commented 6 years ago

I think you are creating a client-side mod.

  1. I don't think this is an appropriate place to ask questions about modding, forums would be better, this is for reporting issues.
  2. Bungeecord doesn't officially support forge anymore.

Apart from that, the problem is that the minecraft client always stays connected to the same server (the bungee) and then the event is fired only when you connect from the multiplayer menu. From the client perspective you're only changing world (like with nether portals). You could try using net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent or in alternative you could try to listen to respawn event (although I suggest using the former).