Disable Vanish

This commit is contained in:
LiamSystems
2026-06-09 23:40:09 +01:00
parent 4b5dbd7793
commit 2c508c6c51
@@ -13,7 +13,7 @@ import net.kewwbec.networkcore.api.MetricsService;
import net.kewwbec.networkcore.api.PlayerPresence; import net.kewwbec.networkcore.api.PlayerPresence;
import net.kewwbec.networkcore.api.RpcClient; import net.kewwbec.networkcore.api.RpcClient;
import net.kewwbec.networkcore.api.ServerRegistry; 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.api.events.ServerLeftNetworkEvent;
import net.kewwbec.networkcore.bus.RedisMessageBus; import net.kewwbec.networkcore.bus.RedisMessageBus;
import net.kewwbec.networkcore.command.NetworkCoreCommand; 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.presence.PlayerPresenceService;
import net.kewwbec.networkcore.registry.RedisServerRegistry; import net.kewwbec.networkcore.registry.RedisServerRegistry;
import net.kewwbec.networkcore.rpc.RpcClientImpl; import net.kewwbec.networkcore.rpc.RpcClientImpl;
import net.kewwbec.networkcore.vanish.PlayerListVanishFilter; // import net.kewwbec.networkcore.vanish.PlayerListVanishFilter;
import net.kewwbec.networkcore.vanish.VanishEnforcer; // import net.kewwbec.networkcore.vanish.VanishEnforcer;
import net.kewwbec.networkcore.vanish.VanishServiceImpl; // import net.kewwbec.networkcore.vanish.VanishServiceImpl;
import com.hypixel.hytale.server.core.event.events.player.PlayerReadyEvent; 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 RefRequestService refRequestService;
@Nullable private LockService lockService; @Nullable private LockService lockService;
@Nullable private ShutdownHandoff shutdownHandoff; @Nullable private ShutdownHandoff shutdownHandoff;
@Nullable private VanishServiceImpl vanishService; // @Nullable private VanishServiceImpl vanishService;
public NetworkCore(@Nonnull JavaPluginInit init) { public NetworkCore(@Nonnull JavaPluginInit init) {
super(init); super(init);
@@ -171,12 +171,13 @@ public final class NetworkCore extends JavaPlugin {
this.alertService = new AlertService(messageBus, serverId); this.alertService = new AlertService(messageBus, serverId);
alertService.start(); alertService.start();
this.vanishService = new VanishServiceImpl(messageBus, serverId); // Vanish disabled — commented out.
vanishService.start(); // this.vanishService = new VanishServiceImpl(messageBus, serverId);
services.register(VanishService.class, vanishService); // vanishService.start();
VanishEnforcer vanishEnforcer = new VanishEnforcer(vanishService); // services.register(VanishService.class, vanishService);
getEventRegistry().registerGlobal(PlayerReadyEvent.class, vanishEnforcer::onPlayerReady); // VanishEnforcer vanishEnforcer = new VanishEnforcer(vanishService);
new PlayerListVanishFilter(vanishService).register(); // getEventRegistry().registerGlobal(PlayerReadyEvent.class, vanishEnforcer::onPlayerReady);
// new PlayerListVanishFilter(vanishService).register();
this.refRequestService = new RefRequestService(messageBus, serverId); this.refRequestService = new RefRequestService(messageBus, serverId);
refRequestService.start(); refRequestService.start();
@@ -199,7 +200,7 @@ public final class NetworkCore extends JavaPlugin {
}); });
getCommandRegistry().registerCommand(new AlertCommand(alertService)); 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 HubCommand(lobbyPicker, refRequestService, serverId));
getCommandRegistry().registerCommand(new SendCommand(serverRegistry, presenceService, refRequestService)); getCommandRegistry().registerCommand(new SendCommand(serverRegistry, presenceService, refRequestService));
getCommandRegistry().registerCommand(new SendAllCommand(serverRegistry, presenceService, refRequestService, serverId)); getCommandRegistry().registerCommand(new SendAllCommand(serverRegistry, presenceService, refRequestService, serverId));
@@ -241,10 +242,10 @@ public final class NetworkCore extends JavaPlugin {
try { alertService.stop(); } catch (RuntimeException ignored) {} try { alertService.stop(); } catch (RuntimeException ignored) {}
alertService = null; alertService = null;
} }
if (vanishService != null) { // if (vanishService != null) {
try { vanishService.stop(); } catch (RuntimeException ignored) {} // try { vanishService.stop(); } catch (RuntimeException ignored) {}
vanishService = null; // vanishService = null;
} // }
if (presenceService != null) { if (presenceService != null) {
try { presenceService.stop(); } catch (RuntimeException ignored) {} try { presenceService.stop(); } catch (RuntimeException ignored) {}
presenceService = null; presenceService = null;
@@ -305,8 +306,8 @@ public final class NetworkCore extends JavaPlugin {
} }
@Nullable @Nullable
public NetworkXp getNetworkXp() { return services.get(NetworkXp.class); } public NetworkXp getNetworkXp() { return services.get(NetworkXp.class); }
@Nullable // @Nullable
public VanishService getVanishService() { return services.get(VanishService.class); } // public VanishService getVanishService() { return services.get(VanishService.class); }
@Nullable @Nullable
public RefRequestService getRefRequestService() { return refRequestService; } public RefRequestService getRefRequestService() { return refRequestService; }