[FEAT] Add a way for login/logout event to know if it was sent from vanish
This commit is contained in:
@@ -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));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user