[DEV] Backport Fixes from DEV branch

- BUG - Server being pinged constantly during direct connect or lan
- BUG - Single Player Nojang Server not returning null in multiplayer
- FEAT - Way to check if login/logout event was sent from vanish
This commit is contained in:
2024-07-05 21:06:03 +02:00
parent ce6ee95256
commit a0dcfe501a
55 changed files with 209 additions and 122 deletions

View File

@@ -12,9 +12,9 @@ public class Vanish {
public static void register() {
VanishEvents.VANISH_EVENT.register((serverPlayer, b) -> {
if (b) {
CraterEventBus.INSTANCE.postEvent(new CraterPlayerEvent.PlayerLoggedOut(BridgedPlayer.of(serverPlayer)));
CraterEventBus.INSTANCE.postEvent(new CraterPlayerEvent.PlayerLoggedOut(BridgedPlayer.of(serverPlayer), true));
} else {
CraterEventBus.INSTANCE.postEvent(new CraterPlayerEvent.PlayerLoggedIn(BridgedPlayer.of(serverPlayer)));
CraterEventBus.INSTANCE.postEvent(new CraterPlayerEvent.PlayerLoggedIn(BridgedPlayer.of(serverPlayer), true));
}
});
}