Hey Sponge, I’m Vuiz. This is my first topic post here!
The purpose of my plugin is to use teams to give players with certain permissions prefixes. HealthName has prefixes/suffixes using teams.
GameServerStartedEvent does run (logging fixed thanks to @dualspiral) but no teams are registered in game (when using /scoreboard teams list, none are registered). In turn when joining the players cannot be assigned to a team as they do not exist.
ClientConnectionEvent.Join does run as my debug message “Active” shows when joining the server.
I started by using @Listener and just changed back to it now, still having the same problem (no teams registered)
@Subscribe must still work in 3.1.0 as it works for the join event. I have not changed to API 4 due to the version of Forge that I will be using the plugin on being 1722.
Weird, it was working for the ClientConnectionEvent.Join event for me. Anyway, I’ve changed both events to @Listener but it still does not run GameServerStartedEvent.
I can see that the event IS getting sent to your plugin:
[11:06:30] [Server thread/TRACE] [slimey/slimey]: Sending event FMLServerStartedEvent to mod slimey
[11:06:30] [Server thread/TRACE] [slimey/slimey]: Sent event FMLServerStartedEvent to mod
However, I bet that it’s because you’re injecting the wrong logger, so it might not actually be printing to the console. You’ve used java.util.Logger, you should be importing org.slf4j.Logger instead. See if that helps.
I remember reading somewhere that GameServerStartedEvent hasn’t been implemented yet because of some issue…maybe. I can’t remember exactly but if everything else works fine then that’s a pretty clear indication
The setScoreboard() method is missing. Every player has the global scoreboard as default. If you create a new custom scoreboard (line 26), you have to assign this scoreboard to the players.