diff --git a/src/main/java/net/kewwbec/networkcore/NetworkCore.java b/src/main/java/net/kewwbec/networkcore/NetworkCore.java index 7ce99e1..def5c0e 100644 --- a/src/main/java/net/kewwbec/networkcore/NetworkCore.java +++ b/src/main/java/net/kewwbec/networkcore/NetworkCore.java @@ -13,7 +13,7 @@ import net.kewwbec.networkcore.api.MetricsService; import net.kewwbec.networkcore.api.PlayerPresence; import net.kewwbec.networkcore.api.RpcClient; import net.kewwbec.networkcore.api.ServerRegistry; -import net.kewwbec.networkcore.api.VanishService; +// import net.kewwbec.networkcore.api.VanishService; import net.kewwbec.networkcore.api.events.ServerLeftNetworkEvent; import net.kewwbec.networkcore.bus.RedisMessageBus; import net.kewwbec.networkcore.command.NetworkCoreCommand; @@ -47,9 +47,9 @@ import net.kewwbec.networkcore.xp.XpSchemaBootstrap; import net.kewwbec.networkcore.presence.PlayerPresenceService; import net.kewwbec.networkcore.registry.RedisServerRegistry; import net.kewwbec.networkcore.rpc.RpcClientImpl; -import net.kewwbec.networkcore.vanish.PlayerListVanishFilter; -import net.kewwbec.networkcore.vanish.VanishEnforcer; -import net.kewwbec.networkcore.vanish.VanishServiceImpl; +// import net.kewwbec.networkcore.vanish.PlayerListVanishFilter; +// import net.kewwbec.networkcore.vanish.VanishEnforcer; +// import net.kewwbec.networkcore.vanish.VanishServiceImpl; import com.hypixel.hytale.server.core.event.events.player.PlayerReadyEvent; @@ -81,7 +81,7 @@ public final class NetworkCore extends JavaPlugin { @Nullable private RefRequestService refRequestService; @Nullable private LockService lockService; @Nullable private ShutdownHandoff shutdownHandoff; - @Nullable private VanishServiceImpl vanishService; + // @Nullable private VanishServiceImpl vanishService; public NetworkCore(@Nonnull JavaPluginInit init) { super(init); @@ -171,12 +171,13 @@ public final class NetworkCore extends JavaPlugin { this.alertService = new AlertService(messageBus, serverId); alertService.start(); - this.vanishService = new VanishServiceImpl(messageBus, serverId); - vanishService.start(); - services.register(VanishService.class, vanishService); - VanishEnforcer vanishEnforcer = new VanishEnforcer(vanishService); - getEventRegistry().registerGlobal(PlayerReadyEvent.class, vanishEnforcer::onPlayerReady); - new PlayerListVanishFilter(vanishService).register(); + // Vanish disabled — commented out. + // this.vanishService = new VanishServiceImpl(messageBus, serverId); + // vanishService.start(); + // services.register(VanishService.class, vanishService); + // VanishEnforcer vanishEnforcer = new VanishEnforcer(vanishService); + // getEventRegistry().registerGlobal(PlayerReadyEvent.class, vanishEnforcer::onPlayerReady); + // new PlayerListVanishFilter(vanishService).register(); this.refRequestService = new RefRequestService(messageBus, serverId); refRequestService.start(); @@ -199,7 +200,7 @@ public final class NetworkCore extends JavaPlugin { }); getCommandRegistry().registerCommand(new AlertCommand(alertService)); - getCommandRegistry().registerCommand(new GlistCommand(serverRegistry, presenceService, vanishService)); + getCommandRegistry().registerCommand(new GlistCommand(serverRegistry, presenceService, null)); // vanishService disabled getCommandRegistry().registerCommand(new HubCommand(lobbyPicker, refRequestService, serverId)); getCommandRegistry().registerCommand(new SendCommand(serverRegistry, presenceService, refRequestService)); getCommandRegistry().registerCommand(new SendAllCommand(serverRegistry, presenceService, refRequestService, serverId)); @@ -241,10 +242,10 @@ public final class NetworkCore extends JavaPlugin { try { alertService.stop(); } catch (RuntimeException ignored) {} alertService = null; } - if (vanishService != null) { - try { vanishService.stop(); } catch (RuntimeException ignored) {} - vanishService = null; - } + // if (vanishService != null) { + // try { vanishService.stop(); } catch (RuntimeException ignored) {} + // vanishService = null; + // } if (presenceService != null) { try { presenceService.stop(); } catch (RuntimeException ignored) {} presenceService = null; @@ -305,8 +306,8 @@ public final class NetworkCore extends JavaPlugin { } @Nullable public NetworkXp getNetworkXp() { return services.get(NetworkXp.class); } - @Nullable - public VanishService getVanishService() { return services.get(VanishService.class); } + // @Nullable + // public VanishService getVanishService() { return services.get(VanishService.class); } @Nullable public RefRequestService getRefRequestService() { return refRequestService; }