Add @SuppressWarnings("unused") to hooks.

This commit is contained in:
Overlord committed 2026-10-05 12:25:37 +02:00
1 parent 9b721bfd45
commit 7ffcbdbb06
11 files changed
+11 -4

No files matched your search

@@ -16,7 +16,7 @@ import zombie.characters.IsoPlayer;
* thread (client commands are queued for the main loop). Exceptions are caught here; the command
* then reaches Lua as in vanilla.
*/
@SuppressWarnings("CallToPrintStackTrace")
@SuppressWarnings({"unused", "CallToPrintStackTrace"})
public final class ClientCommandHooks
{
private ClientCommandHooks() {}
@@ -13,7 +13,7 @@ import java.util.List;
* server console, RCON, and chat commands all run there. Exceptions are caught here, and the
* vanilla value is returned.
*/
@SuppressWarnings("CallToPrintStackTrace")
@SuppressWarnings({"unused", "CallToPrintStackTrace"})
public final class CommandHooks
{
private CommandHooks() {}
@@ -19,6 +19,7 @@ import zombie.network.ServerWorldDatabase;
* statements write the same rows. The hooks never fail the save: when the connection cannot be
* reached or switched, the save runs in autocommit mode as in vanilla.
*/
@SuppressWarnings("unused")
public final class RolesHooks
{
/** {@code ServerWorldDatabase.conn}, package-private; {@code null} when it cannot be reached. */
@@ -17,7 +17,7 @@ import java.nio.file.Path;
* {@code GameServer$1}. Exceptions are caught here: the main loop logs repeated exceptions only
* a limited number of times, and an exception in the shutdown hook would skip the world save.
*/
@SuppressWarnings("CallToPrintStackTrace")
@SuppressWarnings({"unused", "CallToPrintStackTrace"})
public final class ServerHooks
{
private ServerHooks() {}
@@ -6,6 +6,7 @@ import zombie.network.ServerLOS;
import zombie.network.ServerMap;
/** Hooks called by patched {@code zombie.network.ServerMap} code. */
@SuppressWarnings("unused")
public final class ServerMapHooks
{
/**
@@ -3,7 +3,7 @@ package dev.overlord.zomboidforge.compat.b42.hooks;
import dev.overlord.zomboidforge.compat.b42.ForgeInstance;
/** Hooks called by patched {@code zombie.core.backup.ZipBackup} code. */
@SuppressWarnings("CallToPrintStackTrace")
@SuppressWarnings({"unused", "CallToPrintStackTrace"})
public final class StorageHooks
{
private StorageHooks() {}
@@ -10,6 +10,7 @@ import dev.overlord.zomboidforge.compat.b42.util.WakeableSleep;
* {@code ServerPlayersVehicles} thread. The loops check the same conditions as in vanilla; the
* hooks only let them notice sooner that the condition holds.
*/
@SuppressWarnings("unused")
public final class WaitHooks
{
/** Longest sleep of a polling loop. */
@@ -9,6 +9,7 @@ import java.util.List;
* {@code zombie.iso.worldgen.WorldGenChunk} code. Each returns what the vanilla code returns
* ({@link TileRules}).
*/
@SuppressWarnings("unused")
public final class WorldGenHooks
{
private WorldGenHooks() {}
@@ -11,6 +11,7 @@ import zombie.scripting.objects.VehicleScript;
import zombie.vehicles.BaseVehicle;
/** Hooks called by patched {@code zombie.characters.IsoZombie} code. */
@SuppressWarnings("unused")
public final class ZombieVehicleHooks
{
/**
@@ -9,6 +9,7 @@ import zombie.iso.worldgen.zombie.ClosestSelection;
import zombie.iso.worldgen.zombie.Coord;
/** Hooks called by patched {@code zombie.iso.worldgen.zombie.ZombieVoronoi} code. */
@SuppressWarnings("unused")
public final class ZombieVoronoiHooks
{
private ZombieVoronoiHooks() {}
@@ -13,6 +13,7 @@ import zombie.ZomboidFileSystem;
import zombie.network.GameServer;
/** Hooks called by patched {@code zombie.ZomboidFileSystem} code. */
@SuppressWarnings("unused")
public final class ZomboidFileSystemHooks
{
private ZomboidFileSystemHooks() {}