diff --git a/CHANGELOG.md b/CHANGELOG.md index cecc9d63..c6f9fcdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +**Split MessageKeys into Domain-Specific Files** +- Split the monolithic `MessageKeys.java` (2,789 lines, 60 inner classes, ~1,298 constants) into 6 focused domain files: + - `CommonKeys.java` — shared messages, protection denial, territory notifications, announcements, teleport, chat display + - `CommandKeys.java` — all player command message keys (create, disband, rename, claim, invite, etc.) + - `HelpKeys.java` — help system message keys (166 constants) + - `AdminKeys.java` — admin command responses and navigation labels + - `GuiKeys.java` — faction and shared GUI page keys + - `AdminGuiKeys.java` — admin GUI page keys (613 constants) +- Deleted original `MessageKeys.java`; updated imports across 130+ files + +**Localize Remaining Hardcoded Strings** +- Territory display banners (Wilderness, SafeZone, WarZone titles and subtitles) — now localized per-player via `TerritoryInfo.getPrimaryText(PlayerRef)` and `getSecondaryText(PlayerRef)` +- Update notification messages — "new version available", version info, and update instructions now localized +- Player death broadcast location — `"{0} died at ({1}, {2}, {3}) in {4}"` now localized +- ~70 admin handler strings localized across `AdminUpdateHandler`, `AdminZoneHandler`, `AdminMapDecayHandler`, and `AdminDebugHandler` — covers update/mixin/rollback flow, zone display, decay status, and debug headers + +**New Translation Entries** +- Added ~467 new entries per locale file across all 10 supported languages (en-US, de-DE, es-ES, fr-FR, it-IT, nl-NL, pl-PL, pt-BR, ru-RU, tl-PH) +- Covers all split key files (help commands, GUI labels, admin GUI) plus newly localized strings + +### Changed + +**Consolidate Duplicate Message Keys** +- Consolidated ~25 duplicate keys into shared `CommonKeys.Common` constants — bare `NO_PERMISSION`, `Back`, `Cancel`, `Save`, `Clear`, `N/A` duplicates replaced with single shared references +- Added `CommonKeys.Common.NO_DESCRIPTION`, `MEMBER_COUNT`, and `ECONOMY_DISABLED` shared keys, replacing 3 identical copies each +- Command-specific permission messages with unique wording (e.g., "to create factions", "to claim territory") kept as-is + ### Fixed - **Water/lava disappears in own faction claim** — fluid spread was incorrectly tied to `fireSpreadAllowed` config, causing all fluid to be removed in claims when fire spread was disabled. Fluid spread in faction claims is now always allowed ([#95](https://github.com/HyperSystems-Development/HyperFactions/issues/95)) diff --git a/src/main/java/com/hyperfactions/command/FactionCommand.java b/src/main/java/com/hyperfactions/command/FactionCommand.java index f9a03fca..2806be45 100644 --- a/src/main/java/com/hyperfactions/command/FactionCommand.java +++ b/src/main/java/com/hyperfactions/command/FactionCommand.java @@ -15,7 +15,7 @@ import com.hyperfactions.command.util.CommandUtil; import com.hyperfactions.integration.PermissionManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -125,7 +125,7 @@ protected void execute(@NotNull CommandContext ctx, // No subcommand provided - open faction main dashboard GUI if (!hasPermission(player, Permissions.USE)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NO_PERMISSION)); return; } @@ -133,7 +133,7 @@ protected void execute(@NotNull CommandContext ctx, if (playerEntity != null) { hyperFactions.getGuiManager().openFactionMain(playerEntity, ref, store, player); } else { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Common.GUI_FALLBACK, CommandUtil.COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommonKeys.Common.GUI_FALLBACK, CommandUtil.COLOR_YELLOW)); } } diff --git a/src/main/java/com/hyperfactions/command/FactionSubCommand.java b/src/main/java/com/hyperfactions/command/FactionSubCommand.java index 1a7f117f..b004d4d1 100644 --- a/src/main/java/com/hyperfactions/command/FactionSubCommand.java +++ b/src/main/java/com/hyperfactions/command/FactionSubCommand.java @@ -4,7 +4,7 @@ import com.hyperfactions.command.util.CommandUtil; import com.hyperfactions.data.Faction; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -110,7 +110,7 @@ protected FactionCommandContext parseContext(String[] args) { protected Faction requireFaction(@NotNull CommandContext ctx, @NotNull PlayerRef player) { Faction faction = hyperFactions.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); return null; } return faction; diff --git a/src/main/java/com/hyperfactions/command/admin/AdminSubCommand.java b/src/main/java/com/hyperfactions/command/admin/AdminSubCommand.java index 050f4c20..98de0c06 100644 --- a/src/main/java/com/hyperfactions/command/admin/AdminSubCommand.java +++ b/src/main/java/com/hyperfactions/command/admin/AdminSubCommand.java @@ -21,7 +21,11 @@ import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.ChunkUtil; import com.hyperfactions.util.CommandHelp; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.HelpFormatter; +import com.hyperfactions.util.AdminKeys; +import com.hyperfactions.util.HelpKeys; +import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.PlayerResolver; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -122,7 +126,7 @@ private boolean hasPermission(@Nullable PlayerRef player, String permission) { private boolean requirePlayer(CommandContext ctx, boolean isPlayer) { if (!isPlayer) { - ctx.sendMessage(prefix().insert(msg("This command can only be used by a player.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.PLAYER_ONLY), COLOR_RED))); return false; } return true; @@ -151,7 +155,7 @@ protected CompletableFuture executeAsync(@NotNull CommandContext ctx) { // (same pattern as AbstractPlayerCommand) Ref ref = ctx.senderAsPlayerRef(); if (ref == null || !ref.isValid()) { - ctx.sendMessage(prefix().insert(msg("Player context unavailable.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.PLAYER_CONTEXT), COLOR_RED))); return CompletableFuture.completedFuture(null); } Store store = ref.getStore(); @@ -160,7 +164,7 @@ protected CompletableFuture executeAsync(@NotNull CommandContext ctx) { return runAsync(ctx, () -> { PlayerRef player = store.getComponent(ref, PlayerRef.getComponentType()); if (player == null) { - ctx.sendMessage(prefix().insert(msg("Could not find player entity.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ENTITY_NOT_FOUND), COLOR_RED))); return; } dispatchCommand(ctx, store, ref, player, currentWorld, true); @@ -181,7 +185,7 @@ private void dispatchCommand(@NotNull CommandContext ctx, @Nullable Store updateHandler.handleAdminUpdate(ctx, senderUuid, subArgs); case "rollback" -> updateHandler.handleAdminRollback(ctx); case "backup" -> backupHandler.handleAdminBackup(ctx, player, senderUuid, subArgs); - case "import" -> importHandler.handleAdminImport(ctx, subArgs); + case "import" -> importHandler.handleAdminImport(ctx, player, subArgs); case "debug" -> debugHandler.handleDebug(ctx, store, ref, player, currentWorld, subArgs); case "decay" -> mapDecayHandler.handleAdminDecay(ctx, player, subArgs); case "map" -> mapDecayHandler.handleAdminMap(ctx, player, subArgs); @@ -304,7 +308,7 @@ private void dispatchCommand(@NotNull CommandContext ctx, @Nullable Store ctx.sendMessage(prefix().insert(msg("Unknown admin command. Use /f admin help", COLOR_RED))); + default -> ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.UNKNOWN_COMMAND), COLOR_RED))); } } - private void showAdminHelp(CommandContext ctx) { + private void showAdminHelp(CommandContext ctx, @Nullable PlayerRef player) { List commands = new ArrayList<>(); - commands.add(new CommandHelp("/f admin", "Open admin dashboard GUI")); - commands.add(new CommandHelp("/f admin factions", "Manage all factions")); - commands.add(new CommandHelp("/f admin zone", "Zone management")); - commands.add(new CommandHelp("/f admin config", "Server configuration")); - commands.add(new CommandHelp("/f admin backup", "Backup management")); - commands.add(new CommandHelp("/f admin import", "Import from other plugins")); - commands.add(new CommandHelp("/f admin update", "Check for & download updates")); - commands.add(new CommandHelp("/f admin update mixin", "Update HyperProtect-Mixin")); - commands.add(new CommandHelp("/f admin update toggle-mixin-download", "Toggle HP-Mixin auto-download")); - commands.add(new CommandHelp("/f admin rollback", "Rollback to previous version")); - commands.add(new CommandHelp("/f admin reload", "Reload configuration")); - commands.add(new CommandHelp("/f admin sync", "Sync data from disk")); - commands.add(new CommandHelp("/f admin debug", "Debug commands")); - commands.add(new CommandHelp("/f admin decay", "Claim decay management")); - commands.add(new CommandHelp("/f admin map", "World map management")); - commands.add(new CommandHelp("/f admin safezone [name]", "Create SafeZone + claim chunk")); - commands.add(new CommandHelp("/f admin warzone [name]", "Create WarZone + claim chunk")); - commands.add(new CommandHelp("/f admin removezone", "Unclaim chunk from zone")); - commands.add(new CommandHelp("/f admin zoneflag ", "Set zone flag")); - commands.add(new CommandHelp("/f admin integrations", "Summary of all integrations")); - commands.add(new CommandHelp("/f admin integration ", "Detailed integration status")); - commands.add(new CommandHelp("/f admin clearhistory ", "Clear player membership history")); - commands.add(new CommandHelp("/f admin power", "Admin power management")); - commands.add(new CommandHelp("/f admin economy", "Economy/treasury management")); - commands.add(new CommandHelp("/f admin economy upkeep", "Manually trigger upkeep collection")); - commands.add(new CommandHelp("/f admin info [faction]", "View admin faction info GUI")); - commands.add(new CommandHelp("/f admin who [player]", "View admin player info GUI")); - commands.add(new CommandHelp("/f admin log", "View global activity log")); - commands.add(new CommandHelp("/f admin world", "Per-world settings management")); - commands.add(new CommandHelp("/f admin version", "View mod version and integration status")); - commands.add(new CommandHelp("/f admin sentry", "View Sentry status")); - commands.add(new CommandHelp("/f admin sentry disable", "Opt out of Sentry error reporting")); - commands.add(new CommandHelp("/f admin sentry enable", "Opt in to Sentry error reporting")); - commands.add(new CommandHelp("/f admin test gui", "Open UI element test page")); - commands.add(new CommandHelp("/f admin test sentry", "Send a test error to Sentry")); - commands.add(new CommandHelp("/f admin test md", "Open markdown rendering test page")); - ctx.sendMessage(HelpFormatter.buildHelp("Admin Commands", "Server administration", commands, null)); + commands.add(new CommandHelp("/f admin", HelpKeys.Help.ADMIN_CMD_DASHBOARD)); + commands.add(new CommandHelp("/f admin factions", HelpKeys.Help.ADMIN_CMD_FACTIONS)); + commands.add(new CommandHelp("/f admin zone", HelpKeys.Help.ADMIN_CMD_ZONE)); + commands.add(new CommandHelp("/f admin config", HelpKeys.Help.ADMIN_CMD_CONFIG)); + commands.add(new CommandHelp("/f admin backup", HelpKeys.Help.ADMIN_CMD_BACKUP)); + commands.add(new CommandHelp("/f admin import", HelpKeys.Help.ADMIN_CMD_IMPORT)); + commands.add(new CommandHelp("/f admin update", HelpKeys.Help.ADMIN_CMD_UPDATE)); + commands.add(new CommandHelp("/f admin update mixin", HelpKeys.Help.ADMIN_CMD_UPDATE_MIXIN)); + commands.add(new CommandHelp("/f admin update toggle-mixin-download", HelpKeys.Help.ADMIN_CMD_UPDATE_TOGGLE)); + commands.add(new CommandHelp("/f admin rollback", HelpKeys.Help.ADMIN_CMD_ROLLBACK)); + commands.add(new CommandHelp("/f admin reload", HelpKeys.Help.ADMIN_CMD_RELOAD)); + commands.add(new CommandHelp("/f admin sync", HelpKeys.Help.ADMIN_CMD_SYNC)); + commands.add(new CommandHelp("/f admin debug", HelpKeys.Help.ADMIN_CMD_DEBUG)); + commands.add(new CommandHelp("/f admin decay", HelpKeys.Help.ADMIN_CMD_DECAY)); + commands.add(new CommandHelp("/f admin map", HelpKeys.Help.ADMIN_CMD_MAP)); + commands.add(new CommandHelp("/f admin safezone [name]", HelpKeys.Help.ADMIN_CMD_SAFEZONE)); + commands.add(new CommandHelp("/f admin warzone [name]", HelpKeys.Help.ADMIN_CMD_WARZONE)); + commands.add(new CommandHelp("/f admin removezone", HelpKeys.Help.ADMIN_CMD_REMOVEZONE)); + commands.add(new CommandHelp("/f admin zoneflag ", HelpKeys.Help.ADMIN_CMD_ZONEFLAG)); + commands.add(new CommandHelp("/f admin integrations", HelpKeys.Help.ADMIN_CMD_INTEGRATIONS)); + commands.add(new CommandHelp("/f admin integration ", HelpKeys.Help.ADMIN_CMD_INTEGRATION)); + commands.add(new CommandHelp("/f admin clearhistory ", HelpKeys.Help.ADMIN_CMD_CLEARHISTORY)); + commands.add(new CommandHelp("/f admin power", HelpKeys.Help.ADMIN_CMD_POWER)); + commands.add(new CommandHelp("/f admin economy", HelpKeys.Help.ADMIN_CMD_ECONOMY)); + commands.add(new CommandHelp("/f admin economy upkeep", HelpKeys.Help.ADMIN_CMD_ECONOMY_UPKEEP)); + commands.add(new CommandHelp("/f admin info [faction]", HelpKeys.Help.ADMIN_CMD_INFO)); + commands.add(new CommandHelp("/f admin who [player]", HelpKeys.Help.ADMIN_CMD_WHO)); + commands.add(new CommandHelp("/f admin log", HelpKeys.Help.ADMIN_CMD_LOG)); + commands.add(new CommandHelp("/f admin world", HelpKeys.Help.ADMIN_CMD_WORLD)); + commands.add(new CommandHelp("/f admin version", HelpKeys.Help.ADMIN_CMD_VERSION)); + commands.add(new CommandHelp("/f admin sentry", HelpKeys.Help.ADMIN_CMD_SENTRY)); + commands.add(new CommandHelp("/f admin sentry disable", HelpKeys.Help.ADMIN_CMD_SENTRY_DISABLE)); + commands.add(new CommandHelp("/f admin sentry enable", HelpKeys.Help.ADMIN_CMD_SENTRY_ENABLE)); + commands.add(new CommandHelp("/f admin test gui", HelpKeys.Help.ADMIN_CMD_TEST_GUI)); + commands.add(new CommandHelp("/f admin test sentry", HelpKeys.Help.ADMIN_CMD_TEST_SENTRY)); + commands.add(new CommandHelp("/f admin test md", HelpKeys.Help.ADMIN_CMD_TEST_MD)); + ctx.sendMessage(HelpFormatter.buildHelp(HelpKeys.Help.ADMIN_TITLE, HelpKeys.Help.ADMIN_DESCRIPTION, commands, null, player)); } // === Version === @@ -398,12 +402,17 @@ private void handleVersion(CommandContext ctx, @Nullable Store stor // Console output — mirrors the integration handler format integrationHandler.handleIntegrations(ctx); ctx.sendMessage(msg("", COLOR_GRAY)); - ctx.sendMessage(prefix().insert(msg("Version Info", COLOR_CYAN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.VERSION_TITLE), COLOR_CYAN))); ctx.sendMessage(msg(" HyperFactions: v" + HyperFactions.VERSION, COLOR_WHITE)); String serverVersion = com.hypixel.hytale.common.util.java.ManifestUtil.getVersion(); - ctx.sendMessage(msg(" Hytale Server: " + (serverVersion != null ? serverVersion : "Unknown"), COLOR_WHITE)); - ctx.sendMessage(msg(" Java: " + System.getProperty("java.version", "Unknown"), COLOR_WHITE)); - ctx.sendMessage(msg(" Treasury: " + (hyperFactions.isTreasuryEnabled() ? "Active" : "Not Found"), + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.VERSION_SERVER, + serverVersion != null ? serverVersion : "Unknown"), COLOR_WHITE)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.VERSION_JAVA, + System.getProperty("java.version", "Unknown")), COLOR_WHITE)); + String treasuryStatus = hyperFactions.isTreasuryEnabled() + ? HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.VERSION_ACTIVE) + : HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.VERSION_NOT_FOUND); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.VERSION_TREASURY, treasuryStatus), hyperFactions.isTreasuryEnabled() ? COLOR_GREEN : COLOR_GRAY)); } } @@ -416,11 +425,11 @@ private void handleSentry(CommandContext ctx, String[] args) { // Show status boolean configEnabled = debugConfig.isSentryEnabled(); boolean running = SentryIntegration.isInitialized(); - ctx.sendMessage(prefix().insert(msg("Sentry Error Reporting", COLOR_CYAN))); - ctx.sendMessage(msg(" Config: " + (configEnabled ? "enabled" : "disabled"), - configEnabled ? COLOR_GREEN : COLOR_GRAY)); - ctx.sendMessage(msg(" Status: " + (running ? "active" : "inactive"), - running ? COLOR_GREEN : COLOR_GRAY)); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.SENTRY_HEADER), COLOR_CYAN))); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.SENTRY_CONFIG, + configEnabled ? "enabled" : "disabled"), configEnabled ? COLOR_GREEN : COLOR_GRAY)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.SENTRY_STATUS, + running ? "active" : "inactive"), running ? COLOR_GREEN : COLOR_GRAY)); ctx.sendMessage(msg(" DSN: " + debugConfig.getSentryDsn(), COLOR_GRAY)); ctx.sendMessage(msg(" Environment: " + debugConfig.getSentryEnvironment(), COLOR_GRAY)); return; @@ -429,17 +438,17 @@ private void handleSentry(CommandContext ctx, String[] args) { switch (args[0].toLowerCase()) { case "disable", "optout", "off" -> { if (!debugConfig.isSentryEnabled()) { - ctx.sendMessage(prefix().insert(msg("Sentry is already disabled.", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.SENTRY_ALREADY_DISABLED), COLOR_YELLOW))); return; } debugConfig.setSentryEnabled(false); debugConfig.save(); SentryIntegration.close(); - ctx.sendMessage(prefix().insert(msg("Sentry disabled and config saved. Error reporting is now off.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.SENTRY_DISABLED), COLOR_GREEN))); } case "enable", "optin", "on" -> { if (debugConfig.isSentryEnabled()) { - ctx.sendMessage(prefix().insert(msg("Sentry is already enabled.", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.SENTRY_ALREADY_ENABLED), COLOR_YELLOW))); return; } debugConfig.setSentryEnabled(true); @@ -448,41 +457,37 @@ private void handleSentry(CommandContext ctx, String[] args) { if (!SentryIntegration.isInitialized()) { SentryIntegration.init(debugConfig); } - ctx.sendMessage(prefix().insert(msg("Sentry enabled and config saved. Error reporting is now on.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.SENTRY_ENABLED), COLOR_GREEN))); } - default -> ctx.sendMessage(prefix().insert(msg("Usage: /f admin sentry [disable|enable]", COLOR_RED))); + default -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.SENTRY_USAGE), COLOR_RED))); } } // === Reload === private void handleReload(CommandContext ctx, PlayerRef player) { if (!hasPermission(player, Permissions.ADMIN)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.NO_PERMISSION), COLOR_RED))); return; } plugin.reloadConfig(); - ctx.sendMessage(prefix().insert(msg("Configuration reloaded.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.CONFIG_RELOADED), COLOR_GREEN))); } // === Sync === private void handleSync(CommandContext ctx, PlayerRef player) { if (!hasPermission(player, Permissions.ADMIN)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.NO_PERMISSION), COLOR_RED))); return; } - ctx.sendMessage(prefix().insert(msg("Syncing faction data from disk...", COLOR_CYAN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.SYNC_START), COLOR_CYAN))); hyperFactions.getFactionManager().syncFromDisk().thenAccept(result -> { - ctx.sendMessage(prefix().insert(Message.join( - msg("Sync complete: ", COLOR_GREEN), - msg(result.factionsUpdated() + " factions updated, ", COLOR_GRAY), - msg(result.membersAdded() + " members added, ", COLOR_GRAY), - msg(result.membersUpdated() + " members updated.", COLOR_GRAY) - ))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.SYNC_COMPLETE, + result.factionsUpdated(), result.membersAdded(), result.membersUpdated()), COLOR_GREEN))); }).exceptionally(e -> { - ctx.sendMessage(prefix().insert(msg("Sync failed: " + e.getMessage(), COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.SYNC_FAILED, e.getMessage()), COLOR_RED))); return null; }); } diff --git a/src/main/java/com/hyperfactions/command/admin/handler/AdminBackupHandler.java b/src/main/java/com/hyperfactions/command/admin/handler/AdminBackupHandler.java index 418eb1af..751e6fa5 100644 --- a/src/main/java/com/hyperfactions/command/admin/handler/AdminBackupHandler.java +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminBackupHandler.java @@ -8,7 +8,10 @@ import com.hyperfactions.command.util.CommandUtil; import com.hyperfactions.manager.ConfirmationManager; import com.hyperfactions.util.CommandHelp; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.HelpFormatter; +import com.hyperfactions.util.AdminKeys; +import com.hyperfactions.util.HelpKeys; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.command.system.CommandContext; import com.hypixel.hytale.server.core.universe.PlayerRef; @@ -61,12 +64,12 @@ public AdminBackupHandler(HyperFactions hyperFactions) { /** Handles admin backup. */ public void handleAdminBackup(CommandContext ctx, @Nullable PlayerRef player, UUID senderUuid, String[] args) { if (!hasPermission(player, Permissions.ADMIN_BACKUP)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to manage backups.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.BACKUP_NO_PERMISSION), COLOR_RED))); return; } if (args.length == 0) { - showBackupHelp(ctx); + showBackupHelp(ctx, player); return; } @@ -78,37 +81,37 @@ public void handleAdminBackup(CommandContext ctx, @Nullable PlayerRef player, UU case "list" -> handleBackupList(ctx); case "restore" -> handleBackupRestore(ctx, senderUuid, subArgs); case "delete" -> handleBackupDelete(ctx, subArgs); - case "help", "?" -> showBackupHelp(ctx); + case "help", "?" -> showBackupHelp(ctx, player); default -> { - ctx.sendMessage(prefix().insert(msg("Unknown backup command: " + subCmd, COLOR_RED))); - showBackupHelp(ctx); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.BACKUP_UNKNOWN_CMD), COLOR_RED))); + showBackupHelp(ctx, player); } } } - private void showBackupHelp(CommandContext ctx) { + private void showBackupHelp(CommandContext ctx, @Nullable PlayerRef player) { List commands = new ArrayList<>(); - commands.add(new CommandHelp("/f admin backup create [name]", "Create manual backup")); - commands.add(new CommandHelp("/f admin backup list", "List all backups grouped by type")); - commands.add(new CommandHelp("/f admin backup restore ", "Restore from backup (requires confirmation)")); - commands.add(new CommandHelp("/f admin backup delete ", "Delete a backup")); - ctx.sendMessage(HelpFormatter.buildHelp("Backup Management", "GFS rotation scheme", commands, null)); + commands.add(new CommandHelp("/f admin backup create [name]", HelpKeys.Help.BACKUP_CMD_CREATE)); + commands.add(new CommandHelp("/f admin backup list", HelpKeys.Help.BACKUP_CMD_LIST)); + commands.add(new CommandHelp("/f admin backup restore ", HelpKeys.Help.BACKUP_CMD_RESTORE)); + commands.add(new CommandHelp("/f admin backup delete ", HelpKeys.Help.BACKUP_CMD_DELETE)); + ctx.sendMessage(HelpFormatter.buildHelp(HelpKeys.Help.BACKUP_TITLE, HelpKeys.Help.BACKUP_DESCRIPTION, commands, null, player)); } /** Handles backup create. */ public void handleBackupCreate(CommandContext ctx, UUID senderUuid, String[] args) { String customName = args.length > 0 ? String.join("_", args) : null; - ctx.sendMessage(prefix().insert(msg("Creating backup...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_CREATING), COLOR_YELLOW))); hyperFactions.getBackupManager().createBackup(BackupType.MANUAL, customName, senderUuid) .thenAccept(result -> { if (result instanceof BackupManager.BackupResult.Success success) { - ctx.sendMessage(prefix().insert(msg("Backup created successfully!", COLOR_GREEN))); - ctx.sendMessage(msg(" Name: " + success.metadata().name(), COLOR_GRAY)); - ctx.sendMessage(msg(" Size: " + success.metadata().getFormattedSize(), COLOR_GRAY)); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_CREATED), COLOR_GREEN))); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_NAME, success.metadata().name()), COLOR_GRAY)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_SIZE, success.metadata().getFormattedSize()), COLOR_GRAY)); } else if (result instanceof BackupManager.BackupResult.Failure failure) { - ctx.sendMessage(prefix().insert(msg("Backup failed: " + failure.error(), COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_FAILED, failure.error()), COLOR_RED))); } }); } @@ -118,11 +121,11 @@ public void handleBackupList(CommandContext ctx) { Map> grouped = hyperFactions.getBackupManager().getBackupsGroupedByType(); if (grouped.isEmpty()) { - ctx.sendMessage(prefix().insert(msg("No backups found.", COLOR_GRAY))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_NONE), COLOR_GRAY))); return; } - ctx.sendMessage(msg("=== Backups ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg("=== " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_HEADER) + " ===", COLOR_CYAN).bold(true)); for (BackupType type : BackupType.values()) { List backups = grouped.getOrDefault(type, List.of()); @@ -141,7 +144,7 @@ public void handleBackupList(CommandContext ctx) { /** Handles backup restore. */ public void handleBackupRestore(CommandContext ctx, UUID senderUuid, String[] args) { if (args.length < 1) { - ctx.sendMessage(prefix().insert(msg("Usage: /f admin backup restore ", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_USAGE_RESTORE), COLOR_RED))); return; } @@ -152,7 +155,7 @@ public void handleBackupRestore(CommandContext ctx, UUID senderUuid, String[] ar .findFirst() .orElse(null); if (backup == null) { - ctx.sendMessage(prefix().insert(msg("Backup '" + backupName + "' not found.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_NOT_FOUND, backupName), COLOR_RED))); return; } @@ -163,24 +166,22 @@ public void handleBackupRestore(CommandContext ctx, UUID senderUuid, String[] ar switch (confirmResult) { case NEEDS_CONFIRMATION, EXPIRED_RECREATED -> { - ctx.sendMessage(prefix().insert(msg("WARNING: Restoring backup will overwrite current data!", COLOR_RED))); - ctx.sendMessage(prefix().insert(msg("Type ", COLOR_YELLOW)) - .insert(msg("/f admin backup restore " + backupName, COLOR_WHITE)) - .insert(msg(" again within " + confirmManager.getTimeoutSeconds() + " seconds to confirm.", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_RESTORE_WARNING), COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_RESTORE_CONFIRM), COLOR_YELLOW))); } case CONFIRMED -> { - ctx.sendMessage(prefix().insert(msg("Restoring backup...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_RESTORING), COLOR_YELLOW))); hyperFactions.getBackupManager().restoreBackup(backup.name()) .thenAccept(result -> { if (result instanceof BackupManager.RestoreResult.Success) { - ctx.sendMessage(prefix().insert(msg("Backup restored successfully! Data reloaded.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_RESTORED, String.valueOf(hyperFactions.getFactionManager().getAllFactions().size())), COLOR_GREEN))); } else if (result instanceof BackupManager.RestoreResult.Failure failure) { - ctx.sendMessage(prefix().insert(msg("Restore failed: " + failure.error(), COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_RESTORE_FAILED, failure.error()), COLOR_RED))); } }); } case DIFFERENT_ACTION -> { - ctx.sendMessage(prefix().insert(msg("Previous confirmation cancelled. Type again to confirm restore.", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_CONFIRM_CANCEL), COLOR_YELLOW))); } default -> throw new IllegalStateException("Unexpected value"); } @@ -189,7 +190,7 @@ public void handleBackupRestore(CommandContext ctx, UUID senderUuid, String[] ar /** Handles backup delete. */ public void handleBackupDelete(CommandContext ctx, String[] args) { if (args.length < 1) { - ctx.sendMessage(prefix().insert(msg("Usage: /f admin backup delete ", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_USAGE_DELETE), COLOR_RED))); return; } @@ -200,16 +201,16 @@ public void handleBackupDelete(CommandContext ctx, String[] args) { .findFirst() .orElse(null); if (backup == null) { - ctx.sendMessage(prefix().insert(msg("Backup '" + backupName + "' not found.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_NOT_FOUND, backupName), COLOR_RED))); return; } hyperFactions.getBackupManager().deleteBackup(backup.name()) .thenAccept(deleted -> { if (deleted) { - ctx.sendMessage(prefix().insert(msg("Deleted backup '" + backupName + "'", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_DELETED, backupName), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Failed to delete backup.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BACKUP_DELETE_FAILED, "unknown error"), COLOR_RED))); } }); } diff --git a/src/main/java/com/hyperfactions/command/admin/handler/AdminDebugHandler.java b/src/main/java/com/hyperfactions/command/admin/handler/AdminDebugHandler.java index 34d39429..3e04ad56 100644 --- a/src/main/java/com/hyperfactions/command/admin/handler/AdminDebugHandler.java +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminDebugHandler.java @@ -7,7 +7,10 @@ import com.hyperfactions.data.Zone; import com.hyperfactions.util.ChunkUtil; import com.hyperfactions.util.CommandHelp; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.HelpFormatter; +import com.hyperfactions.util.AdminKeys; +import com.hyperfactions.util.HelpKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.math.vector.Vector3d; @@ -67,12 +70,12 @@ public AdminDebugHandler(HyperFactions hyperFactions) { public void handleDebug(CommandContext ctx, @Nullable Store store, @Nullable Ref ref, @Nullable PlayerRef player, @Nullable World world, String[] args) { if (!hasPermission(player, Permissions.ADMIN_DEBUG)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to use debug commands.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.DEBUG_NO_PERMISSION), COLOR_RED))); return; } if (args.length == 0) { - showDebugHelp(ctx); + showDebugHelp(ctx, player); return; } @@ -85,38 +88,38 @@ public void handleDebug(CommandContext ctx, @Nullable Store store, case "power" -> handleDebugPower(ctx, subArgs); case "claim" -> { if (store == null) { - ctx.sendMessage(prefix().insert(msg("This debug command can only be used by a player.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.DEBUG_PLAYER_ONLY), COLOR_RED))); } else { handleDebugClaim(ctx, store, ref, world, subArgs); } } case "protection" -> { if (store == null) { - ctx.sendMessage(prefix().insert(msg("This debug command can only be used by a player.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.DEBUG_PLAYER_ONLY), COLOR_RED))); } else { handleDebugProtection(ctx, store, ref, world, subArgs); } } case "combat" -> handleDebugCombat(ctx, subArgs); case "relation" -> handleDebugRelation(ctx, subArgs); - case "help", "?" -> showDebugHelp(ctx); + case "help", "?" -> showDebugHelp(ctx, player); default -> { - ctx.sendMessage(prefix().insert(msg("Unknown debug command: " + subCmd, COLOR_RED))); - showDebugHelp(ctx); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.DEBUG_UNKNOWN_CMD), COLOR_RED))); + showDebugHelp(ctx, player); } } } - private void showDebugHelp(CommandContext ctx) { + private void showDebugHelp(CommandContext ctx, @Nullable PlayerRef player) { List commands = new ArrayList<>(); - commands.add(new CommandHelp("/f admin debug toggle [on|off]", "Toggle debug logging")); - commands.add(new CommandHelp("/f admin debug status", "Show debug status")); - commands.add(new CommandHelp("/f admin debug power ", "Show power details")); - commands.add(new CommandHelp("/f admin debug claim [x z]", "Show claim info")); - commands.add(new CommandHelp("/f admin debug protection ", "Show protection info")); - commands.add(new CommandHelp("/f admin debug combat ", "Show combat tag status")); - commands.add(new CommandHelp("/f admin debug relation ", "Show relation info")); - ctx.sendMessage(HelpFormatter.buildHelp("Debug Commands", "Diagnostics and troubleshooting", commands, null)); + commands.add(new CommandHelp("/f admin debug toggle [on|off]", HelpKeys.Help.DEBUG_CMD_TOGGLE)); + commands.add(new CommandHelp("/f admin debug status", HelpKeys.Help.DEBUG_CMD_STATUS)); + commands.add(new CommandHelp("/f admin debug power ", HelpKeys.Help.DEBUG_CMD_POWER)); + commands.add(new CommandHelp("/f admin debug claim [x z]", HelpKeys.Help.DEBUG_CMD_CLAIM)); + commands.add(new CommandHelp("/f admin debug protection ", HelpKeys.Help.DEBUG_CMD_PROTECTION)); + commands.add(new CommandHelp("/f admin debug combat ", HelpKeys.Help.DEBUG_CMD_COMBAT)); + commands.add(new CommandHelp("/f admin debug relation ", HelpKeys.Help.DEBUG_CMD_RELATION)); + ctx.sendMessage(HelpFormatter.buildHelp(HelpKeys.Help.DEBUG_TITLE, HelpKeys.Help.DEBUG_DESCRIPTION, commands, null, player)); } /** Handles debug toggle. */ @@ -125,7 +128,7 @@ public void handleDebugToggle(CommandContext ctx, String[] args) { if (args.length == 0) { // Show current status - ctx.sendMessage(msg("=== Debug Logging Status ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg("=== " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DEBUG_STATUS_HEADER) + " ===", COLOR_CYAN).bold(true)); ctx.sendMessage(msg("Categories:", COLOR_GRAY)); ctx.sendMessage(msg(" power: ", COLOR_WHITE).insert(msg(debugConfig.isPower() ? "ON" : "OFF", debugConfig.isPower() ? COLOR_GREEN : COLOR_RED))); ctx.sendMessage(msg(" claim: ", COLOR_WHITE).insert(msg(debugConfig.isClaim() ? "ON" : "OFF", debugConfig.isClaim() ? COLOR_GREEN : COLOR_RED))); @@ -150,10 +153,10 @@ public void handleDebugToggle(CommandContext ctx, String[] args) { boolean enable = args.length > 1 ? args[1].equalsIgnoreCase("on") : !debugConfig.isEnabledByDefault(); if (enable) { debugConfig.enableAll(); - ctx.sendMessage(prefix().insert(msg("All debug categories enabled.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DEBUG_ALL_ENABLED), COLOR_GREEN))); } else { debugConfig.disableAll(); - ctx.sendMessage(prefix().insert(msg("All debug categories disabled.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DEBUG_ALL_DISABLED), COLOR_GREEN))); } debugConfig.save(); return; @@ -175,7 +178,7 @@ public void handleDebugToggle(CommandContext ctx, String[] args) { case "integration" -> currentValue = debugConfig.isIntegration(); case "economy" -> currentValue = debugConfig.isEconomy(); default -> { - ctx.sendMessage(prefix().insert(msg("Unknown category: " + category, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DEBUG_UNKNOWN_CATEGORY, category), COLOR_RED))); ctx.sendMessage(msg("Valid categories: power, claim, combat, protection, relation, territory, worldmap, interaction, mixin, spawning, integration, economy, all", COLOR_GRAY)); return; } @@ -207,11 +210,7 @@ public void handleDebugToggle(CommandContext ctx, String[] args) { debugConfig.save(); ctx.sendMessage(prefix().insert( - msg("Debug category '", COLOR_GREEN) - .insert(msg(category, COLOR_CYAN)) - .insert(msg("' set to ", COLOR_GREEN)) - .insert(msg(newValue ? "ON" : "OFF", newValue ? COLOR_GREEN : COLOR_RED)) - .insert(msg(" (saved)", COLOR_GRAY)) + msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DEBUG_TOGGLE_SET, category, newValue ? "ON" : "OFF"), COLOR_GREEN) )); } @@ -219,7 +218,7 @@ public void handleDebugToggle(CommandContext ctx, String[] args) { public void handleDebugStatus(CommandContext ctx) { var debugConfig = ConfigManager.get().debug(); - ctx.sendMessage(msg("=== HyperFactions Debug Status ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg("=== " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DEBUG_FULL_STATUS_HEADER) + " ===", COLOR_CYAN).bold(true)); // Data counts ctx.sendMessage(msg("Data:", COLOR_GRAY)); @@ -249,7 +248,7 @@ public void handleDebugPower(CommandContext ctx, String[] args) { ctx.sendMessage(prefix().insert(msg("Usage: /f admin debug power ", COLOR_RED))); return; } - ctx.sendMessage(prefix().insert(msg("Debug power info not yet implemented.", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DEBUG_NOT_IMPLEMENTED), COLOR_YELLOW))); } /** Handles debug claim. */ @@ -290,7 +289,7 @@ public void handleDebugClaim(CommandContext ctx, Store store, Ref store, Ref ref, World world, String[] args) { - ctx.sendMessage(prefix().insert(msg("Debug protection info not yet implemented.", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DEBUG_NOT_IMPLEMENTED), COLOR_YELLOW))); } /** Handles debug combat. */ @@ -299,7 +298,7 @@ public void handleDebugCombat(CommandContext ctx, String[] args) { ctx.sendMessage(prefix().insert(msg("Usage: /f admin debug combat ", COLOR_RED))); return; } - ctx.sendMessage(prefix().insert(msg("Debug combat info not yet implemented.", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DEBUG_NOT_IMPLEMENTED), COLOR_YELLOW))); } public void handleDebugRelation(CommandContext ctx, String[] args) { @@ -307,6 +306,6 @@ public void handleDebugRelation(CommandContext ctx, String[] args) { ctx.sendMessage(prefix().insert(msg("Usage: /f admin debug relation ", COLOR_RED))); return; } - ctx.sendMessage(prefix().insert(msg("Debug relation info not yet implemented.", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DEBUG_NOT_IMPLEMENTED), COLOR_YELLOW))); } } diff --git a/src/main/java/com/hyperfactions/command/admin/handler/AdminEconomyHandler.java b/src/main/java/com/hyperfactions/command/admin/handler/AdminEconomyHandler.java index 5d4cbac4..f501abcc 100644 --- a/src/main/java/com/hyperfactions/command/admin/handler/AdminEconomyHandler.java +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminEconomyHandler.java @@ -7,8 +7,12 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.EconomyManager; import com.hyperfactions.util.CommandHelp; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.HelpFormatter; import com.hyperfactions.util.ErrorHandler; +import com.hyperfactions.util.AdminKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.HelpKeys; import com.hyperfactions.util.Logger; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.server.core.Message; @@ -64,18 +68,18 @@ public AdminEconomyHandler(HyperFactions hyperFactions) { /** Handles admin economy. */ public void handleAdminEconomy(CommandContext ctx, @Nullable PlayerRef player, UUID senderUuid, String[] args) { if (!hasPermission(player, Permissions.ADMIN_ECONOMY)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.NO_PERMISSION), COLOR_RED))); return; } EconomyManager econ = hyperFactions.getEconomyManager(); if (econ == null) { - ctx.sendMessage(prefix().insert(msg("Economy system is not enabled.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, CommonKeys.Common.ECONOMY_DISABLED), COLOR_RED))); return; } if (args.length == 0 || args[0].equalsIgnoreCase("help")) { - showAdminEconomyHelp(ctx); + showAdminEconomyHelp(ctx, player); return; } @@ -89,20 +93,20 @@ public void handleAdminEconomy(CommandContext ctx, @Nullable PlayerRef player, U case "total" -> handleTotal(ctx, econ); case "reset" -> handleReset(ctx, econ, senderUuid, args); case "upkeep" -> handleUpkeep(ctx, senderUuid); - default -> ctx.sendMessage(prefix().insert(msg("Unknown economy command. Use /f admin economy help", COLOR_RED))); + default -> ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ECON_UNKNOWN_CMD), COLOR_RED))); } } - private void showAdminEconomyHelp(CommandContext ctx) { + private void showAdminEconomyHelp(CommandContext ctx, @Nullable PlayerRef player) { List commands = new ArrayList<>(); - commands.add(new CommandHelp("/f admin economy balance ", "Show faction balance")); - commands.add(new CommandHelp("/f admin economy set ", "Set exact balance")); - commands.add(new CommandHelp("/f admin economy add ", "Add to balance")); - commands.add(new CommandHelp("/f admin economy take ", "Deduct from balance")); - commands.add(new CommandHelp("/f admin economy total", "Show server total balance")); - commands.add(new CommandHelp("/f admin economy reset ", "Reset balance to 0")); - commands.add(new CommandHelp("/f admin economy upkeep", "Manually trigger upkeep collection")); - ctx.sendMessage(HelpFormatter.buildHelp("Admin Economy", "Manage faction treasuries", commands, null)); + commands.add(new CommandHelp("/f admin economy balance ", HelpKeys.Help.ECONOMY_CMD_BALANCE)); + commands.add(new CommandHelp("/f admin economy set ", HelpKeys.Help.ECONOMY_CMD_SET)); + commands.add(new CommandHelp("/f admin economy add ", HelpKeys.Help.ECONOMY_CMD_ADD)); + commands.add(new CommandHelp("/f admin economy take ", HelpKeys.Help.ECONOMY_CMD_TAKE)); + commands.add(new CommandHelp("/f admin economy total", HelpKeys.Help.ECONOMY_CMD_TOTAL)); + commands.add(new CommandHelp("/f admin economy reset ", HelpKeys.Help.ECONOMY_CMD_RESET)); + commands.add(new CommandHelp("/f admin economy upkeep", HelpKeys.Help.ECONOMY_CMD_UPKEEP)); + ctx.sendMessage(HelpFormatter.buildHelp(HelpKeys.Help.ECONOMY_TITLE, HelpKeys.Help.ECONOMY_DESCRIPTION, commands, null, player)); } // /f admin economy balance @@ -114,7 +118,7 @@ private void handleBalance(CommandContext ctx, EconomyManager econ, String[] arg String factionName = args[1]; Faction faction = hyperFactions.getFactionManager().getFactionByName(factionName); if (faction == null) { - ctx.sendMessage(prefix().insert(msg("Faction not found: " + factionName, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.FACTION_NOT_FOUND, factionName), COLOR_RED))); return; } @@ -141,7 +145,7 @@ private void handleSet(CommandContext ctx, EconomyManager econ, UUID senderUuid, } if (amount.compareTo(BigDecimal.ZERO) < 0) { - ctx.sendMessage(prefix().insert(msg("Balance cannot be negative.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.BALANCE_NOT_NEGATIVE), COLOR_RED))); return; } @@ -151,17 +155,13 @@ private void handleSet(CommandContext ctx, EconomyManager econ, UUID senderUuid, econ.setBalance(faction.id(), amount, senderUuid).thenAccept(result -> { if (result == EconomyAPI.TransactionResult.SUCCESS) { - ctx.sendMessage(prefix().insert(msg("Set ", COLOR_GREEN)) - .insert(msg(faction.name(), COLOR_CYAN)) - .insert(msg("'s balance to ", COLOR_GREEN)) - .insert(msg(econ.formatCurrency(amount), COLOR_GOLD)) - .insert(msg(" (was " + econ.formatCurrency(oldBalance) + ")", COLOR_GRAY))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_SET, faction.name(), econ.formatCurrency(amount)), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Failed: " + result.name(), COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_FAILED, result.name()), COLOR_RED))); } }).exceptionally(ex -> { ErrorHandler.report(String.format("Admin economy set balance failed for %s", faction.name()), ex); - ctx.sendMessage(prefix().insert(msg("An error occurred.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ERROR_GENERIC, ex.getMessage()), COLOR_RED))); return null; }); } @@ -183,7 +183,7 @@ private void handleAdd(CommandContext ctx, EconomyManager econ, UUID senderUuid, } if (amount.compareTo(BigDecimal.ZERO) <= 0) { - ctx.sendMessage(prefix().insert(msg("Amount must be positive.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.AMOUNT_POSITIVE), COLOR_RED))); return; } @@ -193,17 +193,13 @@ private void handleAdd(CommandContext ctx, EconomyManager econ, UUID senderUuid, econ.adminAdjust(faction.id(), amount, senderUuid, desc).thenAccept(result -> { if (result == EconomyAPI.TransactionResult.SUCCESS) { BigDecimal newBalance = econ.getFactionBalance(faction.id()); - ctx.sendMessage(prefix().insert(msg("Added ", COLOR_GREEN)) - .insert(msg(econ.formatCurrency(amount), COLOR_GOLD)) - .insert(msg(" to ", COLOR_GREEN)) - .insert(msg(faction.name(), COLOR_CYAN)) - .insert(msg(" (balance: " + econ.formatCurrency(newBalance) + ")", COLOR_GRAY))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_ADDED, econ.formatCurrency(amount), faction.name(), econ.formatCurrency(newBalance)), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Failed: " + result.name(), COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_FAILED, result.name()), COLOR_RED))); } }).exceptionally(ex -> { ErrorHandler.report(String.format("Admin economy add failed for %s", faction.name()), ex); - ctx.sendMessage(prefix().insert(msg("An error occurred.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ERROR_GENERIC, ex.getMessage()), COLOR_RED))); return null; }); } @@ -225,7 +221,7 @@ private void handleTake(CommandContext ctx, EconomyManager econ, UUID senderUuid } if (amount.compareTo(BigDecimal.ZERO) <= 0) { - ctx.sendMessage(prefix().insert(msg("Amount must be positive.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.AMOUNT_POSITIVE), COLOR_RED))); return; } @@ -235,17 +231,13 @@ private void handleTake(CommandContext ctx, EconomyManager econ, UUID senderUuid econ.adminAdjust(faction.id(), amount.negate(), senderUuid, desc).thenAccept(result -> { if (result == EconomyAPI.TransactionResult.SUCCESS) { BigDecimal newBalance = econ.getFactionBalance(faction.id()); - ctx.sendMessage(prefix().insert(msg("Deducted ", COLOR_GREEN)) - .insert(msg(econ.formatCurrency(amount), COLOR_GOLD)) - .insert(msg(" from ", COLOR_GREEN)) - .insert(msg(faction.name(), COLOR_CYAN)) - .insert(msg(" (balance: " + econ.formatCurrency(newBalance) + ")", COLOR_GRAY))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_DEDUCTED, econ.formatCurrency(amount), faction.name(), econ.formatCurrency(newBalance)), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Failed: " + result.name(), COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_FAILED, result.name()), COLOR_RED))); } }).exceptionally(ex -> { ErrorHandler.report(String.format("Admin economy take failed for %s", faction.name()), ex); - ctx.sendMessage(prefix().insert(msg("An error occurred.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ERROR_GENERIC, ex.getMessage()), COLOR_RED))); return null; }); } @@ -256,7 +248,7 @@ private void handleTotal(CommandContext ctx, EconomyManager econ) { int count = econ.getFactionEconomyCount(); BigDecimal avg = count > 0 ? total.divide(BigDecimal.valueOf(count), 2, java.math.RoundingMode.HALF_UP) : BigDecimal.ZERO; - ctx.sendMessage(prefix().insert(msg("Server Economy Statistics", COLOR_CYAN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_TOTAL_HEADER), COLOR_CYAN))); ctx.sendMessage(msg(" Total Balance: ", COLOR_GRAY) .insert(msg(econ.formatCurrency(total), COLOR_GOLD))); ctx.sendMessage(msg(" Factions: ", COLOR_GRAY) @@ -282,17 +274,13 @@ private void handleReset(CommandContext ctx, EconomyManager econ, UUID senderUui econ.setBalance(faction.id(), BigDecimal.ZERO, senderUuid).thenAccept(result -> { if (result == EconomyAPI.TransactionResult.SUCCESS) { - ctx.sendMessage(prefix().insert(msg("Reset ", COLOR_GREEN)) - .insert(msg(faction.name(), COLOR_CYAN)) - .insert(msg("'s balance to ", COLOR_GREEN)) - .insert(msg(econ.formatCurrency(BigDecimal.ZERO), COLOR_GOLD)) - .insert(msg(" (was " + econ.formatCurrency(oldBalance) + ")", COLOR_GRAY))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_RESET, faction.name()), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Failed: " + result.name(), COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_FAILED, result.name()), COLOR_RED))); } }).exceptionally(ex -> { ErrorHandler.report(String.format("Admin economy reset failed for %s", faction.name()), ex); - ctx.sendMessage(prefix().insert(msg("An error occurred.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ERROR_GENERIC, ex.getMessage()), COLOR_RED))); return null; }); } @@ -301,18 +289,18 @@ private void handleReset(CommandContext ctx, EconomyManager econ, UUID senderUui private void handleUpkeep(CommandContext ctx, UUID senderUuid) { com.hyperfactions.economy.UpkeepProcessor processor = hyperFactions.getUpkeepProcessor(); if (processor == null) { - ctx.sendMessage(prefix().insert(msg("Upkeep system is not enabled.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_UPKEEP_DISABLED), COLOR_RED))); return; } - ctx.sendMessage(prefix().insert(msg("Manually triggering upkeep collection...", COLOR_CYAN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_UPKEEP_TRIGGER), COLOR_CYAN))); Logger.info("[Admin] %s manually triggered upkeep collection", senderUuid); try { processor.processUpkeep(); - ctx.sendMessage(prefix().insert(msg("Upkeep collection completed. Check server log for details.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_UPKEEP_COMPLETE), COLOR_GREEN))); } catch (Exception e) { - ctx.sendMessage(prefix().insert(msg("Upkeep collection failed: " + e.getMessage(), COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ECON_UPKEEP_FAILED, e.getMessage()), COLOR_RED))); ErrorHandler.report("[Admin] Manual upkeep collection failed", e); } } @@ -321,7 +309,7 @@ private void handleUpkeep(CommandContext ctx, UUID senderUuid) { private Faction resolveFaction(CommandContext ctx, String name) { Faction faction = hyperFactions.getFactionManager().getFactionByName(name); if (faction == null) { - ctx.sendMessage(prefix().insert(msg("Faction not found: " + name, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.FACTION_NOT_FOUND, name), COLOR_RED))); } return faction; } @@ -331,7 +319,7 @@ private BigDecimal parseBigDecimal(CommandContext ctx, String value) { try { return new BigDecimal(value); } catch (NumberFormatException e) { - ctx.sendMessage(prefix().insert(msg("Invalid number: " + value, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.INVALID_NUMBER, value), COLOR_RED))); return null; } } diff --git a/src/main/java/com/hyperfactions/command/admin/handler/AdminImportHandler.java b/src/main/java/com/hyperfactions/command/admin/handler/AdminImportHandler.java index 834275bd..623fb87a 100644 --- a/src/main/java/com/hyperfactions/command/admin/handler/AdminImportHandler.java +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminImportHandler.java @@ -8,9 +8,14 @@ import com.hyperfactions.importer.ImportResult; import com.hyperfactions.importer.SimpleClaimsImporter; import com.hyperfactions.util.CommandHelp; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.HelpFormatter; +import com.hyperfactions.util.AdminKeys; +import com.hyperfactions.util.HelpKeys; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.command.system.CommandContext; +import com.hypixel.hytale.server.core.universe.PlayerRef; +import org.jetbrains.annotations.Nullable; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; @@ -49,9 +54,9 @@ public AdminImportHandler(HyperFactions hyperFactions) { } /** Handles admin import. */ - public void handleAdminImport(CommandContext ctx, String[] args) { + public void handleAdminImport(CommandContext ctx, @Nullable PlayerRef player, String[] args) { if (args.length == 0) { - showImportHelp(ctx); + showImportHelp(ctx, player); return; } @@ -63,30 +68,30 @@ public void handleAdminImport(CommandContext ctx, String[] args) { case "elbaphfactions" -> handleImportElbaphFactions(ctx, subArgs); case "factionsx" -> handleImportFactionsX(ctx, subArgs); case "simpleclaims" -> handleImportSimpleClaims(ctx, subArgs); - case "help", "?" -> showImportHelp(ctx); + case "help", "?" -> showImportHelp(ctx, player); default -> { - ctx.sendMessage(prefix().insert(msg("Unknown import source: " + subCmd, COLOR_RED))); - showImportHelp(ctx); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.IMPORT_UNKNOWN_SOURCE, subCmd), COLOR_RED))); + showImportHelp(ctx, player); } } } - private void showImportHelp(CommandContext ctx) { + private void showImportHelp(CommandContext ctx, @Nullable PlayerRef player) { List commands = new ArrayList<>(); - commands.add(new CommandHelp("/f admin import hyfactions [path] [flags]", "Import from HyFactions mod")); - commands.add(new CommandHelp(" Default path: mods/Kaws_Hyfaction", "")); - commands.add(new CommandHelp("/f admin import elbaphfactions [path] [flags]", "Import from ElbaphFactions mod")); - commands.add(new CommandHelp(" Default path: mods/ElbaphFactions", "")); - commands.add(new CommandHelp("/f admin import factionsx [path] [flags]", "Import from FactionsX mod")); - commands.add(new CommandHelp(" Default path: mods/FactionsX", "")); - commands.add(new CommandHelp("/f admin import simpleclaims [path] [flags]", "Import from SimpleClaims mod")); - commands.add(new CommandHelp(" Default path: Server/universe/SimpleClaims", "")); - commands.add(new CommandHelp(" Flags:", "")); - commands.add(new CommandHelp(" --dry-run / -n", "Simulate without changes")); - commands.add(new CommandHelp(" --overwrite", "Replace existing factions")); - commands.add(new CommandHelp(" --no-zones", "Skip zone import")); - commands.add(new CommandHelp(" --no-power", "Skip power distribution")); - ctx.sendMessage(HelpFormatter.buildHelp("Import Commands", "Migrate from other faction plugins", commands, null)); + commands.add(new CommandHelp("/f admin import hyfactions [path] [flags]", HelpKeys.Help.IMPORT_CMD_HYFACTIONS)); + commands.add(new CommandHelp(" " + HFMessages.get(player, HelpKeys.Help.IMPORT_PATH_HYFACTIONS), "")); + commands.add(new CommandHelp("/f admin import elbaphfactions [path] [flags]", HelpKeys.Help.IMPORT_CMD_ELBAPHFACTIONS)); + commands.add(new CommandHelp(" " + HFMessages.get(player, HelpKeys.Help.IMPORT_PATH_ELBAPHFACTIONS), "")); + commands.add(new CommandHelp("/f admin import factionsx [path] [flags]", HelpKeys.Help.IMPORT_CMD_FACTIONSX)); + commands.add(new CommandHelp(" " + HFMessages.get(player, HelpKeys.Help.IMPORT_PATH_FACTIONSX), "")); + commands.add(new CommandHelp("/f admin import simpleclaims [path] [flags]", HelpKeys.Help.IMPORT_CMD_SIMPLECLAIMS)); + commands.add(new CommandHelp(" " + HFMessages.get(player, HelpKeys.Help.IMPORT_PATH_SIMPLECLAIMS), "")); + commands.add(new CommandHelp(" " + HFMessages.get(player, HelpKeys.Help.IMPORT_FLAGS_HEADER), "")); + commands.add(new CommandHelp(" --dry-run / -n", HelpKeys.Help.IMPORT_FLAG_DRYRUN)); + commands.add(new CommandHelp(" --overwrite", HelpKeys.Help.IMPORT_FLAG_OVERWRITE)); + commands.add(new CommandHelp(" --no-zones", HelpKeys.Help.IMPORT_FLAG_NOZONES)); + commands.add(new CommandHelp(" --no-power", HelpKeys.Help.IMPORT_FLAG_NOPOWER)); + ctx.sendMessage(HelpFormatter.buildHelp(HelpKeys.Help.IMPORT_TITLE, HelpKeys.Help.IMPORT_DESCRIPTION, commands, null, player)); } /** Handles import hy factions. */ @@ -118,7 +123,7 @@ public void handleImportHyFactions(CommandContext ctx, String[] args) { } } - ctx.sendMessage(prefix().insert(msg("Importing from HyFactions...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.IMPORT_IMPORTING, "HyFactions"), COLOR_YELLOW))); ctx.sendMessage(msg(" Path: " + dataPath, COLOR_GRAY)); if (dryRun) { ctx.sendMessage(msg(" (Dry run - no changes will be made)", COLOR_GRAY)); @@ -171,7 +176,7 @@ public void handleImportElbaphFactions(CommandContext ctx, String[] args) { } } - ctx.sendMessage(prefix().insert(msg("Importing from ElbaphFactions...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.IMPORT_IMPORTING, "ElbaphFactions"), COLOR_YELLOW))); ctx.sendMessage(msg(" Path: " + dataPath, COLOR_GRAY)); if (dryRun) { ctx.sendMessage(msg(" (Dry run - no changes will be made)", COLOR_GRAY)); @@ -224,7 +229,7 @@ public void handleImportFactionsX(CommandContext ctx, String[] args) { } } - ctx.sendMessage(prefix().insert(msg("Importing from FactionsX...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.IMPORT_IMPORTING, "FactionsX"), COLOR_YELLOW))); ctx.sendMessage(msg(" Path: " + dataPath, COLOR_GRAY)); if (dryRun) { ctx.sendMessage(msg(" (Dry run - no changes will be made)", COLOR_GRAY)); @@ -275,7 +280,7 @@ public void handleImportSimpleClaims(CommandContext ctx, String[] args) { } } - ctx.sendMessage(prefix().insert(msg("Importing from SimpleClaims...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.IMPORT_IMPORTING, "SimpleClaims"), COLOR_YELLOW))); ctx.sendMessage(msg(" Path: " + dataPath, COLOR_GRAY)); if (dryRun) { ctx.sendMessage(msg(" (Dry run - no changes will be made)", COLOR_GRAY)); @@ -300,7 +305,7 @@ public void handleImportSimpleClaims(CommandContext ctx, String[] args) { private void reportImportResult(CommandContext ctx, ImportResult result, boolean dryRun, String sourceName) { if (!result.hasErrors()) { - ctx.sendMessage(prefix().insert(msg(sourceName + " import " + (dryRun ? "simulation " : "") + "complete!", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.IMPORT_COMPLETE, sourceName, dryRun ? "simulation " : ""), COLOR_GREEN))); ctx.sendMessage(msg(" Factions: " + result.factionsImported(), COLOR_GRAY)); ctx.sendMessage(msg(" Claims: " + result.claimsImported(), COLOR_GRAY)); ctx.sendMessage(msg(" Zones: " + result.zonesCreated(), COLOR_GRAY)); @@ -312,7 +317,7 @@ private void reportImportResult(CommandContext ctx, ImportResult result, boolean ctx.sendMessage(msg(" Warnings: " + result.warnings().size() + " (check logs)", COLOR_YELLOW)); } } else { - ctx.sendMessage(prefix().insert(msg(sourceName + " import failed with errors:", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.IMPORT_FAILED, sourceName), COLOR_RED))); for (String error : result.errors()) { ctx.sendMessage(msg(" - " + error, COLOR_RED)); } diff --git a/src/main/java/com/hyperfactions/command/admin/handler/AdminMapDecayHandler.java b/src/main/java/com/hyperfactions/command/admin/handler/AdminMapDecayHandler.java index 370d519e..7791a73b 100644 --- a/src/main/java/com/hyperfactions/command/admin/handler/AdminMapDecayHandler.java +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminMapDecayHandler.java @@ -5,7 +5,10 @@ import com.hyperfactions.command.util.CommandUtil; import com.hyperfactions.config.ConfigManager; import com.hyperfactions.util.CommandHelp; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.HelpFormatter; +import com.hyperfactions.util.AdminKeys; +import com.hyperfactions.util.HelpKeys; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.command.system.CommandContext; import com.hypixel.hytale.server.core.universe.PlayerRef; @@ -59,12 +62,12 @@ public AdminMapDecayHandler(HyperFactions hyperFactions) { /** Handles admin map. */ public void handleAdminMap(CommandContext ctx, @Nullable PlayerRef player, String[] args) { if (!hasPermission(player, Permissions.ADMIN)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.NO_PERMISSION), COLOR_RED))); return; } if (args.length == 0) { - showMapHelp(ctx); + showMapHelp(ctx, player); return; } @@ -73,34 +76,34 @@ public void handleAdminMap(CommandContext ctx, @Nullable PlayerRef player, Strin switch (subCmd) { case "refresh" -> handleMapRefresh(ctx, player); case "status" -> handleMapStatus(ctx); - case "help", "?" -> showMapHelp(ctx); + case "help", "?" -> showMapHelp(ctx, player); default -> { - ctx.sendMessage(prefix().insert(msg("Unknown map command: " + subCmd, COLOR_RED))); - showMapHelp(ctx); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.MAP_UNKNOWN_CMD), COLOR_RED))); + showMapHelp(ctx, player); } } } - private void showMapHelp(CommandContext ctx) { + private void showMapHelp(CommandContext ctx, @Nullable PlayerRef player) { List commands = new ArrayList<>(); - commands.add(new CommandHelp("/f admin map status", "Show world map status and statistics")); - commands.add(new CommandHelp("/f admin map refresh", "Force immediate map refresh")); - ctx.sendMessage(HelpFormatter.buildHelp("World Map", "Map overlay management", commands, null)); + commands.add(new CommandHelp("/f admin map status", HelpKeys.Help.MAP_CMD_STATUS)); + commands.add(new CommandHelp("/f admin map refresh", HelpKeys.Help.MAP_CMD_REFRESH)); + ctx.sendMessage(HelpFormatter.buildHelp(HelpKeys.Help.MAP_TITLE, HelpKeys.Help.MAP_DESCRIPTION, commands, null, player)); } /** Handles map refresh. */ public void handleMapRefresh(CommandContext ctx, @Nullable PlayerRef player) { var worldMapService = hyperFactions.getWorldMapService(); if (worldMapService == null) { - ctx.sendMessage(prefix().insert(msg("World map service is not available.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.MAP_NOT_AVAILABLE), COLOR_RED))); return; } - ctx.sendMessage(prefix().insert(msg("Forcing full world map refresh...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.MAP_REFRESHING), COLOR_YELLOW))); worldMapService.forceFullRefresh(); - ctx.sendMessage(prefix().insert(msg("World map refresh complete.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.MAP_REFRESHED), COLOR_GREEN))); } /** Handles map status. */ @@ -108,7 +111,7 @@ public void handleMapStatus(CommandContext ctx) { var worldMapConfig = ConfigManager.get().worldMap(); var worldMapService = hyperFactions.getWorldMapService(); - ctx.sendMessage(msg("=== World Map Status ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg("=== " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.MAP_STATUS_HEADER) + " ===", COLOR_CYAN).bold(true)); // Config status ctx.sendMessage(msg("Enabled: ", COLOR_GRAY) @@ -191,7 +194,7 @@ public void handleMapStatus(CommandContext ctx) { /** Handles admin decay. */ public void handleAdminDecay(CommandContext ctx, @Nullable PlayerRef player, String[] args) { if (!hasPermission(player, Permissions.ADMIN)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.NO_PERMISSION), COLOR_RED))); return; } @@ -206,26 +209,26 @@ public void handleAdminDecay(CommandContext ctx, @Nullable PlayerRef player, Str case "run", "trigger" -> handleDecayRun(ctx); case "check" -> handleDecayCheck(ctx, Arrays.copyOfRange(args, 1, args.length)); case "status" -> showDecayStatus(ctx); - case "help", "?" -> showDecayHelp(ctx); + case "help", "?" -> showDecayHelp(ctx, player); default -> { - ctx.sendMessage(prefix().insert(msg("Unknown decay command: " + subCmd, COLOR_RED))); - showDecayHelp(ctx); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.DECAY_UNKNOWN_CMD), COLOR_RED))); + showDecayHelp(ctx, player); } } } - private void showDecayHelp(CommandContext ctx) { + private void showDecayHelp(CommandContext ctx, @Nullable PlayerRef player) { List commands = new ArrayList<>(); - commands.add(new CommandHelp("/f admin decay", "Show decay status")); - commands.add(new CommandHelp("/f admin decay run", "Manually trigger claim decay")); - commands.add(new CommandHelp("/f admin decay check ", "Check faction decay status")); - ctx.sendMessage(HelpFormatter.buildHelp("Claim Decay", "Auto-removes claims from inactive factions", commands, null)); + commands.add(new CommandHelp("/f admin decay", HelpKeys.Help.DECAY_CMD_STATUS)); + commands.add(new CommandHelp("/f admin decay run", HelpKeys.Help.DECAY_CMD_RUN)); + commands.add(new CommandHelp("/f admin decay check ", HelpKeys.Help.DECAY_CMD_CHECK)); + ctx.sendMessage(HelpFormatter.buildHelp(HelpKeys.Help.DECAY_TITLE, HelpKeys.Help.DECAY_DESCRIPTION, commands, null, player)); } private void showDecayStatus(CommandContext ctx) { ConfigManager config = ConfigManager.get(); - ctx.sendMessage(msg("=== Claim Decay Status ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg("=== " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DECAY_STATUS_HEADER) + " ===", COLOR_CYAN).bold(true)); ctx.sendMessage(msg("Enabled: ", COLOR_GRAY) .insert(msg(config.isDecayEnabled() ? "Yes" : "No", config.isDecayEnabled() ? COLOR_GREEN : COLOR_RED))); ctx.sendMessage(msg("Inactivity Threshold: ", COLOR_GRAY) @@ -258,20 +261,20 @@ public void handleDecayRun(CommandContext ctx) { ConfigManager config = ConfigManager.get(); if (!config.isDecayEnabled()) { - ctx.sendMessage(prefix().insert(msg("Claim decay is disabled in config.", COLOR_YELLOW))); - ctx.sendMessage(msg("Set claims.decayEnabled to true to enable.", COLOR_GRAY)); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DECAY_DISABLED), COLOR_YELLOW))); + ctx.sendMessage(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DECAY_ENABLE_HINT), COLOR_GRAY)); return; } - ctx.sendMessage(prefix().insert(msg("Running claim decay check...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DECAY_RUNNING), COLOR_YELLOW))); // Run decay on separate thread to avoid blocking CompletableFuture.runAsync(() -> { try { hyperFactions.getClaimManager().tickClaimDecay(); - ctx.sendMessage(prefix().insert(msg("Claim decay check complete. Check console for details.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DECAY_COMPLETE, "?"), COLOR_GREEN))); } catch (Exception e) { - ctx.sendMessage(prefix().insert(msg("Error during decay: " + e.getMessage(), COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DECAY_ERROR, e.getMessage()), COLOR_RED))); } }); } @@ -286,22 +289,22 @@ public void handleDecayCheck(CommandContext ctx, String[] args) { String factionName = args[0]; var faction = hyperFactions.getFactionManager().getFactionByName(factionName); if (faction == null) { - ctx.sendMessage(prefix().insert(msg("Faction '" + factionName + "' not found.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DECAY_CHECK_NOT_FOUND, factionName), COLOR_RED))); return; } ConfigManager config = ConfigManager.get(); - ctx.sendMessage(msg("=== Decay Check: " + faction.name() + " ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg("=== " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DECAY_CHECK_HEADER, faction.name()) + " ===", COLOR_CYAN).bold(true)); ctx.sendMessage(msg("Claims: ", COLOR_GRAY).insert(msg(String.valueOf(faction.getClaimCount()), COLOR_WHITE))); if (faction.getClaimCount() == 0) { - ctx.sendMessage(msg("No claims to decay.", COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DECAY_NO_CLAIMS), COLOR_GRAY)); return; } if (!config.isDecayEnabled()) { - ctx.sendMessage(msg("Decay Status: ", COLOR_GRAY).insert(msg("Disabled globally", COLOR_YELLOW))); + ctx.sendMessage(msg("Decay Status: ", COLOR_GRAY).insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.DECAY_DISABLED_GLOBALLY), COLOR_YELLOW))); return; } diff --git a/src/main/java/com/hyperfactions/command/admin/handler/AdminPowerHandler.java b/src/main/java/com/hyperfactions/command/admin/handler/AdminPowerHandler.java index 055af530..0076578e 100644 --- a/src/main/java/com/hyperfactions/command/admin/handler/AdminPowerHandler.java +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminPowerHandler.java @@ -12,8 +12,11 @@ import com.hyperfactions.data.PlayerPower; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.CommandHelp; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.HelpFormatter; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminKeys; +import com.hyperfactions.util.GuiKeys; +import com.hyperfactions.util.HelpKeys; import com.hyperfactions.util.PlayerResolver; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -69,12 +72,12 @@ public AdminPowerHandler(HyperFactions hyperFactions, HyperFactionsPlugin plugin /** Handles admin power. */ public void handleAdminPower(CommandContext ctx, @Nullable PlayerRef player, UUID senderUuid, String[] args) { if (!hasPermission(player, Permissions.ADMIN_POWER)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.POWER_NO_PERMISSION), COLOR_RED))); return; } if (args.length == 0 || args[0].equalsIgnoreCase("help")) { - showAdminPowerHelp(ctx); + showAdminPowerHelp(ctx, player); return; } @@ -91,23 +94,23 @@ public void handleAdminPower(CommandContext ctx, @Nullable PlayerRef player, UUI case "nodecay" -> handlePowerNoDecay(ctx, senderUuid, args); case "faction" -> handlePowerFaction(ctx, senderUuid, args); case "info" -> handlePowerInfo(ctx, args); - default -> ctx.sendMessage(prefix().insert(msg("Unknown power command. Use /f admin power help", COLOR_RED))); + default -> ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.POWER_UNKNOWN_CMD), COLOR_RED))); } } - private void showAdminPowerHelp(CommandContext ctx) { + private void showAdminPowerHelp(CommandContext ctx, @Nullable PlayerRef player) { List commands = new ArrayList<>(); - commands.add(new CommandHelp("/f admin power set ", "Set exact power")); - commands.add(new CommandHelp("/f admin power add ", "Increase power")); - commands.add(new CommandHelp("/f admin power remove ", "Decrease power")); - commands.add(new CommandHelp("/f admin power reset ", "Reset to default")); - commands.add(new CommandHelp("/f admin power setmax ", "Set max power override")); - commands.add(new CommandHelp("/f admin power resetmax ", "Clear max override")); - commands.add(new CommandHelp("/f admin power noloss ", "Toggle power loss bypass")); - commands.add(new CommandHelp("/f admin power nodecay ", "Toggle claim decay exemption")); - commands.add(new CommandHelp("/f admin power faction ", "Faction-wide operations")); - commands.add(new CommandHelp("/f admin power info ", "Show player power details")); - ctx.sendMessage(HelpFormatter.buildHelp("Admin Power", "Manage player/faction power", commands, null)); + commands.add(new CommandHelp("/f admin power set ", HelpKeys.Help.POWER_CMD_SET)); + commands.add(new CommandHelp("/f admin power add ", HelpKeys.Help.POWER_CMD_ADD)); + commands.add(new CommandHelp("/f admin power remove ", HelpKeys.Help.POWER_CMD_REMOVE)); + commands.add(new CommandHelp("/f admin power reset ", HelpKeys.Help.POWER_CMD_RESET)); + commands.add(new CommandHelp("/f admin power setmax ", HelpKeys.Help.POWER_CMD_SETMAX)); + commands.add(new CommandHelp("/f admin power resetmax ", HelpKeys.Help.POWER_CMD_RESETMAX)); + commands.add(new CommandHelp("/f admin power noloss ", HelpKeys.Help.POWER_CMD_NOLOSS)); + commands.add(new CommandHelp("/f admin power nodecay ", HelpKeys.Help.POWER_CMD_NODECAY)); + commands.add(new CommandHelp("/f admin power faction ", HelpKeys.Help.POWER_CMD_FACTION)); + commands.add(new CommandHelp("/f admin power info ", HelpKeys.Help.POWER_CMD_INFO)); + ctx.sendMessage(HelpFormatter.buildHelp(HelpKeys.Help.POWER_TITLE, HelpKeys.Help.POWER_DESCRIPTION, commands, null, player)); } /** @@ -150,14 +153,14 @@ public void handlePowerSet(CommandContext ctx, UUID senderUuid, String[] args) { } ResolvedPlayer target = resolvePlayer(args[1]); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player not found: " + args[1], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.PLAYER_NOT_FOUND, args[1]), COLOR_RED))); return; } double amount; try { amount = Double.parseDouble(args[2]); } catch (NumberFormatException e) { - ctx.sendMessage(prefix().insert(msg("Invalid number: " + args[2], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.INVALID_NUMBER, args[2]), COLOR_RED))); return; } @@ -165,7 +168,7 @@ public void handlePowerSet(CommandContext ctx, UUID senderUuid, String[] args) { double newPower = hyperFactions.getPowerManager().setPlayerPower(target.uuid(), amount); logAdminPowerChange(target.uuid(), senderUuid, "Admin set " + target.name() + "'s power to " + String.format("%.1f", newPower) + " (was " + String.format("%.1f", oldPower) + ")", - MessageKeys.LogsGui.MSG_ADMIN_POWER_SET, target.name(), String.format("%.1f", newPower), String.format("%.1f", oldPower)); + GuiKeys.LogsGui.MSG_ADMIN_POWER_SET, target.name(), String.format("%.1f", newPower), String.format("%.1f", oldPower)); ctx.sendMessage(prefix().insert(msg("Set ", COLOR_GREEN)) .insert(msg(target.name(), COLOR_CYAN)) .insert(msg("'s power to ", COLOR_GREEN)) @@ -182,14 +185,14 @@ public void handlePowerAdd(CommandContext ctx, UUID senderUuid, String[] args) { } ResolvedPlayer target = resolvePlayer(args[1]); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player not found: " + args[1], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.PLAYER_NOT_FOUND, args[1]), COLOR_RED))); return; } double amount; try { amount = Double.parseDouble(args[2]); } catch (NumberFormatException e) { - ctx.sendMessage(prefix().insert(msg("Invalid number: " + args[2], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.INVALID_NUMBER, args[2]), COLOR_RED))); return; } @@ -197,7 +200,7 @@ public void handlePowerAdd(CommandContext ctx, UUID senderUuid, String[] args) { double newPower = hyperFactions.getPowerManager().adjustPlayerPower(target.uuid(), amount); logAdminPowerChange(target.uuid(), senderUuid, "Admin added " + String.format("%.1f", amount) + " power to " + target.name() + " (" + String.format("%.1f", oldPower) + " -> " + String.format("%.1f", newPower) + ")", - MessageKeys.LogsGui.MSG_ADMIN_POWER_ADD, String.format("%.1f", amount), target.name(), String.format("%.1f", oldPower), String.format("%.1f", newPower)); + GuiKeys.LogsGui.MSG_ADMIN_POWER_ADD, String.format("%.1f", amount), target.name(), String.format("%.1f", oldPower), String.format("%.1f", newPower)); ctx.sendMessage(prefix().insert(msg("Added ", COLOR_GREEN)) .insert(msg(String.format("%.1f", amount), COLOR_WHITE)) .insert(msg(" power to ", COLOR_GREEN)) @@ -214,14 +217,14 @@ public void handlePowerRemove(CommandContext ctx, UUID senderUuid, String[] args } ResolvedPlayer target = resolvePlayer(args[1]); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player not found: " + args[1], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.PLAYER_NOT_FOUND, args[1]), COLOR_RED))); return; } double amount; try { amount = Double.parseDouble(args[2]); } catch (NumberFormatException e) { - ctx.sendMessage(prefix().insert(msg("Invalid number: " + args[2], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.INVALID_NUMBER, args[2]), COLOR_RED))); return; } @@ -229,7 +232,7 @@ public void handlePowerRemove(CommandContext ctx, UUID senderUuid, String[] args double newPower = hyperFactions.getPowerManager().adjustPlayerPower(target.uuid(), -amount); logAdminPowerChange(target.uuid(), senderUuid, "Admin removed " + String.format("%.1f", amount) + " power from " + target.name() + " (" + String.format("%.1f", oldPower) + " -> " + String.format("%.1f", newPower) + ")", - MessageKeys.LogsGui.MSG_ADMIN_POWER_REMOVE, String.format("%.1f", amount), target.name(), String.format("%.1f", oldPower), String.format("%.1f", newPower)); + GuiKeys.LogsGui.MSG_ADMIN_POWER_REMOVE, String.format("%.1f", amount), target.name(), String.format("%.1f", oldPower), String.format("%.1f", newPower)); ctx.sendMessage(prefix().insert(msg("Removed ", COLOR_GREEN)) .insert(msg(String.format("%.1f", amount), COLOR_WHITE)) .insert(msg(" power from ", COLOR_GREEN)) @@ -246,7 +249,7 @@ public void handlePowerReset(CommandContext ctx, UUID senderUuid, String[] args) } ResolvedPlayer target = resolvePlayer(args[1]); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player not found: " + args[1], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.PLAYER_NOT_FOUND, args[1]), COLOR_RED))); return; } @@ -254,7 +257,7 @@ public void handlePowerReset(CommandContext ctx, UUID senderUuid, String[] args) double newPower = hyperFactions.getPowerManager().resetPlayerPower(target.uuid()); logAdminPowerChange(target.uuid(), senderUuid, "Admin reset " + target.name() + "'s power to " + String.format("%.1f", newPower) + " (was " + String.format("%.1f", oldPower) + ")", - MessageKeys.LogsGui.MSG_ADMIN_POWER_RESET, target.name(), String.format("%.1f", newPower), String.format("%.1f", oldPower)); + GuiKeys.LogsGui.MSG_ADMIN_POWER_RESET, target.name(), String.format("%.1f", newPower), String.format("%.1f", oldPower)); ctx.sendMessage(prefix().insert(msg("Reset ", COLOR_GREEN)) .insert(msg(target.name(), COLOR_CYAN)) .insert(msg("'s power to ", COLOR_GREEN)) @@ -271,18 +274,18 @@ public void handlePowerSetMax(CommandContext ctx, UUID senderUuid, String[] args } ResolvedPlayer target = resolvePlayer(args[1]); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player not found: " + args[1], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.PLAYER_NOT_FOUND, args[1]), COLOR_RED))); return; } double amount; try { amount = Double.parseDouble(args[2]); if (amount <= 0) { - ctx.sendMessage(prefix().insert(msg("Max power must be positive.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.POWER_MAX_POSITIVE), COLOR_RED))); return; } } catch (NumberFormatException e) { - ctx.sendMessage(prefix().insert(msg("Invalid number: " + args[2], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.INVALID_NUMBER, args[2]), COLOR_RED))); return; } @@ -291,7 +294,7 @@ public void handlePowerSetMax(CommandContext ctx, UUID senderUuid, String[] args double newCurrentPower = hyperFactions.getPowerManager().setPlayerMaxPower(target.uuid(), amount); logAdminPowerChange(target.uuid(), senderUuid, "Admin set " + target.name() + "'s max power to " + String.format("%.1f", amount) + " (was " + String.format("%.1f", oldMax) + ")", - MessageKeys.LogsGui.MSG_ADMIN_MAXPOWER_SET, target.name(), String.format("%.1f", amount), String.format("%.1f", oldMax)); + GuiKeys.LogsGui.MSG_ADMIN_MAXPOWER_SET, target.name(), String.format("%.1f", amount), String.format("%.1f", oldMax)); ctx.sendMessage(prefix().insert(msg("Set ", COLOR_GREEN)) .insert(msg(target.name(), COLOR_CYAN)) .insert(msg("'s max power to ", COLOR_GREEN)) @@ -308,7 +311,7 @@ public void handlePowerResetMax(CommandContext ctx, UUID senderUuid, String[] ar } ResolvedPlayer target = resolvePlayer(args[1]); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player not found: " + args[1], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.PLAYER_NOT_FOUND, args[1]), COLOR_RED))); return; } @@ -318,7 +321,7 @@ public void handlePowerResetMax(CommandContext ctx, UUID senderUuid, String[] ar double globalMax = ConfigManager.get().getMaxPlayerPower(); logAdminPowerChange(target.uuid(), senderUuid, "Admin reset " + target.name() + "'s max power to global default (" + String.format("%.1f", globalMax) + ")", - MessageKeys.LogsGui.MSG_ADMIN_MAXPOWER_RESET, target.name(), String.format("%.1f", globalMax)); + GuiKeys.LogsGui.MSG_ADMIN_MAXPOWER_RESET, target.name(), String.format("%.1f", globalMax)); ctx.sendMessage(prefix().insert(msg("Reset ", COLOR_GREEN)) .insert(msg(target.name(), COLOR_CYAN)) .insert(msg("'s max power to global default ", COLOR_GREEN)) @@ -335,7 +338,7 @@ public void handlePowerNoLoss(CommandContext ctx, UUID senderUuid, String[] args } ResolvedPlayer target = resolvePlayer(args[1]); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player not found: " + args[1], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.PLAYER_NOT_FOUND, args[1]), COLOR_RED))); return; } @@ -344,7 +347,7 @@ public void handlePowerNoLoss(CommandContext ctx, UUID senderUuid, String[] args hyperFactions.getPowerManager().setPlayerPowerLossDisabled(target.uuid(), newState); logAdminPowerChange(target.uuid(), senderUuid, "Admin " + (newState ? "disabled" : "enabled") + " power loss for " + target.name(), - newState ? MessageKeys.LogsGui.MSG_ADMIN_POWERLOSS_DISABLED : MessageKeys.LogsGui.MSG_ADMIN_POWERLOSS_ENABLED, target.name()); + newState ? GuiKeys.LogsGui.MSG_ADMIN_POWERLOSS_DISABLED : GuiKeys.LogsGui.MSG_ADMIN_POWERLOSS_ENABLED, target.name()); ctx.sendMessage(prefix().insert(msg("Power loss ", COLOR_GREEN)) .insert(msg(newState ? "disabled" : "enabled", newState ? COLOR_RED : COLOR_GREEN)) .insert(msg(" for ", COLOR_GREEN)) @@ -360,7 +363,7 @@ public void handlePowerNoDecay(CommandContext ctx, UUID senderUuid, String[] arg } ResolvedPlayer target = resolvePlayer(args[1]); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player not found: " + args[1], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.PLAYER_NOT_FOUND, args[1]), COLOR_RED))); return; } @@ -369,7 +372,7 @@ public void handlePowerNoDecay(CommandContext ctx, UUID senderUuid, String[] arg hyperFactions.getPowerManager().setPlayerClaimDecayExempt(target.uuid(), newState); logAdminPowerChange(target.uuid(), senderUuid, "Admin " + (newState ? "enabled" : "disabled") + " claim decay exemption for " + target.name(), - newState ? MessageKeys.LogsGui.MSG_ADMIN_DECAY_ENABLED : MessageKeys.LogsGui.MSG_ADMIN_DECAY_DISABLED, target.name()); + newState ? GuiKeys.LogsGui.MSG_ADMIN_DECAY_ENABLED : GuiKeys.LogsGui.MSG_ADMIN_DECAY_DISABLED, target.name()); ctx.sendMessage(prefix().insert(msg("Claim decay exemption ", COLOR_GREEN)) .insert(msg(newState ? "enabled" : "disabled", newState ? COLOR_GREEN : COLOR_RED)) .insert(msg(" for ", COLOR_GREEN)) @@ -386,7 +389,7 @@ public void handlePowerFaction(CommandContext ctx, UUID senderUuid, String[] arg String factionName = args[1]; Faction faction = hyperFactions.getFactionManager().getFactionByName(factionName); if (faction == null) { - ctx.sendMessage(prefix().insert(msg("Faction not found: " + factionName, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.FACTION_NOT_FOUND, factionName), COLOR_RED))); return; } @@ -410,7 +413,7 @@ public void handlePowerFaction(CommandContext ctx, UUID senderUuid, String[] arg FactionLog.LogType.ADMIN_POWER, "Admin set all " + members.size() + " members' power to " + String.format("%.1f", amount), senderUuid, - MessageKeys.LogsGui.MSG_ADMIN_POWER_SET_ALL, String.valueOf(members.size()), String.format("%.1f", amount)))); + GuiKeys.LogsGui.MSG_ADMIN_POWER_SET_ALL, String.valueOf(members.size()), String.format("%.1f", amount)))); ctx.sendMessage(prefix().insert(msg("Set power to ", COLOR_GREEN)) .insert(msg(String.format("%.1f", amount), COLOR_WHITE)) .insert(msg(" for " + members.size() + " members of ", COLOR_GREEN)) @@ -432,7 +435,7 @@ public void handlePowerFaction(CommandContext ctx, UUID senderUuid, String[] arg FactionLog.LogType.ADMIN_POWER, "Admin added " + String.format("%.1f", amount) + " power to all " + members.size() + " members", senderUuid, - MessageKeys.LogsGui.MSG_ADMIN_POWER_ADD_ALL, String.format("%.1f", amount), String.valueOf(members.size())))); + GuiKeys.LogsGui.MSG_ADMIN_POWER_ADD_ALL, String.format("%.1f", amount), String.valueOf(members.size())))); ctx.sendMessage(prefix().insert(msg("Added ", COLOR_GREEN)) .insert(msg(String.format("%.1f", amount), COLOR_WHITE)) .insert(msg(" power to " + members.size() + " members of ", COLOR_GREEN)) @@ -454,7 +457,7 @@ public void handlePowerFaction(CommandContext ctx, UUID senderUuid, String[] arg FactionLog.LogType.ADMIN_POWER, "Admin removed " + String.format("%.1f", amount) + " power from all " + members.size() + " members", senderUuid, - MessageKeys.LogsGui.MSG_ADMIN_POWER_REMOVE_ALL, String.format("%.1f", amount), String.valueOf(members.size())))); + GuiKeys.LogsGui.MSG_ADMIN_POWER_REMOVE_ALL, String.format("%.1f", amount), String.valueOf(members.size())))); ctx.sendMessage(prefix().insert(msg("Removed ", COLOR_GREEN)) .insert(msg(String.format("%.1f", amount), COLOR_WHITE)) .insert(msg(" power from " + members.size() + " members of ", COLOR_GREEN)) @@ -468,13 +471,13 @@ public void handlePowerFaction(CommandContext ctx, UUID senderUuid, String[] arg FactionLog.LogType.ADMIN_POWER, "Admin reset power for all " + members.size() + " members", senderUuid, - MessageKeys.LogsGui.MSG_ADMIN_POWER_RESET_ALL, String.valueOf(members.size())))); + GuiKeys.LogsGui.MSG_ADMIN_POWER_RESET_ALL, String.valueOf(members.size())))); ctx.sendMessage(prefix().insert(msg("Reset power for ", COLOR_GREEN)) .insert(msg(String.valueOf(members.size()), COLOR_WHITE)) .insert(msg(" members of ", COLOR_GREEN)) .insert(msg(faction.name(), COLOR_CYAN))); } - default -> ctx.sendMessage(prefix().insert(msg("Unknown faction power action. Use: set, add, remove, reset", COLOR_RED))); + default -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.POWER_FACTION_UNKNOWN_ACTION), COLOR_RED))); } } @@ -487,7 +490,7 @@ public void handlePowerInfo(CommandContext ctx, String[] args) { } ResolvedPlayer target = resolvePlayer(args[1]); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player not found: " + args[1], COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.PLAYER_NOT_FOUND, args[1]), COLOR_RED))); return; } @@ -520,7 +523,7 @@ public void handlePowerInfo(CommandContext ctx, String[] args) { /** Handles clear history. */ public void handleClearHistory(CommandContext ctx, @Nullable PlayerRef player, String[] args) { if (!hasPermission(player, Permissions.ADMIN)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.NO_PERMISSION), COLOR_RED))); return; } @@ -534,7 +537,7 @@ public void handleClearHistory(CommandContext ctx, @Nullable PlayerRef player, S // Resolve player using centralized resolver (online -> faction members -> PlayerDB) var resolved = PlayerResolver.resolve(hyperFactions, targetName); if (resolved == null) { - ctx.sendMessage(prefix().insert(msg("Player not found.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.PLAYER_NOT_FOUND, targetName), COLOR_RED))); return; } @@ -544,7 +547,7 @@ public void handleClearHistory(CommandContext ctx, @Nullable PlayerRef player, S final String finalName = resolvedName; hyperFactions.getPlayerStorage().loadPlayerData(targetUuid).thenAccept(opt -> { if (opt.isEmpty()) { - ctx.sendMessage(prefix().insert(msg("No player data found for " + finalName + ".", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.HISTORY_NO_DATA, finalName), COLOR_RED))); return; } @@ -552,7 +555,7 @@ public void handleClearHistory(CommandContext ctx, @Nullable PlayerRef player, S int count = data.getMembershipHistory().size(); if (count == 0) { - ctx.sendMessage(prefix().insert(msg(finalName + " has no membership history.", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.HISTORY_EMPTY, finalName), COLOR_YELLOW))); return; } @@ -573,10 +576,9 @@ public void handleClearHistory(CommandContext ctx, @Nullable PlayerRef player, S hyperFactions.getPlayerStorage().savePlayerData(data).thenRun(() -> { if (currentFaction != null) { - ctx.sendMessage(prefix().insert(msg("Cleared " + count + " history records for " + finalName - + " (re-initialized with current faction: " + currentFaction.name() + ").", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.HISTORY_CLEARED_REINIT, String.valueOf(count), finalName, currentFaction.name()), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Cleared " + count + " history records for " + finalName + ".", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.HISTORY_CLEARED, String.valueOf(count), finalName), COLOR_GREEN))); } }); }); @@ -590,7 +592,7 @@ private double parseDouble(CommandContext ctx, String value) { try { return Double.parseDouble(value); } catch (NumberFormatException e) { - ctx.sendMessage(prefix().insert(msg("Invalid number: " + value, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.INVALID_NUMBER, value), COLOR_RED))); return Double.NaN; } } diff --git a/src/main/java/com/hyperfactions/command/admin/handler/AdminTestHandler.java b/src/main/java/com/hyperfactions/command/admin/handler/AdminTestHandler.java index 18462b93..cbc20ce1 100644 --- a/src/main/java/com/hyperfactions/command/admin/handler/AdminTestHandler.java +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminTestHandler.java @@ -4,7 +4,10 @@ import com.hyperfactions.command.util.CommandUtil; import com.hyperfactions.integration.SentryIntegration; import com.hyperfactions.util.CommandHelp; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.HelpFormatter; +import com.hyperfactions.util.AdminKeys; +import com.hyperfactions.util.HelpKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.Message; @@ -54,7 +57,7 @@ public void handleTest(@NotNull CommandContext ctx, @Nullable Store @Nullable Ref ref, @Nullable PlayerRef player, @NotNull String[] subArgs, boolean isPlayer) { if (subArgs.length == 0) { - showTestHelp(ctx); + showTestHelp(ctx, player); return; } @@ -62,14 +65,14 @@ public void handleTest(@NotNull CommandContext ctx, @Nullable Store case "gui" -> handleTestGui(ctx, store, ref, player, isPlayer); case "sentry" -> handleSentryTest(ctx); case "md", "markdown" -> handleMarkdownTest(ctx, store, ref, player, isPlayer); - default -> showTestHelp(ctx); + default -> showTestHelp(ctx, player); } } private void handleTestGui(CommandContext ctx, Store store, Ref ref, PlayerRef player, boolean isPlayer) { if (!isPlayer) { - ctx.sendMessage(prefix().insert(msg("This command can only be used by a player.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.PLAYER_ONLY), COLOR_RED))); return; } Player playerEntity = store.getComponent(ref, Player.getComponentType()); @@ -80,22 +83,22 @@ private void handleTestGui(CommandContext ctx, Store store, private void handleSentryTest(CommandContext ctx) { if (!SentryIntegration.isInitialized()) { - ctx.sendMessage(prefix().insert(msg("Sentry is not initialized. Check config/debug.json", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.SENTRY_NOT_INITIALIZED), COLOR_RED))); return; } boolean sent = SentryIntegration.sendTestEvent(); if (sent) { - ctx.sendMessage(prefix().insert(msg("Test error sent to Sentry. Check your Sentry dashboard.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.SENTRY_TEST_SENT), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Failed to send test event.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.SENTRY_TEST_FAILED), COLOR_RED))); } } private void handleMarkdownTest(CommandContext ctx, Store store, Ref ref, PlayerRef player, boolean isPlayer) { if (!isPlayer) { - ctx.sendMessage(prefix().insert(msg("This command can only be used by a player.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.PLAYER_ONLY), COLOR_RED))); return; } Player playerEntity = store.getComponent(ref, Player.getComponentType()); @@ -104,11 +107,11 @@ private void handleMarkdownTest(CommandContext ctx, Store store, } } - private void showTestHelp(CommandContext ctx) { + private void showTestHelp(CommandContext ctx, @Nullable PlayerRef player) { List commands = new ArrayList<>(); - commands.add(new CommandHelp("/f admin test gui", "Open UI element test page")); - commands.add(new CommandHelp("/f admin test sentry", "Send test error to Sentry")); - commands.add(new CommandHelp("/f admin test md", "Open markdown rendering test page")); - ctx.sendMessage(HelpFormatter.buildHelp("Test Commands", "Development testing tools", commands, null)); + commands.add(new CommandHelp("/f admin test gui", HelpKeys.Help.TEST_CMD_GUI)); + commands.add(new CommandHelp("/f admin test sentry", HelpKeys.Help.TEST_CMD_SENTRY)); + commands.add(new CommandHelp("/f admin test md", HelpKeys.Help.TEST_CMD_MD)); + ctx.sendMessage(HelpFormatter.buildHelp(HelpKeys.Help.TEST_TITLE, HelpKeys.Help.TEST_DESCRIPTION, commands, null, player)); } } diff --git a/src/main/java/com/hyperfactions/command/admin/handler/AdminUpdateHandler.java b/src/main/java/com/hyperfactions/command/admin/handler/AdminUpdateHandler.java index 2939ddc5..9b4d2a3b 100644 --- a/src/main/java/com/hyperfactions/command/admin/handler/AdminUpdateHandler.java +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminUpdateHandler.java @@ -7,8 +7,11 @@ import com.hyperfactions.config.ConfigManager; import com.hyperfactions.config.modules.ServerConfig; import com.hyperfactions.update.UpdateChecker; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.AdminKeys; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.command.system.CommandContext; +import com.hypixel.hytale.server.core.universe.PlayerRef; import java.nio.file.Path; import java.util.UUID; @@ -64,10 +67,10 @@ public void handleAdminUpdate(CommandContext ctx, UUID senderUuid, String[] subA // Legacy alias case "disable-mixin-download" -> handleToggleMixinDownload(ctx); default -> { - ctx.sendMessage(prefix().insert(msg("Unknown update target: " + subArgs[0], COLOR_RED))); - ctx.sendMessage(msg(" /f admin update — update HyperFactions", COLOR_GRAY)); - ctx.sendMessage(msg(" /f admin update mixin — update HyperProtect-Mixin", COLOR_GRAY)); - ctx.sendMessage(msg(" /f admin update toggle-mixin-download — toggle auto-download", COLOR_GRAY)); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_UNKNOWN_TARGET, subArgs[0]), COLOR_RED))); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_USAGE_HF), COLOR_GRAY)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_USAGE_MIXIN), COLOR_GRAY)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_USAGE_TOGGLE), COLOR_GRAY)); } } } @@ -77,17 +80,17 @@ public void handleAdminUpdate(CommandContext ctx, UUID senderUuid, String[] subA private void handleHyperFactionsUpdate(CommandContext ctx, UUID senderUuid) { var updateChecker = hyperFactions.getUpdateChecker(); if (updateChecker == null) { - ctx.sendMessage(prefix().insert(msg("Update checker is not available.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_NOT_AVAILABLE), COLOR_RED))); return; } if (!updateChecker.hasUpdateAvailable()) { - ctx.sendMessage(prefix().insert(msg("Checking for updates...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_CHECKING), COLOR_YELLOW))); updateChecker.checkForUpdates(true).thenAccept(info -> { if (info == null) { - ctx.sendMessage(prefix().insert(msg("Plugin is already up-to-date (v" + updateChecker.getCurrentVersion() + ")", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_UP_TO_DATE, updateChecker.getCurrentVersion()), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Update available: v" + info.version(), COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_AVAILABLE, info.version()), COLOR_GREEN))); startHyperFactionsDownload(ctx, senderUuid, updateChecker, info); } }); @@ -96,7 +99,7 @@ private void handleHyperFactionsUpdate(CommandContext ctx, UUID senderUuid) { var info = updateChecker.getCachedUpdate(); if (info == null) { - ctx.sendMessage(prefix().insert(msg("No update information available.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_NO_INFO), COLOR_RED))); return; } @@ -109,40 +112,40 @@ private void startHyperFactionsDownload(CommandContext ctx, UUID senderUuid, String currentVersion = updateChecker.getCurrentVersion(); // Step 1: Create a data backup before downloading the update - ctx.sendMessage(prefix().insert(msg("Creating pre-update backup...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_CREATING_BACKUP), COLOR_YELLOW))); hyperFactions.getBackupManager().createBackup(BackupType.MANUAL, "pre-update-" + currentVersion, senderUuid) .thenCompose(backupResult -> { if (backupResult instanceof BackupManager.BackupResult.Success success) { - ctx.sendMessage(prefix().insert(msg("Backup created: " + success.metadata().name(), COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_BACKUP_CREATED, success.metadata().name()), COLOR_GREEN))); } else if (backupResult instanceof BackupManager.BackupResult.Failure failure) { - ctx.sendMessage(prefix().insert(msg("Warning: Backup failed - " + failure.error(), COLOR_YELLOW))); - ctx.sendMessage(msg(" Continuing with update anyway...", COLOR_GRAY)); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_BACKUP_WARNING, failure.error()), COLOR_YELLOW))); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_BACKUP_CONTINUE), COLOR_GRAY)); } // Step 2: Download the update - ctx.sendMessage(prefix().insert(msg("Downloading HyperFactions v" + info.version() + "...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_DOWNLOADING, info.version()), COLOR_YELLOW))); return updateChecker.downloadUpdate(info); }) .thenAccept(path -> { if (path == null) { - ctx.sendMessage(prefix().insert(msg("Failed to download update. Check server logs.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_DOWNLOAD_FAILED), COLOR_RED))); } else { - ctx.sendMessage(prefix().insert(msg("Update downloaded successfully!", COLOR_GREEN))); - ctx.sendMessage(msg(" File: " + path.getFileName(), COLOR_GRAY)); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_DOWNLOADED), COLOR_GREEN))); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_FILE_LABEL, path.getFileName()), COLOR_GRAY)); // Step 3: Clean up old JAR backups (keep only the version we just upgraded from) int cleaned = updateChecker.cleanupOldBackups(currentVersion); if (cleaned > 0) { - ctx.sendMessage(msg(" Cleanup: Removed " + cleaned + " old backup(s)", COLOR_GRAY)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_CLEANUP, cleaned), COLOR_GRAY)); } - ctx.sendMessage(msg(" Kept: " + updateChecker.getArtifactName() + "-" + currentVersion + ".jar.backup (for rollback)", COLOR_GRAY)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_KEPT_BACKUP, updateChecker.getArtifactName() + "-" + currentVersion + ".jar.backup"), COLOR_GRAY)); // Step 4: Create rollback marker (safe to rollback until server restarts) updateChecker.createRollbackMarker(currentVersion, info.version()); - ctx.sendMessage(msg(" Restart the server to apply the update.", COLOR_YELLOW)); - ctx.sendMessage(msg(" Use /f admin rollback to revert before restarting.", COLOR_GRAY)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_RESTART), COLOR_YELLOW)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_USE_ROLLBACK), COLOR_GRAY)); // Run manual backup rotation to respect retention limits hyperFactions.getBackupManager().performRotation(); @@ -172,31 +175,31 @@ private void handleMixinUpdate(CommandContext ctx) { ? System.getProperty("hyperprotect.bridge.version", "unknown") : "not installed"; - ctx.sendMessage(prefix().insert(msg("HyperProtect-Mixin: " + currentVersion, COLOR_CYAN))); - ctx.sendMessage(prefix().insert(msg("Checking for updates...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_CURRENT, currentVersion), COLOR_CYAN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_CHECKING), COLOR_YELLOW))); final var checker = hpChecker; checker.checkForUpdates(true).thenAccept(info -> { if (info == null) { if (hpDetected) { - ctx.sendMessage(prefix().insert(msg("HyperProtect-Mixin is up-to-date.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_UP_TO_DATE), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("No HyperProtect-Mixin releases available yet.", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_NONE), COLOR_YELLOW))); } return; } - ctx.sendMessage(prefix().insert(msg("Available: v" + info.version(), COLOR_GREEN))); - ctx.sendMessage(prefix().insert(msg("Downloading HyperProtect-Mixin v" + info.version() + "...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_AVAILABLE, info.version()), COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_DOWNLOADING, info.version()), COLOR_YELLOW))); checker.downloadUpdate(info).thenAccept(path -> { if (path == null) { - ctx.sendMessage(prefix().insert(msg("Failed to download. Check server logs.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_FAILED), COLOR_RED))); } else { - ctx.sendMessage(prefix().insert(msg("Downloaded successfully!", COLOR_GREEN))); - ctx.sendMessage(msg(" File: " + path.getFileName(), COLOR_GRAY)); - ctx.sendMessage(msg(" Location: earlyplugins/", COLOR_GRAY)); - ctx.sendMessage(msg(" Restart the server to apply.", COLOR_YELLOW)); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_DOWNLOADED), COLOR_GREEN))); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_FILE_LABEL, path.getFileName()), COLOR_GRAY)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_LOCATION), COLOR_GRAY)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_RESTART), COLOR_YELLOW)); } }); }); @@ -212,11 +215,11 @@ private void handleToggleMixinDownload(CommandContext ctx) { ConfigManager.get().saveAll(); if (newValue) { - ctx.sendMessage(prefix().insert(msg("HP-Mixin auto-download enabled.", COLOR_GREEN))); - ctx.sendMessage(msg(" HyperProtect-Mixin will be downloaded automatically on next startup if not installed.", COLOR_GRAY)); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_AUTO_ON), COLOR_GREEN))); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_AUTO_ON_DESC), COLOR_GRAY)); } else { - ctx.sendMessage(prefix().insert(msg("HP-Mixin auto-download disabled.", COLOR_GREEN))); - ctx.sendMessage(msg(" Use /f admin update mixin to download manually.", COLOR_GRAY)); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_AUTO_OFF), COLOR_GREEN))); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_MIXIN_AUTO_OFF_DESC), COLOR_GRAY)); } } @@ -226,14 +229,14 @@ private void handleToggleMixinDownload(CommandContext ctx) { public void handleAdminRollback(CommandContext ctx) { var updateChecker = hyperFactions.getUpdateChecker(); if (updateChecker == null) { - ctx.sendMessage(prefix().insert(msg("Update checker is not available.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.UPDATE_NOT_AVAILABLE), COLOR_RED))); return; } // Check if there's a backup to rollback to Path latestBackup = updateChecker.findLatestBackup(); if (latestBackup == null) { - ctx.sendMessage(prefix().insert(msg("No backup JAR found to rollback to.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_NO_BACKUP), COLOR_RED))); return; } @@ -245,12 +248,12 @@ public void handleAdminRollback(CommandContext ctx) { // Check if rollback is safe (server hasn't restarted since update) if (!updateChecker.isRollbackSafe()) { // Server has restarted - migrations may have run - ctx.sendMessage(prefix().insert(msg("Cannot automatically rollback!", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_UNSAFE), COLOR_RED))); ctx.sendMessage(msg("", COLOR_GRAY)); - ctx.sendMessage(msg("The server has been restarted since the last update.", COLOR_YELLOW)); - ctx.sendMessage(msg("Config/data migrations may have been applied.", COLOR_YELLOW)); + ctx.sendMessage(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_UNSAFE_REASON), COLOR_YELLOW)); + ctx.sendMessage(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_UNSAFE_MIGRATION), COLOR_YELLOW)); ctx.sendMessage(msg("", COLOR_GRAY)); - ctx.sendMessage(msg("To rollback safely, you must:", COLOR_WHITE)); + ctx.sendMessage(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_INSTRUCTIONS), COLOR_WHITE)); ctx.sendMessage(msg(" 1. Stop the server", COLOR_GRAY)); ctx.sendMessage(msg(" 2. Restore from the pre-update backup:", COLOR_GRAY)); ctx.sendMessage(msg(" /f admin backup restore ", COLOR_CYAN)); @@ -258,32 +261,32 @@ public void handleAdminRollback(CommandContext ctx) { ctx.sendMessage(msg(" " + latestBackup.getFileName() + " -> " + artifactName + "-" + backupVersion + ".jar", COLOR_CYAN)); ctx.sendMessage(msg(" 4. Restart the server", COLOR_GRAY)); ctx.sendMessage(msg("", COLOR_GRAY)); - ctx.sendMessage(msg("Use /f admin backup list to find the pre-update backup.", COLOR_YELLOW)); + ctx.sendMessage(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_FIND_BACKUP), COLOR_YELLOW)); return; } // Get rollback info var rollbackInfo = updateChecker.getRollbackInfo(); if (rollbackInfo != null) { - ctx.sendMessage(prefix().insert(msg("Rolling back update...", COLOR_YELLOW))); - ctx.sendMessage(msg(" From: v" + rollbackInfo.toVersion() + " (new)", COLOR_GRAY)); - ctx.sendMessage(msg(" To: v" + rollbackInfo.fromVersion() + " (previous)", COLOR_GRAY)); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_ROLLING), COLOR_YELLOW))); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_FROM, rollbackInfo.toVersion()), COLOR_GRAY)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_TO, rollbackInfo.fromVersion()), COLOR_GRAY)); } else { - ctx.sendMessage(prefix().insert(msg("Rolling back to v" + backupVersion + "...", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_VERSION, backupVersion), COLOR_YELLOW))); } // Perform the rollback var result = updateChecker.performRollback(); if (result.success()) { - ctx.sendMessage(prefix().insert(msg("Rollback successful!", COLOR_GREEN))); - ctx.sendMessage(msg(" Restored: " + artifactName + "-" + result.restoredVersion() + ".jar", COLOR_GRAY)); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_SUCCESS), COLOR_GREEN))); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_RESTORED, artifactName + "-" + result.restoredVersion() + ".jar"), COLOR_GRAY)); if (result.removedVersion() != null) { - ctx.sendMessage(msg(" Removed: " + artifactName + "-" + result.removedVersion() + ".jar", COLOR_GRAY)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_REMOVED, artifactName + "-" + result.removedVersion() + ".jar"), COLOR_GRAY)); } - ctx.sendMessage(msg(" Restart the server to apply the rollback.", COLOR_YELLOW)); + ctx.sendMessage(msg(" " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_RESTART), COLOR_YELLOW)); } else { - ctx.sendMessage(prefix().insert(msg("Rollback failed: " + result.errorMessage(), COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ROLLBACK_FAILED, result.errorMessage()), COLOR_RED))); } } } diff --git a/src/main/java/com/hyperfactions/command/admin/handler/AdminWorldHandler.java b/src/main/java/com/hyperfactions/command/admin/handler/AdminWorldHandler.java index 5dd18097..f9636235 100644 --- a/src/main/java/com/hyperfactions/command/admin/handler/AdminWorldHandler.java +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminWorldHandler.java @@ -9,7 +9,10 @@ import com.hyperfactions.config.modules.WorldsConfig; import com.hyperfactions.integration.PermissionManager; import com.hyperfactions.util.CommandHelp; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.HelpFormatter; +import com.hyperfactions.util.AdminKeys; +import com.hyperfactions.util.HelpKeys; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.command.system.CommandContext; import com.hypixel.hytale.server.core.universe.PlayerRef; @@ -63,12 +66,12 @@ public AdminWorldHandler(HyperFactions hyperFactions) { */ public void handleAdminWorld(CommandContext ctx, @Nullable PlayerRef player, String[] args) { if (!hasPermission(player, Permissions.ADMIN)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.NO_PERMISSION), COLOR_RED))); return; } if (args.length == 0 || args[0].equalsIgnoreCase("help")) { - showWorldHelp(ctx); + showWorldHelp(ctx, player); return; } @@ -76,27 +79,27 @@ public void handleAdminWorld(CommandContext ctx, @Nullable PlayerRef player, Str String[] subArgs = args.length > 1 ? Arrays.copyOfRange(args, 1, args.length) : new String[0]; switch (subCmd) { - case "list" -> handleList(ctx); + case "list" -> handleList(ctx, player); case "info" -> handleInfo(ctx, subArgs); - case "set" -> handleSet(ctx, subArgs); - case "reset", "remove" -> handleReset(ctx, subArgs); - default -> ctx.sendMessage(prefix().insert(msg("Unknown world command. Use /f admin world help", COLOR_RED))); + case "set" -> handleSet(ctx, player, subArgs); + case "reset", "remove" -> handleReset(ctx, player, subArgs); + default -> ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.WORLD_UNKNOWN_CMD), COLOR_RED))); } } - private void showWorldHelp(CommandContext ctx) { + private void showWorldHelp(CommandContext ctx, @Nullable PlayerRef player) { List commands = new ArrayList<>(); - commands.add(new CommandHelp("/f admin world list", "List all configured worlds")); - commands.add(new CommandHelp("/f admin world info ", "Show settings for a world")); - commands.add(new CommandHelp("/f admin world set ", "Set a world setting")); - commands.add(new CommandHelp("/f admin world reset ", "Remove world-specific settings")); - ctx.sendMessage(HelpFormatter.buildHelp("World Settings", "Per-world configuration", commands, null)); + commands.add(new CommandHelp("/f admin world list", HelpKeys.Help.WORLD_CMD_LIST)); + commands.add(new CommandHelp("/f admin world info ", HelpKeys.Help.WORLD_CMD_INFO)); + commands.add(new CommandHelp("/f admin world set ", HelpKeys.Help.WORLD_CMD_SET)); + commands.add(new CommandHelp("/f admin world reset ", HelpKeys.Help.WORLD_CMD_RESET)); + ctx.sendMessage(HelpFormatter.buildHelp(HelpKeys.Help.WORLD_TITLE, HelpKeys.Help.WORLD_DESCRIPTION, commands, null, player)); } /** * /f admin world list — show all configured worlds and their settings. */ - private void handleList(CommandContext ctx) { + private void handleList(CommandContext ctx, @Nullable PlayerRef player) { WorldsConfig config = ConfigManager.get().worlds(); var builder = prefix().insert(msg("Per-World Settings", COLOR_CYAN)) @@ -104,7 +107,7 @@ private void handleList(CommandContext ctx) { ctx.sendMessage(builder); if (config.getWorlds().isEmpty()) { - ctx.sendMessage(msg(" No per-world settings configured.", COLOR_GRAY)); + ctx.sendMessage(msg(" " + HFMessages.get(player, AdminKeys.AdminCmd.WORLD_NO_SETTINGS), COLOR_GRAY)); return; } @@ -179,7 +182,7 @@ private void handleInfo(CommandContext ctx, String[] args) { * /f admin world set {@code } {@code } {@code } * Settings: claiming, powerLoss, friendlyFireFaction, friendlyFireAlly */ - private void handleSet(CommandContext ctx, String[] args) { + private void handleSet(CommandContext ctx, @Nullable PlayerRef player, String[] args) { if (args.length < 3) { ctx.sendMessage(prefix().insert(msg("Usage: /f admin world set ", COLOR_RED))); ctx.sendMessage(msg(" Settings: claiming, powerLoss, friendlyFireFaction, friendlyFireAlly", COLOR_GRAY)); @@ -208,7 +211,7 @@ private void handleSet(CommandContext ctx, String[] args) { case "friendlyfirefaction", "fffaction" -> new WorldSettings(current.claiming(), current.powerLoss(), value, current.friendlyFireAlly()); case "friendlyfireally", "ffally" -> new WorldSettings(current.claiming(), current.powerLoss(), current.friendlyFireFaction(), value); default -> { - ctx.sendMessage(prefix().insert(msg("Unknown setting: " + setting, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.WORLD_UNKNOWN_SETTING, setting), COLOR_RED))); ctx.sendMessage(msg(" Settings: claiming, powerLoss, friendlyFireFaction, friendlyFireAlly", COLOR_GRAY)); yield null; } @@ -222,16 +225,13 @@ private void handleSet(CommandContext ctx, String[] args) { config.save(); ConfigManager.get().getWorldSettingsResolver().rebuild(config); - ctx.sendMessage(prefix().insert(msg("Set ", COLOR_GREEN)) - .insert(msg(setting, COLOR_CYAN)) - .insert(msg("=" + value + " for world ", COLOR_GREEN)) - .insert(msg(worldKey, COLOR_WHITE))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.WORLD_SET, setting, String.valueOf(value), worldKey), COLOR_GREEN))); } /** * /f admin world reset {@code } — remove all per-world settings for a world. */ - private void handleReset(CommandContext ctx, String[] args) { + private void handleReset(CommandContext ctx, @Nullable PlayerRef player, String[] args) { if (args.length == 0) { ctx.sendMessage(prefix().insert(msg("Usage: /f admin world reset ", COLOR_RED))); return; @@ -241,15 +241,14 @@ private void handleReset(CommandContext ctx, String[] args) { WorldsConfig config = ConfigManager.get().worlds(); if (!config.removeWorldSettings(worldKey)) { - ctx.sendMessage(prefix().insert(msg("No settings found for world: " + worldKey, COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.WORLD_NOT_FOUND, worldKey), COLOR_YELLOW))); return; } config.save(); ConfigManager.get().getWorldSettingsResolver().rebuild(config); - ctx.sendMessage(prefix().insert(msg("Removed per-world settings for: ", COLOR_GREEN)) - .insert(msg(worldKey, COLOR_WHITE))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.WORLD_RESET, worldKey), COLOR_GREEN))); } private String boolStr(boolean value) { diff --git a/src/main/java/com/hyperfactions/command/admin/handler/AdminZoneHandler.java b/src/main/java/com/hyperfactions/command/admin/handler/AdminZoneHandler.java index 8a4ef402..593f1a6b 100644 --- a/src/main/java/com/hyperfactions/command/admin/handler/AdminZoneHandler.java +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminZoneHandler.java @@ -6,6 +6,8 @@ import com.hyperfactions.data.ZoneFlags; import com.hyperfactions.data.ZoneType; import com.hyperfactions.manager.ZoneManager; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.AdminKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.Message; @@ -57,15 +59,15 @@ public void handleSafezone(CommandContext ctx, PlayerRef player, World world, in zoneName, ZoneType.SAFE, world.getName(), chunkX, chunkZ, player.getUuid() ); if (result == ZoneManager.ZoneResult.SUCCESS) { - ctx.sendMessage(prefix().insert(msg("Created SafeZone '" + zoneName + "' at " + chunkX + ", " + chunkZ, COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_CREATED, zoneName, "SafeZone"), COLOR_GREEN))); } else if (result == ZoneManager.ZoneResult.CHUNK_CLAIMED) { - ctx.sendMessage(prefix().insert(msg("Cannot create zone: This chunk is claimed by a faction.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_CHUNK_HAS_FACTION, "unknown"), COLOR_RED))); } else if (result == ZoneManager.ZoneResult.ALREADY_EXISTS) { - ctx.sendMessage(prefix().insert(msg("A zone already exists at this location.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_ALREADY_EXISTS), COLOR_RED))); } else if (result == ZoneManager.ZoneResult.NAME_TAKEN) { - ctx.sendMessage(prefix().insert(msg("A zone with that name already exists.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_NAME_TAKEN, zoneName), COLOR_RED))); } else { - ctx.sendMessage(prefix().insert(msg("Failed: " + result, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_FAILED, result), COLOR_RED))); } } @@ -76,15 +78,15 @@ public void handleWarzone(CommandContext ctx, PlayerRef player, World world, int zoneName, ZoneType.WAR, world.getName(), chunkX, chunkZ, player.getUuid() ); if (result == ZoneManager.ZoneResult.SUCCESS) { - ctx.sendMessage(prefix().insert(msg("Created WarZone '" + zoneName + "' at " + chunkX + ", " + chunkZ, COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_CREATED, zoneName, "WarZone"), COLOR_GREEN))); } else if (result == ZoneManager.ZoneResult.CHUNK_CLAIMED) { - ctx.sendMessage(prefix().insert(msg("Cannot create zone: This chunk is claimed by a faction.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_CHUNK_HAS_FACTION, "unknown"), COLOR_RED))); } else if (result == ZoneManager.ZoneResult.ALREADY_EXISTS) { - ctx.sendMessage(prefix().insert(msg("A zone already exists at this location.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_ALREADY_EXISTS), COLOR_RED))); } else if (result == ZoneManager.ZoneResult.NAME_TAKEN) { - ctx.sendMessage(prefix().insert(msg("A zone with that name already exists.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_NAME_TAKEN, zoneName), COLOR_RED))); } else { - ctx.sendMessage(prefix().insert(msg("Failed: " + result, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_FAILED, result), COLOR_RED))); } } @@ -92,9 +94,9 @@ public void handleWarzone(CommandContext ctx, PlayerRef player, World world, int public void handleRemovezone(CommandContext ctx, World world, int chunkX, int chunkZ) { ZoneManager.ZoneResult result = hyperFactions.getZoneManager().unclaimChunkAt(world.getName(), chunkX, chunkZ); if (result == ZoneManager.ZoneResult.SUCCESS) { - ctx.sendMessage(prefix().insert(msg("Unclaimed chunk from zone.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_UNCLAIMED, chunkX, chunkZ), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("No zone chunk found at this location.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NO_CHUNK), COLOR_RED))); } } @@ -135,26 +137,26 @@ public void handleAdminZone(CommandContext ctx, @Nullable Store sto if (isPlayer) { handleZoneClaim(ctx, worldName, chunkX, chunkZ, subArgs); } else { - ctx.sendMessage(prefix().insert(msg("This command can only be used by a player.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_PLAYER_ONLY), COLOR_RED))); } } case "unclaim" -> { if (isPlayer) { handleZoneUnclaim(ctx, worldName, chunkX, chunkZ); } else { - ctx.sendMessage(prefix().insert(msg("This command can only be used by a player.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_PLAYER_ONLY), COLOR_RED))); } } case "radius" -> { if (isPlayer) { handleZoneRadius(ctx, worldName, chunkX, chunkZ, subArgs); } else { - ctx.sendMessage(prefix().insert(msg("This command can only be used by a player.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_PLAYER_ONLY), COLOR_RED))); } } case "notify" -> handleZoneNotify(ctx, subArgs); case "title" -> handleZoneTitle(ctx, subArgs); - default -> ctx.sendMessage(prefix().insert(msg("Unknown zone command. Use /f admin help", COLOR_RED))); + default -> ctx.sendMessage(prefix().insert(msg(HFMessages.get(player, AdminKeys.AdminCmd.ZONE_UNKNOWN_CMD), COLOR_RED))); } } @@ -162,11 +164,11 @@ public void handleAdminZone(CommandContext ctx, @Nullable Store sto public void handleZoneList(CommandContext ctx) { var zones = hyperFactions.getZoneManager().getAllZones(); if (zones.isEmpty()) { - ctx.sendMessage(prefix().insert(msg("No zones defined.", COLOR_GRAY))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NONE), COLOR_GRAY))); return; } - ctx.sendMessage(msg("=== Zones (" + zones.size() + ") ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg("=== " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_LIST_HEADER, zones.size()) + " ===", COLOR_CYAN).bold(true)); for (Zone zone : zones) { String typeColor = zone.isSafeZone() ? "#2dd4bf" : "#c084fc"; ctx.sendMessage(msg(" " + zone.name(), typeColor) @@ -190,16 +192,16 @@ public void handleZoneCreate(CommandContext ctx, String worldName, UUID createdB } else if (typeStr.equals("war") || typeStr.equals("warzone")) { type = ZoneType.WAR; } else { - ctx.sendMessage(prefix().insert(msg("Invalid zone type. Use 'safe' or 'war'", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_INVALID_TYPE), COLOR_RED))); return; } ZoneManager.ZoneResult result = hyperFactions.getZoneManager().createZone(name, type, worldName, createdBy); switch (result) { - case SUCCESS -> ctx.sendMessage(prefix().insert(msg("Created " + type.getDisplayName() + " '" + name + "' (empty, use claim to add chunks)", COLOR_GREEN))); - case NAME_TAKEN -> ctx.sendMessage(prefix().insert(msg("A zone with that name already exists.", COLOR_RED))); - case INVALID_NAME -> ctx.sendMessage(prefix().insert(msg("Invalid zone name. Must be 1-32 characters.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed: " + result, COLOR_RED))); + case SUCCESS -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_CREATED, name, type.getDisplayName()), COLOR_GREEN))); + case NAME_TAKEN -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NAME_TAKEN, name), COLOR_RED))); + case INVALID_NAME -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_INVALID_NAME), COLOR_RED))); + default -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FAILED, result), COLOR_RED))); } } @@ -213,15 +215,15 @@ public void handleZoneDelete(CommandContext ctx, String[] args) { String name = args[0]; Zone zone = hyperFactions.getZoneManager().getZoneByName(name); if (zone == null) { - ctx.sendMessage(prefix().insert(msg("Zone '" + name + "' not found.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NOT_FOUND, name), COLOR_RED))); return; } ZoneManager.ZoneResult result = hyperFactions.getZoneManager().removeZone(zone.id()); if (result == ZoneManager.ZoneResult.SUCCESS) { - ctx.sendMessage(prefix().insert(msg("Deleted zone '" + name + "' (" + zone.getChunkCount() + " chunks released)", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_DELETED, name, zone.getChunkCount()), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Failed to delete zone: " + result, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FAILED_DELETE, result), COLOR_RED))); } } @@ -237,16 +239,16 @@ public void handleZoneRename(CommandContext ctx, String[] args) { Zone zone = hyperFactions.getZoneManager().getZoneByName(currentName); if (zone == null) { - ctx.sendMessage(prefix().insert(msg("Zone '" + currentName + "' not found.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NOT_FOUND, currentName), COLOR_RED))); return; } ZoneManager.ZoneResult result = hyperFactions.getZoneManager().renameZone(zone.id(), newName); switch (result) { - case SUCCESS -> ctx.sendMessage(prefix().insert(msg("Renamed zone '" + currentName + "' to '" + newName + "'", COLOR_GREEN))); - case NAME_TAKEN -> ctx.sendMessage(prefix().insert(msg("A zone with the name '" + newName + "' already exists.", COLOR_RED))); - case INVALID_NAME -> ctx.sendMessage(prefix().insert(msg("Invalid zone name. Must be 1-32 characters.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed to rename zone: " + result, COLOR_RED))); + case SUCCESS -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_RENAMED, newName), COLOR_GREEN))); + case NAME_TAKEN -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NAME_TAKEN, newName), COLOR_RED))); + case INVALID_NAME -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_INVALID_NAME), COLOR_RED))); + default -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FAILED_RENAME, result), COLOR_RED))); } } @@ -256,19 +258,19 @@ public void handleZoneInfo(CommandContext ctx, String worldName, int chunkX, int if (args.length > 0) { zone = hyperFactions.getZoneManager().getZoneByName(args[0]); if (zone == null) { - ctx.sendMessage(prefix().insert(msg("Zone '" + args[0] + "' not found.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NOT_FOUND, args[0]), COLOR_RED))); return; } } else { zone = hyperFactions.getZoneManager().getZone(worldName, chunkX, chunkZ); if (zone == null) { - ctx.sendMessage(prefix().insert(msg("No zone at your location.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NO_ZONE_AT), COLOR_RED))); return; } } String typeColor = zone.isSafeZone() ? "#2dd4bf" : "#c084fc"; - ctx.sendMessage(msg("=== Zone: " + zone.name() + " ===", typeColor).bold(true)); + ctx.sendMessage(msg("=== " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_INFO_HEADER, zone.name()) + " ===", typeColor).bold(true)); ctx.sendMessage(msg("Type: ", COLOR_GRAY).insert(msg(zone.type().getDisplayName(), typeColor))); ctx.sendMessage(msg("World: ", COLOR_GRAY).insert(msg(zone.world(), COLOR_WHITE))); ctx.sendMessage(msg("Chunks: ", COLOR_GRAY).insert(msg(String.valueOf(zone.getChunkCount()), COLOR_WHITE))); @@ -285,7 +287,7 @@ public void handleZoneInfo(CommandContext ctx, String worldName, int chunkX, int } if (!zone.getFlags().isEmpty()) { - ctx.sendMessage(msg("Custom Flags:", COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_INFO_CUSTOM_FLAGS), COLOR_GRAY)); for (var entry : zone.getFlags().entrySet()) { ctx.sendMessage(msg(" " + entry.getKey() + ": " + entry.getValue(), COLOR_YELLOW)); } @@ -302,16 +304,16 @@ public void handleZoneClaim(CommandContext ctx, String worldName, int chunkX, in String name = args[0]; Zone zone = hyperFactions.getZoneManager().getZoneByName(name); if (zone == null) { - ctx.sendMessage(prefix().insert(msg("Zone '" + name + "' not found.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NOT_FOUND, name), COLOR_RED))); return; } ZoneManager.ZoneResult result = hyperFactions.getZoneManager().claimChunk(zone.id(), worldName, chunkX, chunkZ); switch (result) { - case SUCCESS -> ctx.sendMessage(prefix().insert(msg("Claimed chunk (" + chunkX + ", " + chunkZ + ") for zone '" + name + "'", COLOR_GREEN))); - case CHUNK_HAS_ZONE -> ctx.sendMessage(prefix().insert(msg("This chunk already belongs to another zone.", COLOR_RED))); - case CHUNK_HAS_FACTION -> ctx.sendMessage(prefix().insert(msg("This chunk is claimed by a faction.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed: " + result, COLOR_RED))); + case SUCCESS -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_CHUNK_CLAIMED, chunkX, chunkZ, name), COLOR_GREEN))); + case CHUNK_HAS_ZONE -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_CHUNK_HAS_ZONE, "unknown"), COLOR_RED))); + case CHUNK_HAS_FACTION -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_CHUNK_HAS_FACTION, "unknown"), COLOR_RED))); + default -> ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FAILED, result), COLOR_RED))); } } @@ -319,9 +321,9 @@ public void handleZoneClaim(CommandContext ctx, String worldName, int chunkX, in public void handleZoneUnclaim(CommandContext ctx, String worldName, int chunkX, int chunkZ) { ZoneManager.ZoneResult result = hyperFactions.getZoneManager().unclaimChunkAt(worldName, chunkX, chunkZ); if (result == ZoneManager.ZoneResult.SUCCESS) { - ctx.sendMessage(prefix().insert(msg("Unclaimed chunk (" + chunkX + ", " + chunkZ + ") from zone.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_UNCLAIMED, chunkX, chunkZ), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("No zone chunk found at this location.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NO_CHUNK), COLOR_RED))); } } @@ -337,7 +339,7 @@ public void handleZoneRadius(CommandContext ctx, String worldName, int chunkX, i String name = args[0]; Zone zone = hyperFactions.getZoneManager().getZoneByName(name); if (zone == null) { - ctx.sendMessage(prefix().insert(msg("Zone '" + name + "' not found.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NOT_FOUND, name), COLOR_RED))); return; } @@ -366,9 +368,9 @@ public void handleZoneRadius(CommandContext ctx, String worldName, int chunkX, i int claimed = hyperFactions.getZoneManager().claimRadius(zone.id(), worldName, chunkX, chunkZ, radius, circle); if (claimed > 0) { - ctx.sendMessage(prefix().insert(msg("Claimed " + claimed + " chunks for zone '" + name + "'", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_CLAIMED_RADIUS, claimed, name), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("No chunks could be claimed (all occupied or already in zone).", COLOR_YELLOW))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NO_CHUNKS_CLAIMED), COLOR_YELLOW))); } } @@ -382,7 +384,7 @@ public void handleZoneNotify(CommandContext ctx, String[] args) { String name = args[0]; Zone zone = hyperFactions.getZoneManager().getZoneByName(name); if (zone == null) { - ctx.sendMessage(prefix().insert(msg("Zone '" + name + "' not found.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NOT_FOUND, name), COLOR_RED))); return; } @@ -400,10 +402,9 @@ public void handleZoneNotify(CommandContext ctx, String[] args) { ZoneManager.ZoneResult result = hyperFactions.getZoneManager().setZoneNotifyOnEntry(zone.id(), notifyValue); if (result == ZoneManager.ZoneResult.SUCCESS) { boolean enabled = notifyValue == null || notifyValue; - ctx.sendMessage(prefix().insert(msg("Zone '" + name + "' entry notification " - + (enabled ? "enabled" : "disabled"), COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NOTIFY_SET, name, enabled ? "enabled" : "disabled"), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Failed: " + result, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FAILED, result), COLOR_RED))); } } @@ -417,7 +418,7 @@ public void handleZoneTitle(CommandContext ctx, String[] args) { String name = args[0]; Zone zone = hyperFactions.getZoneManager().getZoneByName(name); if (zone == null) { - ctx.sendMessage(prefix().insert(msg("Zone '" + name + "' not found.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NOT_FOUND, name), COLOR_RED))); return; } @@ -436,12 +437,12 @@ public void handleZoneTitle(CommandContext ctx, String[] args) { if (result == ZoneManager.ZoneResult.SUCCESS) { if (text.equals("clear")) { - ctx.sendMessage(prefix().insert(msg("Cleared " + position + " title for zone '" + name + "' (using default)", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_TITLE_CLEARED, name), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Set " + position + " title for zone '" + name + "' to: " + text, COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_TITLE_SET, name, text), COLOR_GREEN))); } } else { - ctx.sendMessage(prefix().insert(msg("Failed: " + result, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FAILED, result), COLOR_RED))); } } @@ -449,13 +450,13 @@ public void handleZoneTitle(CommandContext ctx, String[] args) { public void handleZoneFlag(CommandContext ctx, String worldName, int chunkX, int chunkZ, String[] args) { Zone zone = hyperFactions.getZoneManager().getZone(worldName, chunkX, chunkZ); if (zone == null) { - ctx.sendMessage(prefix().insert(msg("No zone at your location. Stand in a zone to manage flags.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_NO_ZONE_AT), COLOR_RED))); return; } if (args.length == 0) { - ctx.sendMessage(msg("=== Zone Flags: " + zone.name() + " ===", COLOR_CYAN).bold(true)); - ctx.sendMessage(msg("Zone Type: " + zone.type().getDisplayName(), COLOR_GRAY)); + ctx.sendMessage(msg("=== " + HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FLAGS_HEADER, zone.name()) + " ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FLAGS_TYPE, zone.type().getDisplayName()), COLOR_GRAY)); ctx.sendMessage(msg("", COLOR_GRAY)); for (String flag : ZoneFlags.ALL_FLAGS) { @@ -475,16 +476,16 @@ public void handleZoneFlag(CommandContext ctx, String worldName, int chunkX, int if (args[0].equalsIgnoreCase("clearall") || args[0].equalsIgnoreCase("resetall")) { ZoneManager.ZoneResult result = hyperFactions.getZoneManager().clearAllZoneFlags(zone.id()); if (result == ZoneManager.ZoneResult.SUCCESS) { - ctx.sendMessage(prefix().insert(msg("Cleared all custom flags for '" + zone.name() + "' - now using zone type defaults.", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FLAGS_CLEARED, zone.name()), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Failed to clear flags.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FAILED_FLAGS), COLOR_RED))); } return; } String flagName = args[0].toLowerCase(); if (!ZoneFlags.isValidFlag(flagName)) { - ctx.sendMessage(prefix().insert(msg("Invalid flag: " + flagName, COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FLAG_INVALID, flagName), COLOR_RED))); ctx.sendMessage(msg("Valid flags: " + String.join(", ", ZoneFlags.ALL_FLAGS), COLOR_GRAY)); return; } @@ -504,17 +505,17 @@ public void handleZoneFlag(CommandContext ctx, String worldName, int chunkX, int result = hyperFactions.getZoneManager().clearZoneFlag(zone.id(), flagName); if (result == ZoneManager.ZoneResult.SUCCESS) { boolean defaultValue = zone.isSafeZone() ? ZoneFlags.getSafeZoneDefault(flagName) : ZoneFlags.getWarZoneDefault(flagName); - ctx.sendMessage(prefix().insert(msg("Cleared flag '" + flagName + "' (now using default: " + defaultValue + ")", COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FLAG_CLEARED, flagName, zone.name()), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Failed to clear flag.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FAILED_FLAG), COLOR_RED))); } } else if (action.equals("true") || action.equals("false")) { boolean value = action.equals("true"); result = hyperFactions.getZoneManager().setZoneFlag(zone.id(), flagName, value); if (result == ZoneManager.ZoneResult.SUCCESS) { - ctx.sendMessage(prefix().insert(msg("Set flag '" + flagName + "' to " + value, COLOR_GREEN))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FLAG_SET, flagName, value, zone.name()), COLOR_GREEN))); } else { - ctx.sendMessage(prefix().insert(msg("Failed to set flag.", COLOR_RED))); + ctx.sendMessage(prefix().insert(msg(HFMessages.get((PlayerRef) null, AdminKeys.AdminCmd.ZONE_FAILED_FLAG), COLOR_RED))); } } else { ctx.sendMessage(prefix().insert(msg("Invalid value. Use: true, false, or clear", COLOR_RED))); diff --git a/src/main/java/com/hyperfactions/command/economy/MoneySubCommand.java b/src/main/java/com/hyperfactions/command/economy/MoneySubCommand.java index 4c67ad10..2e3fc97b 100644 --- a/src/main/java/com/hyperfactions/command/economy/MoneySubCommand.java +++ b/src/main/java/com/hyperfactions/command/economy/MoneySubCommand.java @@ -5,7 +5,7 @@ import com.hyperfactions.command.util.CommandUtil; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -57,11 +57,11 @@ protected void execute(@NotNull CommandContext ctx, } private void sendHelp(CommandContext ctx, PlayerRef player) { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Economy.MONEY_HELP_HEADER, COLOR_CYAN)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Economy.MONEY_HELP_BALANCE), COLOR_GRAY)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Economy.MONEY_HELP_DEPOSIT), COLOR_GRAY)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Economy.MONEY_HELP_WITHDRAW), COLOR_GRAY)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Economy.MONEY_HELP_TRANSFER), COLOR_GRAY)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Economy.MONEY_HELP_LOG), COLOR_GRAY)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Economy.MONEY_HELP_HEADER, COLOR_CYAN)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Economy.MONEY_HELP_BALANCE), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Economy.MONEY_HELP_DEPOSIT), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Economy.MONEY_HELP_WITHDRAW), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Economy.MONEY_HELP_TRANSFER), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Economy.MONEY_HELP_LOG), COLOR_GRAY)); } } diff --git a/src/main/java/com/hyperfactions/command/economy/TreasuryCommandHandler.java b/src/main/java/com/hyperfactions/command/economy/TreasuryCommandHandler.java index 93f3dd35..330f7765 100644 --- a/src/main/java/com/hyperfactions/command/economy/TreasuryCommandHandler.java +++ b/src/main/java/com/hyperfactions/command/economy/TreasuryCommandHandler.java @@ -11,7 +11,8 @@ import com.hyperfactions.integration.economy.VaultEconomyProvider; import com.hyperfactions.manager.EconomyManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -41,13 +42,13 @@ private TreasuryCommandHandler() {} public static void handleBalance(@NotNull CommandContext ctx, @NotNull PlayerRef player, @NotNull HyperFactions hf, String[] args) { if (!CommandUtil.hasPermission(player, Permissions.ECONOMY_BALANCE)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.BALANCE_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.BALANCE_NO_PERMISSION)); return; } EconomyManager econ = hf.getEconomyManager(); if (econ == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TREASURY_UNAVAILABLE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.TREASURY_UNAVAILABLE)); return; } @@ -55,19 +56,19 @@ public static void handleBalance(@NotNull CommandContext ctx, @NotNull PlayerRef if (args.length > 0) { faction = hf.getFactionManager().getFactionByName(args[0]); if (faction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.FACTION_NOT_FOUND)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.FACTION_NOT_FOUND)); return; } } else { faction = hf.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); return; } } BigDecimal balance = econ.getFactionBalance(faction.id()); - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Economy.BALANCE_DISPLAY, + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Economy.BALANCE_DISPLAY, faction.name(), econ.formatCurrency(balance))); } @@ -77,20 +78,20 @@ public static void handleBalance(@NotNull CommandContext ctx, @NotNull PlayerRef public static void handleDeposit(@NotNull CommandContext ctx, @NotNull PlayerRef player, @NotNull HyperFactions hf, String[] args) { if (!CommandUtil.hasPermission(player, Permissions.ECONOMY_DEPOSIT)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.DEPOSIT_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.DEPOSIT_NO_PERMISSION)); return; } EconomyManager econ = hf.getEconomyManager(); VaultEconomyProvider vault = econ != null ? econ.getVaultProvider() : null; if (econ == null || vault == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TREASURY_UNAVAILABLE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.TREASURY_UNAVAILABLE)); return; } Faction faction = hf.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); return; } @@ -98,12 +99,12 @@ public static void handleDeposit(@NotNull CommandContext ctx, @NotNull PlayerRef FactionMember member = faction.getMember(player.getUuid()); if (member != null && !faction.getEffectivePermissions().get(FactionPermissions.TREASURY_DEPOSIT) && !member.isOfficerOrHigher()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.DEPOSIT_FACTION_DENIED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.DEPOSIT_FACTION_DENIED)); return; } if (args.length < 1) { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Economy.DEPOSIT_USAGE, MessageUtil.COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Economy.DEPOSIT_USAGE, MessageUtil.COLOR_YELLOW)); return; } @@ -111,25 +112,25 @@ public static void handleDeposit(@NotNull CommandContext ctx, @NotNull PlayerRef try { amount = new BigDecimal(args[0]); } catch (NumberFormatException e) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.INVALID_AMOUNT, args[0])); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.INVALID_AMOUNT, args[0])); return; } if (amount.compareTo(BigDecimal.ZERO) <= 0) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.AMOUNT_POSITIVE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.AMOUNT_POSITIVE)); return; } // Check player has enough in wallet if (!vault.has(player.getUuid(), amount)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WALLET_INSUFFICIENT, + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.WALLET_INSUFFICIENT, econ.formatCurrency(vault.getBalanceBigDecimal(player.getUuid())))); return; } // Withdraw from player wallet if (!vault.withdraw(player.getUuid(), amount)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WALLET_WITHDRAW_FAILED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.WALLET_WITHDRAW_FAILED)); return; } @@ -140,11 +141,11 @@ public static void handleDeposit(@NotNull CommandContext ctx, @NotNull PlayerRef if (result != EconomyAPI.TransactionResult.SUCCESS) { // Rollback: return money to player vault.deposit(player.getUuid(), amount); - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.DEPOSIT_FAILED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.DEPOSIT_FAILED)); return; } - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Economy.DEPOSITED, econ.formatCurrency(amount))); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Economy.DEPOSITED, econ.formatCurrency(amount))); } /** @@ -153,20 +154,20 @@ public static void handleDeposit(@NotNull CommandContext ctx, @NotNull PlayerRef public static void handleWithdraw(@NotNull CommandContext ctx, @NotNull PlayerRef player, @NotNull HyperFactions hf, String[] args) { if (!CommandUtil.hasPermission(player, Permissions.ECONOMY_WITHDRAW)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WITHDRAW_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.WITHDRAW_NO_PERMISSION)); return; } EconomyManager econ = hf.getEconomyManager(); VaultEconomyProvider vault = econ != null ? econ.getVaultProvider() : null; if (econ == null || vault == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TREASURY_UNAVAILABLE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.TREASURY_UNAVAILABLE)); return; } Faction faction = hf.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); return; } @@ -174,12 +175,12 @@ public static void handleWithdraw(@NotNull CommandContext ctx, @NotNull PlayerRe FactionMember member = faction.getMember(player.getUuid()); if (member != null && !faction.getEffectivePermissions().get(FactionPermissions.TREASURY_WITHDRAW) && !member.isLeader()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WITHDRAW_FACTION_DENIED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.WITHDRAW_FACTION_DENIED)); return; } if (args.length < 1) { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Economy.WITHDRAW_USAGE, MessageUtil.COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Economy.WITHDRAW_USAGE, MessageUtil.COLOR_YELLOW)); return; } @@ -187,19 +188,19 @@ public static void handleWithdraw(@NotNull CommandContext ctx, @NotNull PlayerRe try { amount = new BigDecimal(args[0]); } catch (NumberFormatException e) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.INVALID_AMOUNT, args[0])); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.INVALID_AMOUNT, args[0])); return; } if (amount.compareTo(BigDecimal.ZERO) <= 0) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.AMOUNT_POSITIVE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.AMOUNT_POSITIVE)); return; } // Check limits before attempting String limitReason = econ.checkWithdrawLimits(faction.id(), amount); if (limitReason != null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WITHDRAW_LIMIT_DENIED, limitReason)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.WITHDRAW_LIMIT_DENIED, limitReason)); return; } @@ -212,14 +213,14 @@ public static void handleWithdraw(@NotNull CommandContext ctx, @NotNull PlayerRe // Deposit to player wallet if (!vault.deposit(player.getUuid(), amount)) { // Rollback is complex — log the error - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WALLET_DEPOSIT_FAILED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.WALLET_DEPOSIT_FAILED)); return; } - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Economy.WITHDRAWN, econ.formatCurrency(amount))); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Economy.WITHDRAWN, econ.formatCurrency(amount))); } - case INSUFFICIENT_FUNDS -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.INSUFFICIENT)); - case LIMIT_EXCEEDED -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WITHDRAW_LIMIT_EXCEEDED)); - default -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WITHDRAW_FAILED, result)); + case INSUFFICIENT_FUNDS -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.INSUFFICIENT)); + case LIMIT_EXCEEDED -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.WITHDRAW_LIMIT_EXCEEDED)); + default -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.WITHDRAW_FAILED, result)); } } @@ -229,19 +230,19 @@ public static void handleWithdraw(@NotNull CommandContext ctx, @NotNull PlayerRe public static void handleTransfer(@NotNull CommandContext ctx, @NotNull PlayerRef player, @NotNull HyperFactions hf, String[] args) { if (!CommandUtil.hasPermission(player, Permissions.ECONOMY_TRANSFER)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TRANSFER_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.TRANSFER_NO_PERMISSION)); return; } EconomyManager econ = hf.getEconomyManager(); if (econ == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TREASURY_UNAVAILABLE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.TREASURY_UNAVAILABLE)); return; } Faction faction = hf.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); return; } @@ -249,23 +250,23 @@ public static void handleTransfer(@NotNull CommandContext ctx, @NotNull PlayerRe FactionMember member = faction.getMember(player.getUuid()); if (member != null && !faction.getEffectivePermissions().get(FactionPermissions.TREASURY_TRANSFER) && !member.isLeader()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TRANSFER_FACTION_DENIED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.TRANSFER_FACTION_DENIED)); return; } if (args.length < 2) { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Economy.TRANSFER_USAGE, MessageUtil.COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Economy.TRANSFER_USAGE, MessageUtil.COLOR_YELLOW)); return; } Faction target = hf.getFactionManager().getFactionByName(args[0]); if (target == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.FACTION_NOT_FOUND)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.FACTION_NOT_FOUND)); return; } if (target.id().equals(faction.id())) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TRANSFER_SELF)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.TRANSFER_SELF)); return; } @@ -273,19 +274,19 @@ public static void handleTransfer(@NotNull CommandContext ctx, @NotNull PlayerRe try { amount = new BigDecimal(args[1]); } catch (NumberFormatException e) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.INVALID_AMOUNT, args[1])); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.INVALID_AMOUNT, args[1])); return; } if (amount.compareTo(BigDecimal.ZERO) <= 0) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.AMOUNT_POSITIVE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.AMOUNT_POSITIVE)); return; } // Check limits String limitReason = econ.checkTransferLimits(faction.id(), amount); if (limitReason != null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TRANSFER_LIMIT_DENIED, limitReason)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.TRANSFER_LIMIT_DENIED, limitReason)); return; } @@ -293,11 +294,11 @@ public static void handleTransfer(@NotNull CommandContext ctx, @NotNull PlayerRe faction.id(), target.id(), amount, player.getUuid(), "Player transfer").join(); switch (result) { - case SUCCESS -> ctx.sendMessage(MessageUtil.success(player, MessageKeys.Economy.TRANSFERRED, + case SUCCESS -> ctx.sendMessage(MessageUtil.success(player, CommandKeys.Economy.TRANSFERRED, econ.formatCurrency(amount), target.name())); - case INSUFFICIENT_FUNDS -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.INSUFFICIENT)); - case LIMIT_EXCEEDED -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TRANSFER_LIMIT_EXCEEDED)); - default -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TRANSFER_FAILED, result)); + case INSUFFICIENT_FUNDS -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.INSUFFICIENT)); + case LIMIT_EXCEEDED -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.TRANSFER_LIMIT_EXCEEDED)); + default -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.TRANSFER_FAILED, result)); } } @@ -307,19 +308,19 @@ public static void handleTransfer(@NotNull CommandContext ctx, @NotNull PlayerRe public static void handleLog(@NotNull CommandContext ctx, @NotNull PlayerRef player, @NotNull HyperFactions hf, String[] args) { if (!CommandUtil.hasPermission(player, Permissions.ECONOMY_LOG)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.LOG_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.LOG_NO_PERMISSION)); return; } EconomyManager econ = hf.getEconomyManager(); if (econ == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TREASURY_UNAVAILABLE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Economy.TREASURY_UNAVAILABLE)); return; } Faction faction = hf.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); return; } @@ -346,7 +347,7 @@ public static void handleLog(@NotNull CommandContext ctx, @NotNull PlayerRef pla int totalPages = Math.max(1, (all.size() + perPage - 1) / perPage); page = Math.max(1, Math.min(page, totalPages)); - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Economy.LOG_HEADER, MessageUtil.COLOR_CYAN, page, totalPages)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Economy.LOG_HEADER, MessageUtil.COLOR_CYAN, page, totalPages)); int start = (page - 1) * perPage; int end = Math.min(start + perPage, all.size()); @@ -372,7 +373,7 @@ public static void handleLog(@NotNull CommandContext ctx, @NotNull PlayerRef pla } if (all.isEmpty()) { - ctx.sendMessage(CommandUtil.msg(" " + HFMessages.get(player, MessageKeys.Economy.LOG_EMPTY), CommandUtil.COLOR_GRAY)); + ctx.sendMessage(CommandUtil.msg(" " + HFMessages.get(player, CommandKeys.Economy.LOG_EMPTY), CommandUtil.COLOR_GRAY)); } } } diff --git a/src/main/java/com/hyperfactions/command/faction/CloseSubCommand.java b/src/main/java/com/hyperfactions/command/faction/CloseSubCommand.java index 1273fccf..663f07a5 100644 --- a/src/main/java/com/hyperfactions/command/faction/CloseSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/CloseSubCommand.java @@ -9,7 +9,9 @@ import com.hyperfactions.data.FactionLog; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -40,7 +42,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.CLOSE)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Close.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NO_PERMISSION)); return; } @@ -51,24 +53,24 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isLeader()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Close.NOT_LEADER)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Close.NOT_LEADER)); return; } if (!faction.open()) { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Close.ALREADY_CLOSED, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Close.ALREADY_CLOSED, COLOR_YELLOW)); return; } Faction updated = faction.withOpen(false) .withLog(FactionLog.create(FactionLog.LogType.SETTINGS_CHANGE, "Faction set to invite-only", player.getUuid(), - MessageKeys.LogsGui.MSG_SET_CLOSED)); + GuiKeys.LogsGui.MSG_SET_CLOSED)); hyperFactions.getFactionManager().updateFaction(updated); - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Close.SUCCESS)); - broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.Close.BROADCAST, player.getUsername())); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Close.SUCCESS)); + broadcastToFaction(faction.id(), MessageUtil.success(player, CommandKeys.Close.BROADCAST, player.getUsername())); // After action, open settings page if not text mode String[] rawArgs = CommandUtil.parseRawArgs(ctx.getInputString(), 2); diff --git a/src/main/java/com/hyperfactions/command/faction/ColorSubCommand.java b/src/main/java/com/hyperfactions/command/faction/ColorSubCommand.java index 3baedd9f..1d5ec030 100644 --- a/src/main/java/com/hyperfactions/command/faction/ColorSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/ColorSubCommand.java @@ -11,7 +11,9 @@ import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -43,7 +45,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.COLOR)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Color.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NO_PERMISSION)); return; } @@ -54,12 +56,12 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isOfficerOrHigher()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Color.NOT_OFFICER)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Color.NOT_OFFICER)); return; } if (!ConfigManager.get().isAllowColors()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Color.COLORS_DISABLED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Color.COLORS_DISABLED)); return; } @@ -77,8 +79,8 @@ protected void execute(@NotNull CommandContext ctx, // Text mode requires args if (!fctx.hasArgs()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Color.USAGE)); - ctx.sendMessage(Message.raw(HFMessages.get(player, MessageKeys.Color.USAGE_HINT)).color(COLOR_GRAY)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Color.USAGE)); + ctx.sendMessage(Message.raw(HFMessages.get(player, CommandKeys.Color.USAGE_HINT)).color(COLOR_GRAY)); return; } @@ -91,14 +93,14 @@ protected void execute(@NotNull CommandContext ctx, // Legacy color code - convert to hex hexColor = com.hyperfactions.util.LegacyColorParser.codeToHex(colorInput.charAt(0)); } else { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Color.INVALID)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Color.INVALID)); return; } Faction updated = faction.withColor(hexColor) .withLog(FactionLog.create(FactionLog.LogType.SETTINGS_CHANGE, "Color changed to '" + hexColor + "'", player.getUuid(), - MessageKeys.LogsGui.MSG_COLOR_CHANGED, hexColor)); + GuiKeys.LogsGui.MSG_COLOR_CHANGED, hexColor)); hyperFactions.getFactionManager().updateFaction(updated); @@ -107,7 +109,7 @@ protected void execute(@NotNull CommandContext ctx, // Show success with the actual color swatch ctx.sendMessage(MessageUtil.prefix().insert( - Message.raw(HFMessages.get(player, MessageKeys.Color.SUCCESS) + " ").color(COLOR_GREEN)) + Message.raw(HFMessages.get(player, CommandKeys.Color.SUCCESS) + " ").color(COLOR_GREEN)) .insert(Message.raw("\u2588\u2588").color(hexColor))); // After action, open settings page if not text mode diff --git a/src/main/java/com/hyperfactions/command/faction/CreateSubCommand.java b/src/main/java/com/hyperfactions/command/faction/CreateSubCommand.java index e7f5c366..c1a11bdb 100644 --- a/src/main/java/com/hyperfactions/command/faction/CreateSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/CreateSubCommand.java @@ -8,7 +8,8 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -39,7 +40,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.CREATE)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Create.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Create.NO_PERMISSION)); return; } @@ -57,7 +58,7 @@ protected void execute(@NotNull CommandContext ctx, // Text mode or with args: create directly if (!fctx.hasArgs()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Create.USAGE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Create.USAGE)); return; } @@ -68,7 +69,7 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Create.SUCCESS, name)); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Create.SUCCESS, name)); // Open dashboard after creation (if not text mode) if (!fctx.isTextMode()) { Player playerEntity = store.getComponent(ref, Player.getComponentType()); @@ -81,16 +82,16 @@ protected void execute(@NotNull CommandContext ctx, case ALREADY_IN_FACTION -> { Faction existingFaction = hyperFactions.getFactionManager().getPlayerFaction(player.getUuid()); if (existingFaction != null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Create.ALREADY_IN_NAMED, existingFaction.name())); - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Create.USE_LEAVE_FIRST, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Create.ALREADY_IN_NAMED, existingFaction.name())); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Create.USE_LEAVE_FIRST, COLOR_YELLOW)); } else { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.ALREADY_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.ALREADY_IN_FACTION)); } } - case NAME_TAKEN -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Create.NAME_TAKEN)); - case NAME_TOO_SHORT -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Create.NAME_TOO_SHORT)); - case NAME_TOO_LONG -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Create.NAME_TOO_LONG)); - default -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Create.FAILED)); + case NAME_TAKEN -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Create.NAME_TAKEN)); + case NAME_TOO_SHORT -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Create.NAME_TOO_SHORT)); + case NAME_TOO_LONG -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Create.NAME_TOO_LONG)); + default -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Create.FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/faction/DescSubCommand.java b/src/main/java/com/hyperfactions/command/faction/DescSubCommand.java index 605e25e3..ddb4ef5e 100644 --- a/src/main/java/com/hyperfactions/command/faction/DescSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/DescSubCommand.java @@ -9,7 +9,9 @@ import com.hyperfactions.data.FactionLog; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -41,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.DESC)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Desc.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NO_PERMISSION)); return; } @@ -52,7 +54,7 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isOfficerOrHigher()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Desc.NOT_OFFICER)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Desc.NOT_OFFICER)); return; } @@ -74,14 +76,14 @@ protected void execute(@NotNull CommandContext ctx, Faction updated = faction.withDescription(description) .withLog(FactionLog.create(FactionLog.LogType.SETTINGS_CHANGE, description != null ? "Description set" : "Description cleared", player.getUuid(), - description != null ? MessageKeys.LogsGui.MSG_DESC_SET : MessageKeys.LogsGui.MSG_DESC_CLEARED)); + description != null ? GuiKeys.LogsGui.MSG_DESC_SET : GuiKeys.LogsGui.MSG_DESC_CLEARED)); hyperFactions.getFactionManager().updateFaction(updated); if (description != null) { - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Desc.SET)); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Desc.SET)); } else { - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Desc.CLEARED)); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Desc.CLEARED)); } // After action, open settings page if not text mode diff --git a/src/main/java/com/hyperfactions/command/faction/DisbandSubCommand.java b/src/main/java/com/hyperfactions/command/faction/DisbandSubCommand.java index 2e91d1fc..3dad26c7 100644 --- a/src/main/java/com/hyperfactions/command/faction/DisbandSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/DisbandSubCommand.java @@ -12,7 +12,7 @@ import com.hyperfactions.manager.ConfirmationManager; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -44,7 +44,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.DISBAND)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Disband.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Disband.NO_PERMISSION)); return; } @@ -56,7 +56,7 @@ protected void execute(@NotNull CommandContext ctx, // Check if leader FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isLeader()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Disband.NOT_LEADER)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Disband.NOT_LEADER)); return; } @@ -80,8 +80,8 @@ protected void execute(@NotNull CommandContext ctx, switch (confirmResult) { case NEEDS_CONFIRMATION, EXPIRED_RECREATED -> { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Disband.CONFIRM_PROMPT, COLOR_YELLOW)); - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Disband.CONFIRM_INSTRUCTION, COLOR_YELLOW, confirmManager.getTimeoutSeconds())); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Disband.CONFIRM_PROMPT, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Disband.CONFIRM_INSTRUCTION, COLOR_YELLOW, confirmManager.getTimeoutSeconds())); } case CONFIRMED -> { UUID factionId = faction.id(); @@ -93,13 +93,13 @@ protected void execute(@NotNull CommandContext ctx, hyperFactions.getInviteManager().clearFactionInvites(factionId); hyperFactions.getJoinRequestManager().clearFactionRequests(factionId); hyperFactions.getRelationManager().clearAllRelations(factionId); - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Disband.SUCCESS)); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Disband.SUCCESS)); } else { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Disband.FAILED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Disband.FAILED)); } } case DIFFERENT_ACTION -> { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Disband.CANCELLED, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Disband.CANCELLED, COLOR_YELLOW)); } default -> throw new IllegalStateException("Unexpected value"); } diff --git a/src/main/java/com/hyperfactions/command/faction/OpenSubCommand.java b/src/main/java/com/hyperfactions/command/faction/OpenSubCommand.java index 60702100..6855d6b2 100644 --- a/src/main/java/com/hyperfactions/command/faction/OpenSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/OpenSubCommand.java @@ -9,7 +9,9 @@ import com.hyperfactions.data.FactionLog; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -40,7 +42,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.OPEN)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Open.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NO_PERMISSION)); return; } @@ -51,24 +53,24 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isLeader()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Open.NOT_LEADER)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Open.NOT_LEADER)); return; } if (faction.open()) { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Open.ALREADY_OPEN, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Open.ALREADY_OPEN, COLOR_YELLOW)); return; } Faction updated = faction.withOpen(true) .withLog(FactionLog.create(FactionLog.LogType.SETTINGS_CHANGE, "Faction set to open", player.getUuid(), - MessageKeys.LogsGui.MSG_SET_OPEN)); + GuiKeys.LogsGui.MSG_SET_OPEN)); hyperFactions.getFactionManager().updateFaction(updated); - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Open.SUCCESS)); - broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.Open.BROADCAST, player.getUsername())); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Open.SUCCESS)); + broadcastToFaction(faction.id(), MessageUtil.success(player, CommandKeys.Open.BROADCAST, player.getUsername())); // After action, open settings page if not text mode String[] rawArgs = CommandUtil.parseRawArgs(ctx.getInputString(), 2); diff --git a/src/main/java/com/hyperfactions/command/faction/RenameSubCommand.java b/src/main/java/com/hyperfactions/command/faction/RenameSubCommand.java index 9c90fde6..edc230b3 100644 --- a/src/main/java/com/hyperfactions/command/faction/RenameSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/RenameSubCommand.java @@ -10,7 +10,9 @@ import com.hyperfactions.data.FactionLog; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -41,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.RENAME)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rename.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NO_PERMISSION)); return; } @@ -52,7 +54,7 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isLeader()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rename.NOT_LEADER)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rename.NOT_LEADER)); return; } @@ -70,7 +72,7 @@ protected void execute(@NotNull CommandContext ctx, // Text mode requires args if (!fctx.hasArgs()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rename.USAGE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rename.USAGE)); return; } @@ -78,15 +80,15 @@ protected void execute(@NotNull CommandContext ctx, ConfigManager config = ConfigManager.get(); if (newName.length() < config.getMinNameLength()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rename.TOO_SHORT, config.getMinNameLength())); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rename.TOO_SHORT, config.getMinNameLength())); return; } if (newName.length() > config.getMaxNameLength()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rename.TOO_LONG, config.getMaxNameLength())); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rename.TOO_LONG, config.getMaxNameLength())); return; } if (hyperFactions.getFactionManager().isNameTaken(newName) && !newName.equalsIgnoreCase(faction.name())) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rename.NAME_TAKEN)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rename.NAME_TAKEN)); return; } @@ -94,7 +96,7 @@ protected void execute(@NotNull CommandContext ctx, Faction updated = faction.withName(newName) .withLog(FactionLog.create(FactionLog.LogType.SETTINGS_CHANGE, "Renamed from '" + oldName + "' to '" + newName + "'", player.getUuid(), - MessageKeys.LogsGui.MSG_RENAMED, oldName, newName)); + GuiKeys.LogsGui.MSG_RENAMED, oldName, newName)); hyperFactions.getFactionManager().updateFaction(updated); @@ -103,8 +105,8 @@ protected void execute(@NotNull CommandContext ctx, hyperFactions.getWorldMapService().triggerFactionWideRefresh(faction.id()); } - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Rename.SUCCESS, newName)); - broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.Rename.BROADCAST, player.getUsername(), newName)); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Rename.SUCCESS, newName)); + broadcastToFaction(faction.id(), MessageUtil.success(player, CommandKeys.Rename.BROADCAST, player.getUsername(), newName)); // After action, open settings page if not text mode if (fctx.shouldOpenGuiAfterAction()) { diff --git a/src/main/java/com/hyperfactions/command/info/HelpSubCommand.java b/src/main/java/com/hyperfactions/command/info/HelpSubCommand.java index 7d0829aa..c550a650 100644 --- a/src/main/java/com/hyperfactions/command/info/HelpSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/HelpSubCommand.java @@ -10,7 +10,8 @@ import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.CommandHelp; import com.hyperfactions.util.HelpFormatter; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.HelpKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -45,7 +46,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.HELP)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.HELP_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Info.HELP_NO_PERMISSION)); return; } @@ -73,67 +74,67 @@ protected void execute(@NotNull CommandContext ctx, private void showHelpText(CommandContext ctx, PlayerRef player) { List commands = new ArrayList<>(); - // Core - Basic faction management - commands.add(new CommandHelp("/f create ", "Create a faction", "Core")); - commands.add(new CommandHelp("/f disband", "Disband your faction", "Core")); - commands.add(new CommandHelp("/f invite ", "Invite a player", "Core")); - commands.add(new CommandHelp("/f accept [faction]", "Accept an invite", "Core")); - commands.add(new CommandHelp("/f request [msg]", "Request to join a faction", "Core")); - commands.add(new CommandHelp("/f leave", "Leave your faction", "Core")); - commands.add(new CommandHelp("/f kick ", "Kick a member", "Core")); - - // Management - Faction settings - commands.add(new CommandHelp("/f rename ", "Rename your faction", "Management")); - commands.add(new CommandHelp("/f desc ", "Set faction description", "Management")); - commands.add(new CommandHelp("/f color ", "Set faction color", "Management")); - commands.add(new CommandHelp("/f open", "Allow anyone to join", "Management")); - commands.add(new CommandHelp("/f close", "Require invite to join", "Management")); - commands.add(new CommandHelp("/f promote ", "Promote to officer", "Management")); - commands.add(new CommandHelp("/f demote ", "Demote to member", "Management")); - commands.add(new CommandHelp("/f transfer ", "Transfer leadership", "Management")); - - // Territory - Land claims - commands.add(new CommandHelp("/f claim", "Claim this chunk", "Territory")); - commands.add(new CommandHelp("/f unclaim", "Unclaim this chunk", "Territory")); - commands.add(new CommandHelp("/f overclaim", "Overclaim enemy territory", "Territory")); - commands.add(new CommandHelp("/f map", "View territory map", "Territory")); - - // Relations - Diplomatic relations - commands.add(new CommandHelp("/f ally ", "Request alliance", "Relations")); - commands.add(new CommandHelp("/f enemy ", "Declare enemy", "Relations")); - commands.add(new CommandHelp("/f neutral ", "Set neutral relation", "Relations")); - - // Teleport - Home teleportation - commands.add(new CommandHelp("/f home", "Teleport to faction home", "Teleport")); - commands.add(new CommandHelp("/f sethome", "Set faction home", "Teleport")); - commands.add(new CommandHelp("/f stuck", "Escape from enemy territory", "Teleport")); - - // Information - Viewing faction data - commands.add(new CommandHelp("/f info [faction]", "View faction info", "Information")); - commands.add(new CommandHelp("/f list", "List all factions", "Information")); - commands.add(new CommandHelp("/f browse", "Browse factions (alias for list)", "Information")); - commands.add(new CommandHelp("/f members", "View faction members", "Information")); - commands.add(new CommandHelp("/f invites", "Manage invites/requests", "Information")); - commands.add(new CommandHelp("/f who [player]", "View player info", "Information")); - commands.add(new CommandHelp("/f power [player]", "View power level", "Information")); - commands.add(new CommandHelp("/f gui", "Open faction GUI", "Information")); - commands.add(new CommandHelp("/f settings", "Open faction settings", "Information")); - - // Other - commands.add(new CommandHelp("/f chat ", "Send faction chat message", "Other")); - commands.add(new CommandHelp("/f c ", "Faction chat (short)", "Other")); - - // Admin - commands.add(new CommandHelp("/f admin", "Open admin GUI", "Admin")); - commands.add(new CommandHelp("/f admin reload", "Reload config", "Admin")); - commands.add(new CommandHelp("/f admin sync", "Sync data from disk", "Admin")); - commands.add(new CommandHelp("/f admin factions", "Manage factions", "Admin")); - commands.add(new CommandHelp("/f admin zones", "Manage zones", "Admin")); - commands.add(new CommandHelp("/f admin config", "View/edit config", "Admin")); - commands.add(new CommandHelp("/f admin backups", "Manage backups", "Admin")); - commands.add(new CommandHelp("/f admin update", "Check for updates", "Admin")); - commands.add(new CommandHelp("/f admin debug", "Debug commands", "Admin")); - - ctx.sendMessage(HelpFormatter.buildHelp("HyperFactions", "Faction management and territory control", commands, "Use /f for more details")); + // Core - Basic faction management (sortOrder 0) + commands.add(new CommandHelp("/f create ", HelpKeys.Help.CMD_CREATE, HelpKeys.Help.SECTION_CORE, 0)); + commands.add(new CommandHelp("/f disband", HelpKeys.Help.CMD_DISBAND, HelpKeys.Help.SECTION_CORE, 0)); + commands.add(new CommandHelp("/f invite ", HelpKeys.Help.CMD_INVITE, HelpKeys.Help.SECTION_CORE, 0)); + commands.add(new CommandHelp("/f accept [faction]", HelpKeys.Help.CMD_ACCEPT, HelpKeys.Help.SECTION_CORE, 0)); + commands.add(new CommandHelp("/f request [msg]", HelpKeys.Help.CMD_REQUEST, HelpKeys.Help.SECTION_CORE, 0)); + commands.add(new CommandHelp("/f leave", HelpKeys.Help.CMD_LEAVE, HelpKeys.Help.SECTION_CORE, 0)); + commands.add(new CommandHelp("/f kick ", HelpKeys.Help.CMD_KICK, HelpKeys.Help.SECTION_CORE, 0)); + + // Management - Faction settings (sortOrder 1) + commands.add(new CommandHelp("/f rename ", HelpKeys.Help.CMD_RENAME, HelpKeys.Help.SECTION_MANAGEMENT, 1)); + commands.add(new CommandHelp("/f desc ", HelpKeys.Help.CMD_DESC, HelpKeys.Help.SECTION_MANAGEMENT, 1)); + commands.add(new CommandHelp("/f color ", HelpKeys.Help.CMD_COLOR, HelpKeys.Help.SECTION_MANAGEMENT, 1)); + commands.add(new CommandHelp("/f open", HelpKeys.Help.CMD_OPEN, HelpKeys.Help.SECTION_MANAGEMENT, 1)); + commands.add(new CommandHelp("/f close", HelpKeys.Help.CMD_CLOSE, HelpKeys.Help.SECTION_MANAGEMENT, 1)); + commands.add(new CommandHelp("/f promote ", HelpKeys.Help.CMD_PROMOTE, HelpKeys.Help.SECTION_MANAGEMENT, 1)); + commands.add(new CommandHelp("/f demote ", HelpKeys.Help.CMD_DEMOTE, HelpKeys.Help.SECTION_MANAGEMENT, 1)); + commands.add(new CommandHelp("/f transfer ", HelpKeys.Help.CMD_TRANSFER, HelpKeys.Help.SECTION_MANAGEMENT, 1)); + + // Territory - Land claims (sortOrder 2) + commands.add(new CommandHelp("/f claim", HelpKeys.Help.CMD_CLAIM, HelpKeys.Help.SECTION_TERRITORY, 2)); + commands.add(new CommandHelp("/f unclaim", HelpKeys.Help.CMD_UNCLAIM, HelpKeys.Help.SECTION_TERRITORY, 2)); + commands.add(new CommandHelp("/f overclaim", HelpKeys.Help.CMD_OVERCLAIM, HelpKeys.Help.SECTION_TERRITORY, 2)); + commands.add(new CommandHelp("/f map", HelpKeys.Help.CMD_MAP, HelpKeys.Help.SECTION_TERRITORY, 2)); + + // Relations - Diplomatic relations (sortOrder 3) + commands.add(new CommandHelp("/f ally ", HelpKeys.Help.CMD_ALLY, HelpKeys.Help.SECTION_RELATIONS, 3)); + commands.add(new CommandHelp("/f enemy ", HelpKeys.Help.CMD_ENEMY, HelpKeys.Help.SECTION_RELATIONS, 3)); + commands.add(new CommandHelp("/f neutral", HelpKeys.Help.CMD_NEUTRAL, HelpKeys.Help.SECTION_RELATIONS, 3)); + + // Teleport - Home teleportation (sortOrder 4) + commands.add(new CommandHelp("/f home", HelpKeys.Help.CMD_HOME, HelpKeys.Help.SECTION_TELEPORT, 4)); + commands.add(new CommandHelp("/f sethome", HelpKeys.Help.CMD_SETHOME, HelpKeys.Help.SECTION_TELEPORT, 4)); + commands.add(new CommandHelp("/f stuck", HelpKeys.Help.CMD_STUCK, HelpKeys.Help.SECTION_TELEPORT, 4)); + + // Information - Viewing faction data (sortOrder 5) + commands.add(new CommandHelp("/f info [faction]", HelpKeys.Help.CMD_INFO, HelpKeys.Help.SECTION_INFORMATION, 5)); + commands.add(new CommandHelp("/f list", HelpKeys.Help.CMD_LIST, HelpKeys.Help.SECTION_INFORMATION, 5)); + commands.add(new CommandHelp("/f browse", HelpKeys.Help.CMD_BROWSE, HelpKeys.Help.SECTION_INFORMATION, 5)); + commands.add(new CommandHelp("/f members", HelpKeys.Help.CMD_MEMBERS, HelpKeys.Help.SECTION_INFORMATION, 5)); + commands.add(new CommandHelp("/f invites", HelpKeys.Help.CMD_INVITES, HelpKeys.Help.SECTION_INFORMATION, 5)); + commands.add(new CommandHelp("/f who [player]", HelpKeys.Help.CMD_WHO, HelpKeys.Help.SECTION_INFORMATION, 5)); + commands.add(new CommandHelp("/f power [player]", HelpKeys.Help.CMD_POWER, HelpKeys.Help.SECTION_INFORMATION, 5)); + commands.add(new CommandHelp("/f gui", HelpKeys.Help.CMD_GUI, HelpKeys.Help.SECTION_INFORMATION, 5)); + commands.add(new CommandHelp("/f settings", HelpKeys.Help.CMD_SETTINGS, HelpKeys.Help.SECTION_INFORMATION, 5)); + + // Other (sortOrder 6) + commands.add(new CommandHelp("/f chat ", HelpKeys.Help.CMD_CHAT, HelpKeys.Help.SECTION_OTHER, 6)); + commands.add(new CommandHelp("/f c ", HelpKeys.Help.CMD_CHAT_SHORT, HelpKeys.Help.SECTION_OTHER, 6)); + + // Admin (sortOrder 7) + commands.add(new CommandHelp("/f admin", HelpKeys.Help.CMD_ADMIN, HelpKeys.Help.SECTION_ADMIN, 7)); + commands.add(new CommandHelp("/f admin reload", HelpKeys.Help.CMD_ADMIN_RELOAD, HelpKeys.Help.SECTION_ADMIN, 7)); + commands.add(new CommandHelp("/f admin sync", HelpKeys.Help.CMD_ADMIN_SYNC, HelpKeys.Help.SECTION_ADMIN, 7)); + commands.add(new CommandHelp("/f admin factions", HelpKeys.Help.CMD_ADMIN_FACTIONS, HelpKeys.Help.SECTION_ADMIN, 7)); + commands.add(new CommandHelp("/f admin zones", HelpKeys.Help.CMD_ADMIN_ZONES, HelpKeys.Help.SECTION_ADMIN, 7)); + commands.add(new CommandHelp("/f admin config", HelpKeys.Help.CMD_ADMIN_CONFIG, HelpKeys.Help.SECTION_ADMIN, 7)); + commands.add(new CommandHelp("/f admin backups", HelpKeys.Help.CMD_ADMIN_BACKUPS, HelpKeys.Help.SECTION_ADMIN, 7)); + commands.add(new CommandHelp("/f admin update", HelpKeys.Help.CMD_ADMIN_UPDATE, HelpKeys.Help.SECTION_ADMIN, 7)); + commands.add(new CommandHelp("/f admin debug", HelpKeys.Help.CMD_ADMIN_DEBUG, HelpKeys.Help.SECTION_ADMIN, 7)); + + ctx.sendMessage(HelpFormatter.buildHelp(HelpKeys.Help.TITLE, HelpKeys.Help.DESCRIPTION, commands, HelpKeys.Help.DEFAULT_FOOTER, player)); } } diff --git a/src/main/java/com/hyperfactions/command/info/InfoSubCommand.java b/src/main/java/com/hyperfactions/command/info/InfoSubCommand.java index d0dd7c07..71d4d65a 100644 --- a/src/main/java/com/hyperfactions/command/info/InfoSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/InfoSubCommand.java @@ -12,7 +12,8 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -45,7 +46,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.INFO)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Info.NO_PERMISSION)); return; } @@ -57,13 +58,13 @@ protected void execute(@NotNull CommandContext ctx, String factionName = fctx.joinArgs(); faction = hyperFactions.getFactionManager().getFactionByName(factionName); if (faction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.FACTION_NOT_FOUND, factionName)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Info.FACTION_NOT_FOUND, factionName)); return; } } else { faction = hyperFactions.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.NOT_IN_FACTION_HINT)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Info.NOT_IN_FACTION_HINT)); return; } } @@ -81,29 +82,29 @@ protected void execute(@NotNull CommandContext ctx, PowerManager.FactionPowerStats stats = hyperFactions.getPowerManager().getFactionPowerStats(faction.id()); FactionMember leader = faction.getLeader(); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.FACTION_HEADER, faction.name()), COLOR_CYAN).bold(true)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.LEADER, leader != null ? leader.username() : HFMessages.get(player, MessageKeys.Common.NONE)), COLOR_GRAY)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.MEMBERS, faction.getMemberCount(), ConfigManager.get().getMaxMembers()), COLOR_GRAY)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.POWER, String.format("%.1f/%.1f", stats.currentPower(), stats.maxPower())), COLOR_GRAY)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.CLAIMS, stats.currentClaims() + "/" + stats.maxClaims()), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.FACTION_HEADER, faction.name()), COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.LEADER, leader != null ? leader.username() : HFMessages.get(player, CommonKeys.Common.NONE)), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.MEMBERS, faction.getMemberCount(), ConfigManager.get().getMaxMembers()), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.POWER, String.format("%.1f/%.1f", stats.currentPower(), stats.maxPower())), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.CLAIMS, stats.currentClaims() + "/" + stats.maxClaims()), COLOR_GRAY)); if (stats.isRaidable()) { - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.RAIDABLE), COLOR_RED).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.RAIDABLE), COLOR_RED).bold(true)); } // Relation info var relationManager = hyperFactions.getRelationManager(); int allyCount = relationManager.getAllies(faction.id()).size(); int enemyCount = relationManager.getEnemies(faction.id()).size(); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.ALLIES, allyCount), COLOR_GRAY)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.ENEMIES, enemyCount), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.ALLIES, allyCount), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.ENEMIES, enemyCount), COLOR_GRAY)); // Show bidirectional relation if viewer is in a different faction Faction viewerFaction = hyperFactions.getFactionManager().getPlayerFaction(player.getUuid()); if (viewerFaction != null && !viewerFaction.id().equals(faction.id())) { RelationType theyThinkOfUs = relationManager.getRelation(faction.id(), viewerFaction.id()); RelationType weThinkOfThem = relationManager.getRelation(viewerFaction.id(), faction.id()); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.THEY_CONSIDER, theyThinkOfUs.name()), COLOR_GRAY)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.YOU_CONSIDER, weThinkOfThem.name()), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.THEY_CONSIDER, theyThinkOfUs.name()), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.YOU_CONSIDER, weThinkOfThem.name()), COLOR_GRAY)); } } } diff --git a/src/main/java/com/hyperfactions/command/info/ListSubCommand.java b/src/main/java/com/hyperfactions/command/info/ListSubCommand.java index b98a24fc..ae4c4d52 100644 --- a/src/main/java/com/hyperfactions/command/info/ListSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/ListSubCommand.java @@ -9,7 +9,7 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -43,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.LIST)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.LIST_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Info.LIST_NO_PERMISSION)); return; } @@ -62,14 +62,14 @@ protected void execute(@NotNull CommandContext ctx, // Text mode: output to chat Collection factions = hyperFactions.getFactionManager().getAllFactions(); if (factions.isEmpty()) { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Info.LIST_EMPTY, COLOR_GRAY)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Info.LIST_EMPTY, COLOR_GRAY)); return; } - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.LIST_HEADER, factions.size()), COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.LIST_HEADER, factions.size()), COLOR_CYAN).bold(true)); for (Faction faction : factions) { PowerManager.FactionPowerStats stats = hyperFactions.getPowerManager().getFactionPowerStats(faction.id()); - String key = stats.isRaidable() ? MessageKeys.Info.LIST_ENTRY_RAIDABLE : MessageKeys.Info.LIST_ENTRY; + String key = stats.isRaidable() ? CommandKeys.Info.LIST_ENTRY_RAIDABLE : CommandKeys.Info.LIST_ENTRY; ctx.sendMessage(msg(HFMessages.get(player, key, faction.name(), faction.getMemberCount(), String.format("%.0f", stats.currentPower())), COLOR_GRAY)); } diff --git a/src/main/java/com/hyperfactions/command/info/MapSubCommand.java b/src/main/java/com/hyperfactions/command/info/MapSubCommand.java index 677bf25b..d0f8ddda 100644 --- a/src/main/java/com/hyperfactions/command/info/MapSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/MapSubCommand.java @@ -8,7 +8,7 @@ import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.ChunkUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -43,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.MAP)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.MAP_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Info.MAP_NO_PERMISSION)); return; } @@ -71,7 +71,7 @@ protected void execute(@NotNull CommandContext ctx, UUID playerFactionId = hyperFactions.getFactionManager().getPlayerFactionId(player.getUuid()); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.MAP_HEADER), COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.MAP_HEADER), COLOR_CYAN).bold(true)); for (int dz = -3; dz <= 3; dz++) { StringBuilder row = new StringBuilder(); @@ -93,7 +93,7 @@ protected void execute(@NotNull CommandContext ctx, } ctx.sendMessage(Message.raw(row.toString())); } - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.MAP_LEGEND), COLOR_GRAY)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.MAP_GUI_HINT), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.MAP_LEGEND), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.MAP_GUI_HINT), COLOR_GRAY)); } } diff --git a/src/main/java/com/hyperfactions/command/info/MembersSubCommand.java b/src/main/java/com/hyperfactions/command/info/MembersSubCommand.java index 46de7449..4eb5b90d 100644 --- a/src/main/java/com/hyperfactions/command/info/MembersSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/MembersSubCommand.java @@ -10,7 +10,7 @@ import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -42,7 +42,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.MEMBERS)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.MEMBERS_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Info.MEMBERS_NO_PERMISSION)); return; } @@ -65,7 +65,7 @@ protected void execute(@NotNull CommandContext ctx, // Text mode: output member list to chat List members = faction.getMembersSorted(); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.MEMBERS_HEADER, faction.name(), members.size()), COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.MEMBERS_HEADER, faction.name(), members.size()), COLOR_CYAN).bold(true)); for (FactionMember member : members) { String roleColor = switch (member.role()) { @@ -74,7 +74,7 @@ protected void execute(@NotNull CommandContext ctx, default -> COLOR_GRAY; }; boolean isOnline = plugin.getTrackedPlayer(member.uuid()) != null; - String status = isOnline ? " " + HFMessages.get(player, MessageKeys.Info.MEMBER_ONLINE) : ""; + String status = isOnline ? " " + HFMessages.get(player, CommandKeys.Info.MEMBER_ONLINE) : ""; ctx.sendMessage(msg(ConfigManager.get().getRoleDisplayName(member.role()) + " ", roleColor) .insert(msg(member.username(), COLOR_WHITE)) .insert(msg(status, isOnline ? COLOR_GREEN : COLOR_GRAY))); diff --git a/src/main/java/com/hyperfactions/command/info/PowerSubCommand.java b/src/main/java/com/hyperfactions/command/info/PowerSubCommand.java index bdd714dc..e3b7cabd 100644 --- a/src/main/java/com/hyperfactions/command/info/PowerSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/PowerSubCommand.java @@ -8,7 +8,8 @@ import com.hyperfactions.data.PlayerPower; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.PlayerResolver; import com.hypixel.hytale.component.Ref; @@ -41,7 +42,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.POWER)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Power.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Power.NO_PERMISSION)); return; } @@ -59,7 +60,7 @@ protected void execute(@NotNull CommandContext ctx, // Look up target player using centralized resolver var resolved = PlayerResolver.resolve(hyperFactions, fctx.getArg(0)); if (resolved == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.PLAYER_NOT_FOUND)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.PLAYER_NOT_FOUND)); return; } targetUuid = resolved.uuid(); @@ -68,8 +69,8 @@ protected void execute(@NotNull CommandContext ctx, // Power info is text-only (no GUI mode needed) PlayerPower power = hyperFactions.getPowerManager().getPlayerPower(targetUuid); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Power.HEADER, targetName), COLOR_CYAN)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Power.CURRENT, + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Power.HEADER, targetName), COLOR_CYAN)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Power.CURRENT, String.format("%.1f/%.1f (%d%%)", power.power(), power.getEffectiveMaxPower(), power.getPowerPercent())), COLOR_GRAY)); } } diff --git a/src/main/java/com/hyperfactions/command/info/WhoSubCommand.java b/src/main/java/com/hyperfactions/command/info/WhoSubCommand.java index f5ee9baf..36927669 100644 --- a/src/main/java/com/hyperfactions/command/info/WhoSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/WhoSubCommand.java @@ -11,7 +11,8 @@ import com.hyperfactions.data.PlayerPower; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.PlayerResolver; import com.hyperfactions.util.TimeUtil; @@ -45,7 +46,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.WHO)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.WHO_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Info.WHO_NO_PERMISSION)); return; } @@ -63,7 +64,7 @@ protected void execute(@NotNull CommandContext ctx, // Look up target player using centralized resolver var resolved = PlayerResolver.resolve(hyperFactions, fctx.getArg(0)); if (resolved == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.PLAYER_NOT_FOUND)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.PLAYER_NOT_FOUND)); return; } targetUuid = resolved.uuid(); @@ -88,14 +89,14 @@ protected void execute(@NotNull CommandContext ctx, boolean isOnline = plugin.getTrackedPlayer(targetUuid) != null; // Display info - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.PLAYER_HEADER, targetName), COLOR_CYAN)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.PLAYER_HEADER, targetName), COLOR_CYAN)); if (faction != null && member != null) { - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.WHO_FACTION, faction.name()), COLOR_GRAY)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.WHO_ROLE, ConfigManager.get().getRoleDisplayName(member.role())), COLOR_GRAY)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.WHO_JOINED, TimeUtil.formatRelative(member.joinedAt())), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.WHO_FACTION, faction.name()), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.WHO_ROLE, ConfigManager.get().getRoleDisplayName(member.role())), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.WHO_JOINED, TimeUtil.formatRelative(member.joinedAt())), COLOR_GRAY)); } else { - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.WHO_FACTION_NONE), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.WHO_FACTION_NONE), COLOR_GRAY)); } // Power display — hardcore mode shows faction power, normal mode shows player power @@ -112,12 +113,12 @@ protected void execute(@NotNull CommandContext ctx, PlayerPower power = hyperFactions.getPowerManager().getPlayerPower(targetUuid); powerText = String.format("%.1f/%.1f", power.power(), power.getEffectiveMaxPower()); } - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.WHO_POWER, powerText), COLOR_GRAY)); - String statusText = isOnline ? HFMessages.get(player, MessageKeys.Common.ONLINE) : HFMessages.get(player, MessageKeys.Common.OFFLINE); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.WHO_STATUS, statusText), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.WHO_POWER, powerText), COLOR_GRAY)); + String statusText = isOnline ? HFMessages.get(player, CommonKeys.Common.ONLINE) : HFMessages.get(player, CommonKeys.Common.OFFLINE); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.WHO_STATUS, statusText), COLOR_GRAY)); if (!isOnline && member != null) { - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.WHO_LAST_SEEN, TimeUtil.formatRelative(member.lastOnline())), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Info.WHO_LAST_SEEN, TimeUtil.formatRelative(member.lastOnline())), COLOR_GRAY)); } } } diff --git a/src/main/java/com/hyperfactions/command/member/AcceptSubCommand.java b/src/main/java/com/hyperfactions/command/member/AcceptSubCommand.java index 0c45d138..3b3915a6 100644 --- a/src/main/java/com/hyperfactions/command/member/AcceptSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/AcceptSubCommand.java @@ -9,7 +9,8 @@ import com.hyperfactions.data.PendingInvite; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -43,17 +44,17 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.JOIN)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Join.NO_PERMISSION)); return; } if (hyperFactions.getFactionManager().isInFaction(player.getUuid())) { Faction existingFaction = hyperFactions.getFactionManager().getPlayerFaction(player.getUuid()); if (existingFaction != null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.ALREADY_IN_NAMED, existingFaction.name())); - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Join.USE_LEAVE_HINT, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Join.ALREADY_IN_NAMED, existingFaction.name())); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Join.USE_LEAVE_HINT, COLOR_YELLOW)); } else { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.ALREADY_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.ALREADY_IN_FACTION)); } return; } @@ -73,7 +74,7 @@ protected void execute(@NotNull CommandContext ctx, } if (invites.isEmpty()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.NO_INVITES)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Join.NO_INVITES)); return; } @@ -82,12 +83,12 @@ protected void execute(@NotNull CommandContext ctx, String factionName = fctx.joinArgs(); Faction targetFaction = hyperFactions.getFactionManager().getFactionByName(factionName); if (targetFaction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.FACTION_NOT_FOUND, factionName)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Join.FACTION_NOT_FOUND, factionName)); return; } invite = hyperFactions.getInviteManager().getInvite(targetFaction.id(), player.getUuid()); if (invite == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.NOT_INVITED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Join.NOT_INVITED)); return; } } else { @@ -96,7 +97,7 @@ protected void execute(@NotNull CommandContext ctx, Faction faction = hyperFactions.getFactionManager().getFaction(invite.factionId()); if (faction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.FACTION_GONE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Join.FACTION_GONE)); hyperFactions.getInviteManager().removeInvite(invite.factionId(), player.getUuid()); return; } @@ -108,12 +109,12 @@ protected void execute(@NotNull CommandContext ctx, if (result == FactionManager.FactionResult.SUCCESS) { hyperFactions.getInviteManager().clearPlayerInvites(player.getUuid()); hyperFactions.getJoinRequestManager().clearPlayerRequests(player.getUuid()); - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Join.SUCCESS, faction.name())); - broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.Join.BROADCAST, player.getUsername())); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Join.SUCCESS, faction.name())); + broadcastToFaction(faction.id(), MessageUtil.success(player, CommandKeys.Join.BROADCAST, player.getUsername())); } else if (result == FactionManager.FactionResult.FACTION_FULL) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.FACTION_FULL)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Join.FACTION_FULL)); } else { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.FAILED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Join.FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/member/DemoteSubCommand.java b/src/main/java/com/hyperfactions/command/member/DemoteSubCommand.java index 757ec1b4..dd395431 100644 --- a/src/main/java/com/hyperfactions/command/member/DemoteSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/DemoteSubCommand.java @@ -11,7 +11,8 @@ import com.hyperfactions.data.FactionRole; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -42,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.DEMOTE)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.DEMOTE_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.DEMOTE_NO_PERMISSION)); return; } @@ -55,7 +56,7 @@ protected void execute(@NotNull CommandContext ctx, FactionCommandContext fctx = parseContext(rawArgs); if (!fctx.hasArgs()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.DEMOTE_USAGE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.DEMOTE_USAGE)); return; } @@ -65,7 +66,7 @@ protected void execute(@NotNull CommandContext ctx, .findFirst().orElse(null); if (target == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.PLAYER_NOT_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.PLAYER_NOT_IN_FACTION)); return; } @@ -76,8 +77,8 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { String memberName = ConfigManager.get().getRoleDisplayName(FactionRole.MEMBER); - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Rank.DEMOTED, target.username(), memberName)); - broadcastToFaction(faction.id(), MessageUtil.error(player, MessageKeys.Rank.DEMOTE_BROADCAST, target.username(), memberName)); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Rank.DEMOTED, target.username(), memberName)); + broadcastToFaction(faction.id(), MessageUtil.error(player, CommandKeys.Rank.DEMOTE_BROADCAST, target.username(), memberName)); // Show members page after action (if not text mode) if (!fctx.isTextMode()) { Player playerEntity = store.getComponent(ref, Player.getComponentType()); @@ -86,9 +87,9 @@ protected void execute(@NotNull CommandContext ctx, } } } - case NOT_LEADER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.MUST_BE_LEADER)); - case CANNOT_DEMOTE_MEMBER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.ALREADY_LOWEST)); - default -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.DEMOTE_FAILED)); + case NOT_LEADER -> ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.MUST_BE_LEADER)); + case CANNOT_DEMOTE_MEMBER -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.ALREADY_LOWEST)); + default -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.DEMOTE_FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/member/InviteSubCommand.java b/src/main/java/com/hyperfactions/command/member/InviteSubCommand.java index d231a190..dd31e5b1 100644 --- a/src/main/java/com/hyperfactions/command/member/InviteSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/InviteSubCommand.java @@ -8,7 +8,7 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -39,7 +39,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.INVITE)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Invite.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Invite.NO_PERMISSION)); return; } @@ -50,7 +50,7 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isOfficerOrHigher()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Invite.NOT_OFFICER)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Invite.NOT_OFFICER)); return; } @@ -67,26 +67,26 @@ protected void execute(@NotNull CommandContext ctx, } if (!fctx.hasArgs()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Invite.USAGE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Invite.USAGE)); return; } String targetName = fctx.getArg(0); PlayerRef target = findOnlinePlayer(targetName); if (target == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Invite.PLAYER_NOT_FOUND, targetName)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Invite.PLAYER_NOT_FOUND, targetName)); return; } if (hyperFactions.getFactionManager().isInFaction(target.getUuid())) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Invite.TARGET_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Invite.TARGET_IN_FACTION)); return; } hyperFactions.getInviteManager().createInvite(faction.id(), target.getUuid(), player.getUuid()); - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Invite.SENT, target.getUsername())); - target.sendMessage(MessageUtil.info(target, MessageKeys.Invite.RECEIVED, COLOR_YELLOW, faction.name())); - target.sendMessage(MessageUtil.info(target, MessageKeys.Invite.ACCEPT_HINT, COLOR_YELLOW, faction.name())); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Invite.SENT, target.getUsername())); + target.sendMessage(MessageUtil.info(target, CommandKeys.Invite.RECEIVED, COLOR_YELLOW, faction.name())); + target.sendMessage(MessageUtil.info(target, CommandKeys.Invite.ACCEPT_HINT, COLOR_YELLOW, faction.name())); } } diff --git a/src/main/java/com/hyperfactions/command/member/KickSubCommand.java b/src/main/java/com/hyperfactions/command/member/KickSubCommand.java index 0a796747..2c086cee 100644 --- a/src/main/java/com/hyperfactions/command/member/KickSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/KickSubCommand.java @@ -9,7 +9,7 @@ import com.hyperfactions.data.FactionMember; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -40,7 +40,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.KICK)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Kick.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Kick.NO_PERMISSION)); return; } @@ -53,7 +53,7 @@ protected void execute(@NotNull CommandContext ctx, FactionCommandContext fctx = parseContext(rawArgs); if (!fctx.hasArgs()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Kick.USAGE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Kick.USAGE)); return; } @@ -63,7 +63,7 @@ protected void execute(@NotNull CommandContext ctx, .findFirst().orElse(null); if (target == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Kick.NOT_IN_YOUR_FACTION, targetName)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Kick.NOT_IN_YOUR_FACTION, targetName)); return; } @@ -73,11 +73,11 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Kick.SUCCESS, target.username())); - broadcastToFaction(faction.id(), MessageUtil.error(player, MessageKeys.Kick.BROADCAST, target.username())); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Kick.SUCCESS, target.username())); + broadcastToFaction(faction.id(), MessageUtil.error(player, CommandKeys.Kick.BROADCAST, target.username())); PlayerRef targetPlayer = plugin.getTrackedPlayer(target.uuid()); if (targetPlayer != null) { - targetPlayer.sendMessage(MessageUtil.error(targetPlayer, MessageKeys.Kick.KICKED)); + targetPlayer.sendMessage(MessageUtil.error(targetPlayer, CommandKeys.Kick.KICKED)); } // Show members page after action (if not text mode) @@ -88,9 +88,9 @@ protected void execute(@NotNull CommandContext ctx, } } } - case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Kick.CANNOT_KICK_HIGHER)); - case CANNOT_KICK_LEADER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Kick.CANNOT_KICK_LEADER)); - default -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Kick.FAILED)); + case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Kick.CANNOT_KICK_HIGHER)); + case CANNOT_KICK_LEADER -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Kick.CANNOT_KICK_LEADER)); + default -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Kick.FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/member/LeaveSubCommand.java b/src/main/java/com/hyperfactions/command/member/LeaveSubCommand.java index 91176bca..8310b21f 100644 --- a/src/main/java/com/hyperfactions/command/member/LeaveSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/LeaveSubCommand.java @@ -13,7 +13,7 @@ import com.hyperfactions.manager.ConfirmationManager; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -45,7 +45,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.LEAVE)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Leave.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Leave.NO_PERMISSION)); return; } @@ -80,8 +80,8 @@ protected void execute(@NotNull CommandContext ctx, switch (confirmResult) { case NEEDS_CONFIRMATION, EXPIRED_RECREATED -> { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Leave.CONFIRM_PROMPT, COLOR_YELLOW)); - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Leave.CONFIRM_INSTRUCTION, COLOR_YELLOW, + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Leave.CONFIRM_PROMPT, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Leave.CONFIRM_INSTRUCTION, COLOR_YELLOW, confirmManager.getTimeoutSeconds())); } case CONFIRMED -> { @@ -90,14 +90,14 @@ protected void execute(@NotNull CommandContext ctx, factionId, player.getUuid(), player.getUuid(), false ); if (result == FactionManager.FactionResult.SUCCESS) { - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Leave.SUCCESS)); - broadcastToFaction(factionId, MessageUtil.error(player, MessageKeys.Leave.BROADCAST, player.getUsername())); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Leave.SUCCESS)); + broadcastToFaction(factionId, MessageUtil.error(player, CommandKeys.Leave.BROADCAST, player.getUsername())); } else { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Leave.FAILED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Leave.FAILED)); } } case DIFFERENT_ACTION -> { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Leave.CANCELLED, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Leave.CANCELLED, COLOR_YELLOW)); } default -> throw new IllegalStateException("Unexpected value"); } diff --git a/src/main/java/com/hyperfactions/command/member/PromoteSubCommand.java b/src/main/java/com/hyperfactions/command/member/PromoteSubCommand.java index 2ecd1f23..64206557 100644 --- a/src/main/java/com/hyperfactions/command/member/PromoteSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/PromoteSubCommand.java @@ -11,7 +11,8 @@ import com.hyperfactions.data.FactionRole; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -42,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.PROMOTE)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.PROMOTE_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.PROMOTE_NO_PERMISSION)); return; } @@ -55,7 +56,7 @@ protected void execute(@NotNull CommandContext ctx, FactionCommandContext fctx = parseContext(rawArgs); if (!fctx.hasArgs()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.PROMOTE_USAGE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.PROMOTE_USAGE)); return; } @@ -65,7 +66,7 @@ protected void execute(@NotNull CommandContext ctx, .findFirst().orElse(null); if (target == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.PLAYER_NOT_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.PLAYER_NOT_IN_FACTION)); return; } @@ -76,8 +77,8 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { String officerName = ConfigManager.get().getRoleDisplayName(FactionRole.OFFICER); - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Rank.PROMOTED, target.username(), officerName)); - broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.Rank.PROMOTE_BROADCAST, target.username(), officerName)); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Rank.PROMOTED, target.username(), officerName)); + broadcastToFaction(faction.id(), MessageUtil.success(player, CommandKeys.Rank.PROMOTE_BROADCAST, target.username(), officerName)); // Show members page after action (if not text mode) if (!fctx.isTextMode()) { Player playerEntity = store.getComponent(ref, Player.getComponentType()); @@ -86,9 +87,9 @@ protected void execute(@NotNull CommandContext ctx, } } } - case NOT_LEADER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.MUST_BE_LEADER)); - case CANNOT_PROMOTE_LEADER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.ALREADY_HIGHEST)); - default -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.PROMOTE_FAILED)); + case NOT_LEADER -> ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.MUST_BE_LEADER)); + case CANNOT_PROMOTE_LEADER -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.ALREADY_HIGHEST)); + default -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.PROMOTE_FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/member/TransferSubCommand.java b/src/main/java/com/hyperfactions/command/member/TransferSubCommand.java index 8d0cdaac..bc2e0b23 100644 --- a/src/main/java/com/hyperfactions/command/member/TransferSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/TransferSubCommand.java @@ -12,7 +12,8 @@ import com.hyperfactions.manager.ConfirmationManager; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -43,7 +44,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.TRANSFER)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.TRANSFER_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.TRANSFER_NO_PERMISSION)); return; } @@ -55,7 +56,7 @@ protected void execute(@NotNull CommandContext ctx, // Check if leader FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isLeader()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.MUST_BE_LEADER)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.MUST_BE_LEADER)); return; } @@ -63,7 +64,7 @@ protected void execute(@NotNull CommandContext ctx, FactionCommandContext fctx = parseContext(rawArgs); if (!fctx.hasArgs()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.TRANSFER_USAGE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.TRANSFER_USAGE)); return; } @@ -73,7 +74,7 @@ protected void execute(@NotNull CommandContext ctx, .findFirst().orElse(null); if (target == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.PLAYER_NOT_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.PLAYER_NOT_IN_FACTION)); return; } @@ -95,8 +96,8 @@ protected void execute(@NotNull CommandContext ctx, switch (confirmResult) { case NEEDS_CONFIRMATION, EXPIRED_RECREATED -> { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Rank.TRANSFER_CONFIRM, COLOR_YELLOW, target.username())); - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Rank.TRANSFER_CONFIRM_INSTRUCTION, COLOR_YELLOW, + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Rank.TRANSFER_CONFIRM, COLOR_YELLOW, target.username())); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Rank.TRANSFER_CONFIRM_INSTRUCTION, COLOR_YELLOW, target.username(), confirmManager.getTimeoutSeconds())); } case CONFIRMED -> { @@ -104,14 +105,14 @@ protected void execute(@NotNull CommandContext ctx, faction.id(), target.uuid(), player.getUuid() ); if (result == FactionManager.FactionResult.SUCCESS) { - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Rank.TRANSFERRED, target.username())); - broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.Rank.TRANSFER_BROADCAST, target.username())); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Rank.TRANSFERRED, target.username())); + broadcastToFaction(faction.id(), MessageUtil.success(player, CommandKeys.Rank.TRANSFER_BROADCAST, target.username())); } else { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.TRANSFER_FAILED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Rank.TRANSFER_FAILED)); } } case DIFFERENT_ACTION -> { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Rank.TRANSFER_CANCELLED, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Rank.TRANSFER_CANCELLED, COLOR_YELLOW)); } default -> throw new IllegalStateException("Unexpected value"); } diff --git a/src/main/java/com/hyperfactions/command/relation/AllySubCommand.java b/src/main/java/com/hyperfactions/command/relation/AllySubCommand.java index fa48f858..dc5381fa 100644 --- a/src/main/java/com/hyperfactions/command/relation/AllySubCommand.java +++ b/src/main/java/com/hyperfactions/command/relation/AllySubCommand.java @@ -8,7 +8,8 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.RelationManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -39,7 +40,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.ALLY)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ALLY_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.ALLY_NO_PERMISSION)); return; } @@ -61,28 +62,28 @@ protected void execute(@NotNull CommandContext ctx, } if (!fctx.hasArgs()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ALLY_USAGE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.ALLY_USAGE)); return; } String factionName = fctx.joinArgs(); Faction targetFaction = hyperFactions.getFactionManager().getFactionByName(factionName); if (targetFaction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.FACTION_NOT_FOUND)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.FACTION_NOT_FOUND)); return; } RelationManager.RelationResult result = hyperFactions.getRelationManager().requestAlly(player.getUuid(), targetFaction.id()); switch (result) { - case REQUEST_SENT -> ctx.sendMessage(MessageUtil.success(player, MessageKeys.Relation.ALLY_SENT, targetFaction.name())); - case REQUEST_ACCEPTED -> ctx.sendMessage(MessageUtil.success(player, MessageKeys.Relation.ALLY_FORMED, targetFaction.name())); - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); - case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.MUST_BE_OFFICER)); - case CANNOT_RELATE_SELF -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.CANNOT_SELF)); - case ALREADY_ALLY -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ALREADY_ALLY)); - case ALLY_LIMIT_REACHED -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.MAX_ALLIES)); - default -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ALLY_FAILED)); + case REQUEST_SENT -> ctx.sendMessage(MessageUtil.success(player, CommandKeys.Relation.ALLY_SENT, targetFaction.name())); + case REQUEST_ACCEPTED -> ctx.sendMessage(MessageUtil.success(player, CommandKeys.Relation.ALLY_FORMED, targetFaction.name())); + case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); + case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.MUST_BE_OFFICER)); + case CANNOT_RELATE_SELF -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.CANNOT_SELF)); + case ALREADY_ALLY -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.ALREADY_ALLY)); + case ALLY_LIMIT_REACHED -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.MAX_ALLIES)); + default -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.ALLY_FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/relation/EnemySubCommand.java b/src/main/java/com/hyperfactions/command/relation/EnemySubCommand.java index 0a221725..041b6c21 100644 --- a/src/main/java/com/hyperfactions/command/relation/EnemySubCommand.java +++ b/src/main/java/com/hyperfactions/command/relation/EnemySubCommand.java @@ -8,7 +8,8 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.RelationManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -39,7 +40,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.ENEMY)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ENEMY_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.ENEMY_NO_PERMISSION)); return; } @@ -61,26 +62,26 @@ protected void execute(@NotNull CommandContext ctx, } if (!fctx.hasArgs()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ENEMY_USAGE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.ENEMY_USAGE)); return; } String factionName = fctx.joinArgs(); Faction targetFaction = hyperFactions.getFactionManager().getFactionByName(factionName); if (targetFaction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.FACTION_NOT_FOUND)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.FACTION_NOT_FOUND)); return; } RelationManager.RelationResult result = hyperFactions.getRelationManager().setEnemy(player.getUuid(), targetFaction.id()); switch (result) { - case SUCCESS -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ENEMY_DECLARED, targetFaction.name())); - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); - case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.MUST_BE_OFFICER)); - case ALREADY_ENEMY -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ALREADY_ENEMY)); - case ENEMY_LIMIT_REACHED -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.MAX_ENEMIES)); - default -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ENEMY_FAILED)); + case SUCCESS -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.ENEMY_DECLARED, targetFaction.name())); + case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); + case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.MUST_BE_OFFICER)); + case ALREADY_ENEMY -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.ALREADY_ENEMY)); + case ENEMY_LIMIT_REACHED -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.MAX_ENEMIES)); + default -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.ENEMY_FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/relation/NeutralSubCommand.java b/src/main/java/com/hyperfactions/command/relation/NeutralSubCommand.java index ddadcbb9..61673532 100644 --- a/src/main/java/com/hyperfactions/command/relation/NeutralSubCommand.java +++ b/src/main/java/com/hyperfactions/command/relation/NeutralSubCommand.java @@ -8,7 +8,8 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.RelationManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -39,7 +40,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.NEUTRAL)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.NEUTRAL_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.NEUTRAL_NO_PERMISSION)); return; } @@ -61,25 +62,25 @@ protected void execute(@NotNull CommandContext ctx, } if (!fctx.hasArgs()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.NEUTRAL_USAGE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.NEUTRAL_USAGE)); return; } String factionName = fctx.joinArgs(); Faction targetFaction = hyperFactions.getFactionManager().getFactionByName(factionName); if (targetFaction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.FACTION_NOT_FOUND)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.FACTION_NOT_FOUND)); return; } RelationManager.RelationResult result = hyperFactions.getRelationManager().setNeutral(player.getUuid(), targetFaction.id()); switch (result) { - case SUCCESS -> ctx.sendMessage(MessageUtil.info(player, MessageKeys.Relation.NEUTRAL_SET, COLOR_GRAY, targetFaction.name())); - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); - case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.MUST_BE_OFFICER)); - case ALREADY_NEUTRAL -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ALREADY_NEUTRAL)); - default -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.NEUTRAL_FAILED)); + case SUCCESS -> ctx.sendMessage(MessageUtil.info(player, CommandKeys.Relation.NEUTRAL_SET, COLOR_GRAY, targetFaction.name())); + case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); + case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.MUST_BE_OFFICER)); + case ALREADY_NEUTRAL -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.ALREADY_NEUTRAL)); + default -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.NEUTRAL_FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/relation/RelationsSubCommand.java b/src/main/java/com/hyperfactions/command/relation/RelationsSubCommand.java index 878e08b6..6d8b7d8d 100644 --- a/src/main/java/com/hyperfactions/command/relation/RelationsSubCommand.java +++ b/src/main/java/com/hyperfactions/command/relation/RelationsSubCommand.java @@ -8,7 +8,8 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -41,7 +42,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.RELATIONS)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.VIEW_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Relation.VIEW_NO_PERMISSION)); return; } @@ -66,28 +67,28 @@ protected void execute(@NotNull CommandContext ctx, List allies = hyperFactions.getRelationManager().getAllies(faction.id()); List enemies = hyperFactions.getRelationManager().getEnemies(faction.id()); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Relation.HEADER), COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Relation.HEADER), COLOR_CYAN).bold(true)); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Relation.ALLIES_COUNT, allies.size()), COLOR_GREEN)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Relation.ALLIES_COUNT, allies.size()), COLOR_GREEN)); if (allies.isEmpty()) { - ctx.sendMessage(msg(" (" + HFMessages.get(player, MessageKeys.Common.NONE) + ")", COLOR_GRAY)); + ctx.sendMessage(msg(" (" + HFMessages.get(player, CommonKeys.Common.NONE) + ")", COLOR_GRAY)); } else { for (UUID allyId : allies) { Faction ally = hyperFactions.getFactionManager().getFaction(allyId); if (ally != null) { - ctx.sendMessage(msg(" ", COLOR_GRAY).insert(msg(HFMessages.get(player, MessageKeys.Relation.LIST_ENTRY, ally.name()), COLOR_GREEN))); + ctx.sendMessage(msg(" ", COLOR_GRAY).insert(msg(HFMessages.get(player, CommandKeys.Relation.LIST_ENTRY, ally.name()), COLOR_GREEN))); } } } - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Relation.ENEMIES_COUNT, enemies.size()), COLOR_RED)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Relation.ENEMIES_COUNT, enemies.size()), COLOR_RED)); if (enemies.isEmpty()) { - ctx.sendMessage(msg(" (" + HFMessages.get(player, MessageKeys.Common.NONE) + ")", COLOR_GRAY)); + ctx.sendMessage(msg(" (" + HFMessages.get(player, CommonKeys.Common.NONE) + ")", COLOR_GRAY)); } else { for (UUID enemyId : enemies) { Faction enemy = hyperFactions.getFactionManager().getFaction(enemyId); if (enemy != null) { - ctx.sendMessage(msg(" ", COLOR_GRAY).insert(msg(HFMessages.get(player, MessageKeys.Relation.LIST_ENTRY, enemy.name()), COLOR_RED))); + ctx.sendMessage(msg(" ", COLOR_GRAY).insert(msg(HFMessages.get(player, CommandKeys.Relation.LIST_ENTRY, enemy.name()), COLOR_RED))); } } } diff --git a/src/main/java/com/hyperfactions/command/social/ChatSubCommand.java b/src/main/java/com/hyperfactions/command/social/ChatSubCommand.java index ea79b2c9..049539c8 100644 --- a/src/main/java/com/hyperfactions/command/social/ChatSubCommand.java +++ b/src/main/java/com/hyperfactions/command/social/ChatSubCommand.java @@ -6,7 +6,7 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.ChatManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -70,7 +70,7 @@ protected void execute(@NotNull CommandContext ctx, yield new ChatManager.ToggleResult(ChatManager.ChatResult.SUCCESS, ChatManager.ChatChannel.NORMAL); } default -> { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Chat.USAGE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Chat.USAGE)); yield null; } }; @@ -81,7 +81,7 @@ protected void execute(@NotNull CommandContext ctx, } if (!result.isSuccess()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Chat.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Chat.NO_PERMISSION)); return; } @@ -89,6 +89,6 @@ protected void execute(@NotNull CommandContext ctx, String display = ChatManager.getChannelDisplay(channel); String color = ChatManager.getChannelColor(channel); - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Chat.MODE_SET, color, display)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Chat.MODE_SET, color, display)); } } diff --git a/src/main/java/com/hyperfactions/command/social/InvitesSubCommand.java b/src/main/java/com/hyperfactions/command/social/InvitesSubCommand.java index 63bd6f43..6172c759 100644 --- a/src/main/java/com/hyperfactions/command/social/InvitesSubCommand.java +++ b/src/main/java/com/hyperfactions/command/social/InvitesSubCommand.java @@ -10,7 +10,8 @@ import com.hyperfactions.data.PendingInvite; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -50,7 +51,7 @@ protected void execute(@NotNull CommandContext ctx, if (faction != null) { FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isOfficerOrHigher()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Invites.NOT_OFFICER)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Invites.NOT_OFFICER)); return; } @@ -67,31 +68,31 @@ protected void execute(@NotNull CommandContext ctx, List invites = hyperFactions.getInviteManager().getFactionInvitesList(faction.id()); List requests = hyperFactions.getJoinRequestManager().getFactionRequests(faction.id()); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Invites.HEADER), COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Invites.HEADER), COLOR_CYAN).bold(true)); if (invites.isEmpty() && requests.isEmpty()) { - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Invites.NO_PENDING), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Invites.NO_PENDING), COLOR_GRAY)); return; } if (!invites.isEmpty()) { - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Invites.OUTGOING), COLOR_YELLOW)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Invites.OUTGOING), COLOR_YELLOW)); for (PendingInvite invite : invites) { String inviterName = plugin.getTrackedPlayer(invite.invitedBy()) != null ? plugin.getTrackedPlayer(invite.invitedBy()).getUsername() - : HFMessages.get(player, MessageKeys.Common.UNKNOWN); + : HFMessages.get(player, CommonKeys.Common.UNKNOWN); ctx.sendMessage(msg(" ", COLOR_GRAY) - .insert(msg(HFMessages.get(player, MessageKeys.Invites.OUTGOING_ENTRY, + .insert(msg(HFMessages.get(player, CommandKeys.Invites.OUTGOING_ENTRY, invite.playerUuid().toString().substring(0, 8), inviterName), COLOR_WHITE))); } } if (!requests.isEmpty()) { - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Invites.REQUESTS), COLOR_GREEN)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Invites.REQUESTS), COLOR_GREEN)); for (JoinRequest request : requests) { String message = request.message() != null ? " \"" + request.message() + "\"" : ""; ctx.sendMessage(msg(" ", COLOR_GRAY) - .insert(msg(HFMessages.get(player, MessageKeys.Invites.REQUEST_ENTRY, + .insert(msg(HFMessages.get(player, CommandKeys.Invites.REQUEST_ENTRY, request.playerName(), message), COLOR_WHITE))); } } @@ -109,10 +110,10 @@ protected void execute(@NotNull CommandContext ctx, // Text mode: show incoming invites List invites = hyperFactions.getInviteManager().getPlayerInvites(player.getUuid()); - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Invites.YOUR_INVITES_HEADER), COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Invites.YOUR_INVITES_HEADER), COLOR_CYAN).bold(true)); if (invites.isEmpty()) { - ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Invites.NO_INVITES), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, CommandKeys.Invites.NO_INVITES), COLOR_GRAY)); return; } @@ -120,7 +121,7 @@ protected void execute(@NotNull CommandContext ctx, Faction invitingFaction = hyperFactions.getFactionManager().getFaction(invite.factionId()); if (invitingFaction != null) { ctx.sendMessage(msg(" ", COLOR_GRAY) - .insert(msg(HFMessages.get(player, MessageKeys.Invites.INVITE_ENTRY, + .insert(msg(HFMessages.get(player, CommandKeys.Invites.INVITE_ENTRY, invitingFaction.name(), invitingFaction.name()), COLOR_YELLOW))); } } diff --git a/src/main/java/com/hyperfactions/command/social/RequestSubCommand.java b/src/main/java/com/hyperfactions/command/social/RequestSubCommand.java index 3af34cd4..26538bbf 100644 --- a/src/main/java/com/hyperfactions/command/social/RequestSubCommand.java +++ b/src/main/java/com/hyperfactions/command/social/RequestSubCommand.java @@ -10,7 +10,8 @@ import com.hyperfactions.manager.InviteManager; import com.hyperfactions.manager.JoinRequestManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -43,7 +44,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.JOIN)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Request.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Request.NO_PERMISSION)); return; } @@ -51,10 +52,10 @@ protected void execute(@NotNull CommandContext ctx, if (hyperFactions.getFactionManager().isInFaction(player.getUuid())) { Faction existingFaction = hyperFactions.getFactionManager().getPlayerFaction(player.getUuid()); if (existingFaction != null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Request.ALREADY_IN_NAMED, existingFaction.name())); - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Request.USE_LEAVE_HINT, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Request.ALREADY_IN_NAMED, existingFaction.name())); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Request.USE_LEAVE_HINT, COLOR_YELLOW)); } else { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.ALREADY_IN_FACTION)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.ALREADY_IN_FACTION)); } return; } @@ -73,7 +74,7 @@ protected void execute(@NotNull CommandContext ctx, // Text mode requires faction name if (!fctx.hasArgs()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Request.USAGE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Request.USAGE)); return; } @@ -81,27 +82,27 @@ protected void execute(@NotNull CommandContext ctx, String factionName = fctx.getArg(0); Faction faction = hyperFactions.getFactionManager().getFactionByName(factionName); if (faction == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.FACTION_NOT_FOUND)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.FACTION_NOT_FOUND)); return; } // Check if faction is open (if open, just join directly) if (faction.open()) { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Request.FACTION_OPEN, COLOR_YELLOW, faction.name())); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Request.FACTION_OPEN, COLOR_YELLOW, faction.name())); return; } // Check if player already has a pending request JoinRequestManager requestManager = hyperFactions.getJoinRequestManager(); if (requestManager.hasRequest(faction.id(), player.getUuid())) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Request.ALREADY_REQUESTED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Request.ALREADY_REQUESTED)); return; } // Check if player has an invite to this faction (they should accept it instead) InviteManager inviteManager = hyperFactions.getInviteManager(); if (inviteManager.hasInvite(faction.id(), player.getUuid())) { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Request.HAS_INVITE, COLOR_YELLOW, faction.name())); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Request.HAS_INVITE, COLOR_YELLOW, faction.name())); return; } @@ -118,11 +119,11 @@ protected void execute(@NotNull CommandContext ctx, // Create the join request requestManager.createRequest(faction.id(), player.getUuid(), player.getUsername(), message); - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Request.SENT, faction.name())); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Request.SENT, faction.name())); if (message != null) { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Request.YOUR_MESSAGE, COLOR_GRAY, message)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Request.YOUR_MESSAGE, COLOR_GRAY, message)); } - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Request.OFFICER_REVIEW, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Request.OFFICER_REVIEW, COLOR_YELLOW)); // Notify online officers for (UUID memberUuid : faction.members().keySet()) { @@ -130,8 +131,8 @@ protected void execute(@NotNull CommandContext ctx, if (member != null && member.isOfficerOrHigher()) { PlayerRef officer = plugin.getTrackedPlayer(memberUuid); if (officer != null) { - officer.sendMessage(MessageUtil.success(officer, MessageKeys.Request.OFFICER_NOTIFY, player.getUsername())); - officer.sendMessage(MessageUtil.info(officer, MessageKeys.Request.OFFICER_REVIEW_HINT, COLOR_YELLOW)); + officer.sendMessage(MessageUtil.success(officer, CommandKeys.Request.OFFICER_NOTIFY, player.getUsername())); + officer.sendMessage(MessageUtil.info(officer, CommandKeys.Request.OFFICER_REVIEW_HINT, COLOR_YELLOW)); } } } diff --git a/src/main/java/com/hyperfactions/command/teleport/DelHomeSubCommand.java b/src/main/java/com/hyperfactions/command/teleport/DelHomeSubCommand.java index 7102fc14..771aac26 100644 --- a/src/main/java/com/hyperfactions/command/teleport/DelHomeSubCommand.java +++ b/src/main/java/com/hyperfactions/command/teleport/DelHomeSubCommand.java @@ -6,7 +6,7 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -36,7 +36,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.DELHOME)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.DELHOME_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.DELHOME_NO_PERMISSION)); return; } @@ -46,19 +46,19 @@ protected void execute(@NotNull CommandContext ctx, } if (faction.home() == null) { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Home.DELHOME_NO_HOME, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Home.DELHOME_NO_HOME, COLOR_YELLOW)); return; } FactionManager.FactionResult result = hyperFactions.getFactionManager().setHome(faction.id(), null, player.getUuid()); if (result == FactionManager.FactionResult.SUCCESS) { - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Home.DELETED)); - broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.Home.DELHOME_BROADCAST, player.getUsername())); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Home.DELETED)); + broadcastToFaction(faction.id(), MessageUtil.success(player, CommandKeys.Home.DELHOME_BROADCAST, player.getUsername())); } else if (result == FactionManager.FactionResult.NOT_OFFICER) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.DELHOME_NOT_OFFICER)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.DELHOME_NOT_OFFICER)); } else { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.DELHOME_FAILED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.DELHOME_FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/teleport/HomeSubCommand.java b/src/main/java/com/hyperfactions/command/teleport/HomeSubCommand.java index 7f2a1726..b5e7035a 100644 --- a/src/main/java/com/hyperfactions/command/teleport/HomeSubCommand.java +++ b/src/main/java/com/hyperfactions/command/teleport/HomeSubCommand.java @@ -6,7 +6,8 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.TeleportManager; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -42,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.HOME)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.NO_PERMISSION)); return; } @@ -80,11 +81,11 @@ protected void execute(@NotNull CommandContext ctx, // Handle immediate results (warmup teleports are handled by TerritoryTickingSystem) switch (result) { - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); - case NO_HOME -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.NO_HOME)); - case COMBAT_TAGGED -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.COMBAT_TAGGED)); + case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); + case NO_HOME -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.NO_HOME)); + case COMBAT_TAGGED -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.COMBAT_TAGGED)); case ON_COOLDOWN -> {} // Message sent by TeleportManager - case SUCCESS_INSTANT -> ctx.sendMessage(MessageUtil.success(player, MessageKeys.Home.TELEPORTED)); + case SUCCESS_INSTANT -> ctx.sendMessage(MessageUtil.success(player, CommandKeys.Home.TELEPORTED)); case SUCCESS_WARMUP -> {} // Message sent by TeleportManager, teleport executed by TerritoryTickingSystem default -> {} } diff --git a/src/main/java/com/hyperfactions/command/teleport/SetHomeSubCommand.java b/src/main/java/com/hyperfactions/command/teleport/SetHomeSubCommand.java index 40f43c99..ceaf8269 100644 --- a/src/main/java/com/hyperfactions/command/teleport/SetHomeSubCommand.java +++ b/src/main/java/com/hyperfactions/command/teleport/SetHomeSubCommand.java @@ -8,7 +8,7 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.ChunkUtil; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -42,12 +42,12 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.SETHOME)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.SETHOME_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.SETHOME_NO_PERMISSION)); return; } if (!ConfigManager.get().isWorldAllowed(currentWorld.getName())) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.SETHOME_WORLD_NOT_ALLOWED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.SETHOME_WORLD_NOT_ALLOWED)); return; } @@ -68,7 +68,7 @@ protected void execute(@NotNull CommandContext ctx, UUID claimOwner = hyperFactions.getClaimManager().getClaimOwner(currentWorld.getName(), chunkX, chunkZ); if (claimOwner == null || !claimOwner.equals(faction.id())) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.NOT_IN_TERRITORY)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.NOT_IN_TERRITORY)); return; } @@ -80,12 +80,12 @@ protected void execute(@NotNull CommandContext ctx, FactionManager.FactionResult result = hyperFactions.getFactionManager().setHome(faction.id(), home, player.getUuid()); if (result == FactionManager.FactionResult.SUCCESS) { - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Home.SET)); - broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.Home.SETHOME_BROADCAST, player.getUsername())); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Home.SET)); + broadcastToFaction(faction.id(), MessageUtil.success(player, CommandKeys.Home.SETHOME_BROADCAST, player.getUsername())); } else if (result == FactionManager.FactionResult.NOT_OFFICER) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.SETHOME_NOT_OFFICER)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.SETHOME_NOT_OFFICER)); } else { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.SETHOME_FAILED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.SETHOME_FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/territory/ClaimSubCommand.java b/src/main/java/com/hyperfactions/command/territory/ClaimSubCommand.java index ce30da3d..bd289fef 100644 --- a/src/main/java/com/hyperfactions/command/territory/ClaimSubCommand.java +++ b/src/main/java/com/hyperfactions/command/territory/ClaimSubCommand.java @@ -9,7 +9,8 @@ import com.hyperfactions.manager.ClaimManager; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.ChunkUtil; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -43,7 +44,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.CLAIM)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.NO_PERMISSION)); return; } @@ -72,7 +73,7 @@ protected void execute(@NotNull CommandContext ctx, if (playerFactionId != null && playerFactionId.equals(chunkOwner) && !fctx.isTextMode()) { Player playerEntity = store.getComponent(ref, Player.getComponentType()); if (playerEntity != null) { - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Claim.ALREADY_YOURS, COLOR_GRAY)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Claim.ALREADY_YOURS, COLOR_GRAY)); hyperFactions.getGuiManager().openChunkMap(playerEntity, ref, store, player); return; } @@ -82,9 +83,9 @@ protected void execute(@NotNull CommandContext ctx, if (chunkOwner != null && !chunkOwner.equals(playerFactionId) && !fctx.isTextMode()) { boolean isAlly = playerFactionId != null && hyperFactions.getRelationManager().areAllies(playerFactionId, chunkOwner); if (isAlly) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.CANNOT_CLAIM_ALLY)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.CANNOT_CLAIM_ALLY)); } else { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.ALREADY_CLAIMED_HINT)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.ALREADY_CLAIMED_HINT)); } Player playerEntity = store.getComponent(ref, Player.getComponentType()); if (playerEntity != null) { @@ -100,7 +101,7 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Claim.SUCCESS, chunkX, chunkZ)); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Claim.SUCCESS, chunkX, chunkZ)); // Show map after claiming (if not text mode) if (!fctx.isTextMode()) { Player playerEntity = store.getComponent(ref, Player.getComponentType()); @@ -109,16 +110,16 @@ protected void execute(@NotNull CommandContext ctx, } } } - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); - case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.NOT_OFFICER)); - case ALREADY_CLAIMED_SELF -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.ALREADY_YOURS)); - case ALREADY_CLAIMED_OTHER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.ALREADY_CLAIMED)); - case MAX_CLAIMS_REACHED -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.MAX_CLAIMS)); - case NOT_ADJACENT -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.NOT_CONNECTED)); - case WORLD_NOT_ALLOWED -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.WORLD_NOT_ALLOWED)); - case ORBISGUARD_PROTECTED -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.ORBISGUARD)); - case ZONE_PROTECTED -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.ZONE_PROTECTED)); - default -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.FAILED)); + case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); + case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.NOT_OFFICER)); + case ALREADY_CLAIMED_SELF -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.ALREADY_YOURS)); + case ALREADY_CLAIMED_OTHER -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.ALREADY_CLAIMED)); + case MAX_CLAIMS_REACHED -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.MAX_CLAIMS)); + case NOT_ADJACENT -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.NOT_CONNECTED)); + case WORLD_NOT_ALLOWED -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.WORLD_NOT_ALLOWED)); + case ORBISGUARD_PROTECTED -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.ORBISGUARD)); + case ZONE_PROTECTED -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.ZONE_PROTECTED)); + default -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/territory/OverclaimSubCommand.java b/src/main/java/com/hyperfactions/command/territory/OverclaimSubCommand.java index 96fb5374..5c84c00a 100644 --- a/src/main/java/com/hyperfactions/command/territory/OverclaimSubCommand.java +++ b/src/main/java/com/hyperfactions/command/territory/OverclaimSubCommand.java @@ -9,7 +9,8 @@ import com.hyperfactions.manager.ClaimManager; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.ChunkUtil; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -42,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.OVERCLAIM)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.OVERCLAIM_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.OVERCLAIM_NO_PERMISSION)); return; } @@ -69,7 +70,7 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Claim.OVERCLAIMED)); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Claim.OVERCLAIMED)); // Show map after overclaiming (if not text mode) if (!fctx.isTextMode()) { Player playerEntity = store.getComponent(ref, Player.getComponentType()); @@ -78,14 +79,14 @@ protected void execute(@NotNull CommandContext ctx, } } } - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); - case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.OVERCLAIM_NOT_OFFICER)); - case CHUNK_NOT_CLAIMED -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.OVERCLAIM_NOT_CLAIMED)); - case ALREADY_CLAIMED_SELF -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.OVERCLAIM_OWN)); - case ALREADY_CLAIMED_ALLY -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.OVERCLAIM_ALLY)); - case TARGET_HAS_POWER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.TARGET_HAS_POWER)); - case MAX_CLAIMS_REACHED -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.MAX_CLAIMS)); - default -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.OVERCLAIM_FAILED)); + case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); + case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.OVERCLAIM_NOT_OFFICER)); + case CHUNK_NOT_CLAIMED -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.OVERCLAIM_NOT_CLAIMED)); + case ALREADY_CLAIMED_SELF -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.OVERCLAIM_OWN)); + case ALREADY_CLAIMED_ALLY -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.OVERCLAIM_ALLY)); + case TARGET_HAS_POWER -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.TARGET_HAS_POWER)); + case MAX_CLAIMS_REACHED -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.MAX_CLAIMS)); + default -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.OVERCLAIM_FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/territory/StuckSubCommand.java b/src/main/java/com/hyperfactions/command/territory/StuckSubCommand.java index 85acaa86..c6fbe0e6 100644 --- a/src/main/java/com/hyperfactions/command/territory/StuckSubCommand.java +++ b/src/main/java/com/hyperfactions/command/territory/StuckSubCommand.java @@ -5,7 +5,7 @@ import com.hyperfactions.command.FactionSubCommand; import com.hyperfactions.config.ConfigManager; import com.hyperfactions.data.Faction; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.manager.TeleportManager; import com.hyperfactions.platform.HyperFactionsPlugin; @@ -49,7 +49,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.STUCK)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.STUCK_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.STUCK_NO_PERMISSION)); return; } @@ -69,20 +69,20 @@ protected void execute(@NotNull CommandContext ctx, Faction playerFaction = hyperFactions.getFactionManager().getPlayerFaction(playerUuid); if (claimOwner == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.STUCK_NOT_STUCK)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.STUCK_NOT_STUCK)); return; } // Combat check if (hyperFactions.getCombatTagManager().isTagged(playerUuid)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.STUCK_COMBAT_TAGGED)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.STUCK_COMBAT_TAGGED)); return; } // Find nearest safe chunk int[] safeChunk = findNearestSafeChunk(currentWorld.getName(), chunkX, chunkZ); if (safeChunk == null) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.STUCK_NO_SAFE)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Home.STUCK_NO_SAFE)); return; } @@ -114,7 +114,7 @@ protected void execute(@NotNull CommandContext ctx, "Teleported to safety!" ); - ctx.sendMessage(MessageUtil.info(player, MessageKeys.Home.STUCK_TELEPORTING, COLOR_YELLOW, warmupSeconds)); + ctx.sendMessage(MessageUtil.info(player, CommandKeys.Home.STUCK_TELEPORTING, COLOR_YELLOW, warmupSeconds)); } /** diff --git a/src/main/java/com/hyperfactions/command/territory/UnclaimSubCommand.java b/src/main/java/com/hyperfactions/command/territory/UnclaimSubCommand.java index ebc90d48..90d7a4f6 100644 --- a/src/main/java/com/hyperfactions/command/territory/UnclaimSubCommand.java +++ b/src/main/java/com/hyperfactions/command/territory/UnclaimSubCommand.java @@ -9,7 +9,8 @@ import com.hyperfactions.manager.ClaimManager; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.ChunkUtil; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -42,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.UNCLAIM)) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.UNCLAIM_NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.UNCLAIM_NO_PERMISSION)); return; } @@ -69,7 +70,7 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { - ctx.sendMessage(MessageUtil.success(player, MessageKeys.Claim.UNCLAIMED, chunkX, chunkZ)); + ctx.sendMessage(MessageUtil.success(player, CommandKeys.Claim.UNCLAIMED, chunkX, chunkZ)); // Show map after unclaiming (if not text mode) if (!fctx.isTextMode()) { Player playerEntity = store.getComponent(ref, Player.getComponentType()); @@ -78,13 +79,13 @@ protected void execute(@NotNull CommandContext ctx, } } } - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); - case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.UNCLAIM_NOT_OFFICER)); - case CHUNK_NOT_CLAIMED -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.CHUNK_NOT_CLAIMED)); - case NOT_YOUR_CLAIM -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.NOT_YOUR_CLAIM)); - case CANNOT_UNCLAIM_HOME -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.CANNOT_UNCLAIM_HOME)); - case WOULD_DISCONNECT -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.WOULD_DISCONNECT)); - default -> ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.UNCLAIM_FAILED)); + case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.NOT_IN_FACTION)); + case NOT_OFFICER -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.UNCLAIM_NOT_OFFICER)); + case CHUNK_NOT_CLAIMED -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.CHUNK_NOT_CLAIMED)); + case NOT_YOUR_CLAIM -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.NOT_YOUR_CLAIM)); + case CANNOT_UNCLAIM_HOME -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.CANNOT_UNCLAIM_HOME)); + case WOULD_DISCONNECT -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.WOULD_DISCONNECT)); + default -> ctx.sendMessage(MessageUtil.error(player, CommandKeys.Claim.UNCLAIM_FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/ui/GuiSubCommand.java b/src/main/java/com/hyperfactions/command/ui/GuiSubCommand.java index bc6a200f..2ee66963 100644 --- a/src/main/java/com/hyperfactions/command/ui/GuiSubCommand.java +++ b/src/main/java/com/hyperfactions/command/ui/GuiSubCommand.java @@ -4,7 +4,7 @@ import com.hyperfactions.Permissions; import com.hyperfactions.command.FactionSubCommand; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -37,13 +37,13 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(playerRef, Permissions.USE)) { - ctx.sendMessage(MessageUtil.error(playerRef, MessageKeys.Common.NO_PERMISSION)); + ctx.sendMessage(MessageUtil.error(playerRef, CommonKeys.Common.NO_PERMISSION)); return; } Player player = store.getComponent(ref, Player.getComponentType()); if (player == null) { - ctx.sendMessage(MessageUtil.error(playerRef, MessageKeys.Common.ERROR_GENERIC)); + ctx.sendMessage(MessageUtil.error(playerRef, CommonKeys.Common.ERROR_GENERIC)); return; } diff --git a/src/main/java/com/hyperfactions/command/ui/SettingsSubCommand.java b/src/main/java/com/hyperfactions/command/ui/SettingsSubCommand.java index 9f0ae37a..2145e782 100644 --- a/src/main/java/com/hyperfactions/command/ui/SettingsSubCommand.java +++ b/src/main/java/com/hyperfactions/command/ui/SettingsSubCommand.java @@ -6,7 +6,7 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -54,7 +54,7 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isOfficerOrHigher()) { - ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.MUST_BE_OFFICER)); + ctx.sendMessage(MessageUtil.error(player, CommonKeys.Common.MUST_BE_OFFICER)); return; } diff --git a/src/main/java/com/hyperfactions/data/Faction.java b/src/main/java/com/hyperfactions/data/Faction.java index 29b8a181..c5d89f74 100644 --- a/src/main/java/com/hyperfactions/data/Faction.java +++ b/src/main/java/com/hyperfactions/data/Faction.java @@ -1,7 +1,7 @@ package com.hyperfactions.data; import com.hyperfactions.util.LegacyColorParser; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import java.util.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -76,7 +76,7 @@ public static Faction create(@NotNull String name, @NotNull UUID leaderUuid, @No List logs = new ArrayList<>(); logs.add(FactionLog.create(FactionLog.LogType.MEMBER_JOIN, leaderName + " created the faction", leaderUuid, - MessageKeys.LogsGui.MSG_FACTION_CREATED, leaderName)); + GuiKeys.LogsGui.MSG_FACTION_CREATED, leaderName)); return new Faction( UUID.randomUUID(), diff --git a/src/main/java/com/hyperfactions/economy/UpkeepProcessor.java b/src/main/java/com/hyperfactions/economy/UpkeepProcessor.java index 3332ef09..4ae56c8b 100644 --- a/src/main/java/com/hyperfactions/economy/UpkeepProcessor.java +++ b/src/main/java/com/hyperfactions/economy/UpkeepProcessor.java @@ -12,7 +12,7 @@ import com.hyperfactions.integration.economy.VaultEconomyProvider; import com.hyperfactions.util.ErrorHandler; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.List; @@ -152,7 +152,7 @@ public void processUpkeep() { logToFaction(faction.id(), FactionLog.LogType.ECONOMY, String.format("Upkeep paid: %s (%d billable chunks)", economyManager.formatCurrency(cost), billableChunks), - MessageKeys.LogsGui.MSG_UPKEEP_PAID, economyManager.formatCurrency(cost), String.valueOf(billableChunks)); + GuiKeys.LogsGui.MSG_UPKEEP_PAID, economyManager.formatCurrency(cost), String.valueOf(billableChunks)); paid++; Logger.debugEconomy("Upkeep paid for %s: %s (%d billable chunks)", faction.name(), economyManager.formatCurrency(cost), billableChunks); @@ -207,7 +207,7 @@ private FactionEconomy handlePaymentFailure(@NotNull Faction faction, @NotNull F "#FFAA00"); logToFaction(faction.id(), FactionLog.LogType.ECONOMY, "Upkeep failed: grace period started (" + config.getUpkeepGracePeriodHours() + "h)", - MessageKeys.LogsGui.MSG_UPKEEP_GRACE_STARTED, String.valueOf(config.getUpkeepGracePeriodHours())); + GuiKeys.LogsGui.MSG_UPKEEP_GRACE_STARTED, String.valueOf(config.getUpkeepGracePeriodHours())); Logger.info("[Upkeep] Grace started for %s: %s (missed: %d)", faction.name(), reason, missed); return updated; @@ -229,7 +229,7 @@ private FactionEconomy handlePaymentFailure(@NotNull Faction faction, @NotNull F "#FFAA00"); logToFaction(faction.id(), FactionLog.LogType.ECONOMY, "Upkeep missed (payment " + missed + "), grace expires in " + remaining, - MessageKeys.LogsGui.MSG_UPKEEP_MISSED, String.valueOf(missed), remaining); + GuiKeys.LogsGui.MSG_UPKEEP_MISSED, String.valueOf(missed), remaining); Logger.debugEconomy("Grace continues for %s: %s remaining (missed: %d)", faction.name(), remaining, missed); @@ -254,7 +254,7 @@ private FactionEconomy handlePaymentFailure(@NotNull Faction faction, @NotNull F if (current != null) { Faction logged = current.withLog(FactionLog.create(FactionLog.LogType.UNCLAIM, String.format("Lost %d claim(s) to upkeep (missed %d payments)", removed, missed), null, - MessageKeys.LogsGui.MSG_CLAIMS_LOST_UPKEEP, String.valueOf(removed), String.valueOf(missed))); + GuiKeys.LogsGui.MSG_CLAIMS_LOST_UPKEEP, String.valueOf(removed), String.valueOf(missed))); factionManager.updateFaction(logged); } diff --git a/src/main/java/com/hyperfactions/gui/AdminPageOpener.java b/src/main/java/com/hyperfactions/gui/AdminPageOpener.java index 42461b9e..70ca052c 100644 --- a/src/main/java/com/hyperfactions/gui/AdminPageOpener.java +++ b/src/main/java/com/hyperfactions/gui/AdminPageOpener.java @@ -2,7 +2,7 @@ import com.hyperfactions.HyperFactions; import com.hyperfactions.Permissions; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionMember; import com.hyperfactions.data.FactionRole; @@ -311,7 +311,7 @@ public void openAdminEconomy(Player player, Ref ref, try { EconomyManager econ = guiManager.getPlugin().get().getEconomyManager(); if (econ == null) { - player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ECON_NOT_ENABLED)); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ECON_NOT_ENABLED)); return; } PageManager pageManager = player.getPageManager(); @@ -344,7 +344,7 @@ public void openAdminEconomyAdjust(Player player, Ref ref, try { EconomyManager econ = guiManager.getPlugin().get().getEconomyManager(); if (econ == null) { - player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ECON_NOT_ENABLED)); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ECON_NOT_ENABLED)); return; } PageManager pageManager = player.getPageManager(); @@ -372,7 +372,7 @@ public void openAdminBulkEconomy(Player player, Ref ref, try { EconomyManager econ = guiManager.getPlugin().get().getEconomyManager(); if (econ == null) { - player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ECON_NOT_ENABLED)); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ECON_NOT_ENABLED)); return; } PageManager pageManager = player.getPageManager(); diff --git a/src/main/java/com/hyperfactions/gui/FactionPageOpener.java b/src/main/java/com/hyperfactions/gui/FactionPageOpener.java index dc0cef77..c9d42f94 100644 --- a/src/main/java/com/hyperfactions/gui/FactionPageOpener.java +++ b/src/main/java/com/hyperfactions/gui/FactionPageOpener.java @@ -2,7 +2,7 @@ import com.hyperfactions.HyperFactions; import com.hyperfactions.Permissions; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionMember; import com.hyperfactions.data.FactionRole; @@ -731,7 +731,7 @@ public void openFactionTreasury(Player player, Ref ref, try { EconomyManager econ = guiManager.getPlugin().get().getEconomyManager(); if (econ == null) { - player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, GuiKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); return; } PageManager pageManager = player.getPageManager(); @@ -767,7 +767,7 @@ public void openTreasuryDepositModal(Player player, Ref ref, try { EconomyManager econ = guiManager.getPlugin().get().getEconomyManager(); if (econ == null) { - player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, GuiKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); return; } var page = new TreasuryDepositModalPage(playerRef, guiManager.getFactionManager().get(), econ, @@ -788,7 +788,7 @@ public void openTreasuryTransferSearch(Player player, Ref ref, try { EconomyManager econ = guiManager.getPlugin().get().getEconomyManager(); if (econ == null) { - player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, GuiKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); return; } var page = new TreasuryTransferSearchPage(playerRef, guiManager.getFactionManager().get(), econ, @@ -810,7 +810,7 @@ public void openTreasuryTransferConfirm(Player player, Ref ref, try { EconomyManager econ = guiManager.getPlugin().get().getEconomyManager(); if (econ == null) { - player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, GuiKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); return; } var page = new TreasuryTransferConfirmPage(playerRef, guiManager.getFactionManager().get(), econ, @@ -831,7 +831,7 @@ public void openTreasurySettings(Player player, Ref ref, try { EconomyManager econ = guiManager.getPlugin().get().getEconomyManager(); if (econ == null) { - player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, GuiKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); return; } var page = new TreasurySettingsPage(playerRef, guiManager.getFactionManager().get(), econ, guiManager, faction); diff --git a/src/main/java/com/hyperfactions/gui/GuiManager.java b/src/main/java/com/hyperfactions/gui/GuiManager.java index af6ed713..da734049 100644 --- a/src/main/java/com/hyperfactions/gui/GuiManager.java +++ b/src/main/java/com/hyperfactions/gui/GuiManager.java @@ -18,7 +18,8 @@ import com.hyperfactions.gui.shared.page.*; import com.hyperfactions.manager.*; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.entity.entities.Player; @@ -110,7 +111,7 @@ private void registerPages() { // If player has faction, show enhanced dashboard; otherwise show main page registry.registerEntry(new Entry( "dashboard", - MessageKeys.Nav.DASHBOARD, + GuiKeys.Nav.DASHBOARD, null, // No permission required (player, ref, store, playerRef, faction, guiManager) -> { if (faction != null) { @@ -128,7 +129,7 @@ private void registerPages() { // Chat page (faction/ally chat history with send-from-GUI) registry.registerEntry(new Entry( "chat", - MessageKeys.Nav.CHAT, + GuiKeys.Nav.CHAT, Permissions.CHAT_FACTION, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -149,7 +150,7 @@ private void registerPages() { // Members page registry.registerEntry(new Entry( "members", - MessageKeys.Nav.MEMBERS, + GuiKeys.Nav.MEMBERS, Permissions.MEMBERS, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -165,7 +166,7 @@ private void registerPages() { // Invites page (officers+ only) - shows outgoing invites and incoming join requests registry.registerEntry(new Entry( "invites", - MessageKeys.Nav.INVITES, + GuiKeys.Nav.INVITES, Permissions.INVITE, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -183,7 +184,7 @@ private void registerPages() { // Browser page registry.registerEntry(new Entry( "browser", - MessageKeys.Nav.BROWSER, + GuiKeys.Nav.BROWSER, null, (player, ref, store, playerRef, faction, guiManager) -> new FactionBrowserPage(playerRef, factionManager.get(), powerManager.get(), guiManager), @@ -195,7 +196,7 @@ private void registerPages() { // Map page registry.registerEntry(new Entry( "map", - MessageKeys.Nav.MAP, + GuiKeys.Nav.MAP, Permissions.MAP, (player, ref, store, playerRef, faction, guiManager) -> new ChunkMapPage(playerRef, factionManager.get(), claimManager.get(), @@ -208,7 +209,7 @@ private void registerPages() { // Leaderboard page registry.registerEntry(new Entry( "leaderboard", - MessageKeys.Nav.LEADERBOARD, + GuiKeys.Nav.LEADERBOARD, null, (player, ref, store, playerRef, faction, guiManager) -> { EconomyManager econ = plugin.get().isTreasuryEnabled() ? plugin.get().getEconomyManager() : null; @@ -222,7 +223,7 @@ private void registerPages() { // Relations page registry.registerEntry(new Entry( "relations", - MessageKeys.Nav.RELATIONS, + GuiKeys.Nav.RELATIONS, Permissions.RELATIONS, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -240,7 +241,7 @@ private void registerPages() { if (plugin.get().isTreasuryEnabled()) { registry.registerEntry(new Entry( "treasury", - MessageKeys.Nav.TREASURY, + GuiKeys.Nav.TREASURY, Permissions.ECONOMY_BALANCE, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -261,7 +262,7 @@ private void registerPages() { // Settings page (officers+) - unified two-column layout registry.registerEntry(new Entry( "settings", - MessageKeys.Nav.SETTINGS, + GuiKeys.Nav.SETTINGS, null, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -277,7 +278,7 @@ private void registerPages() { // Logs page (faction activity log) registry.registerEntry(new Entry( "logs", - MessageKeys.Nav.LOGS, + GuiKeys.Nav.LOGS, Permissions.LOGS, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -293,7 +294,7 @@ private void registerPages() { // Help page (available to all players in faction nav bar) registry.registerEntry(new Entry( "help", - MessageKeys.Nav.HELP, + GuiKeys.Nav.HELP, null, (player, ref, store, playerRef, faction, guiManager) -> new HelpMainPage(playerRef, guiManager, factionManager.get()), @@ -305,7 +306,7 @@ private void registerPages() { // Player Settings page (registered but NOT in nav bar — rendered separately on far right) registry.registerEntry(new Entry( "player_settings", - MessageKeys.Nav.PLAYER_SETTINGS, + GuiKeys.Nav.PLAYER_SETTINGS, null, (player, ref, store, playerRef, faction, guiManager) -> new PlayerSettingsPage(playerRef, factionManager.get(), @@ -318,7 +319,7 @@ private void registerPages() { // Admin page (requires permission) - accessed via /f admin, not in main nav bar registry.registerEntry(new Entry( "admin", - MessageKeys.Nav.ADMIN, + GuiKeys.Nav.ADMIN, Permissions.ADMIN, (player, ref, store, playerRef, faction, guiManager) -> new AdminMainPage(playerRef, factionManager.get(), powerManager.get(), guiManager), @@ -342,7 +343,7 @@ private void registerNewPlayerPages() { // Browse Factions (default landing page) registry.registerEntry(new NewPlayerPageRegistry.Entry( "browse", - MessageKeys.Nav.BROWSER, + GuiKeys.Nav.BROWSER, null, (player, ref, store, playerRef, guiManager) -> new NewPlayerBrowsePage(playerRef, factionManager.get(), powerManager.get(), @@ -354,7 +355,7 @@ private void registerNewPlayerPages() { // Create Faction (permission checked on actual create action, not nav visibility) registry.registerEntry(new NewPlayerPageRegistry.Entry( "create", - MessageKeys.Nav.CREATE, + GuiKeys.Nav.CREATE, null, (player, ref, store, playerRef, guiManager) -> new CreateFactionPage(playerRef, factionManager.get(), guiManager), @@ -365,7 +366,7 @@ private void registerNewPlayerPages() { // My Invites registry.registerEntry(new NewPlayerPageRegistry.Entry( "invites", - MessageKeys.Nav.INVITES, + GuiKeys.Nav.INVITES, null, (player, ref, store, playerRef, guiManager) -> new InvitesPage(playerRef, factionManager.get(), powerManager.get(), @@ -377,7 +378,7 @@ private void registerNewPlayerPages() { // Territory Map (read-only for new players, always accessible) registry.registerEntry(new NewPlayerPageRegistry.Entry( "map", - MessageKeys.Nav.MAP, + GuiKeys.Nav.MAP, null, (player, ref, store, playerRef, guiManager) -> new NewPlayerMapPage(playerRef, factionManager.get(), claimManager.get(), @@ -389,7 +390,7 @@ private void registerNewPlayerPages() { // Leaderboard (accessible to all players) registry.registerEntry(new NewPlayerPageRegistry.Entry( "leaderboard", - MessageKeys.Nav.LEADERBOARD, + GuiKeys.Nav.LEADERBOARD, null, (player, ref, store, playerRef, guiManager) -> { EconomyManager econ = plugin.get().isTreasuryEnabled() ? plugin.get().getEconomyManager() : null; @@ -402,7 +403,7 @@ private void registerNewPlayerPages() { // Help Page registry.registerEntry(new NewPlayerPageRegistry.Entry( "help", - MessageKeys.Nav.HELP, + GuiKeys.Nav.HELP, null, (player, ref, store, playerRef, guiManager) -> new HelpMainPage(playerRef, guiManager, factionManager.get()), @@ -413,7 +414,7 @@ private void registerNewPlayerPages() { // Player Settings page (registered but NOT in nav bar — rendered separately on far right) registry.registerEntry(new NewPlayerPageRegistry.Entry( "player_settings", - MessageKeys.Nav.PLAYER_SETTINGS, + GuiKeys.Nav.PLAYER_SETTINGS, null, (player, ref, store, playerRef, guiManager) -> new PlayerSettingsPage(playerRef, factionManager.get(), @@ -437,7 +438,7 @@ private void registerAdminPages() { // Dashboard (server-wide stats overview) registry.registerEntry(new AdminPageRegistry.Entry( "dashboard", - MessageKeys.AdminNav.DASHBOARD, + AdminKeys.AdminNav.DASHBOARD, null, (player, ref, store, playerRef, guiManager) -> new AdminDashboardPage(playerRef, plugin.get(), factionManager.get(), powerManager.get(), @@ -449,7 +450,7 @@ private void registerAdminPages() { // Actions page (server-wide quick actions) registry.registerEntry(new AdminPageRegistry.Entry( "actions", - MessageKeys.AdminNav.ACTIONS, + AdminKeys.AdminNav.ACTIONS, null, (player, ref, store, playerRef, guiManager) -> new AdminActionsPage(playerRef, plugin.get().getPlayerStorage(), guiManager, plugin.get()), @@ -460,7 +461,7 @@ private void registerAdminPages() { // Factions page (faction management with expanding rows) registry.registerEntry(new AdminPageRegistry.Entry( "factions", - MessageKeys.AdminNav.FACTIONS, + AdminKeys.AdminNav.FACTIONS, null, (player, ref, store, playerRef, guiManager) -> new AdminFactionsPage(playerRef, factionManager.get(), powerManager.get(), guiManager), @@ -471,7 +472,7 @@ private void registerAdminPages() { // Players page (server-wide player management) registry.registerEntry(new AdminPageRegistry.Entry( "players", - MessageKeys.AdminNav.PLAYERS, + AdminKeys.AdminNav.PLAYERS, Permissions.ADMIN_POWER, (player, ref, store, playerRef, guiManager) -> new AdminPlayersPage(playerRef, factionManager.get(), powerManager.get(), @@ -484,7 +485,7 @@ private void registerAdminPages() { if (plugin.get().isTreasuryEnabled()) { registry.registerEntry(new AdminPageRegistry.Entry( "economy", - MessageKeys.AdminNav.ECONOMY, + AdminKeys.AdminNav.ECONOMY, Permissions.ADMIN_ECONOMY, (player, ref, store, playerRef, guiManager) -> new AdminEconomyPage(playerRef, factionManager.get(), @@ -497,7 +498,7 @@ private void registerAdminPages() { // Zones page registry.registerEntry(new AdminPageRegistry.Entry( "zones", - MessageKeys.AdminNav.ZONES, + AdminKeys.AdminNav.ZONES, null, (player, ref, store, playerRef, guiManager) -> new AdminZonePage(playerRef, zoneManager.get(), guiManager, "all", 0), @@ -508,7 +509,7 @@ private void registerAdminPages() { // Config page (placeholder) registry.registerEntry(new AdminPageRegistry.Entry( "config", - MessageKeys.AdminNav.CONFIG, + AdminKeys.AdminNav.CONFIG, null, (player, ref, store, playerRef, guiManager) -> new AdminConfigPage(playerRef, guiManager), @@ -519,7 +520,7 @@ private void registerAdminPages() { // Backups page (placeholder) registry.registerEntry(new AdminPageRegistry.Entry( "backups", - MessageKeys.AdminNav.BACKUPS, + AdminKeys.AdminNav.BACKUPS, null, (player, ref, store, playerRef, guiManager) -> new AdminBackupsPage(playerRef, guiManager), @@ -530,7 +531,7 @@ private void registerAdminPages() { // Activity Log page (global log aggregation) registry.registerEntry(new AdminPageRegistry.Entry( "log", - MessageKeys.AdminNav.LOG, + AdminKeys.AdminNav.LOG, null, (player, ref, store, playerRef, guiManager) -> new AdminActivityLogPage(playerRef, factionManager.get(), guiManager), @@ -541,7 +542,7 @@ private void registerAdminPages() { // Updates page (placeholder) registry.registerEntry(new AdminPageRegistry.Entry( "updates", - MessageKeys.AdminNav.UPDATES, + AdminKeys.AdminNav.UPDATES, null, (player, ref, store, playerRef, guiManager) -> new AdminUpdatesPage(playerRef, guiManager), @@ -552,7 +553,7 @@ private void registerAdminPages() { // Help page (placeholder) registry.registerEntry(new AdminPageRegistry.Entry( "help", - MessageKeys.AdminNav.HELP, + AdminKeys.AdminNav.HELP, null, (player, ref, store, playerRef, guiManager) -> new AdminHelpPage(playerRef, guiManager), @@ -563,7 +564,7 @@ private void registerAdminPages() { // Version page (mod versions and integration status) registry.registerEntry(new AdminPageRegistry.Entry( "version", - MessageKeys.AdminNav.VERSION, + AdminKeys.AdminNav.VERSION, null, (player, ref, store, playerRef, guiManager) -> new AdminVersionPage(playerRef, plugin.get(), guiManager), diff --git a/src/main/java/com/hyperfactions/gui/admin/AdminNavBarHelper.java b/src/main/java/com/hyperfactions/gui/admin/AdminNavBarHelper.java index cc0237d9..7141a2df 100644 --- a/src/main/java/com/hyperfactions/gui/admin/AdminNavBarHelper.java +++ b/src/main/java/com/hyperfactions/gui/admin/AdminNavBarHelper.java @@ -3,7 +3,7 @@ import com.hyperfactions.gui.GuiManager; import com.hyperfactions.gui.UIPaths; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; import com.hyperfactions.gui.admin.data.AdminNavAwareData; import com.hyperfactions.gui.shared.NavBarUtil; import com.hypixel.hytale.component.Ref; @@ -52,7 +52,7 @@ public static void setupBar( // Nav bar is included in UI templates via $Nav.@HyperFactionsAdminNavBar // Localize the nav bar title - cmd.set("#AdminNavBarTitleLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.NAV_TITLE)); + cmd.set("#AdminNavBarTitleLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.NAV_TITLE)); // Create admin nav cards container and build buttons using shared utility cmd.appendInline("#HyperFactionsAdminNavBar #AdminNavBarButtons", "Group #AdminNavCards { LayoutMode: Left; }"); diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminActionsPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminActionsPage.java index 525a25a3..9359976d 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminActionsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminActionsPage.java @@ -12,7 +12,7 @@ import com.hyperfactions.util.Logger; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -70,14 +70,14 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "actions", cmd, events); // Localize page title and labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ACTIONS)); - cmd.set("#CombatStatsLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ACT_COMBAT_STATS)); - cmd.set("#CombatDescLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ACT_COMBAT_DESC)); - cmd.set("#EconomyLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ACT_ECONOMY)); - cmd.set("#EconomyDescLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ACT_ECONOMY_DESC)); - cmd.set("#BulkAdjustBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ACT_BULK_ADJUST)); - cmd.set("#UpkeepLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ACT_UPKEEP_COLLECTION)); - cmd.set("#UpkeepDescLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ACT_UPKEEP_DESC)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_ACTIONS)); + cmd.set("#CombatStatsLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ACT_COMBAT_STATS)); + cmd.set("#CombatDescLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ACT_COMBAT_DESC)); + cmd.set("#EconomyLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ACT_ECONOMY)); + cmd.set("#EconomyDescLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ACT_ECONOMY_DESC)); + cmd.set("#BulkAdjustBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ACT_BULK_ADJUST)); + cmd.set("#UpkeepLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ACT_UPKEEP_COLLECTION)); + cmd.set("#UpkeepDescLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ACT_UPKEEP_DESC)); buildContent(cmd, events); } @@ -85,9 +85,9 @@ public void build(Ref ref, UICommandBuilder cmd, private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { // Reset button text depends on confirmation state if (confirmResetKD) { - cmd.set("#ResetAllKDBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ACT_CONFIRM_RESET)); + cmd.set("#ResetAllKDBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ACT_CONFIRM_RESET)); } else { - cmd.set("#ResetAllKDBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ACT_RESET_KD)); + cmd.set("#ResetAllKDBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ACT_RESET_KD)); } // Bind the reset button @@ -108,9 +108,9 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { if (upkeepEnabled) { if (confirmUpkeep) { - cmd.set("#TriggerUpkeepBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ACT_CONFIRM_TRIGGER)); + cmd.set("#TriggerUpkeepBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ACT_CONFIRM_TRIGGER)); } else { - cmd.set("#TriggerUpkeepBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ACT_TRIGGER_UPKEEP)); + cmd.set("#TriggerUpkeepBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ACT_TRIGGER_UPKEEP)); } events.addEventBinding(CustomUIEventBindingType.Activating, "#TriggerUpkeepBtn", EventData.of("Button", "TriggerUpkeep"), false); @@ -146,7 +146,7 @@ public void handleDataEvent(Ref ref, Store store, confirmResetKD = true; UICommandBuilder cmd = new UICommandBuilder(); UIEventBuilder events = new UIEventBuilder(); - cmd.set("#ResetAllKDBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ACT_CONFIRM_RESET)); + cmd.set("#ResetAllKDBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ACT_CONFIRM_RESET)); events.addEventBinding(CustomUIEventBindingType.Activating, "#ResetAllKDBtn", EventData.of("Button", "ResetAllKD"), false); sendUpdate(cmd, events, false); @@ -165,7 +165,7 @@ public void handleDataEvent(Ref ref, Store store, Logger.info("[Admin] %s reset K/D stats for all %d players", playerRef.getUsername(), allUuids.size()); } catch (Exception e) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ACT_KD_RESET_FAILED, e.getMessage())); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.ACT_KD_RESET_FAILED, e.getMessage())); ErrorHandler.report("[Admin] Global K/D reset failed", e); } guiManager.openAdminActions(player, ref, store, playerRef); @@ -179,7 +179,7 @@ public void handleDataEvent(Ref ref, Store store, confirmUpkeep = true; UICommandBuilder cmd = new UICommandBuilder(); UIEventBuilder events = new UIEventBuilder(); - cmd.set("#TriggerUpkeepBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ACT_CONFIRM_TRIGGER)); + cmd.set("#TriggerUpkeepBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ACT_CONFIRM_TRIGGER)); events.addEventBinding(CustomUIEventBindingType.Activating, "#TriggerUpkeepBtn", EventData.of("Button", "TriggerUpkeep"), false); sendUpdate(cmd, events, false); @@ -187,15 +187,15 @@ public void handleDataEvent(Ref ref, Store store, confirmUpkeep = false; UpkeepProcessor processor = plugin.getUpkeepProcessor(); if (processor == null) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ACT_UPKEEP_UNAVAILABLE)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.ACT_UPKEEP_UNAVAILABLE)); } else { try { processor.processUpkeep(); - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ACT_UPKEEP_TRIGGERED)); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.ACT_UPKEEP_TRIGGERED)); Logger.info("[Admin] %s manually triggered upkeep collection via GUI", playerRef.getUsername()); } catch (Exception e) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ACT_UPKEEP_FAILED, e.getMessage())); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.ACT_UPKEEP_FAILED, e.getMessage())); ErrorHandler.report("[Admin] Manual upkeep trigger failed", e); } } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java index f067e5ac..6e38282c 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java @@ -1,7 +1,8 @@ package com.hyperfactions.gui.admin.page; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionLog; @@ -64,10 +65,10 @@ private record GlobalLogEntry( ) {} private enum TimeFilter { - HOUR_1(MessageKeys.AdminGui.LOG_TIME_1H, 3600_000L), - HOUR_24(MessageKeys.AdminGui.LOG_TIME_24H, 86400_000L), - DAY_7(MessageKeys.AdminGui.LOG_TIME_7D, 604800_000L), - ALL(MessageKeys.AdminGui.LOG_TIME_ALL, Long.MAX_VALUE); + HOUR_1(AdminGuiKeys.AdminGui.LOG_TIME_1H, 3600_000L), + HOUR_24(AdminGuiKeys.AdminGui.LOG_TIME_24H, 86400_000L), + DAY_7(AdminGuiKeys.AdminGui.LOG_TIME_7D, 604800_000L), + ALL(AdminGuiKeys.AdminGui.LOG_TIME_ALL, Long.MAX_VALUE); private final String messageKey; @@ -100,22 +101,22 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "log", cmd, events); // Localize page title - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ACTIVITY_LOG)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_ACTIVITY_LOG)); // Localize filter labels - cmd.set("#TypeLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_LOG_TYPE)); - cmd.set("#TimeLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_LOG_TIME)); - cmd.set("#PlayerLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_LOG_PLAYER)); + cmd.set("#TypeLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_LOG_TYPE)); + cmd.set("#TimeLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_LOG_TIME)); + cmd.set("#PlayerLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_LOG_PLAYER)); // Localize column headers - cmd.set("#ColTime.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COL_TIME)); - cmd.set("#ColType.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COL_TYPE)); - cmd.set("#ColFaction.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COL_FACTION)); - cmd.set("#ColMessage.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COL_MESSAGE)); + cmd.set("#ColTime.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_COL_TIME)); + cmd.set("#ColType.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_COL_TYPE)); + cmd.set("#ColFaction.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_COL_FACTION)); + cmd.set("#ColMessage.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_COL_MESSAGE)); // Localize pagination buttons - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_NEXT)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_NEXT)); buildLogList(cmd, events); } @@ -125,10 +126,10 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { // Type filter dropdown List typeOptions = new ArrayList<>(); - typeOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.LOG_ALL_TYPES)), "ALL")); + typeOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.LOG_ALL_TYPES)), "ALL")); for (FactionLog.LogType type : FactionLog.LogType.values()) { typeOptions.add(new DropdownEntryInfo(LocalizableString.fromString( - HFMessages.get(playerRef, MessageKeys.LogsGui.typeKey(type.name()))), type.name())); + HFMessages.get(playerRef, GuiKeys.LogsGui.typeKey(type.name()))), type.name())); } cmd.set("#TypeDropdown.Entries", typeOptions); cmd.set("#TypeDropdown.Value", filterType != null ? filterType.name() : "ALL"); @@ -172,7 +173,7 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { // === Collect and filter logs === List allLogs = collectGlobalLogs(); - cmd.set("#LogCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ENTRIES_SUFFIX, allLogs.size())); + cmd.set("#LogCount.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ENTRIES_SUFFIX, allLogs.size())); // Calculate pagination int totalPages = Math.max(1, (int) Math.ceil((double) allLogs.size() / LOGS_PER_PAGE)); @@ -196,7 +197,7 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { cmd.set(sel + " #LogTime.Text", formatRelativeTime(entry.log.timestamp())); // Type with color (localized) - cmd.set(sel + " #LogType.Text", HFMessages.get(playerRef, MessageKeys.LogsGui.typeKey(entry.log.type().name()))); + cmd.set(sel + " #LogType.Text", HFMessages.get(playerRef, GuiKeys.LogsGui.typeKey(entry.log.type().name()))); cmd.set(sel + " #LogType.Style.TextColor", GuiColors.forLogType(entry.log.type())); // Faction name with color @@ -216,12 +217,12 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { // Empty state if (index == 0) { cmd.appendInline("#LogList", - "Label { Text: \"" + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_LOG_NO_LOGS) + "\"; " + "Label { Text: \"" + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_LOG_NO_LOGS) + "\"; " + "Style: (FontSize: 11, TextColor: #555555); Anchor: (Height: 30); }"); } // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -369,19 +370,19 @@ public void handleDataEvent(Ref ref, Store store, private String formatRelativeTime(long timestamp) { long diff = System.currentTimeMillis() - timestamp; if (diff < 60_000) { - return HFMessages.get(playerRef, MessageKeys.LogsGui.TIME_JUST_NOW); + return HFMessages.get(playerRef, GuiKeys.LogsGui.TIME_JUST_NOW); } else if (diff < 3600_000) { long m = TimeUnit.MILLISECONDS.toMinutes(diff); - return HFMessages.get(playerRef, m == 1 ? MessageKeys.LogsGui.TIME_MINUTE : MessageKeys.LogsGui.TIME_MINUTES, m); + return HFMessages.get(playerRef, m == 1 ? GuiKeys.LogsGui.TIME_MINUTE : GuiKeys.LogsGui.TIME_MINUTES, m); } else if (diff < 86400_000) { long h = TimeUnit.MILLISECONDS.toHours(diff); - return HFMessages.get(playerRef, h == 1 ? MessageKeys.LogsGui.TIME_HOUR : MessageKeys.LogsGui.TIME_HOURS, h); + return HFMessages.get(playerRef, h == 1 ? GuiKeys.LogsGui.TIME_HOUR : GuiKeys.LogsGui.TIME_HOURS, h); } else if (diff < 604800_000) { long d = TimeUnit.MILLISECONDS.toDays(diff); - return HFMessages.get(playerRef, d == 1 ? MessageKeys.LogsGui.TIME_DAY : MessageKeys.LogsGui.TIME_DAYS, d); + return HFMessages.get(playerRef, d == 1 ? GuiKeys.LogsGui.TIME_DAY : GuiKeys.LogsGui.TIME_DAYS, d); } else if (diff < 2592000_000L) { long w = TimeUnit.MILLISECONDS.toDays(diff) / 7; - return HFMessages.get(playerRef, w == 1 ? MessageKeys.LogsGui.TIME_WEEK : MessageKeys.LogsGui.TIME_WEEKS, w); + return HFMessages.get(playerRef, w == 1 ? GuiKeys.LogsGui.TIME_WEEK : GuiKeys.LogsGui.TIME_WEEKS, w); } else { return TimeUtil.formatDate(timestamp); } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminBackupsPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminBackupsPage.java index f0f02a28..d6cfd352 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminBackupsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminBackupsPage.java @@ -5,7 +5,7 @@ import com.hyperfactions.gui.admin.AdminNavBarHelper; import com.hyperfactions.gui.admin.data.AdminBackupsData; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -43,11 +43,11 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "backups", cmd, events); // Localize page title and labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_BACKUPS)); - cmd.set("#ComingSoon.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BACKUP_HEADING)); - cmd.set("#ComingSoonSub.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COMING_SOON)); - cmd.set("#Description.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BACKUP_DESC1)); - cmd.set("#Description2.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BACKUP_DESC2)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_BACKUPS)); + cmd.set("#ComingSoon.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_BACKUP_HEADING)); + cmd.set("#ComingSoonSub.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_COMING_SOON)); + cmd.set("#Description.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_BACKUP_DESC1)); + cmd.set("#Description2.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_BACKUP_DESC2)); } /** Handles data event. */ diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminBulkEconomyPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminBulkEconomyPage.java index 851097a3..46fe39f5 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminBulkEconomyPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminBulkEconomyPage.java @@ -1,7 +1,8 @@ package com.hyperfactions.gui.admin.page; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.api.EconomyAPI; import com.hyperfactions.data.Faction; @@ -65,15 +66,15 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "actions", cmd, events); // Localize labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_BULK_ECONOMY)); - cmd.set("#SectionHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BULK_HEADER)); - cmd.set("#FactionsInfoLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BULK_FACTIONS_LABEL)); - cmd.set("#TotalBalanceInfoLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BULK_TOTAL_LABEL)); - cmd.set("#AmountLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BULK_AMOUNT_HINT)); - cmd.set("#HintLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BULK_HINT)); - cmd.set("#WarningLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BULK_WARNING_MSG)); - cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BULK_APPLY_ALL)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BACK)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_BULK_ECONOMY)); + cmd.set("#SectionHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_BULK_HEADER)); + cmd.set("#FactionsInfoLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_BULK_FACTIONS_LABEL)); + cmd.set("#TotalBalanceInfoLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_BULK_TOTAL_LABEL)); + cmd.set("#AmountLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_BULK_AMOUNT_HINT)); + cmd.set("#HintLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_BULK_HINT)); + cmd.set("#WarningLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_BULK_WARNING_MSG)); + cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_BULK_APPLY_ALL)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.BACK)); int factionCount = economyManager.getFactionEconomyCount(); BigDecimal totalBalance = economyManager.getServerTotalBalance(); @@ -128,7 +129,7 @@ public void handleDataEvent(Ref ref, Store store, } if (amount.compareTo(BigDecimal.ZERO) == 0) { - showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_AMOUNT_ZERO)); + showError(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ECON_AMOUNT_ZERO)); return; } @@ -179,13 +180,13 @@ public void handleDataEvent(Ref ref, Store store, private BigDecimal parseAmountOrError(String amount) { if (amount == null || amount.isBlank()) { - showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_ENTER_AMOUNT)); + showError(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ECON_ENTER_AMOUNT)); return null; } try { return new BigDecimal(amount.trim()); } catch (NumberFormatException e) { - showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_INVALID_NUMBER, amount)); + showError(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ECON_INVALID_NUMBER, amount)); return null; } } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminConfigPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminConfigPage.java index 76d45751..a7b453a3 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminConfigPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminConfigPage.java @@ -5,7 +5,7 @@ import com.hyperfactions.gui.admin.AdminNavBarHelper; import com.hyperfactions.gui.admin.data.AdminConfigData; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -43,11 +43,11 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "config", cmd, events); // Localize page title and labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_CONFIG)); - cmd.set("#ComingSoon.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CONFIG_HEADING)); - cmd.set("#ComingSoonSub.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COMING_SOON)); - cmd.set("#Description.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CONFIG_DESC1)); - cmd.set("#Description2.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CONFIG_DESC2)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_CONFIG)); + cmd.set("#ComingSoon.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CONFIG_HEADING)); + cmd.set("#ComingSoonSub.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_COMING_SOON)); + cmd.set("#Description.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CONFIG_DESC1)); + cmd.set("#Description2.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CONFIG_DESC2)); } /** Handles data event. */ diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminDashboardPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminDashboardPage.java index e83721ca..2f50c90d 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminDashboardPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminDashboardPage.java @@ -1,7 +1,8 @@ package com.hyperfactions.gui.admin.page; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.HyperFactions; import com.hyperfactions.data.*; @@ -71,19 +72,19 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "dashboard", cmd, events); // Localize page title and stat labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_DASHBOARD)); - cmd.set("#ServerStatsLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_DASH_SERVER_STATS)); - cmd.set("#FactionsLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_DASH_FACTIONS)); - cmd.set("#TotalMembersLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_DASH_TOTAL_MEMBERS)); - cmd.set("#TotalClaimsLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_DASH_TOTAL_CLAIMS)); - cmd.set("#ZonesLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_DASH_ZONES)); - cmd.set("#SafeWarLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_DASH_SAFE_WAR)); - cmd.set("#TotalPowerLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_DASH_TOTAL_POWER)); - cmd.set("#AvgPowerLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_DASH_AVG_POWER)); - cmd.set("#TotalEconomyLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_DASH_TOTAL_ECONOMY)); - cmd.set("#WealthiestLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_DASH_WEALTHIEST)); - cmd.set("#AvgBalanceLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_DASH_AVG_BALANCE)); - cmd.set("#BypassLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_DASH_PROTECTION_BYPASS)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_DASHBOARD)); + cmd.set("#ServerStatsLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_DASH_SERVER_STATS)); + cmd.set("#FactionsLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_DASH_FACTIONS)); + cmd.set("#TotalMembersLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_DASH_TOTAL_MEMBERS)); + cmd.set("#TotalClaimsLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_DASH_TOTAL_CLAIMS)); + cmd.set("#ZonesLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_DASH_ZONES)); + cmd.set("#SafeWarLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_DASH_SAFE_WAR)); + cmd.set("#TotalPowerLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_DASH_TOTAL_POWER)); + cmd.set("#AvgPowerLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_DASH_AVG_POWER)); + cmd.set("#TotalEconomyLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_DASH_TOTAL_ECONOMY)); + cmd.set("#WealthiestLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_DASH_WEALTHIEST)); + cmd.set("#AvgBalanceLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_DASH_AVG_BALANCE)); + cmd.set("#BypassLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_DASH_PROTECTION_BYPASS)); // Calculate server-wide statistics Collection allFactions = factionManager.getAllFactions(); @@ -130,7 +131,7 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.set("#TotalEconomy.Text", econ.formatCurrencyCompact(total)); // Find wealthiest faction - String wealthiestName = HFMessages.get(playerRef, MessageKeys.Common.NONE); + String wealthiestName = HFMessages.get(playerRef, CommonKeys.Common.NONE); java.math.BigDecimal wealthiestBalance = java.math.BigDecimal.ZERO; for (Faction f : allFactions) { java.math.BigDecimal balance = econ.getFactionBalance(f.id()); @@ -145,9 +146,9 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup bypass toggle boolean bypassEnabled = plugin.isAdminBypassEnabled(playerRef.getUuid()); - cmd.set("#BypassState.Text", bypassEnabled ? HFMessages.get(playerRef, MessageKeys.AdminGui.ON) : HFMessages.get(playerRef, MessageKeys.AdminGui.OFF)); + cmd.set("#BypassState.Text", bypassEnabled ? HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ON) : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.OFF)); cmd.set("#BypassState.Style.TextColor", bypassEnabled ? "#55FF55" : "#FF5555"); - cmd.set("#ToggleBypassBtn.Text", bypassEnabled ? HFMessages.get(playerRef, MessageKeys.AdminGui.DISABLE_BTN) : HFMessages.get(playerRef, MessageKeys.AdminGui.ENABLE_BTN)); + cmd.set("#ToggleBypassBtn.Text", bypassEnabled ? HFMessages.get(playerRef, AdminGuiKeys.AdminGui.DISABLE_BTN) : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ENABLE_BTN)); events.addEventBinding( CustomUIEventBindingType.Activating, @@ -191,9 +192,9 @@ private void rebuildBypassSection(boolean bypassEnabled) { UIEventBuilder events = new UIEventBuilder(); // Update bypass state display - cmd.set("#BypassState.Text", bypassEnabled ? HFMessages.get(playerRef, MessageKeys.AdminGui.ON) : HFMessages.get(playerRef, MessageKeys.AdminGui.OFF)); + cmd.set("#BypassState.Text", bypassEnabled ? HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ON) : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.OFF)); cmd.set("#BypassState.Style.TextColor", bypassEnabled ? "#55FF55" : "#FF5555"); - cmd.set("#ToggleBypassBtn.Text", bypassEnabled ? HFMessages.get(playerRef, MessageKeys.AdminGui.DISABLE_BTN) : HFMessages.get(playerRef, MessageKeys.AdminGui.ENABLE_BTN)); + cmd.set("#ToggleBypassBtn.Text", bypassEnabled ? HFMessages.get(playerRef, AdminGuiKeys.AdminGui.DISABLE_BTN) : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ENABLE_BTN)); // Re-bind the toggle button event events.addEventBinding( diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminDisbandConfirmPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminDisbandConfirmPage.java index 6c657f11..96287c0d 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminDisbandConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminDisbandConfirmPage.java @@ -7,7 +7,9 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -60,11 +62,11 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.DISBAND_CONFIRM); // Localize labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.DISBAND_TITLE)); - cmd.set("#ConfirmText.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.DISBAND_PROMPT)); - cmd.set("#WarningText.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.DISBAND_WARNING)); - cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.CANCEL)); - cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.DISBAND)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.DISBAND_TITLE)); + cmd.set("#ConfirmText.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.DISBAND_PROMPT)); + cmd.set("#WarningText.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.DISBAND_WARNING)); + cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.CANCEL)); + cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.DISBAND)); // Set faction name in the modal cmd.set("#FactionName.Text", factionName); @@ -109,7 +111,7 @@ public void handleDataEvent(Ref ref, Store store, // Re-fetch faction to verify it still exists Faction faction = factionManager.getFaction(factionId); if (faction == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.DISBAND_FACTION_GONE)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.DISBAND_FACTION_GONE)); guiManager.openAdminMain(player, ref, store, playerRef); return; } @@ -119,12 +121,12 @@ public void handleDataEvent(Ref ref, Store store, if (leaderId != null) { FactionManager.FactionResult result = factionManager.disbandFaction(factionId, leaderId); if (result == FactionManager.FactionResult.SUCCESS) { - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.DISBAND_SUCCESS, factionName)); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.DISBAND_SUCCESS, factionName)); } else { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.DISBAND_FAILED, result)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.DISBAND_FAILED, result)); } } else { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.DISBAND_NO_LEADER)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.DISBAND_NO_LEADER)); } // Return to admin page (will show updated list) diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyAdjustPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyAdjustPage.java index afe099b6..010f438b 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyAdjustPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyAdjustPage.java @@ -1,7 +1,8 @@ package com.hyperfactions.gui.admin.page; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.api.EconomyAPI; import com.hyperfactions.data.Faction; @@ -70,23 +71,23 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "economy", cmd, events); // Localize labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ECONOMY_ADJUST)); - cmd.set("#SectionHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECADJ_HEADER)); - cmd.set("#FactionLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECADJ_FACTION_LABEL)); - cmd.set("#CurrentBalanceLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECADJ_CURRENT_BALANCE)); - cmd.set("#AmountLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECADJ_AMOUNT_HINT)); - cmd.set("#HintText.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECADJ_PREVIEW_HINT)); - cmd.set("#AdjustmentLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECADJ_ADJUSTMENT)); - cmd.set("#NewBalanceLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECADJ_NEW_BALANCE)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BACK)); - cmd.set("#SetBalanceBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECADJ_SET_BALANCE)); - cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECADJ_CONFIRM)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_ECONOMY_ADJUST)); + cmd.set("#SectionHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECADJ_HEADER)); + cmd.set("#FactionLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECADJ_FACTION_LABEL)); + cmd.set("#CurrentBalanceLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECADJ_CURRENT_BALANCE)); + cmd.set("#AmountLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECADJ_AMOUNT_HINT)); + cmd.set("#HintText.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECADJ_PREVIEW_HINT)); + cmd.set("#AdjustmentLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECADJ_ADJUSTMENT)); + cmd.set("#NewBalanceLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECADJ_NEW_BALANCE)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.BACK)); + cmd.set("#SetBalanceBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECADJ_SET_BALANCE)); + cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECADJ_CONFIRM)); // Get faction info Faction faction = factionManager.getFaction(factionId); if (faction == null) { - cmd.set("#TargetFactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); - cmd.set("#CurrentBalance.Text", HFMessages.get(playerRef, MessageKeys.Common.NA)); + cmd.set("#TargetFactionName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); + cmd.set("#CurrentBalance.Text", HFMessages.get(playerRef, CommonKeys.Common.NA)); return; } @@ -152,7 +153,7 @@ public void handleDataEvent(Ref ref, Store store, } if (amount.compareTo(BigDecimal.ZERO) == 0) { - showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_AMOUNT_ZERO)); + showError(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ECON_AMOUNT_ZERO)); return; } @@ -167,7 +168,7 @@ public void handleDataEvent(Ref ref, Store store, .thenAccept(result -> handleResult(result, player, ref, store, playerRef)) .exceptionally(ex -> { ErrorHandler.report(String.format("Admin economy adjust failed for faction %s", factionId), ex); - showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_ERROR)); + showError(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ECON_ERROR)); return null; }); } @@ -179,7 +180,7 @@ public void handleDataEvent(Ref ref, Store store, } if (newBalance.compareTo(BigDecimal.ZERO) < 0) { - showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_BALANCE_NEGATIVE)); + showError(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ECON_BALANCE_NEGATIVE)); return; } @@ -190,7 +191,7 @@ public void handleDataEvent(Ref ref, Store store, .thenAccept(result -> handleResult(result, player, ref, store, playerRef)) .exceptionally(ex -> { ErrorHandler.report(String.format("Admin economy set balance failed for faction %s", factionId), ex); - showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_ERROR)); + showError(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ECON_ERROR)); return null; }); } @@ -206,13 +207,13 @@ public void handleDataEvent(Ref ref, Store store, */ private @Nullable BigDecimal parseAmountOrError(@Nullable String amount) { if (amount == null || amount.isBlank()) { - showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_ENTER_AMOUNT)); + showError(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ECON_ENTER_AMOUNT)); return null; } try { return new BigDecimal(amount.trim()); } catch (NumberFormatException e) { - showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_INVALID_NUMBER, amount)); + showError(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ECON_INVALID_NUMBER, amount)); return null; } } @@ -225,7 +226,7 @@ private void handleResult(EconomyAPI.TransactionResult result, guiManager.openAdminEconomy(player, ref, store, playerRef); } else { Logger.debugEconomy("Admin economy operation failed for faction %s: %s", factionId, result.name()); - showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_FAILED, result.name())); + showError(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ECON_FAILED, result.name())); } } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java index 273fc261..94cd1613 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java @@ -1,7 +1,8 @@ package com.hyperfactions.gui.admin.page; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionEconomy; @@ -81,31 +82,31 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "economy", cmd, events); // Localize page title - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ECONOMY)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_ECONOMY)); // Localize stat card labels - cmd.set("#TotalBalanceLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECON_TOTAL_BALANCE)); - cmd.set("#FactionsLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECON_FACTIONS)); - cmd.set("#AvgBalanceLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECON_AVG_BALANCE)); + cmd.set("#TotalBalanceLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECON_TOTAL_BALANCE)); + cmd.set("#FactionsLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECON_FACTIONS)); + cmd.set("#AvgBalanceLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECON_AVG_BALANCE)); // Localize upkeep stat labels - cmd.set("#InGraceLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECON_IN_GRACE)); - cmd.set("#CollectedLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECON_COLLECTED)); - cmd.set("#NextCollectionLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECON_NEXT_COLLECTION)); + cmd.set("#InGraceLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECON_IN_GRACE)); + cmd.set("#CollectedLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECON_COLLECTED)); + cmd.set("#NextCollectionLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECON_NEXT_COLLECTION)); // Localize search/sort labels - cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SEARCH)); - cmd.set("#SortLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SORT)); + cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SEARCH)); + cmd.set("#SortLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SORT)); // Localize column headers - cmd.set("#ColFaction.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COL_FACTION)); - cmd.set("#ColBalance.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COL_BALANCE)); - cmd.set("#ColMembers.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COL_MEMBERS)); - cmd.set("#ColActions.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COL_ACTIONS)); + cmd.set("#ColFaction.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_COL_FACTION)); + cmd.set("#ColBalance.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_COL_BALANCE)); + cmd.set("#ColMembers.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_COL_MEMBERS)); + cmd.set("#ColActions.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_COL_ACTIONS)); // Localize pagination buttons - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_NEXT)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_NEXT)); // === Server Economy Stats === buildServerStats(cmd); @@ -181,7 +182,7 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { // Get sorted/filtered factions List factions = getSortedFactions(); - cmd.set("#FactionCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTIONS_SUFFIX, factions.size())); + cmd.set("#FactionCount.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.FACTIONS_SUFFIX, factions.size())); // Search input if (!searchQuery.isEmpty()) { @@ -196,9 +197,9 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.SORT_BALANCE)), "BALANCE"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.SORT_NAME)), "NAME"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.SORT_MEMBERS)), "MEMBERS") + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.SORT_BALANCE)), "BALANCE"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.SORT_NAME)), "NAME"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.SORT_MEMBERS)), "MEMBERS") )); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding( @@ -228,8 +229,8 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { cmd.set(sel + " #MemberCount.Text", String.valueOf(entry.faction.getMemberCount())); // Localize entry buttons - cmd.set(sel + " #AdjustBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECON_BTN_ADJUST)); - cmd.set(sel + " #ViewBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECON_BTN_INFO)); + cmd.set(sel + " #AdjustBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECON_BTN_ADJUST)); + cmd.set(sel + " #ViewBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECON_BTN_INFO)); // Upkeep status indicator if (com.hyperfactions.config.ConfigManager.get().isUpkeepEnabled()) { @@ -271,12 +272,12 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { // Empty state if (index == 0) { cmd.appendInline("#FactionList", - "Label { Text: \"" + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECON_NO_DATA) + "\"; " + "Label { Text: \"" + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ECON_NO_DATA) + "\"; " + "Style: (FontSize: 11, TextColor: #555555); Anchor: (Height: 30); }"); } // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java index affdaaa3..65f570b9 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java @@ -1,7 +1,9 @@ package com.hyperfactions.gui.admin.page; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.config.ConfigManager; import com.hyperfactions.data.Faction; @@ -83,43 +85,43 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); // Localize page title - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_FACTION_INFO)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_FACTION_INFO)); // Localize stat card labels - cmd.set("#PowerCardLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_POWER)); - cmd.set("#PowerSubLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_CURRENT_MAX)); - cmd.set("#ClaimsCardLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_CLAIMS)); - cmd.set("#ClaimsSubLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_CLAIMED_MAX)); - cmd.set("#MembersCardLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_MEMBERS)); - cmd.set("#RelationsCardLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_RELATIONS)); - cmd.set("#RelationsSubLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ALLY_ENEMY)); - cmd.set("#StatusCardLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_STATUS)); - cmd.set("#InfoCardLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_INFO)); - cmd.set("#TreasurySubLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_TREASURY_BALANCE)); + cmd.set("#PowerCardLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_POWER)); + cmd.set("#PowerSubLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_CURRENT_MAX)); + cmd.set("#ClaimsCardLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_CLAIMS)); + cmd.set("#ClaimsSubLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_CLAIMED_MAX)); + cmd.set("#MembersCardLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_MEMBERS)); + cmd.set("#RelationsCardLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_RELATIONS)); + cmd.set("#RelationsSubLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ALLY_ENEMY)); + cmd.set("#StatusCardLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_STATUS)); + cmd.set("#InfoCardLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_INFO)); + cmd.set("#TreasurySubLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_TREASURY_BALANCE)); // Localize section headers - cmd.set("#LeadershipHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_LEADERSHIP)); - cmd.set("#LeaderLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_LEADER_LABEL)); - cmd.set("#OfficersLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_OFFICERS_LABEL)); - cmd.set("#PowerMgmtHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_POWER_MANAGEMENT)); - cmd.set("#EconMgmtHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ECON_MGMT)); - cmd.set("#DangerZoneHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_DANGER_ZONE)); + cmd.set("#LeadershipHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_LEADERSHIP)); + cmd.set("#LeaderLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_LEADER_LABEL)); + cmd.set("#OfficersLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_OFFICERS_LABEL)); + cmd.set("#PowerMgmtHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_POWER_MANAGEMENT)); + cmd.set("#EconMgmtHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ECON_MGMT)); + cmd.set("#DangerZoneHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_DANGER_ZONE)); // Localize button labels - cmd.set("#PowerResetAll.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_RESET_ALL_POWER)); - cmd.set("#EconAdjustBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ECON_ADJUST)); - cmd.set("#EconViewLogBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_VIEW_TREASURY)); - cmd.set("#DisbandBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_DISBAND)); - cmd.set("#ViewMembersBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_VIEW_MEMBERS)); - cmd.set("#ViewRelationsBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_VIEW_RELATIONS)); - cmd.set("#ViewSettingsBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_VIEW_SETTINGS)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BACK)); + cmd.set("#PowerResetAll.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_RESET_ALL_POWER)); + cmd.set("#EconAdjustBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ECON_ADJUST)); + cmd.set("#EconViewLogBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_VIEW_TREASURY)); + cmd.set("#DisbandBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_DISBAND)); + cmd.set("#ViewMembersBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_VIEW_MEMBERS)); + cmd.set("#ViewRelationsBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_VIEW_RELATIONS)); + cmd.set("#ViewSettingsBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_VIEW_SETTINGS)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.BACK)); // Get the faction Faction faction = factionManager.getFaction(factionId); if (faction == null) { - cmd.set("#FactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); - cmd.set("#FactionDescription.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.INFO_FACTION_GONE)); + cmd.set("#FactionName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); + cmd.set("#FactionDescription.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.INFO_FACTION_GONE)); return; } @@ -137,10 +139,10 @@ public void build(Ref ref, UICommandBuilder cmd, // Description String description = faction.description(); cmd.set("#FactionDescription.Text", - description != null && !description.isEmpty() ? description : HFMessages.get(playerRef, MessageKeys.AdminGui.NO_DESCRIPTION)); + description != null && !description.isEmpty() ? description : HFMessages.get(playerRef, CommonKeys.Common.NO_DESCRIPTION)); // Open/Closed status indicator - cmd.set("#StatusIndicator.Text", faction.open() ? HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) : HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)); + cmd.set("#StatusIndicator.Text", faction.open() ? HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_OPEN) : HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_INVITE_ONLY)); // === Stats Section === PowerManager.FactionPowerStats powerStats = powerManager.getFactionPowerStats(faction.id()); @@ -157,7 +159,7 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.set("#MembersValue.Text", String.format("%d / %d", memberCount, maxMembers)); // Recruitment status - cmd.set("#RecruitmentValue.Text", faction.open() ? HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) : HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)); + cmd.set("#RecruitmentValue.Text", faction.open() ? HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_OPEN) : HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_INVITE_ONLY)); // Founded date cmd.set("#FoundedValue.Text", TimeUtil.formatRelative(faction.createdAt())); @@ -170,28 +172,28 @@ public void build(Ref ref, UICommandBuilder cmd, // Raidable status if (powerStats.isRaidable()) { - cmd.set("#RaidableValue.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.RAIDABLE)); + cmd.set("#RaidableValue.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.RAIDABLE)); } else { - cmd.set("#RaidableValue.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.PROTECTED)); + cmd.set("#RaidableValue.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.PROTECTED)); } // === Leadership Section === FactionMember leader = faction.getLeader(); - cmd.set("#LeaderName.Text", leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN)); + cmd.set("#LeaderName.Text", leader != null ? leader.username() : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN)); // Officers List officers = faction.getMembersSorted().stream() .filter(m -> m.role() == FactionRole.OFFICER) .toList(); if (officers.isEmpty()) { - cmd.set("#OfficersValue.Text", HFMessages.get(playerRef, MessageKeys.Common.NONE)); + cmd.set("#OfficersValue.Text", HFMessages.get(playerRef, CommonKeys.Common.NONE)); } else { String officerNames = officers.stream() .map(FactionMember::username) .limit(3) .collect(Collectors.joining(", ")); if (officers.size() > 3) { - officerNames += " " + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_INFO_MORE, officers.size() - 3); + officerNames += " " + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_INFO_MORE, officers.size() - 3); } cmd.set("#OfficersValue.Text", officerNames); } @@ -327,7 +329,7 @@ public void handleDataEvent(Ref ref, Store store, Faction updated = faction.withLog(FactionLog.create(FactionLog.LogType.ADMIN_POWER, "Admin adjusted all " + faction.getMemberCount() + " members' power by " + String.format("%.1f", delta), playerRef.getUuid(), - MessageKeys.LogsGui.MSG_ADMIN_POWER_ADJUSTED_ALL, String.valueOf(faction.getMemberCount()), String.format("%.1f", delta))); + GuiKeys.LogsGui.MSG_ADMIN_POWER_ADJUSTED_ALL, String.valueOf(faction.getMemberCount()), String.format("%.1f", delta))); factionManager.updateFaction(updated); // Rebuild page to show updated stats guiManager.openAdminFactionInfo(player, ref, store, playerRef, factionId); @@ -344,7 +346,7 @@ public void handleDataEvent(Ref ref, Store store, Faction updated = faction.withLog(FactionLog.create(FactionLog.LogType.ADMIN_POWER, "Admin reset power for all " + faction.getMemberCount() + " members", playerRef.getUuid(), - MessageKeys.LogsGui.MSG_ADMIN_POWER_RESET_ALL, String.valueOf(faction.getMemberCount()))); + GuiKeys.LogsGui.MSG_ADMIN_POWER_RESET_ALL, String.valueOf(faction.getMemberCount()))); factionManager.updateFaction(updated); guiManager.openAdminFactionInfo(player, ref, store, playerRef, factionId); } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java index 335aeb96..8619d996 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java @@ -11,7 +11,9 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.TimeUtil; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; @@ -80,17 +82,17 @@ public void build(Ref ref, UICommandBuilder cmd, UIEventBuilder eve AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); // Localize page title and labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_FACTION_MEMBERS)); - cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SEARCH)); - cmd.set("#SortLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SORT)); - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_NEXT)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BACK)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_FACTION_MEMBERS)); + cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SEARCH)); + cmd.set("#SortLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SORT)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_NEXT)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.BACK)); Faction faction = factionManager.getFaction(factionId); if (faction == null) { - cmd.set("#FactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); - cmd.set("#MemberCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.MEMBERS_SUFFIX, 0)); + cmd.set("#FactionName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); + cmd.set("#MemberCount.Text", HFMessages.get(playerRef, CommonKeys.Common.MEMBER_COUNT, 0)); return; } cmd.set("#FactionName.Text", faction.name()); @@ -99,8 +101,8 @@ public void build(Ref ref, UICommandBuilder cmd, UIEventBuilder eve private void buildMemberList(UICommandBuilder cmd, UIEventBuilder events, Faction faction) { List allMembers = getFilteredSortedMembers(faction); - cmd.set("#MemberCount.Text", searchQuery.isEmpty() ? HFMessages.get(playerRef, MessageKeys.AdminGui.MEMBERS_SUFFIX, allMembers.size()) : HFMessages.get(playerRef, MessageKeys.AdminGui.FOUND_SUFFIX, allMembers.size())); - cmd.set("#SortDropdown.Entries", List.of(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.MEM_SORT_ROLE)), "ROLE"), new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.MEM_SORT_ONLINE)), "ONLINE"), new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.MEM_SORT_NAME)), "NAME"), new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.MEM_SORT_POWER)), "POWER"))); + cmd.set("#MemberCount.Text", searchQuery.isEmpty() ? HFMessages.get(playerRef, CommonKeys.Common.MEMBER_COUNT, allMembers.size()) : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.FOUND_SUFFIX, allMembers.size())); + cmd.set("#SortDropdown.Entries", List.of(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.MEM_SORT_ROLE)), "ROLE"), new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.MEM_SORT_ONLINE)), "ONLINE"), new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.MEM_SORT_NAME)), "NAME"), new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.MEM_SORT_POWER)), "POWER"))); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding(CustomUIEventBindingType.ValueChanged, "#SortDropdown", EventData.of("Button", "SortChanged").append("@SortMode", "#SortDropdown.Value"), false); events.addEventBinding(CustomUIEventBindingType.ValueChanged, "#SearchInput", EventData.of("Button", "SearchChanged").append("@SearchQuery", "#SearchInput.Value"), false); @@ -115,7 +117,7 @@ private void buildMemberList(UICommandBuilder cmd, UIEventBuilder events, Factio buildMemberEntry(cmd, events, i, allMembers.get(idx)); i++; } - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding(CustomUIEventBindingType.Activating, "#PrevBtn", EventData.of("Button", "PrevPage").append("Page", String.valueOf(currentPage - 1)), false); } @@ -130,20 +132,20 @@ private void buildMemberEntry(UICommandBuilder cmd, UIEventBuilder events, int i cmd.append("#IndexCards", UIPaths.ADMIN_FACTION_MEMBERS_ENTRY); String idx = "#IndexCards[" + index + "]"; // Localize entry labels and buttons - cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MEM_LABEL_POWER)); - cmd.set(idx + " #JoinedLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MEM_LABEL_JOINED)); - cmd.set(idx + " #LastDeathLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MEM_LABEL_LAST_DEATH)); - cmd.set(idx + " #UuidLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MEM_LABEL_UUID)); - cmd.set(idx + " #ViewInfoBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MEM_BTN_INFO)); - cmd.set(idx + " #TeleportBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MEM_BTN_TELEPORT)); - cmd.set(idx + " #PromoteBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MEM_BTN_PROMOTE)); - cmd.set(idx + " #DemoteBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MEM_BTN_DEMOTE)); - cmd.set(idx + " #KickBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MEM_BTN_KICK)); + cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MEM_LABEL_POWER)); + cmd.set(idx + " #JoinedLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MEM_LABEL_JOINED)); + cmd.set(idx + " #LastDeathLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MEM_LABEL_LAST_DEATH)); + cmd.set(idx + " #UuidLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MEM_LABEL_UUID)); + cmd.set(idx + " #ViewInfoBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MEM_BTN_INFO)); + cmd.set(idx + " #TeleportBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MEM_BTN_TELEPORT)); + cmd.set(idx + " #PromoteBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MEM_BTN_PROMOTE)); + cmd.set(idx + " #DemoteBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MEM_BTN_DEMOTE)); + cmd.set(idx + " #KickBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MEM_BTN_KICK)); cmd.set(idx + " #MemberName.Text", member.username()); cmd.set(idx + " #MemberRole.Text", formatRole(member.role())); cmd.set(idx + " #RoleIndicator.Background.Color", GuiColors.forRole(member.role())); - cmd.set(idx + " #OnlineStatus.Text", memberIsOnline ? HFMessages.get(playerRef, MessageKeys.Common.ONLINE) : HFMessages.get(playerRef, MessageKeys.Common.OFFLINE)); + cmd.set(idx + " #OnlineStatus.Text", memberIsOnline ? HFMessages.get(playerRef, CommonKeys.Common.ONLINE) : HFMessages.get(playerRef, CommonKeys.Common.OFFLINE)); cmd.set(idx + " #OnlineStatus.Style.TextColor", GuiColors.forOnlineStatus(memberIsOnline)); if (!memberIsOnline) { cmd.set(idx + " #LastOnline.Text", formatLastOnline(member.lastOnline())); @@ -157,8 +159,8 @@ private void buildMemberEntry(UICommandBuilder cmd, UIEventBuilder events, int i cmd.set(idx + " #PowerValue.Text", String.format("%.0f/%.0f", power.power(), power.getEffectiveMaxPower())); int powerPercent = power.getPowerPercent(); String powerColor = GuiColors.forPowerLevel(powerPercent); cmd.set(idx + " #PowerValue.Style.TextColor", powerColor); - cmd.set(idx + " #JoinedDate.Text", member.joinedAt() > 0 ? DATE_FORMAT.format(Instant.ofEpochMilli(member.joinedAt())) : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN)); - cmd.set(idx + " #LastDeath.Text", power.lastDeath() > 0 ? HFMessages.get(playerRef, MessageKeys.AdminGui.AGO_SUFFIX, TimeUtil.formatDuration(System.currentTimeMillis() - power.lastDeath())) : HFMessages.get(playerRef, MessageKeys.AdminGui.MEM_NEVER)); + cmd.set(idx + " #JoinedDate.Text", member.joinedAt() > 0 ? DATE_FORMAT.format(Instant.ofEpochMilli(member.joinedAt())) : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN)); + cmd.set(idx + " #LastDeath.Text", power.lastDeath() > 0 ? HFMessages.get(playerRef, AdminGuiKeys.AdminGui.AGO_SUFFIX, TimeUtil.formatDuration(System.currentTimeMillis() - power.lastDeath())) : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.MEM_NEVER)); cmd.set(idx + " #UuidValue.Text", member.uuid().toString()); boolean canPromote = member.role() != FactionRole.LEADER; boolean canDemote = member.role() != FactionRole.MEMBER; boolean canKick = member.role() != FactionRole.LEADER; cmd.set(idx + " #ViewInfoBtn.Visible", true); cmd.set(idx + " #TeleportBtn.Visible", true); @@ -206,9 +208,9 @@ private String formatLastOnline(long lastOnlineMs) { } long diffMs = System.currentTimeMillis() - lastOnlineMs; if (diffMs < 60000) { - return HFMessages.get(playerRef, MessageKeys.AdminGui.JUST_NOW); + return HFMessages.get(playerRef, AdminGuiKeys.AdminGui.JUST_NOW); } - return HFMessages.get(playerRef, MessageKeys.AdminGui.AGO_SUFFIX, TimeUtil.formatDuration(diffMs)); + return HFMessages.get(playerRef, AdminGuiKeys.AdminGui.AGO_SUFFIX, TimeUtil.formatDuration(diffMs)); } /** Handles data event. */ @@ -234,11 +236,11 @@ public void handleDataEvent(Ref ref, Store store, Admi case "PrevPage" -> { currentPage = Math.max(0, data.page); expandedMembers.clear(); rebuildList(); } case "NextPage" -> { currentPage = data.page; expandedMembers.clear(); rebuildList(); } case "Back" -> guiManager.openAdminFactionInfo(player, ref, store, playerRef, factionId); - case "Teleport" -> { if (data.memberUuid != null) { UUID memberUuid = UuidUtil.parseOrNull(data.memberUuid); if (memberUuid == null) { sendUpdate(); return; } PlayerRef targetPlayer = Universe.get().getPlayer(memberUuid); if (targetPlayer != null && targetPlayer.isValid()) { guiManager.closePage(player, ref, store); var targetWorld = Universe.get().getWorld(targetPlayer.getWorldUuid()); if (targetWorld == null) { player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.FAC_WORLD_NOT_FOUND)); return; } var targetTransform = targetPlayer.getTransform(); var targetPos = targetTransform.getPosition(); var targetRot = targetTransform.getRotation(); targetWorld.execute(() -> { var teleport = com.hypixel.hytale.server.core.modules.entity.teleport.Teleport.createForPlayer(targetWorld, targetPos, targetRot); store.addComponent(ref, com.hypixel.hytale.server.core.modules.entity.teleport.Teleport.getComponentType(), teleport); }); player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MEM_TELEPORTED, "#55FF55", data.memberName != null ? data.memberName : "player")); } else { player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.PLR_NOT_ONLINE)); sendUpdate(); } } } - case "Promote" -> { if (data.memberUuid != null) { UUID memberUuid = UuidUtil.parseOrNull(data.memberUuid); if (memberUuid == null) { sendUpdate(); return; } Faction faction = factionManager.getFaction(factionId); if (faction != null) { FactionMember member = faction.getMember(memberUuid); if (member != null && member.role() != FactionRole.LEADER) { FactionRole newRole = member.role() == FactionRole.MEMBER ? FactionRole.OFFICER : FactionRole.LEADER; factionManager.adminSetMemberRole(factionId, memberUuid, newRole); player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.MEM_PROMOTED, data.memberName != null ? data.memberName : "player", formatRole(newRole))); rebuildList(); } } } } - case "Demote" -> { if (data.memberUuid != null) { UUID memberUuid = UuidUtil.parseOrNull(data.memberUuid); if (memberUuid == null) { sendUpdate(); return; } Faction faction = factionManager.getFaction(factionId); if (faction != null) { FactionMember member = faction.getMember(memberUuid); if (member != null && member.role() != FactionRole.MEMBER) { FactionRole newRole = member.role() == FactionRole.LEADER ? FactionRole.OFFICER : FactionRole.MEMBER; factionManager.adminSetMemberRole(factionId, memberUuid, newRole); player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.MEM_DEMOTED, data.memberName != null ? data.memberName : "player", formatRole(newRole))); rebuildList(); } } } } - case "Kick" -> { if (data.memberUuid != null) { UUID memberUuid = UuidUtil.parseOrNull(data.memberUuid); if (memberUuid == null) { sendUpdate(); return; } Faction faction = factionManager.getFaction(factionId); if (faction != null) { FactionMember member = faction.getMember(memberUuid); if (member != null && member.role() != FactionRole.LEADER) { factionManager.adminRemoveMember(factionId, memberUuid); player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.MEM_KICKED, data.memberName != null ? data.memberName : "player")); rebuildList(); } } } } - case "ViewPlayerInfo" -> { if (data.memberUuid != null) { UUID memberUuid = UuidUtil.parseOrNull(data.memberUuid); if (memberUuid == null) { sendUpdate(); return; } String memberName = data.memberName != null ? data.memberName : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); guiManager.openAdminPlayerInfo(player, ref, store, playerRef, memberUuid, memberName, factionId, AdminPlayerInfoPage.Origin.FACTION_MEMBERS); } } + case "Teleport" -> { if (data.memberUuid != null) { UUID memberUuid = UuidUtil.parseOrNull(data.memberUuid); if (memberUuid == null) { sendUpdate(); return; } PlayerRef targetPlayer = Universe.get().getPlayer(memberUuid); if (targetPlayer != null && targetPlayer.isValid()) { guiManager.closePage(player, ref, store); var targetWorld = Universe.get().getWorld(targetPlayer.getWorldUuid()); if (targetWorld == null) { player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.FAC_WORLD_NOT_FOUND)); return; } var targetTransform = targetPlayer.getTransform(); var targetPos = targetTransform.getPosition(); var targetRot = targetTransform.getRotation(); targetWorld.execute(() -> { var teleport = com.hypixel.hytale.server.core.modules.entity.teleport.Teleport.createForPlayer(targetWorld, targetPos, targetRot); store.addComponent(ref, com.hypixel.hytale.server.core.modules.entity.teleport.Teleport.getComponentType(), teleport); }); player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.MEM_TELEPORTED, "#55FF55", data.memberName != null ? data.memberName : "player")); } else { player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.PLR_NOT_ONLINE)); sendUpdate(); } } } + case "Promote" -> { if (data.memberUuid != null) { UUID memberUuid = UuidUtil.parseOrNull(data.memberUuid); if (memberUuid == null) { sendUpdate(); return; } Faction faction = factionManager.getFaction(factionId); if (faction != null) { FactionMember member = faction.getMember(memberUuid); if (member != null && member.role() != FactionRole.LEADER) { FactionRole newRole = member.role() == FactionRole.MEMBER ? FactionRole.OFFICER : FactionRole.LEADER; factionManager.adminSetMemberRole(factionId, memberUuid, newRole); player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.MEM_PROMOTED, data.memberName != null ? data.memberName : "player", formatRole(newRole))); rebuildList(); } } } } + case "Demote" -> { if (data.memberUuid != null) { UUID memberUuid = UuidUtil.parseOrNull(data.memberUuid); if (memberUuid == null) { sendUpdate(); return; } Faction faction = factionManager.getFaction(factionId); if (faction != null) { FactionMember member = faction.getMember(memberUuid); if (member != null && member.role() != FactionRole.MEMBER) { FactionRole newRole = member.role() == FactionRole.LEADER ? FactionRole.OFFICER : FactionRole.MEMBER; factionManager.adminSetMemberRole(factionId, memberUuid, newRole); player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.MEM_DEMOTED, data.memberName != null ? data.memberName : "player", formatRole(newRole))); rebuildList(); } } } } + case "Kick" -> { if (data.memberUuid != null) { UUID memberUuid = UuidUtil.parseOrNull(data.memberUuid); if (memberUuid == null) { sendUpdate(); return; } Faction faction = factionManager.getFaction(factionId); if (faction != null) { FactionMember member = faction.getMember(memberUuid); if (member != null && member.role() != FactionRole.LEADER) { factionManager.adminRemoveMember(factionId, memberUuid); player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.MEM_KICKED, data.memberName != null ? data.memberName : "player")); rebuildList(); } } } } + case "ViewPlayerInfo" -> { if (data.memberUuid != null) { UUID memberUuid = UuidUtil.parseOrNull(data.memberUuid); if (memberUuid == null) { sendUpdate(); return; } String memberName = data.memberName != null ? data.memberName : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); guiManager.openAdminPlayerInfo(player, ref, store, playerRef, memberUuid, memberName, factionId, AdminPlayerInfoPage.Origin.FACTION_MEMBERS); } } default -> sendUpdate(); } } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java index 788fd702..5b91d340 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java @@ -9,7 +9,8 @@ import com.hyperfactions.manager.RelationManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -60,31 +61,31 @@ public void build(Ref ref, UICommandBuilder cmd, UIEventBuilder eve AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); // Localize page title and labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_FACTION_RELATIONS)); - cmd.set("#SubtitleLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_REL_SUBTITLE)); - cmd.set("#SetNewRelationLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_REL_SET_NEW)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BACK)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_FACTION_RELATIONS)); + cmd.set("#SubtitleLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_REL_SUBTITLE)); + cmd.set("#SetNewRelationLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_REL_SET_NEW)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.BACK)); Faction faction = factionManager.getFaction(factionId); if (faction == null) { - cmd.set("#FactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); + cmd.set("#FactionName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); return; } cmd.set("#FactionName.Text", faction.name()); events.addEventBinding(CustomUIEventBindingType.Activating, "#BackBtn", EventData.of("Button", "Back").append("FactionId", factionId.toString()), false); List allies = getRelationsOfType(faction, RelationType.ALLY); List enemies = getRelationsOfType(faction, RelationType.ENEMY); - cmd.set("#AlliesHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.REL_ALLIES_HEADER, allies.size())); + cmd.set("#AlliesHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.REL_ALLIES_HEADER, allies.size())); cmd.clear("#AlliesList"); - if (allies.isEmpty()) { cmd.appendInline("#AlliesList", "Label { Text: \"" + HFMessages.get(playerRef, MessageKeys.AdminGui.REL_NO_ALLIES) + "\"; Style: (FontSize: 11, TextColor: #666666); Anchor: (Height: 24); }"); } + if (allies.isEmpty()) { cmd.appendInline("#AlliesList", "Label { Text: \"" + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.REL_NO_ALLIES) + "\"; Style: (FontSize: 11, TextColor: #666666); Anchor: (Height: 24); }"); } else { for (int i = 0; i < allies.size(); i++) buildRelationEntry(cmd, events, "#AlliesList", i, allies.get(i), "ally"); } - cmd.set("#EnemiesHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.REL_ENEMIES_HEADER, enemies.size())); + cmd.set("#EnemiesHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.REL_ENEMIES_HEADER, enemies.size())); cmd.clear("#EnemiesList"); - if (enemies.isEmpty()) { cmd.appendInline("#EnemiesList", "Label { Text: \"" + HFMessages.get(playerRef, MessageKeys.AdminGui.REL_NO_ENEMIES) + "\"; Style: (FontSize: 11, TextColor: #666666); Anchor: (Height: 24); }"); } + if (enemies.isEmpty()) { cmd.appendInline("#EnemiesList", "Label { Text: \"" + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.REL_NO_ENEMIES) + "\"; Style: (FontSize: 11, TextColor: #666666); Anchor: (Height: 24); }"); } else { for (int i = 0; i < enemies.size(); @@ -97,11 +98,11 @@ private void buildRelationEntry(UICommandBuilder cmd, UIEventBuilder events, Str cmd.append(container, UIPaths.ADMIN_FACTION_RELATIONS_ENTRY); String idx = container + "[" + index + "]"; cmd.set(idx + " #FactionName.Text", entry.factionName); - cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.LEADER_PREFIX, entry.leaderName)); + cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.LEADER_PREFIX, entry.leaderName)); cmd.set(idx + " #DateEstablished.Text", formatDate(entry.sinceMillis)); - cmd.set(idx + " #SetAllyBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_REL_BTN_ALLY)); - cmd.set(idx + " #SetNeutralBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_REL_BTN_NEUTRAL)); - cmd.set(idx + " #SetEnemyBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_REL_BTN_ENEMY)); + cmd.set(idx + " #SetAllyBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_REL_BTN_ALLY)); + cmd.set(idx + " #SetNeutralBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_REL_BTN_NEUTRAL)); + cmd.set(idx + " #SetEnemyBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_REL_BTN_ENEMY)); if ("ally".equals(type)) { events.addEventBinding(CustomUIEventBindingType.Activating, idx + " #SetNeutralBtn", EventData.of("Button", "AdminSetNeutral").append("TargetFactionId", entry.factionId.toString()), false); events.addEventBinding(CustomUIEventBindingType.Activating, idx + " #SetEnemyBtn", EventData.of("Button", "AdminSetEnemy").append("TargetFactionId", entry.factionId.toString()), false); @@ -122,20 +123,20 @@ private void buildSetRelationSection(UICommandBuilder cmd, UIEventBuilder events } } int count = Math.min(5, neutralFactions.size()); - cmd.set("#NeutralCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.REL_NEUTRAL_COUNT, neutralFactions.size())); + cmd.set("#NeutralCount.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.REL_NEUTRAL_COUNT, neutralFactions.size())); cmd.clear("#NeutralList"); for (int i = 0; i < count; i++) { Faction other = neutralFactions.get(i); cmd.append("#NeutralList", UIPaths.ADMIN_FACTION_RELATIONS_ENTRY); String idx = "#NeutralList[" + i + "]"; FactionMember leader = other.getLeader(); - String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); cmd.set(idx + " #FactionName.Text", other.name()); - cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.LEADER_PREFIX, leaderName)); + cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.LEADER_PREFIX, leaderName)); cmd.set(idx + " #DateEstablished.Text", ""); - cmd.set(idx + " #SetAllyBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_REL_BTN_ALLY)); - cmd.set(idx + " #SetNeutralBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_REL_BTN_NEUTRAL)); - cmd.set(idx + " #SetEnemyBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_REL_BTN_ENEMY)); + cmd.set(idx + " #SetAllyBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_REL_BTN_ALLY)); + cmd.set(idx + " #SetNeutralBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_REL_BTN_NEUTRAL)); + cmd.set(idx + " #SetEnemyBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_REL_BTN_ENEMY)); events.addEventBinding(CustomUIEventBindingType.Activating, idx + " #SetAllyBtn", EventData.of("Button", "AdminSetAlly").append("TargetFactionId", other.id().toString()), false); events.addEventBinding(CustomUIEventBindingType.Activating, idx + " #SetEnemyBtn", EventData.of("Button", "AdminSetEnemy").append("TargetFactionId", other.id().toString()), false); } @@ -144,11 +145,11 @@ private void buildSetRelationSection(UICommandBuilder cmd, UIEventBuilder events private String formatDate(long sinceMillis) { long daysSince = ChronoUnit.DAYS.between(Instant.ofEpochMilli(sinceMillis), Instant.now()); if (daysSince == 0) { - return HFMessages.get(playerRef, MessageKeys.AdminGui.REL_SINCE_TODAY); + return HFMessages.get(playerRef, AdminGuiKeys.AdminGui.REL_SINCE_TODAY); } else if (daysSince == 1) { - return HFMessages.get(playerRef, MessageKeys.AdminGui.REL_SINCE_ONE_DAY); + return HFMessages.get(playerRef, AdminGuiKeys.AdminGui.REL_SINCE_ONE_DAY); } else { - return HFMessages.get(playerRef, MessageKeys.AdminGui.REL_SINCE_DAYS, daysSince); + return HFMessages.get(playerRef, AdminGuiKeys.AdminGui.REL_SINCE_DAYS, daysSince); } } @@ -159,7 +160,7 @@ private List getRelationsOfType(Faction faction, RelationType tar Faction other = factionManager.getFaction(relation.targetFactionId()); if (other != null) { FactionMember leader = other.getLeader(); - String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); entries.add(new RelationEntry(other.id(), other.name(), leaderName, relation.since())); } } @@ -189,9 +190,9 @@ public void handleDataEvent(Ref ref, Store store, Admi } switch (data.button) { case "Back" -> guiManager.openAdminFactionInfo(player, ref, store, playerRef, factionId); - case "AdminSetAlly" -> { if (data.targetFactionId != null) { UUID targetId = UuidUtil.parseOrNull(data.targetFactionId); if (targetId == null) { player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); return; } Faction target = factionManager.getFaction(targetId); String targetName = target != null ? target.name() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); RelationManager.RelationResult result = relationManager.adminSetRelation(factionId, targetId, RelationType.ALLY); if (result == RelationManager.RelationResult.SUCCESS) player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.REL_SET_ALLY, MessageUtil.COLOR_BLUE, targetName)); else player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.REL_FAILED, result)); refresh(player, ref, store, playerRef); } } - case "AdminSetEnemy" -> { if (data.targetFactionId != null) { UUID targetId = UuidUtil.parseOrNull(data.targetFactionId); if (targetId == null) { player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); return; } Faction target = factionManager.getFaction(targetId); String targetName = target != null ? target.name() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); RelationManager.RelationResult result = relationManager.adminSetRelation(factionId, targetId, RelationType.ENEMY); if (result == RelationManager.RelationResult.SUCCESS) player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.REL_SET_ENEMY, targetName)); else player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.REL_FAILED, result)); refresh(player, ref, store, playerRef); } } - case "AdminSetNeutral" -> { if (data.targetFactionId != null) { UUID targetId = UuidUtil.parseOrNull(data.targetFactionId); if (targetId == null) { player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); return; } Faction target = factionManager.getFaction(targetId); String targetName = target != null ? target.name() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); RelationManager.RelationResult result = relationManager.adminSetRelation(factionId, targetId, RelationType.NEUTRAL); if (result == RelationManager.RelationResult.SUCCESS) player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.REL_SET_NEUTRAL, "#888888", targetName)); else player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.REL_FAILED, result)); refresh(player, ref, store, playerRef); } } + case "AdminSetAlly" -> { if (data.targetFactionId != null) { UUID targetId = UuidUtil.parseOrNull(data.targetFactionId); if (targetId == null) { player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.INVALID_FACTION)); return; } Faction target = factionManager.getFaction(targetId); String targetName = target != null ? target.name() : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); RelationManager.RelationResult result = relationManager.adminSetRelation(factionId, targetId, RelationType.ALLY); if (result == RelationManager.RelationResult.SUCCESS) player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.REL_SET_ALLY, MessageUtil.COLOR_BLUE, targetName)); else player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.REL_FAILED, result)); refresh(player, ref, store, playerRef); } } + case "AdminSetEnemy" -> { if (data.targetFactionId != null) { UUID targetId = UuidUtil.parseOrNull(data.targetFactionId); if (targetId == null) { player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.INVALID_FACTION)); return; } Faction target = factionManager.getFaction(targetId); String targetName = target != null ? target.name() : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); RelationManager.RelationResult result = relationManager.adminSetRelation(factionId, targetId, RelationType.ENEMY); if (result == RelationManager.RelationResult.SUCCESS) player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.REL_SET_ENEMY, targetName)); else player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.REL_FAILED, result)); refresh(player, ref, store, playerRef); } } + case "AdminSetNeutral" -> { if (data.targetFactionId != null) { UUID targetId = UuidUtil.parseOrNull(data.targetFactionId); if (targetId == null) { player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.INVALID_FACTION)); return; } Faction target = factionManager.getFaction(targetId); String targetName = target != null ? target.name() : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); RelationManager.RelationResult result = relationManager.adminSetRelation(factionId, targetId, RelationType.NEUTRAL); if (result == RelationManager.RelationResult.SUCCESS) player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.REL_SET_NEUTRAL, "#888888", targetName)); else player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.REL_FAILED, result)); refresh(player, ref, store, playerRef); } } default -> sendUpdate(); } } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionSettingsPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionSettingsPage.java index b6dd8d19..03591d37 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionSettingsPage.java @@ -10,7 +10,9 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -67,70 +69,70 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); // Localize page title and labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_FACTION_SETTINGS)); - cmd.set("#EditingLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_EDITING)); - cmd.set("#AdminOverrideLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_ADMIN_OVERRIDE)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_BACK_TO_INFO)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_FACTION_SETTINGS)); + cmd.set("#EditingLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_EDITING)); + cmd.set("#AdminOverrideLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_ADMIN_OVERRIDE)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_BACK_TO_INFO)); // Left column section headers and row labels - cmd.set("#SectionGeneral.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_GENERAL)); - cmd.set("#NameLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_NAME_LABEL)); - cmd.set("#TagLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_TAG_LABEL)); - cmd.set("#DescLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_DESC_LABEL)); - String editText = HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_EDIT); + cmd.set("#SectionGeneral.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_GENERAL)); + cmd.set("#NameLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_NAME_LABEL)); + cmd.set("#TagLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_TAG_LABEL)); + cmd.set("#DescLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_DESC_LABEL)); + String editText = HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_EDIT); cmd.set("#NameEditBtn.Text", editText); cmd.set("#TagEditBtn.Text", editText); cmd.set("#DescEditBtn.Text", editText); - cmd.set("#SectionRecruitment.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_RECRUITMENT)); - cmd.set("#StatusLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_STATUS_LABEL)); - cmd.set("#SectionHome.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_HOME)); - cmd.set("#LocationLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_LOCATION_LABEL)); - cmd.set("#ClearHomeBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_CLEAR_HOME)); - cmd.set("#SectionDangerZone.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_DANGER_ZONE)); - cmd.set("#IrreversibleWarning.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_IRREVERSIBLE)); - cmd.set("#DisbandBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_DISBAND_FACTION)); + cmd.set("#SectionRecruitment.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_RECRUITMENT)); + cmd.set("#StatusLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_STATUS_LABEL)); + cmd.set("#SectionHome.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_HOME)); + cmd.set("#LocationLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_LOCATION_LABEL)); + cmd.set("#ClearHomeBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_CLEAR_HOME)); + cmd.set("#SectionDangerZone.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_DANGER_ZONE)); + cmd.set("#IrreversibleWarning.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_IRREVERSIBLE)); + cmd.set("#DisbandBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_DISBAND_FACTION)); // Middle column - territory permissions - cmd.set("#LockHint.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_LOCK_HINT)); - cmd.set("#SectionTerritoryPerms.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_TERRITORY_PERMS)); - cmd.set("#ColOutsider.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_COL_OUT)); - cmd.set("#ColAlly.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_COL_ALLY)); - cmd.set("#ColMember.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_COL_MEM)); - cmd.set("#ColOfficer.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_COL_OFF)); - cmd.set("#CatBuilding.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_CAT_BUILDING)); - cmd.set("#PermBreak.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_BREAK)); - cmd.set("#PermPlace.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_PLACE)); - cmd.set("#CatInteraction.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_CAT_INTERACTION)); - cmd.set("#CatInteractionSub.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_CAT_INTERACT_SUB)); - cmd.set("#PermAll.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_ALL)); - cmd.set("#PermDoor.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_DOOR)); - cmd.set("#PermChest.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_CHEST)); - cmd.set("#PermBench.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_BENCH)); - cmd.set("#PermProcessing.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_PROCESSING)); - cmd.set("#PermSeat.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_SEAT)); - cmd.set("#PermTransport.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_TRANSPORT)); - cmd.set("#CatOther.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_CAT_OTHER)); - cmd.set("#PermCrateUse.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_CRATE_USE)); - cmd.set("#PermNpcTame.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_NPC_TAME)); - cmd.set("#PermPveDamage.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_PVE_DAMAGE)); + cmd.set("#LockHint.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_LOCK_HINT)); + cmd.set("#SectionTerritoryPerms.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_TERRITORY_PERMS)); + cmd.set("#ColOutsider.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_COL_OUT)); + cmd.set("#ColAlly.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_COL_ALLY)); + cmd.set("#ColMember.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_COL_MEM)); + cmd.set("#ColOfficer.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_COL_OFF)); + cmd.set("#CatBuilding.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_CAT_BUILDING)); + cmd.set("#PermBreak.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_BREAK)); + cmd.set("#PermPlace.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_PLACE)); + cmd.set("#CatInteraction.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_CAT_INTERACTION)); + cmd.set("#CatInteractionSub.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_CAT_INTERACT_SUB)); + cmd.set("#PermAll.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_ALL)); + cmd.set("#PermDoor.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_DOOR)); + cmd.set("#PermChest.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_CHEST)); + cmd.set("#PermBench.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_BENCH)); + cmd.set("#PermProcessing.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_PROCESSING)); + cmd.set("#PermSeat.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_SEAT)); + cmd.set("#PermTransport.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_TRANSPORT)); + cmd.set("#CatOther.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_CAT_OTHER)); + cmd.set("#PermCrateUse.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_CRATE_USE)); + cmd.set("#PermNpcTame.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_NPC_TAME)); + cmd.set("#PermPveDamage.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_PVE_DAMAGE)); // Right column - appearance, mob spawning, faction settings - cmd.set("#SectionAppearance.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_APPEARANCE)); - cmd.set("#ColorLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_COLOR_LABEL)); - cmd.set("#SectionMobSpawning.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_MOB_SPAWNING)); - cmd.set("#SectionMobSpawningSub.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_MOB_SUB)); - cmd.set("#PermMobSpawning.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_MOB_SPAWNING)); - cmd.set("#PermHostile.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_HOSTILE)); - cmd.set("#PermPassive.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_PASSIVE)); - cmd.set("#PermNeutral.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_NEUTRAL)); - cmd.set("#SectionFactionSettings.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_FACTION_SETTINGS)); - cmd.set("#PermPvP.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_PVP)); - cmd.set("#PermOfficersEdit.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET_PERM_OFFICERS_EDIT)); + cmd.set("#SectionAppearance.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_APPEARANCE)); + cmd.set("#ColorLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_COLOR_LABEL)); + cmd.set("#SectionMobSpawning.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_MOB_SPAWNING)); + cmd.set("#SectionMobSpawningSub.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_MOB_SUB)); + cmd.set("#PermMobSpawning.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_MOB_SPAWNING)); + cmd.set("#PermHostile.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_HOSTILE)); + cmd.set("#PermPassive.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_PASSIVE)); + cmd.set("#PermNeutral.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_NEUTRAL)); + cmd.set("#SectionFactionSettings.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_FACTION_SETTINGS)); + cmd.set("#PermPvP.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_PVP)); + cmd.set("#PermOfficersEdit.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET_PERM_OFFICERS_EDIT)); // Get the faction Faction faction = factionManager.getFaction(factionId); if (faction == null) { - cmd.set("#FactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); + cmd.set("#FactionName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); return; } @@ -167,7 +169,7 @@ private void buildGeneralSettings(UICommandBuilder cmd, UIEventBuilder events, F // Tag String tagDisplay = faction.tag() != null && !faction.tag().isEmpty() ? "[" + faction.tag().toUpperCase() + "]" - : HFMessages.get(playerRef, MessageKeys.AdminGui.NONE_PAREN); + : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.NONE_PAREN); cmd.set("#TagValue.Text", tagDisplay); events.addEventBinding( CustomUIEventBindingType.Activating, @@ -179,7 +181,7 @@ private void buildGeneralSettings(UICommandBuilder cmd, UIEventBuilder events, F // Description String desc = faction.description() != null && !faction.description().isEmpty() ? faction.description() - : HFMessages.get(playerRef, MessageKeys.AdminGui.NONE_PAREN); + : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.NONE_PAREN); cmd.set("#DescValue.Text", desc); events.addEventBinding( CustomUIEventBindingType.Activating, @@ -190,8 +192,8 @@ private void buildGeneralSettings(UICommandBuilder cmd, UIEventBuilder events, F // Recruitment dropdown cmd.set("#RecruitmentDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN)), "OPEN"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)), "INVITE_ONLY") + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_OPEN)), "OPEN"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_INVITE_ONLY)), "INVITE_ONLY") )); cmd.set("#RecruitmentDropdown.Value", faction.open() ? "OPEN" : "INVITE_ONLY"); events.addEventBinding( @@ -213,7 +215,7 @@ private void buildGeneralSettings(UICommandBuilder cmd, UIEventBuilder events, F worldName, home.x(), home.y(), home.z()); cmd.set("#HomeLocation.Text", homeText); } else { - cmd.set("#HomeLocation.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.NOT_SET)); + cmd.set("#HomeLocation.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.NOT_SET)); } events.addEventBinding( CustomUIEventBindingType.Activating, @@ -283,7 +285,7 @@ private void buildPermissions(UICommandBuilder cmd, UIEventBuilder events, Facti // PvP toggle buildToggle(cmd, events, "PvPToggle", "pvpEnabled", perms.pvpEnabled(), config, false); - cmd.set("#PvPStatus.Text", perms.pvpEnabled() ? HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_ENABLED) : HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_DISABLED)); + cmd.set("#PvPStatus.Text", perms.pvpEnabled() ? HFMessages.get(playerRef, GuiKeys.SettingsGui.PVP_ENABLED) : HFMessages.get(playerRef, GuiKeys.SettingsGui.PVP_DISABLED)); cmd.set("#PvPStatus.Style.TextColor", perms.pvpEnabled() ? "#55FF55" : "#FF5555"); // Officers can edit @@ -347,7 +349,7 @@ public void handleDataEvent(Ref ref, Store store, Faction faction = factionManager.getFaction(factionId); if (faction == null && !data.button.equals("Back")) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.Common.FACTION_NOT_FOUND)); + player.sendMessage(MessageUtil.adminError(playerRef, CommonKeys.Common.FACTION_NOT_FOUND)); sendUpdate(); return; } @@ -387,7 +389,7 @@ private void handleTogglePerm(Player player, Ref ref, Store ref, Store ref, Store ref, Store ref, Store Faction updatedFaction = faction.withOpen(isOpen); factionManager.updateFaction(updatedFaction); - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.SET_RECRUITMENT_SET, isOpen ? HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) : HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY))); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.SET_RECRUITMENT_SET, isOpen ? HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_OPEN) : HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_INVITE_ONLY))); rebuildPage(); } private void handleClearHome(Player player, Ref ref, Store store, Faction faction) { if (faction.home() == null) { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.SET_NO_HOME, MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.SET_NO_HOME, MessageUtil.COLOR_GOLD)); sendUpdate(); return; } @@ -470,7 +472,7 @@ private void handleClearHome(Player player, Ref ref, Store ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); // Localize page title and common labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_FACTIONS)); - cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SEARCH)); - cmd.set("#SortLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SORT)); - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_NEXT)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_FACTIONS)); + cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SEARCH)); + cmd.set("#SortLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SORT)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_NEXT)); // Build faction list buildFactionList(cmd, events); @@ -106,7 +108,7 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { // Get all factions sorted List factions = getSortedFactions(); - cmd.set("#FactionCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTIONS_SUFFIX, factions.size())); + cmd.set("#FactionCount.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.FACTIONS_SUFFIX, factions.size())); // Search input if (!searchQuery.isEmpty()) { @@ -121,9 +123,9 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.SORT_POWER)), "POWER"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.SORT_NAME)), "NAME"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.SORT_MEMBERS)), "MEMBERS") + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.SORT_POWER)), "POWER"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.SORT_NAME)), "NAME"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.SORT_MEMBERS)), "MEMBERS") )); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding( @@ -152,7 +154,7 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -190,8 +192,8 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int // Leader info FactionMember leader = faction.getLeader(); - String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.NONE); - cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.LEADER_PREFIX, leaderName)); + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, CommonKeys.Common.NONE); + cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.LEADER_PREFIX, leaderName)); // Stats cmd.set(idx + " #PowerDisplay.Text", String.format("%.0f/%.0f", stats.currentPower(), stats.maxPower())); @@ -199,9 +201,9 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int cmd.set(idx + " #MemberCount.Text", String.valueOf(faction.members().size())); // Localize stat labels - cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ENTRY_POWER)); - cmd.set(idx + " #ClaimsLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ENTRY_CLAIMS)); - cmd.set(idx + " #MembersLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ENTRY_MEMBERS)); + cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ENTRY_POWER)); + cmd.set(idx + " #ClaimsLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ENTRY_CLAIMS)); + cmd.set(idx + " #MembersLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ENTRY_MEMBERS)); // Expansion state cmd.set(idx + " #ExpandIcon.Visible", !isExpanded); @@ -220,16 +222,16 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int // Extended info (only set values if expanded) if (isExpanded) { // Localize expanded labels - cmd.set(idx + " #CreatedLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ENTRY_CREATED)); - cmd.set(idx + " #HomeLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ENTRY_HOME)); + cmd.set(idx + " #CreatedLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ENTRY_CREATED)); + cmd.set(idx + " #HomeLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ENTRY_HOME)); // Localize button texts - cmd.set(idx + " #TpHomeBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ENTRY_TP_HOME)); - cmd.set(idx + " #ViewInfoBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ENTRY_VIEW_INFO)); - cmd.set(idx + " #MembersBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ENTRY_MEMBERS_BTN)); - cmd.set(idx + " #SettingsBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ENTRY_SETTINGS)); - cmd.set(idx + " #UnclaimAllBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ENTRY_UNCLAIM_ALL)); - cmd.set(idx + " #DisbandBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_ENTRY_DISBAND)); + cmd.set(idx + " #TpHomeBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ENTRY_TP_HOME)); + cmd.set(idx + " #ViewInfoBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ENTRY_VIEW_INFO)); + cmd.set(idx + " #MembersBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ENTRY_MEMBERS_BTN)); + cmd.set(idx + " #SettingsBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ENTRY_SETTINGS)); + cmd.set(idx + " #UnclaimAllBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ENTRY_UNCLAIM_ALL)); + cmd.set(idx + " #DisbandBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_FAC_ENTRY_DISBAND)); // Created date String createdDate = DATE_FORMAT.format(Instant.ofEpochMilli(faction.createdAt())); @@ -242,7 +244,7 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int String.format("%s (%.0f, %.0f, %.0f)", home.world(), home.x(), home.y(), home.z())); cmd.set(idx + " #TpHomeBtn.Visible", true); } else { - cmd.set(idx + " #HomeLocation.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.NOT_SET)); + cmd.set(idx + " #HomeLocation.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.NOT_SET)); cmd.set(idx + " #TpHomeBtn.Visible", false); } @@ -413,7 +415,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID factionId = UuidUtil.parseOrNull(data.factionId); if (factionId == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.INVALID_FACTION)); return; } Faction faction = factionManager.getFaction(factionId); @@ -424,7 +426,7 @@ public void handleDataEvent(Ref ref, Store store, // Get target world World targetWorld = Universe.get().getWorld(home.world()); if (targetWorld == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.FAC_WORLD_NOT_FOUND)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.FAC_WORLD_NOT_FOUND)); return; } @@ -436,9 +438,9 @@ public void handleDataEvent(Ref ref, Store store, store.addComponent(ref, Teleport.getComponentType(), teleport); }); - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.FAC_TELEPORTED, "#00FFFF", faction.name())); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.FAC_TELEPORTED, "#00FFFF", faction.name())); } else { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.FAC_NO_HOME)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.FAC_NO_HOME)); } } } @@ -447,7 +449,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID factionId = UuidUtil.parseOrNull(data.factionId); if (factionId == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.INVALID_FACTION)); return; } Faction faction = factionManager.getFaction(factionId); @@ -462,7 +464,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID factionId = UuidUtil.parseOrNull(data.factionId); if (factionId == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.INVALID_FACTION)); return; } Faction faction = factionManager.getFaction(factionId); @@ -476,7 +478,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID factionId = UuidUtil.parseOrNull(data.factionId); if (factionId == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.INVALID_FACTION)); return; } Faction faction = factionManager.getFaction(factionId); @@ -490,7 +492,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID factionId = UuidUtil.parseOrNull(data.factionId); if (factionId == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.INVALID_FACTION)); return; } guiManager.openAdminDisbandConfirm(player, ref, store, playerRef, factionId, data.factionName); @@ -501,7 +503,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID factionId = UuidUtil.parseOrNull(data.factionId); if (factionId == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.INVALID_FACTION)); return; } Faction faction = factionManager.getFaction(factionId); diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminHelpPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminHelpPage.java index 0ac0c061..471f00ff 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminHelpPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminHelpPage.java @@ -6,7 +6,7 @@ import com.hyperfactions.gui.admin.data.AdminHelpData; import com.hyperfactions.gui.help.*; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -61,7 +61,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "help", cmd, events); // Page title - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_HELP)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_HELP)); // Set localized sidebar button labels (admin categories only) int catIdx = 0; diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminMainPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminMainPage.java index 9612d2b6..69e466c2 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminMainPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminMainPage.java @@ -9,7 +9,9 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -67,11 +69,11 @@ public void build(Ref ref, UICommandBuilder cmd, // Localize page title and buttons - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_MAIN)); - cmd.set("#ZonesBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONES_BTN)); - cmd.set("#ReloadBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_RELOAD_BTN)); - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_NEXT)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_MAIN)); + cmd.set("#ZonesBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONES_BTN)); + cmd.set("#ReloadBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_RELOAD_BTN)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_NEXT)); // Stats overview Collection allFactions = factionManager.getAllFactions(); @@ -83,9 +85,9 @@ public void build(Ref ref, UICommandBuilder cmd, .mapToInt(f -> f.claims().size()) .sum(); - cmd.set("#TotalFactions.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.DASH_FACTIONS_PREFIX, totalFactions)); - cmd.set("#TotalMembers.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.DASH_MEMBERS_PREFIX, totalMembers)); - cmd.set("#TotalClaims.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.DASH_CLAIMS_PREFIX, totalClaims)); + cmd.set("#TotalFactions.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.DASH_FACTIONS_PREFIX, totalFactions)); + cmd.set("#TotalMembers.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.DASH_MEMBERS_PREFIX, totalMembers)); + cmd.set("#TotalClaims.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.DASH_CLAIMS_PREFIX, totalClaims)); // Navigation buttons events.addEventBinding( @@ -131,14 +133,14 @@ public void build(Ref ref, UICommandBuilder cmd, // Faction info String colorHex = faction.color() != null ? faction.color() : "#00FFFF"; cmd.set(prefix + "#FactionName.Text", faction.name()); - cmd.set(prefix + "#MemberCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.MEMBERS_SUFFIX, faction.members().size())); - cmd.set(prefix + "#PowerCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.POWER_FORMAT, String.format("%.0f", stats.currentPower()), String.format("%.0f", stats.maxPower()))); - cmd.set(prefix + "#ClaimCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.CLAIMS_SUFFIX, faction.claims().size())); + cmd.set(prefix + "#MemberCount.Text", HFMessages.get(playerRef, CommonKeys.Common.MEMBER_COUNT, faction.members().size())); + cmd.set(prefix + "#PowerCount.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.POWER_FORMAT, String.format("%.0f", stats.currentPower()), String.format("%.0f", stats.maxPower()))); + cmd.set(prefix + "#ClaimCount.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.CLAIMS_SUFFIX, faction.claims().size())); // Leader info FactionMember leader = faction.getLeader(); - String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.NONE); - cmd.set(prefix + "#LeaderName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.LEADER_PREFIX, leaderName)); + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, CommonKeys.Common.NONE); + cmd.set(prefix + "#LeaderName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.LEADER_PREFIX, leaderName)); // Action buttons events.addEventBinding( @@ -162,7 +164,7 @@ public void build(Ref ref, UICommandBuilder cmd, } // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -212,7 +214,7 @@ public void handleDataEvent(Ref ref, Store store, case "Reload" -> { guiManager.closePage(player, ref, store); - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MAIN_RELOAD_HINT, "#00FFFF")); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.MAIN_RELOAD_HINT, "#00FFFF")); } case "PrevPage" -> { @@ -229,7 +231,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID factionId = UuidUtil.parseOrNull(data.factionId); if (factionId == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.INVALID_FACTION)); return; } @@ -242,7 +244,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID factionId = UuidUtil.parseOrNull(data.factionId); if (factionId == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.INVALID_FACTION)); return; } Faction faction = factionManager.getFaction(factionId); @@ -250,7 +252,7 @@ public void handleDataEvent(Ref ref, Store store, int claimCount = faction.claims().size(); // Admin unclaim - prompt for command guiManager.closePage(player, ref, store); - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MAIN_UNCLAIM_HINT, MessageUtil.COLOR_GOLD, data.factionName, claimCount)); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.MAIN_UNCLAIM_HINT, MessageUtil.COLOR_GOLD, data.factionName, claimCount)); } } } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java index 3924803c..85ac35af 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java @@ -19,7 +19,9 @@ import com.hyperfactions.util.Logger; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.TimeUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -96,42 +98,42 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); // Localize page title - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_PLAYER_INFO)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_PLAYER_INFO)); // Localize header labels - cmd.set("#FirstJoinedLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_FIRST_JOINED)); - cmd.set("#LastOnlineLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_LAST_ONLINE)); - cmd.set("#UuidLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_UUID)); + cmd.set("#FirstJoinedLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_FIRST_JOINED)); + cmd.set("#LastOnlineLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_LAST_ONLINE)); + cmd.set("#UuidLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_UUID)); // Localize stat card labels - cmd.set("#PowerLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_POWER)); - cmd.set("#CombatLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_COMBAT)); - cmd.set("#KDLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_KD_SUBTITLE)); - cmd.set("#KDRLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_KDR)); - cmd.set("#FactionLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_FACTION)); + cmd.set("#PowerLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_POWER)); + cmd.set("#CombatLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_COMBAT)); + cmd.set("#KDLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_KD_SUBTITLE)); + cmd.set("#KDRLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_KDR)); + cmd.set("#FactionLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_FACTION)); // Localize section headers - cmd.set("#HistoryHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_MEMBERSHIP_HISTORY)); - cmd.set("#AdminControlsHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ADMIN_CONTROLS)); - cmd.set("#PowerMgmtHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_POWER_MANAGEMENT)); - cmd.set("#CombatSectionHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_COMBAT)); - cmd.set("#BypassHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_BYPASS_FLAGS)); + cmd.set("#HistoryHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_MEMBERSHIP_HISTORY)); + cmd.set("#AdminControlsHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_ADMIN_CONTROLS)); + cmd.set("#PowerMgmtHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_POWER_MANAGEMENT)); + cmd.set("#CombatSectionHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_COMBAT)); + cmd.set("#BypassHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_BYPASS_FLAGS)); // Localize button labels - cmd.set("#SetPowerBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SET)); - cmd.set("#ResetPowerBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_RESET)); - cmd.set("#MaxLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_MAX_PREFIX)); - cmd.set("#SetMaxBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_SET_MAX_BTN)); - cmd.set("#ResetMaxBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_RESET)); - cmd.set("#ResetKDBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_RESET_KD)); - cmd.set("#ViewFactionBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_VIEW)); - cmd.set("#KickBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_KICK_FROM_FACTION)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_BACK)); + cmd.set("#SetPowerBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SET)); + cmd.set("#ResetPowerBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_RESET)); + cmd.set("#MaxLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_MAX_PREFIX)); + cmd.set("#SetMaxBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_SET_MAX_BTN)); + cmd.set("#ResetMaxBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_RESET)); + cmd.set("#ResetKDBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_RESET_KD)); + cmd.set("#ViewFactionBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_VIEW)); + cmd.set("#KickBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_KICK_FROM_FACTION)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.BACK)); // Localize no-faction label and bypass checkbox labels - cmd.set("#NoFactionLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.NO_FACTION)); - cmd.set("#NoLossLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_NO_POWER_LOSS)); - cmd.set("#NoDecayLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_NO_CLAIM_DECAY)); + cmd.set("#NoFactionLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.NO_FACTION)); + cmd.set("#NoLossLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_NO_POWER_LOSS)); + cmd.set("#NoDecayLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_NO_CLAIM_DECAY)); buildContent(cmd, events); } @@ -142,7 +144,7 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { // Online status boolean isOnline = isOnline(targetPlayerUuid); - cmd.set("#OnlineStatus.Text", isOnline ? HFMessages.get(playerRef, MessageKeys.Common.ONLINE) : HFMessages.get(playerRef, MessageKeys.Common.OFFLINE)); + cmd.set("#OnlineStatus.Text", isOnline ? HFMessages.get(playerRef, CommonKeys.Common.ONLINE) : HFMessages.get(playerRef, CommonKeys.Common.OFFLINE)); cmd.set("#OnlineStatus.Style.TextColor", GuiColors.forOnlineStatus(isOnline)); // Load player data once for all sections @@ -152,15 +154,15 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { if (cachedData != null && cachedData.getFirstJoined() > 0) { cmd.set("#FirstJoinedValue.Text", TimeUtil.formatDate(cachedData.getFirstJoined())); } else { - cmd.set("#FirstJoinedValue.Text", HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN)); + cmd.set("#FirstJoinedValue.Text", HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN)); } if (isOnline) { - cmd.set("#LastOnlineValue.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.NOW)); + cmd.set("#LastOnlineValue.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.NOW)); cmd.set("#LastOnlineValue.Style.TextColor", "#55FF55"); } else if (cachedData != null && cachedData.getLastOnline() > 0) { cmd.set("#LastOnlineValue.Text", TimeUtil.formatRelative(cachedData.getLastOnline())); } else { - cmd.set("#LastOnlineValue.Text", HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN)); + cmd.set("#LastOnlineValue.Text", HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN)); } // === Faction Card === @@ -173,7 +175,7 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { if (faction != null) { cmd.set("#FactionName.Text", faction.name()); } else { - cmd.set("#FactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.NO_FACTION)); + cmd.set("#FactionName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.NO_FACTION)); cmd.set("#FactionName.Style.TextColor", "#888888"); } @@ -204,9 +206,9 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { // Max override indicator if (power.maxPowerOverride() != null) { - cmd.set("#MaxOverrideLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.CUSTOM_MAX)); + cmd.set("#MaxOverrideLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.CUSTOM_MAX)); } else { - cmd.set("#MaxOverrideLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.DEFAULT_MAX)); + cmd.set("#MaxOverrideLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.DEFAULT_MAX)); cmd.set("#MaxOverrideLabel.Style.TextColor", "#666666"); } @@ -237,7 +239,7 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { List history = new java.util.ArrayList<>(cachedData.getMembershipHistory()); Collections.reverse(history); - cmd.set("#HistoryCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.PLR_RECORDS, history.size())); + cmd.set("#HistoryCount.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.PLR_RECORDS, history.size())); cmd.appendInline("#HistoryList", "Group #HistoryCards { LayoutMode: Top; }"); for (int i = 0; i < history.size(); i++) { @@ -247,8 +249,8 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { cmd.set(idx + " #HFactionName.Text", rec.factionName()); cmd.set(idx + " #HRole.Text", ConfigManager.get().getRoleDisplayName(rec.highestRole())); - cmd.set(idx + " #HJoined.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.PLR_JOINED_DATE, TimeUtil.formatDate(rec.joinedAt()))); - cmd.set(idx + " #HLeft.Text", rec.isActive() ? HFMessages.get(playerRef, MessageKeys.AdminGui.PLR_CURRENT) : HFMessages.get(playerRef, MessageKeys.AdminGui.PLR_LEFT_DATE, TimeUtil.formatDate(rec.leftAt()))); + cmd.set(idx + " #HJoined.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.PLR_JOINED_DATE, TimeUtil.formatDate(rec.joinedAt()))); + cmd.set(idx + " #HLeft.Text", rec.isActive() ? HFMessages.get(playerRef, AdminGuiKeys.AdminGui.PLR_CURRENT) : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.PLR_LEFT_DATE, TimeUtil.formatDate(rec.leftAt()))); cmd.set(idx + " #HReason.Text", formatReason(rec.reason())); cmd.set(idx + " #HReason.Style.TextColor", GuiColors.forLeaveReason(rec.reason())); cmd.set(idx + " #RoleBar.Background.Color", GuiColors.forRole(rec.highestRole())); @@ -256,7 +258,7 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { } else { cmd.set("#HistoryCount.Text", ""); cmd.appendInline("#HistoryList", - "Label { Text: \"" + HFMessages.get(playerRef, MessageKeys.AdminGui.NO_MEMBERSHIP_HISTORY) + "\"; Style: (FontSize: 10, TextColor: #555555); }"); + "Label { Text: \"" + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.NO_MEMBERSHIP_HISTORY) + "\"; Style: (FontSize: 10, TextColor: #555555); }"); } // === Kick button === @@ -265,9 +267,9 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { } else { FactionMember targetMember = faction.getMember(targetPlayerUuid); if (targetMember != null && targetMember.isLeader() && faction.getMemberCount() == 1) { - cmd.set("#KickBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.PLR_DISBAND_FACTION)); + cmd.set("#KickBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.PLR_DISBAND_FACTION)); } else if (targetMember != null && targetMember.isLeader()) { - cmd.set("#KickBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.PLR_KICK_LEADER)); + cmd.set("#KickBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.PLR_KICK_LEADER)); } } @@ -339,7 +341,7 @@ public void handleDataEvent(Ref ref, Store store, logAdminPowerChange(adminUuid, "Admin adjusted " + targetPlayerName + "'s power by " + String.format("%.1f", delta) + " (" + String.format("%.1f", oldPower) + " -> " + String.format("%.1f", newPower) + ")", - MessageKeys.LogsGui.MSG_ADMIN_POWER_ADJUSTED, targetPlayerName, + GuiKeys.LogsGui.MSG_ADMIN_POWER_ADJUSTED, targetPlayerName, String.format("%.1f", delta), String.format("%.1f", oldPower), String.format("%.1f", newPower)); reopenPage(player, ref, store, playerRef); } @@ -347,7 +349,7 @@ public void handleDataEvent(Ref ref, Store store, case "SetPower" -> { double amount = parseDoubleOrNaN(data.powerInput); if (Double.isNaN(amount)) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.PLR_ENTER_VALID_NUMBER)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.PLR_ENTER_VALID_NUMBER)); return; } double oldPower = powerManager.getPlayerPower(targetPlayerUuid).power(); @@ -355,7 +357,7 @@ public void handleDataEvent(Ref ref, Store store, logAdminPowerChange(adminUuid, "Admin set " + targetPlayerName + "'s power to " + String.format("%.1f", newPower) + " (was " + String.format("%.1f", oldPower) + ")", - MessageKeys.LogsGui.MSG_ADMIN_POWER_SET, targetPlayerName, + GuiKeys.LogsGui.MSG_ADMIN_POWER_SET, targetPlayerName, String.format("%.1f", newPower), String.format("%.1f", oldPower)); reopenPage(player, ref, store, playerRef); } @@ -366,7 +368,7 @@ public void handleDataEvent(Ref ref, Store store, logAdminPowerChange(adminUuid, "Admin reset " + targetPlayerName + "'s power to " + String.format("%.1f", newPower) + " (was " + String.format("%.1f", oldPower) + ")", - MessageKeys.LogsGui.MSG_ADMIN_POWER_RESET, targetPlayerName, + GuiKeys.LogsGui.MSG_ADMIN_POWER_RESET, targetPlayerName, String.format("%.1f", newPower), String.format("%.1f", oldPower)); reopenPage(player, ref, store, playerRef); } @@ -374,7 +376,7 @@ public void handleDataEvent(Ref ref, Store store, case "SetMax" -> { double amount = parseDoubleOrNaN(data.powerInput); if (Double.isNaN(amount) || amount <= 0) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.PLR_ENTER_VALID_POSITIVE)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.PLR_ENTER_VALID_POSITIVE)); return; } PlayerPower old = powerManager.getPlayerPower(targetPlayerUuid); @@ -383,7 +385,7 @@ public void handleDataEvent(Ref ref, Store store, logAdminPowerChange(adminUuid, "Admin set " + targetPlayerName + "'s max power to " + String.format("%.1f", amount) + " (was " + String.format("%.1f", oldMax) + ")", - MessageKeys.LogsGui.MSG_ADMIN_MAXPOWER_SET, targetPlayerName, + GuiKeys.LogsGui.MSG_ADMIN_MAXPOWER_SET, targetPlayerName, String.format("%.1f", amount), String.format("%.1f", oldMax)); reopenPage(player, ref, store, playerRef); } @@ -395,7 +397,7 @@ public void handleDataEvent(Ref ref, Store store, logAdminPowerChange(adminUuid, "Admin reset " + targetPlayerName + "'s max power to global default (" + String.format("%.1f", ConfigManager.get().getMaxPlayerPower()) + ")", - MessageKeys.LogsGui.MSG_ADMIN_MAXPOWER_RESET, targetPlayerName, + GuiKeys.LogsGui.MSG_ADMIN_MAXPOWER_RESET, targetPlayerName, String.format("%.1f", ConfigManager.get().getMaxPlayerPower())); reopenPage(player, ref, store, playerRef); } @@ -407,7 +409,7 @@ public void handleDataEvent(Ref ref, Store store, powerManager.setPlayerPowerLossDisabled(targetPlayerUuid, newState); logAdminPowerChange(adminUuid, "Admin " + (newState ? "disabled" : "enabled") + " power loss for " + targetPlayerName, - newState ? MessageKeys.LogsGui.MSG_ADMIN_POWERLOSS_DISABLED : MessageKeys.LogsGui.MSG_ADMIN_POWERLOSS_ENABLED, + newState ? GuiKeys.LogsGui.MSG_ADMIN_POWERLOSS_DISABLED : GuiKeys.LogsGui.MSG_ADMIN_POWERLOSS_ENABLED, targetPlayerName); reopenPage(player, ref, store, playerRef); } @@ -419,7 +421,7 @@ public void handleDataEvent(Ref ref, Store store, powerManager.setPlayerClaimDecayExempt(targetPlayerUuid, newState); logAdminPowerChange(adminUuid, "Admin " + (newState ? "enabled" : "disabled") + " claim decay exemption for " + targetPlayerName, - newState ? MessageKeys.LogsGui.MSG_ADMIN_DECAY_ENABLED : MessageKeys.LogsGui.MSG_ADMIN_DECAY_DISABLED, + newState ? GuiKeys.LogsGui.MSG_ADMIN_DECAY_ENABLED : GuiKeys.LogsGui.MSG_ADMIN_DECAY_DISABLED, targetPlayerName); reopenPage(player, ref, store, playerRef); } @@ -433,10 +435,10 @@ public void handleDataEvent(Ref ref, Store store, if (faction != null) { Faction updated = faction.withLog(FactionLog.create(FactionLog.LogType.ADMIN_POWER, "Admin reset K/D for " + targetPlayerName, adminUuid, - MessageKeys.LogsGui.MSG_ADMIN_KD_RESET, targetPlayerName)); + GuiKeys.LogsGui.MSG_ADMIN_KD_RESET, targetPlayerName)); factionManager.updateFaction(updated); } - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.PLR_KD_RESET, targetPlayerName)); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.PLR_KD_RESET, targetPlayerName)); reopenPage(player, ref, store, playerRef); } @@ -456,7 +458,7 @@ public void handleDataEvent(Ref ref, Store store, // Last member — disband the faction factionManager.forceDisband(faction.id(), "[Admin] Disbanded via admin kick of last member " + targetPlayerName); - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.PLR_DISBANDED_KICK, MessageUtil.COLOR_GOLD, faction.name())); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.PLR_DISBANDED_KICK, MessageUtil.COLOR_GOLD, faction.name())); // Navigate back to factions list since faction no longer exists guiManager.openAdminFactions(player, ref, store, playerRef); } else { @@ -471,12 +473,12 @@ public void handleDataEvent(Ref ref, Store store, "[Admin] Leadership transferred from " + targetPlayerName + " to " + successor.username() + " (admin kick)", adminUuid, - MessageKeys.LogsGui.MSG_ADMIN_LEADER_KICK, targetPlayerName, successor.username())); + GuiKeys.LogsGui.MSG_ADMIN_LEADER_KICK, targetPlayerName, successor.username())); factionManager.updateFaction(updated); // Now kick the demoted member factionManager.adminRemoveMember(faction.id(), targetPlayerUuid); - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.PLR_KICKED_LEADER, targetPlayerName, successor.username())); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.PLR_KICKED_LEADER, targetPlayerName, successor.username())); } reopenPage(player, ref, store, playerRef); } @@ -484,7 +486,7 @@ public void handleDataEvent(Ref ref, Store store, // Normal kick FactionResult result = factionManager.adminRemoveMember(faction.id(), targetPlayerUuid); if (result == FactionResult.SUCCESS) { - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.PLR_KICKED_SUCCESS, targetPlayerName, faction.name())); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.PLR_KICKED_SUCCESS, targetPlayerName, faction.name())); } reopenPage(player, ref, store, playerRef); } @@ -496,7 +498,7 @@ public void handleDataEvent(Ref ref, Store store, if (viewFaction != null) { guiManager.openAdminFactionInfo(player, ref, store, playerRef, viewFaction.id()); } else { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.PLR_FACTION_GONE)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.PLR_FACTION_GONE)); } } @@ -560,10 +562,10 @@ private String formatRole(FactionRole role) { private String formatReason(MembershipRecord.LeaveReason reason) { return switch (reason) { - case ACTIVE -> HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_REASON_ACTIVE); - case LEFT -> HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_REASON_LEFT); - case KICKED -> HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_REASON_KICKED); - case DISBANDED -> HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_REASON_DISBANDED); + case ACTIVE -> HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_REASON_ACTIVE); + case LEFT -> HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_REASON_LEFT); + case KICKED -> HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_REASON_KICKED); + case DISBANDED -> HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_REASON_DISBANDED); }; } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java index 2067957a..ccce0443 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java @@ -12,7 +12,9 @@ import com.hyperfactions.storage.PlayerStorage; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.TimeUtil; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; @@ -116,11 +118,11 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "players", cmd, events); // Localize page title and common labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_PLAYERS)); - cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SEARCH)); - cmd.set("#SortLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SORT)); - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_NEXT)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_PLAYERS)); + cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SEARCH)); + cmd.set("#SortLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SORT)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_NEXT)); // Load player data (synchronous for initial build) loadPlayerCache(); @@ -223,18 +225,18 @@ private void buildPlayerList(UICommandBuilder cmd, UIEventBuilder events) { // Count display if (searchQuery.isEmpty()) { - cmd.set("#PlayerCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.PLAYERS_SUFFIX, filtered.size())); + cmd.set("#PlayerCount.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.PLAYERS_SUFFIX, filtered.size())); } else { - cmd.set("#PlayerCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FOUND_SUFFIX, filtered.size())); + cmd.set("#PlayerCount.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.FOUND_SUFFIX, filtered.size())); } // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.SORT_NAME)), "NAME"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.SORT_POWER)), "POWER"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.PLR_SORT_LAST_ONLINE)), "LAST_ONLINE"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.PLR_SORT_FACTION)), "FACTION"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.PLR_SORT_ONLINE)), "ONLINE") + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.SORT_NAME)), "NAME"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.SORT_POWER)), "POWER"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.PLR_SORT_LAST_ONLINE)), "LAST_ONLINE"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.PLR_SORT_FACTION)), "FACTION"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.PLR_SORT_ONLINE)), "ONLINE") )); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding( @@ -271,7 +273,7 @@ private void buildPlayerList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -310,7 +312,7 @@ private void buildPlayerEntry(UICommandBuilder cmd, UIEventBuilder events, int i cmd.set(idx + " #PlayerName.Style.TextColor", info.isOnline() ? "#00FFFF" : "#CCCCCC"); // Online status - cmd.set(idx + " #OnlineStatus.Text", info.isOnline() ? HFMessages.get(playerRef, MessageKeys.Common.ONLINE) : HFMessages.get(playerRef, MessageKeys.Common.OFFLINE)); + cmd.set(idx + " #OnlineStatus.Text", info.isOnline() ? HFMessages.get(playerRef, CommonKeys.Common.ONLINE) : HFMessages.get(playerRef, CommonKeys.Common.OFFLINE)); cmd.set(idx + " #OnlineStatus.Style.TextColor", GuiColors.forOnlineStatus(info.isOnline())); // Faction name @@ -318,7 +320,7 @@ private void buildPlayerEntry(UICommandBuilder cmd, UIEventBuilder events, int i cmd.set(idx + " #FactionName.Text", info.factionName()); cmd.set(idx + " #FactionName.Style.TextColor", "#AAAAAA"); } else { - cmd.set(idx + " #FactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.NO_FACTION)); + cmd.set(idx + " #FactionName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.NO_FACTION)); cmd.set(idx + " #FactionName.Style.TextColor", "#666666"); } @@ -345,34 +347,34 @@ private void buildPlayerEntry(UICommandBuilder cmd, UIEventBuilder events, int i // Extended info if (isExpanded) { // Localize expanded labels - cmd.set(idx + " #RoleLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_ROLE)); - cmd.set(idx + " #JoinedLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_JOINED)); - cmd.set(idx + " #LastOnlineLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_LAST_ONLINE)); - cmd.set(idx + " #KdrLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_KDR)); - cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_POWER)); - cmd.set(idx + " #UuidLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_UUID)); + cmd.set(idx + " #RoleLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_ENTRY_ROLE)); + cmd.set(idx + " #JoinedLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_ENTRY_JOINED)); + cmd.set(idx + " #LastOnlineLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_ENTRY_LAST_ONLINE)); + cmd.set(idx + " #KdrLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_ENTRY_KDR)); + cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_ENTRY_POWER)); + cmd.set(idx + " #UuidLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_ENTRY_UUID)); // Localize button texts - cmd.set(idx + " #ViewInfoBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_INFO)); - cmd.set(idx + " #TeleportBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_TELEPORT)); + cmd.set(idx + " #ViewInfoBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_ENTRY_INFO)); + cmd.set(idx + " #TeleportBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_ENTRY_TELEPORT)); // Role - cmd.set(idx + " #RoleValue.Text", info.factionRole() != null ? info.factionRole() : HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_NA)); + cmd.set(idx + " #RoleValue.Text", info.factionRole() != null ? info.factionRole() : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_ENTRY_NA)); // First joined String joinedDate = info.firstJoined() > 0 ? DATE_FORMAT.format(Instant.ofEpochMilli(info.firstJoined())) - : HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_UNKNOWN); + : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_ENTRY_UNKNOWN); cmd.set(idx + " #JoinedDate.Text", joinedDate); // Last online String lastOnlineText; if (info.isOnline()) { - lastOnlineText = HFMessages.get(playerRef, MessageKeys.AdminGui.NOW); + lastOnlineText = HFMessages.get(playerRef, AdminGuiKeys.AdminGui.NOW); } else if (info.lastOnline() > 0) { - lastOnlineText = HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_AGO, TimeUtil.formatDuration(System.currentTimeMillis() - info.lastOnline())); + lastOnlineText = HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PLR_ENTRY_AGO, TimeUtil.formatDuration(System.currentTimeMillis() - info.lastOnline())); } else { - lastOnlineText = HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); + lastOnlineText = HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); } cmd.set(idx + " #LastOnline.Text", lastOnlineText); @@ -528,7 +530,7 @@ public void handleDataEvent(Ref ref, Store store, sendUpdate(); return; } - String targetName = data.playerName != null ? data.playerName : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); + String targetName = data.playerName != null ? data.playerName : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); // Find the player's faction for context UUID factionId = null; for (Faction faction : factionManager.getAllFactions()) { @@ -553,7 +555,7 @@ public void handleDataEvent(Ref ref, Store store, guiManager.closePage(player, ref, store); var targetWorld = Universe.get().getWorld(targetPlayer.getWorldUuid()); if (targetWorld == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.PLR_WORLD_NOT_FOUND)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.PLR_WORLD_NOT_FOUND)); return; } var targetTransform = targetPlayer.getTransform(); @@ -564,9 +566,9 @@ public void handleDataEvent(Ref ref, Store store, targetWorld, targetPos, targetRot); store.addComponent(ref, Teleport.getComponentType(), teleport); }); - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.PLR_TELEPORTED, "#55FF55", data.playerName != null ? data.playerName : "player")); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.PLR_TELEPORTED, "#55FF55", data.playerName != null ? data.playerName : "player")); } else { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.PLR_NOT_ONLINE)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.PLR_NOT_ONLINE)); sendUpdate(); } } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminUnclaimAllConfirmPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminUnclaimAllConfirmPage.java index f954d897..34bb79f4 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminUnclaimAllConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminUnclaimAllConfirmPage.java @@ -1,7 +1,8 @@ package com.hyperfactions.gui.admin.page; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.data.Faction; @@ -64,16 +65,16 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.UNCLAIM_ALL_CONFIRM); // Localize labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_UNCLAIM_TITLE)); - cmd.set("#ConfirmMsg1.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_UNCLAIM_CONFIRM_MSG1)); - cmd.set("#ConfirmMsg2.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_UNCLAIM_CONFIRM_MSG2)); - cmd.set("#WarningLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_UNCLAIM_WARNING)); - cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CANCEL)); - cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_UNCLAIM_ALL)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_UNCLAIM_TITLE)); + cmd.set("#ConfirmMsg1.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_UNCLAIM_CONFIRM_MSG1)); + cmd.set("#ConfirmMsg2.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_UNCLAIM_CONFIRM_MSG2)); + cmd.set("#WarningLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_UNCLAIM_WARNING)); + cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.CANCEL)); + cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_UNCLAIM_ALL)); // Set faction info cmd.set("#FactionName.Text", factionName); - cmd.set("#ClaimCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.CHUNKS_SUFFIX, claimCount)); + cmd.set("#ClaimCount.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.CHUNKS_SUFFIX, claimCount)); // Cancel button events.addEventBinding( @@ -115,9 +116,9 @@ public void handleDataEvent(Ref ref, Store store, claimManager.unclaimAll(factionId); if (claimCount > 0) { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.UNCLAIM_REMOVED, "#FF5555", claimCount, factionName)); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.UNCLAIM_REMOVED, "#FF5555", claimCount, factionName)); } else { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.UNCLAIM_NO_CLAIMS, "#FFAA00", factionName)); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.UNCLAIM_NO_CLAIMS, "#FFAA00", factionName)); } guiManager.openAdminFactions(player, ref, store, playerRef); diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminUpdatesPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminUpdatesPage.java index 2c2a68f1..8b9f1a41 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminUpdatesPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminUpdatesPage.java @@ -5,7 +5,7 @@ import com.hyperfactions.gui.admin.AdminNavBarHelper; import com.hyperfactions.gui.admin.data.AdminUpdatesData; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -43,11 +43,11 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "updates", cmd, events); // Localize page title and labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_UPDATES)); - cmd.set("#ComingSoon.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_UPDATES_HEADING)); - cmd.set("#ComingSoonSub.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COMING_SOON)); - cmd.set("#Description.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_UPDATES_DESC1)); - cmd.set("#Description2.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_UPDATES_DESC2)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_UPDATES)); + cmd.set("#ComingSoon.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_UPDATES_HEADING)); + cmd.set("#ComingSoonSub.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_COMING_SOON)); + cmd.set("#Description.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_UPDATES_DESC1)); + cmd.set("#Description2.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_UPDATES_DESC2)); } /** Handles data event. */ diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminVersionPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminVersionPage.java index fe97518a..2e19c44d 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminVersionPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminVersionPage.java @@ -1,7 +1,8 @@ package com.hyperfactions.gui.admin.page; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.HyperFactions; import com.hyperfactions.config.ConfigManager; @@ -63,34 +64,34 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "version", cmd, events); // Localize page title - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_VERSION)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_VERSION)); // Localize version card labels - cmd.set("#VersionLabelFactions.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_VER_HYPERFACTIONS)); - cmd.set("#VersionLabelServer.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_VER_HYTALE_SERVER)); - cmd.set("#VersionLabelJava.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_VER_JAVA)); + cmd.set("#VersionLabelFactions.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_VER_HYPERFACTIONS)); + cmd.set("#VersionLabelServer.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_VER_HYTALE_SERVER)); + cmd.set("#VersionLabelJava.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_VER_JAVA)); // Localize section headers - cmd.set("#SectionPermissions.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_VER_PERMISSIONS)); - cmd.set("#SectionPlaceholders.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_VER_PLACEHOLDERS)); - cmd.set("#SectionEconomy.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_VER_ECONOMY_SECTION)); - cmd.set("#SectionProtection.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_VER_PROTECTION)); + cmd.set("#SectionPermissions.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_VER_PERMISSIONS)); + cmd.set("#SectionPlaceholders.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_VER_PLACEHOLDERS)); + cmd.set("#SectionEconomy.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_VER_ECONOMY_SECTION)); + cmd.set("#SectionProtection.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_VER_PROTECTION)); // --- Version Info --- cmd.set("#FactionsVersion.Text", "v" + HyperFactions.VERSION); String serverVersion = ManifestUtil.getVersion(); - cmd.set("#ServerVersion.Text", serverVersion != null ? serverVersion : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN)); + cmd.set("#ServerVersion.Text", serverVersion != null ? serverVersion : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN)); String javaVersion = System.getProperty("java.version"); - cmd.set("#JavaVersion.Text", javaVersion != null ? javaVersion : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN)); + cmd.set("#JavaVersion.Text", javaVersion != null ? javaVersion : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN)); // --- Permissions --- - setStatus(cmd, "#HyperPermsStatus", HyperPermsIntegration.isAvailable(), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); + setStatus(cmd, "#HyperPermsStatus", HyperPermsIntegration.isAvailable(), HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_FOUND)); String providerNames = PermissionManager.get().getProviderNames(); - setStatus(cmd, "#LuckPermsStatus", providerNames.contains("LuckPerms"), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); + setStatus(cmd, "#LuckPermsStatus", providerNames.contains("LuckPerms"), HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_FOUND)); boolean vaultAvailable = providerNames.contains("VaultUnlocked"); boolean vaultInstalled = false; @@ -101,14 +102,14 @@ public void build(Ref ref, UICommandBuilder cmd, } catch (ClassNotFoundException ignored) {} } if (vaultAvailable) { - setStatusColor(cmd, "#VaultUnlockedStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), COLOR_GREEN); + setStatusColor(cmd, "#VaultUnlockedStatus", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE), COLOR_GREEN); } else if (vaultInstalled) { - setStatusColor(cmd, "#VaultUnlockedStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE_PROVIDER), COLOR_YELLOW); + setStatusColor(cmd, "#VaultUnlockedStatus", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE_PROVIDER), COLOR_YELLOW); } else { - setStatusColor(cmd, "#VaultUnlockedStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_INSTALLED), COLOR_GRAY); + setStatusColor(cmd, "#VaultUnlockedStatus", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_INSTALLED), COLOR_GRAY); } - setStatus(cmd, "#NativeStatus", providerNames.contains("HytaleNative"), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); + setStatus(cmd, "#NativeStatus", providerNames.contains("HytaleNative"), HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_FOUND)); // --- Protection --- ProtectionMixinBridge.MixinProvider provider = ProtectionMixinBridge.getProvider(); @@ -117,33 +118,33 @@ public void build(Ref ref, UICommandBuilder cmd, switch (provider) { case BOTH -> { String hpVersion = System.getProperty("hyperprotect.bridge.version", "unknown"); - setStatusColor(cmd, "#HyperProtectStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE) + " (v" + hpVersion + ")", COLOR_GREEN); - setStatusColor(cmd, "#OrbisGuardMixinsStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE) + " (compatible)", COLOR_GREEN); + setStatusColor(cmd, "#HyperProtectStatus", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE) + " (v" + hpVersion + ")", COLOR_GREEN); + setStatusColor(cmd, "#OrbisGuardMixinsStatus", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE) + " (compatible)", COLOR_GREEN); } case HYPERPROTECT -> { String hpVersion = System.getProperty("hyperprotect.bridge.version", "unknown"); - setStatusColor(cmd, "#HyperProtectStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE) + " (v" + hpVersion + ")", COLOR_GREEN); - setStatusColor(cmd, "#OrbisGuardMixinsStatus", HFMessages.get(playerRef, MessageKeys.Common.NA), COLOR_GRAY); + setStatusColor(cmd, "#HyperProtectStatus", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE) + " (v" + hpVersion + ")", COLOR_GREEN); + setStatusColor(cmd, "#OrbisGuardMixinsStatus", HFMessages.get(playerRef, CommonKeys.Common.NA), COLOR_GRAY); } case ORBISGUARD -> { - setStatusColor(cmd, "#HyperProtectStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); - setStatusColor(cmd, "#OrbisGuardMixinsStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), COLOR_GREEN); + setStatusColor(cmd, "#HyperProtectStatus", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); + setStatusColor(cmd, "#OrbisGuardMixinsStatus", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE), COLOR_GREEN); } case NONE -> { - setStatusColor(cmd, "#HyperProtectStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); - setStatusColor(cmd, "#OrbisGuardMixinsStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); + setStatusColor(cmd, "#HyperProtectStatus", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); + setStatusColor(cmd, "#OrbisGuardMixinsStatus", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); } default -> throw new IllegalStateException("Unexpected value"); } if (ogApiAvailable) { String ogLabel = provider == ProtectionMixinBridge.MixinProvider.NONE - ? HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE) + " (claims only)" : HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE); + ? HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE) + " (claims only)" : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE); String ogColor = provider == ProtectionMixinBridge.MixinProvider.NONE ? COLOR_YELLOW : COLOR_GREEN; setStatusColor(cmd, "#OrbisGuardApiStatus", ogLabel, ogColor); } else { - setStatusColor(cmd, "#OrbisGuardApiStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); + setStatusColor(cmd, "#OrbisGuardApiStatus", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); } String mixinStatus = ProtectionMixinBridge.getStatusSummary(); @@ -153,16 +154,16 @@ public void build(Ref ref, UICommandBuilder cmd, GravestoneIntegration gs = plugin.getProtectionChecker().getGravestoneIntegration(); boolean gsAvailable = gs != null && gs.isAvailable(); boolean gsEnabled = ConfigManager.get().gravestones().isEnabled(); - String gsStatus = !gsAvailable ? HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND) : (gsEnabled ? HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE) : HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_VER_DISABLED)); + String gsStatus = !gsAvailable ? HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_FOUND) : (gsEnabled ? HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE) : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_VER_DISABLED)); String gsColor = gsAvailable && gsEnabled ? COLOR_GREEN : (gsAvailable ? COLOR_YELLOW : COLOR_GRAY); setStatusColor(cmd, "#GravestonesStatus", gsStatus, gsColor); KyuubiSoftIntegration ks = plugin.getKyuubiSoftIntegration(); boolean ksAvailable = ks != null && ks.isAvailable(); - setStatus(cmd, "#KyuubiSoftStatus", ksAvailable, HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); + setStatus(cmd, "#KyuubiSoftStatus", ksAvailable, HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_FOUND)); // --- Placeholders --- - setStatus(cmd, "#PlaceholderAPIStatus", PlaceholderAPIIntegration.isAvailable(), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); + setStatus(cmd, "#PlaceholderAPIStatus", PlaceholderAPIIntegration.isAvailable(), HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_FOUND)); boolean wiflowAvailable; try { @@ -170,7 +171,7 @@ public void build(Ref ref, UICommandBuilder cmd, } catch (NoClassDefFoundError e) { wiflowAvailable = false; } - setStatus(cmd, "#WiFlowPAPIStatus", wiflowAvailable, HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); + setStatus(cmd, "#WiFlowPAPIStatus", wiflowAvailable, HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_FOUND)); // --- Economy --- if (plugin.isTreasuryEnabled()) { @@ -179,10 +180,10 @@ public void build(Ref ref, UICommandBuilder cmd, if (econMgr != null) { econName = econMgr.getVaultProvider().getEconomyName(); } - String treasuryLabel = econName != null ? HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE) + " (" + econName + ")" : HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE); + String treasuryLabel = econName != null ? HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE) + " (" + econName + ")" : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_ACTIVE); setStatusColor(cmd, "#TreasuryStatus", treasuryLabel, COLOR_GREEN); } else { - setStatusColor(cmd, "#TreasuryStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND), COLOR_GRAY); + setStatusColor(cmd, "#TreasuryStatus", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.VER_NOT_FOUND), COLOR_GRAY); } } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneIntegrationFlagsPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneIntegrationFlagsPage.java index 120321e5..90665d3e 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneIntegrationFlagsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneIntegrationFlagsPage.java @@ -11,7 +11,7 @@ import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -69,20 +69,20 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "zones", cmd, events); // Localize labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ZONE_SETTINGS)); - cmd.set("#CatGravestones.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZINT_CAT_GRAVESTONES)); - cmd.set("#GravestonesDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZINT_GRAVESTONES_DESC)); - cmd.set("#CatWorldMap.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZINT_CAT_WORLD_MAP)); - cmd.set("#WorldMapDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZINT_WORLD_MAP_DESC)); - cmd.set("#MapVisibilityLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZINT_VISIBILITY_LABEL)); - cmd.set("#CatEssentials.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZINT_CAT_ESSENTIALS)); - cmd.set("#ResetBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZINT_RESET_DEFAULTS)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZINT_BACK_TO_FLAGS)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_ZONE_SETTINGS)); + cmd.set("#CatGravestones.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZINT_CAT_GRAVESTONES)); + cmd.set("#GravestonesDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZINT_GRAVESTONES_DESC)); + cmd.set("#CatWorldMap.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZINT_CAT_WORLD_MAP)); + cmd.set("#WorldMapDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZINT_WORLD_MAP_DESC)); + cmd.set("#MapVisibilityLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZINT_VISIBILITY_LABEL)); + cmd.set("#CatEssentials.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZINT_CAT_ESSENTIALS)); + cmd.set("#ResetBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZINT_RESET_DEFAULTS)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZINT_BACK_TO_FLAGS)); // Get the zone Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - cmd.set("#ZoneName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_ZONE_NOT_FOUND)); + cmd.set("#ZoneName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZINT_ZONE_NOT_FOUND)); cmd.set("#FlagsContainer.Visible", false); return; } @@ -154,13 +154,13 @@ private void buildFlagToggle(UICommandBuilder cmd, UIEventBuilder events, // Default indicator (shows "(default)", "(custom)", or "(no plugin)") if (integrationUnavailable) { - cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_NO_PLUGIN)); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZINT_NO_PLUGIN)); cmd.set(idx + "Default.Style.TextColor", "#FF5555"); } else if (isDefault) { - cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_DEFAULT)); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZINT_DEFAULT)); cmd.set(idx + "Default.Style.TextColor", "#555555"); } else { - cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_CUSTOM)); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZINT_CUSTOM)); cmd.set(idx + "Default.Style.TextColor", "#FFAA00"); } @@ -186,19 +186,19 @@ private void buildMapVisibilityControl(UICommandBuilder cmd, UIEventBuilder even if (showOnMapEnabled) { // Set button text to current selection (localized) String visKey = switch (visibility) { - case ZoneFlags.MAP_VISIBILITY_FACTION -> MessageKeys.AdminGui.GUI_ZINT_MAP_VIS_FACTION; - case ZoneFlags.MAP_VISIBILITY_ALLY -> MessageKeys.AdminGui.GUI_ZINT_MAP_VIS_ALLY; - case ZoneFlags.MAP_VISIBILITY_ALL -> MessageKeys.AdminGui.GUI_ZINT_MAP_VIS_ALL; - default -> MessageKeys.AdminGui.GUI_ZINT_MAP_VIS_FACTION; + case ZoneFlags.MAP_VISIBILITY_FACTION -> AdminGuiKeys.AdminGui.GUI_ZINT_MAP_VIS_FACTION; + case ZoneFlags.MAP_VISIBILITY_ALLY -> AdminGuiKeys.AdminGui.GUI_ZINT_MAP_VIS_ALLY; + case ZoneFlags.MAP_VISIBILITY_ALL -> AdminGuiKeys.AdminGui.GUI_ZINT_MAP_VIS_ALL; + default -> AdminGuiKeys.AdminGui.GUI_ZINT_MAP_VIS_FACTION; }; cmd.set("#MapVisibilityBtn.Text", HFMessages.get(playerRef, visKey)); // Default indicator if (isDefault) { - cmd.set("#MapVisibilityDefault.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_DEFAULT)); + cmd.set("#MapVisibilityDefault.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZINT_DEFAULT)); cmd.set("#MapVisibilityDefault.Style.TextColor", "#555555"); } else { - cmd.set("#MapVisibilityDefault.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_CUSTOM)); + cmd.set("#MapVisibilityDefault.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZINT_CUSTOM)); cmd.set("#MapVisibilityDefault.Style.TextColor", "#FFAA00"); } @@ -276,14 +276,14 @@ public void handleDataEvent(Ref ref, Store store, private void handleToggleFlag(Player player, AdminZoneSettingsData data) { String flagName = data.flag; if (flagName == null || !ZoneFlags.isValidFlag(flagName)) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_INVALID_FLAG)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.ZFLAGS_INVALID_FLAG)); sendUpdate(); return; } Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_ZONE_NOT_FOUND)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.ZFLAGS_ZONE_NOT_FOUND)); sendUpdate(); return; } @@ -307,7 +307,7 @@ private void handleToggleFlag(Player player, AdminZoneSettingsData data) { private void handleCycleMapVisibility(Player player) { Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_ZONE_NOT_FOUND)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.ZFLAGS_ZONE_NOT_FOUND)); sendUpdate(); return; } @@ -339,7 +339,7 @@ private void handleResetDefaults(Player player) { // Clear only integration flags and settings, not all zone flags Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_ZONE_NOT_FOUND)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.ZFLAGS_ZONE_NOT_FOUND)); sendUpdate(); return; } @@ -355,7 +355,7 @@ private void handleResetDefaults(Player player) { } } - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ZFLAGS_RESET_INT)); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.ZFLAGS_RESET_INT)); rebuildPage(); } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneMapPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneMapPage.java index 40d520bb..4bb21aee 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneMapPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneMapPage.java @@ -15,7 +15,8 @@ import com.hyperfactions.util.Logger; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -121,7 +122,7 @@ public void build(Ref ref, UICommandBuilder cmd, Player player = store.getComponent(ref, Player.getComponentType()); TransformComponent transform = store.getComponent(ref, TransformComponent.getComponentType()); World world = player != null ? player.getWorld() : null; - String worldName = world != null ? world.getName() : HFMessages.get(playerRef, MessageKeys.Common.WORLD_FALLBACK); + String worldName = world != null ? world.getName() : HFMessages.get(playerRef, CommonKeys.Common.WORLD_FALLBACK); // Check if player is in the same world as the zone boolean sameWorld = zone.world().equals(worldName); @@ -143,16 +144,16 @@ public void build(Ref ref, UICommandBuilder cmd, } // Localize labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ZONE_MAP)); - cmd.set("#ActionHint.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MAP_ACTION_HINT)); - cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MAP_DONE)); - cmd.set("#LegendZoneSafe.Text", " " + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MAP_LEGEND_ZONE_SAFE)); - cmd.set("#LegendZoneWar.Text", " " + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MAP_LEGEND_ZONE_WAR)); - cmd.set("#LegendOtherSafe.Text", " " + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MAP_LEGEND_OTHER_SAFE)); - cmd.set("#LegendOtherWar.Text", " " + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MAP_LEGEND_OTHER_WAR)); - cmd.set("#LegendFactionClaim.Text", " " + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MAP_LEGEND_FACTION)); - cmd.set("#LegendUnclaimed.Text", " " + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MAP_LEGEND_UNCLAIMED)); - cmd.set("#LegendYouAreHere.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MAP_LEGEND_YOU_HERE)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_ZONE_MAP)); + cmd.set("#ActionHint.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MAP_ACTION_HINT)); + cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MAP_DONE)); + cmd.set("#LegendZoneSafe.Text", " " + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MAP_LEGEND_ZONE_SAFE)); + cmd.set("#LegendZoneWar.Text", " " + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MAP_LEGEND_ZONE_WAR)); + cmd.set("#LegendOtherSafe.Text", " " + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MAP_LEGEND_OTHER_SAFE)); + cmd.set("#LegendOtherWar.Text", " " + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MAP_LEGEND_OTHER_WAR)); + cmd.set("#LegendFactionClaim.Text", " " + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MAP_LEGEND_FACTION)); + cmd.set("#LegendUnclaimed.Text", " " + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MAP_LEGEND_UNCLAIMED)); + cmd.set("#LegendYouAreHere.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MAP_LEGEND_YOU_HERE)); // Zone header info cmd.set("#ZoneTitle.Text", zone.name() + " (" + zone.type().getDisplayName() + ")"); @@ -160,13 +161,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Show world mismatch warning if player is in different world if (!sameWorld) { - cmd.set("#PositionInfo.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.MAP_WORLD_WARNING, worldName, zone.world())); + cmd.set("#PositionInfo.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.MAP_WORLD_WARNING, worldName, zone.world())); } else { - cmd.set("#PositionInfo.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.MAP_POSITION, playerChunkX, playerChunkZ)); + cmd.set("#PositionInfo.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.MAP_POSITION, playerChunkX, playerChunkZ)); } // Dynamic legend: add OrbisGuard protected region entry when OG is available - String protectedLabel = " " + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MAP_PROTECTED); + String protectedLabel = " " + HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_MAP_PROTECTED); if (OrbisGuardIntegration.isAvailable()) { if (terrainEnabled) { // Terrain mode: append to row 2 (#LegendContainer[1]) @@ -449,7 +450,7 @@ public void handleDataEvent(Ref ref, Store store, // Get fresh zone data Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.MAP_ZONE_GONE)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.MAP_ZONE_GONE)); guiManager.openAdminZone(player, ref, store, playerRef); return; } @@ -470,9 +471,9 @@ public void handleDataEvent(Ref ref, Store store, case "Claim" -> { ZoneManager.ZoneResult result = zoneManager.claimChunk(zoneId, zoneWorld, data.chunkX, data.chunkZ); if (result == ZoneManager.ZoneResult.SUCCESS) { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MAP_CLAIMED, "#44cc44", data.chunkX, data.chunkZ, zone.name())); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.MAP_CLAIMED, "#44cc44", data.chunkX, data.chunkZ, zone.name())); } else { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.MAP_CLAIM_FAILED, result)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.MAP_CLAIM_FAILED, result)); } // Refresh by opening new page with fresh zone data, preserving openFlagsAfter @@ -485,9 +486,9 @@ public void handleDataEvent(Ref ref, Store store, case "Unclaim" -> { ZoneManager.ZoneResult result = zoneManager.unclaimChunk(zoneId, zoneWorld, data.chunkX, data.chunkZ); if (result == ZoneManager.ZoneResult.SUCCESS) { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MAP_UNCLAIMED, "#44cc44", data.chunkX, data.chunkZ, zone.name())); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.MAP_UNCLAIMED, "#44cc44", data.chunkX, data.chunkZ, zone.name())); } else { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.MAP_UNCLAIM_FAILED, result)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.MAP_UNCLAIM_FAILED, result)); } // Refresh by opening new page with fresh zone data, preserving openFlagsAfter @@ -499,16 +500,16 @@ public void handleDataEvent(Ref ref, Store store, case "OtherZone" -> { Zone otherZone = zoneManager.getZone(zoneWorld, data.chunkX, data.chunkZ); - String zoneName = otherZone != null ? otherZone.name() : HFMessages.get(playerRef, MessageKeys.AdminGui.MAP_ANOTHER_ZONE); - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MAP_CHUNK_BELONGS, MessageUtil.COLOR_GOLD, zoneName)); + String zoneName = otherZone != null ? otherZone.name() : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.MAP_ANOTHER_ZONE); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.MAP_CHUNK_BELONGS, MessageUtil.COLOR_GOLD, zoneName)); } case "Faction" -> { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MAP_CHUNK_FACTION, MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.MAP_CHUNK_FACTION, MessageUtil.COLOR_GOLD)); } case "Protected" -> { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MAP_CHUNK_PROTECTED, MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.MAP_CHUNK_PROTECTED, MessageUtil.COLOR_GOLD)); } default -> {} diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePage.java index 6f3caf46..57675343 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePage.java @@ -8,7 +8,8 @@ import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -93,14 +94,14 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "zones", cmd, events); // Localize page title and common labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ZONES)); - cmd.set("#TabAll.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ALL)); - cmd.set("#TabSafe.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SAFE)); - cmd.set("#TabWar.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_WAR)); - cmd.set("#CreateZoneBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CREATE_ZONE)); - cmd.set("#SortLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SORT)); - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_NEXT)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_ZONES)); + cmd.set("#TabAll.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ALL)); + cmd.set("#TabSafe.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SAFE)); + cmd.set("#TabWar.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_WAR)); + cmd.set("#CreateZoneBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CREATE_ZONE)); + cmd.set("#SortLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_SORT)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_NEXT)); // Build zone list buildZoneList(cmd, events); @@ -136,10 +137,10 @@ private void buildZoneList(UICommandBuilder cmd, UIEventBuilder events) { // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_SORT_NAME)), "NAME"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_SORT_TYPE)), "TYPE"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_SORT_CHUNKS)), "CHUNKS"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_SORT_WORLD)), "WORLD") + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_SORT_NAME)), "NAME"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_SORT_TYPE)), "TYPE"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_SORT_CHUNKS)), "CHUNKS"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_SORT_WORLD)), "WORLD") )); cmd.set("#SortDropdown.Value", zoneSortMode.name()); events.addEventBinding( @@ -167,7 +168,7 @@ private void buildZoneList(UICommandBuilder cmd, UIEventBuilder events) { // Zone count (with total chunks) int totalChunks = zones.stream().mapToInt(Zone::getChunkCount).sum(); String tabLabel = currentTab.equals("all") ? "" : currentTab + " "; - cmd.set("#ZoneCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_COUNT_FORMAT, zones.size(), tabLabel, totalChunks)); + cmd.set("#ZoneCount.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_COUNT_FORMAT, zones.size(), tabLabel, totalChunks)); // Create zone button events.addEventBinding( @@ -196,7 +197,7 @@ private void buildZoneList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -241,8 +242,8 @@ private void buildZoneEntry(UICommandBuilder cmd, UIEventBuilder events, int ind cmd.set(idx + " #InlineChunks.Text", String.valueOf(zone.getChunkCount())); // Localize header labels - cmd.set(idx + " #WorldLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_ENTRY_WORLD)); - cmd.set(idx + " #InlineChunksLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_ENTRY_CHUNKS)); + cmd.set(idx + " #WorldLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_ENTRY_WORLD)); + cmd.set(idx + " #InlineChunksLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_ENTRY_CHUNKS)); // Expansion state cmd.set(idx + " #ExpandIcon.Visible", !isExpanded); @@ -261,15 +262,15 @@ private void buildZoneEntry(UICommandBuilder cmd, UIEventBuilder events, int ind // Extended info (only bind events if expanded) if (isExpanded) { // Localize expanded labels - cmd.set(idx + " #ChunksLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_ENTRY_CHUNKS)); - cmd.set(idx + " #BoundsLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_ENTRY_BOUNDS)); - cmd.set(idx + " #CreatedLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_ENTRY_CREATED)); + cmd.set(idx + " #ChunksLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_ENTRY_CHUNKS)); + cmd.set(idx + " #BoundsLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_ENTRY_BOUNDS)); + cmd.set(idx + " #CreatedLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_ENTRY_CREATED)); // Localize button texts - cmd.set(idx + " #EditMapBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_ENTRY_EDIT_MAP)); - cmd.set(idx + " #SettingsBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_ENTRY_FLAGS)); - cmd.set(idx + " #SettingsBtn2.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_ENTRY_SETTINGS)); - cmd.set(idx + " #DeleteBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_ENTRY_DELETE)); + cmd.set(idx + " #EditMapBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_ENTRY_EDIT_MAP)); + cmd.set(idx + " #SettingsBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_ENTRY_FLAGS)); + cmd.set(idx + " #SettingsBtn2.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_ENTRY_SETTINGS)); + cmd.set(idx + " #DeleteBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZONE_ENTRY_DELETE)); // Chunk count cmd.set(idx + " #ChunkCount.Text", String.valueOf(zone.getChunkCount())); @@ -287,7 +288,7 @@ private void buildZoneEntry(UICommandBuilder cmd, UIEventBuilder events, int ind cmd.set(idx + " #Bounds.Text", String.format("(%d,%d) to (%d,%d)", minX, minZ, maxX, maxZ)); } else { - cmd.set(idx + " #Bounds.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZONE_NO_CHUNKS)); + cmd.set(idx + " #Bounds.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZONE_NO_CHUNKS)); } // Created date @@ -411,14 +412,14 @@ public void handleDataEvent(Ref ref, Store store, if (data.zoneId != null) { UUID zoneId = UuidUtil.parseOrNull(data.zoneId); if (zoneId == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZONE_INVALID_ID)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZONE_INVALID_ID)); return; } Zone zone = zoneManager.getZoneById(zoneId); if (zone != null) { guiManager.openAdminZoneMap(player, ref, store, playerRef, zone); } else { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZONE_NOT_FOUND)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZONE_NOT_FOUND)); rebuildList(); } } @@ -428,7 +429,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.zoneId != null) { UUID zoneId = UuidUtil.parseOrNull(data.zoneId); if (zoneId == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZONE_INVALID_ID)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZONE_INVALID_ID)); return; } guiManager.openAdminZoneSettings(player, ref, store, playerRef, zoneId); @@ -439,7 +440,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.zoneId != null) { UUID zoneId = UuidUtil.parseOrNull(data.zoneId); if (zoneId == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZONE_INVALID_ID)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZONE_INVALID_ID)); return; } guiManager.openAdminZoneProperties(player, ref, store, playerRef, @@ -451,15 +452,15 @@ public void handleDataEvent(Ref ref, Store store, if (data.zoneId != null) { UUID zoneId = UuidUtil.parseOrNull(data.zoneId); if (zoneId == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZONE_INVALID_ID)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZONE_INVALID_ID)); return; } ZoneManager.ZoneResult result = zoneManager.removeZone(zoneId); if (result == ZoneManager.ZoneResult.SUCCESS) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZONE_DELETED, data.zoneName)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZONE_DELETED, data.zoneName)); expandedZones.remove(zoneId); } else { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZONE_DELETE_FAILED, result)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZONE_DELETE_FAILED, result)); } rebuildList(); } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePropertiesPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePropertiesPage.java index 20581392..24924290 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePropertiesPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePropertiesPage.java @@ -8,7 +8,8 @@ import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -75,28 +76,28 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "zones", cmd, events); // Localize labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ZONE_PROPERTIES)); - cmd.set("#GeneralHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZPROP_GENERAL)); - cmd.set("#ZoneNameLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZPROP_ZONE_NAME)); - cmd.set("#ZoneTypeLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZPROP_ZONE_TYPE)); - cmd.set("#ChangeTypeBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZPROP_CHANGE_TYPE)); - cmd.set("#NotificationsHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZPROP_NOTIFICATIONS)); - cmd.set("#UpperTitleLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZPROP_UPPER_DESC)); - cmd.set("#LowerTitleLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZPROP_LOWER_DESC)); - String saveText = HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SAVE); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_ZONE_PROPERTIES)); + cmd.set("#GeneralHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZPROP_GENERAL)); + cmd.set("#ZoneNameLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZPROP_ZONE_NAME)); + cmd.set("#ZoneTypeLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZPROP_ZONE_TYPE)); + cmd.set("#ChangeTypeBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZPROP_CHANGE_TYPE)); + cmd.set("#NotificationsHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZPROP_NOTIFICATIONS)); + cmd.set("#UpperTitleLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZPROP_UPPER_DESC)); + cmd.set("#LowerTitleLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZPROP_LOWER_DESC)); + String saveText = HFMessages.get(playerRef, CommonKeys.Common.SAVE); cmd.set("#SaveNameBtn.Text", saveText); cmd.set("#SaveUpperBtn.Text", saveText); cmd.set("#SaveLowerBtn.Text", saveText); - String clearText = HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CLEAR); + String clearText = HFMessages.get(playerRef, CommonKeys.Common.CLEAR); cmd.set("#ClearUpperBtn.Text", clearText); cmd.set("#ClearLowerBtn.Text", clearText); - cmd.set("#FlagsBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZPROP_EDIT_FLAGS)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZPROP_BACK_TO_ZONES)); + cmd.set("#FlagsBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZPROP_EDIT_FLAGS)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZPROP_BACK_TO_ZONES)); // Get the zone Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - cmd.set("#ZoneName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_ZONE_NOT_FOUND)); + cmd.set("#ZoneName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZINT_ZONE_NOT_FOUND)); cmd.set("#GeneralBox.Visible", false); cmd.set("#NotificationsBox.Visible", false); return; @@ -172,11 +173,11 @@ private void buildNotifications(UICommandBuilder cmd, UIEventBuilder events, Zon // Upper title String upperCustom = zone.notifyTitleUpper(); if (upperCustom != null && !upperCustom.isEmpty()) { - cmd.set("#UpperCurrent.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_CURRENT_CUSTOM, upperCustom)); + cmd.set("#UpperCurrent.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZPROP_CURRENT_CUSTOM, upperCustom)); cmd.set("#UpperTitleInput.Value", upperCustom); } else { - String defaultUpper = zone.isSafeZone() ? HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_PVP_DISABLED) : HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_PVP_ENABLED); - cmd.set("#UpperCurrent.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_CURRENT_DEFAULT, defaultUpper)); + String defaultUpper = zone.isSafeZone() ? HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZPROP_PVP_DISABLED) : HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZPROP_PVP_ENABLED); + cmd.set("#UpperCurrent.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZPROP_CURRENT_DEFAULT, defaultUpper)); } events.addEventBinding( @@ -199,10 +200,10 @@ private void buildNotifications(UICommandBuilder cmd, UIEventBuilder events, Zon // Lower title String lowerCustom = zone.notifyTitleLower(); if (lowerCustom != null && !lowerCustom.isEmpty()) { - cmd.set("#LowerCurrent.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_CURRENT_CUSTOM, lowerCustom)); + cmd.set("#LowerCurrent.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZPROP_CURRENT_CUSTOM, lowerCustom)); cmd.set("#LowerTitleInput.Value", lowerCustom); } else { - cmd.set("#LowerCurrent.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_CURRENT_DEFAULT, zone.name())); + cmd.set("#LowerCurrent.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZPROP_CURRENT_DEFAULT, zone.name())); } events.addEventBinding( @@ -288,7 +289,7 @@ public void handleDataEvent(Ref ref, Store store, private void handleSaveName(Player player, AdminZonePropertiesData data) { String newName = data.name; if (newName == null || newName.isBlank()) { - nameError = HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_NAME_EMPTY); + nameError = HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZPROP_NAME_EMPTY); rebuildPage(); return; } @@ -299,11 +300,11 @@ private void handleSaveName(Player player, AdminZonePropertiesData data) { switch (result) { case SUCCESS -> { nameError = null; - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ZPROP_RENAMED, newName)); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.ZPROP_RENAMED, newName)); } - case NAME_TAKEN -> nameError = HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_NAME_TAKEN); - case INVALID_NAME -> nameError = HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_NAME_INVALID); - default -> nameError = HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_RENAME_FAILED, result); + case NAME_TAKEN -> nameError = HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZPROP_NAME_TAKEN); + case INVALID_NAME -> nameError = HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZPROP_NAME_INVALID); + default -> nameError = HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZPROP_RENAME_FAILED, result); } rebuildPage(); @@ -327,38 +328,38 @@ private void handleToggleNotify(Player player) { private void handleSaveUpper(Player player, AdminZonePropertiesData data) { String upper = data.upperTitle; if (upper == null || upper.isBlank()) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZPROP_UPPER_EMPTY)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.ZPROP_UPPER_EMPTY)); sendUpdate(); return; } zoneManager.setZoneNotifyTitle(zoneId, upper.trim(), null); - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ZPROP_UPPER_SET)); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.ZPROP_UPPER_SET)); rebuildPage(); } private void handleClearUpper(Player player) { zoneManager.setZoneNotifyTitle(zoneId, "clear", null); - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ZPROP_UPPER_RESET)); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.ZPROP_UPPER_RESET)); rebuildPage(); } private void handleSaveLower(Player player, AdminZonePropertiesData data) { String lower = data.lowerTitle; if (lower == null || lower.isBlank()) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZPROP_LOWER_EMPTY)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.ZPROP_LOWER_EMPTY)); sendUpdate(); return; } zoneManager.setZoneNotifyTitle(zoneId, null, lower.trim()); - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ZPROP_LOWER_SET)); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.ZPROP_LOWER_SET)); rebuildPage(); } private void handleClearLower(Player player) { zoneManager.setZoneNotifyTitle(zoneId, null, "clear"); - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ZPROP_LOWER_RESET)); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.ZPROP_LOWER_RESET)); rebuildPage(); } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneSettingsPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneSettingsPage.java index ac7d7d63..322a449f 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneSettingsPage.java @@ -10,7 +10,7 @@ import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -100,30 +100,30 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "zones", cmd, events); // Localize labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ZONE_SETTINGS)); - cmd.set("#CatCombat.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_CAT_COMBAT)); - cmd.set("#CatDamage.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_CAT_DAMAGE)); - cmd.set("#CatDeath.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_CAT_DEATH)); - cmd.set("#CatBuilding.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_CAT_BUILDING)); - cmd.set("#CatInteraction.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_CAT_INTERACTION)); - cmd.set("#CatTransport.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_CAT_TRANSPORT)); - cmd.set("#CatItems.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_CAT_ITEMS)); - cmd.set("#CatSpawning.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_CAT_SPAWNING)); - cmd.set("#CatMobClear.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_CAT_MOB_CLEAR)); - String childrenHint = HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_CHILDREN_HINT); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_TITLE_ZONE_SETTINGS)); + cmd.set("#CatCombat.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_CAT_COMBAT)); + cmd.set("#CatDamage.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_CAT_DAMAGE)); + cmd.set("#CatDeath.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_CAT_DEATH)); + cmd.set("#CatBuilding.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_CAT_BUILDING)); + cmd.set("#CatInteraction.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_CAT_INTERACTION)); + cmd.set("#CatTransport.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_CAT_TRANSPORT)); + cmd.set("#CatItems.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_CAT_ITEMS)); + cmd.set("#CatSpawning.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_CAT_SPAWNING)); + cmd.set("#CatMobClear.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_CAT_MOB_CLEAR)); + String childrenHint = HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_CHILDREN_HINT); cmd.set("#CatCombatSub.Text", childrenHint); cmd.set("#CatBuildingSub.Text", childrenHint); cmd.set("#CatInteractionSub.Text", childrenHint); cmd.set("#CatSpawningSub.Text", childrenHint); cmd.set("#CatMobClearSub.Text", childrenHint); - cmd.set("#ResetBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_RESET_DEFAULTS)); - cmd.set("#IntegrationFlagsBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_INTEGRATION_FLAGS)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_BACK_TO_ZONES)); + cmd.set("#ResetBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_RESET_DEFAULTS)); + cmd.set("#IntegrationFlagsBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_INTEGRATION_FLAGS)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_BACK_TO_ZONES)); // Get the zone Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - cmd.set("#ZoneName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_ZONE_NOT_FOUND)); + cmd.set("#ZoneName.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZINT_ZONE_NOT_FOUND)); cmd.set("#FlagsContainer.Visible", false); return; } @@ -131,7 +131,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Zone info header cmd.set("#ZoneName.Text", zone.name()); cmd.set("#ZoneType.Text", zone.type().name()); - cmd.set("#ZoneChunks.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_CHUNKS, zone.getChunkCount())); + cmd.set("#ZoneChunks.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZSET_CHUNKS, zone.getChunkCount())); // Type indicator color String typeColor = zone.isSafeZone() ? "#55FF55" : "#FF5555"; @@ -176,7 +176,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Back button - text depends on back target if ("settings".equals(backTarget)) { - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZFLAGS_BACK_TO_SETTINGS)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZFLAGS_BACK_TO_SETTINGS)); } events.addEventBinding( CustomUIEventBindingType.Activating, @@ -240,16 +240,16 @@ private void buildFlagToggle(UICommandBuilder cmd, UIEventBuilder events, // Default indicator (shows "(default)" or "(custom)" or "(mixin)" or "(conflict)") if (spawnConflict) { - cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZFLAGS_CONFLICT)); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZFLAGS_CONFLICT)); cmd.set(idx + "Default.Style.TextColor", "#FF5555"); } else if (mixinUnavailable) { - cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZFLAGS_MIXIN)); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZFLAGS_MIXIN)); cmd.set(idx + "Default.Style.TextColor", "#FF5555"); } else if (isDefault) { - cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_DEFAULT)); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZINT_DEFAULT)); cmd.set(idx + "Default.Style.TextColor", "#555555"); } else { - cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_CUSTOM)); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.ZINT_CUSTOM)); cmd.set(idx + "Default.Style.TextColor", "#FFAA00"); } @@ -333,14 +333,14 @@ public void handleDataEvent(Ref ref, Store store, private void handleToggleFlag(Player player, AdminZoneSettingsData data) { String flagName = data.flag; if (flagName == null || !ZoneFlags.isValidFlag(flagName)) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_INVALID_FLAG)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.ZFLAGS_INVALID_FLAG)); sendUpdate(); return; } Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_ZONE_NOT_FOUND)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.ZFLAGS_ZONE_NOT_FOUND)); sendUpdate(); return; } @@ -368,9 +368,9 @@ private void handleResetDefaults(Player player, AdminZoneSettingsData data) { ZoneManager.ZoneResult result = zoneManager.clearAllZoneFlags(zoneId); if (result == ZoneManager.ZoneResult.SUCCESS) { - player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ZFLAGS_RESET_ALL)); + player.sendMessage(MessageUtil.adminSuccess(playerRef, AdminGuiKeys.AdminGui.ZFLAGS_RESET_ALL)); } else { - player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_RESET_FAILED, result)); + player.sendMessage(MessageUtil.adminError(playerRef, AdminGuiKeys.AdminGui.ZFLAGS_RESET_FAILED, result)); } rebuildPage(); diff --git a/src/main/java/com/hyperfactions/gui/admin/page/CreateZoneWizardPage.java b/src/main/java/com/hyperfactions/gui/admin/page/CreateZoneWizardPage.java index 927c2219..22a7e635 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/CreateZoneWizardPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/CreateZoneWizardPage.java @@ -10,7 +10,8 @@ import com.hyperfactions.util.Logger; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -134,33 +135,33 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.CREATE_ZONE_WIZARD); // Localize labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_TITLE)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_BACK)); - cmd.set("#CreateBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_CREATE)); - cmd.set("#ZoneTypeHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_ZONE_TYPE)); - cmd.set("#SafeZoneDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_SAFE_DESC)); - cmd.set("#WarZoneDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_WAR_DESC)); - cmd.set("#ZoneNameHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_ZONE_NAME)); - cmd.set("#ZoneNameDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_NAME_DESC)); - cmd.set("#ClaimMethodHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_CLAIM_METHOD)); - cmd.set("#MethodNoneDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_METHOD_NONE_DESC)); - cmd.set("#MethodNone.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_METHOD_NONE)); - cmd.set("#MethodSingleDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_METHOD_SINGLE_DESC)); - cmd.set("#MethodSingle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_METHOD_SINGLE)); - cmd.set("#MethodCircleDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_METHOD_CIRCLE_DESC)); - cmd.set("#MethodCircle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_METHOD_CIRCLE)); - cmd.set("#MethodSquareDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_METHOD_SQUARE_DESC)); - cmd.set("#MethodSquare.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_METHOD_SQUARE)); - cmd.set("#MethodMapDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_METHOD_MAP_DESC)); - cmd.set("#MethodMap.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_METHOD_MAP)); - cmd.set("#RadiusHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_RADIUS)); - cmd.set("#CustomRadiusLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_CUSTOM_RADIUS)); - cmd.set("#ApplyCustomRadius.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_APPLY)); - cmd.set("#FlagsHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_FLAGS)); - cmd.set("#FlagsDefaultsDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_FLAGS_DEFAULTS_DESC)); - cmd.set("#FlagsDefaults.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_FLAGS_DEFAULTS)); - cmd.set("#FlagsCustomizeDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_FLAGS_CUSTOMIZE_DESC)); - cmd.set("#FlagsCustomize.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CZW_FLAGS_CUSTOMIZE)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_TITLE)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_BACK)); + cmd.set("#CreateBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_CREATE)); + cmd.set("#ZoneTypeHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_ZONE_TYPE)); + cmd.set("#SafeZoneDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_SAFE_DESC)); + cmd.set("#WarZoneDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_WAR_DESC)); + cmd.set("#ZoneNameHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_ZONE_NAME)); + cmd.set("#ZoneNameDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_NAME_DESC)); + cmd.set("#ClaimMethodHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_CLAIM_METHOD)); + cmd.set("#MethodNoneDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_METHOD_NONE_DESC)); + cmd.set("#MethodNone.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_METHOD_NONE)); + cmd.set("#MethodSingleDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_METHOD_SINGLE_DESC)); + cmd.set("#MethodSingle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_METHOD_SINGLE)); + cmd.set("#MethodCircleDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_METHOD_CIRCLE_DESC)); + cmd.set("#MethodCircle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_METHOD_CIRCLE)); + cmd.set("#MethodSquareDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_METHOD_SQUARE_DESC)); + cmd.set("#MethodSquare.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_METHOD_SQUARE)); + cmd.set("#MethodMapDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_METHOD_MAP_DESC)); + cmd.set("#MethodMap.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_METHOD_MAP)); + cmd.set("#RadiusHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_RADIUS)); + cmd.set("#CustomRadiusLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_CUSTOM_RADIUS)); + cmd.set("#ApplyCustomRadius.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_APPLY)); + cmd.set("#FlagsHeader.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_FLAGS)); + cmd.set("#FlagsDefaultsDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_FLAGS_DEFAULTS_DESC)); + cmd.set("#FlagsDefaults.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_FLAGS_DEFAULTS)); + cmd.set("#FlagsCustomizeDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_FLAGS_CUSTOMIZE_DESC)); + cmd.set("#FlagsCustomize.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_CZW_FLAGS_CUSTOMIZE)); // Restore preserved input value if (!preservedName.isEmpty()) { @@ -270,7 +271,7 @@ private void buildRadiusSection(UICommandBuilder cmd, UIEventBuilder events) { // Calculate and show preview int previewChunks = calculateChunkCount(selectedRadius, claimMethod == ClaimMethod.RADIUS_CIRCLE); - cmd.set("#RadiusPreview.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.WIZ_CHUNKS_PREVIEW, previewChunks)); + cmd.set("#RadiusPreview.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.WIZ_CHUNKS_PREVIEW, previewChunks)); // Highlight selected preset for (int preset : RADIUS_PRESETS) { @@ -358,7 +359,7 @@ public void handleDataEvent(Ref ref, Store store, Player player = store.getComponent(ref, Player.getComponentType()); PlayerRef playerRef = store.getComponent(ref, PlayerRef.getComponentType()); World world = player != null ? player.getWorld() : null; - String worldName = world != null ? world.getName() : HFMessages.get(playerRef, MessageKeys.Common.WORLD_FALLBACK); + String worldName = world != null ? world.getName() : HFMessages.get(playerRef, CommonKeys.Common.WORLD_FALLBACK); if (player == null || playerRef == null || data.button == null) { sendUpdate(); @@ -392,7 +393,7 @@ public void handleDataEvent(Ref ref, Store store, case "ApplyCustomRadius" -> { int newRadius = parseRadius(data.customRadius); if (newRadius < 1 || newRadius > MAX_RADIUS) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.WIZ_RADIUS_RANGE, MAX_RADIUS)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.WIZ_RADIUS_RANGE, MAX_RADIUS)); sendUpdate(); return; } @@ -444,26 +445,26 @@ private void handleCreate(Player player, Ref ref, Store MAX_NAME_LENGTH) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.WIZ_NAME_TOO_LONG, MAX_NAME_LENGTH)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.WIZ_NAME_TOO_LONG, MAX_NAME_LENGTH)); sendUpdate(); return; } // Check if name is already taken if (zoneManager.getZoneByName(name) != null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.WIZ_NAME_TAKEN)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.WIZ_NAME_TAKEN)); sendUpdate(); return; } @@ -480,21 +481,21 @@ private void handleCreate(Player player, Ref ref, Store ref, Store ref, Store 0) { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.WIZ_RADIUS_CLAIMED, "#44cc44", claimed, HFMessages.get(playerRef, circle ? MessageKeys.AdminGui.SHAPE_CIRCULAR : MessageKeys.AdminGui.SHAPE_SQUARE), radius)); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.WIZ_RADIUS_CLAIMED, "#44cc44", claimed, HFMessages.get(playerRef, circle ? AdminGuiKeys.AdminGui.SHAPE_CIRCULAR : AdminGuiKeys.AdminGui.SHAPE_SQUARE), radius)); newZone = zoneManager.getZoneById(newZone.id()); } else { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.WIZ_RADIUS_NO_CLAIMS, MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.WIZ_RADIUS_NO_CLAIMS, MessageUtil.COLOR_GOLD)); } } } @@ -539,7 +540,7 @@ private void handleCreate(Player player, Ref ref, Store { // No chunks to claim now if (method == ClaimMethod.NO_CLAIMS) { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.WIZ_NO_CLAIMS, "#888888")); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.WIZ_NO_CLAIMS, "#888888")); } } default -> throw new IllegalStateException("Unexpected value"); diff --git a/src/main/java/com/hyperfactions/gui/admin/page/ZoneChangeTypeModalPage.java b/src/main/java/com/hyperfactions/gui/admin/page/ZoneChangeTypeModalPage.java index e24c79bb..eb2a5de9 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/ZoneChangeTypeModalPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/ZoneChangeTypeModalPage.java @@ -8,7 +8,8 @@ import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.AdminGuiKeys; +import com.hyperfactions.util.CommonKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -85,18 +86,18 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.ZONE_CHANGE_TYPE_MODAL); // Localize labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZTYPE_TITLE)); - cmd.set("#ZoneLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZTYPE_ZONE_LABEL)); - cmd.set("#CurrentLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZTYPE_CURRENT)); - cmd.set("#WillBecomeLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZTYPE_WILL_BECOME)); - cmd.set("#NewLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZTYPE_NEW)); - cmd.set("#WarningLine1.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZTYPE_WARNING1)); - cmd.set("#WarningLine2.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZTYPE_WARNING2)); - cmd.set("#KeepFlagsDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZTYPE_KEEP_DESC)); - cmd.set("#KeepFlagsBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZTYPE_KEEP_FLAGS)); - cmd.set("#ResetFlagsDesc.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZTYPE_RESET_DESC)); - cmd.set("#ResetFlagsBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZTYPE_RESET_FLAGS)); - cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CANCEL)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZTYPE_TITLE)); + cmd.set("#ZoneLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZTYPE_ZONE_LABEL)); + cmd.set("#CurrentLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZTYPE_CURRENT)); + cmd.set("#WillBecomeLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZTYPE_WILL_BECOME)); + cmd.set("#NewLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZTYPE_NEW)); + cmd.set("#WarningLine1.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZTYPE_WARNING1)); + cmd.set("#WarningLine2.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZTYPE_WARNING2)); + cmd.set("#KeepFlagsDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZTYPE_KEEP_DESC)); + cmd.set("#KeepFlagsBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZTYPE_KEEP_FLAGS)); + cmd.set("#ResetFlagsDesc.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZTYPE_RESET_DESC)); + cmd.set("#ResetFlagsBtn.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZTYPE_RESET_FLAGS)); + cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.CANCEL)); // Zone name cmd.set("#ZoneName.Text", zone.name()); @@ -153,7 +154,7 @@ public void handleDataEvent(Ref ref, Store store, Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZTYPE_ZONE_GONE)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZTYPE_ZONE_GONE)); navigateBack(player, ref, store, playerRef); return; } @@ -186,11 +187,11 @@ private void handleTypeChange(Player player, Ref ref, Store ref, UICommandBuilder cmd, cmd.append(UIPaths.ZONE_RENAME_MODAL); // Localize labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZREN_TITLE)); - cmd.set("#CurrentLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZREN_CURRENT)); - cmd.set("#NewNameLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZREN_NEW_NAME)); - cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_CANCEL)); - cmd.set("#SaveBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_SAVE)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZREN_TITLE)); + cmd.set("#CurrentLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZREN_CURRENT)); + cmd.set("#NewNameLabel.Text", HFMessages.get(playerRef, AdminGuiKeys.AdminGui.GUI_ZREN_NEW_NAME)); + cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.CANCEL)); + cmd.set("#SaveBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.SAVE)); // Show current name cmd.set("#CurrentName.Text", zone.name()); @@ -115,7 +116,7 @@ public void handleDataEvent(Ref ref, Store store, Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_ZONE_GONE)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZREN_ZONE_GONE)); guiManager.openAdminZone(player, ref, store, playerRef, currentTab, currentPage); return; } @@ -130,7 +131,7 @@ public void handleDataEvent(Ref ref, Store store, // Validation if (newName == null || newName.trim().isEmpty()) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_ENTER_NAME)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZREN_ENTER_NAME)); sendUpdate(); return; } @@ -138,20 +139,20 @@ public void handleDataEvent(Ref ref, Store store, newName = newName.trim(); if (newName.length() < MIN_NAME_LENGTH) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_TOO_SHORT, MIN_NAME_LENGTH)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZREN_TOO_SHORT, MIN_NAME_LENGTH)); sendUpdate(); return; } if (newName.length() > MAX_NAME_LENGTH) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_TOO_LONG, MAX_NAME_LENGTH)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZREN_TOO_LONG, MAX_NAME_LENGTH)); sendUpdate(); return; } // Check if name is the same if (newName.equalsIgnoreCase(zone.name())) { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.ZREN_SAME_NAME, MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.ZREN_SAME_NAME, MessageUtil.COLOR_GOLD)); sendUpdate(); return; } @@ -162,23 +163,23 @@ public void handleDataEvent(Ref ref, Store store, switch (result) { case SUCCESS -> { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.ZREN_RENAMED, "#AAAAAA", oldName, newName)); + player.sendMessage(MessageUtil.text(playerRef, AdminGuiKeys.AdminGui.ZREN_RENAMED, "#AAAAAA", oldName, newName)); guiManager.openAdminZone(player, ref, store, playerRef, currentTab, currentPage); } case NAME_TAKEN -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_NAME_TAKEN)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZREN_NAME_TAKEN)); sendUpdate(); } case INVALID_NAME -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_INVALID_NAME)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZREN_INVALID_NAME)); sendUpdate(); } case NOT_FOUND -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_ZONE_GONE)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZREN_ZONE_GONE)); guiManager.openAdminZone(player, ref, store, playerRef, currentTab, currentPage); } default -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_RENAME_FAILED, result)); + player.sendMessage(MessageUtil.errorText(playerRef, AdminGuiKeys.AdminGui.ZREN_RENAME_FAILED, result)); sendUpdate(); } } diff --git a/src/main/java/com/hyperfactions/gui/faction/NavBarHelper.java b/src/main/java/com/hyperfactions/gui/faction/NavBarHelper.java index 73fa9a0c..0c32a2b7 100644 --- a/src/main/java/com/hyperfactions/gui/faction/NavBarHelper.java +++ b/src/main/java/com/hyperfactions/gui/faction/NavBarHelper.java @@ -7,7 +7,7 @@ import com.hyperfactions.gui.shared.NavBarUtil; import com.hyperfactions.gui.shared.data.NavAwareData; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; @@ -73,7 +73,7 @@ public static void setupBar( // "Player" button on far right cmd.append("#HyperFactionsNavBar #NavBarButtons", UIPaths.NAV_BUTTON); cmd.set("#HyperFactionsNavBar #NavBarButtons[2] #NavActionButton.Text", - HFMessages.get(playerRef, MessageKeys.Nav.PLAYER_SETTINGS)); + HFMessages.get(playerRef, GuiKeys.Nav.PLAYER_SETTINGS)); events.addEventBinding( CustomUIEventBindingType.Activating, "#HyperFactionsNavBar #NavBarButtons[2] #NavActionButton", diff --git a/src/main/java/com/hyperfactions/gui/faction/page/ChunkMapPage.java b/src/main/java/com/hyperfactions/gui/faction/page/ChunkMapPage.java index c0b70753..b42923ad 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/ChunkMapPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/ChunkMapPage.java @@ -16,7 +16,8 @@ import com.hyperfactions.integration.protection.OrbisGuardIntegration; import com.hyperfactions.manager.*; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.ChunkUtil; import com.hyperfactions.util.Logger; @@ -122,7 +123,7 @@ public void build(Ref ref, UICommandBuilder cmd, Player player = store.getComponent(ref, Player.getComponentType()); TransformComponent transform = store.getComponent(ref, TransformComponent.getComponentType()); World world = player != null ? player.getWorld() : null; - String worldName = world != null ? world.getName() : HFMessages.get(playerRef, MessageKeys.Common.WORLD_FALLBACK); + String worldName = world != null ? world.getName() : HFMessages.get(playerRef, CommonKeys.Common.WORLD_FALLBACK); int playerChunkX = 0; int playerChunkZ = 0; @@ -142,19 +143,19 @@ public void build(Ref ref, UICommandBuilder cmd, } // Localize static labels - cmd.set("#MapTitle.Text", HFMessages.get(playerRef, MessageKeys.MapGui.TITLE)); - cmd.set("#ActionHint.Text", HFMessages.get(playerRef, MessageKeys.MapGui.ACTION_HINT)); - cmd.set("#LegendYourLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_YOUR)); - cmd.set("#LegendAllyLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_ALLY)); - cmd.set("#LegendEnemyLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_ENEMY)); - cmd.set("#LegendOtherLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_OTHER)); + cmd.set("#MapTitle.Text", HFMessages.get(playerRef, GuiKeys.MapGui.TITLE)); + cmd.set("#ActionHint.Text", HFMessages.get(playerRef, GuiKeys.MapGui.ACTION_HINT)); + cmd.set("#LegendYourLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_YOUR)); + cmd.set("#LegendAllyLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_ALLY)); + cmd.set("#LegendEnemyLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_ENEMY)); + cmd.set("#LegendOtherLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_OTHER)); if (!terrainEnabled) { // Flat mode has additional legend entries - cmd.set("#LegendWildernessLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_WILDERNESS)); + cmd.set("#LegendWildernessLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_WILDERNESS)); } - cmd.set("#LegendSafeLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_SAFE)); - cmd.set("#LegendWarLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_WAR)); - cmd.set("#LegendYouLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_YOU)); + cmd.set("#LegendSafeLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_SAFE)); + cmd.set("#LegendWarLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_WAR)); + cmd.set("#LegendYouLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_YOU)); // Setup navigation bar - use new player nav when no faction if (viewerFaction != null) { @@ -164,7 +165,7 @@ public void build(Ref ref, UICommandBuilder cmd, } // Current position info - cmd.set("#PositionInfo.Text", HFMessages.get(playerRef, MessageKeys.MapGui.POSITION, playerChunkX, playerChunkZ)); + cmd.set("#PositionInfo.Text", HFMessages.get(playerRef, GuiKeys.MapGui.POSITION, playerChunkX, playerChunkZ)); // Dynamic legend: add OrbisGuard protected region entry when OG is available if (OrbisGuardIntegration.isAvailable()) { @@ -173,13 +174,13 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.appendInline("#LegendContainer[1]", "Group { LayoutMode: Left; Anchor: (Width: 110); " + "Group { Anchor: (Width: 10, Height: 10); Background: (Color: " + COLOR_OG_PROTECTED + "); } " - + "Label { Text: \" " + HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_PROTECTED) + "\"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } }"); + + "Label { Text: \" " + HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_PROTECTED) + "\"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } }"); } else { // Flat mode: append to column 3 (#LegendContainer[2]) cmd.appendInline("#LegendContainer[2]", "Group { LayoutMode: Left; Anchor: (Height: 16); " + "Group { Anchor: (Width: 12, Height: 12); Background: (Color: " + COLOR_OG_PROTECTED + "); } " - + "Label { Text: \" " + HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_PROTECTED) + "\"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } }"); + + "Label { Text: \" " + HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_PROTECTED) + "\"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } }"); } } @@ -198,7 +199,7 @@ public void build(Ref ref, UICommandBuilder cmd, int available = Math.max(0, maxClaims - currentClaims); // Claim stats: "Claims: 23/78 (55 Available)" - cmd.set("#ClaimStats.Text", HFMessages.get(playerRef, MessageKeys.MapGui.CLAIM_STATS, currentClaims, maxClaims, available)); + cmd.set("#ClaimStats.Text", HFMessages.get(playerRef, GuiKeys.MapGui.CLAIM_STATS, currentClaims, maxClaims, available)); // Power status with overclaim warning double currentPower = stats.currentPower(); @@ -208,13 +209,13 @@ public void build(Ref ref, UICommandBuilder cmd, if (isOverclaimed) { // Show overclaim warning in red int overclaimAmount = currentClaims - (int) currentPower; - cmd.set("#PowerStatus.Text", HFMessages.get(playerRef, MessageKeys.MapGui.OVERCLAIMED, overclaimAmount)); + cmd.set("#PowerStatus.Text", HFMessages.get(playerRef, GuiKeys.MapGui.OVERCLAIMED, overclaimAmount)); } else { // Normal power display - cmd.set("#PowerStatus.Text", HFMessages.get(playerRef, MessageKeys.MapGui.POWER_DISPLAY, (int) currentPower, (int) maxPower)); + cmd.set("#PowerStatus.Text", HFMessages.get(playerRef, GuiKeys.MapGui.POWER_DISPLAY, (int) currentPower, (int) maxPower)); } } else { - cmd.set("#ClaimStats.Text", HFMessages.get(playerRef, MessageKeys.MapGui.JOIN_TO_CLAIM)); + cmd.set("#ClaimStats.Text", HFMessages.get(playerRef, GuiKeys.MapGui.JOIN_TO_CLAIM)); cmd.set("#PowerStatus.Text", ""); } @@ -545,7 +546,7 @@ public void handleDataEvent(Ref ref, Store store, Faction viewerFaction = factionManager.getPlayerFaction(playerRef.getUuid()); World world = player.getWorld(); - String worldName = world != null ? world.getName() : HFMessages.get(playerRef, MessageKeys.Common.WORLD_FALLBACK); + String worldName = world != null ? world.getName() : HFMessages.get(playerRef, CommonKeys.Common.WORLD_FALLBACK); // Handle navigation - use new player nav when no faction if (viewerFaction != null) { @@ -571,16 +572,16 @@ private void handleClaim(Player player, PlayerRef playerRef, String worldName, ClaimManager.ClaimResult result = claimManager.claim(playerRef.getUuid(), worldName, chunkX, chunkZ); Message message = switch (result) { - case SUCCESS -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.CLAIM_SUCCESS, chunkX, chunkZ)).color("#55FF55")); - case NOT_IN_FACTION -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.CLAIM_NOT_IN_FACTION)).color("#FF5555")); - case NOT_OFFICER -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.CLAIM_NOT_OFFICER)).color("#FF5555")); - case ALREADY_CLAIMED_SELF -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.CLAIM_ALREADY_YOURS)).color("#FFAA00")); - case ALREADY_CLAIMED_OTHER -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.CLAIM_ALREADY_CLAIMED)).color("#FF5555")); - case NOT_ADJACENT -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.CLAIM_NOT_ADJACENT)).color("#FF5555")); - case MAX_CLAIMS_REACHED -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.CLAIM_MAX)).color("#FF5555")); - case WORLD_NOT_ALLOWED -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.CLAIM_WORLD_NOT_ALLOWED)).color("#FF5555")); - case ORBISGUARD_PROTECTED -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.CLAIM_ORBISGUARD)).color("#FF5555")); - default -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.CLAIM_FAILED)).color("#FF5555")); + case SUCCESS -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.CLAIM_SUCCESS, chunkX, chunkZ)).color("#55FF55")); + case NOT_IN_FACTION -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.CLAIM_NOT_IN_FACTION)).color("#FF5555")); + case NOT_OFFICER -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.CLAIM_NOT_OFFICER)).color("#FF5555")); + case ALREADY_CLAIMED_SELF -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.CLAIM_ALREADY_YOURS)).color("#FFAA00")); + case ALREADY_CLAIMED_OTHER -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.CLAIM_ALREADY_CLAIMED)).color("#FF5555")); + case NOT_ADJACENT -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.CLAIM_NOT_ADJACENT)).color("#FF5555")); + case MAX_CLAIMS_REACHED -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.CLAIM_MAX)).color("#FF5555")); + case WORLD_NOT_ALLOWED -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.CLAIM_WORLD_NOT_ALLOWED)).color("#FF5555")); + case ORBISGUARD_PROTECTED -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.CLAIM_ORBISGUARD)).color("#FF5555")); + default -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.CLAIM_FAILED)).color("#FF5555")); }; player.sendMessage(message); @@ -595,13 +596,13 @@ private void handleUnclaim(Player player, PlayerRef playerRef, String worldName, ClaimManager.ClaimResult result = claimManager.unclaim(playerRef.getUuid(), worldName, chunkX, chunkZ); Message message = switch (result) { - case SUCCESS -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.UNCLAIM_SUCCESS, chunkX, chunkZ)).color("#55FF55")); - case NOT_IN_FACTION -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.UNCLAIM_NOT_IN_FACTION)).color("#FF5555")); - case NOT_OFFICER -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.UNCLAIM_NOT_OFFICER)).color("#FF5555")); - case CHUNK_NOT_CLAIMED -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.UNCLAIM_NOT_CLAIMED)).color("#FFAA00")); - case NOT_YOUR_CLAIM -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.UNCLAIM_NOT_YOURS)).color("#FF5555")); - case CANNOT_UNCLAIM_HOME -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.UNCLAIM_HOME)).color("#FF5555")); - default -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.UNCLAIM_FAILED)).color("#FF5555")); + case SUCCESS -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.UNCLAIM_SUCCESS, chunkX, chunkZ)).color("#55FF55")); + case NOT_IN_FACTION -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.UNCLAIM_NOT_IN_FACTION)).color("#FF5555")); + case NOT_OFFICER -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.UNCLAIM_NOT_OFFICER)).color("#FF5555")); + case CHUNK_NOT_CLAIMED -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.UNCLAIM_NOT_CLAIMED)).color("#FFAA00")); + case NOT_YOUR_CLAIM -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.UNCLAIM_NOT_YOURS)).color("#FF5555")); + case CANNOT_UNCLAIM_HOME -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.UNCLAIM_HOME)).color("#FF5555")); + default -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.UNCLAIM_FAILED)).color("#FF5555")); }; player.sendMessage(message); @@ -616,14 +617,14 @@ private void handleOverclaim(Player player, PlayerRef playerRef, String worldNam ClaimManager.ClaimResult result = claimManager.overclaim(playerRef.getUuid(), worldName, chunkX, chunkZ); Message message = switch (result) { - case SUCCESS -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.OVERCLAIM_SUCCESS, chunkX, chunkZ)).color("#55FF55")); - case NOT_IN_FACTION -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.OVERCLAIM_NOT_IN_FACTION)).color("#FF5555")); - case NOT_OFFICER -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.OVERCLAIM_NOT_OFFICER)).color("#FF5555")); - case ALREADY_CLAIMED_SELF -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.OVERCLAIM_ALREADY_YOURS)).color("#FFAA00")); - case ALREADY_CLAIMED_ALLY -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.OVERCLAIM_ALLY)).color("#FF5555")); - case TARGET_HAS_POWER -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.OVERCLAIM_HAS_POWER)).color("#FF5555")); - case MAX_CLAIMS_REACHED -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.OVERCLAIM_MAX)).color("#FF5555")); - default -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, MessageKeys.MapGui.OVERCLAIM_FAILED)).color("#FF5555")); + case SUCCESS -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.OVERCLAIM_SUCCESS, chunkX, chunkZ)).color("#55FF55")); + case NOT_IN_FACTION -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.OVERCLAIM_NOT_IN_FACTION)).color("#FF5555")); + case NOT_OFFICER -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.OVERCLAIM_NOT_OFFICER)).color("#FF5555")); + case ALREADY_CLAIMED_SELF -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.OVERCLAIM_ALREADY_YOURS)).color("#FFAA00")); + case ALREADY_CLAIMED_ALLY -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.OVERCLAIM_ALLY)).color("#FF5555")); + case TARGET_HAS_POWER -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.OVERCLAIM_HAS_POWER)).color("#FF5555")); + case MAX_CLAIMS_REACHED -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.OVERCLAIM_MAX)).color("#FF5555")); + default -> CommandUtil.prefix().insert(Message.raw(HFMessages.get(playerRef, GuiKeys.MapGui.OVERCLAIM_FAILED)).color("#FF5555")); }; player.sendMessage(message); diff --git a/src/main/java/com/hyperfactions/gui/faction/page/DisbandConfirmPage.java b/src/main/java/com/hyperfactions/gui/faction/page/DisbandConfirmPage.java index 76f048bd..ddf9b9e5 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/DisbandConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/DisbandConfirmPage.java @@ -9,7 +9,8 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -58,11 +59,11 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.DISBAND_CONFIRM); // Static labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.DISBAND_TITLE)); - cmd.set("#ConfirmText.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.DISBAND_PROMPT)); - cmd.set("#WarningText.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.DISBAND_WARNING)); - cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.CANCEL)); - cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.DISBAND)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.DISBAND_TITLE)); + cmd.set("#ConfirmText.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.DISBAND_PROMPT)); + cmd.set("#WarningText.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.DISBAND_WARNING)); + cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.CANCEL)); + cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.DISBAND)); // Set faction name in the modal cmd.set("#FactionName.Text", faction.name()); @@ -102,7 +103,7 @@ public void handleDataEvent(Ref ref, Store store, // Verify leader permission if (member == null || member.role() != FactionRole.LEADER) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.DISBAND_NOT_LEADER)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.DISBAND_NOT_LEADER)); guiManager.openFactionSettings(player, ref, store, playerRef, factionManager.getFaction(faction.id())); return; @@ -123,9 +124,9 @@ public void handleDataEvent(Ref ref, Store store, FactionManager.FactionResult result = factionManager.disbandFaction(faction.id(), uuid); if (result == FactionManager.FactionResult.SUCCESS) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.DISBANDED, factionName)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.DISBANDED, factionName)); } else { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.DISBAND_FAILED)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.DISBAND_FAILED)); } guiManager.openFactionMain(player, ref, store, playerRef); diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionBrowserPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionBrowserPage.java index def7c46d..8e512029 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionBrowserPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionBrowserPage.java @@ -9,7 +9,8 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.manager.PowerManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; @@ -90,11 +91,11 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.FACTION_BROWSER); // Localize static labels - cmd.set("#BrowserTitle.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.TITLE)); - cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.SEARCH)); - cmd.set("#SortLabel.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.SORT)); - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.NEXT)); + cmd.set("#BrowserTitle.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.TITLE)); + cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.SEARCH)); + cmd.set("#SortLabel.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.SORT)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.NEXT)); // Setup navigation bar - use new player nav when no faction if (viewerFaction != null) { @@ -111,13 +112,13 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events, Facti // Get all factions sorted and filtered List entries = buildFactionEntryList(); - cmd.set("#FactionCount.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.FACTION_COUNT, entries.size())); + cmd.set("#FactionCount.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.FACTION_COUNT, entries.size())); // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.GuiCommon.SORT_POWER)), "POWER"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.BrowserGui.SORT_NAME)), "NAME"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.GuiCommon.SORT_MEMBERS)), "MEMBERS") + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.GuiCommon.SORT_POWER)), "POWER"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.BrowserGui.SORT_NAME)), "NAME"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.GuiCommon.SORT_MEMBERS)), "MEMBERS") )); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding( @@ -157,7 +158,7 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events, Facti } // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -206,7 +207,7 @@ private List buildFactionEntryList() { stats.currentPower(), stats.maxPower(), faction.claims().size(), - leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.NONE), + leader != null ? leader.username() : HFMessages.get(playerRef, CommonKeys.Common.NONE), faction.open(), faction.description(), faction.createdAt() @@ -237,7 +238,7 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int // Basic info cmd.set(idx + " #FactionName.Text", entry.name); - cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.LEADER_LABEL, entry.leaderName)); + cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.LEADER_LABEL, entry.leaderName)); // Stats cmd.set(idx + " #PowerDisplay.Text", String.format("%.0f/%.0f", entry.power, entry.maxPower)); @@ -245,13 +246,13 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int cmd.set(idx + " #MemberCount.Text", String.valueOf(entry.memberCount)); // Localized stat labels - cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.LABEL_POWER)); - cmd.set(idx + " #ClaimsLabel.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.LABEL_CLAIMS)); - cmd.set(idx + " #MemberLabel.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.LABEL_MEMBERS)); + cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.LABEL_POWER)); + cmd.set(idx + " #ClaimsLabel.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.LABEL_CLAIMS)); + cmd.set(idx + " #MemberLabel.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.LABEL_MEMBERS)); // Own faction indicator if (isOwnFaction) { - cmd.set(idx + " #OwnIndicator.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.OWN_FACTION)); + cmd.set(idx + " #OwnIndicator.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.OWN_FACTION)); } // Relation indicator (only for faction members viewing other factions) @@ -281,15 +282,15 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int // Extended info (only set values if expanded) if (isExpanded) { // Localized extended labels - cmd.set(idx + " #RecruitmentLabel.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.LABEL_RECRUITMENT)); - cmd.set(idx + " #CreatedLabel.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.LABEL_CREATED)); - cmd.set(idx + " #DescriptionLabel.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.LABEL_DESCRIPTION)); - cmd.set(idx + " #ViewInfoBtn.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.VIEW_INFO_BTN)); + cmd.set(idx + " #RecruitmentLabel.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.LABEL_RECRUITMENT)); + cmd.set(idx + " #CreatedLabel.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.LABEL_CREATED)); + cmd.set(idx + " #DescriptionLabel.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.LABEL_DESCRIPTION)); + cmd.set(idx + " #ViewInfoBtn.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.VIEW_INFO_BTN)); // Recruitment status cmd.set(idx + " #RecruitmentStatus.Text", entry.isOpen - ? HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) - : HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)); + ? HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_OPEN) + : HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_INVITE_ONLY)); cmd.set(idx + " #RecruitmentStatus.Style.TextColor", entry.isOpen ? "#44CC44" : "#FFAA00"); // Created date @@ -303,7 +304,7 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int : entry.description; cmd.set(idx + " #Description.Text", desc); } else { - cmd.set(idx + " #Description.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.NO_DESCRIPTION)); + cmd.set(idx + " #Description.Text", HFMessages.get(playerRef, CommonKeys.Common.NO_DESCRIPTION)); } // View Info button @@ -419,7 +420,7 @@ private void handleViewFaction(Player player, Ref ref, Store ref, UICommandBuilder cmd, cmd.append(UIPaths.FACTION_CHAT); // Localize static labels - cmd.set("#ChatTitle.Text", HFMessages.get(playerRef, MessageKeys.ChatGui.TITLE)); - cmd.set("#TabFactionBtn.Text", HFMessages.get(playerRef, MessageKeys.ChatGui.TAB_FACTION)); - cmd.set("#TabAllyBtn.Text", HFMessages.get(playerRef, MessageKeys.ChatGui.TAB_ALLY)); - cmd.set("#SendBtn.Text", HFMessages.get(playerRef, MessageKeys.ChatGui.SEND_BTN)); + cmd.set("#ChatTitle.Text", HFMessages.get(playerRef, GuiKeys.ChatGui.TITLE)); + cmd.set("#TabFactionBtn.Text", HFMessages.get(playerRef, GuiKeys.ChatGui.TAB_FACTION)); + cmd.set("#TabAllyBtn.Text", HFMessages.get(playerRef, GuiKeys.ChatGui.TAB_ALLY)); + cmd.set("#SendBtn.Text", HFMessages.get(playerRef, GuiKeys.ChatGui.SEND_BTN)); // Setup navigation bar NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); @@ -117,7 +117,7 @@ public void build(Ref ref, UICommandBuilder cmd, buildMessageList(cmd); // Chat input placeholder - cmd.set("#ChatInput.PlaceholderText", HFMessages.get(playerRef, MessageKeys.ChatGui.PLACEHOLDER)); + cmd.set("#ChatInput.PlaceholderText", HFMessages.get(playerRef, GuiKeys.ChatGui.PLACEHOLDER)); // Build chat input bar events buildChatInputEvents(events); @@ -165,7 +165,7 @@ private void buildMessageList(UICommandBuilder cmd) { if (messages.isEmpty()) { cmd.appendInline("#MessageList", - "Label { Text: \"" + HFMessages.get(playerRef, MessageKeys.ChatGui.NO_MESSAGES) + "\"; Style: (FontSize: 12, TextColor: #555555); " + "Label { Text: \"" + HFMessages.get(playerRef, GuiKeys.ChatGui.NO_MESSAGES) + "\"; Style: (FontSize: 12, TextColor: #555555); " + "Anchor: (Height: 30); }"); return; } @@ -237,13 +237,13 @@ private String formatTimestamp(long timestamp) { // Recent: show relative time if (ageMs < 60_000) { - return HFMessages.get(playerRef, MessageKeys.ChatGui.TIME_NOW); + return HFMessages.get(playerRef, GuiKeys.ChatGui.TIME_NOW); } else if (ageMs < 3_600_000) { long minutes = ageMs / 60_000; - return HFMessages.get(playerRef, MessageKeys.ChatGui.TIME_MINUTES, minutes); + return HFMessages.get(playerRef, GuiKeys.ChatGui.TIME_MINUTES, minutes); } else if (ageMs < 86_400_000) { long hours = ageMs / 3_600_000; - return HFMessages.get(playerRef, MessageKeys.ChatGui.TIME_HOURS, hours); + return HFMessages.get(playerRef, GuiKeys.ChatGui.TIME_HOURS, hours); } // Older: show date + time @@ -292,7 +292,7 @@ public void handleDataEvent(Ref ref, Store store, } case "TabAlly" -> { if (!PermissionManager.get().hasPermission(pRef.getUuid(), Permissions.CHAT_ALLY)) { - player.sendMessage(MessageUtil.errorText(pRef, MessageKeys.ChatGui.NO_ALLY_PERMISSION)); + player.sendMessage(MessageUtil.errorText(pRef, GuiKeys.ChatGui.NO_ALLY_PERMISSION)); rebuild(); return; } @@ -322,7 +322,7 @@ private void handleSendChat(Player player, PlayerRef pRef, FactionChatData data) String requiredPerm = (channel == ChatMessage.Channel.ALLY) ? Permissions.CHAT_ALLY : Permissions.CHAT_FACTION; if (!PermissionManager.get().hasPermission(uuid, requiredPerm)) { - player.sendMessage(MessageUtil.errorText(pRef, MessageKeys.ChatGui.NO_PERMISSION)); + player.sendMessage(MessageUtil.errorText(pRef, GuiKeys.ChatGui.NO_PERMISSION)); rebuild(); return; } @@ -330,7 +330,7 @@ private void handleSendChat(Player player, PlayerRef pRef, FactionChatData data) // Get fresh faction data Faction currentFaction = factionManager.getFaction(faction.id()); if (currentFaction == null) { - player.sendMessage(MessageUtil.errorText(pRef, MessageKeys.ChatGui.FACTION_GONE)); + player.sendMessage(MessageUtil.errorText(pRef, GuiKeys.ChatGui.FACTION_GONE)); rebuild(); return; } diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionDashboardPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionDashboardPage.java index cbcdd0dd..c8807e0a 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionDashboardPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionDashboardPage.java @@ -27,7 +27,9 @@ import com.hyperfactions.manager.TeleportManager; import com.hyperfactions.util.ChunkUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -108,7 +110,7 @@ public void build(Ref ref, UICommandBuilder cmd, if (currentFaction == null) { // Faction was deleted - show error cmd.append(UIPaths.ERROR_PAGE); - cmd.set("#ErrorMessage.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.FACTION_GONE)); + cmd.set("#ErrorMessage.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.FACTION_GONE)); return; } @@ -122,27 +124,27 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.FACTION_DASHBOARD); // Localize static labels - cmd.set("#DashboardTitle.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.TITLE)); - cmd.set("#PowerLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.POWER_LABEL)); - cmd.set("#ClaimsLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.LAND_LABEL)); - cmd.set("#MembersLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.MEMBERS_LABEL)); - cmd.set("#RelationsLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.RELATIONS_LABEL)); - cmd.set("#AllyEnemyLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.ALLY_ENEMY_LABEL)); - cmd.set("#StatusLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.STATUS_LABEL)); - cmd.set("#InvitesLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.INVITES_LABEL)); - cmd.set("#SentRequestsLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.SENT_REQUESTS_LABEL)); - cmd.set("#TreasuryLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.TREASURY_LABEL)); - cmd.set("#UpkeepLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.UPKEEP_LABEL)); - cmd.set("#PerCycleLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.PER_CYCLE)); - cmd.set("#YourWalletLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.YOUR_WALLET)); - cmd.set("#PersonalBalanceLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.PERSONAL_BALANCE)); - cmd.set("#QuickActionsLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.QUICK_ACTIONS)); - cmd.set("#TeleportLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.TELEPORT_LABEL)); - cmd.set("#TerritoryLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.TERRITORY_LABEL)); - cmd.set("#ChannelLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.CHANNEL_LABEL)); - cmd.set("#MembershipLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.MEMBERSHIP_LABEL)); - cmd.set("#RecentActivityLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.RECENT_ACTIVITY)); - cmd.set("#ViewLogsBtn.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.VIEW_ALL)); + cmd.set("#DashboardTitle.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.TITLE)); + cmd.set("#PowerLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.POWER_LABEL)); + cmd.set("#ClaimsLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.LAND_LABEL)); + cmd.set("#MembersLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.MEMBERS_LABEL)); + cmd.set("#RelationsLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.RELATIONS_LABEL)); + cmd.set("#AllyEnemyLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.ALLY_ENEMY_LABEL)); + cmd.set("#StatusLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.STATUS_LABEL)); + cmd.set("#InvitesLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.INVITES_LABEL)); + cmd.set("#SentRequestsLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.SENT_REQUESTS_LABEL)); + cmd.set("#TreasuryLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.TREASURY_LABEL)); + cmd.set("#UpkeepLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.UPKEEP_LABEL)); + cmd.set("#PerCycleLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.PER_CYCLE)); + cmd.set("#YourWalletLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.YOUR_WALLET)); + cmd.set("#PersonalBalanceLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.PERSONAL_BALANCE)); + cmd.set("#QuickActionsLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.QUICK_ACTIONS)); + cmd.set("#TeleportLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.TELEPORT_LABEL)); + cmd.set("#TerritoryLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.TERRITORY_LABEL)); + cmd.set("#ChannelLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.CHANNEL_LABEL)); + cmd.set("#MembershipLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.MEMBERSHIP_LABEL)); + cmd.set("#RecentActivityLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.RECENT_ACTIVITY)); + cmd.set("#ViewLogsBtn.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.VIEW_ALL)); // Setup navigation bar setupNavBar(cmd, events); @@ -207,14 +209,14 @@ private void buildStatCards(UICommandBuilder cmd, Faction currentFaction) { int maxClaims = stats.maxClaims(); int available = Math.max(0, maxClaims - claimCount); cmd.set("#ClaimsValue.Text", claimCount + " / " + maxClaims); - cmd.set("#ClaimsAvailable.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.AVAILABLE, available)); + cmd.set("#ClaimsAvailable.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.AVAILABLE, available)); // Check if faction is raidable (at risk of overclaiming) boolean isRaidable = claimCount > maxClaims; if (isRaidable) { // Show warning - claims exceed power limit cmd.set("#ClaimsValue.Style.TextColor", "#FF5555"); - cmd.set("#ClaimsAvailable.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.AT_RISK)); + cmd.set("#ClaimsAvailable.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.AT_RISK)); cmd.set("#ClaimsAvailable.Style.TextColor", "#FF5555"); } @@ -222,7 +224,7 @@ private void buildStatCards(UICommandBuilder cmd, Faction currentFaction) { int totalMembers = currentFaction.members().size(); int onlineCount = countOnlineMembers(currentFaction); cmd.set("#MembersValue.Text", String.valueOf(totalMembers)); - cmd.set("#MembersOnline.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.ONLINE_COUNT, onlineCount)); + cmd.set("#MembersOnline.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.ONLINE_COUNT, onlineCount)); // Row 2: Relations, Status, Invites @@ -241,10 +243,10 @@ private void buildStatCards(UICommandBuilder cmd, Faction currentFaction) { // Status stat - Open/Invite Only if (currentFaction.open()) { - cmd.set("#StatusValue.Text", HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN)); + cmd.set("#StatusValue.Text", HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_OPEN)); cmd.set("#StatusValue.Style.TextColor", "#55FF55"); } else { - cmd.set("#StatusValue.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.STATUS_INVITE)); + cmd.set("#StatusValue.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.STATUS_INVITE)); cmd.set("#StatusValue.Style.TextColor", "#FFAA00"); } cmd.set("#StatusDesc.Text", ""); @@ -282,14 +284,14 @@ private void buildStatCards(UICommandBuilder cmd, Faction currentFaction) { FactionEconomy fEcon = econ.getEconomy(currentFaction.id()); if (fEcon != null && fEcon.upkeepGraceStartTimestamp() > 0) { cmd.set("#UpkeepValue.Style.TextColor", "#FF5555"); - cmd.set("#PerCycleLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.IN_GRACE)); + cmd.set("#PerCycleLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.IN_GRACE)); cmd.set("#PerCycleLabel.Style.TextColor", "#FF5555"); } else if (fEcon != null && fEcon.lastUpkeepTimestamp() > 0) { long intervalMs = ConfigManager.get().getUpkeepIntervalHours() * 3600_000L; long remaining = Math.max(0, (fEcon.lastUpkeepTimestamp() + intervalMs) - System.currentTimeMillis()); - cmd.set("#PerCycleLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.UPKEEP_IN, com.hyperfactions.economy.UpkeepProcessor.formatDuration(remaining))); + cmd.set("#PerCycleLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.UPKEEP_IN, com.hyperfactions.economy.UpkeepProcessor.formatDuration(remaining))); } else { - cmd.set("#PerCycleLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.BILLABLE_CHUNKS, billableChunks)); + cmd.set("#PerCycleLabel.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.BILLABLE_CHUNKS, billableChunks)); } // Color based on affordability @@ -304,7 +306,7 @@ private void buildStatCards(UICommandBuilder cmd, Faction currentFaction) { java.math.BigDecimal walletBalance = econ.getVaultProvider().getBalanceBigDecimal(viewerUuid); cmd.set("#WalletBalance.Text", econ.formatCurrencyCompact(walletBalance)); } catch (Exception e) { - cmd.set("#WalletBalance.Text", HFMessages.get(playerRef, MessageKeys.Common.NA)); + cmd.set("#WalletBalance.Text", HFMessages.get(playerRef, CommonKeys.Common.NA)); } } } @@ -329,8 +331,8 @@ private void buildQuickActions(UICommandBuilder cmd, UIEventBuilder events, && PermissionManager.get().hasPermission(viewerUuid, Permissions.HOME)) { cmd.append("#HomeBtnContainer", UIPaths.DASHBOARD_ACTION_BTN); cmd.set("#HomeBtnContainer #ActionBtn.Text", faction.hasHome() - ? HFMessages.get(playerRef, MessageKeys.DashboardGui.BTN_HOME) - : HFMessages.get(playerRef, MessageKeys.DashboardGui.BTN_SET_HOME)); + ? HFMessages.get(playerRef, GuiKeys.DashboardGui.BTN_HOME) + : HFMessages.get(playerRef, GuiKeys.DashboardGui.BTN_SET_HOME)); cmd.set("#HomeBtnContainer #ActionBtn.Style", Value.ref(UIPaths.STYLES, "CyanButtonStyle")); events.addEventBinding( @@ -346,7 +348,7 @@ private void buildQuickActions(UICommandBuilder cmd, UIEventBuilder events, // CLAIM button - only for officers+ with CLAIM permission if (isOfficerPlus && PermissionManager.get().hasPermission(viewerUuid, Permissions.CLAIM)) { cmd.append("#ClaimBtnContainer", UIPaths.DASHBOARD_ACTION_BTN); - cmd.set("#ClaimBtnContainer #ActionBtn.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.BTN_CLAIM)); + cmd.set("#ClaimBtnContainer #ActionBtn.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.BTN_CLAIM)); cmd.set("#ClaimBtnContainer #ActionBtn.Style", Value.ref(UIPaths.STYLES, "GreenButtonStyle")); events.addEventBinding( @@ -368,7 +370,7 @@ private void buildQuickActions(UICommandBuilder cmd, UIEventBuilder events, cmd.append("#ChatModeBtnContainer", UIPaths.DASHBOARD_ACTION_BTN); cmd.set("#ChatModeBtnContainer #ActionBtn.Text", - HFMessages.get(playerRef, MessageKeys.DashboardGui.CHAT_PREFIX, channelDisplay)); + HFMessages.get(playerRef, GuiKeys.DashboardGui.CHAT_PREFIX, channelDisplay)); events.addEventBinding( CustomUIEventBindingType.Activating, "#ChatModeBtnContainer #ActionBtn", @@ -382,7 +384,7 @@ private void buildQuickActions(UICommandBuilder cmd, UIEventBuilder events, // LEAVE button - flat red background for danger action if (PermissionManager.get().hasPermission(viewerUuid, Permissions.LEAVE)) { cmd.append("#LeaveBtnContainer", UIPaths.DASHBOARD_ACTION_BTN); - cmd.set("#LeaveBtnContainer #ActionBtn.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.BTN_LEAVE)); + cmd.set("#LeaveBtnContainer #ActionBtn.Text", HFMessages.get(playerRef, GuiKeys.DashboardGui.BTN_LEAVE)); cmd.set("#LeaveBtnContainer #ActionBtn.Style", Value.ref(UIPaths.STYLES, "FlatRedButtonStyle")); events.addEventBinding( @@ -410,7 +412,7 @@ private void buildActivityFeed(UICommandBuilder cmd, UIEventBuilder events, Fact int displayCount = Math.min(ACTIVITY_ENTRIES, logs.size()); if (displayCount == 0) { - String noActivityText = HFMessages.get(playerRef, MessageKeys.DashboardGui.NO_ACTIVITY); + String noActivityText = HFMessages.get(playerRef, GuiKeys.DashboardGui.NO_ACTIVITY); cmd.appendInline("#ActivityFeed", "Label { Text: \"" + noActivityText + "\"; Style: (FontSize: 11, TextColor: #555555); " + "Anchor: (Height: 26); }"); @@ -423,7 +425,7 @@ private void buildActivityFeed(UICommandBuilder cmd, UIEventBuilder events, Fact cmd.append("#ActivityFeed", UIPaths.ACTIVITY_ENTRY); cmd.set(idx + " #ActivityType.Text", - HFMessages.get(playerRef, MessageKeys.LogsGui.typeKey(log.type().name())).toUpperCase()); + HFMessages.get(playerRef, GuiKeys.LogsGui.typeKey(log.type().name())).toUpperCase()); cmd.set(idx + " #ActivityMessage.Text", HFMessages.resolveLogMessage(playerRef, log)); cmd.set(idx + " #ActivityTime.Text", formatTimeAgo(log.timestamp())); } @@ -434,16 +436,16 @@ private String formatTimeAgo(long timestamp) { long diff = now - timestamp; if (diff < TimeUnit.MINUTES.toMillis(1)) { - return HFMessages.get(playerRef, MessageKeys.DashboardGui.TIME_NOW); + return HFMessages.get(playerRef, GuiKeys.DashboardGui.TIME_NOW); } else if (diff < TimeUnit.HOURS.toMillis(1)) { long minutes = TimeUnit.MILLISECONDS.toMinutes(diff); - return HFMessages.get(playerRef, MessageKeys.DashboardGui.TIME_MINUTES, minutes); + return HFMessages.get(playerRef, GuiKeys.DashboardGui.TIME_MINUTES, minutes); } else if (diff < TimeUnit.DAYS.toMillis(1)) { long hours = TimeUnit.MILLISECONDS.toHours(diff); - return HFMessages.get(playerRef, MessageKeys.DashboardGui.TIME_HOURS, hours); + return HFMessages.get(playerRef, GuiKeys.DashboardGui.TIME_HOURS, hours); } else { long days = TimeUnit.MILLISECONDS.toDays(diff); - return HFMessages.get(playerRef, MessageKeys.DashboardGui.TIME_DAYS, days); + return HFMessages.get(playerRef, GuiKeys.DashboardGui.TIME_DAYS, days); } } @@ -471,7 +473,7 @@ public void handleDataEvent(Ref ref, Store store, // Verify still in faction if (currentFaction == null) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Common.NOT_IN_FACTION)); + player.sendMessage(MessageUtil.error(playerRef, CommonKeys.Common.NOT_IN_FACTION)); guiManager.openFactionMain(player, ref, store, playerRef); return; } @@ -492,7 +494,7 @@ public void handleDataEvent(Ref ref, Store store, if (isOfficerPlus) { handleSetHomeAction(player, ref, store, uuid, currentFaction); } else { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.DashboardGui.NO_HOME_HINT)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.DashboardGui.NO_HOME_HINT)); sendUpdate(); } } else { @@ -502,7 +504,7 @@ public void handleDataEvent(Ref ref, Store store, case "Claim" -> { if (!isOfficerPlus || !PermissionManager.get().hasPermission(uuid, Permissions.CLAIM)) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Claim.NOT_OFFICER)); + player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Claim.NOT_OFFICER)); sendUpdate(); return; } @@ -515,7 +517,7 @@ public void handleDataEvent(Ref ref, Store store, if (chatResult.isSuccess() && chatResult.channel() != null) { String display = ChatManager.getChannelDisplay(chatResult.channel()); player.sendMessage(Message.raw( - HFMessages.get(playerRef, MessageKeys.DashboardGui.CHAT_MODE_SET, display)) + HFMessages.get(playerRef, GuiKeys.DashboardGui.CHAT_MODE_SET, display)) .color("#AAAAAA")); } rebuild(); @@ -545,7 +547,7 @@ public void handleDataEvent(Ref ref, Store store, private void handleHomeAction(Player player, Ref ref, Store store, UUID uuid, Faction faction) { if (!faction.hasHome()) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Home.NO_HOME)); + player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Home.NO_HOME)); sendUpdate(); return; } @@ -553,7 +555,7 @@ private void handleHomeAction(Player player, Ref ref, Store ref, Store store, private void handleTeleportResult(Player player, TeleportManager.TeleportResult result) { switch (result) { - case NOT_IN_FACTION -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Common.NOT_IN_FACTION)); - case NO_HOME -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Home.NO_HOME)); - case COMBAT_TAGGED -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Home.COMBAT_TAGGED)); - case SUCCESS_INSTANT -> player.sendMessage(MessageUtil.success(playerRef, MessageKeys.Home.TELEPORTED)); + case NOT_IN_FACTION -> player.sendMessage(MessageUtil.error(playerRef, CommonKeys.Common.NOT_IN_FACTION)); + case NO_HOME -> player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Home.NO_HOME)); + case COMBAT_TAGGED -> player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Home.COMBAT_TAGGED)); + case SUCCESS_INSTANT -> player.sendMessage(MessageUtil.success(playerRef, CommandKeys.Home.TELEPORTED)); case ON_COOLDOWN, SUCCESS_WARMUP -> {} // Message sent by TeleportManager default -> {} } @@ -630,14 +632,14 @@ private void handleSetHomeAction(Player player, Ref ref, Store ref, Store ref, Store ref, Store ref, Store { player.sendMessage(MessageUtil.success(playerRef, - MessageKeys.DashboardGui.CLAIM_SUCCESS, chunkX, chunkZ)); + GuiKeys.DashboardGui.CLAIM_SUCCESS, chunkX, chunkZ)); // Refresh dashboard with updated faction data Faction fresh = factionManager.getFaction(faction.id()); if (fresh != null) { guiManager.openFactionDashboard(player, ref, store, playerRef, fresh); } } - case NOT_IN_FACTION -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Common.NOT_IN_FACTION)); - case NOT_OFFICER -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Claim.NOT_OFFICER)); - case ALREADY_CLAIMED_SELF -> player.sendMessage(MessageUtil.info(playerRef, MessageKeys.Claim.ALREADY_YOURS, MessageUtil.COLOR_GOLD)); - case ALREADY_CLAIMED_OTHER, ALREADY_CLAIMED_ALLY, ALREADY_CLAIMED_ENEMY -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Claim.ALREADY_CLAIMED)); - case MAX_CLAIMS_REACHED -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Claim.MAX_CLAIMS)); - case WORLD_NOT_ALLOWED -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Claim.WORLD_NOT_ALLOWED)); - case NOT_ADJACENT -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Claim.NOT_CONNECTED)); - case INSUFFICIENT_POWER -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Claim.INSUFFICIENT_POWER)); - case ORBISGUARD_PROTECTED -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Claim.ORBISGUARD)); - default -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Claim.FAILED)); + case NOT_IN_FACTION -> player.sendMessage(MessageUtil.error(playerRef, CommonKeys.Common.NOT_IN_FACTION)); + case NOT_OFFICER -> player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Claim.NOT_OFFICER)); + case ALREADY_CLAIMED_SELF -> player.sendMessage(MessageUtil.info(playerRef, CommandKeys.Claim.ALREADY_YOURS, MessageUtil.COLOR_GOLD)); + case ALREADY_CLAIMED_OTHER, ALREADY_CLAIMED_ALLY, ALREADY_CLAIMED_ENEMY -> player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Claim.ALREADY_CLAIMED)); + case MAX_CLAIMS_REACHED -> player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Claim.MAX_CLAIMS)); + case WORLD_NOT_ALLOWED -> player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Claim.WORLD_NOT_ALLOWED)); + case NOT_ADJACENT -> player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Claim.NOT_CONNECTED)); + case INSUFFICIENT_POWER -> player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Claim.INSUFFICIENT_POWER)); + case ORBISGUARD_PROTECTED -> player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Claim.ORBISGUARD)); + default -> player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Claim.FAILED)); } } diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionHelpPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionHelpPage.java index 6d6a51c0..02396549 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionHelpPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionHelpPage.java @@ -6,7 +6,7 @@ import com.hyperfactions.gui.faction.NavBarHelper; import com.hyperfactions.gui.faction.data.FactionPageData; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -52,29 +52,29 @@ public void build(Ref ref, UICommandBuilder cmd, NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); // Localize all static content - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.GETTING_STARTED_TITLE)); - cmd.set("#WhatTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.WHAT_ARE_FACTIONS_TITLE)); - cmd.set("#WhatDesc1.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.WHAT_ARE_FACTIONS_1)); - cmd.set("#WhatDesc2.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.WHAT_ARE_FACTIONS_2)); - cmd.set("#WhatBullet1.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.WHAT_ARE_FACTIONS_BULLET_1)); - cmd.set("#WhatBullet2.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.WHAT_ARE_FACTIONS_BULLET_2)); - cmd.set("#WhatBullet3.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.WHAT_ARE_FACTIONS_BULLET_3)); - cmd.set("#JoinTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.JOINING_TITLE)); - cmd.set("#JoinDesc.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.JOINING_DESC)); - cmd.set("#JoinBullet1.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.JOINING_BULLET_1)); - cmd.set("#JoinBullet2.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.JOINING_BULLET_2)); - cmd.set("#JoinBullet3.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.JOINING_BULLET_3)); - cmd.set("#CreateTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CREATING_TITLE)); - cmd.set("#CreateDesc.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CREATING_DESC)); - cmd.set("#CreateBullet1.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CREATING_BULLET_1)); - cmd.set("#CreateBullet2.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CREATING_BULLET_2)); - cmd.set("#CmdTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.COMMANDS_TITLE)); - cmd.set("#CmdF.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CMD_F)); - cmd.set("#CmdFList.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CMD_F_LIST)); - cmd.set("#CmdFJoin.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CMD_F_JOIN)); - cmd.set("#CmdFCreate.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CMD_F_CREATE)); - cmd.set("#CmdFHelp.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CMD_F_HELP)); - cmd.set("#TipText.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.TIP)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.GETTING_STARTED_TITLE)); + cmd.set("#WhatTitle.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.WHAT_ARE_FACTIONS_TITLE)); + cmd.set("#WhatDesc1.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.WHAT_ARE_FACTIONS_1)); + cmd.set("#WhatDesc2.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.WHAT_ARE_FACTIONS_2)); + cmd.set("#WhatBullet1.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.WHAT_ARE_FACTIONS_BULLET_1)); + cmd.set("#WhatBullet2.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.WHAT_ARE_FACTIONS_BULLET_2)); + cmd.set("#WhatBullet3.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.WHAT_ARE_FACTIONS_BULLET_3)); + cmd.set("#JoinTitle.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.JOINING_TITLE)); + cmd.set("#JoinDesc.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.JOINING_DESC)); + cmd.set("#JoinBullet1.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.JOINING_BULLET_1)); + cmd.set("#JoinBullet2.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.JOINING_BULLET_2)); + cmd.set("#JoinBullet3.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.JOINING_BULLET_3)); + cmd.set("#CreateTitle.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CREATING_TITLE)); + cmd.set("#CreateDesc.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CREATING_DESC)); + cmd.set("#CreateBullet1.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CREATING_BULLET_1)); + cmd.set("#CreateBullet2.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CREATING_BULLET_2)); + cmd.set("#CmdTitle.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.COMMANDS_TITLE)); + cmd.set("#CmdF.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CMD_F)); + cmd.set("#CmdFList.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CMD_F_LIST)); + cmd.set("#CmdFJoin.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CMD_F_JOIN)); + cmd.set("#CmdFCreate.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CMD_F_CREATE)); + cmd.set("#CmdFHelp.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CMD_F_HELP)); + cmd.set("#TipText.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.TIP)); } /** Handles data event. */ diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionInvitesPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionInvitesPage.java index edf5143b..bb244da8 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionInvitesPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionInvitesPage.java @@ -13,7 +13,8 @@ import com.hyperfactions.manager.JoinRequestManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -93,11 +94,11 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.FACTION_INVITES); // Localize static labels - cmd.set("#InvitesTitle.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.TITLE)); - cmd.set("#TabOutgoing.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.TAB_OUTGOING)); - cmd.set("#TabRequests.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.TAB_REQUESTS)); - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.NEXT)); + cmd.set("#InvitesTitle.Text", HFMessages.get(playerRef, GuiKeys.InvitesGui.TITLE)); + cmd.set("#TabOutgoing.Text", HFMessages.get(playerRef, GuiKeys.InvitesGui.TAB_OUTGOING)); + cmd.set("#TabRequests.Text", HFMessages.get(playerRef, GuiKeys.InvitesGui.TAB_REQUESTS)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.NEXT)); // Setup navigation bar NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); @@ -141,8 +142,8 @@ private void buildList(UICommandBuilder cmd, UIEventBuilder events) { // Count String countText = currentTab == Tab.OUTGOING - ? HFMessages.get(playerRef, MessageKeys.InvitesGui.INVITE_COUNT, items.size()) - : HFMessages.get(playerRef, MessageKeys.InvitesGui.REQUEST_COUNT, items.size()); + ? HFMessages.get(playerRef, GuiKeys.InvitesGui.INVITE_COUNT, items.size()) + : HFMessages.get(playerRef, GuiKeys.InvitesGui.REQUEST_COUNT, items.size()); cmd.set("#ItemCount.Text", countText); // Calculate pagination @@ -171,7 +172,7 @@ private void buildList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -211,7 +212,7 @@ private List getOutgoingInvites() { playerUuid.toString(), playerName, true, - HFMessages.get(playerRef, MessageKeys.InvitesGui.INVITED_BY, inviterName), + HFMessages.get(playerRef, GuiKeys.InvitesGui.INVITED_BY, inviterName), null, invite.getRemainingSeconds() )); @@ -229,7 +230,7 @@ private List getJoinRequests() { for (JoinRequest request : requests) { String message = request.message(); if (message == null || message.isBlank()) { - message = HFMessages.get(playerRef, MessageKeys.InvitesGui.NO_MESSAGE); + message = HFMessages.get(playerRef, GuiKeys.InvitesGui.NO_MESSAGE); } else if (message.length() > 50) { message = message.substring(0, 47) + "..."; } @@ -258,21 +259,21 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, String idx = "#IndexCards[" + index + "]"; // Localize entry labels and buttons - cmd.set(idx + " #MessageLabel.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.LABEL_MESSAGE)); - cmd.set(idx + " #CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.BTN_CANCEL)); - cmd.set(idx + " #AcceptBtn.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.BTN_ACCEPT)); - cmd.set(idx + " #DeclineBtn.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.BTN_DECLINE)); + cmd.set(idx + " #MessageLabel.Text", HFMessages.get(playerRef, GuiKeys.InvitesGui.LABEL_MESSAGE)); + cmd.set(idx + " #CancelBtn.Text", HFMessages.get(playerRef, GuiKeys.InvitesGui.BTN_CANCEL)); + cmd.set(idx + " #AcceptBtn.Text", HFMessages.get(playerRef, GuiKeys.InvitesGui.BTN_ACCEPT)); + cmd.set(idx + " #DeclineBtn.Text", HFMessages.get(playerRef, GuiKeys.InvitesGui.BTN_DECLINE)); // Basic info cmd.set(idx + " #PlayerName.Text", item.playerName); - cmd.set(idx + " #StatusInfo.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.EXPIRES, formatTime(item.remainingSeconds))); + cmd.set(idx + " #StatusInfo.Text", HFMessages.get(playerRef, GuiKeys.InvitesGui.EXPIRES, formatTime(item.remainingSeconds))); // Type badge if (item.isOutgoing) { - cmd.set(idx + " #TypeLabel.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.TYPE_OUTGOING)); + cmd.set(idx + " #TypeLabel.Text", HFMessages.get(playerRef, GuiKeys.InvitesGui.TYPE_OUTGOING)); cmd.set(idx + " #TypeLabel.Style.TextColor", "#55FFFF"); } else { - cmd.set(idx + " #TypeLabel.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.TYPE_REQUEST)); + cmd.set(idx + " #TypeLabel.Text", HFMessages.get(playerRef, GuiKeys.InvitesGui.TYPE_REQUEST)); cmd.set(idx + " #TypeLabel.Style.TextColor", "#FFAA00"); } @@ -294,7 +295,7 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, if (isExpanded) { if (item.isOutgoing) { // Outgoing invite - show inviter info - cmd.set(idx + " #InfoLabel.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.INVITED_BY_LABEL)); + cmd.set(idx + " #InfoLabel.Text", HFMessages.get(playerRef, GuiKeys.InvitesGui.INVITED_BY_LABEL)); cmd.set(idx + " #InfoValue.Text", item.inviterInfo); cmd.set(idx + " #MessageRow.Visible", false); @@ -341,9 +342,9 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, private String getEmptyMessage() { if (currentTab == Tab.OUTGOING) { - return HFMessages.get(playerRef, MessageKeys.InvitesGui.EMPTY_OUTGOING); + return HFMessages.get(playerRef, GuiKeys.InvitesGui.EMPTY_OUTGOING); } else { - return HFMessages.get(playerRef, MessageKeys.InvitesGui.EMPTY_REQUESTS); + return HFMessages.get(playerRef, GuiKeys.InvitesGui.EMPTY_REQUESTS); } } @@ -355,16 +356,16 @@ private String getPlayerName(UUID playerUuid) { return member.username(); } } - return HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); + return HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); } private String formatTime(int seconds) { if (seconds < 60) { - return HFMessages.get(playerRef, MessageKeys.InvitesGui.TIME_SECONDS, seconds); + return HFMessages.get(playerRef, GuiKeys.InvitesGui.TIME_SECONDS, seconds); } else if (seconds < 3600) { - return HFMessages.get(playerRef, MessageKeys.InvitesGui.TIME_MINUTES, seconds / 60); + return HFMessages.get(playerRef, GuiKeys.InvitesGui.TIME_MINUTES, seconds / 60); } else { - return HFMessages.get(playerRef, MessageKeys.InvitesGui.TIME_HOURS, seconds / 3600); + return HFMessages.get(playerRef, GuiKeys.InvitesGui.TIME_HOURS, seconds / 3600); } } @@ -443,7 +444,7 @@ private void handleCancelInvite(Player player, FactionPageData data) { UUID targetUuid = UuidUtil.parseOrNull(data.playerUuid); if (targetUuid == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.InvitesGui.INVALID_PLAYER)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.InvitesGui.INVALID_PLAYER)); sendUpdate(); return; } @@ -451,7 +452,7 @@ private void handleCancelInvite(Player player, FactionPageData data) { inviteManager.removeInvite(faction.id(), targetUuid); String playerName = getPlayerName(targetUuid); - player.sendMessage(Message.raw(HFMessages.get(playerRef, MessageKeys.InvitesGui.CANCELLED_INVITE, playerName)).color("#AAAAAA")); + player.sendMessage(Message.raw(HFMessages.get(playerRef, GuiKeys.InvitesGui.CANCELLED_INVITE, playerName)).color("#AAAAAA")); expandedItems.remove(data.playerUuid); rebuildList(); @@ -466,7 +467,7 @@ private void handleAcceptRequest(Player player, Ref ref, Store ref, Store ref, UICommandBuilder cmd, cmd.append(UIPaths.FACTION_LEADERBOARD); // Localize static labels - cmd.set("#LeaderboardTitle.Text", HFMessages.get(playerRef, MessageKeys.LeaderboardGui.TITLE)); - cmd.set("#RankByLabel.Text", HFMessages.get(playerRef, MessageKeys.LeaderboardGui.RANK_BY)); - cmd.set("#ColRankLabel.Text", HFMessages.get(playerRef, MessageKeys.LeaderboardGui.COL_RANK)); - cmd.set("#ColFactionLabel.Text", HFMessages.get(playerRef, MessageKeys.LeaderboardGui.COL_FACTION)); - cmd.set("#ColClaimsLabel.Text", HFMessages.get(playerRef, MessageKeys.LeaderboardGui.COL_CLAIMS)); - cmd.set("#ColMembersLabel.Text", HFMessages.get(playerRef, MessageKeys.LeaderboardGui.COL_MEMBERS)); - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.NEXT)); + cmd.set("#LeaderboardTitle.Text", HFMessages.get(playerRef, GuiKeys.LeaderboardGui.TITLE)); + cmd.set("#RankByLabel.Text", HFMessages.get(playerRef, GuiKeys.LeaderboardGui.RANK_BY)); + cmd.set("#ColRankLabel.Text", HFMessages.get(playerRef, GuiKeys.LeaderboardGui.COL_RANK)); + cmd.set("#ColFactionLabel.Text", HFMessages.get(playerRef, GuiKeys.LeaderboardGui.COL_FACTION)); + cmd.set("#ColClaimsLabel.Text", HFMessages.get(playerRef, GuiKeys.LeaderboardGui.COL_CLAIMS)); + cmd.set("#ColMembersLabel.Text", HFMessages.get(playerRef, GuiKeys.LeaderboardGui.COL_MEMBERS)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.NEXT)); // Setup navigation bar if (viewerFaction != null) { @@ -122,17 +123,17 @@ private void buildLeaderboard(UICommandBuilder cmd, UIEventBuilder events, @Nullable Faction viewerFaction) { List entries = buildEntryList(); - cmd.set("#FactionCount.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.FACTION_COUNT, entries.size())); + cmd.set("#FactionCount.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.FACTION_COUNT, entries.size())); // Sort dropdown List sortOptions = new ArrayList<>(); - sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.LeaderboardGui.SORT_KD)), "KD")); - sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.GuiCommon.SORT_POWER)), "POWER")); - sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.LeaderboardGui.SORT_TERRITORY)), "TERRITORY")); + sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.LeaderboardGui.SORT_KD)), "KD")); + sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.GuiCommon.SORT_POWER)), "POWER")); + sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.LeaderboardGui.SORT_TERRITORY)), "TERRITORY")); if (economyManager != null) { - sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.LeaderboardGui.SORT_BALANCE)), "BALANCE")); + sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.LeaderboardGui.SORT_BALANCE)), "BALANCE")); } - sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.GuiCommon.SORT_MEMBERS)), "MEMBERS")); + sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.GuiCommon.SORT_MEMBERS)), "MEMBERS")); cmd.set("#SortDropdown.Entries", sortOptions); cmd.set("#SortDropdown.Value", sortMode.name()); @@ -166,7 +167,7 @@ private void buildLeaderboard(UICommandBuilder cmd, UIEventBuilder events, } // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -215,7 +216,7 @@ private List buildEntryList() { faction.name(), faction.tag(), faction.color() != null ? faction.color() : "#00FFFF", - leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.NONE), + leader != null ? leader.username() : HFMessages.get(playerRef, CommonKeys.Common.NONE), stats.currentPower(), stats.maxPower(), faction.getClaimCount(), @@ -262,7 +263,7 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, } // Leader - cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.LEADER_LABEL, entry.leaderName)); + cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.LEADER_LABEL, entry.leaderName)); // Primary stat value based on sort mode String statValue = switch (sortMode) { @@ -271,7 +272,7 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, case TERRITORY -> String.valueOf(entry.claimCount); case BALANCE -> economyManager != null ? economyManager.formatCurrency(entry.balance) - : HFMessages.get(playerRef, MessageKeys.Common.NA); + : HFMessages.get(playerRef, CommonKeys.Common.NA); case MEMBERS -> String.valueOf(entry.memberCount); }; cmd.set(idx + " #StatValue.Text", statValue); diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionMainPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionMainPage.java index 465072fb..6ce43dbe 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionMainPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionMainPage.java @@ -8,7 +8,9 @@ import com.hyperfactions.gui.newplayer.NewPlayerNavBarHelper; import com.hyperfactions.manager.*; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommandKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; @@ -131,7 +133,7 @@ private void buildInviteNotification(UICommandBuilder cmd, UIEventBuilder events } private void buildNoFactionView(UICommandBuilder cmd, UIEventBuilder events) { - cmd.set("#FactionName.Text", HFMessages.get(playerRef, MessageKeys.FactionMainGui.NO_FACTION)); + cmd.set("#FactionName.Text", HFMessages.get(playerRef, GuiKeys.FactionMainGui.NO_FACTION)); // Show create/browse buttons cmd.append("#ActionArea", UIPaths.NO_FACTION_ACTIONS); @@ -278,7 +280,7 @@ private void handleAcceptInvite(Player player, Ref ref, Store ref, Store ref, Store ref, Store ref, Store ref, Store ref, Store store, @@ -373,10 +375,10 @@ private void handleLeave(Player player, Ref ref, Store FactionManager.FactionResult result = factionManager.removeMember(faction.id(), uuid, uuid, false); if (result == FactionManager.FactionResult.SUCCESS) { - player.sendMessage(MessageUtil.success(playerRef, MessageKeys.Leave.SUCCESS)); + player.sendMessage(MessageUtil.success(playerRef, CommandKeys.Leave.SUCCESS)); guiManager.openFactionMain(player, ref, store, playerRef); } else { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.FactionMainGui.LEAVE_FAILED, result)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.FactionMainGui.LEAVE_FAILED, result)); } } diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java index b1e202fa..56c21788 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java @@ -14,7 +14,8 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.manager.PowerManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.TimeUtil; import com.hyperfactions.util.UuidUtil; @@ -103,11 +104,11 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.FACTION_MEMBERS); // Localize static labels - cmd.set("#MembersTitle.Text", HFMessages.get(playerRef, MessageKeys.MembersGui.TITLE)); - cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.SEARCH)); - cmd.set("#SortLabel.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.SORT)); - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.NEXT)); + cmd.set("#MembersTitle.Text", HFMessages.get(playerRef, GuiKeys.MembersGui.TITLE)); + cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.SEARCH)); + cmd.set("#SortLabel.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.SORT)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.NEXT)); // Setup navigation bar NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); @@ -148,12 +149,12 @@ private void buildMemberList(UICommandBuilder cmd, UIEventBuilder events) { int endIdx = Math.min(startIdx + ITEMS_PER_PAGE, totalMembers); List pageMembers = allMembers.subList(startIdx, endIdx); - cmd.set("#MemberCount.Text", HFMessages.get(playerRef, MessageKeys.MembersGui.MEMBER_COUNT, totalMembers)); + cmd.set("#MemberCount.Text", HFMessages.get(playerRef, CommonKeys.Common.MEMBER_COUNT, totalMembers)); // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.MembersGui.SORT_ROLE)), "ROLE"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.MembersGui.SORT_LAST_ONLINE)), "LAST_ONLINE") + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.MembersGui.SORT_ROLE)), "ROLE"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.MembersGui.SORT_LAST_ONLINE)), "LAST_ONLINE") )); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding( @@ -227,15 +228,15 @@ private void buildMemberEntry(UICommandBuilder cmd, UIEventBuilder events, int i String idx = "#IndexCards[" + index + "]"; // Localize entry labels - cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, MessageKeys.MembersGui.LABEL_POWER)); - cmd.set(idx + " #JoinedLabel.Text", HFMessages.get(playerRef, MessageKeys.MembersGui.LABEL_JOINED)); - cmd.set(idx + " #LastDeathLabel.Text", HFMessages.get(playerRef, MessageKeys.MembersGui.LABEL_LAST_DEATH)); - cmd.set(idx + " #PromoteBtn.Text", HFMessages.get(playerRef, MessageKeys.MembersGui.BTN_PROMOTE)); - cmd.set(idx + " #DemoteBtn.Text", HFMessages.get(playerRef, MessageKeys.MembersGui.BTN_DEMOTE)); - cmd.set(idx + " #KickBtn.Text", HFMessages.get(playerRef, MessageKeys.MembersGui.BTN_KICK)); - cmd.set(idx + " #TransferBtn.Text", HFMessages.get(playerRef, MessageKeys.MembersGui.BTN_MAKE_LEADER)); - cmd.set(idx + " #ProfileBtn.Text", HFMessages.get(playerRef, MessageKeys.MembersGui.BTN_PROFILE)); - cmd.set(idx + " #SelfLabel.Text", HFMessages.get(playerRef, MessageKeys.MembersGui.SELF_LABEL)); + cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, GuiKeys.MembersGui.LABEL_POWER)); + cmd.set(idx + " #JoinedLabel.Text", HFMessages.get(playerRef, GuiKeys.MembersGui.LABEL_JOINED)); + cmd.set(idx + " #LastDeathLabel.Text", HFMessages.get(playerRef, GuiKeys.MembersGui.LABEL_LAST_DEATH)); + cmd.set(idx + " #PromoteBtn.Text", HFMessages.get(playerRef, GuiKeys.MembersGui.BTN_PROMOTE)); + cmd.set(idx + " #DemoteBtn.Text", HFMessages.get(playerRef, GuiKeys.MembersGui.BTN_DEMOTE)); + cmd.set(idx + " #KickBtn.Text", HFMessages.get(playerRef, GuiKeys.MembersGui.BTN_KICK)); + cmd.set(idx + " #TransferBtn.Text", HFMessages.get(playerRef, GuiKeys.MembersGui.BTN_MAKE_LEADER)); + cmd.set(idx + " #ProfileBtn.Text", HFMessages.get(playerRef, GuiKeys.MembersGui.BTN_PROFILE)); + cmd.set(idx + " #SelfLabel.Text", HFMessages.get(playerRef, GuiKeys.MembersGui.SELF_LABEL)); // Basic info cmd.set(idx + " #MemberName.Text", member.username()); @@ -246,8 +247,8 @@ private void buildMemberEntry(UICommandBuilder cmd, UIEventBuilder events, int i // Online status cmd.set(idx + " #OnlineStatus.Text", memberIsOnline - ? HFMessages.get(playerRef, MessageKeys.Common.ONLINE) - : HFMessages.get(playerRef, MessageKeys.Common.OFFLINE)); + ? HFMessages.get(playerRef, CommonKeys.Common.ONLINE) + : HFMessages.get(playerRef, CommonKeys.Common.OFFLINE)); cmd.set(idx + " #OnlineStatus.Style.TextColor", GuiColors.forOnlineStatus(memberIsOnline)); if (!memberIsOnline) { cmd.set(idx + " #LastOnline.Text", formatLastOnline(member.lastOnline())); @@ -283,14 +284,14 @@ private void buildMemberEntry(UICommandBuilder cmd, UIEventBuilder events, int i // Joined date String joinedDate = member.joinedAt() > 0 ? DATE_FORMAT.format(Instant.ofEpochMilli(member.joinedAt())) - : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); + : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); cmd.set(idx + " #JoinedDate.Text", joinedDate); // Last death (relative format) String lastDeathText = power.lastDeath() > 0 - ? HFMessages.get(playerRef, MessageKeys.MembersGui.AGO, + ? HFMessages.get(playerRef, GuiKeys.MembersGui.AGO, TimeUtil.formatDuration(System.currentTimeMillis() - power.lastDeath())) - : HFMessages.get(playerRef, MessageKeys.MembersGui.NEVER); + : HFMessages.get(playerRef, GuiKeys.MembersGui.NEVER); cmd.set(idx + " #LastDeath.Text", lastDeathText); // Determine what actions the viewer can take on this member @@ -414,9 +415,9 @@ private String formatLastOnline(long lastOnlineMs) { } long diffMs = System.currentTimeMillis() - lastOnlineMs; if (diffMs < 60000) { - return HFMessages.get(playerRef, MessageKeys.MembersGui.JUST_NOW); + return HFMessages.get(playerRef, GuiKeys.MembersGui.JUST_NOW); } - return HFMessages.get(playerRef, MessageKeys.MembersGui.AGO, + return HFMessages.get(playerRef, GuiKeys.MembersGui.AGO, TimeUtil.formatDuration(diffMs)); } @@ -496,7 +497,7 @@ public void handleDataEvent(Ref ref, Store store, sendUpdate(); return; } - String targetName = data.target != null ? data.target : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); + String targetName = data.target != null ? data.target : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); guiManager.openPlayerInfo(player, ref, store, playerRef, uuid, targetName, "members"); } } @@ -523,17 +524,17 @@ private void handlePromote(Player player, Ref ref, Store ref, Store ref, Store } FactionMember target = faction.members().get(targetUuid); if (target == null) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.MembersGui.MEMBER_NOT_FOUND)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.MembersGui.MEMBER_NOT_FOUND)); sendUpdate(); return; } var result = factionManager.removeMember(faction.id(), targetUuid, playerRef.getUuid(), true); if (result == FactionManager.FactionResult.SUCCESS) { - player.sendMessage(MessageUtil.success(playerRef, MessageKeys.MembersGui.KICKED, target.username())); + player.sendMessage(MessageUtil.success(playerRef, GuiKeys.MembersGui.KICKED, target.username())); } else { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.MembersGui.KICK_FAILED, result.name())); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.MembersGui.KICK_FAILED, result.name())); } rebuildList(ref, store); } @@ -606,7 +607,7 @@ private void handleTransfer(Player player, Ref ref, Store MODULES = List.of( - new ModuleInfo("treasury", MessageKeys.ModulesGui.TREASURY_NAME, MessageKeys.ModulesGui.TREASURY_DESC, "#fbbf24"), - new ModuleInfo("raids", MessageKeys.ModulesGui.RAIDS_NAME, MessageKeys.ModulesGui.RAIDS_DESC, "#ef4444"), - new ModuleInfo("levels", MessageKeys.ModulesGui.LEVELS_NAME, MessageKeys.ModulesGui.LEVELS_DESC, "#22c55e"), - new ModuleInfo("war", MessageKeys.ModulesGui.WAR_NAME, MessageKeys.ModulesGui.WAR_DESC, "#a855f7") + new ModuleInfo("treasury", GuiKeys.ModulesGui.TREASURY_NAME, GuiKeys.ModulesGui.TREASURY_DESC, "#fbbf24"), + new ModuleInfo("raids", GuiKeys.ModulesGui.RAIDS_NAME, GuiKeys.ModulesGui.RAIDS_DESC, "#ef4444"), + new ModuleInfo("levels", GuiKeys.ModulesGui.LEVELS_NAME, GuiKeys.ModulesGui.LEVELS_DESC, "#22c55e"), + new ModuleInfo("war", GuiKeys.ModulesGui.WAR_NAME, GuiKeys.ModulesGui.WAR_DESC, "#a855f7") ); private final PlayerRef playerRef; @@ -72,9 +72,9 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.FACTION_MODULES); // Localize static labels - cmd.set("#ModulesTitle.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.TITLE)); - cmd.set("#ModulesDescription.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.DESCRIPTION)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.BACK_BTN)); + cmd.set("#ModulesTitle.Text", HFMessages.get(playerRef, GuiKeys.ModulesGui.TITLE)); + cmd.set("#ModulesDescription.Text", HFMessages.get(playerRef, GuiKeys.ModulesGui.DESCRIPTION)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, GuiKeys.ModulesGui.BACK_BTN)); // Setup navigation bar NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); @@ -96,7 +96,7 @@ public void build(Ref ref, UICommandBuilder cmd, buildTreasuryCard(cmd, events, cardSelector); } else { // Other modules: coming soon - cmd.set(cardSelector + " #StatusBadge.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.COMING_SOON)); + cmd.set(cardSelector + " #StatusBadge.Text", HFMessages.get(playerRef, GuiKeys.ModulesGui.COMING_SOON)); cmd.set(cardSelector + " #StatusBadge.Style.TextColor", "#888888"); } } @@ -168,10 +168,10 @@ public void handleDataEvent(Ref ref, Store store, private void buildTreasuryCard(UICommandBuilder cmd, UIEventBuilder events, String cardSelector) { if (hyperFactions.isTreasuryEnabled()) { // State 1: Active - cmd.set(cardSelector + " #StatusBadge.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.ACTIVE)); + cmd.set(cardSelector + " #StatusBadge.Text", HFMessages.get(playerRef, GuiKeys.ModulesGui.ACTIVE)); cmd.set(cardSelector + " #StatusBadge.Style.TextColor", "#22c55e"); cmd.set(cardSelector + " #ModuleBtn.Visible", true); - cmd.set(cardSelector + " #ModuleBtn.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.VIEW_TREASURY)); + cmd.set(cardSelector + " #ModuleBtn.Text", HFMessages.get(playerRef, GuiKeys.ModulesGui.VIEW_TREASURY)); events.addEventBinding( CustomUIEventBindingType.Activating, cardSelector + " #ModuleBtn", @@ -182,14 +182,14 @@ private void buildTreasuryCard(UICommandBuilder cmd, UIEventBuilder events, Stri String reason = hyperFactions.getTreasuryDisabledReason(); if (reason != null && reason.contains("economy plugin")) { // State 3: Config enabled but no economy plugin - cmd.set(cardSelector + " #StatusBadge.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.UNAVAILABLE)); + cmd.set(cardSelector + " #StatusBadge.Text", HFMessages.get(playerRef, GuiKeys.ModulesGui.UNAVAILABLE)); cmd.set(cardSelector + " #StatusBadge.Style.TextColor", "#fbbf24"); - cmd.set(cardSelector + " #ModuleDesc.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.NO_ECONOMY)); + cmd.set(cardSelector + " #ModuleDesc.Text", HFMessages.get(playerRef, GuiKeys.ModulesGui.NO_ECONOMY)); } else { // State 2: Disabled by server config - cmd.set(cardSelector + " #StatusBadge.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.DISABLED)); + cmd.set(cardSelector + " #StatusBadge.Text", HFMessages.get(playerRef, GuiKeys.ModulesGui.DISABLED)); cmd.set(cardSelector + " #StatusBadge.Style.TextColor", "#888888"); - cmd.set(cardSelector + " #ModuleDesc.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.ECONOMY_NOT_AVAILABLE)); + cmd.set(cardSelector + " #ModuleDesc.Text", HFMessages.get(playerRef, GuiKeys.ModulesGui.ECONOMY_NOT_AVAILABLE)); } } } diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionRelationsPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionRelationsPage.java index ab8f2b99..c88d5acb 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionRelationsPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionRelationsPage.java @@ -14,7 +14,8 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.manager.RelationManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; @@ -104,12 +105,12 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.FACTION_RELATIONS); // Localize static labels - cmd.set("#RelationsTitle.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.TITLE)); - cmd.set("#TabRelations.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.TAB_RELATIONS)); - cmd.set("#TabPending.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.TAB_PENDING)); - cmd.set("#SetRelationBtn.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.SET_RELATION_BTN)); - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.NEXT)); + cmd.set("#RelationsTitle.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.TITLE)); + cmd.set("#TabRelations.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.TAB_RELATIONS)); + cmd.set("#TabPending.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.TAB_PENDING)); + cmd.set("#SetRelationBtn.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.SET_RELATION_BTN)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.NEXT)); // Setup navigation bar NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); @@ -178,8 +179,8 @@ private void buildList(UICommandBuilder cmd, UIEventBuilder events, boolean canM // Count String countText = switch (currentTab) { - case RELATIONS -> HFMessages.get(playerRef, MessageKeys.RelationsGui.RELATION_COUNT, items.size()); - case PENDING -> HFMessages.get(playerRef, MessageKeys.RelationsGui.REQUEST_COUNT, items.size()); + case RELATIONS -> HFMessages.get(playerRef, GuiKeys.RelationsGui.RELATION_COUNT, items.size()); + case PENDING -> HFMessages.get(playerRef, GuiKeys.RelationsGui.REQUEST_COUNT, items.size()); }; cmd.set("#ItemCount.Text", countText); @@ -210,7 +211,7 @@ private void buildList(UICommandBuilder cmd, UIEventBuilder events, boolean canM } // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -245,7 +246,7 @@ private List getAllRelations() { Faction other = factionManager.getFaction(relation.targetFactionId()); if (other != null) { FactionMember leader = other.getLeader(); - String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); String typeText = relation.type() == RelationType.ALLY ? "Ally" : "Enemy"; PowerManager.FactionPowerStats stats = powerManager.getFactionPowerStats(other.id()); items.add(new RelationItem( @@ -281,7 +282,7 @@ private List getPendingRequests() { Faction requester = factionManager.getFaction(requesterId); if (requester != null) { FactionMember leader = requester.getLeader(); - String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); PowerManager.FactionPowerStats stats = powerManager.getFactionPowerStats(requester.id()); items.add(new RelationItem( requester.id(), @@ -305,7 +306,7 @@ private List getPendingRequests() { Faction target = factionManager.getFaction(targetId); if (target != null) { FactionMember leader = target.getLeader(); - String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); PowerManager.FactionPowerStats stats = powerManager.getFactionPowerStats(target.id()); items.add(new RelationItem( target.id(), @@ -340,22 +341,22 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, String idx = "#IndexCards[" + index + "]"; // Localize entry labels and buttons - cmd.set(idx + " #MemberLabel.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.LABEL_MEMBERS)); - cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.LABEL_POWER)); - cmd.set(idx + " #SinceLabel.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.LABEL_SINCE)); - cmd.set(idx + " #ClaimsLabel.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.LABEL_CLAIMS)); - cmd.set(idx + " #DirectionLabel.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.LABEL_DIRECTION)); - cmd.set(idx + " #ViewBtn.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.BTN_VIEW)); - cmd.set(idx + " #NeutralBtn.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.BTN_NEUTRAL)); - cmd.set(idx + " #EnemyBtn.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.BTN_ENEMY)); - cmd.set(idx + " #AllyBtn.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.BTN_ALLY)); - cmd.set(idx + " #AcceptBtn.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.BTN_ACCEPT)); - cmd.set(idx + " #DeclineBtn.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.BTN_DECLINE)); - cmd.set(idx + " #CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.BTN_CANCEL)); + cmd.set(idx + " #MemberLabel.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.LABEL_MEMBERS)); + cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.LABEL_POWER)); + cmd.set(idx + " #SinceLabel.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.LABEL_SINCE)); + cmd.set(idx + " #ClaimsLabel.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.LABEL_CLAIMS)); + cmd.set(idx + " #DirectionLabel.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.LABEL_DIRECTION)); + cmd.set(idx + " #ViewBtn.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.BTN_VIEW)); + cmd.set(idx + " #NeutralBtn.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.BTN_NEUTRAL)); + cmd.set(idx + " #EnemyBtn.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.BTN_ENEMY)); + cmd.set(idx + " #AllyBtn.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.BTN_ALLY)); + cmd.set(idx + " #AcceptBtn.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.BTN_ACCEPT)); + cmd.set(idx + " #DeclineBtn.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.BTN_DECLINE)); + cmd.set(idx + " #CancelBtn.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.BTN_CANCEL)); // === Header info === cmd.set(idx + " #FactionName.Text", item.factionName); - cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.LEADER_LABEL, item.leaderName)); + cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.LEADER_LABEL, item.leaderName)); // Relation type badge with appropriate color cmd.set(idx + " #RelationType.Text", localizeType(item.type)); @@ -411,8 +412,8 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, if (isPending) { String direction = item.isIncoming - ? HFMessages.get(playerRef, MessageKeys.RelationsGui.INCOMING_REQUEST) - : HFMessages.get(playerRef, MessageKeys.RelationsGui.OUTGOING_REQUEST); + ? HFMessages.get(playerRef, GuiKeys.RelationsGui.INCOMING_REQUEST) + : HFMessages.get(playerRef, GuiKeys.RelationsGui.OUTGOING_REQUEST); cmd.set(idx + " #DirectionValue.Text", direction); cmd.set(idx + " #DirectionValue.Style.TextColor", item.isIncoming ? "#FFAA00" : "#88AAFF"); @@ -544,9 +545,9 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, private String getEmptyMessage(boolean canManage) { return switch (currentTab) { case RELATIONS -> canManage - ? HFMessages.get(playerRef, MessageKeys.RelationsGui.EMPTY_RELATIONS_HINT) - : HFMessages.get(playerRef, MessageKeys.RelationsGui.EMPTY_RELATIONS); - case PENDING -> HFMessages.get(playerRef, MessageKeys.RelationsGui.EMPTY_PENDING); + ? HFMessages.get(playerRef, GuiKeys.RelationsGui.EMPTY_RELATIONS_HINT) + : HFMessages.get(playerRef, GuiKeys.RelationsGui.EMPTY_RELATIONS); + case PENDING -> HFMessages.get(playerRef, GuiKeys.RelationsGui.EMPTY_PENDING); }; } @@ -556,20 +557,20 @@ private String formatDate(long sinceMillis) { Instant.now() ); if (daysSince == 0) { - return HFMessages.get(playerRef, MessageKeys.RelationsGui.TODAY); + return HFMessages.get(playerRef, GuiKeys.RelationsGui.TODAY); } else if (daysSince == 1) { - return HFMessages.get(playerRef, MessageKeys.RelationsGui.ONE_DAY_AGO); + return HFMessages.get(playerRef, GuiKeys.RelationsGui.ONE_DAY_AGO); } else { - return HFMessages.get(playerRef, MessageKeys.RelationsGui.DAYS_AGO, daysSince); + return HFMessages.get(playerRef, GuiKeys.RelationsGui.DAYS_AGO, daysSince); } } private String localizeType(String type) { return switch (type) { - case "Ally" -> HFMessages.get(playerRef, MessageKeys.RelationsGui.TYPE_ALLY); - case "Enemy" -> HFMessages.get(playerRef, MessageKeys.RelationsGui.TYPE_ENEMY); - case "Incoming" -> HFMessages.get(playerRef, MessageKeys.RelationsGui.TYPE_INCOMING); - case "Outgoing" -> HFMessages.get(playerRef, MessageKeys.RelationsGui.TYPE_OUTGOING); + case "Ally" -> HFMessages.get(playerRef, GuiKeys.RelationsGui.TYPE_ALLY); + case "Enemy" -> HFMessages.get(playerRef, GuiKeys.RelationsGui.TYPE_ENEMY); + case "Incoming" -> HFMessages.get(playerRef, GuiKeys.RelationsGui.TYPE_INCOMING); + case "Outgoing" -> HFMessages.get(playerRef, GuiKeys.RelationsGui.TYPE_OUTGOING); default -> type; }; } @@ -670,7 +671,7 @@ private void handleViewFaction(Player player, Ref ref, Store ref, Store ref, UICommandBuilder cmd, // Permission check - officer or leader only if (member == null || member.role().getLevel() < FactionRole.OFFICER.getLevel()) { cmd.append(UIPaths.ERROR_PAGE); - cmd.set("#ErrorMessage.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.OFFICERS_ONLY)); + cmd.set("#ErrorMessage.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.OFFICERS_ONLY)); events.addEventBinding( CustomUIEventBindingType.Activating, "#CloseBtn", @@ -106,61 +108,61 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.FACTION_SETTINGS); // Localize static labels - cmd.set("#SettingsTitle.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.TITLE)); - cmd.set("#GeneralHeader.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.GENERAL)); - cmd.set("#NameLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.NAME_LABEL)); - cmd.set("#TagLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.TAG_LABEL)); - cmd.set("#DescLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.DESC_LABEL)); - cmd.set("#NameEditBtn.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.EDIT_BTN)); - cmd.set("#TagEditBtn.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.EDIT_BTN)); - cmd.set("#DescEditBtn.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.EDIT_BTN)); - cmd.set("#RecruitmentHeader.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.RECRUITMENT)); - cmd.set("#StatusLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.STATUS_LABEL)); - cmd.set("#HomeLocationHeader.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.HOME_LOCATION)); - cmd.set("#LocationLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.LOCATION_LABEL)); - cmd.set("#SetHomeBtn.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.SET_HOME_BTN)); - cmd.set("#TeleportHomeBtn.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.TELEPORT_BTN)); - cmd.set("#DeleteHomeBtn.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.DELETE_BTN)); - cmd.set("#OptionalFeaturesHeader.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.OPTIONAL_FEATURES)); - cmd.set("#ModulesDescLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.CONFIGURE_MODULES)); - cmd.set("#ModulesBtn.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.MODULES_BTN)); - cmd.set("#DangerZoneHeader.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.DANGER_ZONE)); - cmd.set("#IrreversibleLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.IRREVERSIBLE)); - cmd.set("#DisbandBtn.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.DISBAND_BTN)); - cmd.set("#LockHintLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.LOCK_HINT)); - cmd.set("#TerritoryPermissionsHeader.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.TERRITORY_PERMISSIONS)); - cmd.set("#ColOutLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.COL_OUT)); - cmd.set("#ColAllyLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.COL_ALLY)); - cmd.set("#ColMemLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.COL_MEM)); - cmd.set("#ColOffLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.COL_OFF)); - cmd.set("#BuildingCatLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.CAT_BUILDING)); - cmd.set("#BreakPermLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_BREAK)); - cmd.set("#PlacePermLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_PLACE)); - cmd.set("#InteractionCatLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.CAT_INTERACTION)); - cmd.set("#InteractionHintLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.INTERACTION_HINT)); - cmd.set("#AllPermLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_ALL)); - cmd.set("#DoorPermLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_DOOR)); - cmd.set("#ChestPermLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_CHEST)); - cmd.set("#BenchPermLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_BENCH)); - cmd.set("#ProcessingPermLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_PROCESSING)); - cmd.set("#SeatPermLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_SEAT)); - cmd.set("#TransportPermLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_TRANSPORT)); - cmd.set("#OtherCatLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.CAT_OTHER)); - cmd.set("#CrateUsePermLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_CRATE)); - cmd.set("#NpcTamePermLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_NPC_TAME)); - cmd.set("#PveDamagePermLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_PVE)); - cmd.set("#AppearanceHeader.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.APPEARANCE)); - cmd.set("#ColorLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.COLOR_LABEL)); - cmd.set("#MobSpawningHeader.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.MOB_SPAWNING)); - cmd.set("#MobSpawningHintLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.MOB_SPAWNING_HINT)); - cmd.set("#MobSpawningMasterLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.MOB_SPAWNING_LABEL)); - cmd.set("#HostileMobsLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.HOSTILE_MOBS)); - cmd.set("#PassiveMobsLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PASSIVE_MOBS)); - cmd.set("#NeutralMobsLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.NEUTRAL_MOBS)); - cmd.set("#FactionSettingsHeader.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.FACTION_SETTINGS)); - cmd.set("#PvpLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_IN_TERRITORY)); - cmd.set("#OfficersCanEditLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.OFFICERS_CAN_EDIT)); - cmd.set("#LeaderOnlyLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.LEADER_ONLY)); + cmd.set("#SettingsTitle.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.TITLE)); + cmd.set("#GeneralHeader.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.GENERAL)); + cmd.set("#NameLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.NAME_LABEL)); + cmd.set("#TagLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.TAG_LABEL)); + cmd.set("#DescLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.DESC_LABEL)); + cmd.set("#NameEditBtn.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.EDIT_BTN)); + cmd.set("#TagEditBtn.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.EDIT_BTN)); + cmd.set("#DescEditBtn.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.EDIT_BTN)); + cmd.set("#RecruitmentHeader.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.RECRUITMENT)); + cmd.set("#StatusLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.STATUS_LABEL)); + cmd.set("#HomeLocationHeader.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.HOME_LOCATION)); + cmd.set("#LocationLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.LOCATION_LABEL)); + cmd.set("#SetHomeBtn.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.SET_HOME_BTN)); + cmd.set("#TeleportHomeBtn.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.TELEPORT_BTN)); + cmd.set("#DeleteHomeBtn.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.DELETE_BTN)); + cmd.set("#OptionalFeaturesHeader.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.OPTIONAL_FEATURES)); + cmd.set("#ModulesDescLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.CONFIGURE_MODULES)); + cmd.set("#ModulesBtn.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.MODULES_BTN)); + cmd.set("#DangerZoneHeader.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.DANGER_ZONE)); + cmd.set("#IrreversibleLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.IRREVERSIBLE)); + cmd.set("#DisbandBtn.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.DISBAND_BTN)); + cmd.set("#LockHintLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.LOCK_HINT)); + cmd.set("#TerritoryPermissionsHeader.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.TERRITORY_PERMISSIONS)); + cmd.set("#ColOutLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.COL_OUT)); + cmd.set("#ColAllyLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.COL_ALLY)); + cmd.set("#ColMemLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.COL_MEM)); + cmd.set("#ColOffLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.COL_OFF)); + cmd.set("#BuildingCatLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.CAT_BUILDING)); + cmd.set("#BreakPermLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_BREAK)); + cmd.set("#PlacePermLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_PLACE)); + cmd.set("#InteractionCatLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.CAT_INTERACTION)); + cmd.set("#InteractionHintLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.INTERACTION_HINT)); + cmd.set("#AllPermLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_ALL)); + cmd.set("#DoorPermLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_DOOR)); + cmd.set("#ChestPermLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_CHEST)); + cmd.set("#BenchPermLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_BENCH)); + cmd.set("#ProcessingPermLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_PROCESSING)); + cmd.set("#SeatPermLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_SEAT)); + cmd.set("#TransportPermLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_TRANSPORT)); + cmd.set("#OtherCatLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.CAT_OTHER)); + cmd.set("#CrateUsePermLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_CRATE)); + cmd.set("#NpcTamePermLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_NPC_TAME)); + cmd.set("#PveDamagePermLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_PVE)); + cmd.set("#AppearanceHeader.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.APPEARANCE)); + cmd.set("#ColorLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.COLOR_LABEL)); + cmd.set("#MobSpawningHeader.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.MOB_SPAWNING)); + cmd.set("#MobSpawningHintLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.MOB_SPAWNING_HINT)); + cmd.set("#MobSpawningMasterLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.MOB_SPAWNING_LABEL)); + cmd.set("#HostileMobsLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.HOSTILE_MOBS)); + cmd.set("#PassiveMobsLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PASSIVE_MOBS)); + cmd.set("#NeutralMobsLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.NEUTRAL_MOBS)); + cmd.set("#FactionSettingsHeader.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.FACTION_SETTINGS)); + cmd.set("#PvpLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PVP_IN_TERRITORY)); + cmd.set("#OfficersCanEditLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.OFFICERS_CAN_EDIT)); + cmd.set("#LeaderOnlyLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.LEADER_ONLY)); // Setup navigation bar NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); @@ -199,7 +201,7 @@ private void buildGeneralSettings(UICommandBuilder cmd, UIEventBuilder events) { // Tag String tagDisplay = faction.tag() != null && !faction.tag().isEmpty() ? "[" + faction.tag().toUpperCase() + "]" - : HFMessages.get(playerRef, MessageKeys.SettingsGui.DISPLAY_NONE); + : HFMessages.get(playerRef, GuiKeys.SettingsGui.DISPLAY_NONE); cmd.set("#TagValue.Text", tagDisplay); events.addEventBinding(CustomUIEventBindingType.Activating, "#TagEditBtn", EventData.of("Button", "OpenTagModal"), false); @@ -207,15 +209,15 @@ private void buildGeneralSettings(UICommandBuilder cmd, UIEventBuilder events) { // Description String desc = faction.description() != null && !faction.description().isEmpty() ? faction.description() - : HFMessages.get(playerRef, MessageKeys.SettingsGui.DISPLAY_NONE); + : HFMessages.get(playerRef, GuiKeys.SettingsGui.DISPLAY_NONE); cmd.set("#DescValue.Text", desc); events.addEventBinding(CustomUIEventBindingType.Activating, "#DescEditBtn", EventData.of("Button", "OpenDescriptionModal"), false); // Recruitment dropdown cmd.set("#RecruitmentDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN)), "OPEN"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)), "INVITE_ONLY") + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_OPEN)), "OPEN"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_INVITE_ONLY)), "INVITE_ONLY") )); cmd.set("#RecruitmentDropdown.Value", faction.open() ? "OPEN" : "INVITE_ONLY"); events.addEventBinding(CustomUIEventBindingType.ValueChanged, "#RecruitmentDropdown", @@ -282,8 +284,8 @@ private void buildPermissions(UICommandBuilder cmd, UIEventBuilder events, boole // PvP toggle buildToggle(cmd, events, "PvPToggle", "pvpEnabled", perms.pvpEnabled(), canEdit, config, false); cmd.set("#PvPStatus.Text", perms.pvpEnabled() - ? HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_ENABLED) - : HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_DISABLED)); + ? HFMessages.get(playerRef, GuiKeys.SettingsGui.PVP_ENABLED) + : HFMessages.get(playerRef, GuiKeys.SettingsGui.PVP_DISABLED)); cmd.set("#PvPStatus.Style.TextColor", perms.pvpEnabled() ? "#55FF55" : "#FF5555"); // Officers can edit - only leader can change this @@ -360,7 +362,7 @@ private void buildHomeSection(UICommandBuilder cmd, UIEventBuilder events) { worldName, home.x(), home.y(), home.z()); cmd.set("#HomeLocation.Text", homeText); } else { - cmd.set("#HomeLocation.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.HOME_NOT_SET)); + cmd.set("#HomeLocation.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.HOME_NOT_SET)); cmd.set("#TeleportHomeBtn.Disabled", true); cmd.set("#DeleteHomeBtn.Disabled", true); } @@ -426,7 +428,7 @@ public void handleDataEvent(Ref ref, Store store, // Verify permissions if (member == null || member.role().getLevel() < FactionRole.OFFICER.getLevel()) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.SettingsGui.NO_PERMISSION)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.SettingsGui.NO_PERMISSION)); sendUpdate(); return; } @@ -446,7 +448,7 @@ public void handleDataEvent(Ref ref, Store store, case "OpenModules" -> guiManager.openFactionModules(player, ref, store, playerRef, faction); case "Disband" -> { if (!isLeader) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.SettingsGui.ONLY_LEADER_DISBAND)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.SettingsGui.ONLY_LEADER_DISBAND)); sendUpdate(); return; } @@ -467,19 +469,19 @@ private void handleTogglePerm(Player player, Ref ref, Store ref, Store factionManager.updateFaction(updatedFaction); String status = isOpen - ? HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) - : HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY); - player.sendMessage(MessageUtil.success(playerRef, MessageKeys.SettingsGui.RECRUITMENT_SET, status)); + ? HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_OPEN) + : HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_INVITE_ONLY); + player.sendMessage(MessageUtil.success(playerRef, GuiKeys.SettingsGui.RECRUITMENT_SET, status)); Faction freshFaction = factionManager.getFaction(faction.id()); guiManager.openFactionSettings(player, ref, store, playerRef, freshFaction); @@ -555,7 +557,7 @@ private void handleSetHome(Player player, Ref ref, Store ref, Store ref, Store store, UUID uuid) { if (faction.home() == null) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Home.NO_HOME)); + player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Home.NO_HOME)); sendUpdate(); return; } @@ -589,14 +591,14 @@ private void handleTeleportHome(Player player, Ref ref, Store store, private void handleTeleportResult(Player player, TeleportManager.TeleportResult result) { switch (result) { - case NOT_IN_FACTION -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Common.NOT_IN_FACTION)); - case NO_HOME -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Home.NO_HOME)); - case COMBAT_TAGGED -> player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Home.COMBAT_TAGGED)); - case SUCCESS_INSTANT -> player.sendMessage(MessageUtil.success(playerRef, MessageKeys.Home.TELEPORTED)); + case NOT_IN_FACTION -> player.sendMessage(MessageUtil.error(playerRef, CommonKeys.Common.NOT_IN_FACTION)); + case NO_HOME -> player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Home.NO_HOME)); + case COMBAT_TAGGED -> player.sendMessage(MessageUtil.error(playerRef, CommandKeys.Home.COMBAT_TAGGED)); + case SUCCESS_INSTANT -> player.sendMessage(MessageUtil.success(playerRef, CommandKeys.Home.TELEPORTED)); case ON_COOLDOWN, SUCCESS_WARMUP -> {} // Message sent by TeleportManager default -> {} } @@ -655,7 +657,7 @@ private void handleTeleportResult(Player player, TeleportManager.TeleportResult private void handleDeleteHome(Player player, Ref ref, Store store, UUID uuid) { if (faction.home() == null) { - player.sendMessage(MessageUtil.info(playerRef, MessageKeys.SettingsGui.HOME_NO_SET, MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.info(playerRef, GuiKeys.SettingsGui.HOME_NO_SET, MessageUtil.COLOR_GOLD)); sendUpdate(); return; } @@ -663,7 +665,7 @@ private void handleDeleteHome(Player player, Ref ref, Store ref, UICommandBuilder cmd, cmd.append(UIPaths.LEADER_LEAVE_CONFIRM); // Static labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.LEADER_LEAVE_TITLE)); - cmd.set("#ConfirmText.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.LEADER_LEAVE_PROMPT)); - cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.CANCEL)); - cmd.set("#LeaveBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.LEAVE)); - cmd.set("#DisbandBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.DISBAND)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.LEADER_LEAVE_TITLE)); + cmd.set("#ConfirmText.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.LEADER_LEAVE_PROMPT)); + cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.CANCEL)); + cmd.set("#LeaveBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.LEAVE)); + cmd.set("#DisbandBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.DISBAND)); // Set faction name cmd.set("#FactionName.Text", faction.name()); // Show succession information if (successor != null) { - cmd.set("#SuccessionTitle.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.SUCCESSION_TITLE)); + cmd.set("#SuccessionTitle.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.SUCCESSION_TITLE)); cmd.set("#SuccessorName.Text", successor.username()); cmd.set("#SuccessorRole.Text", successor.role().getDisplayName()); cmd.set("#WarningText.Text", ""); @@ -92,10 +93,10 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.set("#DisbandBtn.Visible", false); } else { // No successor - faction will disband - cmd.set("#SuccessionTitle.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.NO_MEMBERS_WARNING)); + cmd.set("#SuccessionTitle.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.NO_MEMBERS_WARNING)); cmd.set("#SuccessorName.Text", ""); cmd.set("#SuccessorRole.Text", ""); - cmd.set("#WarningText.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.WILL_DISBAND)); + cmd.set("#WarningText.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.WILL_DISBAND)); // Hide Leave button, show Disband button cmd.set("#LeaveBtn.Visible", false); @@ -135,13 +136,13 @@ public void handleDataEvent(Ref ref, Store store, // Verify still in faction and still leader if (member == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.NOT_IN_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.NOT_IN_FACTION)); guiManager.openFactionMain(player, ref, store, playerRef); return; } if (member.role() != FactionRole.LEADER) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.NOT_LEADER_ANYMORE)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.NOT_LEADER_ANYMORE)); Faction fresh = factionManager.getFaction(faction.id()); if (fresh != null) { guiManager.openFactionDashboard(player, ref, store, playerRef, fresh); @@ -165,7 +166,7 @@ public void handleDataEvent(Ref ref, Store store, case "Leave" -> { // Transfer leadership to successor and leave if (successor == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.NO_SUCCESSOR)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.NO_SUCCESSOR)); return; } @@ -176,7 +177,7 @@ public void handleDataEvent(Ref ref, Store store, faction.id(), successor.uuid(), uuid); if (transferResult != FactionManager.FactionResult.SUCCESS) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.TRANSFER_FAILED, transferResult)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.TRANSFER_FAILED, transferResult)); return; } @@ -185,10 +186,10 @@ public void handleDataEvent(Ref ref, Store store, faction.id(), uuid, uuid, false); if (leaveResult == FactionManager.FactionResult.SUCCESS) { - player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.ConfirmGui.LEADER_LEFT, successor.username(), factionName)); + player.sendMessage(MessageUtil.successText(playerRef, GuiKeys.ConfirmGui.LEADER_LEFT, successor.username(), factionName)); guiManager.openFactionMain(player, ref, store, playerRef); } else { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.LEAVE_FAILED, leaveResult)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.LEAVE_FAILED, leaveResult)); Faction fresh = factionManager.getFaction(faction.id()); if (fresh != null) { guiManager.openFactionDashboard(player, ref, store, playerRef, fresh); diff --git a/src/main/java/com/hyperfactions/gui/faction/page/LeaveConfirmPage.java b/src/main/java/com/hyperfactions/gui/faction/page/LeaveConfirmPage.java index b1893a82..a523f2cd 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/LeaveConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/LeaveConfirmPage.java @@ -9,7 +9,8 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -58,11 +59,11 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.LEAVE_CONFIRM); // Static labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.LEAVE_TITLE)); - cmd.set("#ConfirmText.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.LEAVE_PROMPT)); - cmd.set("#WarningText.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.LEAVE_WARNING)); - cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.CANCEL)); - cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.LEAVE)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.LEAVE_TITLE)); + cmd.set("#ConfirmText.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.LEAVE_PROMPT)); + cmd.set("#WarningText.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.LEAVE_WARNING)); + cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.CANCEL)); + cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.LEAVE)); // Set faction name in the modal cmd.set("#FactionName.Text", faction.name()); @@ -102,14 +103,14 @@ public void handleDataEvent(Ref ref, Store store, // Verify still in faction if (member == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.NOT_IN_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.NOT_IN_FACTION)); guiManager.openFactionMain(player, ref, store, playerRef); return; } // Leaders cannot leave via this modal (they must disband or transfer leadership) if (member.role() == FactionRole.LEADER) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.LEADER_CANNOT_LEAVE)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.LEADER_CANNOT_LEAVE)); guiManager.openFactionDashboard(player, ref, store, playerRef, factionManager.getFaction(faction.id())); return; @@ -133,10 +134,10 @@ public void handleDataEvent(Ref ref, Store store, faction.id(), uuid, uuid, false); if (result == FactionManager.FactionResult.SUCCESS) { - player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.ConfirmGui.LEFT_FACTION, factionName)); + player.sendMessage(MessageUtil.successText(playerRef, GuiKeys.ConfirmGui.LEFT_FACTION, factionName)); guiManager.openFactionMain(player, ref, store, playerRef); } else { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.LEAVE_FAILED, result)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.LEAVE_FAILED, result)); guiManager.openFactionMain(player, ref, store, playerRef); } } diff --git a/src/main/java/com/hyperfactions/gui/faction/page/LogsViewerPage.java b/src/main/java/com/hyperfactions/gui/faction/page/LogsViewerPage.java index 13ebd458..c00edcd5 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/LogsViewerPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/LogsViewerPage.java @@ -11,7 +11,7 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.TimeUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -83,15 +83,15 @@ public void build(Ref ref, UICommandBuilder cmd, } // Set title with faction name - cmd.set("#LogsTitle.Text", HFMessages.get(playerRef, MessageKeys.LogsGui.TITLE, faction.name())); + cmd.set("#LogsTitle.Text", HFMessages.get(playerRef, GuiKeys.LogsGui.TITLE, faction.name())); // Localize static labels - cmd.set("#FilterLabel.Text", HFMessages.get(playerRef, MessageKeys.LogsGui.FILTER_LABEL)); - cmd.set("#ColTimeLabel.Text", HFMessages.get(playerRef, MessageKeys.LogsGui.COL_TIME)); - cmd.set("#ColTypeLabel.Text", HFMessages.get(playerRef, MessageKeys.LogsGui.COL_TYPE)); - cmd.set("#ColMessageLabel.Text", HFMessages.get(playerRef, MessageKeys.LogsGui.COL_MESSAGE)); - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PREV)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.NEXT)); + cmd.set("#FilterLabel.Text", HFMessages.get(playerRef, GuiKeys.LogsGui.FILTER_LABEL)); + cmd.set("#ColTimeLabel.Text", HFMessages.get(playerRef, GuiKeys.LogsGui.COL_TIME)); + cmd.set("#ColTypeLabel.Text", HFMessages.get(playerRef, GuiKeys.LogsGui.COL_TYPE)); + cmd.set("#ColMessageLabel.Text", HFMessages.get(playerRef, GuiKeys.LogsGui.COL_MESSAGE)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PREV)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.NEXT)); buildLogList(cmd, events); } @@ -126,11 +126,11 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { int endIndex = Math.min(startIndex + LOGS_PER_PAGE, totalLogs); // Log count - cmd.set("#LogCount.Text", HFMessages.get(playerRef, MessageKeys.LogsGui.ENTRY_COUNT, totalLogs)); + cmd.set("#LogCount.Text", HFMessages.get(playerRef, GuiKeys.LogsGui.ENTRY_COUNT, totalLogs)); // Filter dropdown List filterOptions = new ArrayList<>(); - filterOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.LogsGui.ALL_TYPES)), "ALL")); + filterOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.LogsGui.ALL_TYPES)), "ALL")); for (FactionLog.LogType type : FactionLog.LogType.values()) { filterOptions.add(new DropdownEntryInfo(LocalizableString.fromString(getLocalizedTypeName(type)), type.name())); } @@ -150,8 +150,8 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { if (totalLogs == 0) { String emptyText = filterType != null - ? HFMessages.get(playerRef, MessageKeys.LogsGui.NO_LOGS_TYPE) - : HFMessages.get(playerRef, MessageKeys.LogsGui.NO_LOGS); + ? HFMessages.get(playerRef, GuiKeys.LogsGui.NO_LOGS_TYPE) + : HFMessages.get(playerRef, GuiKeys.LogsGui.NO_LOGS); cmd.appendInline("#LogsList", "Label { Text: \"" + emptyText + "\"; Style: (FontSize: 11, TextColor: #555555); Anchor: (Height: 30); }"); @@ -175,7 +175,7 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -260,19 +260,19 @@ public void handleDataEvent(Ref ref, Store store, private String formatRelativeTime(long timestamp) { long diff = System.currentTimeMillis() - timestamp; if (diff < 60_000) { - return HFMessages.get(playerRef, MessageKeys.LogsGui.TIME_JUST_NOW); + return HFMessages.get(playerRef, GuiKeys.LogsGui.TIME_JUST_NOW); } else if (diff < 3600_000) { long m = TimeUnit.MILLISECONDS.toMinutes(diff); - return HFMessages.get(playerRef, m == 1 ? MessageKeys.LogsGui.TIME_MINUTE : MessageKeys.LogsGui.TIME_MINUTES, m); + return HFMessages.get(playerRef, m == 1 ? GuiKeys.LogsGui.TIME_MINUTE : GuiKeys.LogsGui.TIME_MINUTES, m); } else if (diff < 86400_000) { long h = TimeUnit.MILLISECONDS.toHours(diff); - return HFMessages.get(playerRef, h == 1 ? MessageKeys.LogsGui.TIME_HOUR : MessageKeys.LogsGui.TIME_HOURS, h); + return HFMessages.get(playerRef, h == 1 ? GuiKeys.LogsGui.TIME_HOUR : GuiKeys.LogsGui.TIME_HOURS, h); } else if (diff < 604800_000) { long d = TimeUnit.MILLISECONDS.toDays(diff); - return HFMessages.get(playerRef, d == 1 ? MessageKeys.LogsGui.TIME_DAY : MessageKeys.LogsGui.TIME_DAYS, d); + return HFMessages.get(playerRef, d == 1 ? GuiKeys.LogsGui.TIME_DAY : GuiKeys.LogsGui.TIME_DAYS, d); } else if (diff < 2592000_000L) { long w = TimeUnit.MILLISECONDS.toDays(diff) / 7; - return HFMessages.get(playerRef, w == 1 ? MessageKeys.LogsGui.TIME_WEEK : MessageKeys.LogsGui.TIME_WEEKS, w); + return HFMessages.get(playerRef, w == 1 ? GuiKeys.LogsGui.TIME_WEEK : GuiKeys.LogsGui.TIME_WEEKS, w); } else { return TimeUtil.formatDate(timestamp); } @@ -280,7 +280,7 @@ private String formatRelativeTime(long timestamp) { /** Returns the localized display name for a log type. */ private String getLocalizedTypeName(FactionLog.LogType type) { - return HFMessages.get(playerRef, MessageKeys.LogsGui.typeKey(type.name())); + return HFMessages.get(playerRef, GuiKeys.LogsGui.typeKey(type.name())); } private void rebuildList() { diff --git a/src/main/java/com/hyperfactions/gui/faction/page/PlayerInfoPage.java b/src/main/java/com/hyperfactions/gui/faction/page/PlayerInfoPage.java index deb7c9b3..6cd0de94 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/PlayerInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/PlayerInfoPage.java @@ -11,7 +11,8 @@ import com.hyperfactions.storage.PlayerStorage; import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.TimeUtil; import com.hyperfactions.util.UuidUtil; @@ -105,21 +106,21 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.PLAYER_INFO); // === Static labels === - cmd.set("#PageTitle.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.TITLE)); - cmd.set("#FirstJoinedLabel.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.FIRST_JOINED_LABEL)); - cmd.set("#LastOnlineLabel.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.LAST_ONLINE_LABEL)); - cmd.set("#FactionLabel.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.FACTION_LABEL)); - cmd.set("#RoleLabel.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.ROLE_LABEL)); - cmd.set("#JoinedLabel.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.JOINED_LABEL_STATIC)); - cmd.set("#NoFactionLabel.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.NOT_IN_FACTION)); - cmd.set("#PowerHeader.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.POWER_HEADER)); - cmd.set("#PowerSubtitle.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.CURRENT_MAX)); - cmd.set("#CombatHeader.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.COMBAT_HEADER)); - cmd.set("#CombatSubtitle.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.KILLS_DEATHS)); - cmd.set("#KDRHeader.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.KDR_HEADER)); - cmd.set("#MembershipHistoryLabel.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.MEMBERSHIP_HISTORY)); - cmd.set("#ViewFactionBtn.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.VIEW_FACTION_BTN)); - cmd.set("#BackBtn.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.BACK_BTN)); + cmd.set("#PageTitle.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.TITLE)); + cmd.set("#FirstJoinedLabel.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.FIRST_JOINED_LABEL)); + cmd.set("#LastOnlineLabel.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.LAST_ONLINE_LABEL)); + cmd.set("#FactionLabel.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.FACTION_LABEL)); + cmd.set("#RoleLabel.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.ROLE_LABEL)); + cmd.set("#JoinedLabel.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.JOINED_LABEL_STATIC)); + cmd.set("#NoFactionLabel.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.NOT_IN_FACTION)); + cmd.set("#PowerHeader.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.POWER_HEADER)); + cmd.set("#PowerSubtitle.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.CURRENT_MAX)); + cmd.set("#CombatHeader.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.COMBAT_HEADER)); + cmd.set("#CombatSubtitle.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.KILLS_DEATHS)); + cmd.set("#KDRHeader.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.KDR_HEADER)); + cmd.set("#MembershipHistoryLabel.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.MEMBERSHIP_HISTORY)); + cmd.set("#ViewFactionBtn.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.VIEW_FACTION_BTN)); + cmd.set("#BackBtn.Text", HFMessages.get(viewerRef, CommonKeys.Common.BACK)); // === Header === cmd.set("#PlayerName.Text", targetPlayerName); @@ -128,8 +129,8 @@ public void build(Ref ref, UICommandBuilder cmd, PlayerRef targetRef = Universe.get().getPlayer(targetPlayerUuid); boolean isOnline = targetRef != null && targetRef.isValid(); cmd.set("#OnlineIndicator.Text", isOnline - ? HFMessages.get(viewerRef, MessageKeys.Common.ONLINE) - : HFMessages.get(viewerRef, MessageKeys.Common.OFFLINE)); + ? HFMessages.get(viewerRef, CommonKeys.Common.ONLINE) + : HFMessages.get(viewerRef, CommonKeys.Common.OFFLINE)); cmd.set("#OnlineIndicator.Style.TextColor", GuiColors.forOnlineStatus(isOnline)); // === First Joined / Last Online === @@ -137,15 +138,15 @@ public void build(Ref ref, UICommandBuilder cmd, if (cachedPlayerData != null && cachedPlayerData.getFirstJoined() > 0) { cmd.set("#FirstJoinedValue.Text", TimeUtil.formatDate(cachedPlayerData.getFirstJoined())); } else { - cmd.set("#FirstJoinedValue.Text", HFMessages.get(viewerRef, MessageKeys.Common.UNKNOWN)); + cmd.set("#FirstJoinedValue.Text", HFMessages.get(viewerRef, CommonKeys.Common.UNKNOWN)); } if (isOnline) { - cmd.set("#LastOnlineValue.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.NOW)); + cmd.set("#LastOnlineValue.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.NOW)); cmd.set("#LastOnlineValue.Style.TextColor", "#55FF55"); } else if (cachedPlayerData != null && cachedPlayerData.getLastOnline() > 0) { cmd.set("#LastOnlineValue.Text", TimeUtil.formatRelative(cachedPlayerData.getLastOnline())); } else { - cmd.set("#LastOnlineValue.Text", HFMessages.get(viewerRef, MessageKeys.Common.UNKNOWN)); + cmd.set("#LastOnlineValue.Text", HFMessages.get(viewerRef, CommonKeys.Common.UNKNOWN)); } // === Faction Section === @@ -220,7 +221,7 @@ public void build(Ref ref, UICommandBuilder cmd, List history = new java.util.ArrayList<>(cachedPlayerData.getMembershipHistory()); Collections.reverse(history); - cmd.set("#HistoryCount.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.HISTORY_COUNT, history.size())); + cmd.set("#HistoryCount.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.HISTORY_COUNT, history.size())); cmd.appendInline("#HistoryList", "Group #HistoryCards { LayoutMode: Top; }"); for (int i = 0; i < history.size(); i++) { @@ -230,10 +231,10 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.set(idx + " #HFactionName.Text", rec.factionName()); cmd.set(idx + " #HRole.Text", ConfigManager.get().getRoleDisplayName(rec.highestRole())); - cmd.set(idx + " #HJoined.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.JOINED_LABEL, TimeUtil.formatDate(rec.joinedAt()))); + cmd.set(idx + " #HJoined.Text", HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.JOINED_LABEL, TimeUtil.formatDate(rec.joinedAt()))); cmd.set(idx + " #HLeft.Text", rec.isActive() - ? HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.CURRENT) - : HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.LEFT_LABEL, TimeUtil.formatDate(rec.leftAt()))); + ? HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.CURRENT) + : HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.LEFT_LABEL, TimeUtil.formatDate(rec.leftAt()))); cmd.set(idx + " #HReason.Text", formatReason(rec.reason())); cmd.set(idx + " #HReason.Style.TextColor", GuiColors.forLeaveReason(rec.reason())); cmd.set(idx + " #RoleBar.Background.Color", GuiColors.forRole(rec.highestRole())); @@ -241,7 +242,7 @@ public void build(Ref ref, UICommandBuilder cmd, } else { cmd.set("#HistoryCount.Text", ""); cmd.appendInline("#HistoryList", - "Label { Text: \"" + HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.NO_HISTORY) + "\"; Style: (FontSize: 11, TextColor: #555555); }"); + "Label { Text: \"" + HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.NO_HISTORY) + "\"; Style: (FontSize: 11, TextColor: #555555); }"); } // Back button @@ -271,7 +272,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.playerUuid != null) { UUID factionId = UuidUtil.parseOrNull(data.playerUuid); if (factionId == null) { - player.sendMessage(MessageUtil.error(viewerRef, MessageKeys.Common.INVALID_ID)); + player.sendMessage(MessageUtil.error(viewerRef, CommonKeys.Common.INVALID_ID)); return; } @@ -280,7 +281,7 @@ public void handleDataEvent(Ref ref, Store store, guiManager.openFactionInfoFromPlayerInfo(player, ref, store, playerRef, faction, targetPlayerUuid, targetPlayerName, sourcePage); } else { - player.sendMessage(MessageUtil.error(viewerRef, MessageKeys.PlayerInfoGui.FACTION_GONE)); + player.sendMessage(MessageUtil.error(viewerRef, GuiKeys.PlayerInfoGui.FACTION_GONE)); } } } @@ -322,10 +323,10 @@ private void loadPlayerDataSync() { private String formatReason(MembershipRecord.LeaveReason reason) { return switch (reason) { - case ACTIVE -> HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.REASON_ACTIVE); - case LEFT -> HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.REASON_LEFT); - case KICKED -> HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.REASON_KICKED); - case DISBANDED -> HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.REASON_DISBANDED); + case ACTIVE -> HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.REASON_ACTIVE); + case LEFT -> HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.REASON_LEFT); + case KICKED -> HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.REASON_KICKED); + case DISBANDED -> HFMessages.get(viewerRef, GuiKeys.PlayerInfoGui.REASON_DISBANDED); }; } } diff --git a/src/main/java/com/hyperfactions/gui/faction/page/SetRelationModalPage.java b/src/main/java/com/hyperfactions/gui/faction/page/SetRelationModalPage.java index c7fe9f92..fd4c6979 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/SetRelationModalPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/SetRelationModalPage.java @@ -10,7 +10,8 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.manager.RelationManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; @@ -125,11 +126,11 @@ private void buildResultsContent(UICommandBuilder cmd, UIEventBuilder events) { if (results.isEmpty()) { // Show empty state if (searchQuery.isEmpty()) { - cmd.set("#EmptyText.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.SEARCH_HINT)); + cmd.set("#EmptyText.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.SEARCH_HINT)); } else { - cmd.set("#EmptyText.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.NO_RESULTS, searchQuery)); + cmd.set("#EmptyText.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.NO_RESULTS, searchQuery)); } - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, 0, 0)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, 0, 0)); } else { // Hide empty state by setting text to empty cmd.set("#EmptyText.Text", ""); @@ -143,7 +144,7 @@ private void buildResultsContent(UICommandBuilder cmd, UIEventBuilder events) { buildFactionCards(cmd, events, results, startIdx); // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -187,7 +188,7 @@ private List getSearchResults() { PowerManager.FactionPowerStats stats = powerManager.getFactionPowerStats(f.id()); FactionMember leader = f.getLeader(); - String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, CommonKeys.Common.UNKNOWN); entries.add(new FactionEntry( f.id(), @@ -218,9 +219,9 @@ private void buildFactionCards(UICommandBuilder cmd, UIEventBuilder events, // Faction info cmd.set(prefix + "#FactionName.Text", entry.name); - cmd.set(prefix + "#LeaderName.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.LEADER_LABEL, entry.leaderName)); - cmd.set(prefix + "#PowerCount.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.POWER_DISPLAY, String.format("%.0f", entry.power))); - cmd.set(prefix + "#MemberCount.Text", HFMessages.get(playerRef, MessageKeys.RelationsGui.MEMBER_COUNT_DISPLAY, entry.memberCount)); + cmd.set(prefix + "#LeaderName.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.LEADER_LABEL, entry.leaderName)); + cmd.set(prefix + "#PowerCount.Text", HFMessages.get(playerRef, GuiKeys.RelationsGui.POWER_DISPLAY, String.format("%.0f", entry.power))); + cmd.set(prefix + "#MemberCount.Text", HFMessages.get(playerRef, CommonKeys.Common.MEMBER_COUNT, entry.memberCount)); // Ally button events.addEventBinding( @@ -295,7 +296,7 @@ public void handleDataEvent(Ref ref, Store store, case "RequestAlly" -> { if (!canManage) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.SettingsGui.NO_PERMISSION)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.SettingsGui.NO_PERMISSION)); sendUpdate(); return; } @@ -303,7 +304,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID targetId = UuidUtil.parseOrNull(data.factionId); if (targetId == null) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.BrowserGui.INVALID_FACTION)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.BrowserGui.INVALID_FACTION)); sendUpdate(); return; } @@ -311,17 +312,17 @@ public void handleDataEvent(Ref ref, Store store, RelationManager.RelationResult result = relationManager.requestAlly(uuid, targetId); if (result == RelationManager.RelationResult.REQUEST_SENT) { - player.sendMessage(MessageUtil.info(playerRef, MessageKeys.RelationsGui.REQUEST_SENT, "#00AAFF", data.factionName)); + player.sendMessage(MessageUtil.info(playerRef, GuiKeys.RelationsGui.REQUEST_SENT, "#00AAFF", data.factionName)); // Navigate to pending tab since a request was sent guiManager.openFactionRelations(player, ref, store, playerRef, factionManager.getFaction(faction.id()), "pending"); } else if (result == RelationManager.RelationResult.REQUEST_ACCEPTED) { - player.sendMessage(MessageUtil.info(playerRef, MessageKeys.RelationsGui.NOW_ALLIED, "#00AAFF", data.factionName)); + player.sendMessage(MessageUtil.info(playerRef, GuiKeys.RelationsGui.NOW_ALLIED, "#00AAFF", data.factionName)); // Navigate to relations tab since alliance is now active guiManager.openFactionRelations(player, ref, store, playerRef, factionManager.getFaction(faction.id()), "relations"); } else { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RelationsGui.FAILED, result)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.RelationsGui.FAILED, result)); guiManager.openFactionRelations(player, ref, store, playerRef, factionManager.getFaction(faction.id())); } @@ -330,7 +331,7 @@ public void handleDataEvent(Ref ref, Store store, case "SetEnemy" -> { if (!canManage) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.SettingsGui.NO_PERMISSION)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.SettingsGui.NO_PERMISSION)); sendUpdate(); return; } @@ -338,7 +339,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID targetId = UuidUtil.parseOrNull(data.factionId); if (targetId == null) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.BrowserGui.INVALID_FACTION)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.BrowserGui.INVALID_FACTION)); sendUpdate(); return; } @@ -346,9 +347,9 @@ public void handleDataEvent(Ref ref, Store store, RelationManager.RelationResult result = relationManager.setEnemy(uuid, targetId); if (result == RelationManager.RelationResult.SUCCESS) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RelationsGui.NOW_ENEMIES, data.factionName)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.RelationsGui.NOW_ENEMIES, data.factionName)); } else { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RelationsGui.FAILED, result)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.RelationsGui.FAILED, result)); } guiManager.openFactionRelations(player, ref, store, playerRef, @@ -360,7 +361,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID targetId = UuidUtil.parseOrNull(data.factionId); if (targetId == null) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.BrowserGui.INVALID_FACTION)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.BrowserGui.INVALID_FACTION)); sendUpdate(); return; } @@ -370,7 +371,7 @@ public void handleDataEvent(Ref ref, Store store, if (targetFaction != null) { guiManager.openFactionInfo(player, ref, store, playerRef, targetFaction, "relations"); } else { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.PlayerInfoGui.FACTION_GONE)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.PlayerInfoGui.FACTION_GONE)); sendUpdate(); } } diff --git a/src/main/java/com/hyperfactions/gui/faction/page/TransferConfirmPage.java b/src/main/java/com/hyperfactions/gui/faction/page/TransferConfirmPage.java index 778d1921..d6aac7aa 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TransferConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TransferConfirmPage.java @@ -9,7 +9,8 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -66,11 +67,11 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.TRANSFER_CONFIRM); // Static labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.TRANSFER_TITLE)); - cmd.set("#ConfirmText.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.TRANSFER_PROMPT)); - cmd.set("#WarningText.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.TRANSFER_WARNING)); - cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.CANCEL)); - cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.TRANSFER)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.TRANSFER_TITLE)); + cmd.set("#ConfirmText.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.TRANSFER_PROMPT)); + cmd.set("#WarningText.Text", HFMessages.get(playerRef, GuiKeys.ConfirmGui.TRANSFER_WARNING)); + cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.CANCEL)); + cmd.set("#ConfirmBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.TRANSFER)); // Set dynamic values cmd.set("#TargetName.Text", targetName); @@ -110,7 +111,7 @@ public void handleDataEvent(Ref ref, Store store, // Re-fetch faction to ensure fresh state Faction currentFaction = factionManager.getFaction(faction.id()); if (currentFaction == null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.FACTION_GONE)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.FACTION_GONE)); guiManager.openFactionMain(player, ref, store, playerRef); return; } @@ -119,7 +120,7 @@ public void handleDataEvent(Ref ref, Store store, // Verify leader permission if (member == null || member.role() != FactionRole.LEADER) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.NOT_LEADER_TRANSFER)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.NOT_LEADER_TRANSFER)); guiManager.openFactionMembers(player, ref, store, playerRef, currentFaction); return; } @@ -136,7 +137,7 @@ public void handleDataEvent(Ref ref, Store store, faction.id(), targetUuid, uuid); if (result == FactionManager.FactionResult.SUCCESS) { - player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.ConfirmGui.LEADERSHIP_TRANSFERRED, targetName)); + player.sendMessage(MessageUtil.successText(playerRef, GuiKeys.ConfirmGui.LEADERSHIP_TRANSFERRED, targetName)); // Refresh to show updated roles Faction refreshedFaction = factionManager.getFaction(faction.id()); if (refreshedFaction != null) { @@ -145,7 +146,7 @@ public void handleDataEvent(Ref ref, Store store, guiManager.openFactionMain(player, ref, store, playerRef); } } else { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.TRANSFER_FAILED, result)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.ConfirmGui.TRANSFER_FAILED, result)); guiManager.openFactionMembers(player, ref, store, playerRef, currentFaction); } } diff --git a/src/main/java/com/hyperfactions/gui/faction/page/TreasuryDepositModalPage.java b/src/main/java/com/hyperfactions/gui/faction/page/TreasuryDepositModalPage.java index a617809d..b3d4c5ca 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TreasuryDepositModalPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TreasuryDepositModalPage.java @@ -17,7 +17,7 @@ import com.hyperfactions.manager.EconomyManager; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.UiUtil; import com.hypixel.hytale.component.Ref; @@ -84,28 +84,28 @@ public void build(Ref ref, UICommandBuilder cmd, // Set mode subtitle cmd.set("#ModeLabel.Text", isDeposit - ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.DEPOSIT_TITLE) - : HFMessages.get(playerRef, MessageKeys.TreasuryGui.WITHDRAW_TITLE)); + ? HFMessages.get(playerRef, GuiKeys.TreasuryGui.DEPOSIT_TITLE) + : HFMessages.get(playerRef, GuiKeys.TreasuryGui.WITHDRAW_TITLE)); // Set balances VaultEconomyProvider vault = economyManager.getVaultProvider(); - cmd.set("#WalletLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.WALLET_LABEL, + cmd.set("#WalletLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.WALLET_LABEL, economyManager.formatCurrency(vault.getBalanceBigDecimal(uuid)))); FactionEconomy economy = economyManager.getEconomy(faction.id()); BigDecimal treasuryBalance = economy != null ? economy.balance() : BigDecimal.ZERO; - cmd.set("#TreasuryLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.TREASURY_LABEL, + cmd.set("#TreasuryLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.TREASURY_LABEL, economyManager.formatCurrency(treasuryBalance))); // Fee label EconomyAPI.TransactionType txType = isDeposit ? EconomyAPI.TransactionType.DEPOSIT : EconomyAPI.TransactionType.WITHDRAW; BigDecimal feePercent = isDeposit ? ConfigManager.get().getDepositFeePercent() : ConfigManager.get().getWithdrawFeePercent(); - cmd.set("#FeeLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.FEE_LABEL, feePercent.toPlainString())); + cmd.set("#FeeLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.FEE_LABEL, feePercent.toPlainString())); // Confirm button text cmd.set("#ConfirmBtn.Text", isDeposit - ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.CONFIRM_DEPOSIT) - : HFMessages.get(playerRef, MessageKeys.TreasuryGui.CONFIRM_WITHDRAWAL)); + ? HFMessages.get(playerRef, GuiKeys.TreasuryGui.CONFIRM_DEPOSIT) + : HFMessages.get(playerRef, GuiKeys.TreasuryGui.CONFIRM_WITHDRAWAL)); // Check withdraw permission if (!isDeposit) { @@ -185,11 +185,11 @@ private void handlePreview(DepositModalData data) { cmd.set("#FeeAmount.Text", economyManager.formatCurrency(amount)); cmd.set("#FeeValue.Text", fee.compareTo(BigDecimal.ZERO) > 0 ? "-" + economyManager.formatCurrency(fee) : economyManager.formatCurrency(BigDecimal.ZERO)); if (isDeposit) { - cmd.set("#FeeTotal.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.FROM_WALLET, + cmd.set("#FeeTotal.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.FROM_WALLET, economyManager.formatCurrency(total))); } else { BigDecimal net = amount.subtract(fee); - cmd.set("#FeeTotal.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.TO_WALLET, + cmd.set("#FeeTotal.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.TO_WALLET, economyManager.formatCurrency(net))); } } @@ -210,7 +210,7 @@ private void handleConfirm(Player player, Ref ref, Store ref, Store ref, Store ref, Store 0) { - player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.TreasuryGui.DEPOSITED_FEE, + player.sendMessage(MessageUtil.successText(playerRef, GuiKeys.TreasuryGui.DEPOSITED_FEE, economyManager.formatCurrency(amount), economyManager.formatCurrency(fee))); } else { - player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.TreasuryGui.DEPOSITED, + player.sendMessage(MessageUtil.successText(playerRef, GuiKeys.TreasuryGui.DEPOSITED, economyManager.formatCurrency(amount))); } @@ -273,7 +273,7 @@ private void handleWithdrawConfirm(Player player, Ref ref, Store ref, Store ref, Store - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.TreasuryGui.INSUFFICIENT_TREASURY)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.TreasuryGui.INSUFFICIENT_TREASURY)); case LIMIT_EXCEEDED -> - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.TreasuryGui.WITHDRAW_LIMIT)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.TreasuryGui.WITHDRAW_LIMIT)); default -> - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.TreasuryGui.WITHDRAW_FAILED, result)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.TreasuryGui.WITHDRAW_FAILED, result)); } sendUpdate(); return; @@ -305,17 +305,17 @@ private void handleWithdrawConfirm(Player player, Ref ref, Store 0) { - player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.TreasuryGui.WITHDREW_FEE, + player.sendMessage(MessageUtil.successText(playerRef, GuiKeys.TreasuryGui.WITHDREW_FEE, economyManager.formatCurrency(amount), economyManager.formatCurrency(fee), economyManager.formatCurrency(netToWallet))); } else { - player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.TreasuryGui.WITHDREW, + player.sendMessage(MessageUtil.successText(playerRef, GuiKeys.TreasuryGui.WITHDREW, economyManager.formatCurrency(amount))); } diff --git a/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java b/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java index e99d095b..08d163c5 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java @@ -17,7 +17,8 @@ import com.hyperfactions.manager.EconomyManager; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.UiUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -88,29 +89,29 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.FACTION_TREASURY); // Localize static labels - cmd.set("#TreasuryTitle.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.TITLE)); - cmd.set("#BalanceLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.BALANCE_LABEL)); - cmd.set("#IncomeLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.INCOME_24H)); - cmd.set("#IncomeDescLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.DEPOSITS_TRANSFERS_IN)); - cmd.set("#ExpensesLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.EXPENSES_24H)); - cmd.set("#ExpensesDescLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.WITHDRAWALS_TRANSFERS_OUT)); - cmd.set("#MaintenanceLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.MAINTENANCE)); - cmd.set("#RunwayLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.RUNWAY_LABEL)); - cmd.set("#AddFundsLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.ADD_FUNDS)); - cmd.set("#DepositBtn.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.DEPOSIT_BTN)); - cmd.set("#TakeFundsLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.TAKE_FUNDS)); - cmd.set("#WithdrawBtn.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.WITHDRAW_BTN)); - cmd.set("#SendToFactionLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.SEND_TO_FACTION)); - cmd.set("#TransferBtn.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.TRANSFER_BTN)); - cmd.set("#TreasuryConfigLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.TREASURY_CONFIG)); - cmd.set("#SettingsBtn.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.SETTINGS_BTN)); - cmd.set("#RecentTransactionsLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.RECENT_TRANSACTIONS)); - cmd.set("#ColDateLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.COL_DATE)); - cmd.set("#ColTypeLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.COL_TYPE)); - cmd.set("#ColByLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.COL_BY)); - cmd.set("#ColAmountLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.COL_AMOUNT)); - cmd.set("#ColDetailsLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.COL_DETAILS)); - cmd.set("#PayNowBtn.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.PAY_NOW_BTN)); + cmd.set("#TreasuryTitle.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.TITLE)); + cmd.set("#BalanceLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.BALANCE_LABEL)); + cmd.set("#IncomeLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.INCOME_24H)); + cmd.set("#IncomeDescLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.DEPOSITS_TRANSFERS_IN)); + cmd.set("#ExpensesLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.EXPENSES_24H)); + cmd.set("#ExpensesDescLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.WITHDRAWALS_TRANSFERS_OUT)); + cmd.set("#MaintenanceLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.MAINTENANCE)); + cmd.set("#RunwayLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.RUNWAY_LABEL)); + cmd.set("#AddFundsLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.ADD_FUNDS)); + cmd.set("#DepositBtn.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.DEPOSIT_BTN)); + cmd.set("#TakeFundsLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.TAKE_FUNDS)); + cmd.set("#WithdrawBtn.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.WITHDRAW_BTN)); + cmd.set("#SendToFactionLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.SEND_TO_FACTION)); + cmd.set("#TransferBtn.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.TRANSFER_BTN)); + cmd.set("#TreasuryConfigLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.TREASURY_CONFIG)); + cmd.set("#SettingsBtn.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.SETTINGS_BTN)); + cmd.set("#RecentTransactionsLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.RECENT_TRANSACTIONS)); + cmd.set("#ColDateLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.COL_DATE)); + cmd.set("#ColTypeLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.COL_TYPE)); + cmd.set("#ColByLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.COL_BY)); + cmd.set("#ColAmountLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.COL_AMOUNT)); + cmd.set("#ColDetailsLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.COL_DETAILS)); + cmd.set("#PayNowBtn.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.PAY_NOW_BTN)); NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); @@ -142,7 +143,7 @@ private void buildStatCards(UICommandBuilder cmd, FactionEconomy economy, UUID u // Wallet balance BigDecimal walletBalance = economyManager.getVaultProvider().getBalanceBigDecimal(uuid); - cmd.set("#WalletBalance.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.WALLET_LABEL, + cmd.set("#WalletBalance.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.WALLET_LABEL, economyManager.formatCurrencyCompact(walletBalance))); // 24h P&L @@ -189,10 +190,10 @@ private void buildUpkeepSection(UICommandBuilder cmd, UIEventBuilder events, } // Show chunk breakdown - String chunkDetail = HFMessages.get(playerRef, MessageKeys.TreasuryGui.CHUNKS_DETAIL, + String chunkDetail = HFMessages.get(playerRef, GuiKeys.TreasuryGui.CHUNKS_DETAIL, Math.min(freeChunks, claimCount), billableChunks); - String costString = HFMessages.get(playerRef, MessageKeys.TreasuryGui.UPKEEP_COST_FORMAT, economyManager.formatCurrency(costPerCycle), intervalHours); - cmd.set("#UpkeepCost.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.COST_LABEL, costString)); + String costString = HFMessages.get(playerRef, GuiKeys.TreasuryGui.UPKEEP_COST_FORMAT, economyManager.formatCurrency(costPerCycle), intervalHours); + cmd.set("#UpkeepCost.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.COST_LABEL, costString)); cmd.set("#UpkeepDetail.Text", chunkDetail); // Color-code the progress bar based on status @@ -209,13 +210,13 @@ private void buildUpkeepSection(UICommandBuilder cmd, UIEventBuilder events, cmd.set("#UpkeepBar.Value", progress); cmd.set("#UpkeepBar.Bar.Color", barColor); cmd.set("#UpkeepTimer.Text", remaining < 0 - ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.PENDING) - : HFMessages.get(playerRef, MessageKeys.TreasuryGui.UPKEEP_TIME_LEFT, formatDuration(remaining))); + ? HFMessages.get(playerRef, GuiKeys.TreasuryGui.PENDING) + : HFMessages.get(playerRef, GuiKeys.TreasuryGui.UPKEEP_TIME_LEFT, formatDuration(remaining))); boolean autoPay = economy != null && economy.upkeepAutoPay(); cmd.set("#AutoPayStatus.Text", autoPay - ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.AUTO_PAY_ON) - : HFMessages.get(playerRef, MessageKeys.TreasuryGui.AUTO_PAY_OFF)); + ? HFMessages.get(playerRef, GuiKeys.TreasuryGui.AUTO_PAY_ON) + : HFMessages.get(playerRef, GuiKeys.TreasuryGui.AUTO_PAY_OFF)); cmd.set("#AutoPayStatus.Style.TextColor", autoPay ? "#55FF55" : "#FF5555"); // Cost projections row @@ -238,23 +239,23 @@ private void buildUpkeepSection(UICommandBuilder cmd, UIEventBuilder events, String runwayText; String runwayColor; if (runwayDays > 90) { - runwayText = HFMessages.get(playerRef, MessageKeys.TreasuryGui.RUNWAY_90_PLUS); + runwayText = HFMessages.get(playerRef, GuiKeys.TreasuryGui.RUNWAY_90_PLUS); runwayColor = "#55FF55"; } else if (runwayDays > 0) { runwayText = runwayDays != 1 - ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.RUNWAY_DAYS, runwayDays) - : HFMessages.get(playerRef, MessageKeys.TreasuryGui.RUNWAY_DAY, runwayDays); + ? HFMessages.get(playerRef, GuiKeys.TreasuryGui.RUNWAY_DAYS, runwayDays) + : HFMessages.get(playerRef, GuiKeys.TreasuryGui.RUNWAY_DAY, runwayDays); runwayColor = runwayDays <= 3 ? "#FF5555" : runwayDays <= 7 ? "#FFAA00" : "#55FF55"; } else { - runwayText = HFMessages.get(playerRef, MessageKeys.TreasuryGui.RUNWAY_LESS_THAN_DAY); + runwayText = HFMessages.get(playerRef, GuiKeys.TreasuryGui.RUNWAY_LESS_THAN_DAY); runwayColor = "#FF5555"; } cmd.set("#RunwayValue.Text", runwayText); cmd.set("#RunwayValue.Style.TextColor", runwayColor); } else { cmd.set("#RunwayValue.Text", balance.compareTo(BigDecimal.ZERO) == 0 - ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.RUNWAY_NO_FUNDS) - : HFMessages.get(playerRef, MessageKeys.Common.NA)); + ? HFMessages.get(playerRef, GuiKeys.TreasuryGui.RUNWAY_NO_FUNDS) + : HFMessages.get(playerRef, CommonKeys.Common.NA)); cmd.set("#RunwayValue.Style.TextColor", "#FF5555"); } } @@ -265,15 +266,15 @@ private void buildUpkeepSection(UICommandBuilder cmd, UIEventBuilder events, long graceMs = config.getUpkeepGracePeriodHours() * 3600_000L; long graceElapsed = System.currentTimeMillis() - economy.upkeepGraceStartTimestamp(); long graceRemaining = Math.max(0, graceMs - graceElapsed); - cmd.set("#GraceTimer.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.GRACE_EXPIRES, + cmd.set("#GraceTimer.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.GRACE_EXPIRES, formatDuration(graceRemaining))); - cmd.set("#MissedCount.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.MISSED_PAYMENTS, + cmd.set("#MissedCount.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.MISSED_PAYMENTS, economy.consecutiveMissedPayments())); // Show Pay Now button if faction can afford the upkeep cost if (canAfford && billableChunks > 0) { cmd.set("#PayNowRow.Visible", true); - cmd.set("#PayNowCost.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.PAY_TO_CLEAR, + cmd.set("#PayNowCost.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.PAY_TO_CLEAR, economyManager.formatCurrency(costPerCycle))); events.addEventBinding(CustomUIEventBindingType.Activating, "#PayNowBtn", EventData.of("Button", "PayNow"), false); @@ -457,7 +458,7 @@ private void handlePayNow(Player player, Ref ref, String.format("Upkeep paid manually: %s (%d billable chunks, grace cleared)", economyManager.formatCurrency(cost), billableChunks), playerRef.getUuid(), - MessageKeys.LogsGui.MSG_UPKEEP_MANUAL, economyManager.formatCurrency(cost), String.valueOf(billableChunks))); + GuiKeys.LogsGui.MSG_UPKEEP_MANUAL, economyManager.formatCurrency(cost), String.valueOf(billableChunks))); factionManager.updateFaction(logged); } } @@ -519,17 +520,17 @@ private static String formatDuration(long millis) { private String getHumanTypeName(EconomyAPI.TransactionType type) { return switch (type) { - case DEPOSIT -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.TYPE_DEPOSIT); - case WITHDRAW -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.TYPE_WITHDRAWAL); - case TRANSFER_IN -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.TYPE_TRANSFER_IN); - case TRANSFER_OUT -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.TYPE_TRANSFER_OUT); - case PLAYER_TRANSFER_OUT -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.TYPE_PLAYER_TRANSFER); - case UPKEEP -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.TYPE_UPKEEP); - case TAX_COLLECTION -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.TYPE_TAX); - case WAR_COST -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.TYPE_WAR_COST); - case RAID_COST -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.TYPE_RAID_COST); - case SPOILS -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.TYPE_SPOILS); - case ADMIN_ADJUSTMENT -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.TYPE_ADMIN); + case DEPOSIT -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.TYPE_DEPOSIT); + case WITHDRAW -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.TYPE_WITHDRAWAL); + case TRANSFER_IN -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.TYPE_TRANSFER_IN); + case TRANSFER_OUT -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.TYPE_TRANSFER_OUT); + case PLAYER_TRANSFER_OUT -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.TYPE_PLAYER_TRANSFER); + case UPKEEP -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.TYPE_UPKEEP); + case TAX_COLLECTION -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.TYPE_TAX); + case WAR_COST -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.TYPE_WAR_COST); + case RAID_COST -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.TYPE_RAID_COST); + case SPOILS -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.TYPE_SPOILS); + case ADMIN_ADJUSTMENT -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.TYPE_ADMIN); }; } @@ -551,7 +552,7 @@ private static String getTypeSign(EconomyAPI.TransactionType type) { private String resolveActorName(UUID actorId) { if (actorId == null) { - return HFMessages.get(playerRef, MessageKeys.TreasuryGui.SYSTEM); + return HFMessages.get(playerRef, GuiKeys.TreasuryGui.SYSTEM); } FactionMember member = faction.getMember(actorId); if (member != null) { diff --git a/src/main/java/com/hyperfactions/gui/faction/page/TreasurySettingsPage.java b/src/main/java/com/hyperfactions/gui/faction/page/TreasurySettingsPage.java index 006853f1..8d7c5011 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TreasurySettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TreasurySettingsPage.java @@ -12,9 +12,9 @@ import com.hyperfactions.gui.faction.data.TreasurySettingsData; import com.hyperfactions.manager.EconomyManager; import com.hyperfactions.manager.FactionManager; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -68,17 +68,17 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.TREASURY_SETTINGS); // Localize static labels - cmd.set("#TreasurySettingsTitle.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.SETTINGS_TITLE)); - cmd.set("#OfficerPermissionsHeader.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.OFFICER_PERMISSIONS)); - cmd.set("#LimitsHeader.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.LIMITS_SECTION)); - cmd.set("#MaxWithdrawLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.MAX_PER_WITHDRAWAL)); - cmd.set("#MaxWithdrawPeriodLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.MAX_WITHDRAWALS_PER)); - cmd.set("#MaxTransferLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.MAX_PER_TRANSFER)); - cmd.set("#MaxTransferPeriodLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.MAX_TRANSFERS_PER)); - cmd.set("#PeriodHoursLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.LIMIT_PERIOD)); - cmd.set("#NoLimitHintLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.NO_LIMIT_HINT)); - cmd.set("#UpkeepSettingsHeader.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.UPKEEP_SETTINGS)); - cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.BACK_BTN)); + cmd.set("#TreasurySettingsTitle.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.SETTINGS_TITLE)); + cmd.set("#OfficerPermissionsHeader.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.OFFICER_PERMISSIONS)); + cmd.set("#LimitsHeader.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.LIMITS_SECTION)); + cmd.set("#MaxWithdrawLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.MAX_PER_WITHDRAWAL)); + cmd.set("#MaxWithdrawPeriodLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.MAX_WITHDRAWALS_PER)); + cmd.set("#MaxTransferLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.MAX_PER_TRANSFER)); + cmd.set("#MaxTransferPeriodLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.MAX_TRANSFERS_PER)); + cmd.set("#PeriodHoursLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.LIMIT_PERIOD)); + cmd.set("#NoLimitHintLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.NO_LIMIT_HINT)); + cmd.set("#UpkeepSettingsHeader.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.UPKEEP_SETTINGS)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.BACK)); FactionPermissions perms = faction.getEffectivePermissions(); FactionEconomy economy = economyManager.getEconomy(faction.id()); @@ -166,7 +166,7 @@ private void handleTogglePerm(Player player, Ref ref, Store ref, Store ref, UICommandBuilder cmd, // Target info cmd.set("#TargetName.Text", targetName); String typeTag = "player".equals(targetType) - ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.TAG_PLAYER) - : HFMessages.get(playerRef, MessageKeys.TreasuryGui.TAG_FACTION); + ? HFMessages.get(playerRef, GuiKeys.TreasuryGui.TAG_PLAYER) + : HFMessages.get(playerRef, GuiKeys.TreasuryGui.TAG_FACTION); cmd.set("#TargetType.Text", typeTag); // Set tag color dynamically (Labels support .Style.TextColor) if ("faction".equals(targetType)) { @@ -97,11 +97,11 @@ public void build(Ref ref, UICommandBuilder cmd, // Treasury balance FactionEconomy economy = economyManager.getEconomy(faction.id()); BigDecimal treasuryBalance = economy != null ? economy.balance() : BigDecimal.ZERO; - cmd.set("#TreasuryLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.TREASURY_LABEL, economyManager.formatCurrency(treasuryBalance))); + cmd.set("#TreasuryLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.TREASURY_LABEL, economyManager.formatCurrency(treasuryBalance))); // Fee label BigDecimal feePercent = ConfigManager.get().getTransferFeePercent(); - cmd.set("#FeeLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.FEE_LABEL, feePercent.toPlainString())); + cmd.set("#FeeLabel.Text", HFMessages.get(playerRef, GuiKeys.TreasuryGui.FEE_LABEL, feePercent.toPlainString())); // Event bindings events.addEventBinding(CustomUIEventBindingType.Activating, "#CancelBtn", @@ -172,14 +172,14 @@ private void handleConfirm(Player player, Ref ref, Store ref, Store ref, Store ref, Store ref, Store ref, Store ref, Store ref, Store 0) { events.addEventBinding(CustomUIEventBindingType.Activating, "#PrevBtn", @@ -167,11 +167,11 @@ private List getSearchResults() { List players = PlayerResolver.search(plugin, searchQuery, selfUuid); for (PlayerResolver.ResolvedPlayer p : players) { String subtitle = switch (p.source()) { - case ONLINE -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.SOURCE_ONLINE) + case ONLINE -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.SOURCE_ONLINE) + (p.factionName() != null ? " - " + p.factionName() : ""); - case FACTION_MEMBER -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.SOURCE_OFFLINE) + case FACTION_MEMBER -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.SOURCE_OFFLINE) + " - " + p.factionName(); - case PLAYER_DB -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.SOURCE_PLAYER_DB); + case PLAYER_DB -> HFMessages.get(playerRef, GuiKeys.TreasuryGui.SOURCE_PLAYER_DB); }; results.add(new SearchResult(p.uuid().toString(), p.username(), "player", subtitle)); } diff --git a/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java b/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java index 5958e520..1ef69c23 100644 --- a/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java +++ b/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java @@ -9,7 +9,7 @@ import com.hyperfactions.gui.newplayer.NewPlayerNavBarHelper; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -107,7 +107,7 @@ public void build(Ref ref, UICommandBuilder cmd, } // Page title - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.HELP_CENTER_TITLE)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.HELP_CENTER_TITLE)); // Set localized sidebar button labels (player categories only) int catIdx = 0; diff --git a/src/main/java/com/hyperfactions/gui/newplayer/NewPlayerNavBarHelper.java b/src/main/java/com/hyperfactions/gui/newplayer/NewPlayerNavBarHelper.java index 20f913df..8ae08804 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/NewPlayerNavBarHelper.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/NewPlayerNavBarHelper.java @@ -6,7 +6,7 @@ import com.hyperfactions.gui.shared.NavBarUtil; import com.hyperfactions.gui.shared.data.NavAwareData; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; @@ -69,7 +69,7 @@ public static void setupBar( // "Player" button on far right cmd.append("#HyperFactionsNavBar #NavBarButtons", UIPaths.NAV_BUTTON); cmd.set("#HyperFactionsNavBar #NavBarButtons[2] #NavActionButton.Text", - HFMessages.get(playerRef, MessageKeys.Nav.PLAYER_SETTINGS)); + HFMessages.get(playerRef, GuiKeys.Nav.PLAYER_SETTINGS)); events.addEventBinding( CustomUIEventBindingType.Activating, "#HyperFactionsNavBar #NavBarButtons[2] #NavActionButton", diff --git a/src/main/java/com/hyperfactions/gui/newplayer/page/CreateFactionPage.java b/src/main/java/com/hyperfactions/gui/newplayer/page/CreateFactionPage.java index 1009acbb..a987ee28 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/CreateFactionPage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/CreateFactionPage.java @@ -10,7 +10,8 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -81,63 +82,63 @@ public void build(Ref ref, UICommandBuilder cmd, NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); // Localize static labels — page title and section headers - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.TITLE)); - cmd.set("#SectionPreview.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.SECTION_PREVIEW)); - cmd.set("#NamePrefix.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.NAME_PREFIX)); - cmd.set("#SectionBasicInfo.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.SECTION_BASIC_INFO)); - cmd.set("#FactionNameLabel.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.FACTION_NAME_LABEL)); - cmd.set("#TagLabel.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.TAG_LABEL)); - cmd.set("#SectionDetails.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.SECTION_DETAILS)); - cmd.set("#DescLabel.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.DESC_LABEL)); - cmd.set("#RecruitmentLabel.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.RECRUITMENT_LABEL)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.TITLE)); + cmd.set("#SectionPreview.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.SECTION_PREVIEW)); + cmd.set("#NamePrefix.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.NAME_PREFIX)); + cmd.set("#SectionBasicInfo.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.SECTION_BASIC_INFO)); + cmd.set("#FactionNameLabel.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.FACTION_NAME_LABEL)); + cmd.set("#TagLabel.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.TAG_LABEL)); + cmd.set("#SectionDetails.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.SECTION_DETAILS)); + cmd.set("#DescLabel.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.DESC_LABEL)); + cmd.set("#RecruitmentLabel.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.RECRUITMENT_LABEL)); // Localize middle column — territory permissions (reuse SettingsGui keys) - cmd.set("#LockHint.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.LOCK_HINT)); - cmd.set("#TerritoryPermissionsLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.TERRITORY_PERMISSIONS)); - cmd.set("#ColOut.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.COL_OUT)); - cmd.set("#ColAlly.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.COL_ALLY)); - cmd.set("#ColMem.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.COL_MEM)); - cmd.set("#ColOff.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.COL_OFF)); - cmd.set("#CatBuilding.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.CAT_BUILDING)); - cmd.set("#PermBreak.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_BREAK)); - cmd.set("#PermPlace.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_PLACE)); - cmd.set("#CatInteraction.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.CAT_INTERACTION)); - cmd.set("#InteractionHint.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.INTERACTION_HINT)); - cmd.set("#PermAll.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_ALL)); - cmd.set("#PermDoor.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_DOOR)); - cmd.set("#PermChest.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_CHEST)); - cmd.set("#PermBench.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_BENCH)); - cmd.set("#PermProcessing.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_PROCESSING)); - cmd.set("#PermSeat.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_SEAT)); - cmd.set("#PermTransport.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_TRANSPORT)); - cmd.set("#CatOther.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.CAT_OTHER)); - cmd.set("#PermCrate.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_CRATE)); - cmd.set("#PermNpcTame.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_NPC_TAME)); - cmd.set("#PermPve.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PERM_PVE)); + cmd.set("#LockHint.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.LOCK_HINT)); + cmd.set("#TerritoryPermissionsLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.TERRITORY_PERMISSIONS)); + cmd.set("#ColOut.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.COL_OUT)); + cmd.set("#ColAlly.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.COL_ALLY)); + cmd.set("#ColMem.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.COL_MEM)); + cmd.set("#ColOff.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.COL_OFF)); + cmd.set("#CatBuilding.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.CAT_BUILDING)); + cmd.set("#PermBreak.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_BREAK)); + cmd.set("#PermPlace.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_PLACE)); + cmd.set("#CatInteraction.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.CAT_INTERACTION)); + cmd.set("#InteractionHint.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.INTERACTION_HINT)); + cmd.set("#PermAll.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_ALL)); + cmd.set("#PermDoor.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_DOOR)); + cmd.set("#PermChest.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_CHEST)); + cmd.set("#PermBench.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_BENCH)); + cmd.set("#PermProcessing.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_PROCESSING)); + cmd.set("#PermSeat.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_SEAT)); + cmd.set("#PermTransport.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_TRANSPORT)); + cmd.set("#CatOther.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.CAT_OTHER)); + cmd.set("#PermCrate.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_CRATE)); + cmd.set("#PermNpcTame.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_NPC_TAME)); + cmd.set("#PermPve.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PERM_PVE)); // Localize right column — faction color, mob spawning, combat - cmd.set("#SectionFactionColor.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.SECTION_FACTION_COLOR)); - cmd.set("#SectionMobSpawning.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.MOB_SPAWNING)); - cmd.set("#MobSpawningHint.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.MOB_SPAWNING_HINT)); - cmd.set("#MobSpawningLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.MOB_SPAWNING_LABEL)); - cmd.set("#HostileMobsLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.HOSTILE_MOBS)); - cmd.set("#PassiveMobsLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PASSIVE_MOBS)); - cmd.set("#NeutralMobsLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.NEUTRAL_MOBS)); - cmd.set("#SectionCombat.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.SECTION_COMBAT)); - cmd.set("#PvPLabel.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_IN_TERRITORY)); - cmd.set("#CreateBtn.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.CREATE_BTN)); + cmd.set("#SectionFactionColor.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.SECTION_FACTION_COLOR)); + cmd.set("#SectionMobSpawning.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.MOB_SPAWNING)); + cmd.set("#MobSpawningHint.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.MOB_SPAWNING_HINT)); + cmd.set("#MobSpawningLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.MOB_SPAWNING_LABEL)); + cmd.set("#HostileMobsLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.HOSTILE_MOBS)); + cmd.set("#PassiveMobsLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PASSIVE_MOBS)); + cmd.set("#NeutralMobsLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.NEUTRAL_MOBS)); + cmd.set("#SectionCombat.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.SECTION_COMBAT)); + cmd.set("#PvPLabel.Text", HFMessages.get(playerRef, GuiKeys.SettingsGui.PVP_IN_TERRITORY)); + cmd.set("#CreateBtn.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.CREATE_BTN)); // Set default ColorPicker value (cyan) cmd.set("#FactionColorPicker.Value", DEFAULT_COLOR); // Set preview defaults - cmd.set("#PreviewName.TextSpans", Message.raw(HFMessages.get(playerRef, MessageKeys.CreateGui.PREVIEW_NAME)).color(DEFAULT_COLOR)); - cmd.set("#PreviewLeader.Text", HFMessages.get(playerRef, MessageKeys.CreateGui.LEADER_PREFIX, playerRef.getUsername())); + cmd.set("#PreviewName.TextSpans", Message.raw(HFMessages.get(playerRef, GuiKeys.CreateGui.PREVIEW_NAME)).color(DEFAULT_COLOR)); + cmd.set("#PreviewLeader.Text", HFMessages.get(playerRef, GuiKeys.CreateGui.LEADER_PREFIX, playerRef.getUsername())); // Recruitment dropdown cmd.set("#RecruitmentDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)), "INVITE_ONLY"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN)), "OPEN") + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_INVITE_ONLY)), "INVITE_ONLY"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_OPEN)), "OPEN") )); cmd.set("#RecruitmentDropdown.Value", openRecruitment ? "OPEN" : "INVITE_ONLY"); @@ -215,7 +216,7 @@ private void buildPermissionToggles(UICommandBuilder cmd, UIEventBuilder events) // PvP toggle buildPermissionToggle(cmd, events, "PvPToggle", "pvpEnabled", perms.pvpEnabled(), config, false); - cmd.set("#PvPStatus.Text", perms.pvpEnabled() ? HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_ENABLED) : HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_DISABLED)); + cmd.set("#PvPStatus.Text", perms.pvpEnabled() ? HFMessages.get(playerRef, GuiKeys.SettingsGui.PVP_ENABLED) : HFMessages.get(playerRef, GuiKeys.SettingsGui.PVP_DISABLED)); cmd.set("#PvPStatus.Style.TextColor", perms.pvpEnabled() ? "#55FF55" : "#FF5555"); } @@ -282,7 +283,7 @@ private void handleColorChanged(NewPlayerPageData data) { String hex = extractHex(data.inputColor); String name = data.inputName != null ? data.inputName : ""; String tag = data.inputTag != null ? data.inputTag : ""; - String previewText = !name.isEmpty() ? name : HFMessages.get(playerRef, MessageKeys.CreateGui.PREVIEW_NAME); + String previewText = !name.isEmpty() ? name : HFMessages.get(playerRef, GuiKeys.CreateGui.PREVIEW_NAME); if (!tag.isEmpty()) { previewText += " [" + tag + "]"; } @@ -336,26 +337,26 @@ private void handleCreate(Player player, Ref ref, Store MAX_NAME_LENGTH) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.NAME_TOO_LONG, MAX_NAME_LENGTH)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.CreateGui.NAME_TOO_LONG, MAX_NAME_LENGTH)); sendUpdate(); return; } // Check if name is already taken if (factionManager.getFactionByName(name) != null) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.NAME_TAKEN)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.CreateGui.NAME_TAKEN)); sendUpdate(); return; } @@ -363,13 +364,13 @@ private void handleCreate(Player player, Ref ref, Store MAX_TAG_LENGTH) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.TAG_LENGTH, MIN_TAG_LENGTH, MAX_TAG_LENGTH)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.CreateGui.TAG_LENGTH, MIN_TAG_LENGTH, MAX_TAG_LENGTH)); sendUpdate(); return; } if (!tag.matches("^[a-zA-Z0-9]+$")) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.TAG_FORMAT)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.CreateGui.TAG_FORMAT)); sendUpdate(); return; } @@ -382,14 +383,14 @@ private void handleCreate(Player player, Ref ref, Store MAX_DESCRIPTION_LENGTH) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.DESC_TOO_LONG, MAX_DESCRIPTION_LENGTH)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.CreateGui.DESC_TOO_LONG, MAX_DESCRIPTION_LENGTH)); sendUpdate(); return; } // Check if player is already in a faction if (factionManager.isInFaction(playerRef.getUuid())) { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.Common.ALREADY_IN_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, CommonKeys.Common.ALREADY_IN_FACTION)); sendUpdate(); return; } @@ -425,7 +426,7 @@ private void handleCreate(Player player, Ref ref, Store ref, Store { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.Common.ALREADY_IN_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, CommonKeys.Common.ALREADY_IN_FACTION)); sendUpdate(); } case NAME_TAKEN -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.NAME_TAKEN)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.CreateGui.NAME_TAKEN)); sendUpdate(); } case NAME_TOO_SHORT, NAME_TOO_LONG -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.INVALID_NAME)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.CreateGui.INVALID_NAME)); sendUpdate(); } default -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.CREATE_FAILED)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.CreateGui.CREATE_FAILED)); sendUpdate(); } } diff --git a/src/main/java/com/hyperfactions/gui/newplayer/page/HelpPage.java b/src/main/java/com/hyperfactions/gui/newplayer/page/HelpPage.java index a9b6c237..11e47c85 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/HelpPage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/HelpPage.java @@ -5,7 +5,7 @@ import com.hyperfactions.gui.newplayer.NewPlayerNavBarHelper; import com.hyperfactions.gui.newplayer.data.NewPlayerPageData; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -47,29 +47,29 @@ public void build(Ref ref, UICommandBuilder cmd, NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); // Localize all static content - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.GETTING_STARTED_TITLE)); - cmd.set("#WhatTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.WHAT_ARE_FACTIONS_TITLE)); - cmd.set("#WhatDesc1.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.WHAT_ARE_FACTIONS_1)); - cmd.set("#WhatDesc2.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.WHAT_ARE_FACTIONS_2)); - cmd.set("#WhatBullet1.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.WHAT_ARE_FACTIONS_BULLET_1)); - cmd.set("#WhatBullet2.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.WHAT_ARE_FACTIONS_BULLET_2)); - cmd.set("#WhatBullet3.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.WHAT_ARE_FACTIONS_BULLET_3)); - cmd.set("#JoinTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.JOINING_TITLE)); - cmd.set("#JoinDesc.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.JOINING_DESC)); - cmd.set("#JoinBullet1.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.JOINING_BULLET_1)); - cmd.set("#JoinBullet2.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.JOINING_BULLET_2)); - cmd.set("#JoinBullet3.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.JOINING_BULLET_3)); - cmd.set("#CreateTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CREATING_TITLE)); - cmd.set("#CreateDesc.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CREATING_DESC)); - cmd.set("#CreateBullet1.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CREATING_BULLET_1)); - cmd.set("#CreateBullet2.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CREATING_BULLET_2)); - cmd.set("#CmdTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.COMMANDS_TITLE)); - cmd.set("#CmdF.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CMD_F)); - cmd.set("#CmdFList.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CMD_F_LIST)); - cmd.set("#CmdFJoin.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CMD_F_JOIN)); - cmd.set("#CmdFCreate.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CMD_F_CREATE)); - cmd.set("#CmdFHelp.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.CMD_F_HELP)); - cmd.set("#TipText.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.TIP)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.GETTING_STARTED_TITLE)); + cmd.set("#WhatTitle.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.WHAT_ARE_FACTIONS_TITLE)); + cmd.set("#WhatDesc1.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.WHAT_ARE_FACTIONS_1)); + cmd.set("#WhatDesc2.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.WHAT_ARE_FACTIONS_2)); + cmd.set("#WhatBullet1.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.WHAT_ARE_FACTIONS_BULLET_1)); + cmd.set("#WhatBullet2.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.WHAT_ARE_FACTIONS_BULLET_2)); + cmd.set("#WhatBullet3.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.WHAT_ARE_FACTIONS_BULLET_3)); + cmd.set("#JoinTitle.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.JOINING_TITLE)); + cmd.set("#JoinDesc.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.JOINING_DESC)); + cmd.set("#JoinBullet1.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.JOINING_BULLET_1)); + cmd.set("#JoinBullet2.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.JOINING_BULLET_2)); + cmd.set("#JoinBullet3.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.JOINING_BULLET_3)); + cmd.set("#CreateTitle.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CREATING_TITLE)); + cmd.set("#CreateDesc.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CREATING_DESC)); + cmd.set("#CreateBullet1.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CREATING_BULLET_1)); + cmd.set("#CreateBullet2.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CREATING_BULLET_2)); + cmd.set("#CmdTitle.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.COMMANDS_TITLE)); + cmd.set("#CmdF.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CMD_F)); + cmd.set("#CmdFList.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CMD_F_LIST)); + cmd.set("#CmdFJoin.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CMD_F_JOIN)); + cmd.set("#CmdFCreate.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CMD_F_CREATE)); + cmd.set("#CmdFHelp.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.CMD_F_HELP)); + cmd.set("#TipText.Text", HFMessages.get(playerRef, GuiKeys.HelpGui.TIP)); } /** Handles data event. */ diff --git a/src/main/java/com/hyperfactions/gui/newplayer/page/InvitesPage.java b/src/main/java/com/hyperfactions/gui/newplayer/page/InvitesPage.java index 486fdf6a..81cb564b 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/InvitesPage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/InvitesPage.java @@ -15,7 +15,8 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -90,7 +91,7 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.NEWPLAYER_INVITES); // Static labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.INVITES_TITLE)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.INVITES_TITLE)); // Setup navigation bar for new players NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); @@ -107,22 +108,22 @@ public void build(Ref ref, UICommandBuilder cmd, // Set header with counts int totalCount = invites.size() + requests.size(); - cmd.set("#InviteCount.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.PENDING_COUNT, totalCount)); + cmd.set("#InviteCount.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.PENDING_COUNT, totalCount)); // === RECEIVED INVITES SECTION === - cmd.set("#InvitesHeader.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.RECEIVED_HEADER, invites.size())); + cmd.set("#InvitesHeader.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.RECEIVED_HEADER, invites.size())); if (invites.isEmpty()) { cmd.append("#InviteListContainer", UIPaths.RELATION_EMPTY); - cmd.set("#InviteListContainer[0] #EmptyText.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.NO_INVITES)); + cmd.set("#InviteListContainer[0] #EmptyText.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.NO_INVITES)); } else { buildInviteCards(cmd, events, invites); } // === YOUR REQUESTS SECTION === - cmd.set("#RequestsHeader.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.REQUESTS_HEADER, requests.size())); + cmd.set("#RequestsHeader.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.REQUESTS_HEADER, requests.size())); if (requests.isEmpty()) { cmd.append("#RequestListContainer", UIPaths.RELATION_EMPTY); - cmd.set("#RequestListContainer[0] #EmptyText.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.NO_REQUESTS)); + cmd.set("#RequestListContainer[0] #EmptyText.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.NO_REQUESTS)); } else { buildRequestCards(cmd, events, requests); } @@ -149,13 +150,13 @@ private void buildInviteCards(UICommandBuilder cmd, UIEventBuilder events, // Invited by String inviterName = getPlayerName(invite.invitedBy()); - cmd.set(prefix + "#InvitedBy.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.INVITED_BY, inviterName)); + cmd.set(prefix + "#InvitedBy.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.INVITED_BY, inviterName)); // Stats PowerManager.FactionPowerStats stats = powerManager.getFactionPowerStats(faction.id()); - cmd.set(prefix + "#MemberCount.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.MEMBER_COUNT, faction.members().size())); - cmd.set(prefix + "#PowerCount.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.POWER_COUNT, String.format("%.0f", stats.currentPower()))); - cmd.set(prefix + "#ClaimCount.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.CLAIM_COUNT, faction.claims().size())); + cmd.set(prefix + "#MemberCount.Text", HFMessages.get(playerRef, CommonKeys.Common.MEMBER_COUNT, faction.members().size())); + cmd.set(prefix + "#PowerCount.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.POWER_COUNT, String.format("%.0f", stats.currentPower()))); + cmd.set(prefix + "#ClaimCount.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.CLAIM_COUNT, faction.claims().size())); // Time ago cmd.set(prefix + "#TimeAgo.Text", formatTimeAgo(invite.createdAt())); @@ -201,16 +202,16 @@ private void buildRequestCards(UICommandBuilder cmd, UIEventBuilder events, cmd.set(prefix + "#FactionName.Text", faction.name()); // Status - cmd.set(prefix + "#StatusText.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.AWAITING_REVIEW)); + cmd.set(prefix + "#StatusText.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.AWAITING_REVIEW)); // Stats PowerManager.FactionPowerStats stats = powerManager.getFactionPowerStats(faction.id()); - cmd.set(prefix + "#MemberCount.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.MEMBER_COUNT, faction.members().size())); - cmd.set(prefix + "#PowerCount.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.POWER_COUNT, String.format("%.0f", stats.currentPower()))); + cmd.set(prefix + "#MemberCount.Text", HFMessages.get(playerRef, CommonKeys.Common.MEMBER_COUNT, faction.members().size())); + cmd.set(prefix + "#PowerCount.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.POWER_COUNT, String.format("%.0f", stats.currentPower()))); // Time remaining int hoursRemaining = request.getRemainingHours(); - cmd.set(prefix + "#TimeRemaining.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.EXPIRES_IN, hoursRemaining)); + cmd.set(prefix + "#TimeRemaining.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.EXPIRES_IN, hoursRemaining)); // Cancel button events.addEventBinding( @@ -238,16 +239,16 @@ private String formatTimeAgo(long timestamp) { long diff = now - timestamp; if (diff < TimeUnit.MINUTES.toMillis(1)) { - return HFMessages.get(playerRef, MessageKeys.NewPlayerGui.TIME_JUST_NOW); + return HFMessages.get(playerRef, GuiKeys.NewPlayerGui.TIME_JUST_NOW); } else if (diff < TimeUnit.HOURS.toMillis(1)) { long minutes = TimeUnit.MILLISECONDS.toMinutes(diff); - return HFMessages.get(playerRef, MessageKeys.NewPlayerGui.TIME_MINUTES, minutes); + return HFMessages.get(playerRef, GuiKeys.NewPlayerGui.TIME_MINUTES, minutes); } else if (diff < TimeUnit.DAYS.toMillis(1)) { long hours = TimeUnit.MILLISECONDS.toHours(diff); - return HFMessages.get(playerRef, MessageKeys.NewPlayerGui.TIME_HOURS, hours); + return HFMessages.get(playerRef, GuiKeys.NewPlayerGui.TIME_HOURS, hours); } else { long days = TimeUnit.MILLISECONDS.toDays(diff); - return HFMessages.get(playerRef, MessageKeys.NewPlayerGui.TIME_DAYS, days); + return HFMessages.get(playerRef, GuiKeys.NewPlayerGui.TIME_DAYS, days); } } @@ -313,7 +314,7 @@ private void handleAccept(Player player, Ref ref, Store ref, Store ref, Store { - player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.NewPlayerGui.JOINED, faction.name())); + player.sendMessage(MessageUtil.successText(playerRef, GuiKeys.NewPlayerGui.JOINED, faction.name())); // Clear all invites and requests inviteManager.clearPlayerInvites(playerUuid); joinRequestManager.clearPlayerRequests(playerUuid); @@ -353,15 +354,15 @@ private void handleAccept(Player player, Ref ref, Store { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.Common.ALREADY_IN_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, CommonKeys.Common.ALREADY_IN_FACTION)); sendUpdate(); } case FACTION_FULL -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.NewPlayerGui.FACTION_FULL)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.NewPlayerGui.FACTION_FULL)); sendUpdate(); } default -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.NewPlayerGui.JOIN_FAILED)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.NewPlayerGui.JOIN_FAILED)); sendUpdate(); } } @@ -382,7 +383,7 @@ private void handleDecline(Player player, Ref ref, Store ref, Store ref, UICommandBuilder cmd, cmd.append(UIPaths.NEWPLAYER_BROWSE); // Static labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.BROWSE_TITLE)); - cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.SEARCH_LABEL)); - cmd.set("#SortLabel.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.SORT_LABEL)); - cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.PREV_BTN)); - cmd.set("#NextBtn.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.NEXT_BTN)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.BROWSE_TITLE)); + cmd.set("#SearchLabel.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.SEARCH_LABEL)); + cmd.set("#SortLabel.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.SORT_LABEL)); + cmd.set("#PrevBtn.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.PREV_BTN)); + cmd.set("#NextBtn.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.NEXT_BTN)); // Setup navigation bar for new players NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); @@ -140,14 +141,14 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { // Get all factions sorted and filtered List entries = buildFactionEntryList(); - cmd.set("#FactionCount.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.FACTION_COUNT, entries.size())); - cmd.set("#Subtitle.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.BROWSE_SUBTITLE)); + cmd.set("#FactionCount.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.FACTION_COUNT, entries.size())); + cmd.set("#Subtitle.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.BROWSE_SUBTITLE)); // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.NewPlayerGui.SORT_POWER)), "POWER"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.NewPlayerGui.SORT_NAME)), "NAME"), - new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.NewPlayerGui.SORT_MEMBERS)), "MEMBERS") + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.NewPlayerGui.SORT_POWER)), "POWER"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.NewPlayerGui.SORT_NAME)), "NAME"), + new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, GuiKeys.NewPlayerGui.SORT_MEMBERS)), "MEMBERS") )); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding( @@ -187,7 +188,7 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, GuiKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -236,7 +237,7 @@ private List buildFactionEntryList() { stats.currentPower(), stats.maxPower(), faction.claims().size(), - leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.NONE), + leader != null ? leader.username() : HFMessages.get(playerRef, CommonKeys.Common.NONE), faction.open(), faction.description() )); @@ -272,10 +273,10 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int // Recruitment badge if (entry.isOpen) { - cmd.set(idx + " #RecruitmentBadge.Text", HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN)); + cmd.set(idx + " #RecruitmentBadge.Text", HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_OPEN)); cmd.set(idx + " #RecruitmentBadge.Style.TextColor", "#44CC44"); } else { - cmd.set(idx + " #RecruitmentBadge.Text", HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)); + cmd.set(idx + " #RecruitmentBadge.Text", HFMessages.get(playerRef, GuiKeys.FactionInfoGui.STATUS_INVITE_ONLY)); cmd.set(idx + " #RecruitmentBadge.Style.TextColor", "#FFAA00"); } @@ -284,8 +285,8 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int cmd.set(idx + " #MemberCount.Text", String.valueOf(entry.memberCount)); // Localized stat labels - cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.LABEL_POWER)); - cmd.set(idx + " #MemberLabel.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.LABEL_MEMBERS)); + cmd.set(idx + " #PowerLabel.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.LABEL_POWER)); + cmd.set(idx + " #MemberLabel.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.LABEL_MEMBERS)); // Expansion state cmd.set(idx + " #ExpandIcon.Visible", !isExpanded); @@ -304,10 +305,10 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int // Extended info (only set values if expanded) if (isExpanded) { // Localized extended labels - cmd.set(idx + " #LeaderLabel.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.LABEL_LEADER)); - cmd.set(idx + " #ClaimsLabel.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.LABEL_CLAIMS)); - cmd.set(idx + " #DescriptionLabel.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.LABEL_DESCRIPTION)); - cmd.set(idx + " #ViewInfoBtn.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.VIEW_INFO_BTN)); + cmd.set(idx + " #LeaderLabel.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.LABEL_LEADER)); + cmd.set(idx + " #ClaimsLabel.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.LABEL_CLAIMS)); + cmd.set(idx + " #DescriptionLabel.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.LABEL_DESCRIPTION)); + cmd.set(idx + " #ViewInfoBtn.Text", HFMessages.get(playerRef, GuiKeys.BrowserGui.VIEW_INFO_BTN)); // Leader and claims cmd.set(idx + " #LeaderName.Text", entry.leaderName); @@ -325,7 +326,7 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int // Note: TextButtons can't have Style.TextColor changed dynamically - use button text to convey state if (hasInvite) { // Player has pending invite - show ACCEPT button - cmd.set(idx + " #ActionBtn.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.BTN_ACCEPT)); + cmd.set(idx + " #ActionBtn.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.BTN_ACCEPT)); events.addEventBinding( CustomUIEventBindingType.Activating, idx + " #ActionBtn", @@ -336,7 +337,7 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int ); } else if (hasRequest) { // Player already requested - show PENDING button (goes to invites page) - cmd.set(idx + " #ActionBtn.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.BTN_PENDING)); + cmd.set(idx + " #ActionBtn.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.BTN_PENDING)); events.addEventBinding( CustomUIEventBindingType.Activating, idx + " #ActionBtn", @@ -345,7 +346,7 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int ); } else if (entry.isOpen) { // Open faction - JOIN button - cmd.set(idx + " #ActionBtn.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.BTN_JOIN)); + cmd.set(idx + " #ActionBtn.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.BTN_JOIN)); events.addEventBinding( CustomUIEventBindingType.Activating, idx + " #ActionBtn", @@ -356,7 +357,7 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int ); } else { // Invite-only faction - REQUEST button - cmd.set(idx + " #ActionBtn.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.BTN_REQUEST)); + cmd.set(idx + " #ActionBtn.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.BTN_REQUEST)); events.addEventBinding( CustomUIEventBindingType.Activating, idx + " #ActionBtn", @@ -479,7 +480,7 @@ private void handleViewFaction(Player player, Ref ref, Store ref, Store ref, Store ref, Store { - player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.NewPlayerGui.JOINED, faction.name())); + player.sendMessage(MessageUtil.successText(playerRef, GuiKeys.NewPlayerGui.JOINED, faction.name())); // Clear any pending invites inviteManager.clearPlayerInvites(playerRef.getUuid()); // Open faction dashboard - use fresh faction data @@ -540,25 +541,25 @@ private void handleJoinFaction(Player player, Ref ref, Store { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.Common.ALREADY_IN_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, CommonKeys.Common.ALREADY_IN_FACTION)); sendUpdate(); } case FACTION_NOT_FOUND -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.Common.FACTION_NOT_FOUND)); + player.sendMessage(MessageUtil.errorText(playerRef, CommonKeys.Common.FACTION_NOT_FOUND)); sendUpdate(); } case FACTION_FULL -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.NewPlayerGui.FACTION_FULL)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.NewPlayerGui.FACTION_FULL)); sendUpdate(); } default -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.NewPlayerGui.JOIN_FAILED)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.NewPlayerGui.JOIN_FAILED)); sendUpdate(); } } @@ -573,7 +574,7 @@ private void handleAcceptInvite(Player player, Ref ref, Store ref, Store ref, Store { - player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.NewPlayerGui.JOINED, faction.name())); + player.sendMessage(MessageUtil.successText(playerRef, GuiKeys.NewPlayerGui.JOINED, faction.name())); // Clear invite and other pending invites inviteManager.clearPlayerInvites(playerUuid); // Open faction dashboard @@ -614,15 +615,15 @@ private void handleAcceptInvite(Player player, Ref ref, Store { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.Common.ALREADY_IN_FACTION)); + player.sendMessage(MessageUtil.errorText(playerRef, CommonKeys.Common.ALREADY_IN_FACTION)); sendUpdate(); } case FACTION_FULL -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.NewPlayerGui.FACTION_FULL)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.NewPlayerGui.FACTION_FULL)); sendUpdate(); } default -> { - player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.NewPlayerGui.JOIN_FAILED)); + player.sendMessage(MessageUtil.errorText(playerRef, GuiKeys.NewPlayerGui.JOIN_FAILED)); sendUpdate(); } } @@ -637,7 +638,7 @@ private void handleRequestJoin(Player player, Ref ref, Store ref, Store ref, Store ref, Store ref, UICommandBuilder cmd, Player player = store.getComponent(ref, Player.getComponentType()); TransformComponent transform = store.getComponent(ref, TransformComponent.getComponentType()); World world = player != null ? player.getWorld() : null; - String worldName = world != null ? world.getName() : HFMessages.get(playerRef, MessageKeys.Common.WORLD_FALLBACK); + String worldName = world != null ? world.getName() : HFMessages.get(playerRef, CommonKeys.Common.WORLD_FALLBACK); int playerChunkX = 0; int playerChunkZ = 0; @@ -137,19 +138,19 @@ public void build(Ref ref, UICommandBuilder cmd, NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); // Localize static labels (title, position, legend) - cmd.set("#MapTitle.Text", HFMessages.get(playerRef, MessageKeys.MapGui.TITLE)); - cmd.set("#PositionInfo.Text", HFMessages.get(playerRef, MessageKeys.MapGui.POSITION, playerChunkX, playerChunkZ)); - cmd.set("#ActionHint.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.MAP_HINT)); - cmd.set("#LegendYourLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_YOUR)); - cmd.set("#LegendAllyLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_ALLY)); - cmd.set("#LegendEnemyLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_ENEMY)); - cmd.set("#LegendOtherLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_OTHER)); + cmd.set("#MapTitle.Text", HFMessages.get(playerRef, GuiKeys.MapGui.TITLE)); + cmd.set("#PositionInfo.Text", HFMessages.get(playerRef, GuiKeys.MapGui.POSITION, playerChunkX, playerChunkZ)); + cmd.set("#ActionHint.Text", HFMessages.get(playerRef, GuiKeys.NewPlayerGui.MAP_HINT)); + cmd.set("#LegendYourLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_YOUR)); + cmd.set("#LegendAllyLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_ALLY)); + cmd.set("#LegendEnemyLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_ENEMY)); + cmd.set("#LegendOtherLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_OTHER)); if (!terrainEnabled) { - cmd.set("#LegendWildernessLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_WILDERNESS)); + cmd.set("#LegendWildernessLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_WILDERNESS)); } - cmd.set("#LegendSafeLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_SAFE)); - cmd.set("#LegendWarLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_WAR)); - cmd.set("#LegendYouLabel.Text", HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_YOU)); + cmd.set("#LegendSafeLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_SAFE)); + cmd.set("#LegendWarLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_WAR)); + cmd.set("#LegendYouLabel.Text", HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_YOU)); // Hide claim/power stats (not relevant for new players) cmd.set("#ClaimStats.Text", ""); @@ -166,12 +167,12 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.appendInline("#LegendContainer[1]", "Group { LayoutMode: Left; Anchor: (Width: 110); " + "Group { Anchor: (Width: 10, Height: 10); Background: (Color: " + COLOR_OG_PROTECTED + "); } " - + "Label { Text: \" " + HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_PROTECTED) + "\"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } }"); + + "Label { Text: \" " + HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_PROTECTED) + "\"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } }"); } else { cmd.appendInline("#LegendContainer[2]", "Group { LayoutMode: Left; Anchor: (Height: 16); " + "Group { Anchor: (Width: 12, Height: 12); Background: (Color: " + COLOR_OG_PROTECTED + "); } " - + "Label { Text: \" " + HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_PROTECTED) + "\"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } }"); + + "Label { Text: \" " + HFMessages.get(playerRef, GuiKeys.MapGui.LEGEND_PROTECTED) + "\"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } }"); } } diff --git a/src/main/java/com/hyperfactions/gui/shared/page/DescriptionModalPage.java b/src/main/java/com/hyperfactions/gui/shared/page/DescriptionModalPage.java index 01f5efaf..29cc7cd1 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/DescriptionModalPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/DescriptionModalPage.java @@ -8,7 +8,8 @@ import com.hyperfactions.gui.shared.data.DescriptionModalData; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -73,17 +74,17 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.DESCRIPTION_MODAL); // Static labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.DescGui.TITLE)); - cmd.set("#CurrentLabel.Text", HFMessages.get(playerRef, MessageKeys.DescGui.CURRENT_LABEL)); - cmd.set("#NewDescLabel.Text", HFMessages.get(playerRef, MessageKeys.DescGui.NEW_DESC_LABEL)); - cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.CANCEL)); - cmd.set("#ClearBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.CLEAR)); - cmd.set("#SaveBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.SAVE)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.DescGui.TITLE)); + cmd.set("#CurrentLabel.Text", HFMessages.get(playerRef, GuiKeys.DescGui.CURRENT_LABEL)); + cmd.set("#NewDescLabel.Text", HFMessages.get(playerRef, GuiKeys.DescGui.NEW_DESC_LABEL)); + cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.CANCEL)); + cmd.set("#ClearBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.CLEAR)); + cmd.set("#SaveBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.SAVE)); // Show current description String currentDesc = faction.description(); if (currentDesc == null || currentDesc.isEmpty()) { - cmd.set("#CurrentDesc.Text", HFMessages.get(playerRef, MessageKeys.DescGui.DISPLAY_NONE)); + cmd.set("#CurrentDesc.Text", HFMessages.get(playerRef, GuiKeys.DescGui.DISPLAY_NONE)); } else { // Truncate display if too long String display = currentDesc.length() > 100 @@ -135,7 +136,7 @@ public void handleDataEvent(Ref ref, Store store, // Verify officer permission (skip in admin mode) if (!adminMode && (member == null || member.role().getLevel() < FactionRole.OFFICER.getLevel())) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.DescGui.NO_PERMISSION)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.DescGui.NO_PERMISSION)); guiManager.openFactionSettings(player, ref, store, playerRef, factionManager.getFaction(faction.id())); return; @@ -156,9 +157,9 @@ public void handleDataEvent(Ref ref, Store store, Faction updatedFaction = faction.withDescription(null); factionManager.updateFaction(updatedFaction); - String msg = HFMessages.get(playerRef, MessageKeys.DescGui.CLEARED); + String msg = HFMessages.get(playerRef, GuiKeys.DescGui.CLEARED); if (adminMode) { - msg = HFMessages.get(playerRef, MessageKeys.Common.ADMIN_PREFIX) + " " + msg; + msg = HFMessages.get(playerRef, CommonKeys.Common.ADMIN_PREFIX) + " " + msg; } player.sendMessage(Message.raw(msg).color("#AAAAAA")); @@ -177,9 +178,9 @@ public void handleDataEvent(Ref ref, Store store, if (newDesc == null || newDesc.trim().isEmpty()) { Faction updatedFaction = faction.withDescription(null); factionManager.updateFaction(updatedFaction); - String clearMsg = HFMessages.get(playerRef, MessageKeys.DescGui.CLEARED); + String clearMsg = HFMessages.get(playerRef, GuiKeys.DescGui.CLEARED); if (adminMode) { - clearMsg = HFMessages.get(playerRef, MessageKeys.Common.ADMIN_PREFIX) + " " + clearMsg; + clearMsg = HFMessages.get(playerRef, CommonKeys.Common.ADMIN_PREFIX) + " " + clearMsg; } player.sendMessage(Message.raw(clearMsg).color("#AAAAAA")); } else { @@ -192,9 +193,9 @@ public void handleDataEvent(Ref ref, Store store, Faction updatedFaction = faction.withDescription(newDesc); factionManager.updateFaction(updatedFaction); - String updateMsg = HFMessages.get(playerRef, MessageKeys.DescGui.UPDATED); + String updateMsg = HFMessages.get(playerRef, GuiKeys.DescGui.UPDATED); if (adminMode) { - updateMsg = HFMessages.get(playerRef, MessageKeys.Common.ADMIN_PREFIX) + " " + updateMsg; + updateMsg = HFMessages.get(playerRef, CommonKeys.Common.ADMIN_PREFIX) + " " + updateMsg; } player.sendMessage(Message.raw(updateMsg).color("#55FF55")); } diff --git a/src/main/java/com/hyperfactions/gui/shared/page/FactionInfoPage.java b/src/main/java/com/hyperfactions/gui/shared/page/FactionInfoPage.java index 20bc9ed1..26202df3 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/FactionInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/FactionInfoPage.java @@ -12,7 +12,8 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.manager.RelationManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.TimeUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -137,7 +138,7 @@ public void build(Ref ref, UICommandBuilder cmd, boolean isOwnFaction = viewerFaction != null && viewerFaction.id().equals(targetFaction.id()); // === Page Title === - cmd.set("#PageTitle.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.TITLE)); + cmd.set("#PageTitle.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.TITLE)); // === Header Section === // Faction name @@ -156,35 +157,35 @@ public void build(Ref ref, UICommandBuilder cmd, String description = targetFaction.description(); cmd.set("#FactionDescription.Text", description != null && !description.isEmpty() ? description - : HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.NO_DESCRIPTION)); + : HFMessages.get(viewerRef, CommonKeys.Common.NO_DESCRIPTION)); // Open/Closed status indicator cmd.set("#StatusIndicator.Text", targetFaction.open() - ? HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) - : HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)); + ? HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.STATUS_OPEN) + : HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.STATUS_INVITE_ONLY)); // Note: Cannot dynamically set text color via cmd.set() // === Stats Section === // Set stat card headers and subtitles - cmd.set("#PowerHeader.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.POWER_HEADER)); - cmd.set("#PowerSubtitle.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.CURRENT_MAX)); - cmd.set("#ClaimsHeader.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.CLAIMS_HEADER)); - cmd.set("#ClaimsSubtitle.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.CLAIMED_MAX)); - cmd.set("#MembersHeader.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.MEMBERS_HEADER)); - cmd.set("#RelationsHeader.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.RELATIONS_HEADER)); - cmd.set("#RelationsSubtitle.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.ALLY_ENEMY)); - cmd.set("#StatusHeader.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_HEADER)); - cmd.set("#TreasuryHeader.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.TREASURY_HEADER)); - cmd.set("#TreasurySubtitle.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.FACTION_BALANCE)); + cmd.set("#PowerHeader.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.POWER_HEADER)); + cmd.set("#PowerSubtitle.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.CURRENT_MAX)); + cmd.set("#ClaimsHeader.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.CLAIMS_HEADER)); + cmd.set("#ClaimsSubtitle.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.CLAIMED_MAX)); + cmd.set("#MembersHeader.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.MEMBERS_HEADER)); + cmd.set("#RelationsHeader.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.RELATIONS_HEADER)); + cmd.set("#RelationsSubtitle.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.ALLY_ENEMY)); + cmd.set("#StatusHeader.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.STATUS_HEADER)); + cmd.set("#TreasuryHeader.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.TREASURY_HEADER)); + cmd.set("#TreasurySubtitle.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.FACTION_BALANCE)); // Leadership labels - cmd.set("#LeaderLabel.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.LEADER_LABEL)); - cmd.set("#OfficersLabel.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.OFFICERS_LABEL)); + cmd.set("#LeaderLabel.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.LEADER_LABEL)); + cmd.set("#OfficersLabel.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.OFFICERS_LABEL)); // Button text - cmd.set("#ViewMembersBtn.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.VIEW_MEMBERS_BTN)); - cmd.set("#ViewRelationsBtn.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.RELATIONS_BTN)); - cmd.set("#BackBtn.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.BACK_BTN)); + cmd.set("#ViewMembersBtn.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.VIEW_MEMBERS_BTN)); + cmd.set("#ViewRelationsBtn.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.RELATIONS_BTN)); + cmd.set("#BackBtn.Text", HFMessages.get(viewerRef, CommonKeys.Common.BACK)); PowerManager.FactionPowerStats powerStats = powerManager.getFactionPowerStats(targetFaction.id()); @@ -201,8 +202,8 @@ public void build(Ref ref, UICommandBuilder cmd, // Recruitment status cmd.set("#RecruitmentValue.Text", targetFaction.open() - ? HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) - : HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)); + ? HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.STATUS_OPEN) + : HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.STATUS_INVITE_ONLY)); // Note: Cannot dynamically set text color via cmd.set() // Founded date @@ -216,9 +217,9 @@ public void build(Ref ref, UICommandBuilder cmd, // Raidable status if (powerStats.isRaidable()) { - cmd.set("#RaidableValue.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_RAIDABLE)); + cmd.set("#RaidableValue.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.STATUS_RAIDABLE)); } else { - cmd.set("#RaidableValue.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_PROTECTED)); + cmd.set("#RaidableValue.Text", HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.STATUS_PROTECTED)); } // Treasury balance (visible when economy enabled) @@ -232,21 +233,21 @@ public void build(Ref ref, UICommandBuilder cmd, // Leader FactionMember leader = targetFaction.getLeader(); cmd.set("#LeaderName.Text", leader != null ? leader.username() - : HFMessages.get(viewerRef, MessageKeys.Common.UNKNOWN)); + : HFMessages.get(viewerRef, CommonKeys.Common.UNKNOWN)); // Officers List officers = targetFaction.getMembersSorted().stream() .filter(m -> m.role() == FactionRole.OFFICER) .toList(); if (officers.isEmpty()) { - cmd.set("#OfficersValue.Text", HFMessages.get(viewerRef, MessageKeys.Common.NONE)); + cmd.set("#OfficersValue.Text", HFMessages.get(viewerRef, CommonKeys.Common.NONE)); } else { String officerNames = officers.stream() .map(FactionMember::username) .limit(3) // Show max 3 names .collect(Collectors.joining(", ")); if (officers.size() > 3) { - officerNames += " " + HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.OFFICERS_MORE, + officerNames += " " + HFMessages.get(viewerRef, GuiKeys.FactionInfoGui.OFFICERS_MORE, officers.size() - 3); } cmd.set("#OfficersValue.Text", officerNames); diff --git a/src/main/java/com/hyperfactions/gui/shared/page/MainMenuPage.java b/src/main/java/com/hyperfactions/gui/shared/page/MainMenuPage.java index 77270444..abd44fc3 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/MainMenuPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/MainMenuPage.java @@ -7,7 +7,7 @@ import com.hyperfactions.integration.PermissionManager; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -56,12 +56,12 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.MAIN_MENU); // Set title - cmd.set("#MenuTitle.Text", HFMessages.get(playerRef, MessageKeys.MainMenu.TITLE)); + cmd.set("#MenuTitle.Text", HFMessages.get(playerRef, GuiKeys.MainMenu.TITLE)); // Section: My Faction if (faction != null) { cmd.append("#MyFactionSection", UIPaths.MENU_SECTION); - cmd.set("#MyFactionSection #SectionTitle.Text", HFMessages.get(playerRef, MessageKeys.MainMenu.SECTION_MY_FACTION)); + cmd.set("#MyFactionSection #SectionTitle.Text", HFMessages.get(playerRef, GuiKeys.MainMenu.SECTION_MY_FACTION)); cmd.append("#MyFactionSection #SectionContent", UIPaths.MAIN_MENU_FACTION); cmd.set("#MyFactionSection #FactionNameLabel.Text", faction.name()); @@ -87,7 +87,7 @@ public void build(Ref ref, UICommandBuilder cmd, ); } else { cmd.append("#MyFactionSection", UIPaths.MENU_SECTION); - cmd.set("#MyFactionSection #SectionTitle.Text", HFMessages.get(playerRef, MessageKeys.MainMenu.SECTION_GET_STARTED)); + cmd.set("#MyFactionSection #SectionTitle.Text", HFMessages.get(playerRef, GuiKeys.MainMenu.SECTION_GET_STARTED)); cmd.append("#MyFactionSection #SectionContent", UIPaths.MAIN_MENU_NO_FACTION); events.addEventBinding( @@ -100,7 +100,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Section: Territory cmd.append("#TerritorySection", UIPaths.MENU_SECTION); - cmd.set("#TerritorySection #SectionTitle.Text", HFMessages.get(playerRef, MessageKeys.MainMenu.SECTION_TERRITORY)); + cmd.set("#TerritorySection #SectionTitle.Text", HFMessages.get(playerRef, GuiKeys.MainMenu.SECTION_TERRITORY)); cmd.append("#TerritorySection #SectionContent", UIPaths.MAIN_MENU_TERRITORY); events.addEventBinding( @@ -121,7 +121,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Section: Browse cmd.append("#BrowseSection", UIPaths.MENU_SECTION); - cmd.set("#BrowseSection #SectionTitle.Text", HFMessages.get(playerRef, MessageKeys.MainMenu.SECTION_BROWSE)); + cmd.set("#BrowseSection #SectionTitle.Text", HFMessages.get(playerRef, GuiKeys.MainMenu.SECTION_BROWSE)); cmd.append("#BrowseSection #SectionContent", UIPaths.MAIN_MENU_BROWSE); events.addEventBinding( @@ -134,7 +134,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Section: Admin (if permission) if (hasAdmin) { cmd.append("#AdminSection", UIPaths.MENU_SECTION); - cmd.set("#AdminSection #SectionTitle.Text", HFMessages.get(playerRef, MessageKeys.MainMenu.SECTION_ADMIN)); + cmd.set("#AdminSection #SectionTitle.Text", HFMessages.get(playerRef, GuiKeys.MainMenu.SECTION_ADMIN)); cmd.append("#AdminSection #SectionContent", UIPaths.MAIN_MENU_ADMIN); events.addEventBinding( @@ -197,7 +197,7 @@ public void handleDataEvent(Ref ref, Store store, guiManager.closePage(player, ref, store); player.sendMessage( com.hypixel.hytale.server.core.Message.raw( - HFMessages.get(playerRef, MessageKeys.MainMenu.CLAIM_HINT)).color("#AAAAAA") + HFMessages.get(playerRef, GuiKeys.MainMenu.CLAIM_HINT)).color("#AAAAAA") ); } } diff --git a/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java b/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java index 93720adb..574afcf5 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java @@ -9,7 +9,7 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.storage.PlayerStorage; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -123,7 +123,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Page title cmd.set("#PageTitle.Text", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.TITLE)); + HFMessages.get(playerRef, GuiKeys.PlayerSettings.TITLE)); // Setup nav bar based on faction status if (faction != null) { @@ -134,15 +134,15 @@ public void build(Ref ref, UICommandBuilder cmd, // === Language Section === cmd.set("#LanguageSectionTitle.Text", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.LANGUAGE_SECTION)); + HFMessages.get(playerRef, GuiKeys.PlayerSettings.LANGUAGE_SECTION)); cmd.set("#AutoDetectDesc.Text", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.AUTO_DETECT_DESC)); + HFMessages.get(playerRef, GuiKeys.PlayerSettings.AUTO_DETECT_DESC)); cmd.set("#LanguageLabel.Text", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.LANGUAGE_LABEL)); + HFMessages.get(playerRef, GuiKeys.PlayerSettings.LANGUAGE_LABEL)); // Auto-detect checkbox cmd.set("#AutoDetectLabel.Text", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.AUTO_DETECT)); + HFMessages.get(playerRef, GuiKeys.PlayerSettings.AUTO_DETECT)); boolean autoDetect = (languagePreference == null); cmd.set("#AutoDetectCB #CheckBox.Value", autoDetect); @@ -182,30 +182,30 @@ public void build(Ref ref, UICommandBuilder cmd, // === Notifications Section === cmd.set("#NotifSectionTitle.Text", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.NOTIFICATIONS_SECTION)); + HFMessages.get(playerRef, GuiKeys.PlayerSettings.NOTIFICATIONS_SECTION)); // Territory Alerts cmd.set("#TerritoryAlertsLabel.Text", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.TERRITORY_ALERTS)); + HFMessages.get(playerRef, GuiKeys.PlayerSettings.TERRITORY_ALERTS)); buildNotificationToggle(cmd, events, "#TerritoryAlertsCB", - MessageKeys.PlayerSettings.TERRITORY_ALERTS, - MessageKeys.PlayerSettings.TERRITORY_ALERTS_DESC, + GuiKeys.PlayerSettings.TERRITORY_ALERTS, + GuiKeys.PlayerSettings.TERRITORY_ALERTS_DESC, "#TerritoryAlertsDesc", territoryAlerts, "ToggleTerritoryAlerts"); // Death Announcements cmd.set("#DeathAnnounceLabel.Text", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS)); + HFMessages.get(playerRef, GuiKeys.PlayerSettings.DEATH_ANNOUNCEMENTS)); buildNotificationToggle(cmd, events, "#DeathAnnounceCB", - MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS, - MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS_DESC, + GuiKeys.PlayerSettings.DEATH_ANNOUNCEMENTS, + GuiKeys.PlayerSettings.DEATH_ANNOUNCEMENTS_DESC, "#DeathAnnounceDesc", deathAnnouncements, "ToggleDeathAnnouncements"); // TODO: Wire up power change notifications in PowerManager, then enable this toggle // Power Notifications (not yet wired up — disable toggle) cmd.set("#PowerNotifLabel.Text", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.POWER_NOTIFICATIONS)); + HFMessages.get(playerRef, GuiKeys.PlayerSettings.POWER_NOTIFICATIONS)); cmd.set("#PowerNotifDesc.Text", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.POWER_NOTIFICATIONS_DESC)); + HFMessages.get(playerRef, GuiKeys.PlayerSettings.POWER_NOTIFICATIONS_DESC)); cmd.set("#PowerNotifCB #CheckBox.Value", powerNotifications); cmd.set("#PowerNotifCB #CheckBox.Disabled", true); } @@ -286,7 +286,7 @@ public void handleDataEvent(Ref ref, Store store, savePreference(uuid, d -> d.setLanguagePreference(languagePreference)); HFMessages.setLanguageOverride(uuid, languagePreference); player.sendMessage(MessageUtil.successText(playerRef, - MessageKeys.PlayerSettings.LANGUAGE_CHANGED, + GuiKeys.PlayerSettings.LANGUAGE_CHANGED, nativeDisplayName(data.language))); } rebuild(); @@ -296,10 +296,10 @@ public void handleDataEvent(Ref ref, Store store, territoryAlerts = !territoryAlerts; savePreference(uuid, d -> d.setTerritoryAlertsEnabled(territoryAlerts)); player.sendMessage(territoryAlerts - ? MessageUtil.successText(playerRef, MessageKeys.PlayerSettings.PREF_ENABLED, - HFMessages.get(playerRef, MessageKeys.PlayerSettings.TERRITORY_ALERTS)) - : MessageUtil.text(playerRef, MessageKeys.PlayerSettings.PREF_DISABLED, "#FFAA00", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.TERRITORY_ALERTS))); + ? MessageUtil.successText(playerRef, GuiKeys.PlayerSettings.PREF_ENABLED, + HFMessages.get(playerRef, GuiKeys.PlayerSettings.TERRITORY_ALERTS)) + : MessageUtil.text(playerRef, GuiKeys.PlayerSettings.PREF_DISABLED, "#FFAA00", + HFMessages.get(playerRef, GuiKeys.PlayerSettings.TERRITORY_ALERTS))); rebuild(); } @@ -307,10 +307,10 @@ public void handleDataEvent(Ref ref, Store store, deathAnnouncements = !deathAnnouncements; savePreference(uuid, d -> d.setDeathAnnouncementsEnabled(deathAnnouncements)); player.sendMessage(deathAnnouncements - ? MessageUtil.successText(playerRef, MessageKeys.PlayerSettings.PREF_ENABLED, - HFMessages.get(playerRef, MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS)) - : MessageUtil.text(playerRef, MessageKeys.PlayerSettings.PREF_DISABLED, "#FFAA00", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS))); + ? MessageUtil.successText(playerRef, GuiKeys.PlayerSettings.PREF_ENABLED, + HFMessages.get(playerRef, GuiKeys.PlayerSettings.DEATH_ANNOUNCEMENTS)) + : MessageUtil.text(playerRef, GuiKeys.PlayerSettings.PREF_DISABLED, "#FFAA00", + HFMessages.get(playerRef, GuiKeys.PlayerSettings.DEATH_ANNOUNCEMENTS))); rebuild(); } @@ -318,10 +318,10 @@ public void handleDataEvent(Ref ref, Store store, powerNotifications = !powerNotifications; savePreference(uuid, d -> d.setPowerNotificationsEnabled(powerNotifications)); player.sendMessage(powerNotifications - ? MessageUtil.successText(playerRef, MessageKeys.PlayerSettings.PREF_ENABLED, - HFMessages.get(playerRef, MessageKeys.PlayerSettings.POWER_NOTIFICATIONS)) - : MessageUtil.text(playerRef, MessageKeys.PlayerSettings.PREF_DISABLED, "#FFAA00", - HFMessages.get(playerRef, MessageKeys.PlayerSettings.POWER_NOTIFICATIONS))); + ? MessageUtil.successText(playerRef, GuiKeys.PlayerSettings.PREF_ENABLED, + HFMessages.get(playerRef, GuiKeys.PlayerSettings.POWER_NOTIFICATIONS)) + : MessageUtil.text(playerRef, GuiKeys.PlayerSettings.PREF_DISABLED, "#FFAA00", + HFMessages.get(playerRef, GuiKeys.PlayerSettings.POWER_NOTIFICATIONS))); rebuild(); } diff --git a/src/main/java/com/hyperfactions/gui/shared/page/RenameModalPage.java b/src/main/java/com/hyperfactions/gui/shared/page/RenameModalPage.java index e0ba2076..3418053a 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/RenameModalPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/RenameModalPage.java @@ -8,7 +8,8 @@ import com.hyperfactions.gui.shared.data.RenameModalData; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.worldmap.WorldMapService; import com.hypixel.hytale.component.Ref; @@ -83,11 +84,11 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.RENAME_MODAL); // Static labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.RenameGui.TITLE)); - cmd.set("#CurrentLabel.Text", HFMessages.get(playerRef, MessageKeys.RenameGui.CURRENT_LABEL)); - cmd.set("#NewNameLabel.Text", HFMessages.get(playerRef, MessageKeys.RenameGui.NEW_NAME_LABEL)); - cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.CANCEL)); - cmd.set("#SaveBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.SAVE)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.RenameGui.TITLE)); + cmd.set("#CurrentLabel.Text", HFMessages.get(playerRef, GuiKeys.RenameGui.CURRENT_LABEL)); + cmd.set("#NewNameLabel.Text", HFMessages.get(playerRef, GuiKeys.RenameGui.NEW_NAME_LABEL)); + cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.CANCEL)); + cmd.set("#SaveBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.SAVE)); // Show current name cmd.set("#CurrentName.Text", faction.name()); @@ -127,7 +128,7 @@ public void handleDataEvent(Ref ref, Store store, // Verify officer permission (skip in admin mode) if (!adminMode && (member == null || member.role().getLevel() < FactionRole.OFFICER.getLevel())) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RenameGui.NO_PERMISSION)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.RenameGui.NO_PERMISSION)); guiManager.openFactionSettings(player, ref, store, playerRef, factionManager.getFaction(faction.id())); return; @@ -148,7 +149,7 @@ public void handleDataEvent(Ref ref, Store store, // Validation if (newName == null || newName.trim().isEmpty()) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RenameGui.ENTER_NAME)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.RenameGui.ENTER_NAME)); sendUpdate(); return; } @@ -156,20 +157,20 @@ public void handleDataEvent(Ref ref, Store store, newName = newName.trim(); if (newName.length() < MIN_NAME_LENGTH) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RenameGui.TOO_SHORT, MIN_NAME_LENGTH)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.RenameGui.TOO_SHORT, MIN_NAME_LENGTH)); sendUpdate(); return; } if (newName.length() > MAX_NAME_LENGTH) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RenameGui.TOO_LONG, MAX_NAME_LENGTH)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.RenameGui.TOO_LONG, MAX_NAME_LENGTH)); sendUpdate(); return; } // Check if name is the same if (newName.equalsIgnoreCase(faction.name())) { - player.sendMessage(MessageUtil.info(playerRef, MessageKeys.RenameGui.SAME_NAME, "#FFD700")); + player.sendMessage(MessageUtil.info(playerRef, GuiKeys.RenameGui.SAME_NAME, "#FFD700")); sendUpdate(); return; } @@ -177,7 +178,7 @@ public void handleDataEvent(Ref ref, Store store, // Check uniqueness Faction existing = factionManager.getFactionByName(newName); if (existing != null) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RenameGui.NAME_TAKEN)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.RenameGui.NAME_TAKEN)); sendUpdate(); return; } @@ -192,9 +193,9 @@ public void handleDataEvent(Ref ref, Store store, worldMapService.triggerFactionWideRefresh(faction.id()); } - String msg = HFMessages.get(playerRef, MessageKeys.RenameGui.SUCCESS, oldName, newName); + String msg = HFMessages.get(playerRef, GuiKeys.RenameGui.SUCCESS, oldName, newName); if (adminMode) { - msg = HFMessages.get(playerRef, MessageKeys.Common.ADMIN_PREFIX) + " " + msg; + msg = HFMessages.get(playerRef, CommonKeys.Common.ADMIN_PREFIX) + " " + msg; } player.sendMessage(Message.raw(msg).color("#55FF55")); diff --git a/src/main/java/com/hyperfactions/gui/shared/page/TagModalPage.java b/src/main/java/com/hyperfactions/gui/shared/page/TagModalPage.java index 067d8ccb..4a910b78 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/TagModalPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/TagModalPage.java @@ -8,7 +8,8 @@ import com.hyperfactions.gui.shared.data.TagModalData; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.GuiKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.worldmap.WorldMapService; import com.hypixel.hytale.component.Ref; @@ -86,17 +87,17 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.TAG_MODAL); // Static labels - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.TagGui.TITLE)); - cmd.set("#CurrentLabel.Text", HFMessages.get(playerRef, MessageKeys.TagGui.CURRENT_LABEL)); - cmd.set("#TagInstructions.Text", HFMessages.get(playerRef, MessageKeys.TagGui.INSTRUCTIONS)); - cmd.set("#TagHelpText.Text", HFMessages.get(playerRef, MessageKeys.TagGui.HELP_TEXT)); - cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.CANCEL)); - cmd.set("#SaveBtn.Text", HFMessages.get(playerRef, MessageKeys.Common.SAVE)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, GuiKeys.TagGui.TITLE)); + cmd.set("#CurrentLabel.Text", HFMessages.get(playerRef, GuiKeys.TagGui.CURRENT_LABEL)); + cmd.set("#TagInstructions.Text", HFMessages.get(playerRef, GuiKeys.TagGui.INSTRUCTIONS)); + cmd.set("#TagHelpText.Text", HFMessages.get(playerRef, GuiKeys.TagGui.HELP_TEXT)); + cmd.set("#CancelBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.CANCEL)); + cmd.set("#SaveBtn.Text", HFMessages.get(playerRef, CommonKeys.Common.SAVE)); // Show current tag String currentTag = faction.tag(); if (currentTag == null || currentTag.isEmpty()) { - cmd.set("#CurrentTag.Text", HFMessages.get(playerRef, MessageKeys.TagGui.DISPLAY_NONE)); + cmd.set("#CurrentTag.Text", HFMessages.get(playerRef, GuiKeys.TagGui.DISPLAY_NONE)); } else { cmd.set("#CurrentTag.Text", "[" + currentTag.toUpperCase() + "]"); } @@ -136,7 +137,7 @@ public void handleDataEvent(Ref ref, Store store, // Verify officer permission (skip in admin mode) if (!adminMode && (member == null || member.role().getLevel() < FactionRole.OFFICER.getLevel())) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.TagGui.NO_PERMISSION)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.TagGui.NO_PERMISSION)); guiManager.openFactionSettings(player, ref, store, playerRef, factionManager.getFaction(faction.id())); return; @@ -165,9 +166,9 @@ public void handleDataEvent(Ref ref, Store store, worldMapService.triggerFactionWideRefresh(faction.id()); } - String clearMsg = HFMessages.get(playerRef, MessageKeys.TagGui.CLEARED); + String clearMsg = HFMessages.get(playerRef, GuiKeys.TagGui.CLEARED); if (adminMode) { - clearMsg = HFMessages.get(playerRef, MessageKeys.Common.ADMIN_PREFIX) + " " + clearMsg; + clearMsg = HFMessages.get(playerRef, CommonKeys.Common.ADMIN_PREFIX) + " " + clearMsg; } player.sendMessage(Message.raw(clearMsg).color("#AAAAAA")); if (adminMode) { @@ -183,27 +184,27 @@ public void handleDataEvent(Ref ref, Store store, // Validate length if (newTag.length() < MIN_TAG_LENGTH) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.TagGui.TOO_SHORT, MIN_TAG_LENGTH)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.TagGui.TOO_SHORT, MIN_TAG_LENGTH)); sendUpdate(); return; } if (newTag.length() > MAX_TAG_LENGTH) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.TagGui.TOO_LONG, MAX_TAG_LENGTH)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.TagGui.TOO_LONG, MAX_TAG_LENGTH)); sendUpdate(); return; } // Validate format (alphanumeric only) if (!TAG_PATTERN.matcher(newTag).matches()) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.TagGui.INVALID_FORMAT)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.TagGui.INVALID_FORMAT)); sendUpdate(); return; } // Check if same as current if (newTag.equalsIgnoreCase(faction.tag())) { - player.sendMessage(MessageUtil.info(playerRef, MessageKeys.TagGui.SAME_TAG, "#FFD700")); + player.sendMessage(MessageUtil.info(playerRef, GuiKeys.TagGui.SAME_TAG, "#FFD700")); sendUpdate(); return; } @@ -211,7 +212,7 @@ public void handleDataEvent(Ref ref, Store store, // Check uniqueness Faction existing = factionManager.getFactionByTag(newTag); if (existing != null && !existing.id().equals(faction.id())) { - player.sendMessage(MessageUtil.error(playerRef, MessageKeys.TagGui.TAG_TAKEN)); + player.sendMessage(MessageUtil.error(playerRef, GuiKeys.TagGui.TAG_TAKEN)); sendUpdate(); return; } @@ -225,9 +226,9 @@ public void handleDataEvent(Ref ref, Store store, worldMapService.triggerFactionWideRefresh(faction.id()); } - String successMsg = HFMessages.get(playerRef, MessageKeys.TagGui.SUCCESS, newTag); + String successMsg = HFMessages.get(playerRef, GuiKeys.TagGui.SUCCESS, newTag); if (adminMode) { - successMsg = HFMessages.get(playerRef, MessageKeys.Common.ADMIN_PREFIX) + " " + successMsg; + successMsg = HFMessages.get(playerRef, CommonKeys.Common.ADMIN_PREFIX) + " " + successMsg; } player.sendMessage(Message.raw(successMsg).color("#55FF55")); diff --git a/src/main/java/com/hyperfactions/importer/ElbaphFactionsImporter.java b/src/main/java/com/hyperfactions/importer/ElbaphFactionsImporter.java index 4cc8a481..d79c1793 100644 --- a/src/main/java/com/hyperfactions/importer/ElbaphFactionsImporter.java +++ b/src/main/java/com/hyperfactions/importer/ElbaphFactionsImporter.java @@ -13,7 +13,7 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import java.io.File; import java.io.FileReader; import java.lang.reflect.Type; @@ -742,7 +742,7 @@ private int handleExistingMemberships(Faction importedFaction, ImportResult.Buil FactionLog.LogType.MEMBER_LEAVE, playerName + " left (imported to another faction)", null, - MessageKeys.LogsGui.MSG_LEFT_IMPORT, playerName + GuiKeys.LogsGui.MSG_LEFT_IMPORT, playerName )); factionManager.removePlayerFromIndex(memberUuid); @@ -761,7 +761,7 @@ private int handleExistingMemberships(Faction importedFaction, ImportResult.Buil FactionLog.LogType.LEADER_TRANSFER, promoted.username() + " became leader (previous leader imported to another faction)", null, - MessageKeys.LogsGui.MSG_LEADER_IMPORT_TRANSFER, promoted.username() + GuiKeys.LogsGui.MSG_LEADER_IMPORT_TRANSFER, promoted.username() )); progress(" - %s promoted to leader of '%s'", promoted.username(), existingFaction.name()); @@ -879,7 +879,7 @@ private Faction convertFaction(ElbaphFaction elbaphFaction, Map logs = new ArrayList<>(); logs.add(FactionLog.system(FactionLog.LogType.MEMBER_JOIN, "Faction imported from ElbaphFactions", - MessageKeys.LogsGui.MSG_IMPORTED_FROM, "ElbaphFactions")); + GuiKeys.LogsGui.MSG_IMPORTED_FROM, "ElbaphFactions")); // Warn about faction points if (elbaphFaction.factionPoints() > 0) { diff --git a/src/main/java/com/hyperfactions/importer/FactionsXImporter.java b/src/main/java/com/hyperfactions/importer/FactionsXImporter.java index fec7595a..8e7815bd 100644 --- a/src/main/java/com/hyperfactions/importer/FactionsXImporter.java +++ b/src/main/java/com/hyperfactions/importer/FactionsXImporter.java @@ -12,7 +12,7 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import java.io.File; import java.io.FileReader; import java.nio.file.Path; @@ -903,7 +903,7 @@ private Faction convertFaction(FxFaction fxFaction, Map logs = new ArrayList<>(); logs.add(FactionLog.system(FactionLog.LogType.MEMBER_JOIN, "Faction imported from FactionsX", - MessageKeys.LogsGui.MSG_IMPORTED_FROM, "FactionsX")); + GuiKeys.LogsGui.MSG_IMPORTED_FROM, "FactionsX")); return new Faction( factionId, @@ -1155,7 +1155,7 @@ private int handleExistingMemberships(Faction importedFaction, ImportResult.Buil FactionLog.LogType.MEMBER_LEAVE, playerName + " left (imported to another faction)", null, - MessageKeys.LogsGui.MSG_LEFT_IMPORT, playerName + GuiKeys.LogsGui.MSG_LEFT_IMPORT, playerName )); factionManager.removePlayerFromIndex(memberUuid); @@ -1174,7 +1174,7 @@ private int handleExistingMemberships(Faction importedFaction, ImportResult.Buil FactionLog.LogType.LEADER_TRANSFER, promoted.username() + " became leader (previous leader imported to another faction)", null, - MessageKeys.LogsGui.MSG_LEADER_IMPORT_TRANSFER, promoted.username() + GuiKeys.LogsGui.MSG_LEADER_IMPORT_TRANSFER, promoted.username() )); progress(" - %s promoted to leader of '%s'", promoted.username(), existingFaction.name()); diff --git a/src/main/java/com/hyperfactions/importer/HyFactionsImporter.java b/src/main/java/com/hyperfactions/importer/HyFactionsImporter.java index c8052db8..d209e1df 100644 --- a/src/main/java/com/hyperfactions/importer/HyFactionsImporter.java +++ b/src/main/java/com/hyperfactions/importer/HyFactionsImporter.java @@ -12,7 +12,7 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import java.io.File; import java.io.FileReader; import java.io.IOException; @@ -913,7 +913,7 @@ private int handleExistingMemberships(Faction importedFaction, ImportResult.Buil FactionLog.LogType.MEMBER_LEAVE, playerName + " left (imported to another faction)", null, // System action - MessageKeys.LogsGui.MSG_LEFT_IMPORT, playerName + GuiKeys.LogsGui.MSG_LEFT_IMPORT, playerName )); // CRITICAL: Remove player from the player-to-faction index @@ -937,7 +937,7 @@ private int handleExistingMemberships(Faction importedFaction, ImportResult.Buil FactionLog.LogType.LEADER_TRANSFER, promoted.username() + " became leader (previous leader imported to another faction)", null, - MessageKeys.LogsGui.MSG_LEADER_IMPORT_TRANSFER, promoted.username() + GuiKeys.LogsGui.MSG_LEADER_IMPORT_TRANSFER, promoted.username() )); progress(" - %s promoted to leader of '%s'", promoted.username(), existingFaction.name()); diff --git a/src/main/java/com/hyperfactions/importer/SimpleClaimsImporter.java b/src/main/java/com/hyperfactions/importer/SimpleClaimsImporter.java index 1d24682e..5ba5de1d 100644 --- a/src/main/java/com/hyperfactions/importer/SimpleClaimsImporter.java +++ b/src/main/java/com/hyperfactions/importer/SimpleClaimsImporter.java @@ -12,7 +12,7 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import java.io.File; import java.io.FileReader; import java.nio.file.Path; @@ -572,7 +572,7 @@ private Faction convertParty(ScParty party, Map> claimsByP List logs = new ArrayList<>(); logs.add(FactionLog.system(FactionLog.LogType.MEMBER_JOIN, "Faction imported from SimpleClaims", - MessageKeys.LogsGui.MSG_IMPORTED_FROM, "SimpleClaims")); + GuiKeys.LogsGui.MSG_IMPORTED_FROM, "SimpleClaims")); return new Faction( partyId, @@ -798,7 +798,7 @@ private int handleExistingMemberships(Faction importedFaction, ImportResult.Buil FactionLog.LogType.MEMBER_LEAVE, playerName + " left (imported to another faction)", null, - MessageKeys.LogsGui.MSG_LEFT_IMPORT, playerName + GuiKeys.LogsGui.MSG_LEFT_IMPORT, playerName )); factionManager.removePlayerFromIndex(memberUuid); @@ -817,7 +817,7 @@ private int handleExistingMemberships(Faction importedFaction, ImportResult.Buil FactionLog.LogType.LEADER_TRANSFER, promoted.username() + " became leader (previous leader imported to another faction)", null, - MessageKeys.LogsGui.MSG_LEADER_IMPORT_TRANSFER, promoted.username() + GuiKeys.LogsGui.MSG_LEADER_IMPORT_TRANSFER, promoted.username() )); progress(" - %s promoted to leader of '%s'", promoted.username(), existingFaction.name()); diff --git a/src/main/java/com/hyperfactions/manager/AnnouncementManager.java b/src/main/java/com/hyperfactions/manager/AnnouncementManager.java index 5b3213fd..50560a39 100644 --- a/src/main/java/com/hyperfactions/manager/AnnouncementManager.java +++ b/src/main/java/com/hyperfactions/manager/AnnouncementManager.java @@ -3,7 +3,7 @@ import com.hyperfactions.config.ConfigManager; import com.hyperfactions.config.modules.AnnouncementConfig; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.server.core.universe.PlayerRef; import java.util.Collection; @@ -39,7 +39,7 @@ public void announceFactionCreated(@NotNull String factionName, @NotNull String return; } - broadcastSuccess(MessageKeys.ServerAnnounce.FACTION_CREATED, leaderName, factionName); + broadcastSuccess(CommonKeys.ServerAnnounce.FACTION_CREATED, leaderName, factionName); } /** @@ -53,7 +53,7 @@ public void announceFactionDisbanded(@NotNull String factionName) { return; } - broadcastError(MessageKeys.ServerAnnounce.FACTION_DISBANDED, factionName); + broadcastError(CommonKeys.ServerAnnounce.FACTION_DISBANDED, factionName); } /** @@ -70,7 +70,7 @@ public void announceLeadershipTransfer(@NotNull String factionName, return; } - broadcastInfo(MessageKeys.ServerAnnounce.LEADERSHIP_TRANSFER, MessageUtil.COLOR_GOLD, newLeader, factionName); + broadcastInfo(CommonKeys.ServerAnnounce.LEADERSHIP_TRANSFER, MessageUtil.COLOR_GOLD, newLeader, factionName); } /** @@ -85,7 +85,7 @@ public void announceOverclaim(@NotNull String attackerFaction, @NotNull String d return; } - broadcastError(MessageKeys.ServerAnnounce.OVERCLAIM, attackerFaction, defenderFaction); + broadcastError(CommonKeys.ServerAnnounce.OVERCLAIM, attackerFaction, defenderFaction); } /** @@ -100,7 +100,7 @@ public void announceWarDeclared(@NotNull String declaringFaction, @NotNull Strin return; } - broadcastError(MessageKeys.ServerAnnounce.WAR_DECLARED, declaringFaction, targetFaction); + broadcastError(CommonKeys.ServerAnnounce.WAR_DECLARED, declaringFaction, targetFaction); } /** @@ -115,7 +115,7 @@ public void announceAllianceFormed(@NotNull String faction1, @NotNull String fac return; } - broadcastSuccess(MessageKeys.ServerAnnounce.ALLIANCE_FORMED, faction1, faction2); + broadcastSuccess(CommonKeys.ServerAnnounce.ALLIANCE_FORMED, faction1, faction2); } /** @@ -130,7 +130,7 @@ public void announceAllianceBroken(@NotNull String faction1, @NotNull String fac return; } - broadcastInfo(MessageKeys.ServerAnnounce.ALLIANCE_BROKEN, MessageUtil.COLOR_GOLD, faction1, faction2); + broadcastInfo(CommonKeys.ServerAnnounce.ALLIANCE_BROKEN, MessageUtil.COLOR_GOLD, faction1, faction2); } /** diff --git a/src/main/java/com/hyperfactions/manager/ChatManager.java b/src/main/java/com/hyperfactions/manager/ChatManager.java index 96e1a6a3..b89e7044 100644 --- a/src/main/java/com/hyperfactions/manager/ChatManager.java +++ b/src/main/java/com/hyperfactions/manager/ChatManager.java @@ -10,7 +10,7 @@ import com.hyperfactions.integration.PermissionManager; import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.universe.PlayerRef; import java.util.List; @@ -509,9 +509,9 @@ private void notifyListeners(@NotNull ChatMessage message, @NotNull UUID faction @NotNull public static String getChannelDisplay(@NotNull ChatChannel channel) { return switch (channel) { - case NORMAL -> HFMessages.get((PlayerRef) null, MessageKeys.ChatDisplay.PUBLIC); - case FACTION -> HFMessages.get((PlayerRef) null, MessageKeys.ChatDisplay.FACTION); - case ALLY -> HFMessages.get((PlayerRef) null, MessageKeys.ChatDisplay.ALLY); + case NORMAL -> HFMessages.get((PlayerRef) null, CommonKeys.ChatDisplay.PUBLIC); + case FACTION -> HFMessages.get((PlayerRef) null, CommonKeys.ChatDisplay.FACTION); + case ALLY -> HFMessages.get((PlayerRef) null, CommonKeys.ChatDisplay.ALLY); }; } diff --git a/src/main/java/com/hyperfactions/manager/ClaimManager.java b/src/main/java/com/hyperfactions/manager/ClaimManager.java index c9ebac75..a9f1993c 100644 --- a/src/main/java/com/hyperfactions/manager/ClaimManager.java +++ b/src/main/java/com/hyperfactions/manager/ClaimManager.java @@ -11,7 +11,7 @@ import com.hyperfactions.integration.protection.OrbisGuardIntegration; import com.hyperfactions.util.ChunkUtil; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.function.BiConsumer; @@ -417,7 +417,7 @@ public ClaimResult claim(@NotNull UUID playerUuid, @NotNull String world, int ch Faction updated = faction.withClaim(claim) .withLog(FactionLog.create(FactionLog.LogType.CLAIM, String.format("Claimed chunk at %d, %d in %s", chunkX, chunkZ, world), playerUuid, - MessageKeys.LogsGui.MSG_CLAIMED, String.valueOf(chunkX), String.valueOf(chunkZ), world)); + GuiKeys.LogsGui.MSG_CLAIMED, String.valueOf(chunkX), String.valueOf(chunkZ), world)); // Update indices and faction claimIndex.put(key, faction.id()); @@ -496,7 +496,7 @@ public ClaimResult unclaim(@NotNull UUID playerUuid, @NotNull String world, int Faction updated = faction.withoutClaimAt(world, chunkX, chunkZ) .withLog(FactionLog.create(FactionLog.LogType.UNCLAIM, String.format("Unclaimed chunk at %d, %d in %s", chunkX, chunkZ, world), playerUuid, - MessageKeys.LogsGui.MSG_UNCLAIMED, String.valueOf(chunkX), String.valueOf(chunkZ), world)); + GuiKeys.LogsGui.MSG_UNCLAIMED, String.valueOf(chunkX), String.valueOf(chunkZ), world)); claimIndex.remove(key); Set factionClaims = factionClaimsIndex.get(faction.id()); @@ -580,14 +580,14 @@ public ClaimResult overclaim(@NotNull UUID playerUuid, @NotNull String world, in Faction updatedDefender = defenderFaction.withoutClaimAt(world, chunkX, chunkZ) .withLog(FactionLog.create(FactionLog.LogType.OVERCLAIM, String.format("Lost chunk at %d, %d to %s", chunkX, chunkZ, attackerFaction.name()), null, - MessageKeys.LogsGui.MSG_OVERCLAIM_LOST, String.valueOf(chunkX), String.valueOf(chunkZ), attackerFaction.name())); + GuiKeys.LogsGui.MSG_OVERCLAIM_LOST, String.valueOf(chunkX), String.valueOf(chunkZ), attackerFaction.name())); // Add to attacker FactionClaim claim = FactionClaim.create(world, chunkX, chunkZ, playerUuid); Faction updatedAttacker = attackerFaction.withClaim(claim) .withLog(FactionLog.create(FactionLog.LogType.OVERCLAIM, String.format("Overclaimed chunk at %d, %d from %s", chunkX, chunkZ, defenderFaction.name()), playerUuid, - MessageKeys.LogsGui.MSG_OVERCLAIM_TAKEN, String.valueOf(chunkX), String.valueOf(chunkZ), defenderFaction.name())); + GuiKeys.LogsGui.MSG_OVERCLAIM_TAKEN, String.valueOf(chunkX), String.valueOf(chunkZ), defenderFaction.name())); // Update indices - remove from defender Set defenderClaims = factionClaimsIndex.get(defenderId); @@ -646,7 +646,7 @@ public void unclaimAll(@NotNull UUID factionId) { Faction updated = faction.withoutAllClaims() .withLog(FactionLog.create(FactionLog.LogType.UNCLAIM, "All territory unclaimed", null, - MessageKeys.LogsGui.MSG_ALL_UNCLAIMED)); + GuiKeys.LogsGui.MSG_ALL_UNCLAIMED)); factionManager.updateFaction(updated); Logger.debugClaim("Unclaim all: faction=%s, claims removed=%d", faction.name(), faction.getClaimCount()); } @@ -685,7 +685,7 @@ public int cleanupDisallowedWorldClaims() { Faction updated = faction.withoutClaimAt(key.world(), key.chunkX(), key.chunkZ()) .withLog(FactionLog.create(FactionLog.LogType.UNCLAIM, "Claim in '" + key.world() + "' removed (world disallows claiming)", null, - MessageKeys.LogsGui.MSG_CLAIM_REMOVED_WORLD, key.world())); + GuiKeys.LogsGui.MSG_CLAIM_REMOVED_WORLD, key.world())); factionManager.updateFaction(updated); } removed++; @@ -769,7 +769,7 @@ private ClaimResult forceClaimChunk(Faction faction, UUID playerUuid, String wor Faction updated = faction.withClaim(claim) .withLog(FactionLog.create(FactionLog.LogType.CLAIM, String.format("Claimed chunk at %d, %d in %s", chunkX, chunkZ, world), playerUuid, - MessageKeys.LogsGui.MSG_CLAIMED, String.valueOf(chunkX), String.valueOf(chunkZ), world)); + GuiKeys.LogsGui.MSG_CLAIMED, String.valueOf(chunkX), String.valueOf(chunkZ), world)); // Update both indices claimIndex.put(key, faction.id()); @@ -940,7 +940,7 @@ public void tickClaimDecay() { if (current != null) { Faction logged = current.withLog(FactionLog.create(FactionLog.LogType.UNCLAIM, String.format("%d claims removed due to inactivity (%d days)", removed, daysSinceActive), null, - MessageKeys.LogsGui.MSG_CLAIMS_REMOVED_INACTIVE, String.valueOf(removed), String.valueOf(daysSinceActive))); + GuiKeys.LogsGui.MSG_CLAIMS_REMOVED_INACTIVE, String.valueOf(removed), String.valueOf(daysSinceActive))); factionManager.updateFaction(logged); } diff --git a/src/main/java/com/hyperfactions/manager/EconomyManager.java b/src/main/java/com/hyperfactions/manager/EconomyManager.java index fceedbd0..1898d56d 100644 --- a/src/main/java/com/hyperfactions/manager/EconomyManager.java +++ b/src/main/java/com/hyperfactions/manager/EconomyManager.java @@ -9,7 +9,7 @@ import com.hyperfactions.integration.economy.VaultEconomyProvider; import com.hyperfactions.storage.JsonEconomyStorage; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.*; @@ -342,7 +342,7 @@ public CompletableFuture deposit( formatCurrency(newBalance), formatCurrency(amount)); Faction updatedFaction = faction.withLog( FactionLog.create(FactionLog.LogType.ECONOMY, logMessage, actorId, - MessageKeys.LogsGui.MSG_DEPOSIT, formatCurrency(newBalance), formatCurrency(amount)) + GuiKeys.LogsGui.MSG_DEPOSIT, formatCurrency(newBalance), formatCurrency(amount)) ); factionManager.updateFaction(updatedFaction); @@ -420,7 +420,7 @@ public CompletableFuture withdraw( formatCurrency(newBalance), formatCurrency(amount)); Faction updatedFaction = faction.withLog( FactionLog.create(FactionLog.LogType.ECONOMY, logMessage, actorId, - MessageKeys.LogsGui.MSG_WITHDRAWAL, formatCurrency(newBalance), formatCurrency(amount)) + GuiKeys.LogsGui.MSG_WITHDRAWAL, formatCurrency(newBalance), formatCurrency(amount)) ); factionManager.updateFaction(updatedFaction); @@ -640,7 +640,7 @@ public CompletableFuture adminAdjust( amount.compareTo(BigDecimal.ZERO) >= 0 ? "added" : "deducted", formatCurrency(amount.abs()), formatCurrency(newBalance)); String msgKey = amount.compareTo(BigDecimal.ZERO) >= 0 - ? MessageKeys.LogsGui.MSG_ADMIN_ECON_ADDED : MessageKeys.LogsGui.MSG_ADMIN_ECON_DEDUCTED; + ? GuiKeys.LogsGui.MSG_ADMIN_ECON_ADDED : GuiKeys.LogsGui.MSG_ADMIN_ECON_DEDUCTED; Faction updatedFaction = faction.withLog( FactionLog.create(FactionLog.LogType.ECONOMY, logMessage, adminId, msgKey, formatCurrency(amount.abs()), formatCurrency(newBalance)) @@ -699,7 +699,7 @@ public CompletableFuture setBalance( formatCurrency(newBalance), formatCurrency(oldBalance)); Faction updatedFaction = faction.withLog( FactionLog.create(FactionLog.LogType.ECONOMY, logMessage, adminId, - MessageKeys.LogsGui.MSG_ADMIN_ECON_SET, formatCurrency(newBalance), formatCurrency(oldBalance)) + GuiKeys.LogsGui.MSG_ADMIN_ECON_SET, formatCurrency(newBalance), formatCurrency(oldBalance)) ); factionManager.updateFaction(updatedFaction); diff --git a/src/main/java/com/hyperfactions/manager/FactionManager.java b/src/main/java/com/hyperfactions/manager/FactionManager.java index a25c9402..87608dab 100644 --- a/src/main/java/com/hyperfactions/manager/FactionManager.java +++ b/src/main/java/com/hyperfactions/manager/FactionManager.java @@ -10,7 +10,7 @@ import com.hyperfactions.storage.FactionStorage; import com.hyperfactions.util.ErrorHandler; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import java.util.*; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; @@ -583,7 +583,7 @@ public FactionResult addMember(@NotNull UUID factionId, @NotNull UUID playerUuid FactionMember member = FactionMember.create(playerUuid, playerName); Faction updated = faction.withMember(member) .withLog(FactionLog.create(FactionLog.LogType.MEMBER_JOIN, playerName + " joined the faction", playerUuid, - MessageKeys.LogsGui.MSG_MEMBER_JOINED, playerName)); + GuiKeys.LogsGui.MSG_MEMBER_JOINED, playerName)); // Update caches factions.put(factionId, updated); @@ -638,7 +638,7 @@ public FactionResult removeMember(@NotNull UUID factionId, @NotNull UUID playerU .withMember(promoted) .withLog(FactionLog.create(FactionLog.LogType.LEADER_TRANSFER, target.username() + " left, " + promoted.username() + " is now leader", playerUuid, - MessageKeys.LogsGui.MSG_LEADER_LEFT_TRANSFER, target.username(), promoted.username())); + GuiKeys.LogsGui.MSG_LEADER_LEFT_TRANSFER, target.username(), promoted.username())); factions.put(factionId, updated); playerToFaction.remove(playerUuid); @@ -672,7 +672,7 @@ public FactionResult removeMember(@NotNull UUID factionId, @NotNull UUID playerU // Remove member FactionLog.LogType logType = isKick ? FactionLog.LogType.MEMBER_KICK : FactionLog.LogType.MEMBER_LEAVE; String message = isKick ? target.username() + " was kicked" : target.username() + " left the faction"; - String msgKey = isKick ? MessageKeys.LogsGui.MSG_MEMBER_KICKED : MessageKeys.LogsGui.MSG_MEMBER_LEFT; + String msgKey = isKick ? GuiKeys.LogsGui.MSG_MEMBER_KICKED : GuiKeys.LogsGui.MSG_MEMBER_LEFT; Faction updated = faction.withoutMember(playerUuid) .withLog(FactionLog.create(logType, message, actorUuid, msgKey, target.username())); @@ -778,7 +778,7 @@ public FactionResult promoteMember(@NotNull UUID factionId, @NotNull UUID player Faction updated = faction.withMember(promoted) .withLog(FactionLog.create(FactionLog.LogType.MEMBER_PROMOTE, target.username() + " promoted to " + ConfigManager.get().getRoleDisplayName(newRole), actorUuid, - MessageKeys.LogsGui.MSG_MEMBER_PROMOTED, target.username(), ConfigManager.get().getRoleDisplayName(newRole))); + GuiKeys.LogsGui.MSG_MEMBER_PROMOTED, target.username(), ConfigManager.get().getRoleDisplayName(newRole))); factions.put(factionId, updated); storage.saveFaction(updated); @@ -829,7 +829,7 @@ public FactionResult demoteMember(@NotNull UUID factionId, @NotNull UUID playerU Faction updated = faction.withMember(demoted) .withLog(FactionLog.create(FactionLog.LogType.MEMBER_DEMOTE, target.username() + " demoted to " + ConfigManager.get().getRoleDisplayName(FactionRole.MEMBER), actorUuid, - MessageKeys.LogsGui.MSG_MEMBER_DEMOTED, target.username(), ConfigManager.get().getRoleDisplayName(FactionRole.MEMBER))); + GuiKeys.LogsGui.MSG_MEMBER_DEMOTED, target.username(), ConfigManager.get().getRoleDisplayName(FactionRole.MEMBER))); factions.put(factionId, updated); storage.saveFaction(updated); @@ -878,7 +878,7 @@ public FactionResult transferLeadership(@NotNull UUID factionId, @NotNull UUID n .withMember(promoted) .withLog(FactionLog.create(FactionLog.LogType.LEADER_TRANSFER, "Leadership transferred to " + target.username(), actorUuid, - MessageKeys.LogsGui.MSG_LEADER_TRANSFERRED, target.username())); + GuiKeys.LogsGui.MSG_LEADER_TRANSFERRED, target.username())); factions.put(factionId, updated); storage.saveFaction(updated); @@ -931,7 +931,7 @@ public FactionResult adminSetMemberRole(@NotNull UUID factionId, @NotNull UUID p updated = updated.withMember(updatedMember) .withLog(FactionLog.create(FactionLog.LogType.MEMBER_PROMOTE, "[Admin] " + target.username() + " role set to " + ConfigManager.get().getRoleDisplayName(newRole), null, - MessageKeys.LogsGui.MSG_ADMIN_ROLE_SET, target.username(), ConfigManager.get().getRoleDisplayName(newRole))); + GuiKeys.LogsGui.MSG_ADMIN_ROLE_SET, target.username(), ConfigManager.get().getRoleDisplayName(newRole))); factions.put(factionId, updated); storage.saveFaction(updated); @@ -969,7 +969,7 @@ public FactionResult adminRemoveMember(@NotNull UUID factionId, @NotNull UUID pl Faction updated = faction.withoutMember(playerUuid) .withLog(FactionLog.create(FactionLog.LogType.MEMBER_KICK, "[Admin] " + target.username() + " was kicked", null, - MessageKeys.LogsGui.MSG_ADMIN_KICKED, target.username())); + GuiKeys.LogsGui.MSG_ADMIN_KICKED, target.username())); factions.put(factionId, updated); playerToFaction.remove(playerUuid); @@ -1009,7 +1009,7 @@ public FactionResult setHome(@NotNull UUID factionId, @Nullable Faction.FactionH Faction updated = faction.withHome(home) .withLog(FactionLog.create(FactionLog.LogType.HOME_SET, home != null ? "Home set" : "Home cleared", actorUuid, - home != null ? MessageKeys.LogsGui.MSG_HOME_SET : MessageKeys.LogsGui.MSG_HOME_CLEARED)); + home != null ? GuiKeys.LogsGui.MSG_HOME_SET : GuiKeys.LogsGui.MSG_HOME_CLEARED)); factions.put(factionId, updated); storage.saveFaction(updated); @@ -1032,7 +1032,7 @@ public int cleanupDisallowedWorldHomes() { Faction updated = faction.withHome(null) .withLog(FactionLog.create(FactionLog.LogType.HOME_SET, "Home in '" + home.world() + "' cleared (world disallows claiming)", null, - MessageKeys.LogsGui.MSG_HOME_CLEARED_WORLD, home.world())); + GuiKeys.LogsGui.MSG_HOME_CLEARED_WORLD, home.world())); factions.put(faction.id(), updated); storage.saveFaction(updated); cleared++; diff --git a/src/main/java/com/hyperfactions/manager/RelationManager.java b/src/main/java/com/hyperfactions/manager/RelationManager.java index c0116ad1..b5d8b1a7 100644 --- a/src/main/java/com/hyperfactions/manager/RelationManager.java +++ b/src/main/java/com/hyperfactions/manager/RelationManager.java @@ -5,7 +5,7 @@ import com.hyperfactions.data.*; import com.hyperfactions.integration.PermissionManager; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.GuiKeys; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.function.BiConsumer; @@ -640,7 +640,7 @@ private void setRelation(@NotNull UUID factionId, @NotNull UUID targetId, Faction updated = faction.withRelation(relation) .withLog(FactionLog.create(logType, "Set " + targetName + " as " + type.getDisplayName(), actorUuid, - MessageKeys.LogsGui.MSG_RELATION_SET, targetName, type.getDisplayName())); + GuiKeys.LogsGui.MSG_RELATION_SET, targetName, type.getDisplayName())); factionManager.updateFaction(updated); diff --git a/src/main/java/com/hyperfactions/manager/TeleportManager.java b/src/main/java/com/hyperfactions/manager/TeleportManager.java index 874d4bfe..cc18e370 100644 --- a/src/main/java/com/hyperfactions/manager/TeleportManager.java +++ b/src/main/java/com/hyperfactions/manager/TeleportManager.java @@ -6,7 +6,7 @@ import com.hyperfactions.integration.PermissionManager; import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.TimeUtil; import com.hypixel.hytale.server.core.Message; @@ -305,7 +305,7 @@ public TeleportResult teleportToHome( if (isOnCooldown(playerUuid)) { int remaining = getCooldownRemaining(playerUuid); sendMessage.accept(MessageUtil.error( - HFMessages.get((PlayerRef) null, MessageKeys.Teleport.COOLDOWN_WAIT, TimeUtil.formatDurationSeconds(remaining)))); + HFMessages.get((PlayerRef) null, CommonKeys.Teleport.COOLDOWN_WAIT, TimeUtil.formatDurationSeconds(remaining)))); return TeleportResult.ON_COOLDOWN; } } @@ -338,7 +338,7 @@ public TeleportResult teleportToHome( // Send warmup message sendMessage.accept(MessageUtil.info( - HFMessages.get((PlayerRef) null, MessageKeys.Teleport.WARMUP_START, warmup), MessageUtil.COLOR_YELLOW)); + HFMessages.get((PlayerRef) null, CommonKeys.Teleport.WARMUP_START, warmup), MessageUtil.COLOR_YELLOW)); Logger.debug("Scheduled teleport for %s, will execute at %d", playerUuid, executeAt); return TeleportResult.SUCCESS_WARMUP; @@ -415,7 +415,7 @@ public PendingTeleport checkReady(@NotNull UUID playerUuid, @NotNull Consumer sendMessage) { applyCooldown(playerUuid); - String msg = customMessage != null ? customMessage : HFMessages.get((PlayerRef) null, MessageKeys.Teleport.SUCCESS_DEFAULT); + String msg = customMessage != null ? customMessage : HFMessages.get((PlayerRef) null, CommonKeys.Teleport.SUCCESS_DEFAULT); sendMessage.accept(MessageUtil.success(msg)); } @@ -442,9 +442,9 @@ public void onTeleportSuccess(@NotNull UUID playerUuid, @Nullable String customM */ public void onTeleportFailed(@NotNull TeleportResult result, @NotNull Consumer sendMessage) { switch (result) { - case NO_HOME -> sendMessage.accept(MessageUtil.error(HFMessages.get((PlayerRef) null, MessageKeys.Teleport.NO_HOME))); - case WORLD_NOT_FOUND -> sendMessage.accept(MessageUtil.error(HFMessages.get((PlayerRef) null, MessageKeys.Teleport.WORLD_NOT_FOUND))); - default -> sendMessage.accept(MessageUtil.error(HFMessages.get((PlayerRef) null, MessageKeys.Teleport.FAILED))); + case NO_HOME -> sendMessage.accept(MessageUtil.error(HFMessages.get((PlayerRef) null, CommonKeys.Teleport.NO_HOME))); + case WORLD_NOT_FOUND -> sendMessage.accept(MessageUtil.error(HFMessages.get((PlayerRef) null, CommonKeys.Teleport.WORLD_NOT_FOUND))); + default -> sendMessage.accept(MessageUtil.error(HFMessages.get((PlayerRef) null, CommonKeys.Teleport.FAILED))); } } @@ -458,8 +458,8 @@ public void sendCountdownMessage(@NotNull PendingTeleport pending, @NotNull Cons int secondsToAnnounce = pending.checkCountdown(); if (secondsToAnnounce > 0) { String timeText = secondsToAnnounce == 1 - ? HFMessages.get((PlayerRef) null, MessageKeys.Teleport.COUNTDOWN_ONE) - : HFMessages.get((PlayerRef) null, MessageKeys.Teleport.COUNTDOWN, secondsToAnnounce); + ? HFMessages.get((PlayerRef) null, CommonKeys.Teleport.COUNTDOWN_ONE) + : HFMessages.get((PlayerRef) null, CommonKeys.Teleport.COUNTDOWN, secondsToAnnounce); sendMessage.accept(MessageUtil.info(timeText, MessageUtil.COLOR_YELLOW)); } } @@ -496,7 +496,7 @@ public boolean checkMovement( if (distSq > 0.25) { // 0.5 blocks removePending(playerUuid); - sendMessage.accept(MessageUtil.error(HFMessages.get((PlayerRef) null, MessageKeys.Teleport.MOVED_CANCELLED))); + sendMessage.accept(MessageUtil.error(HFMessages.get((PlayerRef) null, CommonKeys.Teleport.MOVED_CANCELLED))); return true; } @@ -520,7 +520,7 @@ public boolean cancelOnDamage( if (pendingTeleports.containsKey(playerUuid)) { removePending(playerUuid); - sendMessage.accept(MessageUtil.error(HFMessages.get((PlayerRef) null, MessageKeys.Teleport.DAMAGE_CANCELLED))); + sendMessage.accept(MessageUtil.error(HFMessages.get((PlayerRef) null, CommonKeys.Teleport.DAMAGE_CANCELLED))); return true; } diff --git a/src/main/java/com/hyperfactions/protection/ProtectionChecker.java b/src/main/java/com/hyperfactions/protection/ProtectionChecker.java index 5f0d5c6e..e5bc6f62 100644 --- a/src/main/java/com/hyperfactions/protection/ProtectionChecker.java +++ b/src/main/java/com/hyperfactions/protection/ProtectionChecker.java @@ -17,8 +17,9 @@ import com.hyperfactions.util.ErrorHandler; import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.Logger; -import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.CommonKeys; import java.util.UUID; +import com.hypixel.hytale.server.core.universe.PlayerRef; import java.util.function.Supplier; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -685,84 +686,114 @@ public boolean isAllowed(@NotNull PvPResult result) { } /** - * Gets a user-friendly denial message with generic action wording. - * - * @param result the protection result - * @return the denial message + * Looks up a PlayerRef from a UUID for i18n message resolution. + * Returns null if the player is offline or plugin is unavailable. + */ + @Nullable + private PlayerRef lookupPlayerRef(@Nullable UUID uuid) { + if (uuid == null || plugin == null) { + return null; + } + HyperFactions hf = plugin.get(); + return hf != null ? hf.lookupPlayer(uuid) : null; + } + + /** + * Gets a user-friendly denial message with generic action wording (server default language). */ @NotNull public String getDenialMessage(@NotNull ProtectionResult result) { - return getDenialMessage(result, null); + return getDenialMessage(null, result, null); } /** - * Gets a user-friendly denial message with specific action context. + * Gets a user-friendly denial message with specific action context (server default language). + */ + @NotNull + public String getDenialMessage(@NotNull ProtectionResult result, @Nullable InteractionType type) { + return getDenialMessage(null, result, type); + } + + /** + * Gets a user-friendly denial message localized to the player's language. * + * @param player the player (null for server default language) * @param result the protection result * @param type the interaction type (null for generic messages) * @return the denial message */ @NotNull - public String getDenialMessage(@NotNull ProtectionResult result, @Nullable InteractionType type) { - String action = getActionPhrase(type); + public String getDenialMessage(@Nullable PlayerRef player, @NotNull ProtectionResult result, + @Nullable InteractionType type) { + String action = getActionPhrase(player, type); return switch (result) { - case DENIED_SAFEZONE -> HFMessages.get(MessageKeys.Protection.DENIED_SAFEZONE, action); - case DENIED_WARZONE -> HFMessages.get(MessageKeys.Protection.DENIED_WARZONE, action); - case DENIED_ENEMY_CLAIM -> HFMessages.get(MessageKeys.Protection.DENIED_ENEMY_CLAIM, action); - case DENIED_NEUTRAL_CLAIM -> HFMessages.get(MessageKeys.Protection.DENIED_CLAIMED, action); - case DENIED_NO_PERMISSION -> HFMessages.get(MessageKeys.Protection.DENIED_HERE, action); - default -> HFMessages.get(MessageKeys.Protection.DENIED_HERE, action); + case DENIED_SAFEZONE -> HFMessages.get(player, CommonKeys.Protection.DENIED_SAFEZONE, action); + case DENIED_WARZONE -> HFMessages.get(player, CommonKeys.Protection.DENIED_WARZONE, action); + case DENIED_ENEMY_CLAIM -> HFMessages.get(player, CommonKeys.Protection.DENIED_ENEMY_CLAIM, action); + case DENIED_NEUTRAL_CLAIM -> HFMessages.get(player, CommonKeys.Protection.DENIED_CLAIMED, action); + case DENIED_NO_PERMISSION -> HFMessages.get(player, CommonKeys.Protection.DENIED_HERE, action); + default -> HFMessages.get(player, CommonKeys.Protection.DENIED_HERE, action); }; } /** * Gets a player-friendly action phrase for the given interaction type. * - * @param type the interaction type, or null for generic + * @param player the player (null for server default language) + * @param type the interaction type, or null for generic * @return phrase like "You can't build or break blocks" */ @NotNull - private String getActionPhrase(@Nullable InteractionType type) { + private String getActionPhrase(@Nullable PlayerRef player, @Nullable InteractionType type) { if (type == null) { - return HFMessages.get(MessageKeys.Protection.ACTION_GENERIC); + return HFMessages.get(player, CommonKeys.Protection.ACTION_GENERIC); } return switch (type) { - case BUILD -> HFMessages.get(MessageKeys.Protection.ACTION_BUILD); - case INTERACT, USE -> HFMessages.get(MessageKeys.Protection.ACTION_INTERACT); - case DOOR -> HFMessages.get(MessageKeys.Protection.ACTION_DOOR); - case CONTAINER -> HFMessages.get(MessageKeys.Protection.ACTION_CONTAINER); - case BENCH -> HFMessages.get(MessageKeys.Protection.ACTION_BENCH); - case PROCESSING -> HFMessages.get(MessageKeys.Protection.ACTION_PROCESSING); - case SEAT -> HFMessages.get(MessageKeys.Protection.ACTION_SEAT); - case LIGHT -> HFMessages.get(MessageKeys.Protection.ACTION_LIGHT); - case TELEPORTER, PORTAL -> HFMessages.get(MessageKeys.Protection.ACTION_TELEPORTER); - case CRATE_PICKUP, CRATE_PLACE -> HFMessages.get(MessageKeys.Protection.ACTION_CRATE); - case NPC_TAME -> HFMessages.get(MessageKeys.Protection.ACTION_TAME); - case NPC_INTERACT -> HFMessages.get(MessageKeys.Protection.ACTION_NPC); - case MOUNT -> HFMessages.get(MessageKeys.Protection.ACTION_MOUNT); - case PVE_DAMAGE -> HFMessages.get(MessageKeys.Protection.ACTION_PVE); - case DAMAGE -> HFMessages.get(MessageKeys.Protection.ACTION_GENERIC); - case ITEM_DROP -> HFMessages.get(MessageKeys.Protection.ACTION_ITEM_DROP); - case ITEM_PICKUP -> HFMessages.get(MessageKeys.Protection.ACTION_ITEM_PICKUP); + case BUILD -> HFMessages.get(player, CommonKeys.Protection.ACTION_BUILD); + case INTERACT, USE -> HFMessages.get(player, CommonKeys.Protection.ACTION_INTERACT); + case DOOR -> HFMessages.get(player, CommonKeys.Protection.ACTION_DOOR); + case CONTAINER -> HFMessages.get(player, CommonKeys.Protection.ACTION_CONTAINER); + case BENCH -> HFMessages.get(player, CommonKeys.Protection.ACTION_BENCH); + case PROCESSING -> HFMessages.get(player, CommonKeys.Protection.ACTION_PROCESSING); + case SEAT -> HFMessages.get(player, CommonKeys.Protection.ACTION_SEAT); + case LIGHT -> HFMessages.get(player, CommonKeys.Protection.ACTION_LIGHT); + case TELEPORTER, PORTAL -> HFMessages.get(player, CommonKeys.Protection.ACTION_TELEPORTER); + case CRATE_PICKUP, CRATE_PLACE -> HFMessages.get(player, CommonKeys.Protection.ACTION_CRATE); + case NPC_TAME -> HFMessages.get(player, CommonKeys.Protection.ACTION_TAME); + case NPC_INTERACT -> HFMessages.get(player, CommonKeys.Protection.ACTION_NPC); + case MOUNT -> HFMessages.get(player, CommonKeys.Protection.ACTION_MOUNT); + case PVE_DAMAGE -> HFMessages.get(player, CommonKeys.Protection.ACTION_PVE); + case DAMAGE -> HFMessages.get(player, CommonKeys.Protection.ACTION_GENERIC); + case ITEM_DROP -> HFMessages.get(player, CommonKeys.Protection.ACTION_ITEM_DROP); + case ITEM_PICKUP -> HFMessages.get(player, CommonKeys.Protection.ACTION_ITEM_PICKUP); }; } /** - * Gets a user-friendly PvP denial message. + * Gets a user-friendly PvP denial message (server default language). + */ + @NotNull + public String getDenialMessage(@NotNull PvPResult result) { + return getDenialMessage(null, result); + } + + /** + * Gets a user-friendly PvP denial message localized to the player's language. * + * @param player the player (null for server default language) * @param result the PvP result * @return the denial message */ @NotNull - public String getDenialMessage(@NotNull PvPResult result) { + public String getDenialMessage(@Nullable PlayerRef player, @NotNull PvPResult result) { return switch (result) { - case DENIED_SAFEZONE -> HFMessages.get(MessageKeys.Protection.PVP_SAFEZONE); - case DENIED_SAME_FACTION -> HFMessages.get(MessageKeys.Protection.PVP_SAME_FACTION); - case DENIED_ALLY -> HFMessages.get(MessageKeys.Protection.PVP_ALLY); - case DENIED_ATTACKER_SAFEZONE, DENIED_DEFENDER_SAFEZONE -> HFMessages.get(MessageKeys.Protection.PVP_SAFEZONE); - case DENIED_SPAWN_PROTECTED -> HFMessages.get(MessageKeys.Protection.PVP_SPAWN_PROTECTED); - case DENIED_TERRITORY_NO_PVP -> HFMessages.get(MessageKeys.Protection.PVP_TERRITORY_DISABLED); - default -> HFMessages.get(MessageKeys.Protection.PVP_GENERIC); + case DENIED_SAFEZONE -> HFMessages.get(player, CommonKeys.Protection.PVP_SAFEZONE); + case DENIED_SAME_FACTION -> HFMessages.get(player, CommonKeys.Protection.PVP_SAME_FACTION); + case DENIED_ALLY -> HFMessages.get(player, CommonKeys.Protection.PVP_ALLY); + case DENIED_ATTACKER_SAFEZONE, DENIED_DEFENDER_SAFEZONE -> HFMessages.get(player, CommonKeys.Protection.PVP_SAFEZONE); + case DENIED_SPAWN_PROTECTED -> HFMessages.get(player, CommonKeys.Protection.PVP_SPAWN_PROTECTED); + case DENIED_TERRITORY_NO_PVP -> HFMessages.get(player, CommonKeys.Protection.PVP_TERRITORY_DISABLED); + default -> HFMessages.get(player, CommonKeys.Protection.PVP_GENERIC); }; } @@ -820,18 +851,21 @@ private String checkMixinProtection(@NotNull UUID playerUuid, @NotNull String wo } } + // Resolve player's locale for localized denial messages + PlayerRef playerRef = lookupPlayerRef(playerUuid); + // 3. Zone flag check Zone zone = zoneManager.getZone(worldName, chunkX, chunkZ); if (zone != null) { if (!zone.getEffectiveFlag(zoneFlag)) { - String action = getActionPhrase(factionType); + String action = getActionPhrase(playerRef, factionType); if (zone.isSafeZone()) { - return HFMessages.get(MessageKeys.Protection.DENIED_SAFEZONE, action); + return HFMessages.get(playerRef, CommonKeys.Protection.DENIED_SAFEZONE, action); } if (zone.isWarZone()) { - return HFMessages.get(MessageKeys.Protection.DENIED_WARZONE, action); + return HFMessages.get(playerRef, CommonKeys.Protection.DENIED_WARZONE, action); } - return HFMessages.get(MessageKeys.Protection.DENIED_ZONE, action); + return HFMessages.get(playerRef, CommonKeys.Protection.DENIED_ZONE, action); } if (zone.isWarZone()) { return null; @@ -858,7 +892,7 @@ private String checkMixinProtection(@NotNull UUID playerUuid, @NotNull String wo && member.role().getLevel() >= FactionRole.OFFICER.getLevel(); String level = isOfficerOrLeader ? "officer" : "member"; if (perms != null && !checkPermission(perms, level, factionType)) { - return HFMessages.get(MessageKeys.Protection.DENIED_FACTION_PERM, getActionPhrase(factionType), level); + return HFMessages.get(playerRef, CommonKeys.Protection.DENIED_FACTION_PERM, getActionPhrase(playerRef, factionType), level); } return null; } @@ -870,7 +904,7 @@ private String checkMixinProtection(@NotNull UUID playerUuid, @NotNull String wo if (perms != null && checkPermission(perms, "ally", factionType)) { return null; } - return HFMessages.get(MessageKeys.Protection.DENIED_ALLY_TERRITORY, getActionPhrase(factionType)); + return HFMessages.get(playerRef, CommonKeys.Protection.DENIED_ALLY_TERRITORY, getActionPhrase(playerRef, factionType)); } } @@ -883,15 +917,15 @@ private String checkMixinProtection(@NotNull UUID playerUuid, @NotNull String wo if (playerFactionId != null) { RelationType relation = relationManager.getRelation(playerFactionId, claimOwner); if (relation == RelationType.ENEMY) { - return HFMessages.get(MessageKeys.Protection.DENIED_ENEMY_CLAIM, getActionPhrase(factionType)); + return HFMessages.get(playerRef, CommonKeys.Protection.DENIED_ENEMY_CLAIM, getActionPhrase(playerRef, factionType)); } } - return HFMessages.get(MessageKeys.Protection.DENIED_CLAIMED, getActionPhrase(factionType)); + return HFMessages.get(playerRef, CommonKeys.Protection.DENIED_CLAIMED, getActionPhrase(playerRef, factionType)); } catch (Exception e) { // Fail-closed: deny on any exception to prevent unauthorized actions ErrorHandler.report(String.format("Protection check error (fail-closed) for player %s at %s/%d/%d/%d type=%s", playerUuid, worldName, x, y, z, factionType), e); - return HFMessages.get(MessageKeys.Protection.DENIED_ERROR); + return HFMessages.get(lookupPlayerRef(playerUuid), CommonKeys.Protection.DENIED_ERROR); } } @@ -1069,7 +1103,8 @@ public String checkEntityDamage(@Nullable UUID attackerUuid, @Nullable UUID targ if (attackerUuid == null && targetUuid != null) { Zone zone = zoneManager.getZone(worldName, chunkX, chunkZ); if (zone != null && !zone.getEffectiveFlag(ZoneFlags.MOB_DAMAGE)) { - return HFMessages.get(MessageKeys.Protection.MOB_DAMAGE_DISABLED); + PlayerRef targetRef = lookupPlayerRef(targetUuid); + return HFMessages.get(targetRef, CommonKeys.Protection.MOB_DAMAGE_DISABLED); } return null; } @@ -1078,7 +1113,8 @@ public String checkEntityDamage(@Nullable UUID attackerUuid, @Nullable UUID targ if (attackerUuid != null && targetUuid == null) { Zone zone = zoneManager.getZone(worldName, chunkX, chunkZ); if (zone != null && !zone.getEffectiveFlag(ZoneFlags.PVE_DAMAGE)) { - return HFMessages.get(MessageKeys.Protection.PVE_DAMAGE_DISABLED); + PlayerRef attackerRef = lookupPlayerRef(attackerUuid); + return HFMessages.get(attackerRef, CommonKeys.Protection.PVE_DAMAGE_DISABLED); } // Check territory claim permissions return checkPveInTerritory(attackerUuid, worldName, chunkX, chunkZ); @@ -1086,7 +1122,7 @@ public String checkEntityDamage(@Nullable UUID attackerUuid, @Nullable UUID targ // PvP check using existing canDamagePlayerChunk PvPResult result = canDamagePlayerChunk(attackerUuid, targetUuid, worldName, chunkX, chunkZ); - return isAllowed(result) ? null : getDenialMessage(result); + return isAllowed(result) ? null : getDenialMessage(lookupPlayerRef(attackerUuid), result); } /** @@ -1148,7 +1184,8 @@ private String checkPveInTerritory(@NotNull UUID attackerUuid, @NotNull String w } if (!checkPermission(perms, level, InteractionType.PVE_DAMAGE)) { - return HFMessages.get(MessageKeys.Protection.PVE_TERRITORY_DENIED); + PlayerRef attackerRef = lookupPlayerRef(attackerUuid); + return HFMessages.get(attackerRef, CommonKeys.Protection.PVE_TERRITORY_DENIED); } return null; } @@ -1344,7 +1381,7 @@ public OrbisMixinsIntegration.CommandCheckResult checkCommandBlock( || lowerCmd.startsWith("/home") || lowerCmd.startsWith("/spawn") || lowerCmd.startsWith("/tp") || lowerCmd.startsWith("/tpa")) { return OrbisMixinsIntegration.CommandCheckResult.deny( - HFMessages.get(MessageKeys.Protection.COMBAT_TAG_COMMAND)); + HFMessages.get(lookupPlayerRef(playerUuid), CommonKeys.Protection.COMBAT_TAG_COMMAND)); } } diff --git a/src/main/java/com/hyperfactions/protection/ecs/PlayerDeathSystem.java b/src/main/java/com/hyperfactions/protection/ecs/PlayerDeathSystem.java index e22cca2a..b9525518 100644 --- a/src/main/java/com/hyperfactions/protection/ecs/PlayerDeathSystem.java +++ b/src/main/java/com/hyperfactions/protection/ecs/PlayerDeathSystem.java @@ -12,7 +12,9 @@ import com.hyperfactions.manager.CombatTagManager; import com.hyperfactions.manager.PowerManager; import com.hyperfactions.util.ChunkUtil; +import com.hyperfactions.util.CommonKeys; import com.hyperfactions.util.ErrorHandler; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.Logger; import com.hypixel.hytale.component.CommandBuffer; import com.hypixel.hytale.component.ComponentType; @@ -288,14 +290,12 @@ private void announceDeathLocation(UUID victimUuid, PlayerRef playerRef, // Build and send message to faction members String playerName = playerRef.getUsername(); + String deathText = HFMessages.get((PlayerRef) null, CommonKeys.Announce.DEATH_LOCATION, + playerName, String.valueOf(x), String.valueOf(y), String.valueOf(z), worldName); Message deathMsg = Message.raw("[").color("#555555") .insert(Message.raw("HF").color("#55FFFF")) .insert(Message.raw("] ").color("#555555")) - .insert(Message.raw(playerName).color("#FFAA00")) - .insert(Message.raw(" died at ").color("#AAAAAA")) - .insert(Message.raw("(" + x + ", " + y + ", " + z + ")").color("#55FF55")) - .insert(Message.raw(" in ").color("#AAAAAA")) - .insert(Message.raw(worldName).color("#55FFFF")); + .insert(Message.raw(deathText).color("#AAAAAA")); for (UUID memberUuid : faction.members().keySet()) { if (memberUuid.equals(victimUuid)) { // Don't notify the dead player diff --git a/src/main/java/com/hyperfactions/territory/TerritoryInfo.java b/src/main/java/com/hyperfactions/territory/TerritoryInfo.java index 4fe61c0f..4cf224f2 100644 --- a/src/main/java/com/hyperfactions/territory/TerritoryInfo.java +++ b/src/main/java/com/hyperfactions/territory/TerritoryInfo.java @@ -2,6 +2,9 @@ import com.hyperfactions.data.RelationType; import com.hyperfactions.data.Zone; +import com.hyperfactions.util.CommonKeys; +import com.hyperfactions.util.HFMessages; +import com.hypixel.hytale.server.core.universe.PlayerRef; import java.util.Objects; import java.util.UUID; import org.jetbrains.annotations.NotNull; @@ -214,23 +217,24 @@ public String getDisplayColor() { } /** - * Gets the primary display text for the notification. + * Gets the primary display text for the notification, localized for the given player. * For faction claims, includes the tag if available (e.g., "FactionName [TAG]"). * + * @param player the player to localize for, or null for default language * @return the primary display text */ @NotNull - public String getPrimaryText() { + public String getPrimaryText(@Nullable PlayerRef player) { if (notifyTitleLower != null) { return notifyTitleLower; } return switch (type) { - case WILDERNESS -> "Wilderness"; - case SAFEZONE -> factionName != null ? factionName : "SafeZone"; - case WARZONE -> factionName != null ? factionName : "WarZone"; + case WILDERNESS -> HFMessages.get(player, CommonKeys.Territory.DISPLAY_WILDERNESS); + case SAFEZONE -> factionName != null ? factionName : HFMessages.get(player, CommonKeys.Territory.DISPLAY_SAFEZONE); + case WARZONE -> factionName != null ? factionName : HFMessages.get(player, CommonKeys.Territory.DISPLAY_WARZONE); case FACTION_CLAIM -> { if (factionName == null) { - yield "Unknown Faction"; + yield HFMessages.get(player, CommonKeys.Territory.DISPLAY_UNKNOWN_FACTION); } if (factionTag != null && !factionTag.isEmpty()) { yield factionName + " [" + factionTag + "]"; @@ -241,29 +245,52 @@ public String getPrimaryText() { } /** - * Gets the secondary display text for the notification. + * Gets the primary display text for the notification using default language. + * For faction claims, includes the tag if available (e.g., "FactionName [TAG]"). + * + * @return the primary display text + */ + @NotNull + public String getPrimaryText() { + return getPrimaryText(null); + } + + /** + * Gets the secondary display text for the notification, localized for the given player. * Includes territory type and special status. * + * @param player the player to localize for, or null for default language * @return the secondary display text, or null if none */ @Nullable - public String getSecondaryText() { + public String getSecondaryText(@Nullable PlayerRef player) { if (notifyTitleUpper != null) { return notifyTitleUpper.isEmpty() ? null : notifyTitleUpper; } return switch (type) { case WILDERNESS -> null; - case SAFEZONE -> "PvP Disabled"; - case WARZONE -> "PvP Enabled - No Protection"; + case SAFEZONE -> HFMessages.get(player, CommonKeys.Territory.SECONDARY_PVP_DISABLED); + case WARZONE -> HFMessages.get(player, CommonKeys.Territory.SECONDARY_PVP_NO_PROTECTION); case FACTION_CLAIM -> { if (relation == RelationType.OWN) { - yield "Your Territory"; + yield HFMessages.get(player, CommonKeys.Territory.SECONDARY_YOUR_TERRITORY); } if (relation != null) { - yield relation.getDisplayName() + " Territory"; + yield HFMessages.get(player, CommonKeys.Territory.SECONDARY_RELATION_TERRITORY, relation.getDisplayName()); } - yield "Faction Territory"; + yield HFMessages.get(player, CommonKeys.Territory.SECONDARY_FACTION_TERRITORY); } }; } + + /** + * Gets the secondary display text for the notification using default language. + * Includes territory type and special status. + * + * @return the secondary display text, or null if none + */ + @Nullable + public String getSecondaryText() { + return getSecondaryText(null); + } } diff --git a/src/main/java/com/hyperfactions/territory/TerritoryNotifier.java b/src/main/java/com/hyperfactions/territory/TerritoryNotifier.java index 0eb5050a..df4857fc 100644 --- a/src/main/java/com/hyperfactions/territory/TerritoryNotifier.java +++ b/src/main/java/com/hyperfactions/territory/TerritoryNotifier.java @@ -153,17 +153,17 @@ private void sendTerritoryNotification(@NotNull PlayerRef playerRef, @NotNull Te if (!territory.isNotificationEnabled()) { Logger.debugTerritory("Notification suppressed for %s: %s", - playerRef.getUsername(), territory.getPrimaryText()); + playerRef.getUsername(), territory.getPrimaryText(playerRef)); return; } try { // Build primary message (territory name) - Message primaryMessage = Message.raw(territory.getPrimaryText()) + Message primaryMessage = Message.raw(territory.getPrimaryText(playerRef)) .color(territory.getDisplayColor()); // Build secondary message (territory type description) - String secondaryText = territory.getSecondaryText(); + String secondaryText = territory.getSecondaryText(playerRef); Message secondaryMessage = secondaryText != null ? Message.raw(secondaryText).color("#AAAAAA") : Message.raw(""); @@ -182,7 +182,7 @@ private void sendTerritoryNotification(@NotNull PlayerRef playerRef, @NotNull Te ); Logger.debugTerritory("Sent territory notification to %s: %s", - playerRef.getUsername(), territory.getPrimaryText()); + playerRef.getUsername(), territory.getPrimaryText(playerRef)); } catch (Exception e) { // Fallback to chat message if notification fails @@ -199,8 +199,8 @@ private void sendTerritoryNotification(@NotNull PlayerRef playerRef, @NotNull Te */ private void sendChatFallback(@NotNull PlayerRef playerRef, @NotNull TerritoryInfo territory) { try { - String secondaryText = territory.getSecondaryText(); - Message message = Message.raw("~ " + territory.getPrimaryText()) + String secondaryText = territory.getSecondaryText(playerRef); + Message message = Message.raw("~ " + territory.getPrimaryText(playerRef)) .color(territory.getDisplayColor()); if (secondaryText != null) { diff --git a/src/main/java/com/hyperfactions/territory/TerritoryTickingSystem.java b/src/main/java/com/hyperfactions/territory/TerritoryTickingSystem.java index 3eff31ba..73490fc1 100644 --- a/src/main/java/com/hyperfactions/territory/TerritoryTickingSystem.java +++ b/src/main/java/com/hyperfactions/territory/TerritoryTickingSystem.java @@ -133,7 +133,7 @@ public void tick(float dt, int index, @NotNull ArchetypeChunk arche TeleportManager.TeleportDestination dest = ready.destination(); if (!isMountEntryAllowed(dest.world(), dest.x(), dest.z())) { playerRef.sendMessage(com.hyperfactions.util.MessageUtil.error( - playerRef, com.hyperfactions.util.MessageKeys.Teleport.MOUNT_TELEPORT_BLOCKED)); + playerRef, com.hyperfactions.util.CommonKeys.Teleport.MOUNT_TELEPORT_BLOCKED)); Logger.debugTerritory("Teleport blocked for mounted player %s to zone at (%.1f, %.1f)", playerUuid, dest.x(), dest.z()); mountBlocked = true; @@ -172,7 +172,7 @@ public void tick(float dt, int index, @NotNull ArchetypeChunk arche } }); ProtectionMessageDebounce.sendDenial(playerRef, "mount_entry", - com.hyperfactions.util.HFMessages.get(playerRef, com.hyperfactions.util.MessageKeys.Teleport.MOUNT_ENTRY_BLOCKED)); + com.hyperfactions.util.HFMessages.get(playerRef, com.hyperfactions.util.CommonKeys.Teleport.MOUNT_ENTRY_BLOCKED)); Logger.debugTerritory("Mount entry blocked for %s at zone '%s' (%s), safe=(%.1f, %.1f, %.1f)", playerUuid, zone.name(), zone.type().name(), safePos[0], safeY, safePos[1]); } diff --git a/src/main/java/com/hyperfactions/update/UpdateNotificationListener.java b/src/main/java/com/hyperfactions/update/UpdateNotificationListener.java index 9c3783b5..957f40e6 100644 --- a/src/main/java/com/hyperfactions/update/UpdateNotificationListener.java +++ b/src/main/java/com/hyperfactions/update/UpdateNotificationListener.java @@ -3,6 +3,8 @@ import com.hyperfactions.HyperFactions; import com.hyperfactions.Permissions; import com.hyperfactions.integration.PermissionManager; +import com.hyperfactions.util.AdminKeys; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.Logger; import com.hypixel.hytale.event.EventRegistry; import com.hypixel.hytale.server.core.Message; @@ -182,24 +184,17 @@ private void sendUpdateAvailableMessage(PlayerRef playerRef, UpdateChecker check // [HyperFactions] A new version is available! playerRef.sendMessage( - Message.raw("[HyperFactions] ").color(GOLD) - .insert(Message.raw("A new version is available!").color(GOLD).bold(true)) + Message.raw(HFMessages.get(playerRef, AdminKeys.AdminCmd.UPDATE_NOTIFY_NEW_VERSION)).color(GOLD).bold(true) ); // Current: v1.0.0 -> Latest: v1.1.0 (pre-release) playerRef.sendMessage( - Message.raw("Current: ").color(GRAY) - .insert(Message.raw("v" + currentVersion).color(WHITE)) - .insert(Message.raw(" -> ").color(GRAY)) - .insert(Message.raw("Latest: ").color(GRAY)) - .insert(Message.raw(versionLabel).color(GREEN)) + Message.raw(HFMessages.get(playerRef, AdminKeys.AdminCmd.UPDATE_NOTIFY_VERSION_INFO, currentVersion, versionLabel)).color(GRAY) ); // Run /f admin update to update the plugin. playerRef.sendMessage( - Message.raw("Run ").color(GRAY) - .insert(Message.raw("/f admin update").color(GREEN)) - .insert(Message.raw(" to update the plugin.").color(GRAY)) + Message.raw(HFMessages.get(playerRef, AdminKeys.AdminCmd.UPDATE_NOTIFY_INSTRUCTION)).color(GRAY) ); Logger.debug("[UpdateNotify] Sent update notification to %s", playerRef.getUsername()); @@ -216,9 +211,7 @@ private void sendUpToDateMessage(PlayerRef playerRef, UpdateChecker checker) { // [HyperFactions] Plugin is up-to-date (v1.0.0) playerRef.sendMessage( - Message.raw("[HyperFactions] ").color(GRAY) - .insert(Message.raw("Plugin is up-to-date ").color(GRAY)) - .insert(Message.raw("(v" + currentVersion + ")").color(GREEN)) + Message.raw(HFMessages.get(playerRef, AdminKeys.AdminCmd.UPDATE_NOTIFY_UP_TO_DATE, currentVersion)).color(GREEN) ); Logger.debug("[UpdateNotify] Sent up-to-date notification to %s", playerRef.getUsername()); diff --git a/src/main/java/com/hyperfactions/util/AdminGuiKeys.java b/src/main/java/com/hyperfactions/util/AdminGuiKeys.java new file mode 100644 index 00000000..e8d31e55 --- /dev/null +++ b/src/main/java/com/hyperfactions/util/AdminGuiKeys.java @@ -0,0 +1,719 @@ +package com.hyperfactions.util; + +/** + * Static constants for admin GUI page message keys. + * + *

+ * Split from the original MessageKeys to reduce file size. Contains the {@link AdminGui} + * inner class with all {@code hyperfactions_admin.*} keys used by admin GUI pages. + * + *

+ * Key format: {@code hyperfactions_admin.{domain}.{action}} + * Maps to {@code hyperfactions_admin.lang} file. + */ +public final class AdminGuiKeys { + + private AdminGuiKeys() {} + + /** Admin GUI page labels and messages. */ + public static final class AdminGui { + // Common admin labels + public static final String FACTION_NOT_FOUND_LABEL = "hyperfactions_admin.common.faction_not_found"; + public static final String NO_FACTION = "hyperfactions_admin.common.no_faction"; + public static final String NOT_SET = "hyperfactions_admin.common.not_set"; + public static final String ON = "hyperfactions_admin.common.on"; + public static final String OFF = "hyperfactions_admin.common.off"; + public static final String ENABLE_BTN = "hyperfactions_admin.common.enable"; + public static final String DISABLE_BTN = "hyperfactions_admin.common.disable"; + public static final String NONE_PAREN = "hyperfactions_admin.common.none_paren"; + public static final String INVALID_FACTION = "hyperfactions_admin.common.invalid_faction"; + public static final String LEADER_PREFIX = "hyperfactions_admin.common.leader_prefix"; + public static final String CLAIMS_SUFFIX = "hyperfactions_admin.common.claims_suffix"; + public static final String FACTIONS_SUFFIX = "hyperfactions_admin.common.factions_suffix"; + public static final String NAV_TITLE = "hyperfactions_admin.gui.nav_title"; + public static final String GUI_ECON_BTN_ADJUST = "hyperfactions_admin.gui.econ_btn_adjust"; + public static final String GUI_ECON_BTN_INFO = "hyperfactions_admin.gui.econ_btn_info"; + public static final String PLAYERS_SUFFIX = "hyperfactions_admin.common.players_suffix"; + public static final String CHUNKS_SUFFIX = "hyperfactions_admin.common.chunks_suffix"; + public static final String ENTRIES_SUFFIX = "hyperfactions_admin.common.entries_suffix"; + public static final String FOUND_SUFFIX = "hyperfactions_admin.common.found_suffix"; + public static final String POWER_FORMAT = "hyperfactions_admin.common.power_format"; + public static final String RAIDABLE = "hyperfactions_admin.common.raidable"; + public static final String PROTECTED = "hyperfactions_admin.common.protected"; + public static final String OFFICERS_MORE = "hyperfactions_admin.common.officers_more"; + public static final String CUSTOM_MAX = "hyperfactions_admin.common.custom_max"; + public static final String DEFAULT_MAX = "hyperfactions_admin.common.default_max"; + public static final String NOW = "hyperfactions_admin.common.now"; + public static final String AGO_SUFFIX = "hyperfactions_admin.common.ago_suffix"; + public static final String JUST_NOW = "hyperfactions_admin.common.just_now"; + public static final String NO_MEMBERSHIP_HISTORY = "hyperfactions_admin.common.no_membership_history"; + // Dashboard + public static final String DASH_FACTIONS_PREFIX = "hyperfactions_admin.dashboard.factions_prefix"; + public static final String DASH_MEMBERS_PREFIX = "hyperfactions_admin.dashboard.members_prefix"; + public static final String DASH_CLAIMS_PREFIX = "hyperfactions_admin.dashboard.claims_prefix"; + // Actions + public static final String ACT_CONFIRM_RESET = "hyperfactions_admin.actions.confirm_reset"; + public static final String ACT_CONFIRM_TRIGGER = "hyperfactions_admin.actions.confirm_trigger"; + public static final String ACT_KD_RESET = "hyperfactions_admin.actions.kd_reset"; + public static final String ACT_KD_RESET_FAILED = "hyperfactions_admin.actions.kd_reset_failed"; + public static final String ACT_UPKEEP_UNAVAILABLE = "hyperfactions_admin.actions.upkeep_unavailable"; + public static final String ACT_UPKEEP_TRIGGERED = "hyperfactions_admin.actions.upkeep_triggered"; + public static final String ACT_UPKEEP_FAILED = "hyperfactions_admin.actions.upkeep_failed"; + // Disband confirm + public static final String DISBAND_FACTION_GONE = "hyperfactions_admin.disband.faction_gone"; + public static final String DISBAND_SUCCESS = "hyperfactions_admin.disband.success"; + public static final String DISBAND_FAILED = "hyperfactions_admin.disband.failed"; + public static final String DISBAND_NO_LEADER = "hyperfactions_admin.disband.no_leader"; + // Unclaim all confirm + public static final String UNCLAIM_REMOVED = "hyperfactions_admin.unclaim.removed"; + public static final String UNCLAIM_NO_CLAIMS = "hyperfactions_admin.unclaim.no_claims"; + // Factions list + public static final String FAC_HOME_NOT_SET = "hyperfactions_admin.factions.home_not_set"; + public static final String FAC_TELEPORTED = "hyperfactions_admin.factions.teleported"; + public static final String FAC_NO_HOME = "hyperfactions_admin.factions.no_home"; + public static final String FAC_WORLD_NOT_FOUND = "hyperfactions_admin.factions.world_not_found"; + // Faction info + public static final String INFO_FACTION_GONE = "hyperfactions_admin.info.faction_gone"; + // Faction members + public static final String MEM_SORT_ROLE = "hyperfactions_admin.members.sort_role"; + public static final String MEM_SORT_ONLINE = "hyperfactions_admin.members.sort_online"; + public static final String MEM_SORT_NAME = "hyperfactions_admin.members.sort_name"; + public static final String MEM_SORT_POWER = "hyperfactions_admin.members.sort_power"; + public static final String MEM_PROMOTED = "hyperfactions_admin.members.promoted"; + public static final String MEM_DEMOTED = "hyperfactions_admin.members.demoted"; + public static final String MEM_KICKED = "hyperfactions_admin.members.kicked"; + // Faction relations + public static final String REL_ALLIES_HEADER = "hyperfactions_admin.relations.allies_header"; + public static final String REL_ENEMIES_HEADER = "hyperfactions_admin.relations.enemies_header"; + public static final String REL_NO_ALLIES = "hyperfactions_admin.relations.no_allies"; + public static final String REL_NO_ENEMIES = "hyperfactions_admin.relations.no_enemies"; + public static final String REL_NEUTRAL_COUNT = "hyperfactions_admin.relations.neutral_count"; + public static final String REL_SINCE_TODAY = "hyperfactions_admin.relations.since_today"; + public static final String REL_SINCE_ONE_DAY = "hyperfactions_admin.relations.since_one_day"; + public static final String REL_SINCE_DAYS = "hyperfactions_admin.relations.since_days"; + public static final String REL_SET_ALLY = "hyperfactions_admin.relations.set_ally"; + public static final String REL_SET_ENEMY = "hyperfactions_admin.relations.set_enemy"; + public static final String REL_SET_NEUTRAL = "hyperfactions_admin.relations.set_neutral"; + // Faction settings + public static final String SET_LOCKED = "hyperfactions_admin.settings.locked"; + public static final String SET_PERM_TOGGLED = "hyperfactions_admin.settings.perm_toggled"; + public static final String SET_COLOR_CHANGED = "hyperfactions_admin.settings.color_changed"; + public static final String SET_RECRUITMENT_SET = "hyperfactions_admin.settings.recruitment_set"; + public static final String SET_NO_HOME = "hyperfactions_admin.settings.no_home"; + public static final String SET_HOME_CLEARED = "hyperfactions_admin.settings.home_cleared"; + // Sort dropdown labels (shared) + public static final String SORT_POWER = "hyperfactions_admin.sort.power"; + public static final String SORT_NAME = "hyperfactions_admin.sort.name"; + public static final String SORT_MEMBERS = "hyperfactions_admin.sort.members"; + public static final String SORT_BALANCE = "hyperfactions_admin.sort.balance"; + // Players + public static final String PLR_SORT_LAST_ONLINE = "hyperfactions_admin.players.sort_last_online"; + public static final String PLR_SORT_FACTION = "hyperfactions_admin.players.sort_faction"; + public static final String PLR_SORT_ONLINE = "hyperfactions_admin.players.sort_online"; + public static final String PLR_NOT_ONLINE = "hyperfactions_admin.players.not_online"; + public static final String PLR_WORLD_NOT_FOUND = "hyperfactions_admin.players.world_not_found"; + public static final String PLR_TELEPORTED = "hyperfactions_admin.players.teleported"; + // Player info + public static final String PLR_DISBAND_FACTION = "hyperfactions_admin.playerinfo.disband_faction"; + public static final String PLR_KICK_LEADER = "hyperfactions_admin.playerinfo.kick_leader"; + public static final String PLR_ENTER_VALID_NUMBER = "hyperfactions_admin.playerinfo.enter_valid_number"; + public static final String PLR_ENTER_VALID_POSITIVE = "hyperfactions_admin.playerinfo.enter_valid_positive"; + public static final String PLR_FACTION_GONE = "hyperfactions_admin.playerinfo.faction_gone"; + public static final String PLR_KD_RESET = "hyperfactions_admin.playerinfo.kd_reset"; + public static final String PLR_KICKED_SUCCESS = "hyperfactions_admin.playerinfo.kicked_success"; + public static final String PLR_KICKED_LEADER = "hyperfactions_admin.playerinfo.kicked_leader"; + public static final String PLR_DISBANDED_KICK = "hyperfactions_admin.playerinfo.disbanded_kick"; + public static final String ECON_NOT_ENABLED = "hyperfactions_admin.gui.econ_not_enabled"; + public static final String GUI_INFO_MORE = "hyperfactions_admin.gui.info_more"; + public static final String LOG_TIME_1H = "hyperfactions_admin.gui.log_time_1h"; + public static final String LOG_TIME_24H = "hyperfactions_admin.gui.log_time_24h"; + public static final String LOG_TIME_7D = "hyperfactions_admin.gui.log_time_7d"; + public static final String LOG_TIME_ALL = "hyperfactions_admin.gui.log_time_all"; + public static final String SHAPE_CIRCULAR = "hyperfactions_admin.gui.shape_circular"; + public static final String SHAPE_SQUARE = "hyperfactions_admin.gui.shape_square"; + // Economy + public static final String ECON_NO_DATA = "hyperfactions_admin.economy.no_data"; + public static final String ECON_AMOUNT_ZERO = "hyperfactions_admin.economy.amount_zero"; + public static final String ECON_ENTER_AMOUNT = "hyperfactions_admin.economy.enter_amount"; + public static final String ECON_INVALID_NUMBER = "hyperfactions_admin.economy.invalid_number"; + public static final String ECON_ERROR = "hyperfactions_admin.economy.error"; + public static final String ECON_BALANCE_NEGATIVE = "hyperfactions_admin.economy.balance_negative"; + public static final String ECON_FAILED = "hyperfactions_admin.economy.failed"; + public static final String ECON_BULK_COMPLETE = "hyperfactions_admin.economy.bulk_complete"; + public static final String ECON_BULK_FAILURES = "hyperfactions_admin.economy.bulk_failures"; + // Zones + public static final String ZONE_NOT_FOUND = "hyperfactions_admin.zones.not_found"; + public static final String ZONE_INVALID_ID = "hyperfactions_admin.zones.invalid_id"; + public static final String ZONE_DELETED = "hyperfactions_admin.zones.deleted"; + public static final String ZONE_DELETE_FAILED = "hyperfactions_admin.zones.delete_failed"; + public static final String ZONE_NO_CHUNKS = "hyperfactions_admin.zones.no_chunks"; + public static final String ZONE_CHUNKS_SUFFIX = "hyperfactions_admin.zones.chunks_suffix"; + // Zone create wizard + public static final String WIZ_ENTER_NAME = "hyperfactions_admin.wizard.enter_name"; + public static final String WIZ_NAME_TOO_SHORT = "hyperfactions_admin.wizard.name_too_short"; + public static final String WIZ_NAME_TOO_LONG = "hyperfactions_admin.wizard.name_too_long"; + public static final String WIZ_NAME_TAKEN = "hyperfactions_admin.wizard.name_taken"; + public static final String WIZ_RADIUS_RANGE = "hyperfactions_admin.wizard.radius_range"; + public static final String WIZ_CREATE_FAILED = "hyperfactions_admin.wizard.create_failed"; + public static final String WIZ_CREATED_NOT_FOUND = "hyperfactions_admin.wizard.created_not_found"; + public static final String WIZ_CREATED = "hyperfactions_admin.wizard.created"; + public static final String WIZ_CHUNK_CLAIMED = "hyperfactions_admin.wizard.chunk_claimed"; + public static final String WIZ_CHUNK_FAILED = "hyperfactions_admin.wizard.chunk_failed"; + public static final String WIZ_RADIUS_CLAIMED = "hyperfactions_admin.wizard.radius_claimed"; + public static final String WIZ_RADIUS_NO_CLAIMS = "hyperfactions_admin.wizard.radius_no_claims"; + public static final String WIZ_NO_CLAIMS = "hyperfactions_admin.wizard.no_claims"; + public static final String WIZ_CHUNKS_PREVIEW = "hyperfactions_admin.wizard.chunks_preview"; + // Zone rename + public static final String ZREN_ZONE_GONE = "hyperfactions_admin.zone_rename.zone_gone"; + public static final String ZREN_ENTER_NAME = "hyperfactions_admin.zone_rename.enter_name"; + public static final String ZREN_TOO_SHORT = "hyperfactions_admin.zone_rename.too_short"; + public static final String ZREN_TOO_LONG = "hyperfactions_admin.zone_rename.too_long"; + public static final String ZREN_SAME_NAME = "hyperfactions_admin.zone_rename.same_name"; + public static final String ZREN_RENAMED = "hyperfactions_admin.zone_rename.renamed"; + public static final String ZREN_NAME_TAKEN = "hyperfactions_admin.zone_rename.name_taken"; + public static final String ZREN_INVALID_NAME = "hyperfactions_admin.zone_rename.invalid_name"; + public static final String ZREN_RENAME_FAILED = "hyperfactions_admin.zone_rename.rename_failed"; + // Zone change type + public static final String ZTYPE_ZONE_GONE = "hyperfactions_admin.zone_type.zone_gone"; + public static final String ZTYPE_CHANGED = "hyperfactions_admin.zone_type.changed"; + public static final String ZTYPE_FAILED = "hyperfactions_admin.zone_type.failed"; + public static final String ZTYPE_FLAGS_RESET = "hyperfactions_admin.zone_type.flags_reset"; + public static final String ZTYPE_FLAGS_KEPT = "hyperfactions_admin.zone_type.flags_kept"; + // Zone integration flags + public static final String ZINT_ZONE_NOT_FOUND = "hyperfactions_admin.zone_int.zone_not_found"; + public static final String ZINT_NO_PLUGIN = "hyperfactions_admin.zone_int.no_plugin"; + public static final String ZINT_DEFAULT = "hyperfactions_admin.zone_int.default"; + public static final String ZINT_CUSTOM = "hyperfactions_admin.zone_int.custom"; + + // Integration flags UI labels + public static final String GUI_ZINT_CAT_GRAVESTONES = "hyperfactions_admin.gui.zint_cat_gravestones"; + public static final String GUI_ZINT_GRAVESTONES_DESC = "hyperfactions_admin.gui.zint_gravestones_desc"; + public static final String GUI_ZINT_CAT_WORLD_MAP = "hyperfactions_admin.gui.zint_cat_world_map"; + public static final String GUI_ZINT_WORLD_MAP_DESC = "hyperfactions_admin.gui.zint_world_map_desc"; + public static final String GUI_ZINT_VISIBILITY_LABEL = "hyperfactions_admin.gui.zint_visibility_label"; + public static final String GUI_ZINT_CAT_ESSENTIALS = "hyperfactions_admin.gui.zint_cat_essentials"; + public static final String GUI_ZINT_RESET_DEFAULTS = "hyperfactions_admin.gui.zint_reset_defaults"; + public static final String GUI_ZINT_BACK_TO_FLAGS = "hyperfactions_admin.gui.zint_back_to_flags"; + public static final String GUI_ZINT_MAP_VIS_FACTION = "hyperfactions_admin.gui.zint_map_vis_faction"; + public static final String GUI_ZINT_MAP_VIS_ALLY = "hyperfactions_admin.gui.zint_map_vis_ally"; + public static final String GUI_ZINT_MAP_VIS_ALL = "hyperfactions_admin.gui.zint_map_vis_all"; + + // Activity log + public static final String LOG_ALL_TYPES = "hyperfactions_admin.log.all_types"; + public static final String LOG_NO_LOGS = "hyperfactions_admin.log.no_logs"; + // Version page + public static final String VER_ACTIVE = "hyperfactions_admin.version.active"; + public static final String VER_NOT_FOUND = "hyperfactions_admin.version.not_found"; + public static final String VER_NOT_DETECTED = "hyperfactions_admin.version.not_detected"; + public static final String VER_NOT_INSTALLED = "hyperfactions_admin.version.not_installed"; + public static final String VER_ACTIVE_VERSION = "hyperfactions_admin.version.active_version"; + public static final String VER_ACTIVE_COMPATIBLE = "hyperfactions_admin.version.active_compatible"; + public static final String VER_ACTIVE_CLAIMS_ONLY = "hyperfactions_admin.version.active_claims_only"; + public static final String VER_INSTALLED_NO_PERM = "hyperfactions_admin.version.installed_no_perm"; + public static final String VER_ACTIVE_PROVIDER = "hyperfactions_admin.version.active_provider"; + // Admin main page + public static final String MAIN_RELOAD_HINT = "hyperfactions_admin.main.reload_hint"; + public static final String MAIN_UNCLAIM_HINT = "hyperfactions_admin.main.unclaim_hint"; + + // Zone flags/settings (shared) + public static final String ZFLAGS_INVALID_FLAG = "hyperfactions_admin.zflags.invalid_flag"; + public static final String ZFLAGS_ZONE_NOT_FOUND = "hyperfactions_admin.zflags.zone_not_found"; + public static final String ZFLAGS_CONFLICT = "hyperfactions_admin.zflags.conflict"; + public static final String ZFLAGS_MIXIN = "hyperfactions_admin.zflags.mixin"; + public static final String ZFLAGS_RESET_INT = "hyperfactions_admin.zflags.reset_int"; + public static final String ZFLAGS_RESET_ALL = "hyperfactions_admin.zflags.reset_all"; + public static final String ZFLAGS_RESET_FAILED = "hyperfactions_admin.zflags.reset_failed"; + public static final String ZFLAGS_BACK_TO_SETTINGS = "hyperfactions_admin.zflags.back_to_settings"; + + // Zone settings UI labels + public static final String GUI_ZSET_CAT_COMBAT = "hyperfactions_admin.gui.zset_cat_combat"; + public static final String GUI_ZSET_CAT_DAMAGE = "hyperfactions_admin.gui.zset_cat_damage"; + public static final String GUI_ZSET_CAT_DEATH = "hyperfactions_admin.gui.zset_cat_death"; + public static final String GUI_ZSET_CAT_BUILDING = "hyperfactions_admin.gui.zset_cat_building"; + public static final String GUI_ZSET_CAT_INTERACTION = "hyperfactions_admin.gui.zset_cat_interaction"; + public static final String GUI_ZSET_CAT_TRANSPORT = "hyperfactions_admin.gui.zset_cat_transport"; + public static final String GUI_ZSET_CAT_ITEMS = "hyperfactions_admin.gui.zset_cat_items"; + public static final String GUI_ZSET_CAT_SPAWNING = "hyperfactions_admin.gui.zset_cat_spawning"; + public static final String GUI_ZSET_CAT_MOB_CLEAR = "hyperfactions_admin.gui.zset_cat_mob_clear"; + public static final String GUI_ZSET_CHILDREN_HINT = "hyperfactions_admin.gui.zset_children_hint"; + public static final String GUI_ZSET_RESET_DEFAULTS = "hyperfactions_admin.gui.zset_reset_defaults"; + public static final String GUI_ZSET_INTEGRATION_FLAGS = "hyperfactions_admin.gui.zset_integration_flags"; + public static final String GUI_ZSET_BACK_TO_ZONES = "hyperfactions_admin.gui.zset_back_to_zones"; + public static final String GUI_ZSET_CHUNKS = "hyperfactions_admin.gui.zset_chunks"; + + // Zone properties + public static final String ZPROP_CURRENT_CUSTOM = "hyperfactions_admin.zprop.current_custom"; + public static final String ZPROP_CURRENT_DEFAULT = "hyperfactions_admin.zprop.current_default"; + public static final String ZPROP_PVP_DISABLED = "hyperfactions_admin.zprop.pvp_disabled"; + public static final String ZPROP_PVP_ENABLED = "hyperfactions_admin.zprop.pvp_enabled"; + public static final String ZPROP_NAME_EMPTY = "hyperfactions_admin.zprop.name_empty"; + public static final String ZPROP_RENAMED = "hyperfactions_admin.zprop.renamed"; + public static final String ZPROP_NAME_TAKEN = "hyperfactions_admin.zprop.name_taken"; + public static final String ZPROP_NAME_INVALID = "hyperfactions_admin.zprop.name_invalid"; + public static final String ZPROP_RENAME_FAILED = "hyperfactions_admin.zprop.rename_failed"; + public static final String ZPROP_UPPER_EMPTY = "hyperfactions_admin.zprop.upper_empty"; + public static final String ZPROP_UPPER_SET = "hyperfactions_admin.zprop.upper_set"; + public static final String ZPROP_UPPER_RESET = "hyperfactions_admin.zprop.upper_reset"; + public static final String ZPROP_LOWER_EMPTY = "hyperfactions_admin.zprop.lower_empty"; + public static final String ZPROP_LOWER_SET = "hyperfactions_admin.zprop.lower_set"; + public static final String ZPROP_LOWER_RESET = "hyperfactions_admin.zprop.lower_reset"; + // Relations additional + public static final String REL_FAILED = "hyperfactions_admin.relations.failed"; + // Members additional + public static final String MEM_NEVER = "hyperfactions_admin.members.never"; + public static final String MEM_TELEPORTED = "hyperfactions_admin.members.teleported"; + // Member entry labels + public static final String GUI_MEM_LABEL_POWER = "hyperfactions_admin.gui.mem_label_power"; + public static final String GUI_MEM_LABEL_JOINED = "hyperfactions_admin.gui.mem_label_joined"; + public static final String GUI_MEM_LABEL_LAST_DEATH = "hyperfactions_admin.gui.mem_label_last_death"; + public static final String GUI_MEM_LABEL_UUID = "hyperfactions_admin.gui.mem_label_uuid"; + public static final String GUI_MEM_BTN_INFO = "hyperfactions_admin.gui.mem_btn_info"; + public static final String GUI_MEM_BTN_TELEPORT = "hyperfactions_admin.gui.mem_btn_teleport"; + public static final String GUI_MEM_BTN_PROMOTE = "hyperfactions_admin.gui.mem_btn_promote"; + public static final String GUI_MEM_BTN_DEMOTE = "hyperfactions_admin.gui.mem_btn_demote"; + public static final String GUI_MEM_BTN_KICK = "hyperfactions_admin.gui.mem_btn_kick"; + // Player info additional + public static final String PLR_RECORDS = "hyperfactions_admin.playerinfo.records"; + public static final String PLR_JOINED_DATE = "hyperfactions_admin.playerinfo.joined_date"; + public static final String PLR_CURRENT = "hyperfactions_admin.playerinfo.current"; + public static final String PLR_LEFT_DATE = "hyperfactions_admin.playerinfo.left_date"; + // Zone map + public static final String MAP_WORLD_WARNING = "hyperfactions_admin.map.world_warning"; + public static final String MAP_POSITION = "hyperfactions_admin.map.position"; + public static final String MAP_ZONE_GONE = "hyperfactions_admin.map.zone_gone"; + public static final String MAP_CLAIMED = "hyperfactions_admin.map.claimed"; + public static final String MAP_CLAIM_FAILED = "hyperfactions_admin.map.claim_failed"; + public static final String MAP_UNCLAIMED = "hyperfactions_admin.map.unclaimed"; + public static final String MAP_UNCLAIM_FAILED = "hyperfactions_admin.map.unclaim_failed"; + public static final String MAP_CHUNK_BELONGS = "hyperfactions_admin.map.chunk_belongs"; + public static final String MAP_CHUNK_FACTION = "hyperfactions_admin.map.chunk_faction"; + public static final String MAP_CHUNK_PROTECTED = "hyperfactions_admin.map.chunk_protected"; + public static final String MAP_ANOTHER_ZONE = "hyperfactions_admin.map.another_zone"; + + // ========== GUI Label Keys (for .ui hardcoded text localization) ========== + + // Page Titles + public static final String GUI_TITLE_DASHBOARD = "hyperfactions_admin.gui.title_dashboard"; + public static final String GUI_TITLE_MAIN = "hyperfactions_admin.gui.title_main"; + public static final String GUI_TITLE_ACTIONS = "hyperfactions_admin.gui.title_actions"; + public static final String GUI_TITLE_FACTIONS = "hyperfactions_admin.gui.title_factions"; + public static final String GUI_TITLE_PLAYERS = "hyperfactions_admin.gui.title_players"; + public static final String GUI_TITLE_ECONOMY = "hyperfactions_admin.gui.title_economy"; + public static final String GUI_TITLE_ZONES = "hyperfactions_admin.gui.title_zones"; + public static final String GUI_TITLE_BACKUPS = "hyperfactions_admin.gui.title_backups"; + public static final String GUI_TITLE_CONFIG = "hyperfactions_admin.gui.title_config"; + public static final String GUI_TITLE_HELP = "hyperfactions_admin.gui.title_help"; + public static final String GUI_TITLE_UPDATES = "hyperfactions_admin.gui.title_updates"; + public static final String GUI_TITLE_VERSION = "hyperfactions_admin.gui.title_version"; + public static final String GUI_TITLE_ACTIVITY_LOG = "hyperfactions_admin.gui.title_activity_log"; + public static final String GUI_TITLE_PLAYER_INFO = "hyperfactions_admin.gui.title_player_info"; + public static final String GUI_TITLE_FACTION_INFO = "hyperfactions_admin.gui.title_faction_info"; + public static final String GUI_TITLE_FACTION_SETTINGS = "hyperfactions_admin.gui.title_faction_settings"; + public static final String GUI_TITLE_FACTION_MEMBERS = "hyperfactions_admin.gui.title_faction_members"; + public static final String GUI_TITLE_FACTION_RELATIONS = "hyperfactions_admin.gui.title_faction_relations"; + public static final String GUI_TITLE_ZONE_MAP = "hyperfactions_admin.gui.title_zone_map"; + public static final String GUI_TITLE_ZONE_SETTINGS = "hyperfactions_admin.gui.title_zone_settings"; + public static final String GUI_TITLE_ZONE_PROPERTIES = "hyperfactions_admin.gui.title_zone_properties"; + public static final String GUI_TITLE_BULK_ECONOMY = "hyperfactions_admin.gui.title_bulk_economy"; + public static final String GUI_TITLE_ECONOMY_ADJUST = "hyperfactions_admin.gui.title_economy_adjust"; + + // Dashboard labels + public static final String GUI_DASH_SERVER_STATS = "hyperfactions_admin.gui.dash_server_stats"; + public static final String GUI_DASH_FACTIONS = "hyperfactions_admin.gui.dash_factions"; + public static final String GUI_DASH_TOTAL_MEMBERS = "hyperfactions_admin.gui.dash_total_members"; + public static final String GUI_DASH_TOTAL_CLAIMS = "hyperfactions_admin.gui.dash_total_claims"; + public static final String GUI_DASH_ZONES = "hyperfactions_admin.gui.dash_zones"; + public static final String GUI_DASH_SAFE_WAR = "hyperfactions_admin.gui.dash_safe_war"; + public static final String GUI_DASH_TOTAL_POWER = "hyperfactions_admin.gui.dash_total_power"; + public static final String GUI_DASH_AVG_POWER = "hyperfactions_admin.gui.dash_avg_power"; + public static final String GUI_DASH_TOTAL_ECONOMY = "hyperfactions_admin.gui.dash_total_economy"; + public static final String GUI_DASH_WEALTHIEST = "hyperfactions_admin.gui.dash_wealthiest"; + public static final String GUI_DASH_AVG_BALANCE = "hyperfactions_admin.gui.dash_avg_balance"; + public static final String GUI_DASH_PROTECTION_BYPASS = "hyperfactions_admin.gui.dash_protection_bypass"; + + // Common buttons and labels + public static final String GUI_SEARCH = "hyperfactions_admin.gui.search"; + public static final String GUI_SORT = "hyperfactions_admin.gui.sort"; + public static final String GUI_PREV = "hyperfactions_admin.gui.prev"; + public static final String GUI_NEXT = "hyperfactions_admin.gui.next"; + public static final String GUI_DONE = "hyperfactions_admin.gui.done"; + public static final String GUI_APPLY = "hyperfactions_admin.gui.apply"; + public static final String GUI_SET = "hyperfactions_admin.gui.set"; + public static final String GUI_RESET = "hyperfactions_admin.gui.reset"; + public static final String GUI_COMING_SOON = "hyperfactions_admin.gui.coming_soon"; + public static final String GUI_ZONES_BTN = "hyperfactions_admin.gui.zones_btn"; + public static final String GUI_RELOAD_BTN = "hyperfactions_admin.gui.reload_btn"; + public static final String GUI_ALL = "hyperfactions_admin.gui.all"; + public static final String GUI_SAFE = "hyperfactions_admin.gui.safe"; + public static final String GUI_WAR = "hyperfactions_admin.gui.war"; + public static final String GUI_CREATE_ZONE = "hyperfactions_admin.gui.create_zone"; + + // Actions page labels + public static final String GUI_ACT_COMBAT_STATS = "hyperfactions_admin.gui.act_combat_stats"; + public static final String GUI_ACT_COMBAT_DESC = "hyperfactions_admin.gui.act_combat_desc"; + public static final String GUI_ACT_RESET_KD = "hyperfactions_admin.gui.act_reset_kd"; + public static final String GUI_ACT_ECONOMY = "hyperfactions_admin.gui.act_economy"; + public static final String GUI_ACT_ECONOMY_DESC = "hyperfactions_admin.gui.act_economy_desc"; + public static final String GUI_ACT_BULK_ADJUST = "hyperfactions_admin.gui.act_bulk_adjust"; + public static final String GUI_ACT_UPKEEP_COLLECTION = "hyperfactions_admin.gui.act_upkeep_collection"; + public static final String GUI_ACT_UPKEEP_DESC = "hyperfactions_admin.gui.act_upkeep_desc"; + public static final String GUI_ACT_TRIGGER_UPKEEP = "hyperfactions_admin.gui.act_trigger_upkeep"; + + // Placeholder page labels + public static final String GUI_BACKUP_HEADING = "hyperfactions_admin.gui.backup_heading"; + public static final String GUI_BACKUP_DESC1 = "hyperfactions_admin.gui.backup_desc1"; + public static final String GUI_BACKUP_DESC2 = "hyperfactions_admin.gui.backup_desc2"; + public static final String GUI_CONFIG_HEADING = "hyperfactions_admin.gui.config_heading"; + public static final String GUI_CONFIG_DESC1 = "hyperfactions_admin.gui.config_desc1"; + public static final String GUI_CONFIG_DESC2 = "hyperfactions_admin.gui.config_desc2"; + public static final String GUI_HELP_HEADING = "hyperfactions_admin.gui.help_heading"; + public static final String GUI_HELP_DESC1 = "hyperfactions_admin.gui.help_desc1"; + public static final String GUI_HELP_DESC2 = "hyperfactions_admin.gui.help_desc2"; + public static final String GUI_UPDATES_HEADING = "hyperfactions_admin.gui.updates_heading"; + public static final String GUI_UPDATES_DESC1 = "hyperfactions_admin.gui.updates_desc1"; + public static final String GUI_UPDATES_DESC2 = "hyperfactions_admin.gui.updates_desc2"; + + // Version page labels + public static final String GUI_VER_HYPERFACTIONS = "hyperfactions_admin.gui.ver_hyperfactions"; + public static final String GUI_VER_HYTALE_SERVER = "hyperfactions_admin.gui.ver_hytale_server"; + public static final String GUI_VER_JAVA = "hyperfactions_admin.gui.ver_java"; + public static final String GUI_VER_PERMISSIONS = "hyperfactions_admin.gui.ver_permissions"; + public static final String GUI_VER_PLACEHOLDERS = "hyperfactions_admin.gui.ver_placeholders"; + public static final String GUI_VER_ECONOMY_SECTION = "hyperfactions_admin.gui.ver_economy_section"; + public static final String GUI_VER_PROTECTION = "hyperfactions_admin.gui.ver_protection"; + public static final String GUI_VER_DISABLED = "hyperfactions_admin.gui.ver_disabled"; + + // Column headers (shared across pages) + public static final String GUI_COL_FACTION = "hyperfactions_admin.gui.col_faction"; + public static final String GUI_COL_BALANCE = "hyperfactions_admin.gui.col_balance"; + public static final String GUI_COL_MEMBERS = "hyperfactions_admin.gui.col_members"; + public static final String GUI_COL_ACTIONS = "hyperfactions_admin.gui.col_actions"; + public static final String GUI_COL_TIME = "hyperfactions_admin.gui.col_time"; + public static final String GUI_COL_TYPE = "hyperfactions_admin.gui.col_type"; + public static final String GUI_COL_MESSAGE = "hyperfactions_admin.gui.col_message"; + + // Economy page labels + public static final String GUI_ECON_TOTAL_BALANCE = "hyperfactions_admin.gui.econ_total_balance"; + public static final String GUI_ECON_FACTIONS = "hyperfactions_admin.gui.econ_factions"; + public static final String GUI_ECON_AVG_BALANCE = "hyperfactions_admin.gui.econ_avg_balance"; + public static final String GUI_ECON_IN_GRACE = "hyperfactions_admin.gui.econ_in_grace"; + public static final String GUI_ECON_COLLECTED = "hyperfactions_admin.gui.econ_collected"; + public static final String GUI_ECON_NEXT_COLLECTION = "hyperfactions_admin.gui.econ_next_collection"; + public static final String GUI_ECON_NO_DATA = "hyperfactions_admin.gui.econ_no_data"; + + // Activity log labels + public static final String GUI_LOG_TYPE = "hyperfactions_admin.gui.log_type"; + public static final String GUI_LOG_TIME = "hyperfactions_admin.gui.log_time"; + public static final String GUI_LOG_PLAYER = "hyperfactions_admin.gui.log_player"; + public static final String GUI_LOG_NO_LOGS = "hyperfactions_admin.gui.log_no_logs"; + + // Player info labels + public static final String GUI_PLR_FIRST_JOINED = "hyperfactions_admin.gui.plr_first_joined"; + public static final String GUI_PLR_LAST_ONLINE = "hyperfactions_admin.gui.plr_last_online"; + public static final String GUI_PLR_UUID = "hyperfactions_admin.gui.plr_uuid"; + public static final String GUI_PLR_FACTION = "hyperfactions_admin.gui.plr_faction"; + public static final String GUI_PLR_ROLE = "hyperfactions_admin.gui.plr_role"; + public static final String GUI_PLR_VIEW_FACTION = "hyperfactions_admin.gui.plr_view_faction"; + public static final String GUI_PLR_POWER = "hyperfactions_admin.gui.plr_power"; + public static final String GUI_PLR_MAX_POWER = "hyperfactions_admin.gui.plr_max_power"; + public static final String GUI_PLR_SET_POWER = "hyperfactions_admin.gui.plr_set_power"; + public static final String GUI_PLR_RESET_POWER = "hyperfactions_admin.gui.plr_reset_power"; + public static final String GUI_PLR_SET_MAX = "hyperfactions_admin.gui.plr_set_max"; + public static final String GUI_PLR_RESET_MAX = "hyperfactions_admin.gui.plr_reset_max"; + public static final String GUI_PLR_NO_POWER_LOSS = "hyperfactions_admin.gui.plr_no_power_loss"; + public static final String GUI_PLR_NO_CLAIM_DECAY = "hyperfactions_admin.gui.plr_no_claim_decay"; + public static final String GUI_PLR_KILLS = "hyperfactions_admin.gui.plr_kills"; + public static final String GUI_PLR_DEATHS = "hyperfactions_admin.gui.plr_deaths"; + public static final String GUI_PLR_KDR = "hyperfactions_admin.gui.plr_kdr"; + public static final String GUI_PLR_RESET_KD = "hyperfactions_admin.gui.plr_reset_kd"; + public static final String GUI_PLR_KICK = "hyperfactions_admin.gui.plr_kick"; + public static final String GUI_PLR_MEMBERSHIP_HISTORY = "hyperfactions_admin.gui.plr_membership_history"; + public static final String GUI_PLR_NO_FACTION = "hyperfactions_admin.gui.plr_no_faction_label"; + public static final String GUI_PLR_POWER_MANAGEMENT = "hyperfactions_admin.gui.plr_power_management"; + public static final String GUI_PLR_COMBAT_STATS = "hyperfactions_admin.gui.plr_combat_stats"; + public static final String GUI_PLR_BYPASS_FLAGS = "hyperfactions_admin.gui.plr_bypass_flags"; + public static final String GUI_PLR_ADMIN_CONTROLS = "hyperfactions_admin.gui.plr_admin_controls"; + public static final String GUI_PLR_KD_SUBTITLE = "hyperfactions_admin.gui.plr_kd_subtitle"; + public static final String GUI_PLR_MAX_PREFIX = "hyperfactions_admin.gui.plr_max_prefix"; + public static final String GUI_PLR_VIEW = "hyperfactions_admin.gui.plr_view"; + public static final String GUI_PLR_KICK_FROM_FACTION = "hyperfactions_admin.gui.plr_kick_from_faction"; + public static final String GUI_PLR_SET_MAX_BTN = "hyperfactions_admin.gui.plr_set_max_btn"; + public static final String GUI_PLR_COMBAT = "hyperfactions_admin.gui.plr_combat"; + // Player info history reason labels + public static final String GUI_PLR_REASON_ACTIVE = "hyperfactions_admin.gui.plr_reason_active"; + public static final String GUI_PLR_REASON_LEFT = "hyperfactions_admin.gui.plr_reason_left"; + public static final String GUI_PLR_REASON_KICKED = "hyperfactions_admin.gui.plr_reason_kicked"; + public static final String GUI_PLR_REASON_DISBANDED = "hyperfactions_admin.gui.plr_reason_disbanded"; + + // Faction info labels + public static final String GUI_FAC_DESCRIPTION = "hyperfactions_admin.gui.fac_description"; + public static final String GUI_FAC_POWER = "hyperfactions_admin.gui.fac_power"; + public static final String GUI_FAC_CLAIMS = "hyperfactions_admin.gui.fac_claims"; + public static final String GUI_FAC_MEMBERS = "hyperfactions_admin.gui.fac_members"; + public static final String GUI_FAC_RECRUITMENT = "hyperfactions_admin.gui.fac_recruitment"; + public static final String GUI_FAC_FOUNDED = "hyperfactions_admin.gui.fac_founded"; + public static final String GUI_FAC_ALLIES = "hyperfactions_admin.gui.fac_allies"; + public static final String GUI_FAC_ENEMIES = "hyperfactions_admin.gui.fac_enemies"; + public static final String GUI_FAC_RAIDABLE = "hyperfactions_admin.gui.fac_raidable"; + public static final String GUI_FAC_TREASURY = "hyperfactions_admin.gui.fac_treasury"; + public static final String GUI_FAC_LEADER = "hyperfactions_admin.gui.fac_leader"; + public static final String GUI_FAC_OFFICERS = "hyperfactions_admin.gui.fac_officers"; + public static final String GUI_FAC_VIEW_MEMBERS = "hyperfactions_admin.gui.fac_view_members"; + public static final String GUI_FAC_VIEW_RELATIONS = "hyperfactions_admin.gui.fac_view_relations"; + public static final String GUI_FAC_VIEW_SETTINGS = "hyperfactions_admin.gui.fac_view_settings"; + public static final String GUI_FAC_DISBAND = "hyperfactions_admin.gui.fac_disband"; + public static final String GUI_FAC_POWER_MANAGEMENT = "hyperfactions_admin.gui.fac_power_management"; + public static final String GUI_FAC_RESET_ALL_POWER = "hyperfactions_admin.gui.fac_reset_all_power"; + public static final String GUI_FAC_ECON_ADJUST = "hyperfactions_admin.gui.fac_econ_adjust"; + public static final String GUI_FAC_ECON_VIEW_LOG = "hyperfactions_admin.gui.fac_econ_view_log"; + public static final String GUI_FAC_CURRENT_MAX = "hyperfactions_admin.gui.fac_current_max"; + public static final String GUI_FAC_CLAIMED_MAX = "hyperfactions_admin.gui.fac_claimed_max"; + public static final String GUI_FAC_RELATIONS = "hyperfactions_admin.gui.fac_relations"; + public static final String GUI_FAC_ALLY_ENEMY = "hyperfactions_admin.gui.fac_ally_enemy"; + public static final String GUI_FAC_STATUS = "hyperfactions_admin.gui.fac_status"; + public static final String GUI_FAC_INFO = "hyperfactions_admin.gui.fac_info"; + public static final String GUI_FAC_TREASURY_BALANCE = "hyperfactions_admin.gui.fac_treasury_balance"; + public static final String GUI_FAC_LEADERSHIP = "hyperfactions_admin.gui.fac_leadership"; + public static final String GUI_FAC_LEADER_LABEL = "hyperfactions_admin.gui.fac_leader_label"; + public static final String GUI_FAC_OFFICERS_LABEL = "hyperfactions_admin.gui.fac_officers_label"; + public static final String GUI_FAC_ECON_MGMT = "hyperfactions_admin.gui.fac_econ_mgmt"; + public static final String GUI_FAC_DANGER_ZONE = "hyperfactions_admin.gui.fac_danger_zone"; + public static final String GUI_FAC_VIEW_TREASURY = "hyperfactions_admin.gui.fac_view_treasury"; + + // Faction settings labels + public static final String GUI_SET_EDITING = "hyperfactions_admin.gui.set_editing"; + public static final String GUI_SET_GENERAL = "hyperfactions_admin.gui.set_general"; + public static final String GUI_SET_NAME = "hyperfactions_admin.gui.set_name"; + public static final String GUI_SET_TAG = "hyperfactions_admin.gui.set_tag"; + public static final String GUI_SET_DESCRIPTION = "hyperfactions_admin.gui.set_description"; + public static final String GUI_SET_RECRUITMENT = "hyperfactions_admin.gui.set_recruitment"; + public static final String GUI_SET_HOME = "hyperfactions_admin.gui.set_home"; + public static final String GUI_SET_CLEAR_HOME = "hyperfactions_admin.gui.set_clear_home"; + public static final String GUI_SET_DISBAND_FACTION = "hyperfactions_admin.gui.set_disband_faction"; + public static final String GUI_SET_FACTION_COLOR = "hyperfactions_admin.gui.set_faction_color"; + public static final String GUI_SET_ADMIN_OVERRIDE = "hyperfactions_admin.gui.set_admin_override"; + public static final String GUI_SET_TERRITORY_PERMS = "hyperfactions_admin.gui.set_territory_perms"; + public static final String GUI_SET_MOB_SPAWNING = "hyperfactions_admin.gui.set_mob_spawning"; + public static final String GUI_SET_FACTION_SETTINGS = "hyperfactions_admin.gui.set_faction_settings"; + public static final String GUI_SET_NAME_LABEL = "hyperfactions_admin.gui.set_name_label"; + public static final String GUI_SET_TAG_LABEL = "hyperfactions_admin.gui.set_tag_label"; + public static final String GUI_SET_DESC_LABEL = "hyperfactions_admin.gui.set_desc_label"; + public static final String GUI_SET_EDIT = "hyperfactions_admin.gui.set_edit"; + public static final String GUI_SET_STATUS_LABEL = "hyperfactions_admin.gui.set_status_label"; + public static final String GUI_SET_LOCATION_LABEL = "hyperfactions_admin.gui.set_location_label"; + public static final String GUI_SET_DANGER_ZONE = "hyperfactions_admin.gui.set_danger_zone"; + public static final String GUI_SET_IRREVERSIBLE = "hyperfactions_admin.gui.set_irreversible"; + public static final String GUI_SET_LOCK_HINT = "hyperfactions_admin.gui.set_lock_hint"; + public static final String GUI_SET_APPEARANCE = "hyperfactions_admin.gui.set_appearance"; + public static final String GUI_SET_COLOR_LABEL = "hyperfactions_admin.gui.set_color_label"; + public static final String GUI_SET_MOB_SUB = "hyperfactions_admin.gui.set_mob_sub"; + public static final String GUI_SET_BACK_TO_INFO = "hyperfactions_admin.gui.set_back_to_info"; + public static final String GUI_SET_COL_OUT = "hyperfactions_admin.gui.set_col_out"; + public static final String GUI_SET_COL_ALLY = "hyperfactions_admin.gui.set_col_ally"; + public static final String GUI_SET_COL_MEM = "hyperfactions_admin.gui.set_col_mem"; + public static final String GUI_SET_COL_OFF = "hyperfactions_admin.gui.set_col_off"; + public static final String GUI_SET_CAT_BUILDING = "hyperfactions_admin.gui.set_cat_building"; + public static final String GUI_SET_CAT_INTERACTION = "hyperfactions_admin.gui.set_cat_interaction"; + public static final String GUI_SET_CAT_INTERACT_SUB = "hyperfactions_admin.gui.set_cat_interact_sub"; + public static final String GUI_SET_CAT_OTHER = "hyperfactions_admin.gui.set_cat_other"; + public static final String GUI_SET_PERM_BREAK = "hyperfactions_admin.gui.set_perm_break"; + public static final String GUI_SET_PERM_PLACE = "hyperfactions_admin.gui.set_perm_place"; + public static final String GUI_SET_PERM_ALL = "hyperfactions_admin.gui.set_perm_all"; + public static final String GUI_SET_PERM_DOOR = "hyperfactions_admin.gui.set_perm_door"; + public static final String GUI_SET_PERM_CHEST = "hyperfactions_admin.gui.set_perm_chest"; + public static final String GUI_SET_PERM_BENCH = "hyperfactions_admin.gui.set_perm_bench"; + public static final String GUI_SET_PERM_PROCESSING = "hyperfactions_admin.gui.set_perm_processing"; + public static final String GUI_SET_PERM_SEAT = "hyperfactions_admin.gui.set_perm_seat"; + public static final String GUI_SET_PERM_TRANSPORT = "hyperfactions_admin.gui.set_perm_transport"; + public static final String GUI_SET_PERM_CRATE_USE = "hyperfactions_admin.gui.set_perm_crate_use"; + public static final String GUI_SET_PERM_NPC_TAME = "hyperfactions_admin.gui.set_perm_npc_tame"; + public static final String GUI_SET_PERM_PVE_DAMAGE = "hyperfactions_admin.gui.set_perm_pve_damage"; + public static final String GUI_SET_PERM_MOB_SPAWNING = "hyperfactions_admin.gui.set_perm_mob_spawning"; + public static final String GUI_SET_PERM_HOSTILE = "hyperfactions_admin.gui.set_perm_hostile"; + public static final String GUI_SET_PERM_PASSIVE = "hyperfactions_admin.gui.set_perm_passive"; + public static final String GUI_SET_PERM_NEUTRAL = "hyperfactions_admin.gui.set_perm_neutral"; + public static final String GUI_SET_PERM_PVP = "hyperfactions_admin.gui.set_perm_pvp"; + public static final String GUI_SET_PERM_OFFICERS_EDIT = "hyperfactions_admin.gui.set_perm_officers_edit"; + + // Faction relations labels + public static final String GUI_REL_SUBTITLE = "hyperfactions_admin.gui.rel_subtitle"; + public static final String GUI_REL_SET_NEW = "hyperfactions_admin.gui.rel_set_new"; + public static final String GUI_REL_BTN_ALLY = "hyperfactions_admin.gui.rel_btn_ally"; + public static final String GUI_REL_BTN_NEUTRAL = "hyperfactions_admin.gui.rel_btn_neutral"; + public static final String GUI_REL_BTN_ENEMY = "hyperfactions_admin.gui.rel_btn_enemy"; + + // Zone page labels + public static final String GUI_ZONE_SORT_NAME = "hyperfactions_admin.gui.zone_sort_name"; + public static final String GUI_ZONE_SORT_TYPE = "hyperfactions_admin.gui.zone_sort_type"; + public static final String GUI_ZONE_SORT_CHUNKS = "hyperfactions_admin.gui.zone_sort_chunks"; + public static final String GUI_ZONE_SORT_WORLD = "hyperfactions_admin.gui.zone_sort_world"; + public static final String GUI_ZONE_COUNT_FORMAT = "hyperfactions_admin.gui.zone_count_format"; + + // Zone map labels + public static final String GUI_MAP_ZONE_CHUNK = "hyperfactions_admin.gui.map_zone_chunk"; + public static final String GUI_MAP_EMPTY = "hyperfactions_admin.gui.map_empty"; + public static final String GUI_MAP_OTHER_ZONE = "hyperfactions_admin.gui.map_other_zone"; + public static final String GUI_MAP_FACTION_CLAIM = "hyperfactions_admin.gui.map_faction_claim"; + public static final String GUI_MAP_PROTECTED = "hyperfactions_admin.gui.map_protected"; + public static final String GUI_MAP_YOUR_POS = "hyperfactions_admin.gui.map_your_pos"; + public static final String GUI_MAP_CLICK_HINT = "hyperfactions_admin.gui.map_click_hint"; + public static final String GUI_MAP_LEGEND_ZONE_SAFE = "hyperfactions_admin.gui.map_legend_zone_safe"; + public static final String GUI_MAP_LEGEND_ZONE_WAR = "hyperfactions_admin.gui.map_legend_zone_war"; + public static final String GUI_MAP_LEGEND_OTHER_SAFE = "hyperfactions_admin.gui.map_legend_other_safe"; + public static final String GUI_MAP_LEGEND_OTHER_WAR = "hyperfactions_admin.gui.map_legend_other_war"; + public static final String GUI_MAP_LEGEND_FACTION = "hyperfactions_admin.gui.map_legend_faction"; + public static final String GUI_MAP_LEGEND_UNCLAIMED = "hyperfactions_admin.gui.map_legend_unclaimed"; + public static final String GUI_MAP_LEGEND_YOU_HERE = "hyperfactions_admin.gui.map_legend_you_here"; + public static final String GUI_MAP_ACTION_HINT = "hyperfactions_admin.gui.map_action_hint"; + public static final String GUI_MAP_DONE = "hyperfactions_admin.gui.map_done"; + + // Zone properties labels + public static final String GUI_ZPROP_GENERAL = "hyperfactions_admin.gui.zprop_general"; + public static final String GUI_ZPROP_ZONE_NAME = "hyperfactions_admin.gui.zprop_zone_name"; + public static final String GUI_ZPROP_ZONE_TYPE = "hyperfactions_admin.gui.zprop_zone_type"; + public static final String GUI_ZPROP_CHANGE_TYPE = "hyperfactions_admin.gui.zprop_change_type"; + public static final String GUI_ZPROP_NOTIFICATIONS = "hyperfactions_admin.gui.zprop_notifications"; + public static final String GUI_ZPROP_SHOW_ENTRY = "hyperfactions_admin.gui.zprop_show_entry"; + public static final String GUI_ZPROP_UPPER_TITLE = "hyperfactions_admin.gui.zprop_upper_title"; + public static final String GUI_ZPROP_UPPER_DESC = "hyperfactions_admin.gui.zprop_upper_desc"; + public static final String GUI_ZPROP_LOWER_TITLE = "hyperfactions_admin.gui.zprop_lower_title"; + public static final String GUI_ZPROP_LOWER_DESC = "hyperfactions_admin.gui.zprop_lower_desc"; + public static final String GUI_ZPROP_EDIT_FLAGS = "hyperfactions_admin.gui.zprop_edit_flags"; + public static final String GUI_ZPROP_BACK_TO_ZONES = "hyperfactions_admin.gui.zprop_back_to_zones"; + + // Bulk economy labels + public static final String GUI_BULK_HEADER = "hyperfactions_admin.gui.bulk_header"; + public static final String GUI_BULK_FACTIONS_LABEL = "hyperfactions_admin.gui.bulk_factions_label"; + public static final String GUI_BULK_TOTAL_LABEL = "hyperfactions_admin.gui.bulk_total_label"; + public static final String GUI_BULK_AMOUNT_HINT = "hyperfactions_admin.gui.bulk_amount_hint"; + public static final String GUI_BULK_HINT = "hyperfactions_admin.gui.bulk_hint"; + public static final String GUI_BULK_WARNING_MSG = "hyperfactions_admin.gui.bulk_warning_msg"; + public static final String GUI_BULK_APPLY_ALL = "hyperfactions_admin.gui.bulk_apply_all"; + public static final String GUI_BULK_OPERATION = "hyperfactions_admin.gui.bulk_operation"; + public static final String GUI_BULK_ADD = "hyperfactions_admin.gui.bulk_add"; + public static final String GUI_BULK_REMOVE = "hyperfactions_admin.gui.bulk_remove"; + public static final String GUI_BULK_AMOUNT = "hyperfactions_admin.gui.bulk_amount"; + public static final String GUI_BULK_WARNING = "hyperfactions_admin.gui.bulk_warning"; + public static final String GUI_BULK_PREVIEW = "hyperfactions_admin.gui.bulk_preview"; + + // Economy adjust labels + public static final String GUI_ECADJ_HEADER = "hyperfactions_admin.gui.ecadj_header"; + public static final String GUI_ECADJ_FACTION_LABEL = "hyperfactions_admin.gui.ecadj_faction_label"; + public static final String GUI_ECADJ_CURRENT_BALANCE = "hyperfactions_admin.gui.ecadj_current_balance"; + public static final String GUI_ECADJ_AMOUNT_HINT = "hyperfactions_admin.gui.ecadj_amount_hint"; + public static final String GUI_ECADJ_PREVIEW_HINT = "hyperfactions_admin.gui.ecadj_preview_hint"; + public static final String GUI_ECADJ_ADJUSTMENT = "hyperfactions_admin.gui.ecadj_adjustment"; + public static final String GUI_ECADJ_SET_BALANCE = "hyperfactions_admin.gui.ecadj_set_balance"; + public static final String GUI_ECADJ_CONFIRM = "hyperfactions_admin.gui.ecadj_confirm"; + public static final String GUI_ECADJ_OPERATION = "hyperfactions_admin.gui.ecadj_operation"; + public static final String GUI_ECADJ_ADD = "hyperfactions_admin.gui.ecadj_add"; + public static final String GUI_ECADJ_REMOVE = "hyperfactions_admin.gui.ecadj_remove"; + public static final String GUI_ECADJ_SET_TO = "hyperfactions_admin.gui.ecadj_set_to"; + public static final String GUI_ECADJ_AMOUNT = "hyperfactions_admin.gui.ecadj_amount"; + public static final String GUI_ECADJ_NEW_BALANCE = "hyperfactions_admin.gui.ecadj_new_balance"; + + // Version page integration labels + public static final String GUI_VER_HYPERPERMS = "hyperfactions_admin.gui.ver_hyperperms"; + public static final String GUI_VER_LUCKPERMS = "hyperfactions_admin.gui.ver_luckperms"; + public static final String GUI_VER_VAULT = "hyperfactions_admin.gui.ver_vault"; + public static final String GUI_VER_NATIVE = "hyperfactions_admin.gui.ver_native"; + public static final String GUI_VER_HYPERPROTECT = "hyperfactions_admin.gui.ver_hyperprotect"; + public static final String GUI_VER_ORBISGUARD_MIXINS = "hyperfactions_admin.gui.ver_orbisguard_mixins"; + public static final String GUI_VER_ORBISGUARD_API = "hyperfactions_admin.gui.ver_orbisguard_api"; + public static final String GUI_VER_MIXIN_HOOKS = "hyperfactions_admin.gui.ver_mixin_hooks"; + public static final String GUI_VER_GRAVESTONES = "hyperfactions_admin.gui.ver_gravestones"; + public static final String GUI_VER_KYUUBISOFT = "hyperfactions_admin.gui.ver_kyuubisoft"; + public static final String GUI_VER_PLACEHOLDER_API = "hyperfactions_admin.gui.ver_placeholder_api"; + public static final String GUI_VER_WIFLOW_PAPI = "hyperfactions_admin.gui.ver_wiflow_papi"; + public static final String GUI_VER_TREASURY = "hyperfactions_admin.gui.ver_treasury"; + + // Unclaim all confirm modal labels + public static final String GUI_UNCLAIM_TITLE = "hyperfactions_admin.gui.unclaim_title"; + public static final String GUI_UNCLAIM_CONFIRM_MSG1 = "hyperfactions_admin.gui.unclaim_confirm_msg1"; + public static final String GUI_UNCLAIM_CONFIRM_MSG2 = "hyperfactions_admin.gui.unclaim_confirm_msg2"; + public static final String GUI_UNCLAIM_WARNING = "hyperfactions_admin.gui.unclaim_warning"; + public static final String GUI_UNCLAIM_ALL = "hyperfactions_admin.gui.unclaim_all"; + + // Zone rename modal labels + public static final String GUI_ZREN_TITLE = "hyperfactions_admin.gui.zren_title"; + public static final String GUI_ZREN_CURRENT = "hyperfactions_admin.gui.zren_current"; + public static final String GUI_ZREN_NEW_NAME = "hyperfactions_admin.gui.zren_new_name"; + + // Zone change type modal labels + public static final String GUI_ZTYPE_TITLE = "hyperfactions_admin.gui.ztype_title"; + public static final String GUI_ZTYPE_ZONE_LABEL = "hyperfactions_admin.gui.ztype_zone_label"; + public static final String GUI_ZTYPE_CURRENT = "hyperfactions_admin.gui.ztype_current"; + public static final String GUI_ZTYPE_WILL_BECOME = "hyperfactions_admin.gui.ztype_will_become"; + public static final String GUI_ZTYPE_NEW = "hyperfactions_admin.gui.ztype_new"; + public static final String GUI_ZTYPE_WARNING1 = "hyperfactions_admin.gui.ztype_warning1"; + public static final String GUI_ZTYPE_WARNING2 = "hyperfactions_admin.gui.ztype_warning2"; + public static final String GUI_ZTYPE_KEEP_DESC = "hyperfactions_admin.gui.ztype_keep_desc"; + public static final String GUI_ZTYPE_KEEP_FLAGS = "hyperfactions_admin.gui.ztype_keep_flags"; + public static final String GUI_ZTYPE_RESET_DESC = "hyperfactions_admin.gui.ztype_reset_desc"; + public static final String GUI_ZTYPE_RESET_FLAGS = "hyperfactions_admin.gui.ztype_reset_flags"; + + // Create zone wizard labels + public static final String GUI_CZW_TITLE = "hyperfactions_admin.gui.czw_title"; + public static final String GUI_CZW_BACK = "hyperfactions_admin.gui.czw_back"; + public static final String GUI_CZW_CREATE = "hyperfactions_admin.gui.czw_create"; + public static final String GUI_CZW_ZONE_TYPE = "hyperfactions_admin.gui.czw_zone_type"; + public static final String GUI_CZW_SAFE_DESC = "hyperfactions_admin.gui.czw_safe_desc"; + public static final String GUI_CZW_WAR_DESC = "hyperfactions_admin.gui.czw_war_desc"; + public static final String GUI_CZW_ZONE_NAME = "hyperfactions_admin.gui.czw_zone_name"; + public static final String GUI_CZW_NAME_DESC = "hyperfactions_admin.gui.czw_name_desc"; + public static final String GUI_CZW_CLAIM_METHOD = "hyperfactions_admin.gui.czw_claim_method"; + public static final String GUI_CZW_METHOD_NONE_DESC = "hyperfactions_admin.gui.czw_method_none_desc"; + public static final String GUI_CZW_METHOD_NONE = "hyperfactions_admin.gui.czw_method_none"; + public static final String GUI_CZW_METHOD_SINGLE_DESC = "hyperfactions_admin.gui.czw_method_single_desc"; + public static final String GUI_CZW_METHOD_SINGLE = "hyperfactions_admin.gui.czw_method_single"; + public static final String GUI_CZW_METHOD_CIRCLE_DESC = "hyperfactions_admin.gui.czw_method_circle_desc"; + public static final String GUI_CZW_METHOD_CIRCLE = "hyperfactions_admin.gui.czw_method_circle"; + public static final String GUI_CZW_METHOD_SQUARE_DESC = "hyperfactions_admin.gui.czw_method_square_desc"; + public static final String GUI_CZW_METHOD_SQUARE = "hyperfactions_admin.gui.czw_method_square"; + public static final String GUI_CZW_METHOD_MAP_DESC = "hyperfactions_admin.gui.czw_method_map_desc"; + public static final String GUI_CZW_METHOD_MAP = "hyperfactions_admin.gui.czw_method_map"; + public static final String GUI_CZW_RADIUS = "hyperfactions_admin.gui.czw_radius"; + public static final String GUI_CZW_CUSTOM_RADIUS = "hyperfactions_admin.gui.czw_custom_radius"; + public static final String GUI_CZW_FLAGS = "hyperfactions_admin.gui.czw_flags"; + public static final String GUI_CZW_FLAGS_DEFAULTS_DESC = "hyperfactions_admin.gui.czw_flags_defaults_desc"; + public static final String GUI_CZW_FLAGS_DEFAULTS = "hyperfactions_admin.gui.czw_flags_defaults"; + public static final String GUI_CZW_FLAGS_CUSTOMIZE_DESC = "hyperfactions_admin.gui.czw_flags_customize_desc"; + public static final String GUI_CZW_FLAGS_CUSTOMIZE = "hyperfactions_admin.gui.czw_flags_customize"; + + // Faction entry labels + public static final String GUI_FAC_ENTRY_POWER = "hyperfactions_admin.gui.fac_entry_power"; + public static final String GUI_FAC_ENTRY_CLAIMS = "hyperfactions_admin.gui.fac_entry_claims"; + public static final String GUI_FAC_ENTRY_MEMBERS = "hyperfactions_admin.gui.fac_entry_members"; + public static final String GUI_FAC_ENTRY_CREATED = "hyperfactions_admin.gui.fac_entry_created"; + public static final String GUI_FAC_ENTRY_HOME = "hyperfactions_admin.gui.fac_entry_home"; + public static final String GUI_FAC_ENTRY_TP_HOME = "hyperfactions_admin.gui.fac_entry_tp_home"; + public static final String GUI_FAC_ENTRY_VIEW_INFO = "hyperfactions_admin.gui.fac_entry_view_info"; + public static final String GUI_FAC_ENTRY_MEMBERS_BTN = "hyperfactions_admin.gui.fac_entry_members_btn"; + public static final String GUI_FAC_ENTRY_SETTINGS = "hyperfactions_admin.gui.fac_entry_settings"; + public static final String GUI_FAC_ENTRY_UNCLAIM_ALL = "hyperfactions_admin.gui.fac_entry_unclaim_all"; + public static final String GUI_FAC_ENTRY_DISBAND = "hyperfactions_admin.gui.fac_entry_disband"; + // Player entry labels + public static final String GUI_PLR_ENTRY_ROLE = "hyperfactions_admin.gui.plr_entry_role"; + public static final String GUI_PLR_ENTRY_JOINED = "hyperfactions_admin.gui.plr_entry_joined"; + public static final String GUI_PLR_ENTRY_LAST_ONLINE = "hyperfactions_admin.gui.plr_entry_last_online"; + public static final String GUI_PLR_ENTRY_KDR = "hyperfactions_admin.gui.plr_entry_kdr"; + public static final String GUI_PLR_ENTRY_POWER = "hyperfactions_admin.gui.plr_entry_power"; + public static final String GUI_PLR_ENTRY_UUID = "hyperfactions_admin.gui.plr_entry_uuid"; + public static final String GUI_PLR_ENTRY_INFO = "hyperfactions_admin.gui.plr_entry_info"; + public static final String GUI_PLR_ENTRY_TELEPORT = "hyperfactions_admin.gui.plr_entry_teleport"; + public static final String GUI_PLR_ENTRY_NA = "hyperfactions_admin.gui.plr_entry_na"; + public static final String GUI_PLR_ENTRY_UNKNOWN = "hyperfactions_admin.gui.plr_entry_unknown"; + public static final String GUI_PLR_ENTRY_AGO = "hyperfactions_admin.gui.plr_entry_ago"; + // Zone entry labels + public static final String GUI_ZONE_ENTRY_WORLD = "hyperfactions_admin.gui.zone_entry_world"; + public static final String GUI_ZONE_ENTRY_CHUNKS = "hyperfactions_admin.gui.zone_entry_chunks"; + public static final String GUI_ZONE_ENTRY_BOUNDS = "hyperfactions_admin.gui.zone_entry_bounds"; + public static final String GUI_ZONE_ENTRY_CREATED = "hyperfactions_admin.gui.zone_entry_created"; + public static final String GUI_ZONE_ENTRY_EDIT_MAP = "hyperfactions_admin.gui.zone_entry_edit_map"; + public static final String GUI_ZONE_ENTRY_FLAGS = "hyperfactions_admin.gui.zone_entry_flags"; + public static final String GUI_ZONE_ENTRY_SETTINGS = "hyperfactions_admin.gui.zone_entry_settings"; + public static final String GUI_ZONE_ENTRY_DELETE = "hyperfactions_admin.gui.zone_entry_delete"; + + private AdminGui() {} + } +} diff --git a/src/main/java/com/hyperfactions/util/AdminKeys.java b/src/main/java/com/hyperfactions/util/AdminKeys.java new file mode 100644 index 00000000..89d72903 --- /dev/null +++ b/src/main/java/com/hyperfactions/util/AdminKeys.java @@ -0,0 +1,300 @@ +package com.hyperfactions.util; + +/** + * Static constants for admin command and navigation message keys. + * + *

+ * Split from the original MessageKeys for maintainability. Contains: + *

    + *
  • {@link Admin} — {@code /f admin} command messages
  • + *
  • {@link AdminCmd} — admin CLI handler messages (non-GUI admin feedback)
  • + *
  • {@link AdminNav} — admin navigation bar labels
  • + *
+ */ +public final class AdminKeys { + + private AdminKeys() {} + + // ===================================================================== + // Admin — /f admin command messages + // ===================================================================== + + /** /f admin command messages. */ + public static final class Admin { + public static final String RELOAD_SUCCESS = "hyperfactions.cmd.admin.reload_success"; + public static final String SYNC_SUCCESS = "hyperfactions.cmd.admin.sync_success"; + public static final String BYPASS_ON = "hyperfactions.cmd.admin.bypass_on"; + public static final String BYPASS_OFF = "hyperfactions.cmd.admin.bypass_off"; + public static final String NOT_ADMIN = "hyperfactions.cmd.admin.not_admin"; + + private Admin() {} + } + + // ===================================================================== + // AdminCmd — admin CLI handler messages (non-GUI admin feedback) + // ===================================================================== + + /** Admin CLI handler messages (feedback from admin commands in chat). */ + public static final class AdminCmd { + // Common admin errors + public static final String NO_PERMISSION = "hyperfactions.admincmd.no_permission"; + public static final String PLAYER_ONLY = "hyperfactions.admincmd.player_only"; + public static final String PLAYER_CONTEXT = "hyperfactions.admincmd.player_context"; + public static final String ENTITY_NOT_FOUND = "hyperfactions.admincmd.entity_not_found"; + public static final String UNKNOWN_COMMAND = "hyperfactions.admincmd.unknown_command"; + public static final String FACTION_NOT_FOUND = "hyperfactions.admincmd.faction_not_found"; + public static final String PLAYER_NOT_FOUND = "hyperfactions.admincmd.player_not_found"; + public static final String INVALID_NUMBER = "hyperfactions.admincmd.invalid_number"; + public static final String AMOUNT_POSITIVE = "hyperfactions.admincmd.amount_positive"; + public static final String BALANCE_NOT_NEGATIVE = "hyperfactions.admincmd.balance_not_negative"; + public static final String ERROR_GENERIC = "hyperfactions.admincmd.error_generic"; + + // Reload / Sync + public static final String CONFIG_RELOADED = "hyperfactions.admincmd.reload.success"; + public static final String SYNC_START = "hyperfactions.admincmd.sync.start"; + public static final String SYNC_COMPLETE = "hyperfactions.admincmd.sync.complete"; + public static final String SYNC_FAILED = "hyperfactions.admincmd.sync.failed"; + + // Version + public static final String VERSION_TITLE = "hyperfactions.admincmd.version.title"; + public static final String VERSION_SERVER = "hyperfactions.admincmd.version.server"; + public static final String VERSION_JAVA = "hyperfactions.admincmd.version.java"; + public static final String VERSION_TREASURY = "hyperfactions.admincmd.version.treasury"; + public static final String VERSION_ACTIVE = "hyperfactions.admincmd.version.active"; + public static final String VERSION_NOT_FOUND = "hyperfactions.admincmd.version.not_found"; + + // Sentry + public static final String SENTRY_HEADER = "hyperfactions.admincmd.sentry.header"; + public static final String SENTRY_CONFIG = "hyperfactions.admincmd.sentry.config"; + public static final String SENTRY_STATUS = "hyperfactions.admincmd.sentry.status"; + public static final String SENTRY_ALREADY_DISABLED = "hyperfactions.admincmd.sentry.already_disabled"; + public static final String SENTRY_ALREADY_ENABLED = "hyperfactions.admincmd.sentry.already_enabled"; + public static final String SENTRY_DISABLED = "hyperfactions.admincmd.sentry.disabled"; + public static final String SENTRY_ENABLED = "hyperfactions.admincmd.sentry.enabled"; + public static final String SENTRY_USAGE = "hyperfactions.admincmd.sentry.usage"; + public static final String SENTRY_NOT_INITIALIZED = "hyperfactions.admincmd.sentry.not_initialized"; + public static final String SENTRY_TEST_SENT = "hyperfactions.admincmd.sentry.test_sent"; + public static final String SENTRY_TEST_FAILED = "hyperfactions.admincmd.sentry.test_failed"; + + // Backup + public static final String BACKUP_NO_PERMISSION = "hyperfactions.admincmd.backup.no_permission"; + public static final String BACKUP_CREATING = "hyperfactions.admincmd.backup.creating"; + public static final String BACKUP_CREATED = "hyperfactions.admincmd.backup.created"; + public static final String BACKUP_NAME = "hyperfactions.admincmd.backup.name"; + public static final String BACKUP_SIZE = "hyperfactions.admincmd.backup.size"; + public static final String BACKUP_FAILED = "hyperfactions.admincmd.backup.failed"; + public static final String BACKUP_NONE = "hyperfactions.admincmd.backup.none"; + public static final String BACKUP_HEADER = "hyperfactions.admincmd.backup.header"; + public static final String BACKUP_NOT_FOUND = "hyperfactions.admincmd.backup.not_found"; + public static final String BACKUP_UNKNOWN_CMD = "hyperfactions.admincmd.backup.unknown_command"; + public static final String BACKUP_USAGE_RESTORE = "hyperfactions.admincmd.backup.usage_restore"; + public static final String BACKUP_USAGE_DELETE = "hyperfactions.admincmd.backup.usage_delete"; + public static final String BACKUP_RESTORE_WARNING = "hyperfactions.admincmd.backup.restore_warning"; + public static final String BACKUP_RESTORE_CONFIRM = "hyperfactions.admincmd.backup.restore_confirm"; + public static final String BACKUP_RESTORING = "hyperfactions.admincmd.backup.restoring"; + public static final String BACKUP_RESTORED = "hyperfactions.admincmd.backup.restored"; + public static final String BACKUP_RESTORE_FAILED = "hyperfactions.admincmd.backup.restore_failed"; + public static final String BACKUP_CONFIRM_CANCEL = "hyperfactions.admincmd.backup.confirm_cancelled"; + public static final String BACKUP_DELETED = "hyperfactions.admincmd.backup.deleted"; + public static final String BACKUP_DELETE_FAILED = "hyperfactions.admincmd.backup.delete_failed"; + + // Debug + public static final String DEBUG_NO_PERMISSION = "hyperfactions.admincmd.debug.no_permission"; + public static final String DEBUG_UNKNOWN_CMD = "hyperfactions.admincmd.debug.unknown_command"; + public static final String DEBUG_PLAYER_ONLY = "hyperfactions.admincmd.debug.player_only"; + public static final String DEBUG_TOGGLE_SET = "hyperfactions.admincmd.debug.toggle_set"; + public static final String DEBUG_ALL_ENABLED = "hyperfactions.admincmd.debug.all_enabled"; + public static final String DEBUG_ALL_DISABLED = "hyperfactions.admincmd.debug.all_disabled"; + public static final String DEBUG_UNKNOWN_CATEGORY = "hyperfactions.admincmd.debug.unknown_category"; + public static final String DEBUG_NOT_IMPLEMENTED = "hyperfactions.admincmd.debug.not_implemented"; + + // Economy + public static final String ECON_UNKNOWN_CMD = "hyperfactions.admincmd.econ.unknown_command"; + public static final String ECON_SET = "hyperfactions.admincmd.econ.set"; + public static final String ECON_ADDED = "hyperfactions.admincmd.econ.added"; + public static final String ECON_DEDUCTED = "hyperfactions.admincmd.econ.deducted"; + public static final String ECON_RESET = "hyperfactions.admincmd.econ.reset"; + public static final String ECON_FAILED = "hyperfactions.admincmd.econ.failed"; + public static final String ECON_TOTAL_HEADER = "hyperfactions.admincmd.econ.total_header"; + public static final String ECON_UPKEEP_DISABLED = "hyperfactions.admincmd.econ.upkeep_disabled"; + public static final String ECON_UPKEEP_TRIGGER = "hyperfactions.admincmd.econ.upkeep_trigger"; + public static final String ECON_UPKEEP_COMPLETE = "hyperfactions.admincmd.econ.upkeep_complete"; + public static final String ECON_UPKEEP_FAILED = "hyperfactions.admincmd.econ.upkeep_failed"; + + // Power + public static final String POWER_NO_PERMISSION = "hyperfactions.admincmd.power.no_permission"; + public static final String POWER_UNKNOWN_CMD = "hyperfactions.admincmd.power.unknown_command"; + public static final String POWER_MAX_POSITIVE = "hyperfactions.admincmd.power.max_positive"; + public static final String POWER_FACTION_UNKNOWN_ACTION = "hyperfactions.admincmd.power.faction_unknown_action"; + + // Clear history + public static final String HISTORY_NO_DATA = "hyperfactions.admincmd.history.no_data"; + public static final String HISTORY_EMPTY = "hyperfactions.admincmd.history.empty"; + public static final String HISTORY_CLEARED = "hyperfactions.admincmd.history.cleared"; + public static final String HISTORY_CLEARED_REINIT = "hyperfactions.admincmd.history.cleared_reinit"; + + // Zone + public static final String ZONE_CREATED = "hyperfactions.admincmd.zone.created"; + public static final String ZONE_CHUNK_CLAIMED = "hyperfactions.admincmd.zone.chunk_claimed"; + public static final String ZONE_ALREADY_EXISTS = "hyperfactions.admincmd.zone.already_exists"; + public static final String ZONE_NAME_TAKEN = "hyperfactions.admincmd.zone.name_taken"; + public static final String ZONE_NOT_FOUND = "hyperfactions.admincmd.zone.not_found"; + public static final String ZONE_UNCLAIMED = "hyperfactions.admincmd.zone.unclaimed"; + public static final String ZONE_NO_CHUNK = "hyperfactions.admincmd.zone.no_chunk"; + public static final String ZONE_NONE = "hyperfactions.admincmd.zone.none"; + public static final String ZONE_DELETED = "hyperfactions.admincmd.zone.deleted"; + public static final String ZONE_RENAMED = "hyperfactions.admincmd.zone.renamed"; + public static final String ZONE_INVALID_TYPE = "hyperfactions.admincmd.zone.invalid_type"; + public static final String ZONE_INVALID_NAME = "hyperfactions.admincmd.zone.invalid_name"; + public static final String ZONE_CLAIMED_RADIUS = "hyperfactions.admincmd.zone.claimed_radius"; + public static final String ZONE_NO_CHUNKS_CLAIMED = "hyperfactions.admincmd.zone.no_chunks_claimed"; + public static final String ZONE_UNKNOWN_CMD = "hyperfactions.admincmd.zone.unknown_command"; + public static final String ZONE_CHUNK_HAS_ZONE = "hyperfactions.admincmd.zone.chunk_has_zone"; + public static final String ZONE_CHUNK_HAS_FACTION = "hyperfactions.admincmd.zone.chunk_has_faction"; + public static final String ZONE_NOTIFY_SET = "hyperfactions.admincmd.zone.notify_set"; + public static final String ZONE_TITLE_SET = "hyperfactions.admincmd.zone.title_set"; + public static final String ZONE_TITLE_CLEARED = "hyperfactions.admincmd.zone.title_cleared"; + public static final String ZONE_NO_ZONE_AT = "hyperfactions.admincmd.zone.no_zone_at"; + public static final String ZONE_FLAG_CLEARED = "hyperfactions.admincmd.zone.flag_cleared"; + public static final String ZONE_FLAG_SET = "hyperfactions.admincmd.zone.flag_set"; + public static final String ZONE_FLAG_INVALID = "hyperfactions.admincmd.zone.flag_invalid"; + public static final String ZONE_FLAGS_CLEARED = "hyperfactions.admincmd.zone.flags_cleared"; + public static final String ZONE_FAILED = "hyperfactions.admincmd.zone.failed"; + public static final String ZONE_FAILED_DELETE = "hyperfactions.admincmd.zone.failed_delete"; + public static final String ZONE_FAILED_RENAME = "hyperfactions.admincmd.zone.failed_rename"; + public static final String ZONE_FAILED_FLAGS = "hyperfactions.admincmd.zone.failed_flags"; + public static final String ZONE_FAILED_FLAG = "hyperfactions.admincmd.zone.failed_flag"; + public static final String ZONE_LIST_HEADER = "hyperfactions.admincmd.zone.list_header"; + public static final String ZONE_INFO_HEADER = "hyperfactions.admincmd.zone.info_header"; + public static final String ZONE_INFO_NOTIFY = "hyperfactions.admincmd.zone.info_notify"; + public static final String ZONE_INFO_UPPER_TITLE = "hyperfactions.admincmd.zone.info_upper_title"; + public static final String ZONE_INFO_LOWER_TITLE = "hyperfactions.admincmd.zone.info_lower_title"; + public static final String ZONE_INFO_CUSTOM_FLAGS = "hyperfactions.admincmd.zone.info_custom_flags"; + public static final String ZONE_FLAGS_HEADER = "hyperfactions.admincmd.zone.flags_header"; + public static final String ZONE_FLAGS_TYPE = "hyperfactions.admincmd.zone.flags_type"; + public static final String ZONE_PLAYER_ONLY = "hyperfactions.admincmd.zone.player_only"; + + // World + public static final String WORLD_UNKNOWN_CMD = "hyperfactions.admincmd.world.unknown_command"; + public static final String WORLD_NO_SETTINGS = "hyperfactions.admincmd.world.no_settings"; + public static final String WORLD_UNKNOWN_SETTING = "hyperfactions.admincmd.world.unknown_setting"; + public static final String WORLD_SET = "hyperfactions.admincmd.world.set"; + public static final String WORLD_RESET = "hyperfactions.admincmd.world.reset"; + public static final String WORLD_NOT_FOUND = "hyperfactions.admincmd.world.not_found"; + + // Map / Decay + public static final String MAP_NOT_AVAILABLE = "hyperfactions.admincmd.map.not_available"; + public static final String MAP_REFRESHING = "hyperfactions.admincmd.map.refreshing"; + public static final String MAP_REFRESHED = "hyperfactions.admincmd.map.refreshed"; + public static final String MAP_UNKNOWN_CMD = "hyperfactions.admincmd.map.unknown_command"; + public static final String DECAY_DISABLED = "hyperfactions.admincmd.decay.disabled"; + public static final String DECAY_RUNNING = "hyperfactions.admincmd.decay.running"; + public static final String DECAY_COMPLETE = "hyperfactions.admincmd.decay.complete"; + public static final String DECAY_UNKNOWN_CMD = "hyperfactions.admincmd.decay.unknown_command"; + public static final String DECAY_STATUS_HEADER = "hyperfactions.admincmd.decay.status_header"; + public static final String DECAY_ENABLE_HINT = "hyperfactions.admincmd.decay.enable_hint"; + public static final String DECAY_ERROR = "hyperfactions.admincmd.decay.error"; + public static final String DECAY_CHECK_HEADER = "hyperfactions.admincmd.decay.check_header"; + public static final String DECAY_CHECK_NOT_FOUND = "hyperfactions.admincmd.decay.check_not_found"; + public static final String DECAY_NO_CLAIMS = "hyperfactions.admincmd.decay.no_claims"; + public static final String DECAY_DISABLED_GLOBALLY = "hyperfactions.admincmd.decay.disabled_globally"; + + // Map display + public static final String MAP_STATUS_HEADER = "hyperfactions.admincmd.map.status_header"; + + // Debug display + public static final String DEBUG_STATUS_HEADER = "hyperfactions.admincmd.debug.status_header"; + public static final String DEBUG_FULL_STATUS_HEADER = "hyperfactions.admincmd.debug.full_status_header"; + + // Update + public static final String UPDATE_NOT_AVAILABLE = "hyperfactions.admincmd.update.not_available"; + public static final String UPDATE_CHECKING = "hyperfactions.admincmd.update.checking"; + public static final String UPDATE_UP_TO_DATE = "hyperfactions.admincmd.update.up_to_date"; + public static final String UPDATE_AVAILABLE = "hyperfactions.admincmd.update.available"; + public static final String UPDATE_UNKNOWN_TARGET = "hyperfactions.admincmd.update.unknown_target"; + public static final String UPDATE_NO_INFO = "hyperfactions.admincmd.update.no_info"; + public static final String UPDATE_CREATING_BACKUP = "hyperfactions.admincmd.update.creating_backup"; + public static final String UPDATE_BACKUP_CREATED = "hyperfactions.admincmd.update.backup_created"; + public static final String UPDATE_BACKUP_WARNING = "hyperfactions.admincmd.update.backup_warning"; + public static final String UPDATE_BACKUP_CONTINUE = "hyperfactions.admincmd.update.backup_continue"; + public static final String UPDATE_DOWNLOADING = "hyperfactions.admincmd.update.downloading"; + public static final String UPDATE_DOWNLOAD_FAILED = "hyperfactions.admincmd.update.download_failed"; + public static final String UPDATE_DOWNLOADED = "hyperfactions.admincmd.update.downloaded"; + public static final String UPDATE_FILE_LABEL = "hyperfactions.admincmd.update.file_label"; + public static final String UPDATE_CLEANUP = "hyperfactions.admincmd.update.cleanup"; + public static final String UPDATE_KEPT_BACKUP = "hyperfactions.admincmd.update.kept_backup"; + public static final String UPDATE_RESTART = "hyperfactions.admincmd.update.restart"; + public static final String UPDATE_USE_ROLLBACK = "hyperfactions.admincmd.update.use_rollback"; + public static final String UPDATE_USAGE_HF = "hyperfactions.admincmd.update.usage_hf"; + public static final String UPDATE_USAGE_MIXIN = "hyperfactions.admincmd.update.usage_mixin"; + public static final String UPDATE_USAGE_TOGGLE = "hyperfactions.admincmd.update.usage_toggle"; + + // Mixin update + public static final String UPDATE_MIXIN_CURRENT = "hyperfactions.admincmd.update.mixin_current"; + public static final String UPDATE_MIXIN_UP_TO_DATE = "hyperfactions.admincmd.update.mixin_up_to_date"; + public static final String UPDATE_MIXIN_NONE = "hyperfactions.admincmd.update.mixin_none"; + public static final String UPDATE_MIXIN_AVAILABLE = "hyperfactions.admincmd.update.mixin_available"; + public static final String UPDATE_MIXIN_DOWNLOADING = "hyperfactions.admincmd.update.mixin_downloading"; + public static final String UPDATE_MIXIN_DOWNLOADED = "hyperfactions.admincmd.update.mixin_downloaded"; + public static final String UPDATE_MIXIN_FAILED = "hyperfactions.admincmd.update.mixin_failed"; + public static final String UPDATE_MIXIN_LOCATION = "hyperfactions.admincmd.update.mixin_location"; + public static final String UPDATE_MIXIN_RESTART = "hyperfactions.admincmd.update.mixin_restart"; + public static final String UPDATE_MIXIN_AUTO_ON = "hyperfactions.admincmd.update.mixin_auto_on"; + public static final String UPDATE_MIXIN_AUTO_ON_DESC = "hyperfactions.admincmd.update.mixin_auto_on_desc"; + public static final String UPDATE_MIXIN_AUTO_OFF = "hyperfactions.admincmd.update.mixin_auto_off"; + public static final String UPDATE_MIXIN_AUTO_OFF_DESC = "hyperfactions.admincmd.update.mixin_auto_off_desc"; + + // Rollback + public static final String ROLLBACK_NO_BACKUP = "hyperfactions.admincmd.rollback.no_backup"; + public static final String ROLLBACK_UNSAFE = "hyperfactions.admincmd.rollback.unsafe"; + public static final String ROLLBACK_UNSAFE_REASON = "hyperfactions.admincmd.rollback.unsafe_reason"; + public static final String ROLLBACK_UNSAFE_MIGRATION = "hyperfactions.admincmd.rollback.unsafe_migration"; + public static final String ROLLBACK_INSTRUCTIONS = "hyperfactions.admincmd.rollback.instructions"; + public static final String ROLLBACK_FIND_BACKUP = "hyperfactions.admincmd.rollback.find_backup"; + public static final String ROLLBACK_ROLLING = "hyperfactions.admincmd.rollback.rolling"; + public static final String ROLLBACK_FROM = "hyperfactions.admincmd.rollback.from"; + public static final String ROLLBACK_TO = "hyperfactions.admincmd.rollback.to"; + public static final String ROLLBACK_VERSION = "hyperfactions.admincmd.rollback.version"; + public static final String ROLLBACK_SUCCESS = "hyperfactions.admincmd.rollback.success"; + public static final String ROLLBACK_RESTORED = "hyperfactions.admincmd.rollback.restored"; + public static final String ROLLBACK_REMOVED = "hyperfactions.admincmd.rollback.removed"; + public static final String ROLLBACK_RESTART = "hyperfactions.admincmd.rollback.restart"; + public static final String ROLLBACK_FAILED = "hyperfactions.admincmd.rollback.failed"; + + // Import + public static final String IMPORT_UNKNOWN_SOURCE = "hyperfactions.admincmd.import.unknown_source"; + public static final String IMPORT_IMPORTING = "hyperfactions.admincmd.import.importing"; + public static final String IMPORT_COMPLETE = "hyperfactions.admincmd.import.complete"; + public static final String IMPORT_FAILED = "hyperfactions.admincmd.import.failed"; + + // Update notification + public static final String UPDATE_NOTIFY_NEW_VERSION = "hyperfactions.admincmd.update_notify.new_version"; + public static final String UPDATE_NOTIFY_VERSION_INFO = "hyperfactions.admincmd.update_notify.version_info"; + public static final String UPDATE_NOTIFY_INSTRUCTION = "hyperfactions.admincmd.update_notify.instruction"; + public static final String UPDATE_NOTIFY_UP_TO_DATE = "hyperfactions.admincmd.update_notify.up_to_date"; + + private AdminCmd() {} + } + + // ===================================================================== + // AdminNav — admin navigation bar labels + // ===================================================================== + + /** Admin navigation bar labels. */ + public static final class AdminNav { + public static final String DASHBOARD = "hyperfactions_admin.nav.dashboard"; + public static final String ACTIONS = "hyperfactions_admin.nav.actions"; + public static final String FACTIONS = "hyperfactions_admin.nav.factions"; + public static final String PLAYERS = "hyperfactions_admin.nav.players"; + public static final String ECONOMY = "hyperfactions_admin.nav.economy"; + public static final String ZONES = "hyperfactions_admin.nav.zones"; + public static final String CONFIG = "hyperfactions_admin.nav.config"; + public static final String BACKUPS = "hyperfactions_admin.nav.backups"; + public static final String LOG = "hyperfactions_admin.nav.log"; + public static final String UPDATES = "hyperfactions_admin.nav.updates"; + public static final String HELP = "hyperfactions_admin.nav.help"; + public static final String VERSION = "hyperfactions_admin.nav.version"; + + private AdminNav() {} + } +} diff --git a/src/main/java/com/hyperfactions/util/CommandHelp.java b/src/main/java/com/hyperfactions/util/CommandHelp.java index 766e8121..d7a4b8b5 100644 --- a/src/main/java/com/hyperfactions/util/CommandHelp.java +++ b/src/main/java/com/hyperfactions/util/CommandHelp.java @@ -6,45 +6,44 @@ /** * Represents a command help entry for display in help messages. * - * @param command the command syntax (e.g., "/f create {@code }") - * @param description the command description - * @param section optional section name for grouping (null for no section) + *

The {@code descriptionKey} and {@code sectionKey} fields store i18n message keys + * that are resolved at display time by {@link HelpFormatter} via {@link HFMessages}. + * + * @param command the command syntax (e.g., "/f create {@code }") + * @param descriptionKey the i18n key for the command description + * @param sectionKey optional i18n key for the section name (null for no section) + * @param sortOrder controls display ordering (lower values first) */ public record CommandHelp( @NotNull String command, - @NotNull String description, - @Nullable String section + @NotNull String descriptionKey, + @Nullable String sectionKey, + int sortOrder ) implements Comparable { /** - * Creates a command help entry without a section. + * Creates a command help entry without a section (sortOrder 0). + */ + public CommandHelp(@NotNull String command, @NotNull String descriptionKey) { + this(command, descriptionKey, null, 0); + } + + /** + * Creates a command help entry with a section (sortOrder 0). */ - public CommandHelp(@NotNull String command, @NotNull String description) { - this(command, description, null); + public CommandHelp(@NotNull String command, @NotNull String descriptionKey, @Nullable String sectionKey) { + this(command, descriptionKey, sectionKey, 0); } /** - * Compares by section (nulls first), then by command. + * Compares by sortOrder first, then by command name within same order. */ @Override public int compareTo(@NotNull CommandHelp other) { - // Null sections first - if (this.section == null && other.section != null) { - return -1; + int orderCmp = Integer.compare(this.sortOrder, other.sortOrder); + if (orderCmp != 0) { + return orderCmp; } - if (this.section != null && other.section == null) { - return 1; - } - - // Both null or both non-null: compare sections - if (this.section != null && other.section != null) { - int sectionCmp = this.section.compareTo(other.section); - if (sectionCmp != 0) { - return sectionCmp; - } - } - - // Same section: compare commands return this.command.compareTo(other.command); } } diff --git a/src/main/java/com/hyperfactions/util/CommandKeys.java b/src/main/java/com/hyperfactions/util/CommandKeys.java new file mode 100644 index 00000000..40efbe81 --- /dev/null +++ b/src/main/java/com/hyperfactions/util/CommandKeys.java @@ -0,0 +1,467 @@ +package com.hyperfactions.util; + +/** + * Static constants for HyperFactions player command i18n message keys. + * + *

+ * Split from the original MessageKeys for maintainability — contains all player + * command inner classes (one per command group). Admin command keys are in + * {@link AdminKeys}. + * + *

+ * Key format: {@code hyperfactions.cmd.{command}.{action}} + */ +public final class CommandKeys { + + private CommandKeys() {} + + /** /f create command messages. */ + public static final class Create { + public static final String NO_PERMISSION = "hyperfactions.cmd.create.no_permission"; + public static final String USAGE = "hyperfactions.cmd.create.usage"; + public static final String SUCCESS = "hyperfactions.cmd.create.success"; + public static final String ALREADY_IN_NAMED = "hyperfactions.cmd.create.already_in_named"; + public static final String USE_LEAVE_FIRST = "hyperfactions.cmd.create.use_leave_first"; + public static final String NAME_TAKEN = "hyperfactions.cmd.create.name_taken"; + public static final String NAME_TOO_SHORT = "hyperfactions.cmd.create.name_too_short"; + public static final String NAME_TOO_LONG = "hyperfactions.cmd.create.name_too_long"; + public static final String FAILED = "hyperfactions.cmd.create.failed"; + + private Create() {} + } + + /** /f disband command messages. */ + public static final class Disband { + public static final String NO_PERMISSION = "hyperfactions.cmd.disband.no_permission"; + public static final String NOT_LEADER = "hyperfactions.cmd.disband.not_leader"; + public static final String CONFIRM_PROMPT = "hyperfactions.cmd.disband.confirm_prompt"; + public static final String CONFIRM_INSTRUCTION = "hyperfactions.cmd.disband.confirm_instruction"; + public static final String SUCCESS = "hyperfactions.cmd.disband.success"; + public static final String FAILED = "hyperfactions.cmd.disband.failed"; + public static final String CANCELLED = "hyperfactions.cmd.disband.cancelled"; + + private Disband() {} + } + + /** /f rename command messages. */ + public static final class Rename { + public static final String NOT_LEADER = "hyperfactions.cmd.rename.not_leader"; + public static final String USAGE = "hyperfactions.cmd.rename.usage"; + public static final String TOO_SHORT = "hyperfactions.cmd.rename.too_short"; + public static final String TOO_LONG = "hyperfactions.cmd.rename.too_long"; + public static final String NAME_TAKEN = "hyperfactions.cmd.rename.name_taken"; + public static final String SUCCESS = "hyperfactions.cmd.rename.success"; + public static final String BROADCAST = "hyperfactions.cmd.rename.broadcast"; + + private Rename() {} + } + + /** /f desc command messages. */ + public static final class Desc { + public static final String NOT_OFFICER = "hyperfactions.cmd.desc.not_officer"; + public static final String SET = "hyperfactions.cmd.desc.set"; + public static final String CLEARED = "hyperfactions.cmd.desc.cleared"; + + private Desc() {} + } + + /** /f open command messages. */ + public static final class Open { + public static final String NOT_LEADER = "hyperfactions.cmd.open.not_leader"; + public static final String ALREADY_OPEN = "hyperfactions.cmd.open.already_open"; + public static final String SUCCESS = "hyperfactions.cmd.open.success"; + public static final String BROADCAST = "hyperfactions.cmd.open.broadcast"; + + private Open() {} + } + + /** /f close command messages. */ + public static final class Close { + public static final String NOT_LEADER = "hyperfactions.cmd.close.not_leader"; + public static final String ALREADY_CLOSED = "hyperfactions.cmd.close.already_closed"; + public static final String SUCCESS = "hyperfactions.cmd.close.success"; + public static final String BROADCAST = "hyperfactions.cmd.close.broadcast"; + + private Close() {} + } + + /** /f color command messages. */ + public static final class Color { + public static final String NOT_OFFICER = "hyperfactions.cmd.color.not_officer"; + public static final String COLORS_DISABLED = "hyperfactions.cmd.color.colors_disabled"; + public static final String USAGE = "hyperfactions.cmd.color.usage"; + public static final String USAGE_HINT = "hyperfactions.cmd.color.usage_hint"; + public static final String INVALID = "hyperfactions.cmd.color.invalid"; + public static final String SUCCESS = "hyperfactions.cmd.color.success"; + + private Color() {} + } + + /** /f invite command messages. */ + public static final class Invite { + public static final String NO_PERMISSION = "hyperfactions.cmd.invite.no_permission"; + public static final String NOT_OFFICER = "hyperfactions.cmd.invite.not_officer"; + public static final String USAGE = "hyperfactions.cmd.invite.usage"; + public static final String PLAYER_NOT_FOUND = "hyperfactions.cmd.invite.player_not_found"; + public static final String TARGET_IN_FACTION = "hyperfactions.cmd.invite.target_in_faction"; + public static final String SENT = "hyperfactions.cmd.invite.sent"; + public static final String RECEIVED = "hyperfactions.cmd.invite.received"; + public static final String ACCEPT_HINT = "hyperfactions.cmd.invite.accept_hint"; + + private Invite() {} + } + + /** /f join, /f accept, /f request command messages. */ + public static final class Join { + public static final String NO_PERMISSION = "hyperfactions.cmd.join.no_permission"; + public static final String ALREADY_IN_NAMED = "hyperfactions.cmd.join.already_in_named"; + public static final String USE_LEAVE_HINT = "hyperfactions.cmd.join.use_leave_hint"; + public static final String NO_INVITES = "hyperfactions.cmd.join.no_invites"; + public static final String FACTION_NOT_FOUND = "hyperfactions.cmd.join.faction_not_found"; + public static final String NOT_INVITED = "hyperfactions.cmd.join.not_invited"; + public static final String FACTION_GONE = "hyperfactions.cmd.join.faction_gone"; + public static final String SUCCESS = "hyperfactions.cmd.join.success"; + public static final String BROADCAST = "hyperfactions.cmd.join.broadcast"; + public static final String FACTION_FULL = "hyperfactions.cmd.join.faction_full"; + public static final String FAILED = "hyperfactions.cmd.join.failed"; + + private Join() {} + } + + /** /f leave command messages. */ + public static final class Leave { + public static final String NO_PERMISSION = "hyperfactions.cmd.leave.no_permission"; + public static final String CONFIRM_PROMPT = "hyperfactions.cmd.leave.confirm_prompt"; + public static final String CONFIRM_INSTRUCTION = "hyperfactions.cmd.leave.confirm_instruction"; + public static final String SUCCESS = "hyperfactions.cmd.leave.success"; + public static final String BROADCAST = "hyperfactions.cmd.leave.broadcast"; + public static final String FAILED = "hyperfactions.cmd.leave.failed"; + public static final String CANCELLED = "hyperfactions.cmd.leave.cancelled"; + + private Leave() {} + } + + /** /f kick command messages. */ + public static final class Kick { + public static final String NO_PERMISSION = "hyperfactions.cmd.kick.no_permission"; + public static final String USAGE = "hyperfactions.cmd.kick.usage"; + public static final String NOT_IN_YOUR_FACTION = "hyperfactions.cmd.kick.not_in_your_faction"; + public static final String SUCCESS = "hyperfactions.cmd.kick.success"; + public static final String BROADCAST = "hyperfactions.cmd.kick.broadcast"; + public static final String KICKED = "hyperfactions.cmd.kick.kicked"; + public static final String CANNOT_KICK_HIGHER = "hyperfactions.cmd.kick.cannot_kick_higher"; + public static final String CANNOT_KICK_LEADER = "hyperfactions.cmd.kick.cannot_kick_leader"; + public static final String FAILED = "hyperfactions.cmd.kick.failed"; + + private Kick() {} + } + + /** /f promote, /f demote, /f transfer command messages. */ + public static final class Rank { + // Promote + public static final String PROMOTE_NO_PERMISSION = "hyperfactions.cmd.rank.promote_no_permission"; + public static final String PROMOTE_USAGE = "hyperfactions.cmd.rank.promote_usage"; + public static final String PROMOTED = "hyperfactions.cmd.rank.promoted"; + public static final String PROMOTE_BROADCAST = "hyperfactions.cmd.rank.promote_broadcast"; + public static final String ALREADY_HIGHEST = "hyperfactions.cmd.rank.already_highest"; + public static final String PROMOTE_FAILED = "hyperfactions.cmd.rank.promote_failed"; + // Demote + public static final String DEMOTE_NO_PERMISSION = "hyperfactions.cmd.rank.demote_no_permission"; + public static final String DEMOTE_USAGE = "hyperfactions.cmd.rank.demote_usage"; + public static final String DEMOTED = "hyperfactions.cmd.rank.demoted"; + public static final String DEMOTE_BROADCAST = "hyperfactions.cmd.rank.demote_broadcast"; + public static final String ALREADY_LOWEST = "hyperfactions.cmd.rank.already_lowest"; + public static final String DEMOTE_FAILED = "hyperfactions.cmd.rank.demote_failed"; + // Transfer + public static final String TRANSFER_NO_PERMISSION = "hyperfactions.cmd.rank.transfer_no_permission"; + public static final String TRANSFER_USAGE = "hyperfactions.cmd.rank.transfer_usage"; + public static final String PLAYER_NOT_IN_FACTION = "hyperfactions.cmd.rank.player_not_in_faction"; + public static final String TRANSFER_CONFIRM = "hyperfactions.cmd.rank.transfer_confirm"; + public static final String TRANSFER_CONFIRM_INSTRUCTION = "hyperfactions.cmd.rank.transfer_confirm_instruction"; + public static final String TRANSFERRED = "hyperfactions.cmd.rank.transferred"; + public static final String TRANSFER_BROADCAST = "hyperfactions.cmd.rank.transfer_broadcast"; + public static final String TRANSFER_FAILED = "hyperfactions.cmd.rank.transfer_failed"; + public static final String TRANSFER_CANCELLED = "hyperfactions.cmd.rank.transfer_cancelled"; + + private Rank() {} + } + + /** /f claim, /f unclaim, /f overclaim command messages. */ + public static final class Claim { + // Claim + public static final String NO_PERMISSION = "hyperfactions.cmd.claim.no_permission"; + public static final String SUCCESS = "hyperfactions.cmd.claim.success"; + public static final String ALREADY_CLAIMED = "hyperfactions.cmd.claim.already_claimed"; + public static final String ALREADY_YOURS = "hyperfactions.cmd.claim.already_yours"; + public static final String CANNOT_CLAIM_ALLY = "hyperfactions.cmd.claim.cannot_claim_ally"; + public static final String ALREADY_CLAIMED_HINT = "hyperfactions.cmd.claim.already_claimed_hint"; + public static final String NOT_OFFICER = "hyperfactions.cmd.claim.not_officer"; + public static final String NOT_CONNECTED = "hyperfactions.cmd.claim.not_adjacent"; + public static final String MAX_CLAIMS = "hyperfactions.cmd.claim.max_claims"; + public static final String WORLD_NOT_ALLOWED = "hyperfactions.cmd.claim.world_not_allowed"; + public static final String ORBISGUARD = "hyperfactions.cmd.claim.orbisguard"; + public static final String ZONE_PROTECTED = "hyperfactions.cmd.claim.zone_protected"; + public static final String FAILED = "hyperfactions.cmd.claim.failed"; + // Unclaim + public static final String UNCLAIM_NO_PERMISSION = "hyperfactions.cmd.unclaim.no_permission"; + public static final String UNCLAIMED = "hyperfactions.cmd.unclaim.success"; + public static final String UNCLAIM_NOT_OFFICER = "hyperfactions.cmd.unclaim.not_officer"; + public static final String CHUNK_NOT_CLAIMED = "hyperfactions.cmd.unclaim.chunk_not_claimed"; + public static final String NOT_YOUR_CLAIM = "hyperfactions.cmd.unclaim.not_your_claim"; + public static final String CANNOT_UNCLAIM_HOME = "hyperfactions.cmd.unclaim.cannot_unclaim_home"; + public static final String WOULD_DISCONNECT = "hyperfactions.cmd.unclaim.would_disconnect"; + public static final String UNCLAIM_FAILED = "hyperfactions.cmd.unclaim.failed"; + // Overclaim + public static final String OVERCLAIM_NO_PERMISSION = "hyperfactions.cmd.overclaim.no_permission"; + public static final String OVERCLAIMED = "hyperfactions.cmd.overclaim.success"; + public static final String OVERCLAIM_NOT_OFFICER = "hyperfactions.cmd.overclaim.not_officer"; + public static final String OVERCLAIM_NOT_CLAIMED = "hyperfactions.cmd.overclaim.not_claimed"; + public static final String OVERCLAIM_OWN = "hyperfactions.cmd.overclaim.own_chunk"; + public static final String OVERCLAIM_ALLY = "hyperfactions.cmd.overclaim.ally"; + public static final String TARGET_HAS_POWER = "hyperfactions.cmd.overclaim.target_has_power"; + public static final String OVERCLAIM_FAILED = "hyperfactions.cmd.overclaim.failed"; + public static final String INSUFFICIENT_POWER = "hyperfactions.cmd.claim.insufficient_power"; + + private Claim() {} + } + + /** /f home, /f sethome, /f delhome, /f stuck command messages. */ + public static final class Home { + // Home + public static final String NO_PERMISSION = "hyperfactions.cmd.home.no_permission"; + public static final String NO_HOME = "hyperfactions.cmd.home.no_home"; + public static final String COMBAT_TAGGED = "hyperfactions.cmd.home.combat_tagged"; + public static final String TELEPORTED = "hyperfactions.cmd.home.teleported"; + public static final String WARMUP = "hyperfactions.cmd.home.warmup"; + public static final String WARMUP_CANCELLED = "hyperfactions.cmd.home.warmup_cancelled"; + public static final String COOLDOWN = "hyperfactions.cmd.home.cooldown"; + // SetHome + public static final String SETHOME_NO_PERMISSION = "hyperfactions.cmd.sethome.no_permission"; + public static final String SETHOME_WORLD_NOT_ALLOWED = "hyperfactions.cmd.sethome.world_not_allowed"; + public static final String NOT_IN_TERRITORY = "hyperfactions.cmd.sethome.not_in_territory"; + public static final String SET = "hyperfactions.cmd.sethome.set"; + public static final String SETHOME_BROADCAST = "hyperfactions.cmd.sethome.broadcast"; + public static final String SETHOME_NOT_OFFICER = "hyperfactions.cmd.sethome.not_officer"; + public static final String SETHOME_FAILED = "hyperfactions.cmd.sethome.failed"; + // DelHome + public static final String DELHOME_NO_PERMISSION = "hyperfactions.cmd.delhome.no_permission"; + public static final String DELHOME_NO_HOME = "hyperfactions.cmd.delhome.no_home"; + public static final String DELETED = "hyperfactions.cmd.delhome.deleted"; + public static final String DELHOME_BROADCAST = "hyperfactions.cmd.delhome.broadcast"; + public static final String DELHOME_NOT_OFFICER = "hyperfactions.cmd.delhome.not_officer"; + public static final String DELHOME_FAILED = "hyperfactions.cmd.delhome.failed"; + // Stuck + public static final String STUCK_NO_PERMISSION = "hyperfactions.cmd.stuck.no_permission"; + public static final String STUCK_NOT_STUCK = "hyperfactions.cmd.stuck.not_stuck"; + public static final String STUCK_COMBAT_TAGGED = "hyperfactions.cmd.stuck.combat_tagged"; + public static final String STUCK_NO_SAFE = "hyperfactions.cmd.stuck.no_safe"; + public static final String STUCK_TELEPORTING = "hyperfactions.cmd.stuck.teleporting"; + + private Home() {} + } + + /** /f power command messages. */ + public static final class Power { + public static final String PERSONAL = "hyperfactions.cmd.power.personal"; + public static final String FACTION = "hyperfactions.cmd.power.faction"; + public static final String DEATH_LOSS = "hyperfactions.cmd.power.death_loss"; + public static final String REGEN = "hyperfactions.cmd.power.regen"; + public static final String NO_PERMISSION = "hyperfactions.cmd.power.no_permission"; + public static final String HEADER = "hyperfactions.cmd.power.header"; + public static final String CURRENT = "hyperfactions.cmd.power.current"; + + private Power() {} + } + + /** /f ally, /f enemy, /f neutral, /f relations command messages. */ + public static final class Relation { + public static final String ALLY_SENT = "hyperfactions.cmd.relation.ally_sent"; + public static final String ALLY_RECEIVED = "hyperfactions.cmd.relation.ally_received"; + public static final String ALLY_FORMED = "hyperfactions.cmd.relation.ally_formed"; + public static final String ENEMY_DECLARED = "hyperfactions.cmd.relation.enemy_declared"; + public static final String ENEMY_RECEIVED = "hyperfactions.cmd.relation.enemy_received"; + public static final String NEUTRAL_SET = "hyperfactions.cmd.relation.neutral_set"; + public static final String ALREADY_RELATION = "hyperfactions.cmd.relation.already_relation"; + public static final String CANNOT_SELF = "hyperfactions.cmd.relation.cannot_self"; + public static final String MAX_ALLIES = "hyperfactions.cmd.relation.max_allies"; + // Ally + public static final String ALLY_NO_PERMISSION = "hyperfactions.cmd.relation.ally_no_permission"; + public static final String ALLY_USAGE = "hyperfactions.cmd.relation.ally_usage"; + public static final String ALREADY_ALLY = "hyperfactions.cmd.relation.already_ally"; + public static final String ALLY_FAILED = "hyperfactions.cmd.relation.ally_failed"; + // Enemy + public static final String ENEMY_NO_PERMISSION = "hyperfactions.cmd.relation.enemy_no_permission"; + public static final String ENEMY_USAGE = "hyperfactions.cmd.relation.enemy_usage"; + public static final String ALREADY_ENEMY = "hyperfactions.cmd.relation.already_enemy"; + public static final String MAX_ENEMIES = "hyperfactions.cmd.relation.max_enemies"; + public static final String ENEMY_FAILED = "hyperfactions.cmd.relation.enemy_failed"; + // Neutral + public static final String NEUTRAL_NO_PERMISSION = "hyperfactions.cmd.relation.neutral_no_permission"; + public static final String NEUTRAL_USAGE = "hyperfactions.cmd.relation.neutral_usage"; + public static final String ALREADY_NEUTRAL = "hyperfactions.cmd.relation.already_neutral"; + public static final String NEUTRAL_FAILED = "hyperfactions.cmd.relation.neutral_failed"; + // Relations list + public static final String VIEW_NO_PERMISSION = "hyperfactions.cmd.relation.view_no_permission"; + public static final String HEADER = "hyperfactions.cmd.relation.header"; + public static final String ALLIES_COUNT = "hyperfactions.cmd.relation.allies_count"; + public static final String ENEMIES_COUNT = "hyperfactions.cmd.relation.enemies_count"; + public static final String LIST_ENTRY = "hyperfactions.cmd.relation.list_entry"; + + private Relation() {} + } + + /** /f c (chat) command messages. */ + public static final class Chat { + public static final String MODE_FACTION = "hyperfactions.cmd.chat.mode_faction"; + public static final String MODE_ALLY = "hyperfactions.cmd.chat.mode_ally"; + public static final String MODE_PUBLIC = "hyperfactions.cmd.chat.mode_public"; + public static final String USAGE = "hyperfactions.cmd.chat.usage"; + public static final String NO_PERMISSION = "hyperfactions.cmd.chat.no_permission"; + public static final String MODE_SET = "hyperfactions.cmd.chat.mode_set"; + + private Chat() {} + } + + /** /f invites command messages. */ + public static final class Invites { + public static final String NOT_OFFICER = "hyperfactions.cmd.invites.not_officer"; + public static final String HEADER = "hyperfactions.cmd.invites.header"; + public static final String NO_PENDING = "hyperfactions.cmd.invites.no_pending"; + public static final String OUTGOING = "hyperfactions.cmd.invites.outgoing"; + public static final String OUTGOING_ENTRY = "hyperfactions.cmd.invites.outgoing_entry"; + public static final String REQUESTS = "hyperfactions.cmd.invites.requests"; + public static final String REQUEST_ENTRY = "hyperfactions.cmd.invites.request_entry"; + public static final String YOUR_INVITES_HEADER = "hyperfactions.cmd.invites.your_invites_header"; + public static final String NO_INVITES = "hyperfactions.cmd.invites.no_invites"; + public static final String INVITE_ENTRY = "hyperfactions.cmd.invites.invite_entry"; + + private Invites() {} + } + + /** /f request command messages. */ + public static final class Request { + public static final String NO_PERMISSION = "hyperfactions.cmd.request.no_permission"; + public static final String ALREADY_IN_NAMED = "hyperfactions.cmd.request.already_in_named"; + public static final String USE_LEAVE_HINT = "hyperfactions.cmd.request.use_leave_hint"; + public static final String USAGE = "hyperfactions.cmd.request.usage"; + public static final String FACTION_OPEN = "hyperfactions.cmd.request.faction_open"; + public static final String ALREADY_REQUESTED = "hyperfactions.cmd.request.already_requested"; + public static final String HAS_INVITE = "hyperfactions.cmd.request.has_invite"; + public static final String SENT = "hyperfactions.cmd.request.sent"; + public static final String YOUR_MESSAGE = "hyperfactions.cmd.request.your_message"; + public static final String OFFICER_REVIEW = "hyperfactions.cmd.request.officer_review"; + public static final String OFFICER_NOTIFY = "hyperfactions.cmd.request.officer_notify"; + public static final String OFFICER_REVIEW_HINT = "hyperfactions.cmd.request.officer_review_hint"; + + private Request() {} + } + + /** /f rename, /f desc, /f color, /f open, /f close, /f settings command messages. */ + public static final class Settings { + public static final String RENAMED = "hyperfactions.cmd.settings.renamed"; + public static final String DESCRIPTION_SET = "hyperfactions.cmd.settings.description_set"; + public static final String COLOR_SET = "hyperfactions.cmd.settings.color_set"; + public static final String OPENED = "hyperfactions.cmd.settings.opened"; + public static final String CLOSED = "hyperfactions.cmd.settings.closed"; + + private Settings() {} + } + + /** /f balance, /f deposit, /f withdraw, /f money command messages. */ + public static final class Economy { + public static final String BALANCE = "hyperfactions.cmd.economy.balance"; + public static final String DEPOSITED = "hyperfactions.cmd.economy.deposited"; + public static final String WITHDRAWN = "hyperfactions.cmd.economy.withdrawn"; + public static final String TRANSFERRED = "hyperfactions.cmd.economy.transferred"; + public static final String INSUFFICIENT = "hyperfactions.cmd.economy.insufficient"; + public static final String INVALID_AMOUNT = "hyperfactions.cmd.economy.invalid_amount"; + // Balance + public static final String BALANCE_NO_PERMISSION = "hyperfactions.cmd.economy.balance_no_permission"; + public static final String TREASURY_UNAVAILABLE = "hyperfactions.cmd.economy.treasury_unavailable"; + public static final String BALANCE_DISPLAY = "hyperfactions.cmd.economy.balance_display"; + // Deposit + public static final String DEPOSIT_NO_PERMISSION = "hyperfactions.cmd.economy.deposit_no_permission"; + public static final String DEPOSIT_FACTION_DENIED = "hyperfactions.cmd.economy.deposit_faction_denied"; + public static final String DEPOSIT_USAGE = "hyperfactions.cmd.economy.deposit_usage"; + public static final String AMOUNT_POSITIVE = "hyperfactions.cmd.economy.amount_positive"; + public static final String WALLET_INSUFFICIENT = "hyperfactions.cmd.economy.wallet_insufficient"; + public static final String WALLET_WITHDRAW_FAILED = "hyperfactions.cmd.economy.wallet_withdraw_failed"; + public static final String DEPOSIT_FAILED = "hyperfactions.cmd.economy.deposit_failed"; + // Withdraw + public static final String WITHDRAW_NO_PERMISSION = "hyperfactions.cmd.economy.withdraw_no_permission"; + public static final String WITHDRAW_FACTION_DENIED = "hyperfactions.cmd.economy.withdraw_faction_denied"; + public static final String WITHDRAW_USAGE = "hyperfactions.cmd.economy.withdraw_usage"; + public static final String WITHDRAW_LIMIT_DENIED = "hyperfactions.cmd.economy.withdraw_limit_denied"; + public static final String WALLET_DEPOSIT_FAILED = "hyperfactions.cmd.economy.wallet_deposit_failed"; + public static final String WITHDRAW_LIMIT_EXCEEDED = "hyperfactions.cmd.economy.withdraw_limit_exceeded"; + public static final String WITHDRAW_FAILED = "hyperfactions.cmd.economy.withdraw_failed"; + // Transfer + public static final String TRANSFER_NO_PERMISSION = "hyperfactions.cmd.economy.transfer_no_permission"; + public static final String TRANSFER_FACTION_DENIED = "hyperfactions.cmd.economy.transfer_faction_denied"; + public static final String TRANSFER_USAGE = "hyperfactions.cmd.economy.transfer_usage"; + public static final String TRANSFER_SELF = "hyperfactions.cmd.economy.transfer_self"; + public static final String TRANSFER_LIMIT_DENIED = "hyperfactions.cmd.economy.transfer_limit_denied"; + public static final String TRANSFER_LIMIT_EXCEEDED = "hyperfactions.cmd.economy.transfer_limit_exceeded"; + public static final String TRANSFER_FAILED = "hyperfactions.cmd.economy.transfer_failed"; + // Log + public static final String LOG_NO_PERMISSION = "hyperfactions.cmd.economy.log_no_permission"; + public static final String LOG_HEADER = "hyperfactions.cmd.economy.log_header"; + public static final String LOG_EMPTY = "hyperfactions.cmd.economy.log_empty"; + // Money help + public static final String MONEY_HELP_HEADER = "hyperfactions.cmd.economy.money_help_header"; + public static final String MONEY_HELP_BALANCE = "hyperfactions.cmd.economy.money_help_balance"; + public static final String MONEY_HELP_DEPOSIT = "hyperfactions.cmd.economy.money_help_deposit"; + public static final String MONEY_HELP_WITHDRAW = "hyperfactions.cmd.economy.money_help_withdraw"; + public static final String MONEY_HELP_TRANSFER = "hyperfactions.cmd.economy.money_help_transfer"; + public static final String MONEY_HELP_LOG = "hyperfactions.cmd.economy.money_help_log"; + + private Economy() {} + } + + /** /f info, /f who, /f list, /f members, /f map, /f help command messages. */ + public static final class Info { + public static final String FACTION_HEADER = "hyperfactions.cmd.info.faction_header"; + public static final String PLAYER_HEADER = "hyperfactions.cmd.info.player_header"; + // Info command + public static final String NO_PERMISSION = "hyperfactions.cmd.info.no_permission"; + public static final String FACTION_NOT_FOUND = "hyperfactions.cmd.info.faction_not_found"; + public static final String NOT_IN_FACTION_HINT = "hyperfactions.cmd.info.not_in_faction_hint"; + public static final String LEADER = "hyperfactions.cmd.info.leader"; + public static final String MEMBERS = "hyperfactions.cmd.info.members"; + public static final String POWER = "hyperfactions.cmd.info.power"; + public static final String CLAIMS = "hyperfactions.cmd.info.claims"; + public static final String RAIDABLE = "hyperfactions.cmd.info.raidable"; + public static final String ALLIES = "hyperfactions.cmd.info.allies"; + public static final String ENEMIES = "hyperfactions.cmd.info.enemies"; + public static final String THEY_CONSIDER = "hyperfactions.cmd.info.they_consider"; + public static final String YOU_CONSIDER = "hyperfactions.cmd.info.you_consider"; + // Members command + public static final String MEMBERS_NO_PERMISSION = "hyperfactions.cmd.info.members_no_permission"; + public static final String MEMBERS_HEADER = "hyperfactions.cmd.info.members_header"; + public static final String MEMBER_ONLINE = "hyperfactions.cmd.info.member_online"; + // List command + public static final String LIST_NO_PERMISSION = "hyperfactions.cmd.info.list_no_permission"; + public static final String LIST_EMPTY = "hyperfactions.cmd.info.list_empty"; + public static final String LIST_HEADER = "hyperfactions.cmd.info.list_header"; + public static final String LIST_ENTRY = "hyperfactions.cmd.info.list_entry"; + public static final String LIST_ENTRY_RAIDABLE = "hyperfactions.cmd.info.list_entry_raidable"; + // Help command + public static final String HELP_NO_PERMISSION = "hyperfactions.cmd.info.help_no_permission"; + // Who command + public static final String WHO_NO_PERMISSION = "hyperfactions.cmd.info.who_no_permission"; + public static final String WHO_FACTION = "hyperfactions.cmd.info.who_faction"; + public static final String WHO_ROLE = "hyperfactions.cmd.info.who_role"; + public static final String WHO_JOINED = "hyperfactions.cmd.info.who_joined"; + public static final String WHO_FACTION_NONE = "hyperfactions.cmd.info.who_faction_none"; + public static final String WHO_POWER = "hyperfactions.cmd.info.who_power"; + public static final String WHO_STATUS = "hyperfactions.cmd.info.who_status"; + public static final String WHO_LAST_SEEN = "hyperfactions.cmd.info.who_last_seen"; + // Map command + public static final String MAP_NO_PERMISSION = "hyperfactions.cmd.info.map_no_permission"; + public static final String MAP_HEADER = "hyperfactions.cmd.info.map_header"; + public static final String MAP_LEGEND = "hyperfactions.cmd.info.map_legend"; + public static final String MAP_GUI_HINT = "hyperfactions.cmd.info.map_gui_hint"; + + private Info() {} + } +} diff --git a/src/main/java/com/hyperfactions/util/CommonKeys.java b/src/main/java/com/hyperfactions/util/CommonKeys.java new file mode 100644 index 00000000..5f9ee219 --- /dev/null +++ b/src/main/java/com/hyperfactions/util/CommonKeys.java @@ -0,0 +1,217 @@ +package com.hyperfactions.util; + +/** + * Common and shared message keys split from the original MessageKeys. + * + *

+ * Contains cross-cutting message key constants used across multiple features: + * common UI labels, protection denial messages, territory notifications, + * announcements, teleportation, and chat display names. + */ +public final class CommonKeys { + + private CommonKeys() {} + + // ===================================================================== + // Common — shared messages used across multiple features + // ===================================================================== + + /** Shared messages used across multiple features (commands, GUI, protection). */ + public static final class Common { + public static final String NO_PERMISSION = "hyperfactions.common.no_permission"; + public static final String NOT_IN_FACTION = "hyperfactions.common.not_in_faction"; + public static final String ALREADY_IN_FACTION = "hyperfactions.common.already_in_faction"; + public static final String PLAYER_NOT_FOUND = "hyperfactions.common.player_not_found"; + public static final String FACTION_NOT_FOUND = "hyperfactions.common.faction_not_found"; + public static final String PLAYER_NOT_ONLINE = "hyperfactions.common.player_not_online"; + public static final String MUST_BE_LEADER = "hyperfactions.common.must_be_leader"; + public static final String MUST_BE_OFFICER = "hyperfactions.common.must_be_officer"; + public static final String COMBAT_TAGGED = "hyperfactions.common.combat_tagged"; + public static final String CANCEL = "hyperfactions.common.cancel"; + public static final String CONFIRM = "hyperfactions.common.confirm"; + public static final String SAVE = "hyperfactions.common.save"; + public static final String CLOSE = "hyperfactions.common.close"; + public static final String YES = "hyperfactions.common.yes"; + public static final String NO = "hyperfactions.common.no"; + public static final String LOADING = "hyperfactions.common.loading"; + public static final String ONLINE = "hyperfactions.common.online"; + public static final String OFFLINE = "hyperfactions.common.offline"; + public static final String ENABLED = "hyperfactions.common.enabled"; + public static final String DISABLED = "hyperfactions.common.disabled"; + public static final String NONE = "hyperfactions.common.none"; + public static final String PAGE = "hyperfactions.common.page"; + public static final String UNKNOWN = "hyperfactions.common.unknown"; + public static final String ERROR_GENERIC = "hyperfactions.common.error_generic"; + public static final String GUI_FALLBACK = "hyperfactions.common.gui_fallback"; + public static final String ADMIN_PREFIX = "hyperfactions.common.admin_prefix"; + public static final String LOCATION_ERROR = "hyperfactions.common.location_error"; + public static final String WORLD_ERROR = "hyperfactions.common.world_error"; + public static final String INVALID_ID = "hyperfactions.common.invalid_id"; + public static final String NA = "hyperfactions.common.na"; + public static final String CLEAR = "hyperfactions.common.clear"; + public static final String BACK = "hyperfactions.common.back"; + public static final String LEAVE = "hyperfactions.common.leave"; + public static final String TRANSFER = "hyperfactions.common.transfer"; + public static final String DISBAND = "hyperfactions.common.disband"; + public static final String WORLD_FALLBACK = "hyperfactions.common.world_fallback"; + public static final String NO_DESCRIPTION = "hyperfactions.common.no_description"; + public static final String MEMBER_COUNT = "hyperfactions.common.member_count"; + public static final String ECONOMY_DISABLED = "hyperfactions.common.economy_disabled"; + + private Common() {} + } + + // ===================================================================== + // Protection — denial messages + // ===================================================================== + + /** Protection denial messages shown when actions are blocked. */ + public static final class Protection { + // Action phrases (what the player tried to do) + public static final String ACTION_GENERIC = "hyperfactions.protection.action.generic"; + public static final String ACTION_BUILD = "hyperfactions.protection.action.build"; + public static final String ACTION_INTERACT = "hyperfactions.protection.action.interact"; + public static final String ACTION_DOOR = "hyperfactions.protection.action.door"; + public static final String ACTION_CONTAINER = "hyperfactions.protection.action.container"; + public static final String ACTION_BENCH = "hyperfactions.protection.action.bench"; + public static final String ACTION_PROCESSING = "hyperfactions.protection.action.processing"; + public static final String ACTION_SEAT = "hyperfactions.protection.action.seat"; + public static final String ACTION_LIGHT = "hyperfactions.protection.action.light"; + public static final String ACTION_TELEPORTER = "hyperfactions.protection.action.teleporter"; + public static final String ACTION_CRATE = "hyperfactions.protection.action.crate"; + public static final String ACTION_TAME = "hyperfactions.protection.action.tame"; + public static final String ACTION_NPC = "hyperfactions.protection.action.npc"; + public static final String ACTION_MOUNT = "hyperfactions.protection.action.mount"; + public static final String ACTION_PVE = "hyperfactions.protection.action.pve"; + public static final String ACTION_ITEM_DROP = "hyperfactions.protection.action.item_drop"; + public static final String ACTION_ITEM_PICKUP = "hyperfactions.protection.action.item_pickup"; + + // Denial reasons (with {0} placeholder for action phrase) + public static final String DENIED_SAFEZONE = "hyperfactions.protection.denied.safezone"; + public static final String DENIED_WARZONE = "hyperfactions.protection.denied.warzone"; + public static final String DENIED_ENEMY_CLAIM = "hyperfactions.protection.denied.enemy_claim"; + public static final String DENIED_CLAIMED = "hyperfactions.protection.denied.claimed"; + public static final String DENIED_HERE = "hyperfactions.protection.denied.here"; + public static final String DENIED_ZONE = "hyperfactions.protection.denied.zone"; + public static final String DENIED_FACTION_PERM = "hyperfactions.protection.denied.faction_perm"; + public static final String DENIED_ALLY_TERRITORY = "hyperfactions.protection.denied.ally_territory"; + public static final String DENIED_ERROR = "hyperfactions.protection.denied.error"; + + // PvP denial messages + public static final String PVP_SAFEZONE = "hyperfactions.protection.pvp.safezone"; + public static final String PVP_SAME_FACTION = "hyperfactions.protection.pvp.same_faction"; + public static final String PVP_ALLY = "hyperfactions.protection.pvp.ally"; + public static final String PVP_SPAWN_PROTECTED = "hyperfactions.protection.pvp.spawn_protected"; + public static final String PVP_TERRITORY_DISABLED = "hyperfactions.protection.pvp.territory_disabled"; + public static final String PVP_GENERIC = "hyperfactions.protection.pvp.generic"; + + // Entity damage (zone-level) + public static final String MOB_DAMAGE_DISABLED = "hyperfactions.protection.mob_damage_disabled"; + public static final String PVE_DAMAGE_DISABLED = "hyperfactions.protection.pve_damage_disabled"; + public static final String PVE_TERRITORY_DENIED = "hyperfactions.protection.pve_territory_denied"; + + // Combat tag + public static final String COMBAT_TAG_COMMAND = "hyperfactions.protection.combat_tag_command"; + + private Protection() {} + } + + // ===================================================================== + // Territory — entry/exit notifications, announcements + // ===================================================================== + + /** Territory entry/exit and announcement messages. */ + public static final class Territory { + public static final String ENTER_OWN = "hyperfactions.territory.enter_own"; + public static final String ENTER_ALLY = "hyperfactions.territory.enter_ally"; + public static final String ENTER_ENEMY = "hyperfactions.territory.enter_enemy"; + public static final String ENTER_NEUTRAL = "hyperfactions.territory.enter_neutral"; + public static final String ENTER_WILDERNESS = "hyperfactions.territory.enter_wilderness"; + public static final String ENTER_SAFEZONE = "hyperfactions.territory.enter_safezone"; + public static final String ENTER_WARZONE = "hyperfactions.territory.enter_warzone"; + public static final String INTRUDER_ALERT = "hyperfactions.territory.intruder_alert"; + + // Display text for territory notification banners + public static final String DISPLAY_WILDERNESS = "hyperfactions.territory.display.wilderness"; + public static final String DISPLAY_SAFEZONE = "hyperfactions.territory.display.safezone"; + public static final String DISPLAY_WARZONE = "hyperfactions.territory.display.warzone"; + public static final String DISPLAY_UNKNOWN_FACTION = "hyperfactions.territory.display.unknown_faction"; + public static final String SECONDARY_PVP_DISABLED = "hyperfactions.territory.secondary.pvp_disabled"; + public static final String SECONDARY_PVP_NO_PROTECTION = "hyperfactions.territory.secondary.pvp_no_protection"; + public static final String SECONDARY_YOUR_TERRITORY = "hyperfactions.territory.secondary.your_territory"; + public static final String SECONDARY_FACTION_TERRITORY = "hyperfactions.territory.secondary.faction_territory"; + public static final String SECONDARY_RELATION_TERRITORY = "hyperfactions.territory.secondary.relation_territory"; + + private Territory() {} + } + + // ===================================================================== + // Announcements — faction-wide broadcasts + // ===================================================================== + + /** Server-wide broadcast messages (AnnouncementManager). */ + public static final class ServerAnnounce { + public static final String FACTION_CREATED = "hyperfactions.server_announce.faction_created"; + public static final String FACTION_DISBANDED = "hyperfactions.server_announce.faction_disbanded"; + public static final String LEADERSHIP_TRANSFER = "hyperfactions.server_announce.leadership_transfer"; + public static final String OVERCLAIM = "hyperfactions.server_announce.overclaim"; + public static final String WAR_DECLARED = "hyperfactions.server_announce.war_declared"; + public static final String ALLIANCE_FORMED = "hyperfactions.server_announce.alliance_formed"; + public static final String ALLIANCE_BROKEN = "hyperfactions.server_announce.alliance_broken"; + + private ServerAnnounce() {} + } + + /** Faction-wide broadcast messages. */ + public static final class Announce { + public static final String MEMBER_JOIN = "hyperfactions.announce.member_join"; + public static final String MEMBER_LEAVE = "hyperfactions.announce.member_leave"; + public static final String MEMBER_KICK = "hyperfactions.announce.member_kick"; + public static final String MEMBER_PROMOTED = "hyperfactions.announce.member_promoted"; + public static final String MEMBER_DEMOTED = "hyperfactions.announce.member_demoted"; + public static final String MEMBER_DEATH = "hyperfactions.announce.member_death"; + public static final String TERRITORY_CLAIMED = "hyperfactions.announce.territory_claimed"; + public static final String TERRITORY_LOST = "hyperfactions.announce.territory_lost"; + public static final String POWER_LOW = "hyperfactions.announce.power_low"; + public static final String RAIDABLE = "hyperfactions.announce.raidable"; + public static final String DEATH_LOCATION = "hyperfactions.announce.death_location"; + + private Announce() {} + } + + // ===================================================================== + // Teleport — teleportation messages + // ===================================================================== + + /** Teleport system messages (TeleportManager). */ + public static final class Teleport { + public static final String COOLDOWN_WAIT = "hyperfactions.teleport.cooldown_wait"; + public static final String WARMUP_START = "hyperfactions.teleport.warmup_start"; + public static final String COMBAT_CANCELLED = "hyperfactions.teleport.combat_cancelled"; + public static final String SUCCESS_DEFAULT = "hyperfactions.teleport.success_default"; + public static final String NO_HOME = "hyperfactions.teleport.no_home"; + public static final String WORLD_NOT_FOUND = "hyperfactions.teleport.world_not_found"; + public static final String FAILED = "hyperfactions.teleport.failed"; + public static final String COUNTDOWN = "hyperfactions.teleport.countdown"; + public static final String COUNTDOWN_ONE = "hyperfactions.teleport.countdown_one"; + public static final String MOVED_CANCELLED = "hyperfactions.teleport.moved_cancelled"; + public static final String DAMAGE_CANCELLED = "hyperfactions.teleport.damage_cancelled"; + public static final String MOUNT_TELEPORT_BLOCKED = "hyperfactions.teleport.mount_teleport_blocked"; + public static final String MOUNT_ENTRY_BLOCKED = "hyperfactions.teleport.mount_entry_blocked"; + + private Teleport() {} + } + + // ===================================================================== + // Chat — channel display names + // ===================================================================== + + /** Chat channel display names (ChatManager). */ + public static final class ChatDisplay { + public static final String PUBLIC = "hyperfactions.chat.display.public"; + public static final String FACTION = "hyperfactions.chat.display.faction"; + public static final String ALLY = "hyperfactions.chat.display.ally"; + + private ChatDisplay() {} + } +} diff --git a/src/main/java/com/hyperfactions/util/GuiKeys.java b/src/main/java/com/hyperfactions/util/GuiKeys.java new file mode 100644 index 00000000..f02f4d00 --- /dev/null +++ b/src/main/java/com/hyperfactions/util/GuiKeys.java @@ -0,0 +1,1104 @@ +package com.hyperfactions.util; + +/** + * GUI page message keys split from the original MessageKeys. + * + *

+ * Contains all player-facing GUI inner classes — navigation, page labels, + * modal dialogs, and interactive page messages. Key prefix is + * {@code hyperfactions_gui.*} mapping to {@code hyperfactions_gui.lang}. + */ +public final class GuiKeys { + + private GuiKeys() {} + + // ===================================================================== + // GUI — Navigation and shared GUI elements + // ===================================================================== + + /** Navigation bar labels. */ + public static final class Nav { + public static final String DASHBOARD = "hyperfactions_gui.nav.dashboard"; + public static final String CHAT = "hyperfactions_gui.nav.chat"; + public static final String MEMBERS = "hyperfactions_gui.nav.members"; + public static final String INVITES = "hyperfactions_gui.nav.invites"; + public static final String BROWSER = "hyperfactions_gui.nav.browser"; + public static final String MAP = "hyperfactions_gui.nav.map"; + public static final String LEADERBOARD = "hyperfactions_gui.nav.leaderboard"; + public static final String RELATIONS = "hyperfactions_gui.nav.relations"; + public static final String TREASURY = "hyperfactions_gui.nav.treasury"; + public static final String SETTINGS = "hyperfactions_gui.nav.settings"; + public static final String LOGS = "hyperfactions_gui.nav.logs"; + public static final String HELP = "hyperfactions_gui.nav.help"; + public static final String ADMIN = "hyperfactions_gui.nav.admin"; + public static final String CREATE = "hyperfactions_gui.nav.create"; + public static final String PLAYER_SETTINGS = "hyperfactions_gui.nav.player_settings"; + + private Nav() {} + } + + /** Main menu page labels. */ + public static final class MainMenu { + public static final String TITLE = "hyperfactions_gui.main_menu.title"; + public static final String SECTION_MY_FACTION = "hyperfactions_gui.main_menu.section_my_faction"; + public static final String SECTION_GET_STARTED = "hyperfactions_gui.main_menu.section_get_started"; + public static final String SECTION_TERRITORY = "hyperfactions_gui.main_menu.section_territory"; + public static final String SECTION_BROWSE = "hyperfactions_gui.main_menu.section_browse"; + public static final String SECTION_ADMIN = "hyperfactions_gui.main_menu.section_admin"; + public static final String CLAIM_HINT = "hyperfactions_gui.main_menu.claim_hint"; + + private MainMenu() {} + } + + // ===================================================================== + // GUI — Shared labels + // ===================================================================== + + /** Shared GUI labels used across multiple pages. */ + public static final class GuiCommon { + public static final String FACTION_COUNT = "hyperfactions_gui.common.faction_count"; + public static final String LEADER_LABEL = "hyperfactions_gui.common.leader_label"; + public static final String SORT_POWER = "hyperfactions_gui.common.sort_power"; + public static final String SORT_MEMBERS = "hyperfactions_gui.common.sort_members"; + public static final String PAGE_FORMAT = "hyperfactions_gui.common.page_format"; + public static final String OWN_FACTION = "hyperfactions_gui.common.own_faction"; + public static final String SEARCH = "hyperfactions_gui.common.search"; + public static final String SORT = "hyperfactions_gui.common.sort"; + public static final String PREV = "hyperfactions_gui.common.prev"; + public static final String NEXT = "hyperfactions_gui.common.next"; + + public static final String TREASURY_NOT_AVAILABLE = "hyperfactions_gui.common.treasury_not_available"; + + private GuiCommon() {} + } + + // ===================================================================== + // GUI — Confirmation pages + // ===================================================================== + + /** Confirmation page messages (disband, leave, transfer). */ + public static final class ConfirmGui { + // Static UI labels + public static final String DISBAND_TITLE = "hyperfactions_gui.confirm.disband_title"; + public static final String DISBAND_PROMPT = "hyperfactions_gui.confirm.disband_prompt"; + public static final String DISBAND_WARNING = "hyperfactions_gui.confirm.disband_warning"; + public static final String LEAVE_TITLE = "hyperfactions_gui.confirm.leave_title"; + public static final String LEAVE_PROMPT = "hyperfactions_gui.confirm.leave_prompt"; + public static final String LEAVE_WARNING = "hyperfactions_gui.confirm.leave_warning"; + public static final String LEADER_LEAVE_TITLE = "hyperfactions_gui.confirm.leader_leave_title"; + public static final String LEADER_LEAVE_PROMPT = "hyperfactions_gui.confirm.leader_leave_prompt"; + public static final String TRANSFER_TITLE = "hyperfactions_gui.confirm.transfer_title"; + public static final String TRANSFER_PROMPT = "hyperfactions_gui.confirm.transfer_prompt"; + public static final String TRANSFER_WARNING = "hyperfactions_gui.confirm.transfer_warning"; + public static final String ERROR_TITLE = "hyperfactions_gui.confirm.error_title"; + public static final String ERROR_DEFAULT = "hyperfactions_gui.confirm.error_default"; + // DisbandConfirm + public static final String DISBAND_NOT_LEADER = "hyperfactions_gui.confirm.disband_not_leader"; + public static final String DISBANDED = "hyperfactions_gui.confirm.disbanded"; + public static final String DISBAND_FAILED = "hyperfactions_gui.confirm.disband_failed"; + // LeaderLeaveConfirm + public static final String SUCCESSION_TITLE = "hyperfactions_gui.confirm.succession_title"; + public static final String NO_MEMBERS_WARNING = "hyperfactions_gui.confirm.no_members_warning"; + public static final String WILL_DISBAND = "hyperfactions_gui.confirm.will_disband"; + public static final String NOT_IN_FACTION = "hyperfactions_gui.confirm.not_in_faction"; + public static final String NOT_LEADER_ANYMORE = "hyperfactions_gui.confirm.not_leader_anymore"; + public static final String NO_SUCCESSOR = "hyperfactions_gui.confirm.no_successor"; + public static final String TRANSFER_FAILED = "hyperfactions_gui.confirm.transfer_failed"; + public static final String LEADER_LEFT = "hyperfactions_gui.confirm.leader_left"; + public static final String LEAVE_FAILED = "hyperfactions_gui.confirm.leave_failed"; + // LeaveConfirm + public static final String LEADER_CANNOT_LEAVE = "hyperfactions_gui.confirm.leader_cannot_leave"; + public static final String LEFT_FACTION = "hyperfactions_gui.confirm.left_faction"; + // TransferConfirm + public static final String FACTION_GONE = "hyperfactions_gui.confirm.faction_gone"; + public static final String NOT_LEADER_TRANSFER = "hyperfactions_gui.confirm.not_leader_transfer"; + public static final String LEADERSHIP_TRANSFERRED = "hyperfactions_gui.confirm.leadership_transferred"; + + private ConfirmGui() {} + } + + // ===================================================================== + // GUI — Faction info and main pages + // ===================================================================== + + /** Faction info page labels. */ + public static final class FactionInfoGui { + public static final String TITLE = "hyperfactions_gui.faction_info.title"; + public static final String STATUS_OPEN = "hyperfactions_gui.faction_info.status_open"; + public static final String STATUS_INVITE_ONLY = "hyperfactions_gui.faction_info.status_invite_only"; + public static final String STATUS_RAIDABLE = "hyperfactions_gui.faction_info.status_raidable"; + public static final String STATUS_PROTECTED = "hyperfactions_gui.faction_info.status_protected"; + public static final String OFFICERS_MORE = "hyperfactions_gui.faction_info.officers_more"; + // Stat card headers + public static final String POWER_HEADER = "hyperfactions_gui.faction_info.power_header"; + public static final String CLAIMS_HEADER = "hyperfactions_gui.faction_info.claims_header"; + public static final String MEMBERS_HEADER = "hyperfactions_gui.faction_info.members_header"; + public static final String RELATIONS_HEADER = "hyperfactions_gui.faction_info.relations_header"; + public static final String STATUS_HEADER = "hyperfactions_gui.faction_info.status_header"; + public static final String TREASURY_HEADER = "hyperfactions_gui.faction_info.treasury_header"; + // Stat card subtitles + public static final String CURRENT_MAX = "hyperfactions_gui.faction_info.current_max"; + public static final String CLAIMED_MAX = "hyperfactions_gui.faction_info.claimed_max"; + public static final String ALLY_ENEMY = "hyperfactions_gui.faction_info.ally_enemy"; + public static final String FACTION_BALANCE = "hyperfactions_gui.faction_info.faction_balance"; + // Leadership labels + public static final String LEADER_LABEL = "hyperfactions_gui.faction_info.leader_label"; + public static final String OFFICERS_LABEL = "hyperfactions_gui.faction_info.officers_label"; + // Button text + public static final String VIEW_MEMBERS_BTN = "hyperfactions_gui.faction_info.view_members_btn"; + public static final String RELATIONS_BTN = "hyperfactions_gui.faction_info.relations_btn"; + + private FactionInfoGui() {} + } + + /** Faction main page (no-faction view) labels and messages. */ + public static final class FactionMainGui { + public static final String NO_FACTION = "hyperfactions_gui.main.no_faction"; + public static final String JOINED = "hyperfactions_gui.main.joined"; + public static final String JOIN_FAILED = "hyperfactions_gui.main.join_failed"; + public static final String INVITE_DECLINED = "hyperfactions_gui.main.invite_declined"; + public static final String COOLDOWN = "hyperfactions_gui.main.cooldown"; + public static final String WORLD_NOT_FOUND = "hyperfactions_gui.main.world_not_found"; + public static final String LEAVE_FAILED = "hyperfactions_gui.main.leave_failed"; + + private FactionMainGui() {} + } + + // ===================================================================== + // GUI — Modal dialogs (rename, description, tag) + // ===================================================================== + + /** Rename modal page messages. */ + public static final class RenameGui { + public static final String TITLE = "hyperfactions_gui.rename.title"; + public static final String CURRENT_LABEL = "hyperfactions_gui.rename.current_label"; + public static final String NEW_NAME_LABEL = "hyperfactions_gui.rename.new_name_label"; + public static final String NO_PERMISSION = "hyperfactions_gui.rename.no_permission"; + public static final String ENTER_NAME = "hyperfactions_gui.rename.enter_name"; + public static final String TOO_SHORT = "hyperfactions_gui.rename.too_short"; + public static final String TOO_LONG = "hyperfactions_gui.rename.too_long"; + public static final String SAME_NAME = "hyperfactions_gui.rename.same_name"; + public static final String NAME_TAKEN = "hyperfactions_gui.rename.name_taken"; + public static final String SUCCESS = "hyperfactions_gui.rename.success"; + + private RenameGui() {} + } + + /** Description modal page messages. */ + public static final class DescGui { + public static final String TITLE = "hyperfactions_gui.desc.title"; + public static final String CURRENT_LABEL = "hyperfactions_gui.desc.current_label"; + public static final String NEW_DESC_LABEL = "hyperfactions_gui.desc.new_desc_label"; + public static final String NO_PERMISSION = "hyperfactions_gui.desc.no_permission"; + public static final String DISPLAY_NONE = "hyperfactions_gui.desc.display_none"; + public static final String CLEARED = "hyperfactions_gui.desc.cleared"; + public static final String UPDATED = "hyperfactions_gui.desc.updated"; + + private DescGui() {} + } + + /** Tag modal page messages. */ + public static final class TagGui { + public static final String TITLE = "hyperfactions_gui.tag.title"; + public static final String CURRENT_LABEL = "hyperfactions_gui.tag.current_label"; + public static final String INSTRUCTIONS = "hyperfactions_gui.tag.instructions"; + public static final String HELP_TEXT = "hyperfactions_gui.tag.help_text"; + public static final String NO_PERMISSION = "hyperfactions_gui.tag.no_permission"; + public static final String DISPLAY_NONE = "hyperfactions_gui.tag.display_none"; + public static final String CLEARED = "hyperfactions_gui.tag.cleared"; + public static final String TOO_SHORT = "hyperfactions_gui.tag.too_short"; + public static final String TOO_LONG = "hyperfactions_gui.tag.too_long"; + public static final String INVALID_FORMAT = "hyperfactions_gui.tag.invalid_format"; + public static final String SAME_TAG = "hyperfactions_gui.tag.same_tag"; + public static final String TAG_TAKEN = "hyperfactions_gui.tag.tag_taken"; + public static final String SUCCESS = "hyperfactions_gui.tag.success"; + + private TagGui() {} + } + + // ===================================================================== + // GUI — Dashboard + // ===================================================================== + + /** Dashboard page labels and messages. */ + public static final class DashboardGui { + public static final String TITLE = "hyperfactions_gui.dashboard.title"; + public static final String POWER_LABEL = "hyperfactions_gui.dashboard.power_label"; + public static final String LAND_LABEL = "hyperfactions_gui.dashboard.land_label"; + public static final String MEMBERS_LABEL = "hyperfactions_gui.dashboard.members_label"; + public static final String ONLINE_LABEL = "hyperfactions_gui.dashboard.online_label"; + public static final String ALLIES_LABEL = "hyperfactions_gui.dashboard.allies_label"; + public static final String ENEMIES_LABEL = "hyperfactions_gui.dashboard.enemies_label"; + public static final String RELATIONS_LABEL = "hyperfactions_gui.dashboard.relations_label"; + public static final String ALLY_ENEMY_LABEL = "hyperfactions_gui.dashboard.ally_enemy_label"; + public static final String STATUS_LABEL = "hyperfactions_gui.dashboard.status_label"; + public static final String INVITES_LABEL = "hyperfactions_gui.dashboard.invites_label"; + public static final String SENT_REQUESTS_LABEL = "hyperfactions_gui.dashboard.sent_requests_label"; + public static final String TREASURY_LABEL = "hyperfactions_gui.dashboard.treasury_label"; + public static final String UPKEEP_LABEL = "hyperfactions_gui.dashboard.upkeep_label"; + public static final String PER_CYCLE = "hyperfactions_gui.dashboard.per_cycle"; + public static final String YOUR_WALLET = "hyperfactions_gui.dashboard.your_wallet"; + public static final String PERSONAL_BALANCE = "hyperfactions_gui.dashboard.personal_balance"; + public static final String QUICK_ACTIONS = "hyperfactions_gui.dashboard.quick_actions"; + public static final String TELEPORT_LABEL = "hyperfactions_gui.dashboard.teleport_label"; + public static final String TERRITORY_LABEL = "hyperfactions_gui.dashboard.territory_label"; + public static final String CHANNEL_LABEL = "hyperfactions_gui.dashboard.channel_label"; + public static final String MEMBERSHIP_LABEL = "hyperfactions_gui.dashboard.membership_label"; + public static final String RECENT_ACTIVITY = "hyperfactions_gui.dashboard.recent_activity"; + public static final String VIEW_ALL = "hyperfactions_gui.dashboard.view_all"; + public static final String INCOME_24H = "hyperfactions_gui.dashboard.income_24h"; + public static final String DEPOSITS_TRANSFERS_IN = "hyperfactions_gui.dashboard.deposits_transfers_in"; + public static final String EXPENSES_24H = "hyperfactions_gui.dashboard.expenses_24h"; + public static final String WITHDRAWALS_TRANSFERS_OUT = "hyperfactions_gui.dashboard.withdrawals_transfers_out"; + public static final String FACTION_GONE = "hyperfactions_gui.dashboard.faction_gone"; + public static final String AVAILABLE = "hyperfactions_gui.dashboard.available"; + public static final String AT_RISK = "hyperfactions_gui.dashboard.at_risk"; + public static final String ONLINE_COUNT = "hyperfactions_gui.dashboard.online_count"; + public static final String STATUS_INVITE = "hyperfactions_gui.dashboard.status_invite"; + public static final String IN_GRACE = "hyperfactions_gui.dashboard.in_grace"; + public static final String BILLABLE_CHUNKS = "hyperfactions_gui.dashboard.billable_chunks"; + public static final String BTN_HOME = "hyperfactions_gui.dashboard.btn_home"; + public static final String BTN_SET_HOME = "hyperfactions_gui.dashboard.btn_set_home"; + public static final String BTN_CLAIM = "hyperfactions_gui.dashboard.btn_claim"; + public static final String CHAT_PREFIX = "hyperfactions_gui.dashboard.chat_prefix"; + public static final String BTN_LEAVE = "hyperfactions_gui.dashboard.btn_leave"; + public static final String NO_ACTIVITY = "hyperfactions_gui.dashboard.no_activity"; + public static final String TIME_NOW = "hyperfactions_gui.dashboard.time_now"; + public static final String TIME_MINUTES = "hyperfactions_gui.dashboard.time_minutes"; + public static final String TIME_HOURS = "hyperfactions_gui.dashboard.time_hours"; + public static final String TIME_DAYS = "hyperfactions_gui.dashboard.time_days"; + public static final String NO_HOME_HINT = "hyperfactions_gui.dashboard.no_home_hint"; + public static final String CHAT_MODE_SET = "hyperfactions_gui.dashboard.chat_mode_set"; + public static final String CLAIM_SUCCESS = "hyperfactions_gui.dashboard.claim_success"; + public static final String UPKEEP_IN = "hyperfactions_gui.dashboard.upkeep_in"; + + private DashboardGui() {} + } + + // ===================================================================== + // GUI — Members page + // ===================================================================== + + /** Members page labels and messages. */ + public static final class MembersGui { + public static final String TITLE = "hyperfactions_gui.members.title"; + public static final String SEARCH_LABEL = "hyperfactions_gui.members.search_label"; + public static final String SORT_LABEL = "hyperfactions_gui.members.sort_label"; + public static final String PREV_BTN = "hyperfactions_gui.members.prev_btn"; + public static final String NEXT_BTN = "hyperfactions_gui.members.next_btn"; + public static final String SORT_ROLE = "hyperfactions_gui.members.sort_role"; + public static final String SORT_LAST_ONLINE = "hyperfactions_gui.members.sort_last_online"; + public static final String JUST_NOW = "hyperfactions_gui.members.just_now"; + public static final String AGO = "hyperfactions_gui.members.ago"; + public static final String NEVER = "hyperfactions_gui.members.never"; + public static final String MEMBER_NOT_FOUND = "hyperfactions_gui.members.member_not_found"; + public static final String PROMOTED = "hyperfactions_gui.members.promoted"; + public static final String PROMOTE_FAILED = "hyperfactions_gui.members.promote_failed"; + public static final String DEMOTED = "hyperfactions_gui.members.demoted"; + public static final String DEMOTE_FAILED = "hyperfactions_gui.members.demote_failed"; + public static final String KICKED = "hyperfactions_gui.members.kicked"; + public static final String KICK_FAILED = "hyperfactions_gui.members.kick_failed"; + public static final String LABEL_POWER = "hyperfactions_gui.members.label_power"; + public static final String LABEL_JOINED = "hyperfactions_gui.members.label_joined"; + public static final String LABEL_LAST_DEATH = "hyperfactions_gui.members.label_last_death"; + public static final String BTN_PROMOTE = "hyperfactions_gui.members.btn_promote"; + public static final String BTN_DEMOTE = "hyperfactions_gui.members.btn_demote"; + public static final String BTN_KICK = "hyperfactions_gui.members.btn_kick"; + public static final String BTN_MAKE_LEADER = "hyperfactions_gui.members.btn_make_leader"; + public static final String BTN_PROFILE = "hyperfactions_gui.members.btn_profile"; + public static final String SELF_LABEL = "hyperfactions_gui.members.self_label"; + + private MembersGui() {} + } + + // ===================================================================== + // GUI — Browser page + // ===================================================================== + + /** Browser page labels. */ + public static final class BrowserGui { + public static final String TITLE = "hyperfactions_gui.browser.title"; + public static final String SEARCH_LABEL = "hyperfactions_gui.browser.search_label"; + public static final String SORT_LABEL = "hyperfactions_gui.browser.sort_label"; + public static final String PREV_BTN = "hyperfactions_gui.browser.prev_btn"; + public static final String NEXT_BTN = "hyperfactions_gui.browser.next_btn"; + public static final String SORT_NAME = "hyperfactions_gui.browser.sort_name"; + public static final String INVALID_FACTION = "hyperfactions_gui.browser.invalid_faction"; + public static final String LABEL_POWER = "hyperfactions_gui.browser.label_power"; + public static final String LABEL_CLAIMS = "hyperfactions_gui.browser.label_claims"; + public static final String LABEL_MEMBERS = "hyperfactions_gui.browser.label_members"; + public static final String LABEL_RECRUITMENT = "hyperfactions_gui.browser.label_recruitment"; + public static final String LABEL_CREATED = "hyperfactions_gui.browser.label_created"; + public static final String LABEL_DESCRIPTION = "hyperfactions_gui.browser.label_description"; + public static final String VIEW_INFO_BTN = "hyperfactions_gui.browser.view_info_btn"; + public static final String LABEL_LEADER = "hyperfactions_gui.browser.label_leader"; + + private BrowserGui() {} + } + + // ===================================================================== + // GUI — Leaderboard page + // ===================================================================== + + /** Leaderboard page labels. */ + public static final class LeaderboardGui { + public static final String TITLE = "hyperfactions_gui.leaderboard.title"; + public static final String RANK_BY = "hyperfactions_gui.leaderboard.rank_by"; + public static final String COL_RANK = "hyperfactions_gui.leaderboard.col_rank"; + public static final String COL_FACTION = "hyperfactions_gui.leaderboard.col_faction"; + public static final String COL_CLAIMS = "hyperfactions_gui.leaderboard.col_claims"; + public static final String COL_MEMBERS = "hyperfactions_gui.leaderboard.col_members"; + public static final String PREV_BTN = "hyperfactions_gui.leaderboard.prev_btn"; + public static final String NEXT_BTN = "hyperfactions_gui.leaderboard.next_btn"; + public static final String SORT_KD = "hyperfactions_gui.leaderboard.sort_kd"; + public static final String SORT_TERRITORY = "hyperfactions_gui.leaderboard.sort_territory"; + public static final String SORT_BALANCE = "hyperfactions_gui.leaderboard.sort_balance"; + + private LeaderboardGui() {} + } + + // ===================================================================== + // GUI — Player info page + // ===================================================================== + + /** Player info page labels and messages. */ + public static final class PlayerInfoGui { + public static final String TITLE = "hyperfactions_gui.playerinfo.title"; + public static final String FIRST_JOINED_LABEL = "hyperfactions_gui.playerinfo.first_joined_label"; + public static final String LAST_ONLINE_LABEL = "hyperfactions_gui.playerinfo.last_online_label"; + public static final String FACTION_LABEL = "hyperfactions_gui.playerinfo.faction_label"; + public static final String ROLE_LABEL = "hyperfactions_gui.playerinfo.role_label"; + public static final String JOINED_LABEL_STATIC = "hyperfactions_gui.playerinfo.joined_label_static"; + public static final String NOT_IN_FACTION = "hyperfactions_gui.playerinfo.not_in_faction"; + public static final String POWER_HEADER = "hyperfactions_gui.playerinfo.power_header"; + public static final String CURRENT_MAX = "hyperfactions_gui.playerinfo.current_max"; + public static final String COMBAT_HEADER = "hyperfactions_gui.playerinfo.combat_header"; + public static final String KILLS_DEATHS = "hyperfactions_gui.playerinfo.kills_deaths"; + public static final String KDR_HEADER = "hyperfactions_gui.playerinfo.kdr_header"; + public static final String MEMBERSHIP_HISTORY = "hyperfactions_gui.playerinfo.membership_history"; + public static final String VIEW_FACTION_BTN = "hyperfactions_gui.playerinfo.view_faction_btn"; + public static final String NOW = "hyperfactions_gui.playerinfo.now"; + public static final String HISTORY_COUNT = "hyperfactions_gui.playerinfo.history_count"; + public static final String JOINED_LABEL = "hyperfactions_gui.playerinfo.joined_label"; + public static final String CURRENT = "hyperfactions_gui.playerinfo.current"; + public static final String LEFT_LABEL = "hyperfactions_gui.playerinfo.left_label"; + public static final String NO_HISTORY = "hyperfactions_gui.playerinfo.no_history"; + public static final String FACTION_GONE = "hyperfactions_gui.playerinfo.faction_gone"; + public static final String REASON_ACTIVE = "hyperfactions_gui.playerinfo.reason_active"; + public static final String REASON_LEFT = "hyperfactions_gui.playerinfo.reason_left"; + public static final String REASON_KICKED = "hyperfactions_gui.playerinfo.reason_kicked"; + public static final String REASON_DISBANDED = "hyperfactions_gui.playerinfo.reason_disbanded"; + + private PlayerInfoGui() {} + } + + // ===================================================================== + // GUI — Help page + // ===================================================================== + + /** Help GUI category display names and new player help page content. */ + public static final class HelpGui { + public static final String WELCOME = "hyperfactions_gui.help.category.welcome"; + public static final String YOUR_FACTION = "hyperfactions_gui.help.category.your_faction"; + public static final String POWER_LAND = "hyperfactions_gui.help.category.power_land"; + public static final String DIPLOMACY = "hyperfactions_gui.help.category.diplomacy"; + public static final String COMBAT = "hyperfactions_gui.help.category.combat"; + public static final String ECONOMY = "hyperfactions_gui.help.category.economy"; + public static final String QUICK_REF = "hyperfactions_gui.help.category.quick_ref"; + // Admin help categories + public static final String ADMIN_OVERVIEW = "hyperfactions_gui.help.category.admin_overview"; + public static final String ADMIN_FACTIONS = "hyperfactions_gui.help.category.admin_factions"; + public static final String ADMIN_ZONES = "hyperfactions_gui.help.category.admin_zones"; + public static final String ADMIN_POWER = "hyperfactions_gui.help.category.admin_power"; + public static final String ADMIN_ECONOMY = "hyperfactions_gui.help.category.admin_economy"; + public static final String ADMIN_CONFIG = "hyperfactions_gui.help.category.admin_config"; + public static final String ADMIN_MAINTENANCE = "hyperfactions_gui.help.category.admin_maintenance"; + public static final String ADMIN_REFERENCE = "hyperfactions_gui.help.category.admin_reference"; + // Help Center page title + public static final String HELP_CENTER_TITLE = "hyperfactions_gui.help.center_title"; + // New player help page + public static final String GETTING_STARTED_TITLE = "hyperfactions_gui.help.getting_started_title"; + public static final String WHAT_ARE_FACTIONS_TITLE = "hyperfactions_gui.help.what_are_factions_title"; + public static final String WHAT_ARE_FACTIONS_1 = "hyperfactions_gui.help.what_are_factions_1"; + public static final String WHAT_ARE_FACTIONS_2 = "hyperfactions_gui.help.what_are_factions_2"; + public static final String WHAT_ARE_FACTIONS_BULLET_1 = "hyperfactions_gui.help.what_are_factions_bullet_1"; + public static final String WHAT_ARE_FACTIONS_BULLET_2 = "hyperfactions_gui.help.what_are_factions_bullet_2"; + public static final String WHAT_ARE_FACTIONS_BULLET_3 = "hyperfactions_gui.help.what_are_factions_bullet_3"; + public static final String JOINING_TITLE = "hyperfactions_gui.help.joining_title"; + public static final String JOINING_DESC = "hyperfactions_gui.help.joining_desc"; + public static final String JOINING_BULLET_1 = "hyperfactions_gui.help.joining_bullet_1"; + public static final String JOINING_BULLET_2 = "hyperfactions_gui.help.joining_bullet_2"; + public static final String JOINING_BULLET_3 = "hyperfactions_gui.help.joining_bullet_3"; + public static final String CREATING_TITLE = "hyperfactions_gui.help.creating_title"; + public static final String CREATING_DESC = "hyperfactions_gui.help.creating_desc"; + public static final String CREATING_BULLET_1 = "hyperfactions_gui.help.creating_bullet_1"; + public static final String CREATING_BULLET_2 = "hyperfactions_gui.help.creating_bullet_2"; + public static final String COMMANDS_TITLE = "hyperfactions_gui.help.commands_title"; + public static final String CMD_F = "hyperfactions_gui.help.cmd_f"; + public static final String CMD_F_LIST = "hyperfactions_gui.help.cmd_f_list"; + public static final String CMD_F_JOIN = "hyperfactions_gui.help.cmd_f_join"; + public static final String CMD_F_CREATE = "hyperfactions_gui.help.cmd_f_create"; + public static final String CMD_F_HELP = "hyperfactions_gui.help.cmd_f_help"; + public static final String TIP = "hyperfactions_gui.help.tip"; + + private HelpGui() {} + } + + // ===================================================================== + // GUI — Relations page + // ===================================================================== + + /** Relations page labels and messages. */ + public static final class RelationsGui { + public static final String TITLE = "hyperfactions_gui.relations.title"; + public static final String TAB_RELATIONS = "hyperfactions_gui.relations.tab_relations"; + public static final String TAB_PENDING = "hyperfactions_gui.relations.tab_pending"; + public static final String SET_RELATION_BTN = "hyperfactions_gui.relations.set_relation_btn"; + public static final String PREV_BTN = "hyperfactions_gui.relations.prev_btn"; + public static final String NEXT_BTN = "hyperfactions_gui.relations.next_btn"; + public static final String RELATION_COUNT = "hyperfactions_gui.relations.relation_count"; + public static final String REQUEST_COUNT = "hyperfactions_gui.relations.request_count"; + public static final String TYPE_ALLY = "hyperfactions_gui.relations.type_ally"; + public static final String TYPE_ENEMY = "hyperfactions_gui.relations.type_enemy"; + public static final String TYPE_INCOMING = "hyperfactions_gui.relations.type_incoming"; + public static final String TYPE_OUTGOING = "hyperfactions_gui.relations.type_outgoing"; + public static final String INCOMING_REQUEST = "hyperfactions_gui.relations.incoming_request"; + public static final String OUTGOING_REQUEST = "hyperfactions_gui.relations.outgoing_request"; + public static final String EMPTY_RELATIONS = "hyperfactions_gui.relations.empty_relations"; + public static final String EMPTY_RELATIONS_HINT = "hyperfactions_gui.relations.empty_relations_hint"; + public static final String EMPTY_PENDING = "hyperfactions_gui.relations.empty_pending"; + public static final String TODAY = "hyperfactions_gui.relations.today"; + public static final String ONE_DAY_AGO = "hyperfactions_gui.relations.one_day_ago"; + public static final String DAYS_AGO = "hyperfactions_gui.relations.days_ago"; + public static final String NOW_NEUTRAL = "hyperfactions_gui.relations.now_neutral"; + public static final String NOW_ENEMIES = "hyperfactions_gui.relations.now_enemies"; + public static final String REQUEST_SENT = "hyperfactions_gui.relations.request_sent"; + public static final String NOW_ALLIED = "hyperfactions_gui.relations.now_allied"; + public static final String REQUEST_DECLINED = "hyperfactions_gui.relations.request_declined"; + public static final String REQUEST_CANCELLED = "hyperfactions_gui.relations.request_cancelled"; + public static final String FAILED = "hyperfactions_gui.relations.failed"; + public static final String SEARCH_HINT = "hyperfactions_gui.relations.search_hint"; + public static final String NO_RESULTS = "hyperfactions_gui.relations.no_results"; + public static final String POWER_DISPLAY = "hyperfactions_gui.relations.power_display"; + public static final String LABEL_MEMBERS = "hyperfactions_gui.relations.label_members"; + public static final String LABEL_POWER = "hyperfactions_gui.relations.label_power"; + public static final String LABEL_SINCE = "hyperfactions_gui.relations.label_since"; + public static final String LABEL_CLAIMS = "hyperfactions_gui.relations.label_claims"; + public static final String LABEL_DIRECTION = "hyperfactions_gui.relations.label_direction"; + public static final String BTN_VIEW = "hyperfactions_gui.relations.btn_view"; + public static final String BTN_NEUTRAL = "hyperfactions_gui.relations.btn_neutral"; + public static final String BTN_ENEMY = "hyperfactions_gui.relations.btn_enemy"; + public static final String BTN_ALLY = "hyperfactions_gui.relations.btn_ally"; + public static final String BTN_ACCEPT = "hyperfactions_gui.relations.btn_accept"; + public static final String BTN_DECLINE = "hyperfactions_gui.relations.btn_decline"; + public static final String BTN_CANCEL = "hyperfactions_gui.relations.btn_cancel"; + + private RelationsGui() {} + } + + // ===================================================================== + // GUI — Settings page + // ===================================================================== + + /** Settings page labels and messages. */ + public static final class SettingsGui { + public static final String TITLE = "hyperfactions_gui.settings.title"; + public static final String GENERAL = "hyperfactions_gui.settings.general"; + public static final String NAME_LABEL = "hyperfactions_gui.settings.name_label"; + public static final String TAG_LABEL = "hyperfactions_gui.settings.tag_label"; + public static final String DESC_LABEL = "hyperfactions_gui.settings.desc_label"; + public static final String EDIT_BTN = "hyperfactions_gui.settings.edit_btn"; + public static final String RECRUITMENT = "hyperfactions_gui.settings.recruitment"; + public static final String STATUS_LABEL = "hyperfactions_gui.settings.status_label"; + public static final String HOME_LOCATION = "hyperfactions_gui.settings.home_location"; + public static final String LOCATION_LABEL = "hyperfactions_gui.settings.location_label"; + public static final String SET_HOME_BTN = "hyperfactions_gui.settings.set_home_btn"; + public static final String TELEPORT_BTN = "hyperfactions_gui.settings.teleport_btn"; + public static final String DELETE_BTN = "hyperfactions_gui.settings.delete_btn"; + public static final String OPTIONAL_FEATURES = "hyperfactions_gui.settings.optional_features"; + public static final String CONFIGURE_MODULES = "hyperfactions_gui.settings.configure_modules"; + public static final String MODULES_BTN = "hyperfactions_gui.settings.modules_btn"; + public static final String DANGER_ZONE = "hyperfactions_gui.settings.danger_zone"; + public static final String IRREVERSIBLE = "hyperfactions_gui.settings.irreversible"; + public static final String DISBAND_BTN = "hyperfactions_gui.settings.disband_btn"; + public static final String LOCK_HINT = "hyperfactions_gui.settings.lock_hint"; + public static final String TERRITORY_PERMISSIONS = "hyperfactions_gui.settings.territory_permissions"; + public static final String COL_OUT = "hyperfactions_gui.settings.col_out"; + public static final String COL_ALLY = "hyperfactions_gui.settings.col_ally"; + public static final String COL_MEM = "hyperfactions_gui.settings.col_mem"; + public static final String COL_OFF = "hyperfactions_gui.settings.col_off"; + public static final String CAT_BUILDING = "hyperfactions_gui.settings.cat_building"; + public static final String PERM_BREAK = "hyperfactions_gui.settings.perm_break"; + public static final String PERM_PLACE = "hyperfactions_gui.settings.perm_place"; + public static final String CAT_INTERACTION = "hyperfactions_gui.settings.cat_interaction"; + public static final String INTERACTION_HINT = "hyperfactions_gui.settings.interaction_hint"; + public static final String PERM_ALL = "hyperfactions_gui.settings.perm_all"; + public static final String PERM_DOOR = "hyperfactions_gui.settings.perm_door"; + public static final String PERM_CHEST = "hyperfactions_gui.settings.perm_chest"; + public static final String PERM_BENCH = "hyperfactions_gui.settings.perm_bench"; + public static final String PERM_PROCESSING = "hyperfactions_gui.settings.perm_processing"; + public static final String PERM_SEAT = "hyperfactions_gui.settings.perm_seat"; + public static final String PERM_TRANSPORT = "hyperfactions_gui.settings.perm_transport"; + public static final String CAT_OTHER = "hyperfactions_gui.settings.cat_other"; + public static final String PERM_CRATE = "hyperfactions_gui.settings.perm_crate"; + public static final String PERM_NPC_TAME = "hyperfactions_gui.settings.perm_npc_tame"; + public static final String PERM_PVE = "hyperfactions_gui.settings.perm_pve"; + public static final String APPEARANCE = "hyperfactions_gui.settings.appearance"; + public static final String COLOR_LABEL = "hyperfactions_gui.settings.color_label"; + public static final String MOB_SPAWNING = "hyperfactions_gui.settings.mob_spawning"; + public static final String MOB_SPAWNING_HINT = "hyperfactions_gui.settings.mob_spawning_hint"; + public static final String MOB_SPAWNING_LABEL = "hyperfactions_gui.settings.mob_spawning_label"; + public static final String HOSTILE_MOBS = "hyperfactions_gui.settings.hostile_mobs"; + public static final String PASSIVE_MOBS = "hyperfactions_gui.settings.passive_mobs"; + public static final String NEUTRAL_MOBS = "hyperfactions_gui.settings.neutral_mobs"; + public static final String FACTION_SETTINGS = "hyperfactions_gui.settings.faction_settings"; + public static final String PVP_IN_TERRITORY = "hyperfactions_gui.settings.pvp_in_territory"; + public static final String OFFICERS_CAN_EDIT = "hyperfactions_gui.settings.officers_can_edit"; + public static final String LEADER_ONLY = "hyperfactions_gui.settings.leader_only"; + public static final String OFFICERS_ONLY = "hyperfactions_gui.settings.officers_only"; + public static final String DISPLAY_NONE = "hyperfactions_gui.settings.display_none"; + public static final String HOME_NOT_SET = "hyperfactions_gui.settings.home_not_set"; + public static final String NO_PERMISSION = "hyperfactions_gui.settings.no_permission"; + public static final String ONLY_LEADER_DISBAND = "hyperfactions_gui.settings.only_leader_disband"; + public static final String PERM_LOCKED = "hyperfactions_gui.settings.perm_locked"; + public static final String NO_PERM_EDIT = "hyperfactions_gui.settings.no_perm_edit"; + public static final String ONLY_LEADER_OFFICERS = "hyperfactions_gui.settings.only_leader_officers"; + public static final String PVP_ENABLED = "hyperfactions_gui.settings.pvp_enabled"; + public static final String PVP_DISABLED = "hyperfactions_gui.settings.pvp_disabled"; + public static final String NOT_IN_TERRITORY = "hyperfactions_gui.settings.not_in_territory"; + public static final String HOME_SET = "hyperfactions_gui.settings.home_set"; + public static final String RECRUITMENT_SET = "hyperfactions_gui.settings.recruitment_set"; + public static final String HOME_NO_SET = "hyperfactions_gui.settings.home_no_set"; + public static final String HOME_DELETED = "hyperfactions_gui.settings.home_deleted"; + + private SettingsGui() {} + } + + // ===================================================================== + // GUI — Modules page + // ===================================================================== + + /** Modules page labels. */ + public static final class ModulesGui { + public static final String TITLE = "hyperfactions_gui.modules.title"; + public static final String DESCRIPTION = "hyperfactions_gui.modules.description"; + public static final String CONFIGURE_BTN = "hyperfactions_gui.modules.configure_btn"; + public static final String BACK_BTN = "hyperfactions_gui.modules.back_btn"; + public static final String TREASURY_NAME = "hyperfactions_gui.modules.treasury_name"; + public static final String TREASURY_DESC = "hyperfactions_gui.modules.treasury_desc"; + public static final String RAIDS_NAME = "hyperfactions_gui.modules.raids_name"; + public static final String RAIDS_DESC = "hyperfactions_gui.modules.raids_desc"; + public static final String LEVELS_NAME = "hyperfactions_gui.modules.levels_name"; + public static final String LEVELS_DESC = "hyperfactions_gui.modules.levels_desc"; + public static final String WAR_NAME = "hyperfactions_gui.modules.war_name"; + public static final String WAR_DESC = "hyperfactions_gui.modules.war_desc"; + public static final String COMING_SOON = "hyperfactions_gui.modules.coming_soon"; + public static final String ACTIVE = "hyperfactions_gui.modules.active"; + public static final String VIEW_TREASURY = "hyperfactions_gui.modules.view_treasury"; + public static final String UNAVAILABLE = "hyperfactions_gui.modules.unavailable"; + public static final String NO_ECONOMY = "hyperfactions_gui.modules.no_economy"; + public static final String DISABLED = "hyperfactions_gui.modules.disabled"; + public static final String ECONOMY_NOT_AVAILABLE = "hyperfactions_gui.modules.economy_not_available"; + + private ModulesGui() {} + } + + // ===================================================================== + // GUI — Treasury page + // ===================================================================== + + /** Treasury page labels and messages. */ + public static final class TreasuryGui { + // Page labels + public static final String TITLE = "hyperfactions_gui.treasury.title"; + public static final String BALANCE_LABEL = "hyperfactions_gui.treasury.balance_label"; + public static final String INCOME_24H = "hyperfactions_gui.treasury.income_24h"; + public static final String DEPOSITS_TRANSFERS_IN = "hyperfactions_gui.treasury.deposits_transfers_in"; + public static final String EXPENSES_24H = "hyperfactions_gui.treasury.expenses_24h"; + public static final String WITHDRAWALS_TRANSFERS_OUT = "hyperfactions_gui.treasury.withdrawals_transfers_out"; + public static final String MAINTENANCE = "hyperfactions_gui.treasury.maintenance"; + public static final String RUNWAY_LABEL = "hyperfactions_gui.treasury.runway_label"; + public static final String ADD_FUNDS = "hyperfactions_gui.treasury.add_funds"; + public static final String DEPOSIT_BTN = "hyperfactions_gui.treasury.deposit_btn"; + public static final String TAKE_FUNDS = "hyperfactions_gui.treasury.take_funds"; + public static final String WITHDRAW_BTN = "hyperfactions_gui.treasury.withdraw_btn"; + public static final String SEND_TO_FACTION = "hyperfactions_gui.treasury.send_to_faction"; + public static final String TRANSFER_BTN = "hyperfactions_gui.treasury.transfer_btn"; + public static final String TREASURY_CONFIG = "hyperfactions_gui.treasury.treasury_config"; + public static final String SETTINGS_BTN = "hyperfactions_gui.treasury.settings_btn"; + public static final String RECENT_TRANSACTIONS = "hyperfactions_gui.treasury.recent_transactions"; + public static final String NO_TRANSACTIONS = "hyperfactions_gui.treasury.no_transactions"; + public static final String COL_DATE = "hyperfactions_gui.treasury.col_date"; + public static final String COL_TYPE = "hyperfactions_gui.treasury.col_type"; + public static final String COL_BY = "hyperfactions_gui.treasury.col_by"; + public static final String COL_AMOUNT = "hyperfactions_gui.treasury.col_amount"; + public static final String COL_DETAILS = "hyperfactions_gui.treasury.col_details"; + public static final String PAY_NOW_BTN = "hyperfactions_gui.treasury.pay_now_btn"; + public static final String COST_7D = "hyperfactions_gui.treasury.cost_7d"; + public static final String COST_14D = "hyperfactions_gui.treasury.cost_14d"; + public static final String COST_30D = "hyperfactions_gui.treasury.cost_30d"; + // Dashboard labels + public static final String WALLET_LABEL = "hyperfactions_gui.treasury.wallet_label"; + public static final String TREASURY_LABEL = "hyperfactions_gui.treasury.treasury_label"; + public static final String CHUNKS_DETAIL = "hyperfactions_gui.treasury.chunks_detail"; + public static final String COST_LABEL = "hyperfactions_gui.treasury.cost_label"; + public static final String PENDING = "hyperfactions_gui.treasury.pending"; + public static final String AUTO_PAY_ON = "hyperfactions_gui.treasury.auto_pay_on"; + public static final String AUTO_PAY_OFF = "hyperfactions_gui.treasury.auto_pay_off"; + public static final String RUNWAY_90_PLUS = "hyperfactions_gui.treasury.runway_90_plus"; + public static final String RUNWAY_DAYS = "hyperfactions_gui.treasury.runway_days"; + public static final String RUNWAY_DAY = "hyperfactions_gui.treasury.runway_day"; + public static final String RUNWAY_LESS_THAN_DAY = "hyperfactions_gui.treasury.runway_less_day"; + public static final String RUNWAY_NO_FUNDS = "hyperfactions_gui.treasury.runway_no_funds"; + public static final String GRACE_EXPIRES = "hyperfactions_gui.treasury.grace_expires"; + public static final String MISSED_PAYMENTS = "hyperfactions_gui.treasury.missed_payments"; + public static final String PAY_TO_CLEAR = "hyperfactions_gui.treasury.pay_to_clear"; + public static final String SYSTEM = "hyperfactions_gui.treasury.system"; + // Transaction types + public static final String TYPE_DEPOSIT = "hyperfactions_gui.treasury.type_deposit"; + public static final String TYPE_WITHDRAWAL = "hyperfactions_gui.treasury.type_withdrawal"; + public static final String TYPE_TRANSFER_IN = "hyperfactions_gui.treasury.type_transfer_in"; + public static final String TYPE_TRANSFER_OUT = "hyperfactions_gui.treasury.type_transfer_out"; + public static final String TYPE_PLAYER_TRANSFER = "hyperfactions_gui.treasury.type_player_transfer"; + public static final String TYPE_UPKEEP = "hyperfactions_gui.treasury.type_upkeep"; + public static final String TYPE_TAX = "hyperfactions_gui.treasury.type_tax"; + public static final String TYPE_WAR_COST = "hyperfactions_gui.treasury.type_war_cost"; + public static final String TYPE_RAID_COST = "hyperfactions_gui.treasury.type_raid_cost"; + public static final String TYPE_SPOILS = "hyperfactions_gui.treasury.type_spoils"; + public static final String TYPE_ADMIN = "hyperfactions_gui.treasury.type_admin"; + // Deposit/Withdraw modal + public static final String DEPOSIT_TITLE = "hyperfactions_gui.treasury.deposit_title"; + public static final String WITHDRAW_TITLE = "hyperfactions_gui.treasury.withdraw_title"; + public static final String FEE_LABEL = "hyperfactions_gui.treasury.fee_label"; + public static final String CONFIRM_DEPOSIT = "hyperfactions_gui.treasury.confirm_deposit"; + public static final String CONFIRM_WITHDRAWAL = "hyperfactions_gui.treasury.confirm_withdrawal"; + public static final String FROM_WALLET = "hyperfactions_gui.treasury.from_wallet"; + public static final String TO_WALLET = "hyperfactions_gui.treasury.to_wallet"; + public static final String ENTER_VALID_AMOUNT = "hyperfactions_gui.treasury.enter_valid_amount"; + public static final String INSUFFICIENT_WALLET = "hyperfactions_gui.treasury.insufficient_wallet"; + public static final String WALLET_WITHDRAW_FAILED = "hyperfactions_gui.treasury.wallet_withdraw_failed"; + public static final String DEPOSIT_FAILED_RETURNED = "hyperfactions_gui.treasury.deposit_failed_returned"; + public static final String DEPOSITED = "hyperfactions_gui.treasury.deposited"; + public static final String DEPOSITED_FEE = "hyperfactions_gui.treasury.deposited_fee"; + public static final String NO_WITHDRAW_PERMISSION = "hyperfactions_gui.treasury.no_withdraw_permission"; + public static final String WITHDRAW_DENIED = "hyperfactions_gui.treasury.withdraw_denied"; + public static final String INSUFFICIENT_TREASURY = "hyperfactions_gui.treasury.insufficient_treasury"; + public static final String WITHDRAW_LIMIT = "hyperfactions_gui.treasury.withdraw_limit"; + public static final String WITHDRAW_FAILED = "hyperfactions_gui.treasury.withdraw_failed"; + public static final String WALLET_DEPOSIT_WARN = "hyperfactions_gui.treasury.wallet_deposit_warn"; + public static final String WITHDREW = "hyperfactions_gui.treasury.withdrew"; + public static final String WITHDREW_FEE = "hyperfactions_gui.treasury.withdrew_fee"; + // Transfer search + public static final String SEARCH_HINT = "hyperfactions_gui.treasury.search_hint"; + public static final String NO_RESULTS = "hyperfactions_gui.treasury.no_results"; + public static final String TAG_PLAYER = "hyperfactions_gui.treasury.tag_player"; + public static final String TAG_FACTION = "hyperfactions_gui.treasury.tag_faction"; + public static final String SOURCE_ONLINE = "hyperfactions_gui.treasury.source_online"; + public static final String SOURCE_OFFLINE = "hyperfactions_gui.treasury.source_offline"; + public static final String SOURCE_PLAYER_DB = "hyperfactions_gui.treasury.source_player_db"; + // Transfer confirm + public static final String NO_TRANSFER_PERMISSION = "hyperfactions_gui.treasury.no_transfer_permission"; + public static final String TRANSFER_DENIED = "hyperfactions_gui.treasury.transfer_denied"; + public static final String INVALID_TARGET_FACTION = "hyperfactions_gui.treasury.invalid_target_faction"; + public static final String TARGET_FACTION_GONE = "hyperfactions_gui.treasury.target_faction_gone"; + public static final String TRANSFER_FAILED = "hyperfactions_gui.treasury.transfer_failed"; + public static final String TRANSFER_FAILED_RETURNED = "hyperfactions_gui.treasury.transfer_failed_returned"; + public static final String TRANSFERRED = "hyperfactions_gui.treasury.transferred"; + public static final String INVALID_TARGET_PLAYER = "hyperfactions_gui.treasury.invalid_target_player"; + public static final String PLAYER_TRANSFER_FAILED = "hyperfactions_gui.treasury.player_transfer_failed"; + // Treasury settings + public static final String LEADER_ONLY_PERMS = "hyperfactions_gui.treasury.leader_only_perms"; + public static final String LEADER_ONLY_UPKEEP = "hyperfactions_gui.treasury.leader_only_upkeep"; + public static final String INVALID_LIMIT = "hyperfactions_gui.treasury.invalid_limit"; + // Treasury settings page + public static final String SETTINGS_TITLE = "hyperfactions_gui.treasury.settings_title"; + public static final String OFFICER_PERMISSIONS = "hyperfactions_gui.treasury.officer_permissions"; + public static final String ALLOW_WITHDRAW = "hyperfactions_gui.treasury.allow_withdraw"; + public static final String ALLOW_TRANSFER = "hyperfactions_gui.treasury.allow_transfer"; + public static final String LIMITS_SECTION = "hyperfactions_gui.treasury.limits_section"; + public static final String MAX_PER_WITHDRAWAL = "hyperfactions_gui.treasury.max_per_withdrawal"; + public static final String MAX_WITHDRAWALS_PER = "hyperfactions_gui.treasury.max_withdrawals_per"; + public static final String MAX_PER_TRANSFER = "hyperfactions_gui.treasury.max_per_transfer"; + public static final String MAX_TRANSFERS_PER = "hyperfactions_gui.treasury.max_transfers_per"; + public static final String LIMIT_PERIOD = "hyperfactions_gui.treasury.limit_period"; + public static final String NO_LIMIT_HINT = "hyperfactions_gui.treasury.no_limit_hint"; + public static final String UPKEEP_SETTINGS = "hyperfactions_gui.treasury.upkeep_settings"; + public static final String AUTO_PAY_UPKEEP = "hyperfactions_gui.treasury.auto_pay_upkeep"; + // Upkeep format strings + public static final String UPKEEP_COST_FORMAT = "hyperfactions_gui.treasury.upkeep_cost_format"; + public static final String UPKEEP_TIME_LEFT = "hyperfactions_gui.treasury.upkeep_time_left"; + + private TreasuryGui() {} + } + + // ===================================================================== + // GUI — Logs viewer + // ===================================================================== + + /** Logs viewer page labels and messages. */ + public static final class LogsGui { + public static final String TITLE = "hyperfactions_gui.logs.title"; + public static final String ENTRY_COUNT = "hyperfactions_gui.logs.entry_count"; + public static final String FILTER_LABEL = "hyperfactions_gui.logs.filter_label"; + public static final String COL_TIME = "hyperfactions_gui.logs.col_time"; + public static final String COL_TYPE = "hyperfactions_gui.logs.col_type"; + public static final String COL_MESSAGE = "hyperfactions_gui.logs.col_message"; + public static final String PREV_BTN = "hyperfactions_gui.logs.prev_btn"; + public static final String NEXT_BTN = "hyperfactions_gui.logs.next_btn"; + public static final String ALL_TYPES = "hyperfactions_gui.logs.all_types"; + public static final String NO_LOGS_TYPE = "hyperfactions_gui.logs.no_logs_type"; + public static final String NO_LOGS = "hyperfactions_gui.logs.no_logs"; + public static final String TIME_JUST_NOW = "hyperfactions_gui.logs.time_just_now"; + public static final String TIME_MINUTE = "hyperfactions_gui.logs.time_minute"; + public static final String TIME_MINUTES = "hyperfactions_gui.logs.time_minutes"; + public static final String TIME_HOUR = "hyperfactions_gui.logs.time_hour"; + public static final String TIME_HOURS = "hyperfactions_gui.logs.time_hours"; + public static final String TIME_DAY = "hyperfactions_gui.logs.time_day"; + public static final String TIME_DAYS = "hyperfactions_gui.logs.time_days"; + public static final String TIME_WEEK = "hyperfactions_gui.logs.time_week"; + public static final String TIME_WEEKS = "hyperfactions_gui.logs.time_weeks"; + public static final String TYPE_MEMBER_JOIN = "hyperfactions_gui.logs.type_member_join"; + public static final String TYPE_MEMBER_LEAVE = "hyperfactions_gui.logs.type_member_leave"; + public static final String TYPE_MEMBER_KICK = "hyperfactions_gui.logs.type_member_kick"; + public static final String TYPE_MEMBER_PROMOTE = "hyperfactions_gui.logs.type_member_promote"; + public static final String TYPE_MEMBER_DEMOTE = "hyperfactions_gui.logs.type_member_demote"; + public static final String TYPE_CLAIM = "hyperfactions_gui.logs.type_claim"; + public static final String TYPE_UNCLAIM = "hyperfactions_gui.logs.type_unclaim"; + public static final String TYPE_OVERCLAIM = "hyperfactions_gui.logs.type_overclaim"; + public static final String TYPE_HOME_SET = "hyperfactions_gui.logs.type_home_set"; + public static final String TYPE_RELATION_ALLY = "hyperfactions_gui.logs.type_relation_ally"; + public static final String TYPE_RELATION_ENEMY = "hyperfactions_gui.logs.type_relation_enemy"; + public static final String TYPE_RELATION_NEUTRAL = "hyperfactions_gui.logs.type_relation_neutral"; + public static final String TYPE_LEADER_TRANSFER = "hyperfactions_gui.logs.type_leader_transfer"; + public static final String TYPE_SETTINGS_CHANGE = "hyperfactions_gui.logs.type_settings_change"; + public static final String TYPE_POWER_CHANGE = "hyperfactions_gui.logs.type_power_change"; + public static final String TYPE_ECONOMY = "hyperfactions_gui.logs.type_economy"; + public static final String TYPE_ADMIN_POWER = "hyperfactions_gui.logs.type_admin_power"; + + /** Derives the lang key for a FactionLog.LogType enum by name. */ + public static String typeKey(String logTypeName) { + return "hyperfactions_gui.logs.type_" + logTypeName.toLowerCase(); + } + + // === Log message templates (i18n for FactionLog.message content) === + + // Player actions + public static final String MSG_FACTION_CREATED = "hyperfactions_gui.logs.msg_faction_created"; + public static final String MSG_MEMBER_JOINED = "hyperfactions_gui.logs.msg_member_joined"; + public static final String MSG_MEMBER_LEFT = "hyperfactions_gui.logs.msg_member_left"; + public static final String MSG_MEMBER_KICKED = "hyperfactions_gui.logs.msg_member_kicked"; + public static final String MSG_MEMBER_PROMOTED = "hyperfactions_gui.logs.msg_member_promoted"; + public static final String MSG_MEMBER_DEMOTED = "hyperfactions_gui.logs.msg_member_demoted"; + public static final String MSG_LEADER_TRANSFERRED = "hyperfactions_gui.logs.msg_leader_transferred"; + public static final String MSG_LEADER_LEFT_TRANSFER = "hyperfactions_gui.logs.msg_leader_left_transfer"; + public static final String MSG_RELATION_SET = "hyperfactions_gui.logs.msg_relation_set"; + + // Territory + public static final String MSG_CLAIMED = "hyperfactions_gui.logs.msg_claimed"; + public static final String MSG_UNCLAIMED = "hyperfactions_gui.logs.msg_unclaimed"; + public static final String MSG_OVERCLAIM_LOST = "hyperfactions_gui.logs.msg_overclaim_lost"; + public static final String MSG_OVERCLAIM_TAKEN = "hyperfactions_gui.logs.msg_overclaim_taken"; + public static final String MSG_ALL_UNCLAIMED = "hyperfactions_gui.logs.msg_all_unclaimed"; + public static final String MSG_CLAIM_REMOVED_WORLD = "hyperfactions_gui.logs.msg_claim_removed_world"; + public static final String MSG_CLAIMS_LOST_UPKEEP = "hyperfactions_gui.logs.msg_claims_lost_upkeep"; + public static final String MSG_CLAIMS_REMOVED_INACTIVE = "hyperfactions_gui.logs.msg_claims_removed_inactive"; + + // Home + public static final String MSG_HOME_SET = "hyperfactions_gui.logs.msg_home_set"; + public static final String MSG_HOME_CLEARED = "hyperfactions_gui.logs.msg_home_cleared"; + public static final String MSG_HOME_CLEARED_WORLD = "hyperfactions_gui.logs.msg_home_cleared_world"; + + // Settings + public static final String MSG_RENAMED = "hyperfactions_gui.logs.msg_renamed"; + public static final String MSG_SET_OPEN = "hyperfactions_gui.logs.msg_set_open"; + public static final String MSG_SET_CLOSED = "hyperfactions_gui.logs.msg_set_closed"; + public static final String MSG_DESC_SET = "hyperfactions_gui.logs.msg_desc_set"; + public static final String MSG_DESC_CLEARED = "hyperfactions_gui.logs.msg_desc_cleared"; + public static final String MSG_COLOR_CHANGED = "hyperfactions_gui.logs.msg_color_changed"; + + // Economy + public static final String MSG_DEPOSIT = "hyperfactions_gui.logs.msg_deposit"; + public static final String MSG_WITHDRAWAL = "hyperfactions_gui.logs.msg_withdrawal"; + public static final String MSG_UPKEEP_PAID = "hyperfactions_gui.logs.msg_upkeep_paid"; + public static final String MSG_UPKEEP_GRACE_STARTED = "hyperfactions_gui.logs.msg_upkeep_grace_started"; + public static final String MSG_UPKEEP_MISSED = "hyperfactions_gui.logs.msg_upkeep_missed"; + public static final String MSG_UPKEEP_MANUAL = "hyperfactions_gui.logs.msg_upkeep_manual"; + + // Admin power + public static final String MSG_ADMIN_POWER_SET = "hyperfactions_gui.logs.msg_admin_power_set"; + public static final String MSG_ADMIN_POWER_ADD = "hyperfactions_gui.logs.msg_admin_power_add"; + public static final String MSG_ADMIN_POWER_REMOVE = "hyperfactions_gui.logs.msg_admin_power_remove"; + public static final String MSG_ADMIN_POWER_RESET = "hyperfactions_gui.logs.msg_admin_power_reset"; + public static final String MSG_ADMIN_POWER_ADJUSTED = "hyperfactions_gui.logs.msg_admin_power_adjusted"; + public static final String MSG_ADMIN_MAXPOWER_SET = "hyperfactions_gui.logs.msg_admin_maxpower_set"; + public static final String MSG_ADMIN_MAXPOWER_RESET = "hyperfactions_gui.logs.msg_admin_maxpower_reset"; + public static final String MSG_ADMIN_POWERLOSS_ENABLED = "hyperfactions_gui.logs.msg_admin_powerloss_enabled"; + public static final String MSG_ADMIN_POWERLOSS_DISABLED = "hyperfactions_gui.logs.msg_admin_powerloss_disabled"; + public static final String MSG_ADMIN_DECAY_ENABLED = "hyperfactions_gui.logs.msg_admin_decay_enabled"; + public static final String MSG_ADMIN_DECAY_DISABLED = "hyperfactions_gui.logs.msg_admin_decay_disabled"; + public static final String MSG_ADMIN_KD_RESET = "hyperfactions_gui.logs.msg_admin_kd_reset"; + public static final String MSG_ADMIN_POWER_SET_ALL = "hyperfactions_gui.logs.msg_admin_power_set_all"; + public static final String MSG_ADMIN_POWER_ADD_ALL = "hyperfactions_gui.logs.msg_admin_power_add_all"; + public static final String MSG_ADMIN_POWER_REMOVE_ALL = "hyperfactions_gui.logs.msg_admin_power_remove_all"; + public static final String MSG_ADMIN_POWER_RESET_ALL = "hyperfactions_gui.logs.msg_admin_power_reset_all"; + public static final String MSG_ADMIN_POWER_ADJUSTED_ALL = "hyperfactions_gui.logs.msg_admin_power_adjusted_all"; + + // Admin faction + public static final String MSG_ADMIN_KICKED = "hyperfactions_gui.logs.msg_admin_kicked"; + public static final String MSG_ADMIN_ROLE_SET = "hyperfactions_gui.logs.msg_admin_role_set"; + public static final String MSG_ADMIN_LEADER_KICK = "hyperfactions_gui.logs.msg_admin_leader_kick"; + public static final String MSG_ADMIN_ECON_ADDED = "hyperfactions_gui.logs.msg_admin_econ_added"; + public static final String MSG_ADMIN_ECON_DEDUCTED = "hyperfactions_gui.logs.msg_admin_econ_deducted"; + public static final String MSG_ADMIN_ECON_SET = "hyperfactions_gui.logs.msg_admin_econ_set"; + + // Import + public static final String MSG_LEFT_IMPORT = "hyperfactions_gui.logs.msg_left_import"; + public static final String MSG_LEADER_IMPORT_TRANSFER = "hyperfactions_gui.logs.msg_leader_import_transfer"; + public static final String MSG_IMPORTED_FROM = "hyperfactions_gui.logs.msg_imported_from"; + + private LogsGui() {} + } + + // ===================================================================== + // GUI — Chat page + // ===================================================================== + + /** Faction chat page labels and messages. */ + public static final class ChatGui { + public static final String TITLE = "hyperfactions_gui.chat.title"; + public static final String TAB_FACTION = "hyperfactions_gui.chat.tab_faction"; + public static final String TAB_ALLY = "hyperfactions_gui.chat.tab_ally"; + public static final String SEND_BTN = "hyperfactions_gui.chat.send_btn"; + public static final String PLACEHOLDER = "hyperfactions_gui.chat.placeholder"; + public static final String NO_MESSAGES = "hyperfactions_gui.chat.no_messages"; + public static final String NO_ALLY_PERMISSION = "hyperfactions_gui.chat.no_ally_permission"; + public static final String NO_PERMISSION = "hyperfactions_gui.chat.no_permission"; + public static final String FACTION_GONE = "hyperfactions_gui.chat.faction_gone"; + public static final String TIME_NOW = "hyperfactions_gui.chat.time_now"; + public static final String TIME_MINUTES = "hyperfactions_gui.chat.time_minutes"; + public static final String TIME_HOURS = "hyperfactions_gui.chat.time_hours"; + + private ChatGui() {} + } + + // ===================================================================== + // GUI — Invites page + // ===================================================================== + + /** Faction invites page labels and messages. */ + public static final class InvitesGui { + public static final String TITLE = "hyperfactions_gui.invites.title"; + public static final String TAB_OUTGOING = "hyperfactions_gui.invites.tab_outgoing"; + public static final String TAB_REQUESTS = "hyperfactions_gui.invites.tab_requests"; + public static final String PREV_BTN = "hyperfactions_gui.invites.prev_btn"; + public static final String NEXT_BTN = "hyperfactions_gui.invites.next_btn"; + public static final String INVITE_COUNT = "hyperfactions_gui.invites.invite_count"; + public static final String REQUEST_COUNT = "hyperfactions_gui.invites.request_count"; + public static final String INVITED_BY = "hyperfactions_gui.invites.invited_by"; + public static final String NO_MESSAGE = "hyperfactions_gui.invites.no_message"; + public static final String EXPIRES = "hyperfactions_gui.invites.expires"; + public static final String TYPE_OUTGOING = "hyperfactions_gui.invites.type_outgoing"; + public static final String TYPE_REQUEST = "hyperfactions_gui.invites.type_request"; + public static final String INVITED_BY_LABEL = "hyperfactions_gui.invites.invited_by_label"; + public static final String EMPTY_OUTGOING = "hyperfactions_gui.invites.empty_outgoing"; + public static final String EMPTY_REQUESTS = "hyperfactions_gui.invites.empty_requests"; + public static final String INVALID_PLAYER = "hyperfactions_gui.invites.invalid_player"; + public static final String CANCELLED_INVITE = "hyperfactions_gui.invites.cancelled_invite"; + public static final String PLAYER_JOINED = "hyperfactions_gui.invites.player_joined"; + public static final String FACTION_FULL = "hyperfactions_gui.invites.faction_full"; + public static final String ADD_FAILED = "hyperfactions_gui.invites.add_failed"; + public static final String REQUEST_EXPIRED = "hyperfactions_gui.invites.request_expired"; + public static final String REQUEST_DECLINED = "hyperfactions_gui.invites.request_declined"; + public static final String TIME_SECONDS = "hyperfactions_gui.invites.time_seconds"; + public static final String TIME_MINUTES = "hyperfactions_gui.invites.time_minutes"; + public static final String TIME_HOURS = "hyperfactions_gui.invites.time_hours"; + public static final String LABEL_MESSAGE = "hyperfactions_gui.invites.label_message"; + public static final String BTN_CANCEL = "hyperfactions_gui.invites.btn_cancel"; + public static final String BTN_ACCEPT = "hyperfactions_gui.invites.btn_accept"; + public static final String BTN_DECLINE = "hyperfactions_gui.invites.btn_decline"; + + private InvitesGui() {} + } + + // ===================================================================== + // GUI — Map page + // ===================================================================== + + /** Chunk map page labels and messages. */ + public static final class MapGui { + public static final String TITLE = "hyperfactions_gui.map.title"; + public static final String ACTION_HINT = "hyperfactions_gui.map.action_hint"; + public static final String LEGEND_YOUR = "hyperfactions_gui.map.legend_your"; + public static final String LEGEND_ALLY = "hyperfactions_gui.map.legend_ally"; + public static final String LEGEND_ENEMY = "hyperfactions_gui.map.legend_enemy"; + public static final String LEGEND_OTHER = "hyperfactions_gui.map.legend_other"; + public static final String LEGEND_WILDERNESS = "hyperfactions_gui.map.legend_wilderness"; + public static final String LEGEND_SAFE = "hyperfactions_gui.map.legend_safe"; + public static final String LEGEND_WAR = "hyperfactions_gui.map.legend_war"; + public static final String LEGEND_YOU = "hyperfactions_gui.map.legend_you"; + public static final String POSITION = "hyperfactions_gui.map.position"; + public static final String LEGEND_PROTECTED = "hyperfactions_gui.map.legend_protected"; + public static final String CLAIM_STATS = "hyperfactions_gui.map.claim_stats"; + public static final String OVERCLAIMED = "hyperfactions_gui.map.overclaimed"; + public static final String POWER_DISPLAY = "hyperfactions_gui.map.power_display"; + public static final String JOIN_TO_CLAIM = "hyperfactions_gui.map.join_to_claim"; + // Claim results + public static final String CLAIM_SUCCESS = "hyperfactions_gui.map.claim_success"; + public static final String CLAIM_NOT_IN_FACTION = "hyperfactions_gui.map.claim_not_in_faction"; + public static final String CLAIM_NOT_OFFICER = "hyperfactions_gui.map.claim_not_officer"; + public static final String CLAIM_ALREADY_YOURS = "hyperfactions_gui.map.claim_already_yours"; + public static final String CLAIM_ALREADY_CLAIMED = "hyperfactions_gui.map.claim_already_claimed"; + public static final String CLAIM_NOT_ADJACENT = "hyperfactions_gui.map.claim_not_adjacent"; + public static final String CLAIM_MAX = "hyperfactions_gui.map.claim_max"; + public static final String CLAIM_WORLD_NOT_ALLOWED = "hyperfactions_gui.map.claim_world_not_allowed"; + public static final String CLAIM_ORBISGUARD = "hyperfactions_gui.map.claim_orbisguard"; + public static final String CLAIM_FAILED = "hyperfactions_gui.map.claim_failed"; + // Unclaim results + public static final String UNCLAIM_SUCCESS = "hyperfactions_gui.map.unclaim_success"; + public static final String UNCLAIM_NOT_IN_FACTION = "hyperfactions_gui.map.unclaim_not_in_faction"; + public static final String UNCLAIM_NOT_OFFICER = "hyperfactions_gui.map.unclaim_not_officer"; + public static final String UNCLAIM_NOT_CLAIMED = "hyperfactions_gui.map.unclaim_not_claimed"; + public static final String UNCLAIM_NOT_YOURS = "hyperfactions_gui.map.unclaim_not_yours"; + public static final String UNCLAIM_HOME = "hyperfactions_gui.map.unclaim_home"; + public static final String UNCLAIM_FAILED = "hyperfactions_gui.map.unclaim_failed"; + // Overclaim results + public static final String OVERCLAIM_SUCCESS = "hyperfactions_gui.map.overclaim_success"; + public static final String OVERCLAIM_NOT_IN_FACTION = "hyperfactions_gui.map.overclaim_not_in_faction"; + public static final String OVERCLAIM_NOT_OFFICER = "hyperfactions_gui.map.overclaim_not_officer"; + public static final String OVERCLAIM_ALREADY_YOURS = "hyperfactions_gui.map.overclaim_already_yours"; + public static final String OVERCLAIM_ALLY = "hyperfactions_gui.map.overclaim_ally"; + public static final String OVERCLAIM_HAS_POWER = "hyperfactions_gui.map.overclaim_has_power"; + public static final String OVERCLAIM_MAX = "hyperfactions_gui.map.overclaim_max"; + public static final String OVERCLAIM_FAILED = "hyperfactions_gui.map.overclaim_failed"; + + private MapGui() {} + } + + // ===================================================================== + // GUI — Create faction page + // ===================================================================== + + /** Create faction page labels and messages. */ + public static final class CreateGui { + public static final String PREVIEW_NAME = "hyperfactions_gui.create.preview_name"; + public static final String LEADER_PREFIX = "hyperfactions_gui.create.leader_prefix"; + public static final String ENTER_NAME = "hyperfactions_gui.create.enter_name"; + public static final String NAME_TOO_SHORT = "hyperfactions_gui.create.name_too_short"; + public static final String NAME_TOO_LONG = "hyperfactions_gui.create.name_too_long"; + public static final String NAME_TAKEN = "hyperfactions_gui.create.name_taken"; + public static final String TAG_LENGTH = "hyperfactions_gui.create.tag_length"; + public static final String TAG_FORMAT = "hyperfactions_gui.create.tag_format"; + public static final String DESC_TOO_LONG = "hyperfactions_gui.create.desc_too_long"; + public static final String CREATED = "hyperfactions_gui.create.created"; + public static final String CREATED_NO_DASHBOARD = "hyperfactions_gui.create.created_no_dashboard"; + public static final String INVALID_NAME = "hyperfactions_gui.create.invalid_name"; + public static final String CREATE_FAILED = "hyperfactions_gui.create.create_failed"; + // Static UI labels + public static final String TITLE = "hyperfactions_gui.create.title"; + public static final String SECTION_PREVIEW = "hyperfactions_gui.create.section_preview"; + public static final String SECTION_BASIC_INFO = "hyperfactions_gui.create.section_basic_info"; + public static final String SECTION_DETAILS = "hyperfactions_gui.create.section_details"; + public static final String NAME_PREFIX = "hyperfactions_gui.create.name_prefix"; + public static final String FACTION_NAME_LABEL = "hyperfactions_gui.create.faction_name_label"; + public static final String TAG_LABEL = "hyperfactions_gui.create.tag_label"; + public static final String DESC_LABEL = "hyperfactions_gui.create.desc_label"; + public static final String RECRUITMENT_LABEL = "hyperfactions_gui.create.recruitment_label"; + public static final String SECTION_FACTION_COLOR = "hyperfactions_gui.create.section_faction_color"; + public static final String SECTION_COMBAT = "hyperfactions_gui.create.section_combat"; + public static final String CREATE_BTN = "hyperfactions_gui.create.create_btn"; + + private CreateGui() {} + } + + // ===================================================================== + // GUI — New player page + // ===================================================================== + + /** New player page labels and messages (invites, browse, map). */ + public static final class NewPlayerGui { + // Page titles and static labels + public static final String BROWSE_TITLE = "hyperfactions_gui.newplayer.browse_title"; + public static final String INVITES_TITLE = "hyperfactions_gui.newplayer.invites_title"; + public static final String MAP_TITLE = "hyperfactions_gui.newplayer.map_title"; + public static final String VIEW_ONLY_BADGE = "hyperfactions_gui.newplayer.view_only_badge"; + public static final String LEGEND_LABEL = "hyperfactions_gui.newplayer.legend_label"; + public static final String LEGEND_SAFEZONE = "hyperfactions_gui.newplayer.legend_safezone"; + public static final String LEGEND_WARZONE = "hyperfactions_gui.newplayer.legend_warzone"; + public static final String LEGEND_FACTION = "hyperfactions_gui.newplayer.legend_faction"; + public static final String LEGEND_WILDERNESS = "hyperfactions_gui.newplayer.legend_wilderness"; + public static final String SEARCH_LABEL = "hyperfactions_gui.newplayer.search_label"; + public static final String SORT_LABEL = "hyperfactions_gui.newplayer.sort_label"; + public static final String PREV_BTN = "hyperfactions_gui.newplayer.prev_btn"; + public static final String NEXT_BTN = "hyperfactions_gui.newplayer.next_btn"; + // Invites page + public static final String PENDING_COUNT = "hyperfactions_gui.newplayer.pending_count"; + public static final String RECEIVED_HEADER = "hyperfactions_gui.newplayer.received_header"; + public static final String REQUESTS_HEADER = "hyperfactions_gui.newplayer.requests_header"; + public static final String NO_INVITES = "hyperfactions_gui.newplayer.no_invites"; + public static final String NO_REQUESTS = "hyperfactions_gui.newplayer.no_requests"; + public static final String INVITED_BY = "hyperfactions_gui.newplayer.invited_by"; + public static final String POWER_COUNT = "hyperfactions_gui.newplayer.power_count"; + public static final String CLAIM_COUNT = "hyperfactions_gui.newplayer.claim_count"; + public static final String AWAITING_REVIEW = "hyperfactions_gui.newplayer.awaiting_review"; + public static final String EXPIRES_IN = "hyperfactions_gui.newplayer.expires_in"; + public static final String TIME_JUST_NOW = "hyperfactions_gui.newplayer.time_just_now"; + public static final String TIME_MINUTES = "hyperfactions_gui.newplayer.time_minutes"; + public static final String TIME_HOURS = "hyperfactions_gui.newplayer.time_hours"; + public static final String TIME_DAYS = "hyperfactions_gui.newplayer.time_days"; + // Shared join result messages + public static final String INVALID_FACTION = "hyperfactions_gui.newplayer.invalid_faction"; + public static final String INVITE_EXPIRED = "hyperfactions_gui.newplayer.invite_expired"; + public static final String FACTION_GONE = "hyperfactions_gui.newplayer.faction_gone"; + public static final String JOINED = "hyperfactions_gui.newplayer.joined"; + public static final String FACTION_FULL = "hyperfactions_gui.newplayer.faction_full"; + public static final String JOIN_FAILED = "hyperfactions_gui.newplayer.join_failed"; + public static final String INVITE_DECLINED = "hyperfactions_gui.newplayer.invite_declined"; + public static final String REQUEST_CANCELLED = "hyperfactions_gui.newplayer.request_cancelled"; + // Browse page + public static final String FACTION_COUNT = "hyperfactions_gui.newplayer.faction_count"; + public static final String BROWSE_SUBTITLE = "hyperfactions_gui.newplayer.browse_subtitle"; + public static final String SORT_POWER = "hyperfactions_gui.newplayer.sort_power"; + public static final String SORT_NAME = "hyperfactions_gui.newplayer.sort_name"; + public static final String SORT_MEMBERS = "hyperfactions_gui.newplayer.sort_members"; + public static final String BTN_ACCEPT = "hyperfactions_gui.newplayer.btn_accept"; + public static final String BTN_PENDING = "hyperfactions_gui.newplayer.btn_pending"; + public static final String BTN_JOIN = "hyperfactions_gui.newplayer.btn_join"; + public static final String BTN_REQUEST = "hyperfactions_gui.newplayer.btn_request"; + public static final String INVITE_ONLY_MSG = "hyperfactions_gui.newplayer.invite_only_msg"; + public static final String WELCOME_HINT = "hyperfactions_gui.newplayer.welcome_hint"; + public static final String FACTION_OPEN_HINT = "hyperfactions_gui.newplayer.faction_open_hint"; + public static final String ALREADY_REQUESTED = "hyperfactions_gui.newplayer.already_requested"; + public static final String HAS_INVITE_HINT = "hyperfactions_gui.newplayer.has_invite_hint"; + public static final String REQUEST_SENT = "hyperfactions_gui.newplayer.request_sent"; + public static final String OFFICER_REVIEW = "hyperfactions_gui.newplayer.officer_review"; + // Map page + public static final String MAP_HINT = "hyperfactions_gui.newplayer.map_hint"; + + private NewPlayerGui() {} + } + + // ===================================================================== + // GUI — Player settings + // ===================================================================== + + /** Player settings page labels and messages. */ + public static final class PlayerSettings { + public static final String TITLE = "hyperfactions_gui.player_settings.title"; + public static final String LANGUAGE_SECTION = "hyperfactions_gui.player_settings.language_section"; + public static final String AUTO_DETECT = "hyperfactions_gui.player_settings.auto_detect"; + public static final String AUTO_DETECT_DESC = "hyperfactions_gui.player_settings.auto_detect_desc"; + public static final String LANGUAGE_LABEL = "hyperfactions_gui.player_settings.language_label"; + public static final String NOTIFICATIONS_SECTION = "hyperfactions_gui.player_settings.notifications_section"; + public static final String TERRITORY_ALERTS = "hyperfactions_gui.player_settings.territory_alerts"; + public static final String TERRITORY_ALERTS_DESC = "hyperfactions_gui.player_settings.territory_alerts_desc"; + public static final String DEATH_ANNOUNCEMENTS = "hyperfactions_gui.player_settings.death_announcements"; + public static final String DEATH_ANNOUNCEMENTS_DESC = "hyperfactions_gui.player_settings.death_announcements_desc"; + public static final String POWER_NOTIFICATIONS = "hyperfactions_gui.player_settings.power_notifications"; + public static final String POWER_NOTIFICATIONS_DESC = "hyperfactions_gui.player_settings.power_notifications_desc"; + public static final String LANGUAGE_CHANGED = "hyperfactions_gui.player_settings.language_changed"; + public static final String PREF_ENABLED = "hyperfactions_gui.player_settings.pref_enabled"; + public static final String PREF_DISABLED = "hyperfactions_gui.player_settings.pref_disabled"; + + private PlayerSettings() {} + } +} diff --git a/src/main/java/com/hyperfactions/util/HFMessages.java b/src/main/java/com/hyperfactions/util/HFMessages.java index 8b76fd34..8e4463db 100644 --- a/src/main/java/com/hyperfactions/util/HFMessages.java +++ b/src/main/java/com/hyperfactions/util/HFMessages.java @@ -30,9 +30,9 @@ * *

Usage: *

- *   HFMessages.get(playerRef, MessageKeys.Common.NO_PERMISSION);
- *   HFMessages.get(playerRef, MessageKeys.Create.SUCCESS, factionName);
- *   HFMessages.get(MessageKeys.Common.LOADING); // server language
+ *   HFMessages.get(playerRef, CommonKeys.Common.NO_PERMISSION);
+ *   HFMessages.get(playerRef, CommandKeys.Create.SUCCESS, factionName);
+ *   HFMessages.get(CommonKeys.Common.LOADING); // server language
  * 
*/ public final class HFMessages { diff --git a/src/main/java/com/hyperfactions/util/HelpFormatter.java b/src/main/java/com/hyperfactions/util/HelpFormatter.java index a9706693..242a27ac 100644 --- a/src/main/java/com/hyperfactions/util/HelpFormatter.java +++ b/src/main/java/com/hyperfactions/util/HelpFormatter.java @@ -1,6 +1,7 @@ package com.hyperfactions.util; import com.hypixel.hytale.server.core.Message; +import com.hypixel.hytale.server.core.universe.PlayerRef; import java.awt.Color; import java.util.ArrayList; import java.util.Collections; @@ -10,6 +11,8 @@ /** * Utility for formatting help messages in the HyperPerms standard style. + * + *

Resolves i18n keys through {@link HFMessages} when a {@link PlayerRef} is provided. */ public class HelpFormatter { @@ -25,22 +28,34 @@ public class HelpFormatter { private static final int WIDTH = 42; /** - * Builds a formatted help message. + * Resolves a string through HFMessages if a player is provided. + * Returns the raw string if player is null (server default language). + */ + private static String resolve(@Nullable PlayerRef player, @NotNull String key) { + return HFMessages.get(player, key); + } + + /** + * Builds a formatted help message with i18n support. * - * @param title the help title (e.g., "HyperFactions") - * @param description optional plugin description - * @param commands list of command help entries - * @param footer optional footer message (e.g., "Use /f {@code } --help for details") + * @param titleKey i18n key for the help title + * @param descriptionKey optional i18n key for the description + * @param commands list of command help entries (descriptionKey/sectionKey are resolved) + * @param footerKey optional i18n key for the footer + * @param player the player (for language resolution, null for server default) * @return formatted help message */ public static Message buildHelp( - @NotNull String title, - @Nullable String description, + @NotNull String titleKey, + @Nullable String descriptionKey, @NotNull List commands, - @Nullable String footer + @Nullable String footerKey, + @Nullable PlayerRef player ) { List parts = new ArrayList<>(); + String title = resolve(player, titleKey); + // Header with dashes int padding = WIDTH - title.length() - 2; int left = 3; @@ -51,35 +66,44 @@ public static Message buildHelp( parts.add(Message.raw(" " + "-".repeat(right) + "\n").color(GRAY)); // Description (if provided) - if (description != null && !description.isEmpty()) { + if (descriptionKey != null && !descriptionKey.isEmpty()) { + String description = resolve(player, descriptionKey); parts.add(Message.raw(" " + description + "\n\n").color(WHITE)); } // Commands header - parts.add(Message.raw(" Commands:\n").color(GOLD)); + String commandsLabel = resolve(player, HelpKeys.Help.COMMANDS_LABEL); + parts.add(Message.raw(" " + commandsLabel + "\n").color(GOLD)); // Sort commands and group by section List sorted = new ArrayList<>(commands); Collections.sort(sorted); - String currentSection = null; + String currentSectionKey = null; for (CommandHelp cmd : sorted) { // Print section header if section changed - if (cmd.section() != null && !cmd.section().equals(currentSection)) { - if (currentSection != null) { + if (cmd.sectionKey() != null && !cmd.sectionKey().equals(currentSectionKey)) { + if (currentSectionKey != null) { parts.add(Message.raw("\n").color(WHITE)); // Blank line between sections } - parts.add(Message.raw(" " + cmd.section() + ":\n").color(GOLD)); - currentSection = cmd.section(); + String sectionName = resolve(player, cmd.sectionKey()); + parts.add(Message.raw(" " + sectionName + ":\n").color(GOLD)); + currentSectionKey = cmd.sectionKey(); } // Print command parts.add(Message.raw(" " + cmd.command()).color(GREEN)); - parts.add(Message.raw(" - " + cmd.description() + "\n").color(WHITE)); + String desc = resolve(player, cmd.descriptionKey()); + if (!desc.isEmpty()) { + parts.add(Message.raw(" - " + desc + "\n").color(WHITE)); + } else { + parts.add(Message.raw("\n").color(WHITE)); + } } // Footer (if provided) - if (footer != null && !footer.isEmpty()) { + if (footerKey != null && !footerKey.isEmpty()) { + String footer = resolve(player, footerKey); parts.add(Message.raw("\n " + footer + "\n").color(GRAY)); } @@ -90,13 +114,31 @@ public static Message buildHelp( } /** - * Builds a simple help message without sections. + * Builds a formatted help message (server default language). + * + * @param titleKey i18n key for the title + * @param descriptionKey optional i18n key for the description + * @param commands list of command help entries + * @param footerKey optional i18n key for the footer + * @return formatted help message + */ + public static Message buildHelp( + @NotNull String titleKey, + @Nullable String descriptionKey, + @NotNull List commands, + @Nullable String footerKey + ) { + return buildHelp(titleKey, descriptionKey, commands, footerKey, null); + } + + /** + * Builds a simple help message without description or footer (server default language). * - * @param title the help title + * @param titleKey the i18n key for the title * @param commands list of command help entries * @return formatted help message */ - public static Message buildHelp(@NotNull String title, @NotNull List commands) { - return buildHelp(title, null, commands, "Use /f --help for details"); + public static Message buildHelp(@NotNull String titleKey, @NotNull List commands) { + return buildHelp(titleKey, null, commands, HelpKeys.Help.DEFAULT_FOOTER, null); } } diff --git a/src/main/java/com/hyperfactions/util/HelpKeys.java b/src/main/java/com/hyperfactions/util/HelpKeys.java new file mode 100644 index 00000000..9034fce2 --- /dev/null +++ b/src/main/java/com/hyperfactions/util/HelpKeys.java @@ -0,0 +1,221 @@ +package com.hyperfactions.util; + +/** + * Help system message keys, split from the original MessageKeys. + * + *

+ * Contains i18n keys for the help framework, section names, + * command descriptions, and sub-help pages. + * Key format: {@code hyperfactions.help.{domain}.{action}} + */ +public final class HelpKeys { + + /** Help system message keys (help text, section names, command descriptions). */ + public static final class Help { + // Help framework + public static final String COMMANDS_LABEL = "hyperfactions.help.commands_label"; + public static final String DEFAULT_FOOTER = "hyperfactions.help.default_footer"; + + // /f help + public static final String TITLE = "hyperfactions.help.title"; + public static final String DESCRIPTION = "hyperfactions.help.description"; + + // Section names + public static final String SECTION_CORE = "hyperfactions.help.section.core"; + public static final String SECTION_MANAGEMENT = "hyperfactions.help.section.management"; + public static final String SECTION_TERRITORY = "hyperfactions.help.section.territory"; + public static final String SECTION_RELATIONS = "hyperfactions.help.section.relations"; + public static final String SECTION_TELEPORT = "hyperfactions.help.section.teleport"; + public static final String SECTION_INFORMATION = "hyperfactions.help.section.information"; + public static final String SECTION_OTHER = "hyperfactions.help.section.other"; + public static final String SECTION_ADMIN = "hyperfactions.help.section.admin"; + + // /f help — command descriptions (Core) + public static final String CMD_CREATE = "hyperfactions.help.cmd.create"; + public static final String CMD_DISBAND = "hyperfactions.help.cmd.disband"; + public static final String CMD_INVITE = "hyperfactions.help.cmd.invite"; + public static final String CMD_ACCEPT = "hyperfactions.help.cmd.accept"; + public static final String CMD_REQUEST = "hyperfactions.help.cmd.request"; + public static final String CMD_LEAVE = "hyperfactions.help.cmd.leave"; + public static final String CMD_KICK = "hyperfactions.help.cmd.kick"; + + // /f help — command descriptions (Management) + public static final String CMD_RENAME = "hyperfactions.help.cmd.rename"; + public static final String CMD_DESC = "hyperfactions.help.cmd.desc"; + public static final String CMD_COLOR = "hyperfactions.help.cmd.color"; + public static final String CMD_OPEN = "hyperfactions.help.cmd.open"; + public static final String CMD_CLOSE = "hyperfactions.help.cmd.close"; + public static final String CMD_PROMOTE = "hyperfactions.help.cmd.promote"; + public static final String CMD_DEMOTE = "hyperfactions.help.cmd.demote"; + public static final String CMD_TRANSFER = "hyperfactions.help.cmd.transfer"; + + // /f help — command descriptions (Territory) + public static final String CMD_CLAIM = "hyperfactions.help.cmd.claim"; + public static final String CMD_UNCLAIM = "hyperfactions.help.cmd.unclaim"; + public static final String CMD_OVERCLAIM = "hyperfactions.help.cmd.overclaim"; + public static final String CMD_MAP = "hyperfactions.help.cmd.map"; + + // /f help — command descriptions (Relations) + public static final String CMD_ALLY = "hyperfactions.help.cmd.ally"; + public static final String CMD_ENEMY = "hyperfactions.help.cmd.enemy"; + public static final String CMD_NEUTRAL = "hyperfactions.help.cmd.neutral"; + + // /f help — command descriptions (Teleport) + public static final String CMD_HOME = "hyperfactions.help.cmd.home"; + public static final String CMD_SETHOME = "hyperfactions.help.cmd.sethome"; + public static final String CMD_STUCK = "hyperfactions.help.cmd.stuck"; + + // /f help — command descriptions (Information) + public static final String CMD_INFO = "hyperfactions.help.cmd.info"; + public static final String CMD_LIST = "hyperfactions.help.cmd.list"; + public static final String CMD_BROWSE = "hyperfactions.help.cmd.browse"; + public static final String CMD_MEMBERS = "hyperfactions.help.cmd.members"; + public static final String CMD_INVITES = "hyperfactions.help.cmd.invites"; + public static final String CMD_WHO = "hyperfactions.help.cmd.who"; + public static final String CMD_POWER = "hyperfactions.help.cmd.power"; + public static final String CMD_GUI = "hyperfactions.help.cmd.gui"; + public static final String CMD_SETTINGS = "hyperfactions.help.cmd.settings"; + + // /f help — command descriptions (Other) + public static final String CMD_CHAT = "hyperfactions.help.cmd.chat"; + public static final String CMD_CHAT_SHORT = "hyperfactions.help.cmd.chat_short"; + + // /f help — command descriptions (Admin section in main help) + public static final String CMD_ADMIN = "hyperfactions.help.cmd.admin"; + public static final String CMD_ADMIN_RELOAD = "hyperfactions.help.cmd.admin_reload"; + public static final String CMD_ADMIN_SYNC = "hyperfactions.help.cmd.admin_sync"; + public static final String CMD_ADMIN_FACTIONS = "hyperfactions.help.cmd.admin_factions"; + public static final String CMD_ADMIN_ZONES = "hyperfactions.help.cmd.admin_zones"; + public static final String CMD_ADMIN_CONFIG = "hyperfactions.help.cmd.admin_config"; + public static final String CMD_ADMIN_BACKUPS = "hyperfactions.help.cmd.admin_backups"; + public static final String CMD_ADMIN_UPDATE = "hyperfactions.help.cmd.admin_update"; + public static final String CMD_ADMIN_DEBUG = "hyperfactions.help.cmd.admin_debug"; + + // /f admin help — title and description + public static final String ADMIN_TITLE = "hyperfactions.help.admin.title"; + public static final String ADMIN_DESCRIPTION = "hyperfactions.help.admin.description"; + + // /f admin help — command descriptions + public static final String ADMIN_CMD_DASHBOARD = "hyperfactions.help.admin.cmd.dashboard"; + public static final String ADMIN_CMD_FACTIONS = "hyperfactions.help.admin.cmd.factions"; + public static final String ADMIN_CMD_ZONE = "hyperfactions.help.admin.cmd.zone"; + public static final String ADMIN_CMD_CONFIG = "hyperfactions.help.admin.cmd.config"; + public static final String ADMIN_CMD_BACKUP = "hyperfactions.help.admin.cmd.backup"; + public static final String ADMIN_CMD_IMPORT = "hyperfactions.help.admin.cmd.import_cmd"; + public static final String ADMIN_CMD_UPDATE = "hyperfactions.help.admin.cmd.update"; + public static final String ADMIN_CMD_UPDATE_MIXIN = "hyperfactions.help.admin.cmd.update_mixin"; + public static final String ADMIN_CMD_UPDATE_TOGGLE = "hyperfactions.help.admin.cmd.update_toggle"; + public static final String ADMIN_CMD_ROLLBACK = "hyperfactions.help.admin.cmd.rollback"; + public static final String ADMIN_CMD_RELOAD = "hyperfactions.help.admin.cmd.reload"; + public static final String ADMIN_CMD_SYNC = "hyperfactions.help.admin.cmd.sync"; + public static final String ADMIN_CMD_DEBUG = "hyperfactions.help.admin.cmd.debug"; + public static final String ADMIN_CMD_DECAY = "hyperfactions.help.admin.cmd.decay"; + public static final String ADMIN_CMD_MAP = "hyperfactions.help.admin.cmd.map"; + public static final String ADMIN_CMD_SAFEZONE = "hyperfactions.help.admin.cmd.safezone"; + public static final String ADMIN_CMD_WARZONE = "hyperfactions.help.admin.cmd.warzone"; + public static final String ADMIN_CMD_REMOVEZONE = "hyperfactions.help.admin.cmd.removezone"; + public static final String ADMIN_CMD_ZONEFLAG = "hyperfactions.help.admin.cmd.zoneflag"; + public static final String ADMIN_CMD_INTEGRATIONS = "hyperfactions.help.admin.cmd.integrations"; + public static final String ADMIN_CMD_INTEGRATION = "hyperfactions.help.admin.cmd.integration"; + public static final String ADMIN_CMD_CLEARHISTORY = "hyperfactions.help.admin.cmd.clearhistory"; + public static final String ADMIN_CMD_POWER = "hyperfactions.help.admin.cmd.power"; + public static final String ADMIN_CMD_ECONOMY = "hyperfactions.help.admin.cmd.economy"; + public static final String ADMIN_CMD_ECONOMY_UPKEEP = "hyperfactions.help.admin.cmd.economy_upkeep"; + public static final String ADMIN_CMD_INFO = "hyperfactions.help.admin.cmd.info"; + public static final String ADMIN_CMD_WHO = "hyperfactions.help.admin.cmd.who"; + public static final String ADMIN_CMD_LOG = "hyperfactions.help.admin.cmd.log"; + public static final String ADMIN_CMD_WORLD = "hyperfactions.help.admin.cmd.world"; + public static final String ADMIN_CMD_VERSION = "hyperfactions.help.admin.cmd.version"; + public static final String ADMIN_CMD_SENTRY = "hyperfactions.help.admin.cmd.sentry"; + public static final String ADMIN_CMD_SENTRY_DISABLE = "hyperfactions.help.admin.cmd.sentry_disable"; + public static final String ADMIN_CMD_SENTRY_ENABLE = "hyperfactions.help.admin.cmd.sentry_enable"; + public static final String ADMIN_CMD_TEST_GUI = "hyperfactions.help.admin.cmd.test_gui"; + public static final String ADMIN_CMD_TEST_SENTRY = "hyperfactions.help.admin.cmd.test_sentry"; + public static final String ADMIN_CMD_TEST_MD = "hyperfactions.help.admin.cmd.test_md"; + + // Sub-help page titles and descriptions + public static final String BACKUP_TITLE = "hyperfactions.help.backup.title"; + public static final String BACKUP_DESCRIPTION = "hyperfactions.help.backup.description"; + public static final String BACKUP_CMD_CREATE = "hyperfactions.help.backup.cmd.create"; + public static final String BACKUP_CMD_LIST = "hyperfactions.help.backup.cmd.list"; + public static final String BACKUP_CMD_RESTORE = "hyperfactions.help.backup.cmd.restore"; + public static final String BACKUP_CMD_DELETE = "hyperfactions.help.backup.cmd.delete"; + + public static final String DEBUG_TITLE = "hyperfactions.help.debug.title"; + public static final String DEBUG_DESCRIPTION = "hyperfactions.help.debug.description"; + public static final String DEBUG_CMD_TOGGLE = "hyperfactions.help.debug.cmd.toggle"; + public static final String DEBUG_CMD_STATUS = "hyperfactions.help.debug.cmd.status"; + public static final String DEBUG_CMD_POWER = "hyperfactions.help.debug.cmd.power"; + public static final String DEBUG_CMD_CLAIM = "hyperfactions.help.debug.cmd.claim"; + public static final String DEBUG_CMD_PROTECTION = "hyperfactions.help.debug.cmd.protection"; + public static final String DEBUG_CMD_COMBAT = "hyperfactions.help.debug.cmd.combat"; + public static final String DEBUG_CMD_RELATION = "hyperfactions.help.debug.cmd.relation"; + + public static final String POWER_TITLE = "hyperfactions.help.power.title"; + public static final String POWER_DESCRIPTION = "hyperfactions.help.power.description"; + public static final String POWER_CMD_SET = "hyperfactions.help.power.cmd.set"; + public static final String POWER_CMD_ADD = "hyperfactions.help.power.cmd.add"; + public static final String POWER_CMD_REMOVE = "hyperfactions.help.power.cmd.remove"; + public static final String POWER_CMD_RESET = "hyperfactions.help.power.cmd.reset"; + public static final String POWER_CMD_SETMAX = "hyperfactions.help.power.cmd.setmax"; + public static final String POWER_CMD_RESETMAX = "hyperfactions.help.power.cmd.resetmax"; + public static final String POWER_CMD_NOLOSS = "hyperfactions.help.power.cmd.noloss"; + public static final String POWER_CMD_NODECAY = "hyperfactions.help.power.cmd.nodecay"; + public static final String POWER_CMD_FACTION = "hyperfactions.help.power.cmd.faction"; + public static final String POWER_CMD_INFO = "hyperfactions.help.power.cmd.info"; + + public static final String ECONOMY_TITLE = "hyperfactions.help.economy.title"; + public static final String ECONOMY_DESCRIPTION = "hyperfactions.help.economy.description"; + public static final String ECONOMY_CMD_BALANCE = "hyperfactions.help.economy.cmd.balance"; + public static final String ECONOMY_CMD_SET = "hyperfactions.help.economy.cmd.set"; + public static final String ECONOMY_CMD_ADD = "hyperfactions.help.economy.cmd.add"; + public static final String ECONOMY_CMD_TAKE = "hyperfactions.help.economy.cmd.take"; + public static final String ECONOMY_CMD_TOTAL = "hyperfactions.help.economy.cmd.total"; + public static final String ECONOMY_CMD_RESET = "hyperfactions.help.economy.cmd.reset"; + public static final String ECONOMY_CMD_UPKEEP = "hyperfactions.help.economy.cmd.upkeep"; + + public static final String WORLD_TITLE = "hyperfactions.help.world.title"; + public static final String WORLD_DESCRIPTION = "hyperfactions.help.world.description"; + public static final String WORLD_CMD_LIST = "hyperfactions.help.world.cmd.list"; + public static final String WORLD_CMD_INFO = "hyperfactions.help.world.cmd.info"; + public static final String WORLD_CMD_SET = "hyperfactions.help.world.cmd.set"; + public static final String WORLD_CMD_RESET = "hyperfactions.help.world.cmd.reset"; + + public static final String MAP_TITLE = "hyperfactions.help.map.title"; + public static final String MAP_DESCRIPTION = "hyperfactions.help.map.description"; + public static final String MAP_CMD_STATUS = "hyperfactions.help.map.cmd.status"; + public static final String MAP_CMD_REFRESH = "hyperfactions.help.map.cmd.refresh"; + + public static final String DECAY_TITLE = "hyperfactions.help.decay.title"; + public static final String DECAY_DESCRIPTION = "hyperfactions.help.decay.description"; + public static final String DECAY_CMD_STATUS = "hyperfactions.help.decay.cmd.status"; + public static final String DECAY_CMD_RUN = "hyperfactions.help.decay.cmd.run"; + public static final String DECAY_CMD_CHECK = "hyperfactions.help.decay.cmd.check"; + + public static final String IMPORT_TITLE = "hyperfactions.help.import.title"; + public static final String IMPORT_DESCRIPTION = "hyperfactions.help.import.description"; + public static final String IMPORT_CMD_HYFACTIONS = "hyperfactions.help.import.cmd.hyfactions"; + public static final String IMPORT_CMD_ELBAPHFACTIONS = "hyperfactions.help.import.cmd.elbaphfactions"; + public static final String IMPORT_CMD_FACTIONSX = "hyperfactions.help.import.cmd.factionsx"; + public static final String IMPORT_CMD_SIMPLECLAIMS = "hyperfactions.help.import.cmd.simpleclaims"; + public static final String IMPORT_FLAGS_HEADER = "hyperfactions.help.import.flags_header"; + public static final String IMPORT_FLAG_DRYRUN = "hyperfactions.help.import.flag.dryrun"; + public static final String IMPORT_FLAG_OVERWRITE = "hyperfactions.help.import.flag.overwrite"; + public static final String IMPORT_FLAG_NOZONES = "hyperfactions.help.import.flag.nozones"; + public static final String IMPORT_FLAG_NOPOWER = "hyperfactions.help.import.flag.nopower"; + public static final String IMPORT_PATH_HYFACTIONS = "hyperfactions.help.import.path.hyfactions"; + public static final String IMPORT_PATH_ELBAPHFACTIONS = "hyperfactions.help.import.path.elbaphfactions"; + public static final String IMPORT_PATH_FACTIONSX = "hyperfactions.help.import.path.factionsx"; + public static final String IMPORT_PATH_SIMPLECLAIMS = "hyperfactions.help.import.path.simpleclaims"; + + public static final String TEST_TITLE = "hyperfactions.help.test.title"; + public static final String TEST_DESCRIPTION = "hyperfactions.help.test.description"; + public static final String TEST_CMD_GUI = "hyperfactions.help.test.cmd.gui"; + public static final String TEST_CMD_SENTRY = "hyperfactions.help.test.cmd.sentry"; + public static final String TEST_CMD_MD = "hyperfactions.help.test.cmd.md"; + + private Help() {} + } + + private HelpKeys() {} +} diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java deleted file mode 100644 index df0116a3..00000000 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ /dev/null @@ -1,2413 +0,0 @@ -package com.hyperfactions.util; - -/** - * Static constants for all HyperFactions i18n message keys. - * - *

- * Organized by nested inner classes — one per feature domain. - * Key format: {@code {file_prefix}.{domain}.{action}} - * - *

- * File prefixes map to .lang file names: - *

    - *
  • {@code hyperfactions.*} → {@code hyperfactions.lang} (commands, errors, common)
  • - *
  • {@code hyperfactions_gui.*} → {@code hyperfactions_gui.lang} (GUI labels, buttons)
  • - *
  • {@code hyperfactions_help.*} → {@code hyperfactions_help.lang} (help content, build-generated)
  • - *
  • {@code hyperfactions_admin.*} → {@code hyperfactions_admin.lang} (admin GUI)
  • - *
- */ -public final class MessageKeys { - - private MessageKeys() {} - - // ===================================================================== - // Common — shared messages used across multiple features - // ===================================================================== - - /** Shared messages used across multiple features (commands, GUI, protection). */ - public static final class Common { - public static final String NO_PERMISSION = "hyperfactions.common.no_permission"; - public static final String NOT_IN_FACTION = "hyperfactions.common.not_in_faction"; - public static final String ALREADY_IN_FACTION = "hyperfactions.common.already_in_faction"; - public static final String PLAYER_NOT_FOUND = "hyperfactions.common.player_not_found"; - public static final String FACTION_NOT_FOUND = "hyperfactions.common.faction_not_found"; - public static final String PLAYER_NOT_ONLINE = "hyperfactions.common.player_not_online"; - public static final String MUST_BE_LEADER = "hyperfactions.common.must_be_leader"; - public static final String MUST_BE_OFFICER = "hyperfactions.common.must_be_officer"; - public static final String COMBAT_TAGGED = "hyperfactions.common.combat_tagged"; - public static final String CANCEL = "hyperfactions.common.cancel"; - public static final String CONFIRM = "hyperfactions.common.confirm"; - public static final String SAVE = "hyperfactions.common.save"; - public static final String CLOSE = "hyperfactions.common.close"; - public static final String YES = "hyperfactions.common.yes"; - public static final String NO = "hyperfactions.common.no"; - public static final String LOADING = "hyperfactions.common.loading"; - public static final String ONLINE = "hyperfactions.common.online"; - public static final String OFFLINE = "hyperfactions.common.offline"; - public static final String ENABLED = "hyperfactions.common.enabled"; - public static final String DISABLED = "hyperfactions.common.disabled"; - public static final String NONE = "hyperfactions.common.none"; - public static final String PAGE = "hyperfactions.common.page"; - public static final String UNKNOWN = "hyperfactions.common.unknown"; - public static final String ERROR_GENERIC = "hyperfactions.common.error_generic"; - public static final String GUI_FALLBACK = "hyperfactions.common.gui_fallback"; - public static final String ADMIN_PREFIX = "hyperfactions.common.admin_prefix"; - public static final String LOCATION_ERROR = "hyperfactions.common.location_error"; - public static final String WORLD_ERROR = "hyperfactions.common.world_error"; - public static final String INVALID_ID = "hyperfactions.common.invalid_id"; - public static final String NA = "hyperfactions.common.na"; - public static final String CLEAR = "hyperfactions.common.clear"; - public static final String BACK = "hyperfactions.common.back"; - public static final String LEAVE = "hyperfactions.common.leave"; - public static final String TRANSFER = "hyperfactions.common.transfer"; - public static final String DISBAND = "hyperfactions.common.disband"; - public static final String WORLD_FALLBACK = "hyperfactions.common.world_fallback"; - - private Common() {} - } - - // ===================================================================== - // Commands — organized by command group - // ===================================================================== - - /** /f create command messages. */ - public static final class Create { - public static final String NO_PERMISSION = "hyperfactions.cmd.create.no_permission"; - public static final String USAGE = "hyperfactions.cmd.create.usage"; - public static final String SUCCESS = "hyperfactions.cmd.create.success"; - public static final String ALREADY_IN_NAMED = "hyperfactions.cmd.create.already_in_named"; - public static final String USE_LEAVE_FIRST = "hyperfactions.cmd.create.use_leave_first"; - public static final String NAME_TAKEN = "hyperfactions.cmd.create.name_taken"; - public static final String NAME_TOO_SHORT = "hyperfactions.cmd.create.name_too_short"; - public static final String NAME_TOO_LONG = "hyperfactions.cmd.create.name_too_long"; - public static final String FAILED = "hyperfactions.cmd.create.failed"; - - private Create() {} - } - - /** /f disband command messages. */ - public static final class Disband { - public static final String NO_PERMISSION = "hyperfactions.cmd.disband.no_permission"; - public static final String NOT_LEADER = "hyperfactions.cmd.disband.not_leader"; - public static final String CONFIRM_PROMPT = "hyperfactions.cmd.disband.confirm_prompt"; - public static final String CONFIRM_INSTRUCTION = "hyperfactions.cmd.disband.confirm_instruction"; - public static final String SUCCESS = "hyperfactions.cmd.disband.success"; - public static final String FAILED = "hyperfactions.cmd.disband.failed"; - public static final String CANCELLED = "hyperfactions.cmd.disband.cancelled"; - - private Disband() {} - } - - /** /f rename command messages. */ - public static final class Rename { - public static final String NO_PERMISSION = "hyperfactions.cmd.rename.no_permission"; - public static final String NOT_LEADER = "hyperfactions.cmd.rename.not_leader"; - public static final String USAGE = "hyperfactions.cmd.rename.usage"; - public static final String TOO_SHORT = "hyperfactions.cmd.rename.too_short"; - public static final String TOO_LONG = "hyperfactions.cmd.rename.too_long"; - public static final String NAME_TAKEN = "hyperfactions.cmd.rename.name_taken"; - public static final String SUCCESS = "hyperfactions.cmd.rename.success"; - public static final String BROADCAST = "hyperfactions.cmd.rename.broadcast"; - - private Rename() {} - } - - /** /f desc command messages. */ - public static final class Desc { - public static final String NO_PERMISSION = "hyperfactions.cmd.desc.no_permission"; - public static final String NOT_OFFICER = "hyperfactions.cmd.desc.not_officer"; - public static final String SET = "hyperfactions.cmd.desc.set"; - public static final String CLEARED = "hyperfactions.cmd.desc.cleared"; - - private Desc() {} - } - - /** /f open command messages. */ - public static final class Open { - public static final String NO_PERMISSION = "hyperfactions.cmd.open.no_permission"; - public static final String NOT_LEADER = "hyperfactions.cmd.open.not_leader"; - public static final String ALREADY_OPEN = "hyperfactions.cmd.open.already_open"; - public static final String SUCCESS = "hyperfactions.cmd.open.success"; - public static final String BROADCAST = "hyperfactions.cmd.open.broadcast"; - - private Open() {} - } - - /** /f close command messages. */ - public static final class Close { - public static final String NO_PERMISSION = "hyperfactions.cmd.close.no_permission"; - public static final String NOT_LEADER = "hyperfactions.cmd.close.not_leader"; - public static final String ALREADY_CLOSED = "hyperfactions.cmd.close.already_closed"; - public static final String SUCCESS = "hyperfactions.cmd.close.success"; - public static final String BROADCAST = "hyperfactions.cmd.close.broadcast"; - - private Close() {} - } - - /** /f color command messages. */ - public static final class Color { - public static final String NO_PERMISSION = "hyperfactions.cmd.color.no_permission"; - public static final String NOT_OFFICER = "hyperfactions.cmd.color.not_officer"; - public static final String COLORS_DISABLED = "hyperfactions.cmd.color.colors_disabled"; - public static final String USAGE = "hyperfactions.cmd.color.usage"; - public static final String USAGE_HINT = "hyperfactions.cmd.color.usage_hint"; - public static final String INVALID = "hyperfactions.cmd.color.invalid"; - public static final String SUCCESS = "hyperfactions.cmd.color.success"; - - private Color() {} - } - - /** /f invite command messages. */ - public static final class Invite { - public static final String NO_PERMISSION = "hyperfactions.cmd.invite.no_permission"; - public static final String NOT_OFFICER = "hyperfactions.cmd.invite.not_officer"; - public static final String USAGE = "hyperfactions.cmd.invite.usage"; - public static final String PLAYER_NOT_FOUND = "hyperfactions.cmd.invite.player_not_found"; - public static final String TARGET_IN_FACTION = "hyperfactions.cmd.invite.target_in_faction"; - public static final String SENT = "hyperfactions.cmd.invite.sent"; - public static final String RECEIVED = "hyperfactions.cmd.invite.received"; - public static final String ACCEPT_HINT = "hyperfactions.cmd.invite.accept_hint"; - - private Invite() {} - } - - /** /f join, /f accept, /f request command messages. */ - public static final class Join { - public static final String NO_PERMISSION = "hyperfactions.cmd.join.no_permission"; - public static final String ALREADY_IN_NAMED = "hyperfactions.cmd.join.already_in_named"; - public static final String USE_LEAVE_HINT = "hyperfactions.cmd.join.use_leave_hint"; - public static final String NO_INVITES = "hyperfactions.cmd.join.no_invites"; - public static final String FACTION_NOT_FOUND = "hyperfactions.cmd.join.faction_not_found"; - public static final String NOT_INVITED = "hyperfactions.cmd.join.not_invited"; - public static final String FACTION_GONE = "hyperfactions.cmd.join.faction_gone"; - public static final String SUCCESS = "hyperfactions.cmd.join.success"; - public static final String BROADCAST = "hyperfactions.cmd.join.broadcast"; - public static final String FACTION_FULL = "hyperfactions.cmd.join.faction_full"; - public static final String FAILED = "hyperfactions.cmd.join.failed"; - - private Join() {} - } - - /** /f leave command messages. */ - public static final class Leave { - public static final String NO_PERMISSION = "hyperfactions.cmd.leave.no_permission"; - public static final String CONFIRM_PROMPT = "hyperfactions.cmd.leave.confirm_prompt"; - public static final String CONFIRM_INSTRUCTION = "hyperfactions.cmd.leave.confirm_instruction"; - public static final String SUCCESS = "hyperfactions.cmd.leave.success"; - public static final String BROADCAST = "hyperfactions.cmd.leave.broadcast"; - public static final String FAILED = "hyperfactions.cmd.leave.failed"; - public static final String CANCELLED = "hyperfactions.cmd.leave.cancelled"; - - private Leave() {} - } - - /** /f kick command messages. */ - public static final class Kick { - public static final String NO_PERMISSION = "hyperfactions.cmd.kick.no_permission"; - public static final String USAGE = "hyperfactions.cmd.kick.usage"; - public static final String NOT_IN_YOUR_FACTION = "hyperfactions.cmd.kick.not_in_your_faction"; - public static final String SUCCESS = "hyperfactions.cmd.kick.success"; - public static final String BROADCAST = "hyperfactions.cmd.kick.broadcast"; - public static final String KICKED = "hyperfactions.cmd.kick.kicked"; - public static final String CANNOT_KICK_HIGHER = "hyperfactions.cmd.kick.cannot_kick_higher"; - public static final String CANNOT_KICK_LEADER = "hyperfactions.cmd.kick.cannot_kick_leader"; - public static final String FAILED = "hyperfactions.cmd.kick.failed"; - - private Kick() {} - } - - /** /f promote, /f demote, /f transfer command messages. */ - public static final class Rank { - // Promote - public static final String PROMOTE_NO_PERMISSION = "hyperfactions.cmd.rank.promote_no_permission"; - public static final String PROMOTE_USAGE = "hyperfactions.cmd.rank.promote_usage"; - public static final String PROMOTED = "hyperfactions.cmd.rank.promoted"; - public static final String PROMOTE_BROADCAST = "hyperfactions.cmd.rank.promote_broadcast"; - public static final String ALREADY_HIGHEST = "hyperfactions.cmd.rank.already_highest"; - public static final String PROMOTE_FAILED = "hyperfactions.cmd.rank.promote_failed"; - // Demote - public static final String DEMOTE_NO_PERMISSION = "hyperfactions.cmd.rank.demote_no_permission"; - public static final String DEMOTE_USAGE = "hyperfactions.cmd.rank.demote_usage"; - public static final String DEMOTED = "hyperfactions.cmd.rank.demoted"; - public static final String DEMOTE_BROADCAST = "hyperfactions.cmd.rank.demote_broadcast"; - public static final String ALREADY_LOWEST = "hyperfactions.cmd.rank.already_lowest"; - public static final String DEMOTE_FAILED = "hyperfactions.cmd.rank.demote_failed"; - // Transfer - public static final String TRANSFER_NO_PERMISSION = "hyperfactions.cmd.rank.transfer_no_permission"; - public static final String TRANSFER_USAGE = "hyperfactions.cmd.rank.transfer_usage"; - public static final String PLAYER_NOT_IN_FACTION = "hyperfactions.cmd.rank.player_not_in_faction"; - public static final String TRANSFER_CONFIRM = "hyperfactions.cmd.rank.transfer_confirm"; - public static final String TRANSFER_CONFIRM_INSTRUCTION = "hyperfactions.cmd.rank.transfer_confirm_instruction"; - public static final String TRANSFERRED = "hyperfactions.cmd.rank.transferred"; - public static final String TRANSFER_BROADCAST = "hyperfactions.cmd.rank.transfer_broadcast"; - public static final String TRANSFER_FAILED = "hyperfactions.cmd.rank.transfer_failed"; - public static final String TRANSFER_CANCELLED = "hyperfactions.cmd.rank.transfer_cancelled"; - - private Rank() {} - } - - /** /f claim, /f unclaim, /f overclaim command messages. */ - public static final class Claim { - // Claim - public static final String NO_PERMISSION = "hyperfactions.cmd.claim.no_permission"; - public static final String SUCCESS = "hyperfactions.cmd.claim.success"; - public static final String ALREADY_CLAIMED = "hyperfactions.cmd.claim.already_claimed"; - public static final String ALREADY_YOURS = "hyperfactions.cmd.claim.already_yours"; - public static final String CANNOT_CLAIM_ALLY = "hyperfactions.cmd.claim.cannot_claim_ally"; - public static final String ALREADY_CLAIMED_HINT = "hyperfactions.cmd.claim.already_claimed_hint"; - public static final String NOT_OFFICER = "hyperfactions.cmd.claim.not_officer"; - public static final String NOT_CONNECTED = "hyperfactions.cmd.claim.not_adjacent"; - public static final String MAX_CLAIMS = "hyperfactions.cmd.claim.max_claims"; - public static final String WORLD_NOT_ALLOWED = "hyperfactions.cmd.claim.world_not_allowed"; - public static final String ORBISGUARD = "hyperfactions.cmd.claim.orbisguard"; - public static final String ZONE_PROTECTED = "hyperfactions.cmd.claim.zone_protected"; - public static final String FAILED = "hyperfactions.cmd.claim.failed"; - // Unclaim - public static final String UNCLAIM_NO_PERMISSION = "hyperfactions.cmd.unclaim.no_permission"; - public static final String UNCLAIMED = "hyperfactions.cmd.unclaim.success"; - public static final String UNCLAIM_NOT_OFFICER = "hyperfactions.cmd.unclaim.not_officer"; - public static final String CHUNK_NOT_CLAIMED = "hyperfactions.cmd.unclaim.chunk_not_claimed"; - public static final String NOT_YOUR_CLAIM = "hyperfactions.cmd.unclaim.not_your_claim"; - public static final String CANNOT_UNCLAIM_HOME = "hyperfactions.cmd.unclaim.cannot_unclaim_home"; - public static final String WOULD_DISCONNECT = "hyperfactions.cmd.unclaim.would_disconnect"; - public static final String UNCLAIM_FAILED = "hyperfactions.cmd.unclaim.failed"; - // Overclaim - public static final String OVERCLAIM_NO_PERMISSION = "hyperfactions.cmd.overclaim.no_permission"; - public static final String OVERCLAIMED = "hyperfactions.cmd.overclaim.success"; - public static final String OVERCLAIM_NOT_OFFICER = "hyperfactions.cmd.overclaim.not_officer"; - public static final String OVERCLAIM_NOT_CLAIMED = "hyperfactions.cmd.overclaim.not_claimed"; - public static final String OVERCLAIM_OWN = "hyperfactions.cmd.overclaim.own_chunk"; - public static final String OVERCLAIM_ALLY = "hyperfactions.cmd.overclaim.ally"; - public static final String TARGET_HAS_POWER = "hyperfactions.cmd.overclaim.target_has_power"; - public static final String OVERCLAIM_FAILED = "hyperfactions.cmd.overclaim.failed"; - public static final String INSUFFICIENT_POWER = "hyperfactions.cmd.claim.insufficient_power"; - - private Claim() {} - } - - /** /f home, /f sethome, /f delhome, /f stuck command messages. */ - public static final class Home { - // Home - public static final String NO_PERMISSION = "hyperfactions.cmd.home.no_permission"; - public static final String NO_HOME = "hyperfactions.cmd.home.no_home"; - public static final String COMBAT_TAGGED = "hyperfactions.cmd.home.combat_tagged"; - public static final String TELEPORTED = "hyperfactions.cmd.home.teleported"; - public static final String WARMUP = "hyperfactions.cmd.home.warmup"; - public static final String WARMUP_CANCELLED = "hyperfactions.cmd.home.warmup_cancelled"; - public static final String COOLDOWN = "hyperfactions.cmd.home.cooldown"; - // SetHome - public static final String SETHOME_NO_PERMISSION = "hyperfactions.cmd.sethome.no_permission"; - public static final String SETHOME_WORLD_NOT_ALLOWED = "hyperfactions.cmd.sethome.world_not_allowed"; - public static final String NOT_IN_TERRITORY = "hyperfactions.cmd.sethome.not_in_territory"; - public static final String SET = "hyperfactions.cmd.sethome.set"; - public static final String SETHOME_BROADCAST = "hyperfactions.cmd.sethome.broadcast"; - public static final String SETHOME_NOT_OFFICER = "hyperfactions.cmd.sethome.not_officer"; - public static final String SETHOME_FAILED = "hyperfactions.cmd.sethome.failed"; - // DelHome - public static final String DELHOME_NO_PERMISSION = "hyperfactions.cmd.delhome.no_permission"; - public static final String DELHOME_NO_HOME = "hyperfactions.cmd.delhome.no_home"; - public static final String DELETED = "hyperfactions.cmd.delhome.deleted"; - public static final String DELHOME_BROADCAST = "hyperfactions.cmd.delhome.broadcast"; - public static final String DELHOME_NOT_OFFICER = "hyperfactions.cmd.delhome.not_officer"; - public static final String DELHOME_FAILED = "hyperfactions.cmd.delhome.failed"; - // Stuck - public static final String STUCK_NO_PERMISSION = "hyperfactions.cmd.stuck.no_permission"; - public static final String STUCK_NOT_STUCK = "hyperfactions.cmd.stuck.not_stuck"; - public static final String STUCK_COMBAT_TAGGED = "hyperfactions.cmd.stuck.combat_tagged"; - public static final String STUCK_NO_SAFE = "hyperfactions.cmd.stuck.no_safe"; - public static final String STUCK_TELEPORTING = "hyperfactions.cmd.stuck.teleporting"; - - private Home() {} - } - - /** /f power command messages. */ - public static final class Power { - public static final String PERSONAL = "hyperfactions.cmd.power.personal"; - public static final String FACTION = "hyperfactions.cmd.power.faction"; - public static final String DEATH_LOSS = "hyperfactions.cmd.power.death_loss"; - public static final String REGEN = "hyperfactions.cmd.power.regen"; - public static final String NO_PERMISSION = "hyperfactions.cmd.power.no_permission"; - public static final String HEADER = "hyperfactions.cmd.power.header"; - public static final String CURRENT = "hyperfactions.cmd.power.current"; - - private Power() {} - } - - /** /f ally, /f enemy, /f neutral, /f relations command messages. */ - public static final class Relation { - public static final String ALLY_SENT = "hyperfactions.cmd.relation.ally_sent"; - public static final String ALLY_RECEIVED = "hyperfactions.cmd.relation.ally_received"; - public static final String ALLY_FORMED = "hyperfactions.cmd.relation.ally_formed"; - public static final String ENEMY_DECLARED = "hyperfactions.cmd.relation.enemy_declared"; - public static final String ENEMY_RECEIVED = "hyperfactions.cmd.relation.enemy_received"; - public static final String NEUTRAL_SET = "hyperfactions.cmd.relation.neutral_set"; - public static final String ALREADY_RELATION = "hyperfactions.cmd.relation.already_relation"; - public static final String CANNOT_SELF = "hyperfactions.cmd.relation.cannot_self"; - public static final String MAX_ALLIES = "hyperfactions.cmd.relation.max_allies"; - // Ally - public static final String ALLY_NO_PERMISSION = "hyperfactions.cmd.relation.ally_no_permission"; - public static final String ALLY_USAGE = "hyperfactions.cmd.relation.ally_usage"; - public static final String ALREADY_ALLY = "hyperfactions.cmd.relation.already_ally"; - public static final String ALLY_FAILED = "hyperfactions.cmd.relation.ally_failed"; - // Enemy - public static final String ENEMY_NO_PERMISSION = "hyperfactions.cmd.relation.enemy_no_permission"; - public static final String ENEMY_USAGE = "hyperfactions.cmd.relation.enemy_usage"; - public static final String ALREADY_ENEMY = "hyperfactions.cmd.relation.already_enemy"; - public static final String MAX_ENEMIES = "hyperfactions.cmd.relation.max_enemies"; - public static final String ENEMY_FAILED = "hyperfactions.cmd.relation.enemy_failed"; - // Neutral - public static final String NEUTRAL_NO_PERMISSION = "hyperfactions.cmd.relation.neutral_no_permission"; - public static final String NEUTRAL_USAGE = "hyperfactions.cmd.relation.neutral_usage"; - public static final String ALREADY_NEUTRAL = "hyperfactions.cmd.relation.already_neutral"; - public static final String NEUTRAL_FAILED = "hyperfactions.cmd.relation.neutral_failed"; - // Relations list - public static final String VIEW_NO_PERMISSION = "hyperfactions.cmd.relation.view_no_permission"; - public static final String HEADER = "hyperfactions.cmd.relation.header"; - public static final String ALLIES_COUNT = "hyperfactions.cmd.relation.allies_count"; - public static final String ENEMIES_COUNT = "hyperfactions.cmd.relation.enemies_count"; - public static final String LIST_ENTRY = "hyperfactions.cmd.relation.list_entry"; - - private Relation() {} - } - - /** /f c (chat) command messages. */ - public static final class Chat { - public static final String MODE_FACTION = "hyperfactions.cmd.chat.mode_faction"; - public static final String MODE_ALLY = "hyperfactions.cmd.chat.mode_ally"; - public static final String MODE_PUBLIC = "hyperfactions.cmd.chat.mode_public"; - public static final String USAGE = "hyperfactions.cmd.chat.usage"; - public static final String NO_PERMISSION = "hyperfactions.cmd.chat.no_permission"; - public static final String MODE_SET = "hyperfactions.cmd.chat.mode_set"; - - private Chat() {} - } - - /** /f invites command messages. */ - public static final class Invites { - public static final String NOT_OFFICER = "hyperfactions.cmd.invites.not_officer"; - public static final String HEADER = "hyperfactions.cmd.invites.header"; - public static final String NO_PENDING = "hyperfactions.cmd.invites.no_pending"; - public static final String OUTGOING = "hyperfactions.cmd.invites.outgoing"; - public static final String OUTGOING_ENTRY = "hyperfactions.cmd.invites.outgoing_entry"; - public static final String REQUESTS = "hyperfactions.cmd.invites.requests"; - public static final String REQUEST_ENTRY = "hyperfactions.cmd.invites.request_entry"; - public static final String YOUR_INVITES_HEADER = "hyperfactions.cmd.invites.your_invites_header"; - public static final String NO_INVITES = "hyperfactions.cmd.invites.no_invites"; - public static final String INVITE_ENTRY = "hyperfactions.cmd.invites.invite_entry"; - - private Invites() {} - } - - /** /f request command messages. */ - public static final class Request { - public static final String NO_PERMISSION = "hyperfactions.cmd.request.no_permission"; - public static final String ALREADY_IN_NAMED = "hyperfactions.cmd.request.already_in_named"; - public static final String USE_LEAVE_HINT = "hyperfactions.cmd.request.use_leave_hint"; - public static final String USAGE = "hyperfactions.cmd.request.usage"; - public static final String FACTION_OPEN = "hyperfactions.cmd.request.faction_open"; - public static final String ALREADY_REQUESTED = "hyperfactions.cmd.request.already_requested"; - public static final String HAS_INVITE = "hyperfactions.cmd.request.has_invite"; - public static final String SENT = "hyperfactions.cmd.request.sent"; - public static final String YOUR_MESSAGE = "hyperfactions.cmd.request.your_message"; - public static final String OFFICER_REVIEW = "hyperfactions.cmd.request.officer_review"; - public static final String OFFICER_NOTIFY = "hyperfactions.cmd.request.officer_notify"; - public static final String OFFICER_REVIEW_HINT = "hyperfactions.cmd.request.officer_review_hint"; - - private Request() {} - } - - /** /f rename, /f desc, /f color, /f open, /f close, /f settings command messages. */ - public static final class Settings { - public static final String RENAMED = "hyperfactions.cmd.settings.renamed"; - public static final String DESCRIPTION_SET = "hyperfactions.cmd.settings.description_set"; - public static final String COLOR_SET = "hyperfactions.cmd.settings.color_set"; - public static final String OPENED = "hyperfactions.cmd.settings.opened"; - public static final String CLOSED = "hyperfactions.cmd.settings.closed"; - - private Settings() {} - } - - /** /f balance, /f deposit, /f withdraw, /f money command messages. */ - public static final class Economy { - public static final String BALANCE = "hyperfactions.cmd.economy.balance"; - public static final String DEPOSITED = "hyperfactions.cmd.economy.deposited"; - public static final String WITHDRAWN = "hyperfactions.cmd.economy.withdrawn"; - public static final String TRANSFERRED = "hyperfactions.cmd.economy.transferred"; - public static final String INSUFFICIENT = "hyperfactions.cmd.economy.insufficient"; - public static final String INVALID_AMOUNT = "hyperfactions.cmd.economy.invalid_amount"; - public static final String ECONOMY_DISABLED = "hyperfactions.cmd.economy.economy_disabled"; - // Balance - public static final String BALANCE_NO_PERMISSION = "hyperfactions.cmd.economy.balance_no_permission"; - public static final String TREASURY_UNAVAILABLE = "hyperfactions.cmd.economy.treasury_unavailable"; - public static final String BALANCE_DISPLAY = "hyperfactions.cmd.economy.balance_display"; - // Deposit - public static final String DEPOSIT_NO_PERMISSION = "hyperfactions.cmd.economy.deposit_no_permission"; - public static final String DEPOSIT_FACTION_DENIED = "hyperfactions.cmd.economy.deposit_faction_denied"; - public static final String DEPOSIT_USAGE = "hyperfactions.cmd.economy.deposit_usage"; - public static final String AMOUNT_POSITIVE = "hyperfactions.cmd.economy.amount_positive"; - public static final String WALLET_INSUFFICIENT = "hyperfactions.cmd.economy.wallet_insufficient"; - public static final String WALLET_WITHDRAW_FAILED = "hyperfactions.cmd.economy.wallet_withdraw_failed"; - public static final String DEPOSIT_FAILED = "hyperfactions.cmd.economy.deposit_failed"; - // Withdraw - public static final String WITHDRAW_NO_PERMISSION = "hyperfactions.cmd.economy.withdraw_no_permission"; - public static final String WITHDRAW_FACTION_DENIED = "hyperfactions.cmd.economy.withdraw_faction_denied"; - public static final String WITHDRAW_USAGE = "hyperfactions.cmd.economy.withdraw_usage"; - public static final String WITHDRAW_LIMIT_DENIED = "hyperfactions.cmd.economy.withdraw_limit_denied"; - public static final String WALLET_DEPOSIT_FAILED = "hyperfactions.cmd.economy.wallet_deposit_failed"; - public static final String WITHDRAW_LIMIT_EXCEEDED = "hyperfactions.cmd.economy.withdraw_limit_exceeded"; - public static final String WITHDRAW_FAILED = "hyperfactions.cmd.economy.withdraw_failed"; - // Transfer - public static final String TRANSFER_NO_PERMISSION = "hyperfactions.cmd.economy.transfer_no_permission"; - public static final String TRANSFER_FACTION_DENIED = "hyperfactions.cmd.economy.transfer_faction_denied"; - public static final String TRANSFER_USAGE = "hyperfactions.cmd.economy.transfer_usage"; - public static final String TRANSFER_SELF = "hyperfactions.cmd.economy.transfer_self"; - public static final String TRANSFER_LIMIT_DENIED = "hyperfactions.cmd.economy.transfer_limit_denied"; - public static final String TRANSFER_LIMIT_EXCEEDED = "hyperfactions.cmd.economy.transfer_limit_exceeded"; - public static final String TRANSFER_FAILED = "hyperfactions.cmd.economy.transfer_failed"; - // Log - public static final String LOG_NO_PERMISSION = "hyperfactions.cmd.economy.log_no_permission"; - public static final String LOG_HEADER = "hyperfactions.cmd.economy.log_header"; - public static final String LOG_EMPTY = "hyperfactions.cmd.economy.log_empty"; - // Money help - public static final String MONEY_HELP_HEADER = "hyperfactions.cmd.economy.money_help_header"; - public static final String MONEY_HELP_BALANCE = "hyperfactions.cmd.economy.money_help_balance"; - public static final String MONEY_HELP_DEPOSIT = "hyperfactions.cmd.economy.money_help_deposit"; - public static final String MONEY_HELP_WITHDRAW = "hyperfactions.cmd.economy.money_help_withdraw"; - public static final String MONEY_HELP_TRANSFER = "hyperfactions.cmd.economy.money_help_transfer"; - public static final String MONEY_HELP_LOG = "hyperfactions.cmd.economy.money_help_log"; - - private Economy() {} - } - - /** /f info, /f who, /f list, /f members, /f map, /f help command messages. */ - public static final class Info { - public static final String FACTION_HEADER = "hyperfactions.cmd.info.faction_header"; - public static final String PLAYER_HEADER = "hyperfactions.cmd.info.player_header"; - // Info command - public static final String NO_PERMISSION = "hyperfactions.cmd.info.no_permission"; - public static final String FACTION_NOT_FOUND = "hyperfactions.cmd.info.faction_not_found"; - public static final String NOT_IN_FACTION_HINT = "hyperfactions.cmd.info.not_in_faction_hint"; - public static final String LEADER = "hyperfactions.cmd.info.leader"; - public static final String MEMBERS = "hyperfactions.cmd.info.members"; - public static final String POWER = "hyperfactions.cmd.info.power"; - public static final String CLAIMS = "hyperfactions.cmd.info.claims"; - public static final String RAIDABLE = "hyperfactions.cmd.info.raidable"; - public static final String ALLIES = "hyperfactions.cmd.info.allies"; - public static final String ENEMIES = "hyperfactions.cmd.info.enemies"; - public static final String THEY_CONSIDER = "hyperfactions.cmd.info.they_consider"; - public static final String YOU_CONSIDER = "hyperfactions.cmd.info.you_consider"; - // Members command - public static final String MEMBERS_NO_PERMISSION = "hyperfactions.cmd.info.members_no_permission"; - public static final String MEMBERS_HEADER = "hyperfactions.cmd.info.members_header"; - public static final String MEMBER_ONLINE = "hyperfactions.cmd.info.member_online"; - // List command - public static final String LIST_NO_PERMISSION = "hyperfactions.cmd.info.list_no_permission"; - public static final String LIST_EMPTY = "hyperfactions.cmd.info.list_empty"; - public static final String LIST_HEADER = "hyperfactions.cmd.info.list_header"; - public static final String LIST_ENTRY = "hyperfactions.cmd.info.list_entry"; - public static final String LIST_ENTRY_RAIDABLE = "hyperfactions.cmd.info.list_entry_raidable"; - // Help command - public static final String HELP_NO_PERMISSION = "hyperfactions.cmd.info.help_no_permission"; - // Who command - public static final String WHO_NO_PERMISSION = "hyperfactions.cmd.info.who_no_permission"; - public static final String WHO_FACTION = "hyperfactions.cmd.info.who_faction"; - public static final String WHO_ROLE = "hyperfactions.cmd.info.who_role"; - public static final String WHO_JOINED = "hyperfactions.cmd.info.who_joined"; - public static final String WHO_FACTION_NONE = "hyperfactions.cmd.info.who_faction_none"; - public static final String WHO_POWER = "hyperfactions.cmd.info.who_power"; - public static final String WHO_STATUS = "hyperfactions.cmd.info.who_status"; - public static final String WHO_LAST_SEEN = "hyperfactions.cmd.info.who_last_seen"; - // Map command - public static final String MAP_NO_PERMISSION = "hyperfactions.cmd.info.map_no_permission"; - public static final String MAP_HEADER = "hyperfactions.cmd.info.map_header"; - public static final String MAP_LEGEND = "hyperfactions.cmd.info.map_legend"; - public static final String MAP_GUI_HINT = "hyperfactions.cmd.info.map_gui_hint"; - - private Info() {} - } - - /** /f admin command messages. */ - public static final class Admin { - public static final String RELOAD_SUCCESS = "hyperfactions.cmd.admin.reload_success"; - public static final String SYNC_SUCCESS = "hyperfactions.cmd.admin.sync_success"; - public static final String BYPASS_ON = "hyperfactions.cmd.admin.bypass_on"; - public static final String BYPASS_OFF = "hyperfactions.cmd.admin.bypass_off"; - public static final String NOT_ADMIN = "hyperfactions.cmd.admin.not_admin"; - - private Admin() {} - } - - // ===================================================================== - // Protection — denial messages - // ===================================================================== - - /** Protection denial messages shown when actions are blocked. */ - public static final class Protection { - // Action phrases (what the player tried to do) - public static final String ACTION_GENERIC = "hyperfactions.protection.action.generic"; - public static final String ACTION_BUILD = "hyperfactions.protection.action.build"; - public static final String ACTION_INTERACT = "hyperfactions.protection.action.interact"; - public static final String ACTION_DOOR = "hyperfactions.protection.action.door"; - public static final String ACTION_CONTAINER = "hyperfactions.protection.action.container"; - public static final String ACTION_BENCH = "hyperfactions.protection.action.bench"; - public static final String ACTION_PROCESSING = "hyperfactions.protection.action.processing"; - public static final String ACTION_SEAT = "hyperfactions.protection.action.seat"; - public static final String ACTION_LIGHT = "hyperfactions.protection.action.light"; - public static final String ACTION_TELEPORTER = "hyperfactions.protection.action.teleporter"; - public static final String ACTION_CRATE = "hyperfactions.protection.action.crate"; - public static final String ACTION_TAME = "hyperfactions.protection.action.tame"; - public static final String ACTION_NPC = "hyperfactions.protection.action.npc"; - public static final String ACTION_MOUNT = "hyperfactions.protection.action.mount"; - public static final String ACTION_PVE = "hyperfactions.protection.action.pve"; - public static final String ACTION_ITEM_DROP = "hyperfactions.protection.action.item_drop"; - public static final String ACTION_ITEM_PICKUP = "hyperfactions.protection.action.item_pickup"; - - // Denial reasons (with {0} placeholder for action phrase) - public static final String DENIED_SAFEZONE = "hyperfactions.protection.denied.safezone"; - public static final String DENIED_WARZONE = "hyperfactions.protection.denied.warzone"; - public static final String DENIED_ENEMY_CLAIM = "hyperfactions.protection.denied.enemy_claim"; - public static final String DENIED_CLAIMED = "hyperfactions.protection.denied.claimed"; - public static final String DENIED_HERE = "hyperfactions.protection.denied.here"; - public static final String DENIED_ZONE = "hyperfactions.protection.denied.zone"; - public static final String DENIED_FACTION_PERM = "hyperfactions.protection.denied.faction_perm"; - public static final String DENIED_ALLY_TERRITORY = "hyperfactions.protection.denied.ally_territory"; - public static final String DENIED_ERROR = "hyperfactions.protection.denied.error"; - - // PvP denial messages - public static final String PVP_SAFEZONE = "hyperfactions.protection.pvp.safezone"; - public static final String PVP_SAME_FACTION = "hyperfactions.protection.pvp.same_faction"; - public static final String PVP_ALLY = "hyperfactions.protection.pvp.ally"; - public static final String PVP_SPAWN_PROTECTED = "hyperfactions.protection.pvp.spawn_protected"; - public static final String PVP_TERRITORY_DISABLED = "hyperfactions.protection.pvp.territory_disabled"; - public static final String PVP_GENERIC = "hyperfactions.protection.pvp.generic"; - - // Entity damage (zone-level) - public static final String MOB_DAMAGE_DISABLED = "hyperfactions.protection.mob_damage_disabled"; - public static final String PVE_DAMAGE_DISABLED = "hyperfactions.protection.pve_damage_disabled"; - public static final String PVE_TERRITORY_DENIED = "hyperfactions.protection.pve_territory_denied"; - - // Combat tag - public static final String COMBAT_TAG_COMMAND = "hyperfactions.protection.combat_tag_command"; - - private Protection() {} - } - - // ===================================================================== - // Territory — entry/exit notifications, announcements - // ===================================================================== - - /** Territory entry/exit and announcement messages. */ - public static final class Territory { - public static final String ENTER_OWN = "hyperfactions.territory.enter_own"; - public static final String ENTER_ALLY = "hyperfactions.territory.enter_ally"; - public static final String ENTER_ENEMY = "hyperfactions.territory.enter_enemy"; - public static final String ENTER_NEUTRAL = "hyperfactions.territory.enter_neutral"; - public static final String ENTER_WILDERNESS = "hyperfactions.territory.enter_wilderness"; - public static final String ENTER_SAFEZONE = "hyperfactions.territory.enter_safezone"; - public static final String ENTER_WARZONE = "hyperfactions.territory.enter_warzone"; - public static final String INTRUDER_ALERT = "hyperfactions.territory.intruder_alert"; - - private Territory() {} - } - - // ===================================================================== - // Announcements — faction-wide broadcasts - // ===================================================================== - - /** Server-wide broadcast messages (AnnouncementManager). */ - public static final class ServerAnnounce { - public static final String FACTION_CREATED = "hyperfactions.server_announce.faction_created"; - public static final String FACTION_DISBANDED = "hyperfactions.server_announce.faction_disbanded"; - public static final String LEADERSHIP_TRANSFER = "hyperfactions.server_announce.leadership_transfer"; - public static final String OVERCLAIM = "hyperfactions.server_announce.overclaim"; - public static final String WAR_DECLARED = "hyperfactions.server_announce.war_declared"; - public static final String ALLIANCE_FORMED = "hyperfactions.server_announce.alliance_formed"; - public static final String ALLIANCE_BROKEN = "hyperfactions.server_announce.alliance_broken"; - - private ServerAnnounce() {} - } - - /** Faction-wide broadcast messages. */ - public static final class Announce { - public static final String MEMBER_JOIN = "hyperfactions.announce.member_join"; - public static final String MEMBER_LEAVE = "hyperfactions.announce.member_leave"; - public static final String MEMBER_KICK = "hyperfactions.announce.member_kick"; - public static final String MEMBER_PROMOTED = "hyperfactions.announce.member_promoted"; - public static final String MEMBER_DEMOTED = "hyperfactions.announce.member_demoted"; - public static final String MEMBER_DEATH = "hyperfactions.announce.member_death"; - public static final String TERRITORY_CLAIMED = "hyperfactions.announce.territory_claimed"; - public static final String TERRITORY_LOST = "hyperfactions.announce.territory_lost"; - public static final String POWER_LOW = "hyperfactions.announce.power_low"; - public static final String RAIDABLE = "hyperfactions.announce.raidable"; - - private Announce() {} - } - - // ===================================================================== - // GUI — Navigation and shared GUI elements - // ===================================================================== - - /** Navigation bar labels. */ - public static final class Nav { - public static final String DASHBOARD = "hyperfactions_gui.nav.dashboard"; - public static final String CHAT = "hyperfactions_gui.nav.chat"; - public static final String MEMBERS = "hyperfactions_gui.nav.members"; - public static final String INVITES = "hyperfactions_gui.nav.invites"; - public static final String BROWSER = "hyperfactions_gui.nav.browser"; - public static final String MAP = "hyperfactions_gui.nav.map"; - public static final String LEADERBOARD = "hyperfactions_gui.nav.leaderboard"; - public static final String RELATIONS = "hyperfactions_gui.nav.relations"; - public static final String TREASURY = "hyperfactions_gui.nav.treasury"; - public static final String SETTINGS = "hyperfactions_gui.nav.settings"; - public static final String LOGS = "hyperfactions_gui.nav.logs"; - public static final String HELP = "hyperfactions_gui.nav.help"; - public static final String ADMIN = "hyperfactions_gui.nav.admin"; - public static final String CREATE = "hyperfactions_gui.nav.create"; - public static final String PLAYER_SETTINGS = "hyperfactions_gui.nav.player_settings"; - - private Nav() {} - } - - /** Admin navigation bar labels. */ - public static final class AdminNav { - public static final String DASHBOARD = "hyperfactions_admin.nav.dashboard"; - public static final String ACTIONS = "hyperfactions_admin.nav.actions"; - public static final String FACTIONS = "hyperfactions_admin.nav.factions"; - public static final String PLAYERS = "hyperfactions_admin.nav.players"; - public static final String ECONOMY = "hyperfactions_admin.nav.economy"; - public static final String ZONES = "hyperfactions_admin.nav.zones"; - public static final String CONFIG = "hyperfactions_admin.nav.config"; - public static final String BACKUPS = "hyperfactions_admin.nav.backups"; - public static final String LOG = "hyperfactions_admin.nav.log"; - public static final String UPDATES = "hyperfactions_admin.nav.updates"; - public static final String HELP = "hyperfactions_admin.nav.help"; - public static final String VERSION = "hyperfactions_admin.nav.version"; - - private AdminNav() {} - } - - /** Main menu page labels. */ - public static final class MainMenu { - public static final String TITLE = "hyperfactions_gui.main_menu.title"; - public static final String SECTION_MY_FACTION = "hyperfactions_gui.main_menu.section_my_faction"; - public static final String SECTION_GET_STARTED = "hyperfactions_gui.main_menu.section_get_started"; - public static final String SECTION_TERRITORY = "hyperfactions_gui.main_menu.section_territory"; - public static final String SECTION_BROWSE = "hyperfactions_gui.main_menu.section_browse"; - public static final String SECTION_ADMIN = "hyperfactions_gui.main_menu.section_admin"; - public static final String CLAIM_HINT = "hyperfactions_gui.main_menu.claim_hint"; - - private MainMenu() {} - } - - /** Faction info page labels. */ - public static final class FactionInfoGui { - public static final String TITLE = "hyperfactions_gui.faction_info.title"; - public static final String NO_DESCRIPTION = "hyperfactions_gui.faction_info.no_description"; - public static final String STATUS_OPEN = "hyperfactions_gui.faction_info.status_open"; - public static final String STATUS_INVITE_ONLY = "hyperfactions_gui.faction_info.status_invite_only"; - public static final String STATUS_RAIDABLE = "hyperfactions_gui.faction_info.status_raidable"; - public static final String STATUS_PROTECTED = "hyperfactions_gui.faction_info.status_protected"; - public static final String OFFICERS_MORE = "hyperfactions_gui.faction_info.officers_more"; - // Stat card headers - public static final String POWER_HEADER = "hyperfactions_gui.faction_info.power_header"; - public static final String CLAIMS_HEADER = "hyperfactions_gui.faction_info.claims_header"; - public static final String MEMBERS_HEADER = "hyperfactions_gui.faction_info.members_header"; - public static final String RELATIONS_HEADER = "hyperfactions_gui.faction_info.relations_header"; - public static final String STATUS_HEADER = "hyperfactions_gui.faction_info.status_header"; - public static final String TREASURY_HEADER = "hyperfactions_gui.faction_info.treasury_header"; - // Stat card subtitles - public static final String CURRENT_MAX = "hyperfactions_gui.faction_info.current_max"; - public static final String CLAIMED_MAX = "hyperfactions_gui.faction_info.claimed_max"; - public static final String ALLY_ENEMY = "hyperfactions_gui.faction_info.ally_enemy"; - public static final String FACTION_BALANCE = "hyperfactions_gui.faction_info.faction_balance"; - // Leadership labels - public static final String LEADER_LABEL = "hyperfactions_gui.faction_info.leader_label"; - public static final String OFFICERS_LABEL = "hyperfactions_gui.faction_info.officers_label"; - // Button text - public static final String VIEW_MEMBERS_BTN = "hyperfactions_gui.faction_info.view_members_btn"; - public static final String RELATIONS_BTN = "hyperfactions_gui.faction_info.relations_btn"; - public static final String BACK_BTN = "hyperfactions_gui.faction_info.back_btn"; - - private FactionInfoGui() {} - } - - /** Rename modal page messages. */ - public static final class RenameGui { - public static final String TITLE = "hyperfactions_gui.rename.title"; - public static final String CURRENT_LABEL = "hyperfactions_gui.rename.current_label"; - public static final String NEW_NAME_LABEL = "hyperfactions_gui.rename.new_name_label"; - public static final String NO_PERMISSION = "hyperfactions_gui.rename.no_permission"; - public static final String ENTER_NAME = "hyperfactions_gui.rename.enter_name"; - public static final String TOO_SHORT = "hyperfactions_gui.rename.too_short"; - public static final String TOO_LONG = "hyperfactions_gui.rename.too_long"; - public static final String SAME_NAME = "hyperfactions_gui.rename.same_name"; - public static final String NAME_TAKEN = "hyperfactions_gui.rename.name_taken"; - public static final String SUCCESS = "hyperfactions_gui.rename.success"; - - private RenameGui() {} - } - - /** Description modal page messages. */ - public static final class DescGui { - public static final String TITLE = "hyperfactions_gui.desc.title"; - public static final String CURRENT_LABEL = "hyperfactions_gui.desc.current_label"; - public static final String NEW_DESC_LABEL = "hyperfactions_gui.desc.new_desc_label"; - public static final String NO_PERMISSION = "hyperfactions_gui.desc.no_permission"; - public static final String DISPLAY_NONE = "hyperfactions_gui.desc.display_none"; - public static final String CLEARED = "hyperfactions_gui.desc.cleared"; - public static final String UPDATED = "hyperfactions_gui.desc.updated"; - - private DescGui() {} - } - - /** Tag modal page messages. */ - public static final class TagGui { - public static final String TITLE = "hyperfactions_gui.tag.title"; - public static final String CURRENT_LABEL = "hyperfactions_gui.tag.current_label"; - public static final String INSTRUCTIONS = "hyperfactions_gui.tag.instructions"; - public static final String HELP_TEXT = "hyperfactions_gui.tag.help_text"; - public static final String NO_PERMISSION = "hyperfactions_gui.tag.no_permission"; - public static final String DISPLAY_NONE = "hyperfactions_gui.tag.display_none"; - public static final String CLEARED = "hyperfactions_gui.tag.cleared"; - public static final String TOO_SHORT = "hyperfactions_gui.tag.too_short"; - public static final String TOO_LONG = "hyperfactions_gui.tag.too_long"; - public static final String INVALID_FORMAT = "hyperfactions_gui.tag.invalid_format"; - public static final String SAME_TAG = "hyperfactions_gui.tag.same_tag"; - public static final String TAG_TAKEN = "hyperfactions_gui.tag.tag_taken"; - public static final String SUCCESS = "hyperfactions_gui.tag.success"; - - private TagGui() {} - } - - /** Dashboard page labels and messages. */ - public static final class DashboardGui { - public static final String TITLE = "hyperfactions_gui.dashboard.title"; - public static final String POWER_LABEL = "hyperfactions_gui.dashboard.power_label"; - public static final String LAND_LABEL = "hyperfactions_gui.dashboard.land_label"; - public static final String MEMBERS_LABEL = "hyperfactions_gui.dashboard.members_label"; - public static final String ONLINE_LABEL = "hyperfactions_gui.dashboard.online_label"; - public static final String ALLIES_LABEL = "hyperfactions_gui.dashboard.allies_label"; - public static final String ENEMIES_LABEL = "hyperfactions_gui.dashboard.enemies_label"; - public static final String RELATIONS_LABEL = "hyperfactions_gui.dashboard.relations_label"; - public static final String ALLY_ENEMY_LABEL = "hyperfactions_gui.dashboard.ally_enemy_label"; - public static final String STATUS_LABEL = "hyperfactions_gui.dashboard.status_label"; - public static final String INVITES_LABEL = "hyperfactions_gui.dashboard.invites_label"; - public static final String SENT_REQUESTS_LABEL = "hyperfactions_gui.dashboard.sent_requests_label"; - public static final String TREASURY_LABEL = "hyperfactions_gui.dashboard.treasury_label"; - public static final String UPKEEP_LABEL = "hyperfactions_gui.dashboard.upkeep_label"; - public static final String PER_CYCLE = "hyperfactions_gui.dashboard.per_cycle"; - public static final String YOUR_WALLET = "hyperfactions_gui.dashboard.your_wallet"; - public static final String PERSONAL_BALANCE = "hyperfactions_gui.dashboard.personal_balance"; - public static final String QUICK_ACTIONS = "hyperfactions_gui.dashboard.quick_actions"; - public static final String TELEPORT_LABEL = "hyperfactions_gui.dashboard.teleport_label"; - public static final String TERRITORY_LABEL = "hyperfactions_gui.dashboard.territory_label"; - public static final String CHANNEL_LABEL = "hyperfactions_gui.dashboard.channel_label"; - public static final String MEMBERSHIP_LABEL = "hyperfactions_gui.dashboard.membership_label"; - public static final String RECENT_ACTIVITY = "hyperfactions_gui.dashboard.recent_activity"; - public static final String VIEW_ALL = "hyperfactions_gui.dashboard.view_all"; - public static final String INCOME_24H = "hyperfactions_gui.dashboard.income_24h"; - public static final String DEPOSITS_TRANSFERS_IN = "hyperfactions_gui.dashboard.deposits_transfers_in"; - public static final String EXPENSES_24H = "hyperfactions_gui.dashboard.expenses_24h"; - public static final String WITHDRAWALS_TRANSFERS_OUT = "hyperfactions_gui.dashboard.withdrawals_transfers_out"; - public static final String FACTION_GONE = "hyperfactions_gui.dashboard.faction_gone"; - public static final String AVAILABLE = "hyperfactions_gui.dashboard.available"; - public static final String AT_RISK = "hyperfactions_gui.dashboard.at_risk"; - public static final String ONLINE_COUNT = "hyperfactions_gui.dashboard.online_count"; - public static final String STATUS_INVITE = "hyperfactions_gui.dashboard.status_invite"; - public static final String IN_GRACE = "hyperfactions_gui.dashboard.in_grace"; - public static final String BILLABLE_CHUNKS = "hyperfactions_gui.dashboard.billable_chunks"; - public static final String BTN_HOME = "hyperfactions_gui.dashboard.btn_home"; - public static final String BTN_SET_HOME = "hyperfactions_gui.dashboard.btn_set_home"; - public static final String BTN_CLAIM = "hyperfactions_gui.dashboard.btn_claim"; - public static final String CHAT_PREFIX = "hyperfactions_gui.dashboard.chat_prefix"; - public static final String BTN_LEAVE = "hyperfactions_gui.dashboard.btn_leave"; - public static final String NO_ACTIVITY = "hyperfactions_gui.dashboard.no_activity"; - public static final String TIME_NOW = "hyperfactions_gui.dashboard.time_now"; - public static final String TIME_MINUTES = "hyperfactions_gui.dashboard.time_minutes"; - public static final String TIME_HOURS = "hyperfactions_gui.dashboard.time_hours"; - public static final String TIME_DAYS = "hyperfactions_gui.dashboard.time_days"; - public static final String NO_HOME_HINT = "hyperfactions_gui.dashboard.no_home_hint"; - public static final String CHAT_MODE_SET = "hyperfactions_gui.dashboard.chat_mode_set"; - public static final String CLAIM_SUCCESS = "hyperfactions_gui.dashboard.claim_success"; - public static final String UPKEEP_IN = "hyperfactions_gui.dashboard.upkeep_in"; - - private DashboardGui() {} - } - - /** Shared GUI labels used across multiple pages. */ - public static final class GuiCommon { - public static final String FACTION_COUNT = "hyperfactions_gui.common.faction_count"; - public static final String LEADER_LABEL = "hyperfactions_gui.common.leader_label"; - public static final String SORT_POWER = "hyperfactions_gui.common.sort_power"; - public static final String SORT_MEMBERS = "hyperfactions_gui.common.sort_members"; - public static final String PAGE_FORMAT = "hyperfactions_gui.common.page_format"; - public static final String OWN_FACTION = "hyperfactions_gui.common.own_faction"; - public static final String SEARCH = "hyperfactions_gui.common.search"; - public static final String SORT = "hyperfactions_gui.common.sort"; - public static final String PREV = "hyperfactions_gui.common.prev"; - public static final String NEXT = "hyperfactions_gui.common.next"; - - public static final String TREASURY_NOT_AVAILABLE = "hyperfactions_gui.common.treasury_not_available"; - - private GuiCommon() {} - } - - /** Members page labels and messages. */ - public static final class MembersGui { - public static final String TITLE = "hyperfactions_gui.members.title"; - public static final String SEARCH_LABEL = "hyperfactions_gui.members.search_label"; - public static final String SORT_LABEL = "hyperfactions_gui.members.sort_label"; - public static final String PREV_BTN = "hyperfactions_gui.members.prev_btn"; - public static final String NEXT_BTN = "hyperfactions_gui.members.next_btn"; - public static final String MEMBER_COUNT = "hyperfactions_gui.members.count"; - public static final String SORT_ROLE = "hyperfactions_gui.members.sort_role"; - public static final String SORT_LAST_ONLINE = "hyperfactions_gui.members.sort_last_online"; - public static final String JUST_NOW = "hyperfactions_gui.members.just_now"; - public static final String AGO = "hyperfactions_gui.members.ago"; - public static final String NEVER = "hyperfactions_gui.members.never"; - public static final String MEMBER_NOT_FOUND = "hyperfactions_gui.members.member_not_found"; - public static final String PROMOTED = "hyperfactions_gui.members.promoted"; - public static final String PROMOTE_FAILED = "hyperfactions_gui.members.promote_failed"; - public static final String DEMOTED = "hyperfactions_gui.members.demoted"; - public static final String DEMOTE_FAILED = "hyperfactions_gui.members.demote_failed"; - public static final String KICKED = "hyperfactions_gui.members.kicked"; - public static final String KICK_FAILED = "hyperfactions_gui.members.kick_failed"; - public static final String LABEL_POWER = "hyperfactions_gui.members.label_power"; - public static final String LABEL_JOINED = "hyperfactions_gui.members.label_joined"; - public static final String LABEL_LAST_DEATH = "hyperfactions_gui.members.label_last_death"; - public static final String BTN_PROMOTE = "hyperfactions_gui.members.btn_promote"; - public static final String BTN_DEMOTE = "hyperfactions_gui.members.btn_demote"; - public static final String BTN_KICK = "hyperfactions_gui.members.btn_kick"; - public static final String BTN_MAKE_LEADER = "hyperfactions_gui.members.btn_make_leader"; - public static final String BTN_PROFILE = "hyperfactions_gui.members.btn_profile"; - public static final String SELF_LABEL = "hyperfactions_gui.members.self_label"; - - private MembersGui() {} - } - - /** Browser page labels. */ - public static final class BrowserGui { - public static final String TITLE = "hyperfactions_gui.browser.title"; - public static final String SEARCH_LABEL = "hyperfactions_gui.browser.search_label"; - public static final String SORT_LABEL = "hyperfactions_gui.browser.sort_label"; - public static final String PREV_BTN = "hyperfactions_gui.browser.prev_btn"; - public static final String NEXT_BTN = "hyperfactions_gui.browser.next_btn"; - public static final String SORT_NAME = "hyperfactions_gui.browser.sort_name"; - public static final String INVALID_FACTION = "hyperfactions_gui.browser.invalid_faction"; - public static final String LABEL_POWER = "hyperfactions_gui.browser.label_power"; - public static final String LABEL_CLAIMS = "hyperfactions_gui.browser.label_claims"; - public static final String LABEL_MEMBERS = "hyperfactions_gui.browser.label_members"; - public static final String LABEL_RECRUITMENT = "hyperfactions_gui.browser.label_recruitment"; - public static final String LABEL_CREATED = "hyperfactions_gui.browser.label_created"; - public static final String LABEL_DESCRIPTION = "hyperfactions_gui.browser.label_description"; - public static final String VIEW_INFO_BTN = "hyperfactions_gui.browser.view_info_btn"; - public static final String LABEL_LEADER = "hyperfactions_gui.browser.label_leader"; - public static final String NO_DESCRIPTION = "hyperfactions_gui.browser.no_description"; - - private BrowserGui() {} - } - - /** Leaderboard page labels. */ - public static final class LeaderboardGui { - public static final String TITLE = "hyperfactions_gui.leaderboard.title"; - public static final String RANK_BY = "hyperfactions_gui.leaderboard.rank_by"; - public static final String COL_RANK = "hyperfactions_gui.leaderboard.col_rank"; - public static final String COL_FACTION = "hyperfactions_gui.leaderboard.col_faction"; - public static final String COL_CLAIMS = "hyperfactions_gui.leaderboard.col_claims"; - public static final String COL_MEMBERS = "hyperfactions_gui.leaderboard.col_members"; - public static final String PREV_BTN = "hyperfactions_gui.leaderboard.prev_btn"; - public static final String NEXT_BTN = "hyperfactions_gui.leaderboard.next_btn"; - public static final String SORT_KD = "hyperfactions_gui.leaderboard.sort_kd"; - public static final String SORT_TERRITORY = "hyperfactions_gui.leaderboard.sort_territory"; - public static final String SORT_BALANCE = "hyperfactions_gui.leaderboard.sort_balance"; - - private LeaderboardGui() {} - } - - /** Player info page labels and messages. */ - public static final class PlayerInfoGui { - public static final String TITLE = "hyperfactions_gui.playerinfo.title"; - public static final String FIRST_JOINED_LABEL = "hyperfactions_gui.playerinfo.first_joined_label"; - public static final String LAST_ONLINE_LABEL = "hyperfactions_gui.playerinfo.last_online_label"; - public static final String FACTION_LABEL = "hyperfactions_gui.playerinfo.faction_label"; - public static final String ROLE_LABEL = "hyperfactions_gui.playerinfo.role_label"; - public static final String JOINED_LABEL_STATIC = "hyperfactions_gui.playerinfo.joined_label_static"; - public static final String NOT_IN_FACTION = "hyperfactions_gui.playerinfo.not_in_faction"; - public static final String POWER_HEADER = "hyperfactions_gui.playerinfo.power_header"; - public static final String CURRENT_MAX = "hyperfactions_gui.playerinfo.current_max"; - public static final String COMBAT_HEADER = "hyperfactions_gui.playerinfo.combat_header"; - public static final String KILLS_DEATHS = "hyperfactions_gui.playerinfo.kills_deaths"; - public static final String KDR_HEADER = "hyperfactions_gui.playerinfo.kdr_header"; - public static final String MEMBERSHIP_HISTORY = "hyperfactions_gui.playerinfo.membership_history"; - public static final String VIEW_FACTION_BTN = "hyperfactions_gui.playerinfo.view_faction_btn"; - public static final String BACK_BTN = "hyperfactions_gui.playerinfo.back_btn"; - public static final String NOW = "hyperfactions_gui.playerinfo.now"; - public static final String HISTORY_COUNT = "hyperfactions_gui.playerinfo.history_count"; - public static final String JOINED_LABEL = "hyperfactions_gui.playerinfo.joined_label"; - public static final String CURRENT = "hyperfactions_gui.playerinfo.current"; - public static final String LEFT_LABEL = "hyperfactions_gui.playerinfo.left_label"; - public static final String NO_HISTORY = "hyperfactions_gui.playerinfo.no_history"; - public static final String FACTION_GONE = "hyperfactions_gui.playerinfo.faction_gone"; - public static final String REASON_ACTIVE = "hyperfactions_gui.playerinfo.reason_active"; - public static final String REASON_LEFT = "hyperfactions_gui.playerinfo.reason_left"; - public static final String REASON_KICKED = "hyperfactions_gui.playerinfo.reason_kicked"; - public static final String REASON_DISBANDED = "hyperfactions_gui.playerinfo.reason_disbanded"; - - private PlayerInfoGui() {} - } - - /** Faction main page (no-faction view) labels and messages. */ - public static final class FactionMainGui { - public static final String NO_FACTION = "hyperfactions_gui.main.no_faction"; - public static final String JOINED = "hyperfactions_gui.main.joined"; - public static final String JOIN_FAILED = "hyperfactions_gui.main.join_failed"; - public static final String INVITE_DECLINED = "hyperfactions_gui.main.invite_declined"; - public static final String COOLDOWN = "hyperfactions_gui.main.cooldown"; - public static final String WORLD_NOT_FOUND = "hyperfactions_gui.main.world_not_found"; - public static final String LEAVE_FAILED = "hyperfactions_gui.main.leave_failed"; - - private FactionMainGui() {} - } - - /** Help GUI category display names and new player help page content. */ - public static final class HelpGui { - public static final String WELCOME = "hyperfactions_gui.help.category.welcome"; - public static final String YOUR_FACTION = "hyperfactions_gui.help.category.your_faction"; - public static final String POWER_LAND = "hyperfactions_gui.help.category.power_land"; - public static final String DIPLOMACY = "hyperfactions_gui.help.category.diplomacy"; - public static final String COMBAT = "hyperfactions_gui.help.category.combat"; - public static final String ECONOMY = "hyperfactions_gui.help.category.economy"; - public static final String QUICK_REF = "hyperfactions_gui.help.category.quick_ref"; - // Admin help categories - public static final String ADMIN_OVERVIEW = "hyperfactions_gui.help.category.admin_overview"; - public static final String ADMIN_FACTIONS = "hyperfactions_gui.help.category.admin_factions"; - public static final String ADMIN_ZONES = "hyperfactions_gui.help.category.admin_zones"; - public static final String ADMIN_POWER = "hyperfactions_gui.help.category.admin_power"; - public static final String ADMIN_ECONOMY = "hyperfactions_gui.help.category.admin_economy"; - public static final String ADMIN_CONFIG = "hyperfactions_gui.help.category.admin_config"; - public static final String ADMIN_MAINTENANCE = "hyperfactions_gui.help.category.admin_maintenance"; - public static final String ADMIN_REFERENCE = "hyperfactions_gui.help.category.admin_reference"; - // Help Center page title - public static final String HELP_CENTER_TITLE = "hyperfactions_gui.help.center_title"; - // New player help page - public static final String GETTING_STARTED_TITLE = "hyperfactions_gui.help.getting_started_title"; - public static final String WHAT_ARE_FACTIONS_TITLE = "hyperfactions_gui.help.what_are_factions_title"; - public static final String WHAT_ARE_FACTIONS_1 = "hyperfactions_gui.help.what_are_factions_1"; - public static final String WHAT_ARE_FACTIONS_2 = "hyperfactions_gui.help.what_are_factions_2"; - public static final String WHAT_ARE_FACTIONS_BULLET_1 = "hyperfactions_gui.help.what_are_factions_bullet_1"; - public static final String WHAT_ARE_FACTIONS_BULLET_2 = "hyperfactions_gui.help.what_are_factions_bullet_2"; - public static final String WHAT_ARE_FACTIONS_BULLET_3 = "hyperfactions_gui.help.what_are_factions_bullet_3"; - public static final String JOINING_TITLE = "hyperfactions_gui.help.joining_title"; - public static final String JOINING_DESC = "hyperfactions_gui.help.joining_desc"; - public static final String JOINING_BULLET_1 = "hyperfactions_gui.help.joining_bullet_1"; - public static final String JOINING_BULLET_2 = "hyperfactions_gui.help.joining_bullet_2"; - public static final String JOINING_BULLET_3 = "hyperfactions_gui.help.joining_bullet_3"; - public static final String CREATING_TITLE = "hyperfactions_gui.help.creating_title"; - public static final String CREATING_DESC = "hyperfactions_gui.help.creating_desc"; - public static final String CREATING_BULLET_1 = "hyperfactions_gui.help.creating_bullet_1"; - public static final String CREATING_BULLET_2 = "hyperfactions_gui.help.creating_bullet_2"; - public static final String COMMANDS_TITLE = "hyperfactions_gui.help.commands_title"; - public static final String CMD_F = "hyperfactions_gui.help.cmd_f"; - public static final String CMD_F_LIST = "hyperfactions_gui.help.cmd_f_list"; - public static final String CMD_F_JOIN = "hyperfactions_gui.help.cmd_f_join"; - public static final String CMD_F_CREATE = "hyperfactions_gui.help.cmd_f_create"; - public static final String CMD_F_HELP = "hyperfactions_gui.help.cmd_f_help"; - public static final String TIP = "hyperfactions_gui.help.tip"; - - private HelpGui() {} - } - - /** Teleport system messages (TeleportManager). */ - public static final class Teleport { - public static final String COOLDOWN_WAIT = "hyperfactions.teleport.cooldown_wait"; - public static final String WARMUP_START = "hyperfactions.teleport.warmup_start"; - public static final String COMBAT_CANCELLED = "hyperfactions.teleport.combat_cancelled"; - public static final String SUCCESS_DEFAULT = "hyperfactions.teleport.success_default"; - public static final String NO_HOME = "hyperfactions.teleport.no_home"; - public static final String WORLD_NOT_FOUND = "hyperfactions.teleport.world_not_found"; - public static final String FAILED = "hyperfactions.teleport.failed"; - public static final String COUNTDOWN = "hyperfactions.teleport.countdown"; - public static final String COUNTDOWN_ONE = "hyperfactions.teleport.countdown_one"; - public static final String MOVED_CANCELLED = "hyperfactions.teleport.moved_cancelled"; - public static final String DAMAGE_CANCELLED = "hyperfactions.teleport.damage_cancelled"; - public static final String MOUNT_TELEPORT_BLOCKED = "hyperfactions.teleport.mount_teleport_blocked"; - public static final String MOUNT_ENTRY_BLOCKED = "hyperfactions.teleport.mount_entry_blocked"; - - private Teleport() {} - } - - /** Chat channel display names (ChatManager). */ - public static final class ChatDisplay { - public static final String PUBLIC = "hyperfactions.chat.display.public"; - public static final String FACTION = "hyperfactions.chat.display.faction"; - public static final String ALLY = "hyperfactions.chat.display.ally"; - - private ChatDisplay() {} - } - - /** Relations page labels and messages. */ - public static final class RelationsGui { - public static final String TITLE = "hyperfactions_gui.relations.title"; - public static final String TAB_RELATIONS = "hyperfactions_gui.relations.tab_relations"; - public static final String TAB_PENDING = "hyperfactions_gui.relations.tab_pending"; - public static final String SET_RELATION_BTN = "hyperfactions_gui.relations.set_relation_btn"; - public static final String PREV_BTN = "hyperfactions_gui.relations.prev_btn"; - public static final String NEXT_BTN = "hyperfactions_gui.relations.next_btn"; - public static final String RELATION_COUNT = "hyperfactions_gui.relations.relation_count"; - public static final String REQUEST_COUNT = "hyperfactions_gui.relations.request_count"; - public static final String TYPE_ALLY = "hyperfactions_gui.relations.type_ally"; - public static final String TYPE_ENEMY = "hyperfactions_gui.relations.type_enemy"; - public static final String TYPE_INCOMING = "hyperfactions_gui.relations.type_incoming"; - public static final String TYPE_OUTGOING = "hyperfactions_gui.relations.type_outgoing"; - public static final String INCOMING_REQUEST = "hyperfactions_gui.relations.incoming_request"; - public static final String OUTGOING_REQUEST = "hyperfactions_gui.relations.outgoing_request"; - public static final String EMPTY_RELATIONS = "hyperfactions_gui.relations.empty_relations"; - public static final String EMPTY_RELATIONS_HINT = "hyperfactions_gui.relations.empty_relations_hint"; - public static final String EMPTY_PENDING = "hyperfactions_gui.relations.empty_pending"; - public static final String TODAY = "hyperfactions_gui.relations.today"; - public static final String ONE_DAY_AGO = "hyperfactions_gui.relations.one_day_ago"; - public static final String DAYS_AGO = "hyperfactions_gui.relations.days_ago"; - public static final String NOW_NEUTRAL = "hyperfactions_gui.relations.now_neutral"; - public static final String NOW_ENEMIES = "hyperfactions_gui.relations.now_enemies"; - public static final String REQUEST_SENT = "hyperfactions_gui.relations.request_sent"; - public static final String NOW_ALLIED = "hyperfactions_gui.relations.now_allied"; - public static final String REQUEST_DECLINED = "hyperfactions_gui.relations.request_declined"; - public static final String REQUEST_CANCELLED = "hyperfactions_gui.relations.request_cancelled"; - public static final String FAILED = "hyperfactions_gui.relations.failed"; - public static final String SEARCH_HINT = "hyperfactions_gui.relations.search_hint"; - public static final String NO_RESULTS = "hyperfactions_gui.relations.no_results"; - public static final String POWER_DISPLAY = "hyperfactions_gui.relations.power_display"; - public static final String MEMBER_COUNT_DISPLAY = "hyperfactions_gui.relations.member_count"; - public static final String LABEL_MEMBERS = "hyperfactions_gui.relations.label_members"; - public static final String LABEL_POWER = "hyperfactions_gui.relations.label_power"; - public static final String LABEL_SINCE = "hyperfactions_gui.relations.label_since"; - public static final String LABEL_CLAIMS = "hyperfactions_gui.relations.label_claims"; - public static final String LABEL_DIRECTION = "hyperfactions_gui.relations.label_direction"; - public static final String BTN_VIEW = "hyperfactions_gui.relations.btn_view"; - public static final String BTN_NEUTRAL = "hyperfactions_gui.relations.btn_neutral"; - public static final String BTN_ENEMY = "hyperfactions_gui.relations.btn_enemy"; - public static final String BTN_ALLY = "hyperfactions_gui.relations.btn_ally"; - public static final String BTN_ACCEPT = "hyperfactions_gui.relations.btn_accept"; - public static final String BTN_DECLINE = "hyperfactions_gui.relations.btn_decline"; - public static final String BTN_CANCEL = "hyperfactions_gui.relations.btn_cancel"; - - private RelationsGui() {} - } - - /** Settings page labels and messages. */ - public static final class SettingsGui { - public static final String TITLE = "hyperfactions_gui.settings.title"; - public static final String GENERAL = "hyperfactions_gui.settings.general"; - public static final String NAME_LABEL = "hyperfactions_gui.settings.name_label"; - public static final String TAG_LABEL = "hyperfactions_gui.settings.tag_label"; - public static final String DESC_LABEL = "hyperfactions_gui.settings.desc_label"; - public static final String EDIT_BTN = "hyperfactions_gui.settings.edit_btn"; - public static final String RECRUITMENT = "hyperfactions_gui.settings.recruitment"; - public static final String STATUS_LABEL = "hyperfactions_gui.settings.status_label"; - public static final String HOME_LOCATION = "hyperfactions_gui.settings.home_location"; - public static final String LOCATION_LABEL = "hyperfactions_gui.settings.location_label"; - public static final String SET_HOME_BTN = "hyperfactions_gui.settings.set_home_btn"; - public static final String TELEPORT_BTN = "hyperfactions_gui.settings.teleport_btn"; - public static final String DELETE_BTN = "hyperfactions_gui.settings.delete_btn"; - public static final String OPTIONAL_FEATURES = "hyperfactions_gui.settings.optional_features"; - public static final String CONFIGURE_MODULES = "hyperfactions_gui.settings.configure_modules"; - public static final String MODULES_BTN = "hyperfactions_gui.settings.modules_btn"; - public static final String DANGER_ZONE = "hyperfactions_gui.settings.danger_zone"; - public static final String IRREVERSIBLE = "hyperfactions_gui.settings.irreversible"; - public static final String DISBAND_BTN = "hyperfactions_gui.settings.disband_btn"; - public static final String LOCK_HINT = "hyperfactions_gui.settings.lock_hint"; - public static final String TERRITORY_PERMISSIONS = "hyperfactions_gui.settings.territory_permissions"; - public static final String COL_OUT = "hyperfactions_gui.settings.col_out"; - public static final String COL_ALLY = "hyperfactions_gui.settings.col_ally"; - public static final String COL_MEM = "hyperfactions_gui.settings.col_mem"; - public static final String COL_OFF = "hyperfactions_gui.settings.col_off"; - public static final String CAT_BUILDING = "hyperfactions_gui.settings.cat_building"; - public static final String PERM_BREAK = "hyperfactions_gui.settings.perm_break"; - public static final String PERM_PLACE = "hyperfactions_gui.settings.perm_place"; - public static final String CAT_INTERACTION = "hyperfactions_gui.settings.cat_interaction"; - public static final String INTERACTION_HINT = "hyperfactions_gui.settings.interaction_hint"; - public static final String PERM_ALL = "hyperfactions_gui.settings.perm_all"; - public static final String PERM_DOOR = "hyperfactions_gui.settings.perm_door"; - public static final String PERM_CHEST = "hyperfactions_gui.settings.perm_chest"; - public static final String PERM_BENCH = "hyperfactions_gui.settings.perm_bench"; - public static final String PERM_PROCESSING = "hyperfactions_gui.settings.perm_processing"; - public static final String PERM_SEAT = "hyperfactions_gui.settings.perm_seat"; - public static final String PERM_TRANSPORT = "hyperfactions_gui.settings.perm_transport"; - public static final String CAT_OTHER = "hyperfactions_gui.settings.cat_other"; - public static final String PERM_CRATE = "hyperfactions_gui.settings.perm_crate"; - public static final String PERM_NPC_TAME = "hyperfactions_gui.settings.perm_npc_tame"; - public static final String PERM_PVE = "hyperfactions_gui.settings.perm_pve"; - public static final String APPEARANCE = "hyperfactions_gui.settings.appearance"; - public static final String COLOR_LABEL = "hyperfactions_gui.settings.color_label"; - public static final String MOB_SPAWNING = "hyperfactions_gui.settings.mob_spawning"; - public static final String MOB_SPAWNING_HINT = "hyperfactions_gui.settings.mob_spawning_hint"; - public static final String MOB_SPAWNING_LABEL = "hyperfactions_gui.settings.mob_spawning_label"; - public static final String HOSTILE_MOBS = "hyperfactions_gui.settings.hostile_mobs"; - public static final String PASSIVE_MOBS = "hyperfactions_gui.settings.passive_mobs"; - public static final String NEUTRAL_MOBS = "hyperfactions_gui.settings.neutral_mobs"; - public static final String FACTION_SETTINGS = "hyperfactions_gui.settings.faction_settings"; - public static final String PVP_IN_TERRITORY = "hyperfactions_gui.settings.pvp_in_territory"; - public static final String OFFICERS_CAN_EDIT = "hyperfactions_gui.settings.officers_can_edit"; - public static final String LEADER_ONLY = "hyperfactions_gui.settings.leader_only"; - public static final String OFFICERS_ONLY = "hyperfactions_gui.settings.officers_only"; - public static final String DISPLAY_NONE = "hyperfactions_gui.settings.display_none"; - public static final String HOME_NOT_SET = "hyperfactions_gui.settings.home_not_set"; - public static final String NO_PERMISSION = "hyperfactions_gui.settings.no_permission"; - public static final String ONLY_LEADER_DISBAND = "hyperfactions_gui.settings.only_leader_disband"; - public static final String PERM_LOCKED = "hyperfactions_gui.settings.perm_locked"; - public static final String NO_PERM_EDIT = "hyperfactions_gui.settings.no_perm_edit"; - public static final String ONLY_LEADER_OFFICERS = "hyperfactions_gui.settings.only_leader_officers"; - public static final String PVP_ENABLED = "hyperfactions_gui.settings.pvp_enabled"; - public static final String PVP_DISABLED = "hyperfactions_gui.settings.pvp_disabled"; - public static final String NOT_IN_TERRITORY = "hyperfactions_gui.settings.not_in_territory"; - public static final String HOME_SET = "hyperfactions_gui.settings.home_set"; - public static final String RECRUITMENT_SET = "hyperfactions_gui.settings.recruitment_set"; - public static final String HOME_NO_SET = "hyperfactions_gui.settings.home_no_set"; - public static final String HOME_DELETED = "hyperfactions_gui.settings.home_deleted"; - - private SettingsGui() {} - } - - /** Modules page labels. */ - public static final class ModulesGui { - public static final String TITLE = "hyperfactions_gui.modules.title"; - public static final String DESCRIPTION = "hyperfactions_gui.modules.description"; - public static final String CONFIGURE_BTN = "hyperfactions_gui.modules.configure_btn"; - public static final String BACK_BTN = "hyperfactions_gui.modules.back_btn"; - public static final String TREASURY_NAME = "hyperfactions_gui.modules.treasury_name"; - public static final String TREASURY_DESC = "hyperfactions_gui.modules.treasury_desc"; - public static final String RAIDS_NAME = "hyperfactions_gui.modules.raids_name"; - public static final String RAIDS_DESC = "hyperfactions_gui.modules.raids_desc"; - public static final String LEVELS_NAME = "hyperfactions_gui.modules.levels_name"; - public static final String LEVELS_DESC = "hyperfactions_gui.modules.levels_desc"; - public static final String WAR_NAME = "hyperfactions_gui.modules.war_name"; - public static final String WAR_DESC = "hyperfactions_gui.modules.war_desc"; - public static final String COMING_SOON = "hyperfactions_gui.modules.coming_soon"; - public static final String ACTIVE = "hyperfactions_gui.modules.active"; - public static final String VIEW_TREASURY = "hyperfactions_gui.modules.view_treasury"; - public static final String UNAVAILABLE = "hyperfactions_gui.modules.unavailable"; - public static final String NO_ECONOMY = "hyperfactions_gui.modules.no_economy"; - public static final String DISABLED = "hyperfactions_gui.modules.disabled"; - public static final String ECONOMY_NOT_AVAILABLE = "hyperfactions_gui.modules.economy_not_available"; - - private ModulesGui() {} - } - - /** Treasury page labels and messages. */ - public static final class TreasuryGui { - // Page labels - public static final String TITLE = "hyperfactions_gui.treasury.title"; - public static final String BALANCE_LABEL = "hyperfactions_gui.treasury.balance_label"; - public static final String INCOME_24H = "hyperfactions_gui.treasury.income_24h"; - public static final String DEPOSITS_TRANSFERS_IN = "hyperfactions_gui.treasury.deposits_transfers_in"; - public static final String EXPENSES_24H = "hyperfactions_gui.treasury.expenses_24h"; - public static final String WITHDRAWALS_TRANSFERS_OUT = "hyperfactions_gui.treasury.withdrawals_transfers_out"; - public static final String MAINTENANCE = "hyperfactions_gui.treasury.maintenance"; - public static final String RUNWAY_LABEL = "hyperfactions_gui.treasury.runway_label"; - public static final String ADD_FUNDS = "hyperfactions_gui.treasury.add_funds"; - public static final String DEPOSIT_BTN = "hyperfactions_gui.treasury.deposit_btn"; - public static final String TAKE_FUNDS = "hyperfactions_gui.treasury.take_funds"; - public static final String WITHDRAW_BTN = "hyperfactions_gui.treasury.withdraw_btn"; - public static final String SEND_TO_FACTION = "hyperfactions_gui.treasury.send_to_faction"; - public static final String TRANSFER_BTN = "hyperfactions_gui.treasury.transfer_btn"; - public static final String TREASURY_CONFIG = "hyperfactions_gui.treasury.treasury_config"; - public static final String SETTINGS_BTN = "hyperfactions_gui.treasury.settings_btn"; - public static final String RECENT_TRANSACTIONS = "hyperfactions_gui.treasury.recent_transactions"; - public static final String NO_TRANSACTIONS = "hyperfactions_gui.treasury.no_transactions"; - public static final String COL_DATE = "hyperfactions_gui.treasury.col_date"; - public static final String COL_TYPE = "hyperfactions_gui.treasury.col_type"; - public static final String COL_BY = "hyperfactions_gui.treasury.col_by"; - public static final String COL_AMOUNT = "hyperfactions_gui.treasury.col_amount"; - public static final String COL_DETAILS = "hyperfactions_gui.treasury.col_details"; - public static final String PAY_NOW_BTN = "hyperfactions_gui.treasury.pay_now_btn"; - public static final String COST_7D = "hyperfactions_gui.treasury.cost_7d"; - public static final String COST_14D = "hyperfactions_gui.treasury.cost_14d"; - public static final String COST_30D = "hyperfactions_gui.treasury.cost_30d"; - // Dashboard labels - public static final String WALLET_LABEL = "hyperfactions_gui.treasury.wallet_label"; - public static final String TREASURY_LABEL = "hyperfactions_gui.treasury.treasury_label"; - public static final String CHUNKS_DETAIL = "hyperfactions_gui.treasury.chunks_detail"; - public static final String COST_LABEL = "hyperfactions_gui.treasury.cost_label"; - public static final String PENDING = "hyperfactions_gui.treasury.pending"; - public static final String AUTO_PAY_ON = "hyperfactions_gui.treasury.auto_pay_on"; - public static final String AUTO_PAY_OFF = "hyperfactions_gui.treasury.auto_pay_off"; - public static final String RUNWAY_90_PLUS = "hyperfactions_gui.treasury.runway_90_plus"; - public static final String RUNWAY_DAYS = "hyperfactions_gui.treasury.runway_days"; - public static final String RUNWAY_DAY = "hyperfactions_gui.treasury.runway_day"; - public static final String RUNWAY_LESS_THAN_DAY = "hyperfactions_gui.treasury.runway_less_day"; - public static final String RUNWAY_NO_FUNDS = "hyperfactions_gui.treasury.runway_no_funds"; - public static final String GRACE_EXPIRES = "hyperfactions_gui.treasury.grace_expires"; - public static final String MISSED_PAYMENTS = "hyperfactions_gui.treasury.missed_payments"; - public static final String PAY_TO_CLEAR = "hyperfactions_gui.treasury.pay_to_clear"; - public static final String SYSTEM = "hyperfactions_gui.treasury.system"; - // Transaction types - public static final String TYPE_DEPOSIT = "hyperfactions_gui.treasury.type_deposit"; - public static final String TYPE_WITHDRAWAL = "hyperfactions_gui.treasury.type_withdrawal"; - public static final String TYPE_TRANSFER_IN = "hyperfactions_gui.treasury.type_transfer_in"; - public static final String TYPE_TRANSFER_OUT = "hyperfactions_gui.treasury.type_transfer_out"; - public static final String TYPE_PLAYER_TRANSFER = "hyperfactions_gui.treasury.type_player_transfer"; - public static final String TYPE_UPKEEP = "hyperfactions_gui.treasury.type_upkeep"; - public static final String TYPE_TAX = "hyperfactions_gui.treasury.type_tax"; - public static final String TYPE_WAR_COST = "hyperfactions_gui.treasury.type_war_cost"; - public static final String TYPE_RAID_COST = "hyperfactions_gui.treasury.type_raid_cost"; - public static final String TYPE_SPOILS = "hyperfactions_gui.treasury.type_spoils"; - public static final String TYPE_ADMIN = "hyperfactions_gui.treasury.type_admin"; - // Deposit/Withdraw modal - public static final String DEPOSIT_TITLE = "hyperfactions_gui.treasury.deposit_title"; - public static final String WITHDRAW_TITLE = "hyperfactions_gui.treasury.withdraw_title"; - public static final String FEE_LABEL = "hyperfactions_gui.treasury.fee_label"; - public static final String CONFIRM_DEPOSIT = "hyperfactions_gui.treasury.confirm_deposit"; - public static final String CONFIRM_WITHDRAWAL = "hyperfactions_gui.treasury.confirm_withdrawal"; - public static final String FROM_WALLET = "hyperfactions_gui.treasury.from_wallet"; - public static final String TO_WALLET = "hyperfactions_gui.treasury.to_wallet"; - public static final String ENTER_VALID_AMOUNT = "hyperfactions_gui.treasury.enter_valid_amount"; - public static final String INSUFFICIENT_WALLET = "hyperfactions_gui.treasury.insufficient_wallet"; - public static final String WALLET_WITHDRAW_FAILED = "hyperfactions_gui.treasury.wallet_withdraw_failed"; - public static final String DEPOSIT_FAILED_RETURNED = "hyperfactions_gui.treasury.deposit_failed_returned"; - public static final String DEPOSITED = "hyperfactions_gui.treasury.deposited"; - public static final String DEPOSITED_FEE = "hyperfactions_gui.treasury.deposited_fee"; - public static final String NO_WITHDRAW_PERMISSION = "hyperfactions_gui.treasury.no_withdraw_permission"; - public static final String WITHDRAW_DENIED = "hyperfactions_gui.treasury.withdraw_denied"; - public static final String INSUFFICIENT_TREASURY = "hyperfactions_gui.treasury.insufficient_treasury"; - public static final String WITHDRAW_LIMIT = "hyperfactions_gui.treasury.withdraw_limit"; - public static final String WITHDRAW_FAILED = "hyperfactions_gui.treasury.withdraw_failed"; - public static final String WALLET_DEPOSIT_WARN = "hyperfactions_gui.treasury.wallet_deposit_warn"; - public static final String WITHDREW = "hyperfactions_gui.treasury.withdrew"; - public static final String WITHDREW_FEE = "hyperfactions_gui.treasury.withdrew_fee"; - // Transfer search - public static final String SEARCH_HINT = "hyperfactions_gui.treasury.search_hint"; - public static final String NO_RESULTS = "hyperfactions_gui.treasury.no_results"; - public static final String TAG_PLAYER = "hyperfactions_gui.treasury.tag_player"; - public static final String TAG_FACTION = "hyperfactions_gui.treasury.tag_faction"; - public static final String SOURCE_ONLINE = "hyperfactions_gui.treasury.source_online"; - public static final String SOURCE_OFFLINE = "hyperfactions_gui.treasury.source_offline"; - public static final String SOURCE_PLAYER_DB = "hyperfactions_gui.treasury.source_player_db"; - // Transfer confirm - public static final String NO_TRANSFER_PERMISSION = "hyperfactions_gui.treasury.no_transfer_permission"; - public static final String TRANSFER_DENIED = "hyperfactions_gui.treasury.transfer_denied"; - public static final String INVALID_TARGET_FACTION = "hyperfactions_gui.treasury.invalid_target_faction"; - public static final String TARGET_FACTION_GONE = "hyperfactions_gui.treasury.target_faction_gone"; - public static final String TRANSFER_FAILED = "hyperfactions_gui.treasury.transfer_failed"; - public static final String TRANSFER_FAILED_RETURNED = "hyperfactions_gui.treasury.transfer_failed_returned"; - public static final String TRANSFERRED = "hyperfactions_gui.treasury.transferred"; - public static final String INVALID_TARGET_PLAYER = "hyperfactions_gui.treasury.invalid_target_player"; - public static final String PLAYER_TRANSFER_FAILED = "hyperfactions_gui.treasury.player_transfer_failed"; - // Treasury settings - public static final String LEADER_ONLY_PERMS = "hyperfactions_gui.treasury.leader_only_perms"; - public static final String LEADER_ONLY_UPKEEP = "hyperfactions_gui.treasury.leader_only_upkeep"; - public static final String INVALID_LIMIT = "hyperfactions_gui.treasury.invalid_limit"; - // Treasury settings page - public static final String SETTINGS_TITLE = "hyperfactions_gui.treasury.settings_title"; - public static final String OFFICER_PERMISSIONS = "hyperfactions_gui.treasury.officer_permissions"; - public static final String ALLOW_WITHDRAW = "hyperfactions_gui.treasury.allow_withdraw"; - public static final String ALLOW_TRANSFER = "hyperfactions_gui.treasury.allow_transfer"; - public static final String LIMITS_SECTION = "hyperfactions_gui.treasury.limits_section"; - public static final String MAX_PER_WITHDRAWAL = "hyperfactions_gui.treasury.max_per_withdrawal"; - public static final String MAX_WITHDRAWALS_PER = "hyperfactions_gui.treasury.max_withdrawals_per"; - public static final String MAX_PER_TRANSFER = "hyperfactions_gui.treasury.max_per_transfer"; - public static final String MAX_TRANSFERS_PER = "hyperfactions_gui.treasury.max_transfers_per"; - public static final String LIMIT_PERIOD = "hyperfactions_gui.treasury.limit_period"; - public static final String NO_LIMIT_HINT = "hyperfactions_gui.treasury.no_limit_hint"; - public static final String UPKEEP_SETTINGS = "hyperfactions_gui.treasury.upkeep_settings"; - public static final String AUTO_PAY_UPKEEP = "hyperfactions_gui.treasury.auto_pay_upkeep"; - public static final String BACK_BTN = "hyperfactions_gui.treasury.back_btn"; - // Upkeep format strings - public static final String UPKEEP_COST_FORMAT = "hyperfactions_gui.treasury.upkeep_cost_format"; - public static final String UPKEEP_TIME_LEFT = "hyperfactions_gui.treasury.upkeep_time_left"; - - private TreasuryGui() {} - } - - /** Confirmation page messages (disband, leave, transfer). */ - public static final class ConfirmGui { - // Static UI labels - public static final String DISBAND_TITLE = "hyperfactions_gui.confirm.disband_title"; - public static final String DISBAND_PROMPT = "hyperfactions_gui.confirm.disband_prompt"; - public static final String DISBAND_WARNING = "hyperfactions_gui.confirm.disband_warning"; - public static final String LEAVE_TITLE = "hyperfactions_gui.confirm.leave_title"; - public static final String LEAVE_PROMPT = "hyperfactions_gui.confirm.leave_prompt"; - public static final String LEAVE_WARNING = "hyperfactions_gui.confirm.leave_warning"; - public static final String LEADER_LEAVE_TITLE = "hyperfactions_gui.confirm.leader_leave_title"; - public static final String LEADER_LEAVE_PROMPT = "hyperfactions_gui.confirm.leader_leave_prompt"; - public static final String TRANSFER_TITLE = "hyperfactions_gui.confirm.transfer_title"; - public static final String TRANSFER_PROMPT = "hyperfactions_gui.confirm.transfer_prompt"; - public static final String TRANSFER_WARNING = "hyperfactions_gui.confirm.transfer_warning"; - public static final String ERROR_TITLE = "hyperfactions_gui.confirm.error_title"; - public static final String ERROR_DEFAULT = "hyperfactions_gui.confirm.error_default"; - // DisbandConfirm - public static final String DISBAND_NOT_LEADER = "hyperfactions_gui.confirm.disband_not_leader"; - public static final String DISBANDED = "hyperfactions_gui.confirm.disbanded"; - public static final String DISBAND_FAILED = "hyperfactions_gui.confirm.disband_failed"; - // LeaderLeaveConfirm - public static final String SUCCESSION_TITLE = "hyperfactions_gui.confirm.succession_title"; - public static final String NO_MEMBERS_WARNING = "hyperfactions_gui.confirm.no_members_warning"; - public static final String WILL_DISBAND = "hyperfactions_gui.confirm.will_disband"; - public static final String NOT_IN_FACTION = "hyperfactions_gui.confirm.not_in_faction"; - public static final String NOT_LEADER_ANYMORE = "hyperfactions_gui.confirm.not_leader_anymore"; - public static final String NO_SUCCESSOR = "hyperfactions_gui.confirm.no_successor"; - public static final String TRANSFER_FAILED = "hyperfactions_gui.confirm.transfer_failed"; - public static final String LEADER_LEFT = "hyperfactions_gui.confirm.leader_left"; - public static final String LEAVE_FAILED = "hyperfactions_gui.confirm.leave_failed"; - // LeaveConfirm - public static final String LEADER_CANNOT_LEAVE = "hyperfactions_gui.confirm.leader_cannot_leave"; - public static final String LEFT_FACTION = "hyperfactions_gui.confirm.left_faction"; - // TransferConfirm - public static final String FACTION_GONE = "hyperfactions_gui.confirm.faction_gone"; - public static final String NOT_LEADER_TRANSFER = "hyperfactions_gui.confirm.not_leader_transfer"; - public static final String LEADERSHIP_TRANSFERRED = "hyperfactions_gui.confirm.leadership_transferred"; - - private ConfirmGui() {} - } - - /** Logs viewer page labels and messages. */ - public static final class LogsGui { - public static final String TITLE = "hyperfactions_gui.logs.title"; - public static final String ENTRY_COUNT = "hyperfactions_gui.logs.entry_count"; - public static final String FILTER_LABEL = "hyperfactions_gui.logs.filter_label"; - public static final String COL_TIME = "hyperfactions_gui.logs.col_time"; - public static final String COL_TYPE = "hyperfactions_gui.logs.col_type"; - public static final String COL_MESSAGE = "hyperfactions_gui.logs.col_message"; - public static final String PREV_BTN = "hyperfactions_gui.logs.prev_btn"; - public static final String NEXT_BTN = "hyperfactions_gui.logs.next_btn"; - public static final String ALL_TYPES = "hyperfactions_gui.logs.all_types"; - public static final String NO_LOGS_TYPE = "hyperfactions_gui.logs.no_logs_type"; - public static final String NO_LOGS = "hyperfactions_gui.logs.no_logs"; - public static final String TIME_JUST_NOW = "hyperfactions_gui.logs.time_just_now"; - public static final String TIME_MINUTE = "hyperfactions_gui.logs.time_minute"; - public static final String TIME_MINUTES = "hyperfactions_gui.logs.time_minutes"; - public static final String TIME_HOUR = "hyperfactions_gui.logs.time_hour"; - public static final String TIME_HOURS = "hyperfactions_gui.logs.time_hours"; - public static final String TIME_DAY = "hyperfactions_gui.logs.time_day"; - public static final String TIME_DAYS = "hyperfactions_gui.logs.time_days"; - public static final String TIME_WEEK = "hyperfactions_gui.logs.time_week"; - public static final String TIME_WEEKS = "hyperfactions_gui.logs.time_weeks"; - public static final String TYPE_MEMBER_JOIN = "hyperfactions_gui.logs.type_member_join"; - public static final String TYPE_MEMBER_LEAVE = "hyperfactions_gui.logs.type_member_leave"; - public static final String TYPE_MEMBER_KICK = "hyperfactions_gui.logs.type_member_kick"; - public static final String TYPE_MEMBER_PROMOTE = "hyperfactions_gui.logs.type_member_promote"; - public static final String TYPE_MEMBER_DEMOTE = "hyperfactions_gui.logs.type_member_demote"; - public static final String TYPE_CLAIM = "hyperfactions_gui.logs.type_claim"; - public static final String TYPE_UNCLAIM = "hyperfactions_gui.logs.type_unclaim"; - public static final String TYPE_OVERCLAIM = "hyperfactions_gui.logs.type_overclaim"; - public static final String TYPE_HOME_SET = "hyperfactions_gui.logs.type_home_set"; - public static final String TYPE_RELATION_ALLY = "hyperfactions_gui.logs.type_relation_ally"; - public static final String TYPE_RELATION_ENEMY = "hyperfactions_gui.logs.type_relation_enemy"; - public static final String TYPE_RELATION_NEUTRAL = "hyperfactions_gui.logs.type_relation_neutral"; - public static final String TYPE_LEADER_TRANSFER = "hyperfactions_gui.logs.type_leader_transfer"; - public static final String TYPE_SETTINGS_CHANGE = "hyperfactions_gui.logs.type_settings_change"; - public static final String TYPE_POWER_CHANGE = "hyperfactions_gui.logs.type_power_change"; - public static final String TYPE_ECONOMY = "hyperfactions_gui.logs.type_economy"; - public static final String TYPE_ADMIN_POWER = "hyperfactions_gui.logs.type_admin_power"; - - /** Derives the lang key for a FactionLog.LogType enum by name. */ - public static String typeKey(String logTypeName) { - return "hyperfactions_gui.logs.type_" + logTypeName.toLowerCase(); - } - - // === Log message templates (i18n for FactionLog.message content) === - - // Player actions - public static final String MSG_FACTION_CREATED = "hyperfactions_gui.logs.msg_faction_created"; - public static final String MSG_MEMBER_JOINED = "hyperfactions_gui.logs.msg_member_joined"; - public static final String MSG_MEMBER_LEFT = "hyperfactions_gui.logs.msg_member_left"; - public static final String MSG_MEMBER_KICKED = "hyperfactions_gui.logs.msg_member_kicked"; - public static final String MSG_MEMBER_PROMOTED = "hyperfactions_gui.logs.msg_member_promoted"; - public static final String MSG_MEMBER_DEMOTED = "hyperfactions_gui.logs.msg_member_demoted"; - public static final String MSG_LEADER_TRANSFERRED = "hyperfactions_gui.logs.msg_leader_transferred"; - public static final String MSG_LEADER_LEFT_TRANSFER = "hyperfactions_gui.logs.msg_leader_left_transfer"; - public static final String MSG_RELATION_SET = "hyperfactions_gui.logs.msg_relation_set"; - - // Territory - public static final String MSG_CLAIMED = "hyperfactions_gui.logs.msg_claimed"; - public static final String MSG_UNCLAIMED = "hyperfactions_gui.logs.msg_unclaimed"; - public static final String MSG_OVERCLAIM_LOST = "hyperfactions_gui.logs.msg_overclaim_lost"; - public static final String MSG_OVERCLAIM_TAKEN = "hyperfactions_gui.logs.msg_overclaim_taken"; - public static final String MSG_ALL_UNCLAIMED = "hyperfactions_gui.logs.msg_all_unclaimed"; - public static final String MSG_CLAIM_REMOVED_WORLD = "hyperfactions_gui.logs.msg_claim_removed_world"; - public static final String MSG_CLAIMS_LOST_UPKEEP = "hyperfactions_gui.logs.msg_claims_lost_upkeep"; - public static final String MSG_CLAIMS_REMOVED_INACTIVE = "hyperfactions_gui.logs.msg_claims_removed_inactive"; - - // Home - public static final String MSG_HOME_SET = "hyperfactions_gui.logs.msg_home_set"; - public static final String MSG_HOME_CLEARED = "hyperfactions_gui.logs.msg_home_cleared"; - public static final String MSG_HOME_CLEARED_WORLD = "hyperfactions_gui.logs.msg_home_cleared_world"; - - // Settings - public static final String MSG_RENAMED = "hyperfactions_gui.logs.msg_renamed"; - public static final String MSG_SET_OPEN = "hyperfactions_gui.logs.msg_set_open"; - public static final String MSG_SET_CLOSED = "hyperfactions_gui.logs.msg_set_closed"; - public static final String MSG_DESC_SET = "hyperfactions_gui.logs.msg_desc_set"; - public static final String MSG_DESC_CLEARED = "hyperfactions_gui.logs.msg_desc_cleared"; - public static final String MSG_COLOR_CHANGED = "hyperfactions_gui.logs.msg_color_changed"; - - // Economy - public static final String MSG_DEPOSIT = "hyperfactions_gui.logs.msg_deposit"; - public static final String MSG_WITHDRAWAL = "hyperfactions_gui.logs.msg_withdrawal"; - public static final String MSG_UPKEEP_PAID = "hyperfactions_gui.logs.msg_upkeep_paid"; - public static final String MSG_UPKEEP_GRACE_STARTED = "hyperfactions_gui.logs.msg_upkeep_grace_started"; - public static final String MSG_UPKEEP_MISSED = "hyperfactions_gui.logs.msg_upkeep_missed"; - public static final String MSG_UPKEEP_MANUAL = "hyperfactions_gui.logs.msg_upkeep_manual"; - - // Admin power - public static final String MSG_ADMIN_POWER_SET = "hyperfactions_gui.logs.msg_admin_power_set"; - public static final String MSG_ADMIN_POWER_ADD = "hyperfactions_gui.logs.msg_admin_power_add"; - public static final String MSG_ADMIN_POWER_REMOVE = "hyperfactions_gui.logs.msg_admin_power_remove"; - public static final String MSG_ADMIN_POWER_RESET = "hyperfactions_gui.logs.msg_admin_power_reset"; - public static final String MSG_ADMIN_POWER_ADJUSTED = "hyperfactions_gui.logs.msg_admin_power_adjusted"; - public static final String MSG_ADMIN_MAXPOWER_SET = "hyperfactions_gui.logs.msg_admin_maxpower_set"; - public static final String MSG_ADMIN_MAXPOWER_RESET = "hyperfactions_gui.logs.msg_admin_maxpower_reset"; - public static final String MSG_ADMIN_POWERLOSS_ENABLED = "hyperfactions_gui.logs.msg_admin_powerloss_enabled"; - public static final String MSG_ADMIN_POWERLOSS_DISABLED = "hyperfactions_gui.logs.msg_admin_powerloss_disabled"; - public static final String MSG_ADMIN_DECAY_ENABLED = "hyperfactions_gui.logs.msg_admin_decay_enabled"; - public static final String MSG_ADMIN_DECAY_DISABLED = "hyperfactions_gui.logs.msg_admin_decay_disabled"; - public static final String MSG_ADMIN_KD_RESET = "hyperfactions_gui.logs.msg_admin_kd_reset"; - public static final String MSG_ADMIN_POWER_SET_ALL = "hyperfactions_gui.logs.msg_admin_power_set_all"; - public static final String MSG_ADMIN_POWER_ADD_ALL = "hyperfactions_gui.logs.msg_admin_power_add_all"; - public static final String MSG_ADMIN_POWER_REMOVE_ALL = "hyperfactions_gui.logs.msg_admin_power_remove_all"; - public static final String MSG_ADMIN_POWER_RESET_ALL = "hyperfactions_gui.logs.msg_admin_power_reset_all"; - public static final String MSG_ADMIN_POWER_ADJUSTED_ALL = "hyperfactions_gui.logs.msg_admin_power_adjusted_all"; - - // Admin faction - public static final String MSG_ADMIN_KICKED = "hyperfactions_gui.logs.msg_admin_kicked"; - public static final String MSG_ADMIN_ROLE_SET = "hyperfactions_gui.logs.msg_admin_role_set"; - public static final String MSG_ADMIN_LEADER_KICK = "hyperfactions_gui.logs.msg_admin_leader_kick"; - public static final String MSG_ADMIN_ECON_ADDED = "hyperfactions_gui.logs.msg_admin_econ_added"; - public static final String MSG_ADMIN_ECON_DEDUCTED = "hyperfactions_gui.logs.msg_admin_econ_deducted"; - public static final String MSG_ADMIN_ECON_SET = "hyperfactions_gui.logs.msg_admin_econ_set"; - - // Import - public static final String MSG_LEFT_IMPORT = "hyperfactions_gui.logs.msg_left_import"; - public static final String MSG_LEADER_IMPORT_TRANSFER = "hyperfactions_gui.logs.msg_leader_import_transfer"; - public static final String MSG_IMPORTED_FROM = "hyperfactions_gui.logs.msg_imported_from"; - - private LogsGui() {} - } - - /** Faction chat page labels and messages. */ - public static final class ChatGui { - public static final String TITLE = "hyperfactions_gui.chat.title"; - public static final String TAB_FACTION = "hyperfactions_gui.chat.tab_faction"; - public static final String TAB_ALLY = "hyperfactions_gui.chat.tab_ally"; - public static final String SEND_BTN = "hyperfactions_gui.chat.send_btn"; - public static final String PLACEHOLDER = "hyperfactions_gui.chat.placeholder"; - public static final String NO_MESSAGES = "hyperfactions_gui.chat.no_messages"; - public static final String NO_ALLY_PERMISSION = "hyperfactions_gui.chat.no_ally_permission"; - public static final String NO_PERMISSION = "hyperfactions_gui.chat.no_permission"; - public static final String FACTION_GONE = "hyperfactions_gui.chat.faction_gone"; - public static final String TIME_NOW = "hyperfactions_gui.chat.time_now"; - public static final String TIME_MINUTES = "hyperfactions_gui.chat.time_minutes"; - public static final String TIME_HOURS = "hyperfactions_gui.chat.time_hours"; - - private ChatGui() {} - } - - /** Faction invites page labels and messages. */ - public static final class InvitesGui { - public static final String TITLE = "hyperfactions_gui.invites.title"; - public static final String TAB_OUTGOING = "hyperfactions_gui.invites.tab_outgoing"; - public static final String TAB_REQUESTS = "hyperfactions_gui.invites.tab_requests"; - public static final String PREV_BTN = "hyperfactions_gui.invites.prev_btn"; - public static final String NEXT_BTN = "hyperfactions_gui.invites.next_btn"; - public static final String INVITE_COUNT = "hyperfactions_gui.invites.invite_count"; - public static final String REQUEST_COUNT = "hyperfactions_gui.invites.request_count"; - public static final String INVITED_BY = "hyperfactions_gui.invites.invited_by"; - public static final String NO_MESSAGE = "hyperfactions_gui.invites.no_message"; - public static final String EXPIRES = "hyperfactions_gui.invites.expires"; - public static final String TYPE_OUTGOING = "hyperfactions_gui.invites.type_outgoing"; - public static final String TYPE_REQUEST = "hyperfactions_gui.invites.type_request"; - public static final String INVITED_BY_LABEL = "hyperfactions_gui.invites.invited_by_label"; - public static final String EMPTY_OUTGOING = "hyperfactions_gui.invites.empty_outgoing"; - public static final String EMPTY_REQUESTS = "hyperfactions_gui.invites.empty_requests"; - public static final String INVALID_PLAYER = "hyperfactions_gui.invites.invalid_player"; - public static final String CANCELLED_INVITE = "hyperfactions_gui.invites.cancelled_invite"; - public static final String PLAYER_JOINED = "hyperfactions_gui.invites.player_joined"; - public static final String FACTION_FULL = "hyperfactions_gui.invites.faction_full"; - public static final String ADD_FAILED = "hyperfactions_gui.invites.add_failed"; - public static final String REQUEST_EXPIRED = "hyperfactions_gui.invites.request_expired"; - public static final String REQUEST_DECLINED = "hyperfactions_gui.invites.request_declined"; - public static final String TIME_SECONDS = "hyperfactions_gui.invites.time_seconds"; - public static final String TIME_MINUTES = "hyperfactions_gui.invites.time_minutes"; - public static final String TIME_HOURS = "hyperfactions_gui.invites.time_hours"; - public static final String LABEL_MESSAGE = "hyperfactions_gui.invites.label_message"; - public static final String BTN_CANCEL = "hyperfactions_gui.invites.btn_cancel"; - public static final String BTN_ACCEPT = "hyperfactions_gui.invites.btn_accept"; - public static final String BTN_DECLINE = "hyperfactions_gui.invites.btn_decline"; - - private InvitesGui() {} - } - - /** Chunk map page labels and messages. */ - public static final class MapGui { - public static final String TITLE = "hyperfactions_gui.map.title"; - public static final String ACTION_HINT = "hyperfactions_gui.map.action_hint"; - public static final String LEGEND_YOUR = "hyperfactions_gui.map.legend_your"; - public static final String LEGEND_ALLY = "hyperfactions_gui.map.legend_ally"; - public static final String LEGEND_ENEMY = "hyperfactions_gui.map.legend_enemy"; - public static final String LEGEND_OTHER = "hyperfactions_gui.map.legend_other"; - public static final String LEGEND_WILDERNESS = "hyperfactions_gui.map.legend_wilderness"; - public static final String LEGEND_SAFE = "hyperfactions_gui.map.legend_safe"; - public static final String LEGEND_WAR = "hyperfactions_gui.map.legend_war"; - public static final String LEGEND_YOU = "hyperfactions_gui.map.legend_you"; - public static final String POSITION = "hyperfactions_gui.map.position"; - public static final String LEGEND_PROTECTED = "hyperfactions_gui.map.legend_protected"; - public static final String CLAIM_STATS = "hyperfactions_gui.map.claim_stats"; - public static final String OVERCLAIMED = "hyperfactions_gui.map.overclaimed"; - public static final String POWER_DISPLAY = "hyperfactions_gui.map.power_display"; - public static final String JOIN_TO_CLAIM = "hyperfactions_gui.map.join_to_claim"; - // Claim results - public static final String CLAIM_SUCCESS = "hyperfactions_gui.map.claim_success"; - public static final String CLAIM_NOT_IN_FACTION = "hyperfactions_gui.map.claim_not_in_faction"; - public static final String CLAIM_NOT_OFFICER = "hyperfactions_gui.map.claim_not_officer"; - public static final String CLAIM_ALREADY_YOURS = "hyperfactions_gui.map.claim_already_yours"; - public static final String CLAIM_ALREADY_CLAIMED = "hyperfactions_gui.map.claim_already_claimed"; - public static final String CLAIM_NOT_ADJACENT = "hyperfactions_gui.map.claim_not_adjacent"; - public static final String CLAIM_MAX = "hyperfactions_gui.map.claim_max"; - public static final String CLAIM_WORLD_NOT_ALLOWED = "hyperfactions_gui.map.claim_world_not_allowed"; - public static final String CLAIM_ORBISGUARD = "hyperfactions_gui.map.claim_orbisguard"; - public static final String CLAIM_FAILED = "hyperfactions_gui.map.claim_failed"; - // Unclaim results - public static final String UNCLAIM_SUCCESS = "hyperfactions_gui.map.unclaim_success"; - public static final String UNCLAIM_NOT_IN_FACTION = "hyperfactions_gui.map.unclaim_not_in_faction"; - public static final String UNCLAIM_NOT_OFFICER = "hyperfactions_gui.map.unclaim_not_officer"; - public static final String UNCLAIM_NOT_CLAIMED = "hyperfactions_gui.map.unclaim_not_claimed"; - public static final String UNCLAIM_NOT_YOURS = "hyperfactions_gui.map.unclaim_not_yours"; - public static final String UNCLAIM_HOME = "hyperfactions_gui.map.unclaim_home"; - public static final String UNCLAIM_FAILED = "hyperfactions_gui.map.unclaim_failed"; - // Overclaim results - public static final String OVERCLAIM_SUCCESS = "hyperfactions_gui.map.overclaim_success"; - public static final String OVERCLAIM_NOT_IN_FACTION = "hyperfactions_gui.map.overclaim_not_in_faction"; - public static final String OVERCLAIM_NOT_OFFICER = "hyperfactions_gui.map.overclaim_not_officer"; - public static final String OVERCLAIM_ALREADY_YOURS = "hyperfactions_gui.map.overclaim_already_yours"; - public static final String OVERCLAIM_ALLY = "hyperfactions_gui.map.overclaim_ally"; - public static final String OVERCLAIM_HAS_POWER = "hyperfactions_gui.map.overclaim_has_power"; - public static final String OVERCLAIM_MAX = "hyperfactions_gui.map.overclaim_max"; - public static final String OVERCLAIM_FAILED = "hyperfactions_gui.map.overclaim_failed"; - - private MapGui() {} - } - - - /** Create faction page labels and messages. */ - public static final class CreateGui { - public static final String PREVIEW_NAME = "hyperfactions_gui.create.preview_name"; - public static final String LEADER_PREFIX = "hyperfactions_gui.create.leader_prefix"; - public static final String ENTER_NAME = "hyperfactions_gui.create.enter_name"; - public static final String NAME_TOO_SHORT = "hyperfactions_gui.create.name_too_short"; - public static final String NAME_TOO_LONG = "hyperfactions_gui.create.name_too_long"; - public static final String NAME_TAKEN = "hyperfactions_gui.create.name_taken"; - public static final String TAG_LENGTH = "hyperfactions_gui.create.tag_length"; - public static final String TAG_FORMAT = "hyperfactions_gui.create.tag_format"; - public static final String DESC_TOO_LONG = "hyperfactions_gui.create.desc_too_long"; - public static final String CREATED = "hyperfactions_gui.create.created"; - public static final String CREATED_NO_DASHBOARD = "hyperfactions_gui.create.created_no_dashboard"; - public static final String INVALID_NAME = "hyperfactions_gui.create.invalid_name"; - public static final String CREATE_FAILED = "hyperfactions_gui.create.create_failed"; - // Static UI labels - public static final String TITLE = "hyperfactions_gui.create.title"; - public static final String SECTION_PREVIEW = "hyperfactions_gui.create.section_preview"; - public static final String SECTION_BASIC_INFO = "hyperfactions_gui.create.section_basic_info"; - public static final String SECTION_DETAILS = "hyperfactions_gui.create.section_details"; - public static final String NAME_PREFIX = "hyperfactions_gui.create.name_prefix"; - public static final String FACTION_NAME_LABEL = "hyperfactions_gui.create.faction_name_label"; - public static final String TAG_LABEL = "hyperfactions_gui.create.tag_label"; - public static final String DESC_LABEL = "hyperfactions_gui.create.desc_label"; - public static final String RECRUITMENT_LABEL = "hyperfactions_gui.create.recruitment_label"; - public static final String SECTION_FACTION_COLOR = "hyperfactions_gui.create.section_faction_color"; - public static final String SECTION_COMBAT = "hyperfactions_gui.create.section_combat"; - public static final String CREATE_BTN = "hyperfactions_gui.create.create_btn"; - - private CreateGui() {} - } - - /** New player page labels and messages (invites, browse, map). */ - public static final class NewPlayerGui { - // Page titles and static labels - public static final String BROWSE_TITLE = "hyperfactions_gui.newplayer.browse_title"; - public static final String INVITES_TITLE = "hyperfactions_gui.newplayer.invites_title"; - public static final String MAP_TITLE = "hyperfactions_gui.newplayer.map_title"; - public static final String VIEW_ONLY_BADGE = "hyperfactions_gui.newplayer.view_only_badge"; - public static final String LEGEND_LABEL = "hyperfactions_gui.newplayer.legend_label"; - public static final String LEGEND_SAFEZONE = "hyperfactions_gui.newplayer.legend_safezone"; - public static final String LEGEND_WARZONE = "hyperfactions_gui.newplayer.legend_warzone"; - public static final String LEGEND_FACTION = "hyperfactions_gui.newplayer.legend_faction"; - public static final String LEGEND_WILDERNESS = "hyperfactions_gui.newplayer.legend_wilderness"; - public static final String SEARCH_LABEL = "hyperfactions_gui.newplayer.search_label"; - public static final String SORT_LABEL = "hyperfactions_gui.newplayer.sort_label"; - public static final String PREV_BTN = "hyperfactions_gui.newplayer.prev_btn"; - public static final String NEXT_BTN = "hyperfactions_gui.newplayer.next_btn"; - // Invites page - public static final String PENDING_COUNT = "hyperfactions_gui.newplayer.pending_count"; - public static final String RECEIVED_HEADER = "hyperfactions_gui.newplayer.received_header"; - public static final String REQUESTS_HEADER = "hyperfactions_gui.newplayer.requests_header"; - public static final String NO_INVITES = "hyperfactions_gui.newplayer.no_invites"; - public static final String NO_REQUESTS = "hyperfactions_gui.newplayer.no_requests"; - public static final String INVITED_BY = "hyperfactions_gui.newplayer.invited_by"; - public static final String MEMBER_COUNT = "hyperfactions_gui.newplayer.member_count"; - public static final String POWER_COUNT = "hyperfactions_gui.newplayer.power_count"; - public static final String CLAIM_COUNT = "hyperfactions_gui.newplayer.claim_count"; - public static final String AWAITING_REVIEW = "hyperfactions_gui.newplayer.awaiting_review"; - public static final String EXPIRES_IN = "hyperfactions_gui.newplayer.expires_in"; - public static final String TIME_JUST_NOW = "hyperfactions_gui.newplayer.time_just_now"; - public static final String TIME_MINUTES = "hyperfactions_gui.newplayer.time_minutes"; - public static final String TIME_HOURS = "hyperfactions_gui.newplayer.time_hours"; - public static final String TIME_DAYS = "hyperfactions_gui.newplayer.time_days"; - // Shared join result messages - public static final String INVALID_FACTION = "hyperfactions_gui.newplayer.invalid_faction"; - public static final String INVITE_EXPIRED = "hyperfactions_gui.newplayer.invite_expired"; - public static final String FACTION_GONE = "hyperfactions_gui.newplayer.faction_gone"; - public static final String JOINED = "hyperfactions_gui.newplayer.joined"; - public static final String FACTION_FULL = "hyperfactions_gui.newplayer.faction_full"; - public static final String JOIN_FAILED = "hyperfactions_gui.newplayer.join_failed"; - public static final String INVITE_DECLINED = "hyperfactions_gui.newplayer.invite_declined"; - public static final String REQUEST_CANCELLED = "hyperfactions_gui.newplayer.request_cancelled"; - // Browse page - public static final String FACTION_COUNT = "hyperfactions_gui.newplayer.faction_count"; - public static final String BROWSE_SUBTITLE = "hyperfactions_gui.newplayer.browse_subtitle"; - public static final String SORT_POWER = "hyperfactions_gui.newplayer.sort_power"; - public static final String SORT_NAME = "hyperfactions_gui.newplayer.sort_name"; - public static final String SORT_MEMBERS = "hyperfactions_gui.newplayer.sort_members"; - public static final String BTN_ACCEPT = "hyperfactions_gui.newplayer.btn_accept"; - public static final String BTN_PENDING = "hyperfactions_gui.newplayer.btn_pending"; - public static final String BTN_JOIN = "hyperfactions_gui.newplayer.btn_join"; - public static final String BTN_REQUEST = "hyperfactions_gui.newplayer.btn_request"; - public static final String INVITE_ONLY_MSG = "hyperfactions_gui.newplayer.invite_only_msg"; - public static final String WELCOME_HINT = "hyperfactions_gui.newplayer.welcome_hint"; - public static final String FACTION_OPEN_HINT = "hyperfactions_gui.newplayer.faction_open_hint"; - public static final String ALREADY_REQUESTED = "hyperfactions_gui.newplayer.already_requested"; - public static final String HAS_INVITE_HINT = "hyperfactions_gui.newplayer.has_invite_hint"; - public static final String REQUEST_SENT = "hyperfactions_gui.newplayer.request_sent"; - public static final String OFFICER_REVIEW = "hyperfactions_gui.newplayer.officer_review"; - // Map page - public static final String MAP_HINT = "hyperfactions_gui.newplayer.map_hint"; - - private NewPlayerGui() {} - } - /** Admin GUI page labels and messages. */ - public static final class AdminGui { - // Common admin labels - public static final String FACTION_NOT_FOUND_LABEL = "hyperfactions_admin.common.faction_not_found"; - public static final String NO_FACTION = "hyperfactions_admin.common.no_faction"; - public static final String NOT_SET = "hyperfactions_admin.common.not_set"; - public static final String ON = "hyperfactions_admin.common.on"; - public static final String OFF = "hyperfactions_admin.common.off"; - public static final String ENABLE_BTN = "hyperfactions_admin.common.enable"; - public static final String DISABLE_BTN = "hyperfactions_admin.common.disable"; - public static final String NONE_PAREN = "hyperfactions_admin.common.none_paren"; - public static final String INVALID_FACTION = "hyperfactions_admin.common.invalid_faction"; - public static final String LEADER_PREFIX = "hyperfactions_admin.common.leader_prefix"; - public static final String MEMBERS_SUFFIX = "hyperfactions_admin.common.members_suffix"; - public static final String CLAIMS_SUFFIX = "hyperfactions_admin.common.claims_suffix"; - public static final String FACTIONS_SUFFIX = "hyperfactions_admin.common.factions_suffix"; - public static final String NAV_TITLE = "hyperfactions_admin.gui.nav_title"; - public static final String GUI_ECON_BTN_ADJUST = "hyperfactions_admin.gui.econ_btn_adjust"; - public static final String GUI_ECON_BTN_INFO = "hyperfactions_admin.gui.econ_btn_info"; - public static final String PLAYERS_SUFFIX = "hyperfactions_admin.common.players_suffix"; - public static final String CHUNKS_SUFFIX = "hyperfactions_admin.common.chunks_suffix"; - public static final String ENTRIES_SUFFIX = "hyperfactions_admin.common.entries_suffix"; - public static final String FOUND_SUFFIX = "hyperfactions_admin.common.found_suffix"; - public static final String POWER_FORMAT = "hyperfactions_admin.common.power_format"; - public static final String RAIDABLE = "hyperfactions_admin.common.raidable"; - public static final String PROTECTED = "hyperfactions_admin.common.protected"; - public static final String NO_DESCRIPTION = "hyperfactions_admin.common.no_description"; - public static final String OFFICERS_MORE = "hyperfactions_admin.common.officers_more"; - public static final String CUSTOM_MAX = "hyperfactions_admin.common.custom_max"; - public static final String DEFAULT_MAX = "hyperfactions_admin.common.default_max"; - public static final String NOW = "hyperfactions_admin.common.now"; - public static final String AGO_SUFFIX = "hyperfactions_admin.common.ago_suffix"; - public static final String JUST_NOW = "hyperfactions_admin.common.just_now"; - public static final String NO_MEMBERSHIP_HISTORY = "hyperfactions_admin.common.no_membership_history"; - // Dashboard - public static final String DASH_FACTIONS_PREFIX = "hyperfactions_admin.dashboard.factions_prefix"; - public static final String DASH_MEMBERS_PREFIX = "hyperfactions_admin.dashboard.members_prefix"; - public static final String DASH_CLAIMS_PREFIX = "hyperfactions_admin.dashboard.claims_prefix"; - // Actions - public static final String ACT_CONFIRM_RESET = "hyperfactions_admin.actions.confirm_reset"; - public static final String ACT_CONFIRM_TRIGGER = "hyperfactions_admin.actions.confirm_trigger"; - public static final String ACT_KD_RESET = "hyperfactions_admin.actions.kd_reset"; - public static final String ACT_KD_RESET_FAILED = "hyperfactions_admin.actions.kd_reset_failed"; - public static final String ACT_UPKEEP_UNAVAILABLE = "hyperfactions_admin.actions.upkeep_unavailable"; - public static final String ACT_UPKEEP_TRIGGERED = "hyperfactions_admin.actions.upkeep_triggered"; - public static final String ACT_UPKEEP_FAILED = "hyperfactions_admin.actions.upkeep_failed"; - // Disband confirm - public static final String DISBAND_FACTION_GONE = "hyperfactions_admin.disband.faction_gone"; - public static final String DISBAND_SUCCESS = "hyperfactions_admin.disband.success"; - public static final String DISBAND_FAILED = "hyperfactions_admin.disband.failed"; - public static final String DISBAND_NO_LEADER = "hyperfactions_admin.disband.no_leader"; - // Unclaim all confirm - public static final String UNCLAIM_REMOVED = "hyperfactions_admin.unclaim.removed"; - public static final String UNCLAIM_NO_CLAIMS = "hyperfactions_admin.unclaim.no_claims"; - // Factions list - public static final String FAC_HOME_NOT_SET = "hyperfactions_admin.factions.home_not_set"; - public static final String FAC_TELEPORTED = "hyperfactions_admin.factions.teleported"; - public static final String FAC_NO_HOME = "hyperfactions_admin.factions.no_home"; - public static final String FAC_WORLD_NOT_FOUND = "hyperfactions_admin.factions.world_not_found"; - // Faction info - public static final String INFO_FACTION_GONE = "hyperfactions_admin.info.faction_gone"; - // Faction members - public static final String MEM_SORT_ROLE = "hyperfactions_admin.members.sort_role"; - public static final String MEM_SORT_ONLINE = "hyperfactions_admin.members.sort_online"; - public static final String MEM_SORT_NAME = "hyperfactions_admin.members.sort_name"; - public static final String MEM_SORT_POWER = "hyperfactions_admin.members.sort_power"; - public static final String MEM_PROMOTED = "hyperfactions_admin.members.promoted"; - public static final String MEM_DEMOTED = "hyperfactions_admin.members.demoted"; - public static final String MEM_KICKED = "hyperfactions_admin.members.kicked"; - // Faction relations - public static final String REL_ALLIES_HEADER = "hyperfactions_admin.relations.allies_header"; - public static final String REL_ENEMIES_HEADER = "hyperfactions_admin.relations.enemies_header"; - public static final String REL_NO_ALLIES = "hyperfactions_admin.relations.no_allies"; - public static final String REL_NO_ENEMIES = "hyperfactions_admin.relations.no_enemies"; - public static final String REL_NEUTRAL_COUNT = "hyperfactions_admin.relations.neutral_count"; - public static final String REL_SINCE_TODAY = "hyperfactions_admin.relations.since_today"; - public static final String REL_SINCE_ONE_DAY = "hyperfactions_admin.relations.since_one_day"; - public static final String REL_SINCE_DAYS = "hyperfactions_admin.relations.since_days"; - public static final String REL_SET_ALLY = "hyperfactions_admin.relations.set_ally"; - public static final String REL_SET_ENEMY = "hyperfactions_admin.relations.set_enemy"; - public static final String REL_SET_NEUTRAL = "hyperfactions_admin.relations.set_neutral"; - // Faction settings - public static final String SET_LOCKED = "hyperfactions_admin.settings.locked"; - public static final String SET_PERM_TOGGLED = "hyperfactions_admin.settings.perm_toggled"; - public static final String SET_COLOR_CHANGED = "hyperfactions_admin.settings.color_changed"; - public static final String SET_RECRUITMENT_SET = "hyperfactions_admin.settings.recruitment_set"; - public static final String SET_NO_HOME = "hyperfactions_admin.settings.no_home"; - public static final String SET_HOME_CLEARED = "hyperfactions_admin.settings.home_cleared"; - // Sort dropdown labels (shared) - public static final String SORT_POWER = "hyperfactions_admin.sort.power"; - public static final String SORT_NAME = "hyperfactions_admin.sort.name"; - public static final String SORT_MEMBERS = "hyperfactions_admin.sort.members"; - public static final String SORT_BALANCE = "hyperfactions_admin.sort.balance"; - // Players - public static final String PLR_SORT_LAST_ONLINE = "hyperfactions_admin.players.sort_last_online"; - public static final String PLR_SORT_FACTION = "hyperfactions_admin.players.sort_faction"; - public static final String PLR_SORT_ONLINE = "hyperfactions_admin.players.sort_online"; - public static final String PLR_NOT_ONLINE = "hyperfactions_admin.players.not_online"; - public static final String PLR_WORLD_NOT_FOUND = "hyperfactions_admin.players.world_not_found"; - public static final String PLR_TELEPORTED = "hyperfactions_admin.players.teleported"; - // Player info - public static final String PLR_DISBAND_FACTION = "hyperfactions_admin.playerinfo.disband_faction"; - public static final String PLR_KICK_LEADER = "hyperfactions_admin.playerinfo.kick_leader"; - public static final String PLR_ENTER_VALID_NUMBER = "hyperfactions_admin.playerinfo.enter_valid_number"; - public static final String PLR_ENTER_VALID_POSITIVE = "hyperfactions_admin.playerinfo.enter_valid_positive"; - public static final String PLR_FACTION_GONE = "hyperfactions_admin.playerinfo.faction_gone"; - public static final String PLR_KD_RESET = "hyperfactions_admin.playerinfo.kd_reset"; - public static final String PLR_KICKED_SUCCESS = "hyperfactions_admin.playerinfo.kicked_success"; - public static final String PLR_KICKED_LEADER = "hyperfactions_admin.playerinfo.kicked_leader"; - public static final String PLR_DISBANDED_KICK = "hyperfactions_admin.playerinfo.disbanded_kick"; - public static final String ECON_NOT_ENABLED = "hyperfactions_admin.gui.econ_not_enabled"; - public static final String GUI_INFO_MORE = "hyperfactions_admin.gui.info_more"; - public static final String LOG_TIME_1H = "hyperfactions_admin.gui.log_time_1h"; - public static final String LOG_TIME_24H = "hyperfactions_admin.gui.log_time_24h"; - public static final String LOG_TIME_7D = "hyperfactions_admin.gui.log_time_7d"; - public static final String LOG_TIME_ALL = "hyperfactions_admin.gui.log_time_all"; - public static final String SHAPE_CIRCULAR = "hyperfactions_admin.gui.shape_circular"; - public static final String SHAPE_SQUARE = "hyperfactions_admin.gui.shape_square"; - // Economy - public static final String ECON_NO_DATA = "hyperfactions_admin.economy.no_data"; - public static final String ECON_AMOUNT_ZERO = "hyperfactions_admin.economy.amount_zero"; - public static final String ECON_ENTER_AMOUNT = "hyperfactions_admin.economy.enter_amount"; - public static final String ECON_INVALID_NUMBER = "hyperfactions_admin.economy.invalid_number"; - public static final String ECON_ERROR = "hyperfactions_admin.economy.error"; - public static final String ECON_BALANCE_NEGATIVE = "hyperfactions_admin.economy.balance_negative"; - public static final String ECON_FAILED = "hyperfactions_admin.economy.failed"; - public static final String ECON_BULK_COMPLETE = "hyperfactions_admin.economy.bulk_complete"; - public static final String ECON_BULK_FAILURES = "hyperfactions_admin.economy.bulk_failures"; - // Zones - public static final String ZONE_NOT_FOUND = "hyperfactions_admin.zones.not_found"; - public static final String ZONE_INVALID_ID = "hyperfactions_admin.zones.invalid_id"; - public static final String ZONE_DELETED = "hyperfactions_admin.zones.deleted"; - public static final String ZONE_DELETE_FAILED = "hyperfactions_admin.zones.delete_failed"; - public static final String ZONE_NO_CHUNKS = "hyperfactions_admin.zones.no_chunks"; - public static final String ZONE_CHUNKS_SUFFIX = "hyperfactions_admin.zones.chunks_suffix"; - // Zone create wizard - public static final String WIZ_ENTER_NAME = "hyperfactions_admin.wizard.enter_name"; - public static final String WIZ_NAME_TOO_SHORT = "hyperfactions_admin.wizard.name_too_short"; - public static final String WIZ_NAME_TOO_LONG = "hyperfactions_admin.wizard.name_too_long"; - public static final String WIZ_NAME_TAKEN = "hyperfactions_admin.wizard.name_taken"; - public static final String WIZ_RADIUS_RANGE = "hyperfactions_admin.wizard.radius_range"; - public static final String WIZ_CREATE_FAILED = "hyperfactions_admin.wizard.create_failed"; - public static final String WIZ_CREATED_NOT_FOUND = "hyperfactions_admin.wizard.created_not_found"; - public static final String WIZ_CREATED = "hyperfactions_admin.wizard.created"; - public static final String WIZ_CHUNK_CLAIMED = "hyperfactions_admin.wizard.chunk_claimed"; - public static final String WIZ_CHUNK_FAILED = "hyperfactions_admin.wizard.chunk_failed"; - public static final String WIZ_RADIUS_CLAIMED = "hyperfactions_admin.wizard.radius_claimed"; - public static final String WIZ_RADIUS_NO_CLAIMS = "hyperfactions_admin.wizard.radius_no_claims"; - public static final String WIZ_NO_CLAIMS = "hyperfactions_admin.wizard.no_claims"; - public static final String WIZ_CHUNKS_PREVIEW = "hyperfactions_admin.wizard.chunks_preview"; - // Zone rename - public static final String ZREN_ZONE_GONE = "hyperfactions_admin.zone_rename.zone_gone"; - public static final String ZREN_ENTER_NAME = "hyperfactions_admin.zone_rename.enter_name"; - public static final String ZREN_TOO_SHORT = "hyperfactions_admin.zone_rename.too_short"; - public static final String ZREN_TOO_LONG = "hyperfactions_admin.zone_rename.too_long"; - public static final String ZREN_SAME_NAME = "hyperfactions_admin.zone_rename.same_name"; - public static final String ZREN_RENAMED = "hyperfactions_admin.zone_rename.renamed"; - public static final String ZREN_NAME_TAKEN = "hyperfactions_admin.zone_rename.name_taken"; - public static final String ZREN_INVALID_NAME = "hyperfactions_admin.zone_rename.invalid_name"; - public static final String ZREN_RENAME_FAILED = "hyperfactions_admin.zone_rename.rename_failed"; - // Zone change type - public static final String ZTYPE_ZONE_GONE = "hyperfactions_admin.zone_type.zone_gone"; - public static final String ZTYPE_CHANGED = "hyperfactions_admin.zone_type.changed"; - public static final String ZTYPE_FAILED = "hyperfactions_admin.zone_type.failed"; - public static final String ZTYPE_FLAGS_RESET = "hyperfactions_admin.zone_type.flags_reset"; - public static final String ZTYPE_FLAGS_KEPT = "hyperfactions_admin.zone_type.flags_kept"; - // Zone integration flags - public static final String ZINT_ZONE_NOT_FOUND = "hyperfactions_admin.zone_int.zone_not_found"; - public static final String ZINT_NO_PLUGIN = "hyperfactions_admin.zone_int.no_plugin"; - public static final String ZINT_DEFAULT = "hyperfactions_admin.zone_int.default"; - public static final String ZINT_CUSTOM = "hyperfactions_admin.zone_int.custom"; - - // Integration flags UI labels - public static final String GUI_ZINT_CAT_GRAVESTONES = "hyperfactions_admin.gui.zint_cat_gravestones"; - public static final String GUI_ZINT_GRAVESTONES_DESC = "hyperfactions_admin.gui.zint_gravestones_desc"; - public static final String GUI_ZINT_CAT_WORLD_MAP = "hyperfactions_admin.gui.zint_cat_world_map"; - public static final String GUI_ZINT_WORLD_MAP_DESC = "hyperfactions_admin.gui.zint_world_map_desc"; - public static final String GUI_ZINT_VISIBILITY_LABEL = "hyperfactions_admin.gui.zint_visibility_label"; - public static final String GUI_ZINT_CAT_ESSENTIALS = "hyperfactions_admin.gui.zint_cat_essentials"; - public static final String GUI_ZINT_RESET_DEFAULTS = "hyperfactions_admin.gui.zint_reset_defaults"; - public static final String GUI_ZINT_BACK_TO_FLAGS = "hyperfactions_admin.gui.zint_back_to_flags"; - public static final String GUI_ZINT_MAP_VIS_FACTION = "hyperfactions_admin.gui.zint_map_vis_faction"; - public static final String GUI_ZINT_MAP_VIS_ALLY = "hyperfactions_admin.gui.zint_map_vis_ally"; - public static final String GUI_ZINT_MAP_VIS_ALL = "hyperfactions_admin.gui.zint_map_vis_all"; - - // Activity log - public static final String LOG_ALL_TYPES = "hyperfactions_admin.log.all_types"; - public static final String LOG_NO_LOGS = "hyperfactions_admin.log.no_logs"; - // Version page - public static final String VER_ACTIVE = "hyperfactions_admin.version.active"; - public static final String VER_NOT_FOUND = "hyperfactions_admin.version.not_found"; - public static final String VER_NOT_DETECTED = "hyperfactions_admin.version.not_detected"; - public static final String VER_NOT_INSTALLED = "hyperfactions_admin.version.not_installed"; - public static final String VER_ACTIVE_VERSION = "hyperfactions_admin.version.active_version"; - public static final String VER_ACTIVE_COMPATIBLE = "hyperfactions_admin.version.active_compatible"; - public static final String VER_ACTIVE_CLAIMS_ONLY = "hyperfactions_admin.version.active_claims_only"; - public static final String VER_INSTALLED_NO_PERM = "hyperfactions_admin.version.installed_no_perm"; - public static final String VER_ACTIVE_PROVIDER = "hyperfactions_admin.version.active_provider"; - // Admin main page - public static final String MAIN_RELOAD_HINT = "hyperfactions_admin.main.reload_hint"; - public static final String MAIN_UNCLAIM_HINT = "hyperfactions_admin.main.unclaim_hint"; - - // Zone flags/settings (shared) - public static final String ZFLAGS_INVALID_FLAG = "hyperfactions_admin.zflags.invalid_flag"; - public static final String ZFLAGS_ZONE_NOT_FOUND = "hyperfactions_admin.zflags.zone_not_found"; - public static final String ZFLAGS_CONFLICT = "hyperfactions_admin.zflags.conflict"; - public static final String ZFLAGS_MIXIN = "hyperfactions_admin.zflags.mixin"; - public static final String ZFLAGS_RESET_INT = "hyperfactions_admin.zflags.reset_int"; - public static final String ZFLAGS_RESET_ALL = "hyperfactions_admin.zflags.reset_all"; - public static final String ZFLAGS_RESET_FAILED = "hyperfactions_admin.zflags.reset_failed"; - public static final String ZFLAGS_BACK_TO_SETTINGS = "hyperfactions_admin.zflags.back_to_settings"; - - // Zone settings UI labels - public static final String GUI_ZSET_CAT_COMBAT = "hyperfactions_admin.gui.zset_cat_combat"; - public static final String GUI_ZSET_CAT_DAMAGE = "hyperfactions_admin.gui.zset_cat_damage"; - public static final String GUI_ZSET_CAT_DEATH = "hyperfactions_admin.gui.zset_cat_death"; - public static final String GUI_ZSET_CAT_BUILDING = "hyperfactions_admin.gui.zset_cat_building"; - public static final String GUI_ZSET_CAT_INTERACTION = "hyperfactions_admin.gui.zset_cat_interaction"; - public static final String GUI_ZSET_CAT_TRANSPORT = "hyperfactions_admin.gui.zset_cat_transport"; - public static final String GUI_ZSET_CAT_ITEMS = "hyperfactions_admin.gui.zset_cat_items"; - public static final String GUI_ZSET_CAT_SPAWNING = "hyperfactions_admin.gui.zset_cat_spawning"; - public static final String GUI_ZSET_CAT_MOB_CLEAR = "hyperfactions_admin.gui.zset_cat_mob_clear"; - public static final String GUI_ZSET_CHILDREN_HINT = "hyperfactions_admin.gui.zset_children_hint"; - public static final String GUI_ZSET_RESET_DEFAULTS = "hyperfactions_admin.gui.zset_reset_defaults"; - public static final String GUI_ZSET_INTEGRATION_FLAGS = "hyperfactions_admin.gui.zset_integration_flags"; - public static final String GUI_ZSET_BACK_TO_ZONES = "hyperfactions_admin.gui.zset_back_to_zones"; - public static final String GUI_ZSET_CHUNKS = "hyperfactions_admin.gui.zset_chunks"; - - // Zone properties - public static final String ZPROP_CURRENT_CUSTOM = "hyperfactions_admin.zprop.current_custom"; - public static final String ZPROP_CURRENT_DEFAULT = "hyperfactions_admin.zprop.current_default"; - public static final String ZPROP_PVP_DISABLED = "hyperfactions_admin.zprop.pvp_disabled"; - public static final String ZPROP_PVP_ENABLED = "hyperfactions_admin.zprop.pvp_enabled"; - public static final String ZPROP_NAME_EMPTY = "hyperfactions_admin.zprop.name_empty"; - public static final String ZPROP_RENAMED = "hyperfactions_admin.zprop.renamed"; - public static final String ZPROP_NAME_TAKEN = "hyperfactions_admin.zprop.name_taken"; - public static final String ZPROP_NAME_INVALID = "hyperfactions_admin.zprop.name_invalid"; - public static final String ZPROP_RENAME_FAILED = "hyperfactions_admin.zprop.rename_failed"; - public static final String ZPROP_UPPER_EMPTY = "hyperfactions_admin.zprop.upper_empty"; - public static final String ZPROP_UPPER_SET = "hyperfactions_admin.zprop.upper_set"; - public static final String ZPROP_UPPER_RESET = "hyperfactions_admin.zprop.upper_reset"; - public static final String ZPROP_LOWER_EMPTY = "hyperfactions_admin.zprop.lower_empty"; - public static final String ZPROP_LOWER_SET = "hyperfactions_admin.zprop.lower_set"; - public static final String ZPROP_LOWER_RESET = "hyperfactions_admin.zprop.lower_reset"; - // Relations additional - public static final String REL_FAILED = "hyperfactions_admin.relations.failed"; - // Members additional - public static final String MEM_NEVER = "hyperfactions_admin.members.never"; - public static final String MEM_TELEPORTED = "hyperfactions_admin.members.teleported"; - // Member entry labels - public static final String GUI_MEM_LABEL_POWER = "hyperfactions_admin.gui.mem_label_power"; - public static final String GUI_MEM_LABEL_JOINED = "hyperfactions_admin.gui.mem_label_joined"; - public static final String GUI_MEM_LABEL_LAST_DEATH = "hyperfactions_admin.gui.mem_label_last_death"; - public static final String GUI_MEM_LABEL_UUID = "hyperfactions_admin.gui.mem_label_uuid"; - public static final String GUI_MEM_BTN_INFO = "hyperfactions_admin.gui.mem_btn_info"; - public static final String GUI_MEM_BTN_TELEPORT = "hyperfactions_admin.gui.mem_btn_teleport"; - public static final String GUI_MEM_BTN_PROMOTE = "hyperfactions_admin.gui.mem_btn_promote"; - public static final String GUI_MEM_BTN_DEMOTE = "hyperfactions_admin.gui.mem_btn_demote"; - public static final String GUI_MEM_BTN_KICK = "hyperfactions_admin.gui.mem_btn_kick"; - // Player info additional - public static final String PLR_RECORDS = "hyperfactions_admin.playerinfo.records"; - public static final String PLR_JOINED_DATE = "hyperfactions_admin.playerinfo.joined_date"; - public static final String PLR_CURRENT = "hyperfactions_admin.playerinfo.current"; - public static final String PLR_LEFT_DATE = "hyperfactions_admin.playerinfo.left_date"; - // Zone map - public static final String MAP_WORLD_WARNING = "hyperfactions_admin.map.world_warning"; - public static final String MAP_POSITION = "hyperfactions_admin.map.position"; - public static final String MAP_ZONE_GONE = "hyperfactions_admin.map.zone_gone"; - public static final String MAP_CLAIMED = "hyperfactions_admin.map.claimed"; - public static final String MAP_CLAIM_FAILED = "hyperfactions_admin.map.claim_failed"; - public static final String MAP_UNCLAIMED = "hyperfactions_admin.map.unclaimed"; - public static final String MAP_UNCLAIM_FAILED = "hyperfactions_admin.map.unclaim_failed"; - public static final String MAP_CHUNK_BELONGS = "hyperfactions_admin.map.chunk_belongs"; - public static final String MAP_CHUNK_FACTION = "hyperfactions_admin.map.chunk_faction"; - public static final String MAP_CHUNK_PROTECTED = "hyperfactions_admin.map.chunk_protected"; - public static final String MAP_ANOTHER_ZONE = "hyperfactions_admin.map.another_zone"; - - // ========== GUI Label Keys (for .ui hardcoded text localization) ========== - - // Page Titles - public static final String GUI_TITLE_DASHBOARD = "hyperfactions_admin.gui.title_dashboard"; - public static final String GUI_TITLE_MAIN = "hyperfactions_admin.gui.title_main"; - public static final String GUI_TITLE_ACTIONS = "hyperfactions_admin.gui.title_actions"; - public static final String GUI_TITLE_FACTIONS = "hyperfactions_admin.gui.title_factions"; - public static final String GUI_TITLE_PLAYERS = "hyperfactions_admin.gui.title_players"; - public static final String GUI_TITLE_ECONOMY = "hyperfactions_admin.gui.title_economy"; - public static final String GUI_TITLE_ZONES = "hyperfactions_admin.gui.title_zones"; - public static final String GUI_TITLE_BACKUPS = "hyperfactions_admin.gui.title_backups"; - public static final String GUI_TITLE_CONFIG = "hyperfactions_admin.gui.title_config"; - public static final String GUI_TITLE_HELP = "hyperfactions_admin.gui.title_help"; - public static final String GUI_TITLE_UPDATES = "hyperfactions_admin.gui.title_updates"; - public static final String GUI_TITLE_VERSION = "hyperfactions_admin.gui.title_version"; - public static final String GUI_TITLE_ACTIVITY_LOG = "hyperfactions_admin.gui.title_activity_log"; - public static final String GUI_TITLE_PLAYER_INFO = "hyperfactions_admin.gui.title_player_info"; - public static final String GUI_TITLE_FACTION_INFO = "hyperfactions_admin.gui.title_faction_info"; - public static final String GUI_TITLE_FACTION_SETTINGS = "hyperfactions_admin.gui.title_faction_settings"; - public static final String GUI_TITLE_FACTION_MEMBERS = "hyperfactions_admin.gui.title_faction_members"; - public static final String GUI_TITLE_FACTION_RELATIONS = "hyperfactions_admin.gui.title_faction_relations"; - public static final String GUI_TITLE_ZONE_MAP = "hyperfactions_admin.gui.title_zone_map"; - public static final String GUI_TITLE_ZONE_SETTINGS = "hyperfactions_admin.gui.title_zone_settings"; - public static final String GUI_TITLE_ZONE_PROPERTIES = "hyperfactions_admin.gui.title_zone_properties"; - public static final String GUI_TITLE_BULK_ECONOMY = "hyperfactions_admin.gui.title_bulk_economy"; - public static final String GUI_TITLE_ECONOMY_ADJUST = "hyperfactions_admin.gui.title_economy_adjust"; - - // Dashboard labels - public static final String GUI_DASH_SERVER_STATS = "hyperfactions_admin.gui.dash_server_stats"; - public static final String GUI_DASH_FACTIONS = "hyperfactions_admin.gui.dash_factions"; - public static final String GUI_DASH_TOTAL_MEMBERS = "hyperfactions_admin.gui.dash_total_members"; - public static final String GUI_DASH_TOTAL_CLAIMS = "hyperfactions_admin.gui.dash_total_claims"; - public static final String GUI_DASH_ZONES = "hyperfactions_admin.gui.dash_zones"; - public static final String GUI_DASH_SAFE_WAR = "hyperfactions_admin.gui.dash_safe_war"; - public static final String GUI_DASH_TOTAL_POWER = "hyperfactions_admin.gui.dash_total_power"; - public static final String GUI_DASH_AVG_POWER = "hyperfactions_admin.gui.dash_avg_power"; - public static final String GUI_DASH_TOTAL_ECONOMY = "hyperfactions_admin.gui.dash_total_economy"; - public static final String GUI_DASH_WEALTHIEST = "hyperfactions_admin.gui.dash_wealthiest"; - public static final String GUI_DASH_AVG_BALANCE = "hyperfactions_admin.gui.dash_avg_balance"; - public static final String GUI_DASH_PROTECTION_BYPASS = "hyperfactions_admin.gui.dash_protection_bypass"; - - // Common buttons and labels - public static final String GUI_SEARCH = "hyperfactions_admin.gui.search"; - public static final String GUI_SORT = "hyperfactions_admin.gui.sort"; - public static final String GUI_PREV = "hyperfactions_admin.gui.prev"; - public static final String GUI_NEXT = "hyperfactions_admin.gui.next"; - public static final String GUI_BACK = "hyperfactions_admin.gui.back"; - public static final String GUI_DONE = "hyperfactions_admin.gui.done"; - public static final String GUI_CANCEL = "hyperfactions_admin.gui.cancel"; - public static final String GUI_APPLY = "hyperfactions_admin.gui.apply"; - public static final String GUI_SET = "hyperfactions_admin.gui.set"; - public static final String GUI_RESET = "hyperfactions_admin.gui.reset"; - public static final String GUI_COMING_SOON = "hyperfactions_admin.gui.coming_soon"; - public static final String GUI_ZONES_BTN = "hyperfactions_admin.gui.zones_btn"; - public static final String GUI_RELOAD_BTN = "hyperfactions_admin.gui.reload_btn"; - public static final String GUI_ALL = "hyperfactions_admin.gui.all"; - public static final String GUI_SAFE = "hyperfactions_admin.gui.safe"; - public static final String GUI_WAR = "hyperfactions_admin.gui.war"; - public static final String GUI_CREATE_ZONE = "hyperfactions_admin.gui.create_zone"; - - // Actions page labels - public static final String GUI_ACT_COMBAT_STATS = "hyperfactions_admin.gui.act_combat_stats"; - public static final String GUI_ACT_COMBAT_DESC = "hyperfactions_admin.gui.act_combat_desc"; - public static final String GUI_ACT_RESET_KD = "hyperfactions_admin.gui.act_reset_kd"; - public static final String GUI_ACT_ECONOMY = "hyperfactions_admin.gui.act_economy"; - public static final String GUI_ACT_ECONOMY_DESC = "hyperfactions_admin.gui.act_economy_desc"; - public static final String GUI_ACT_BULK_ADJUST = "hyperfactions_admin.gui.act_bulk_adjust"; - public static final String GUI_ACT_UPKEEP_COLLECTION = "hyperfactions_admin.gui.act_upkeep_collection"; - public static final String GUI_ACT_UPKEEP_DESC = "hyperfactions_admin.gui.act_upkeep_desc"; - public static final String GUI_ACT_TRIGGER_UPKEEP = "hyperfactions_admin.gui.act_trigger_upkeep"; - - // Placeholder page labels - public static final String GUI_BACKUP_HEADING = "hyperfactions_admin.gui.backup_heading"; - public static final String GUI_BACKUP_DESC1 = "hyperfactions_admin.gui.backup_desc1"; - public static final String GUI_BACKUP_DESC2 = "hyperfactions_admin.gui.backup_desc2"; - public static final String GUI_CONFIG_HEADING = "hyperfactions_admin.gui.config_heading"; - public static final String GUI_CONFIG_DESC1 = "hyperfactions_admin.gui.config_desc1"; - public static final String GUI_CONFIG_DESC2 = "hyperfactions_admin.gui.config_desc2"; - public static final String GUI_HELP_HEADING = "hyperfactions_admin.gui.help_heading"; - public static final String GUI_HELP_DESC1 = "hyperfactions_admin.gui.help_desc1"; - public static final String GUI_HELP_DESC2 = "hyperfactions_admin.gui.help_desc2"; - public static final String GUI_UPDATES_HEADING = "hyperfactions_admin.gui.updates_heading"; - public static final String GUI_UPDATES_DESC1 = "hyperfactions_admin.gui.updates_desc1"; - public static final String GUI_UPDATES_DESC2 = "hyperfactions_admin.gui.updates_desc2"; - - // Version page labels - public static final String GUI_VER_HYPERFACTIONS = "hyperfactions_admin.gui.ver_hyperfactions"; - public static final String GUI_VER_HYTALE_SERVER = "hyperfactions_admin.gui.ver_hytale_server"; - public static final String GUI_VER_JAVA = "hyperfactions_admin.gui.ver_java"; - public static final String GUI_VER_PERMISSIONS = "hyperfactions_admin.gui.ver_permissions"; - public static final String GUI_VER_PLACEHOLDERS = "hyperfactions_admin.gui.ver_placeholders"; - public static final String GUI_VER_ECONOMY_SECTION = "hyperfactions_admin.gui.ver_economy_section"; - public static final String GUI_VER_PROTECTION = "hyperfactions_admin.gui.ver_protection"; - public static final String GUI_VER_DISABLED = "hyperfactions_admin.gui.ver_disabled"; - - // Column headers (shared across pages) - public static final String GUI_COL_FACTION = "hyperfactions_admin.gui.col_faction"; - public static final String GUI_COL_BALANCE = "hyperfactions_admin.gui.col_balance"; - public static final String GUI_COL_MEMBERS = "hyperfactions_admin.gui.col_members"; - public static final String GUI_COL_ACTIONS = "hyperfactions_admin.gui.col_actions"; - public static final String GUI_COL_TIME = "hyperfactions_admin.gui.col_time"; - public static final String GUI_COL_TYPE = "hyperfactions_admin.gui.col_type"; - public static final String GUI_COL_MESSAGE = "hyperfactions_admin.gui.col_message"; - - // Economy page labels - public static final String GUI_ECON_TOTAL_BALANCE = "hyperfactions_admin.gui.econ_total_balance"; - public static final String GUI_ECON_FACTIONS = "hyperfactions_admin.gui.econ_factions"; - public static final String GUI_ECON_AVG_BALANCE = "hyperfactions_admin.gui.econ_avg_balance"; - public static final String GUI_ECON_IN_GRACE = "hyperfactions_admin.gui.econ_in_grace"; - public static final String GUI_ECON_COLLECTED = "hyperfactions_admin.gui.econ_collected"; - public static final String GUI_ECON_NEXT_COLLECTION = "hyperfactions_admin.gui.econ_next_collection"; - public static final String GUI_ECON_NO_DATA = "hyperfactions_admin.gui.econ_no_data"; - - // Activity log labels - public static final String GUI_LOG_TYPE = "hyperfactions_admin.gui.log_type"; - public static final String GUI_LOG_TIME = "hyperfactions_admin.gui.log_time"; - public static final String GUI_LOG_PLAYER = "hyperfactions_admin.gui.log_player"; - public static final String GUI_LOG_NO_LOGS = "hyperfactions_admin.gui.log_no_logs"; - - // Player info labels - public static final String GUI_PLR_FIRST_JOINED = "hyperfactions_admin.gui.plr_first_joined"; - public static final String GUI_PLR_LAST_ONLINE = "hyperfactions_admin.gui.plr_last_online"; - public static final String GUI_PLR_UUID = "hyperfactions_admin.gui.plr_uuid"; - public static final String GUI_PLR_FACTION = "hyperfactions_admin.gui.plr_faction"; - public static final String GUI_PLR_ROLE = "hyperfactions_admin.gui.plr_role"; - public static final String GUI_PLR_VIEW_FACTION = "hyperfactions_admin.gui.plr_view_faction"; - public static final String GUI_PLR_POWER = "hyperfactions_admin.gui.plr_power"; - public static final String GUI_PLR_MAX_POWER = "hyperfactions_admin.gui.plr_max_power"; - public static final String GUI_PLR_SET_POWER = "hyperfactions_admin.gui.plr_set_power"; - public static final String GUI_PLR_RESET_POWER = "hyperfactions_admin.gui.plr_reset_power"; - public static final String GUI_PLR_SET_MAX = "hyperfactions_admin.gui.plr_set_max"; - public static final String GUI_PLR_RESET_MAX = "hyperfactions_admin.gui.plr_reset_max"; - public static final String GUI_PLR_NO_POWER_LOSS = "hyperfactions_admin.gui.plr_no_power_loss"; - public static final String GUI_PLR_NO_CLAIM_DECAY = "hyperfactions_admin.gui.plr_no_claim_decay"; - public static final String GUI_PLR_KILLS = "hyperfactions_admin.gui.plr_kills"; - public static final String GUI_PLR_DEATHS = "hyperfactions_admin.gui.plr_deaths"; - public static final String GUI_PLR_KDR = "hyperfactions_admin.gui.plr_kdr"; - public static final String GUI_PLR_RESET_KD = "hyperfactions_admin.gui.plr_reset_kd"; - public static final String GUI_PLR_KICK = "hyperfactions_admin.gui.plr_kick"; - public static final String GUI_PLR_MEMBERSHIP_HISTORY = "hyperfactions_admin.gui.plr_membership_history"; - public static final String GUI_PLR_NO_FACTION = "hyperfactions_admin.gui.plr_no_faction_label"; - public static final String GUI_PLR_POWER_MANAGEMENT = "hyperfactions_admin.gui.plr_power_management"; - public static final String GUI_PLR_COMBAT_STATS = "hyperfactions_admin.gui.plr_combat_stats"; - public static final String GUI_PLR_BYPASS_FLAGS = "hyperfactions_admin.gui.plr_bypass_flags"; - public static final String GUI_PLR_ADMIN_CONTROLS = "hyperfactions_admin.gui.plr_admin_controls"; - public static final String GUI_PLR_KD_SUBTITLE = "hyperfactions_admin.gui.plr_kd_subtitle"; - public static final String GUI_PLR_MAX_PREFIX = "hyperfactions_admin.gui.plr_max_prefix"; - public static final String GUI_PLR_VIEW = "hyperfactions_admin.gui.plr_view"; - public static final String GUI_PLR_KICK_FROM_FACTION = "hyperfactions_admin.gui.plr_kick_from_faction"; - public static final String GUI_PLR_SET_MAX_BTN = "hyperfactions_admin.gui.plr_set_max_btn"; - public static final String GUI_PLR_COMBAT = "hyperfactions_admin.gui.plr_combat"; - // Player info history reason labels - public static final String GUI_PLR_REASON_ACTIVE = "hyperfactions_admin.gui.plr_reason_active"; - public static final String GUI_PLR_REASON_LEFT = "hyperfactions_admin.gui.plr_reason_left"; - public static final String GUI_PLR_REASON_KICKED = "hyperfactions_admin.gui.plr_reason_kicked"; - public static final String GUI_PLR_REASON_DISBANDED = "hyperfactions_admin.gui.plr_reason_disbanded"; - - // Faction info labels - public static final String GUI_FAC_DESCRIPTION = "hyperfactions_admin.gui.fac_description"; - public static final String GUI_FAC_POWER = "hyperfactions_admin.gui.fac_power"; - public static final String GUI_FAC_CLAIMS = "hyperfactions_admin.gui.fac_claims"; - public static final String GUI_FAC_MEMBERS = "hyperfactions_admin.gui.fac_members"; - public static final String GUI_FAC_RECRUITMENT = "hyperfactions_admin.gui.fac_recruitment"; - public static final String GUI_FAC_FOUNDED = "hyperfactions_admin.gui.fac_founded"; - public static final String GUI_FAC_ALLIES = "hyperfactions_admin.gui.fac_allies"; - public static final String GUI_FAC_ENEMIES = "hyperfactions_admin.gui.fac_enemies"; - public static final String GUI_FAC_RAIDABLE = "hyperfactions_admin.gui.fac_raidable"; - public static final String GUI_FAC_TREASURY = "hyperfactions_admin.gui.fac_treasury"; - public static final String GUI_FAC_LEADER = "hyperfactions_admin.gui.fac_leader"; - public static final String GUI_FAC_OFFICERS = "hyperfactions_admin.gui.fac_officers"; - public static final String GUI_FAC_VIEW_MEMBERS = "hyperfactions_admin.gui.fac_view_members"; - public static final String GUI_FAC_VIEW_RELATIONS = "hyperfactions_admin.gui.fac_view_relations"; - public static final String GUI_FAC_VIEW_SETTINGS = "hyperfactions_admin.gui.fac_view_settings"; - public static final String GUI_FAC_DISBAND = "hyperfactions_admin.gui.fac_disband"; - public static final String GUI_FAC_POWER_MANAGEMENT = "hyperfactions_admin.gui.fac_power_management"; - public static final String GUI_FAC_RESET_ALL_POWER = "hyperfactions_admin.gui.fac_reset_all_power"; - public static final String GUI_FAC_ECON_ADJUST = "hyperfactions_admin.gui.fac_econ_adjust"; - public static final String GUI_FAC_ECON_VIEW_LOG = "hyperfactions_admin.gui.fac_econ_view_log"; - public static final String GUI_FAC_CURRENT_MAX = "hyperfactions_admin.gui.fac_current_max"; - public static final String GUI_FAC_CLAIMED_MAX = "hyperfactions_admin.gui.fac_claimed_max"; - public static final String GUI_FAC_RELATIONS = "hyperfactions_admin.gui.fac_relations"; - public static final String GUI_FAC_ALLY_ENEMY = "hyperfactions_admin.gui.fac_ally_enemy"; - public static final String GUI_FAC_STATUS = "hyperfactions_admin.gui.fac_status"; - public static final String GUI_FAC_INFO = "hyperfactions_admin.gui.fac_info"; - public static final String GUI_FAC_TREASURY_BALANCE = "hyperfactions_admin.gui.fac_treasury_balance"; - public static final String GUI_FAC_LEADERSHIP = "hyperfactions_admin.gui.fac_leadership"; - public static final String GUI_FAC_LEADER_LABEL = "hyperfactions_admin.gui.fac_leader_label"; - public static final String GUI_FAC_OFFICERS_LABEL = "hyperfactions_admin.gui.fac_officers_label"; - public static final String GUI_FAC_ECON_MGMT = "hyperfactions_admin.gui.fac_econ_mgmt"; - public static final String GUI_FAC_DANGER_ZONE = "hyperfactions_admin.gui.fac_danger_zone"; - public static final String GUI_FAC_VIEW_TREASURY = "hyperfactions_admin.gui.fac_view_treasury"; - - // Faction settings labels - public static final String GUI_SET_EDITING = "hyperfactions_admin.gui.set_editing"; - public static final String GUI_SET_GENERAL = "hyperfactions_admin.gui.set_general"; - public static final String GUI_SET_NAME = "hyperfactions_admin.gui.set_name"; - public static final String GUI_SET_TAG = "hyperfactions_admin.gui.set_tag"; - public static final String GUI_SET_DESCRIPTION = "hyperfactions_admin.gui.set_description"; - public static final String GUI_SET_RECRUITMENT = "hyperfactions_admin.gui.set_recruitment"; - public static final String GUI_SET_HOME = "hyperfactions_admin.gui.set_home"; - public static final String GUI_SET_CLEAR_HOME = "hyperfactions_admin.gui.set_clear_home"; - public static final String GUI_SET_DISBAND_FACTION = "hyperfactions_admin.gui.set_disband_faction"; - public static final String GUI_SET_FACTION_COLOR = "hyperfactions_admin.gui.set_faction_color"; - public static final String GUI_SET_ADMIN_OVERRIDE = "hyperfactions_admin.gui.set_admin_override"; - public static final String GUI_SET_TERRITORY_PERMS = "hyperfactions_admin.gui.set_territory_perms"; - public static final String GUI_SET_MOB_SPAWNING = "hyperfactions_admin.gui.set_mob_spawning"; - public static final String GUI_SET_FACTION_SETTINGS = "hyperfactions_admin.gui.set_faction_settings"; - public static final String GUI_SET_NAME_LABEL = "hyperfactions_admin.gui.set_name_label"; - public static final String GUI_SET_TAG_LABEL = "hyperfactions_admin.gui.set_tag_label"; - public static final String GUI_SET_DESC_LABEL = "hyperfactions_admin.gui.set_desc_label"; - public static final String GUI_SET_EDIT = "hyperfactions_admin.gui.set_edit"; - public static final String GUI_SET_STATUS_LABEL = "hyperfactions_admin.gui.set_status_label"; - public static final String GUI_SET_LOCATION_LABEL = "hyperfactions_admin.gui.set_location_label"; - public static final String GUI_SET_DANGER_ZONE = "hyperfactions_admin.gui.set_danger_zone"; - public static final String GUI_SET_IRREVERSIBLE = "hyperfactions_admin.gui.set_irreversible"; - public static final String GUI_SET_LOCK_HINT = "hyperfactions_admin.gui.set_lock_hint"; - public static final String GUI_SET_APPEARANCE = "hyperfactions_admin.gui.set_appearance"; - public static final String GUI_SET_COLOR_LABEL = "hyperfactions_admin.gui.set_color_label"; - public static final String GUI_SET_MOB_SUB = "hyperfactions_admin.gui.set_mob_sub"; - public static final String GUI_SET_BACK_TO_INFO = "hyperfactions_admin.gui.set_back_to_info"; - public static final String GUI_SET_COL_OUT = "hyperfactions_admin.gui.set_col_out"; - public static final String GUI_SET_COL_ALLY = "hyperfactions_admin.gui.set_col_ally"; - public static final String GUI_SET_COL_MEM = "hyperfactions_admin.gui.set_col_mem"; - public static final String GUI_SET_COL_OFF = "hyperfactions_admin.gui.set_col_off"; - public static final String GUI_SET_CAT_BUILDING = "hyperfactions_admin.gui.set_cat_building"; - public static final String GUI_SET_CAT_INTERACTION = "hyperfactions_admin.gui.set_cat_interaction"; - public static final String GUI_SET_CAT_INTERACT_SUB = "hyperfactions_admin.gui.set_cat_interact_sub"; - public static final String GUI_SET_CAT_OTHER = "hyperfactions_admin.gui.set_cat_other"; - public static final String GUI_SET_PERM_BREAK = "hyperfactions_admin.gui.set_perm_break"; - public static final String GUI_SET_PERM_PLACE = "hyperfactions_admin.gui.set_perm_place"; - public static final String GUI_SET_PERM_ALL = "hyperfactions_admin.gui.set_perm_all"; - public static final String GUI_SET_PERM_DOOR = "hyperfactions_admin.gui.set_perm_door"; - public static final String GUI_SET_PERM_CHEST = "hyperfactions_admin.gui.set_perm_chest"; - public static final String GUI_SET_PERM_BENCH = "hyperfactions_admin.gui.set_perm_bench"; - public static final String GUI_SET_PERM_PROCESSING = "hyperfactions_admin.gui.set_perm_processing"; - public static final String GUI_SET_PERM_SEAT = "hyperfactions_admin.gui.set_perm_seat"; - public static final String GUI_SET_PERM_TRANSPORT = "hyperfactions_admin.gui.set_perm_transport"; - public static final String GUI_SET_PERM_CRATE_USE = "hyperfactions_admin.gui.set_perm_crate_use"; - public static final String GUI_SET_PERM_NPC_TAME = "hyperfactions_admin.gui.set_perm_npc_tame"; - public static final String GUI_SET_PERM_PVE_DAMAGE = "hyperfactions_admin.gui.set_perm_pve_damage"; - public static final String GUI_SET_PERM_MOB_SPAWNING = "hyperfactions_admin.gui.set_perm_mob_spawning"; - public static final String GUI_SET_PERM_HOSTILE = "hyperfactions_admin.gui.set_perm_hostile"; - public static final String GUI_SET_PERM_PASSIVE = "hyperfactions_admin.gui.set_perm_passive"; - public static final String GUI_SET_PERM_NEUTRAL = "hyperfactions_admin.gui.set_perm_neutral"; - public static final String GUI_SET_PERM_PVP = "hyperfactions_admin.gui.set_perm_pvp"; - public static final String GUI_SET_PERM_OFFICERS_EDIT = "hyperfactions_admin.gui.set_perm_officers_edit"; - - // Faction relations labels - public static final String GUI_REL_SUBTITLE = "hyperfactions_admin.gui.rel_subtitle"; - public static final String GUI_REL_SET_NEW = "hyperfactions_admin.gui.rel_set_new"; - public static final String GUI_REL_BTN_ALLY = "hyperfactions_admin.gui.rel_btn_ally"; - public static final String GUI_REL_BTN_NEUTRAL = "hyperfactions_admin.gui.rel_btn_neutral"; - public static final String GUI_REL_BTN_ENEMY = "hyperfactions_admin.gui.rel_btn_enemy"; - - // Zone page labels - public static final String GUI_ZONE_SORT_NAME = "hyperfactions_admin.gui.zone_sort_name"; - public static final String GUI_ZONE_SORT_TYPE = "hyperfactions_admin.gui.zone_sort_type"; - public static final String GUI_ZONE_SORT_CHUNKS = "hyperfactions_admin.gui.zone_sort_chunks"; - public static final String GUI_ZONE_SORT_WORLD = "hyperfactions_admin.gui.zone_sort_world"; - public static final String GUI_ZONE_COUNT_FORMAT = "hyperfactions_admin.gui.zone_count_format"; - - // Zone map labels - public static final String GUI_MAP_ZONE_CHUNK = "hyperfactions_admin.gui.map_zone_chunk"; - public static final String GUI_MAP_EMPTY = "hyperfactions_admin.gui.map_empty"; - public static final String GUI_MAP_OTHER_ZONE = "hyperfactions_admin.gui.map_other_zone"; - public static final String GUI_MAP_FACTION_CLAIM = "hyperfactions_admin.gui.map_faction_claim"; - public static final String GUI_MAP_PROTECTED = "hyperfactions_admin.gui.map_protected"; - public static final String GUI_MAP_YOUR_POS = "hyperfactions_admin.gui.map_your_pos"; - public static final String GUI_MAP_CLICK_HINT = "hyperfactions_admin.gui.map_click_hint"; - public static final String GUI_MAP_LEGEND_ZONE_SAFE = "hyperfactions_admin.gui.map_legend_zone_safe"; - public static final String GUI_MAP_LEGEND_ZONE_WAR = "hyperfactions_admin.gui.map_legend_zone_war"; - public static final String GUI_MAP_LEGEND_OTHER_SAFE = "hyperfactions_admin.gui.map_legend_other_safe"; - public static final String GUI_MAP_LEGEND_OTHER_WAR = "hyperfactions_admin.gui.map_legend_other_war"; - public static final String GUI_MAP_LEGEND_FACTION = "hyperfactions_admin.gui.map_legend_faction"; - public static final String GUI_MAP_LEGEND_UNCLAIMED = "hyperfactions_admin.gui.map_legend_unclaimed"; - public static final String GUI_MAP_LEGEND_YOU_HERE = "hyperfactions_admin.gui.map_legend_you_here"; - public static final String GUI_MAP_ACTION_HINT = "hyperfactions_admin.gui.map_action_hint"; - public static final String GUI_MAP_DONE = "hyperfactions_admin.gui.map_done"; - - // Zone properties labels - public static final String GUI_ZPROP_GENERAL = "hyperfactions_admin.gui.zprop_general"; - public static final String GUI_ZPROP_ZONE_NAME = "hyperfactions_admin.gui.zprop_zone_name"; - public static final String GUI_ZPROP_ZONE_TYPE = "hyperfactions_admin.gui.zprop_zone_type"; - public static final String GUI_ZPROP_CHANGE_TYPE = "hyperfactions_admin.gui.zprop_change_type"; - public static final String GUI_ZPROP_NOTIFICATIONS = "hyperfactions_admin.gui.zprop_notifications"; - public static final String GUI_ZPROP_SHOW_ENTRY = "hyperfactions_admin.gui.zprop_show_entry"; - public static final String GUI_ZPROP_UPPER_TITLE = "hyperfactions_admin.gui.zprop_upper_title"; - public static final String GUI_ZPROP_UPPER_DESC = "hyperfactions_admin.gui.zprop_upper_desc"; - public static final String GUI_ZPROP_LOWER_TITLE = "hyperfactions_admin.gui.zprop_lower_title"; - public static final String GUI_ZPROP_LOWER_DESC = "hyperfactions_admin.gui.zprop_lower_desc"; - public static final String GUI_ZPROP_EDIT_FLAGS = "hyperfactions_admin.gui.zprop_edit_flags"; - public static final String GUI_ZPROP_BACK_TO_ZONES = "hyperfactions_admin.gui.zprop_back_to_zones"; - public static final String GUI_SAVE = "hyperfactions_admin.gui.save"; - public static final String GUI_CLEAR = "hyperfactions_admin.gui.clear"; - - // Bulk economy labels - public static final String GUI_BULK_HEADER = "hyperfactions_admin.gui.bulk_header"; - public static final String GUI_BULK_FACTIONS_LABEL = "hyperfactions_admin.gui.bulk_factions_label"; - public static final String GUI_BULK_TOTAL_LABEL = "hyperfactions_admin.gui.bulk_total_label"; - public static final String GUI_BULK_AMOUNT_HINT = "hyperfactions_admin.gui.bulk_amount_hint"; - public static final String GUI_BULK_HINT = "hyperfactions_admin.gui.bulk_hint"; - public static final String GUI_BULK_WARNING_MSG = "hyperfactions_admin.gui.bulk_warning_msg"; - public static final String GUI_BULK_APPLY_ALL = "hyperfactions_admin.gui.bulk_apply_all"; - public static final String GUI_BULK_OPERATION = "hyperfactions_admin.gui.bulk_operation"; - public static final String GUI_BULK_ADD = "hyperfactions_admin.gui.bulk_add"; - public static final String GUI_BULK_REMOVE = "hyperfactions_admin.gui.bulk_remove"; - public static final String GUI_BULK_AMOUNT = "hyperfactions_admin.gui.bulk_amount"; - public static final String GUI_BULK_WARNING = "hyperfactions_admin.gui.bulk_warning"; - public static final String GUI_BULK_PREVIEW = "hyperfactions_admin.gui.bulk_preview"; - - // Economy adjust labels - public static final String GUI_ECADJ_HEADER = "hyperfactions_admin.gui.ecadj_header"; - public static final String GUI_ECADJ_FACTION_LABEL = "hyperfactions_admin.gui.ecadj_faction_label"; - public static final String GUI_ECADJ_CURRENT_BALANCE = "hyperfactions_admin.gui.ecadj_current_balance"; - public static final String GUI_ECADJ_AMOUNT_HINT = "hyperfactions_admin.gui.ecadj_amount_hint"; - public static final String GUI_ECADJ_PREVIEW_HINT = "hyperfactions_admin.gui.ecadj_preview_hint"; - public static final String GUI_ECADJ_ADJUSTMENT = "hyperfactions_admin.gui.ecadj_adjustment"; - public static final String GUI_ECADJ_SET_BALANCE = "hyperfactions_admin.gui.ecadj_set_balance"; - public static final String GUI_ECADJ_CONFIRM = "hyperfactions_admin.gui.ecadj_confirm"; - public static final String GUI_ECADJ_OPERATION = "hyperfactions_admin.gui.ecadj_operation"; - public static final String GUI_ECADJ_ADD = "hyperfactions_admin.gui.ecadj_add"; - public static final String GUI_ECADJ_REMOVE = "hyperfactions_admin.gui.ecadj_remove"; - public static final String GUI_ECADJ_SET_TO = "hyperfactions_admin.gui.ecadj_set_to"; - public static final String GUI_ECADJ_AMOUNT = "hyperfactions_admin.gui.ecadj_amount"; - public static final String GUI_ECADJ_NEW_BALANCE = "hyperfactions_admin.gui.ecadj_new_balance"; - - // Version page integration labels - public static final String GUI_VER_HYPERPERMS = "hyperfactions_admin.gui.ver_hyperperms"; - public static final String GUI_VER_LUCKPERMS = "hyperfactions_admin.gui.ver_luckperms"; - public static final String GUI_VER_VAULT = "hyperfactions_admin.gui.ver_vault"; - public static final String GUI_VER_NATIVE = "hyperfactions_admin.gui.ver_native"; - public static final String GUI_VER_HYPERPROTECT = "hyperfactions_admin.gui.ver_hyperprotect"; - public static final String GUI_VER_ORBISGUARD_MIXINS = "hyperfactions_admin.gui.ver_orbisguard_mixins"; - public static final String GUI_VER_ORBISGUARD_API = "hyperfactions_admin.gui.ver_orbisguard_api"; - public static final String GUI_VER_MIXIN_HOOKS = "hyperfactions_admin.gui.ver_mixin_hooks"; - public static final String GUI_VER_GRAVESTONES = "hyperfactions_admin.gui.ver_gravestones"; - public static final String GUI_VER_KYUUBISOFT = "hyperfactions_admin.gui.ver_kyuubisoft"; - public static final String GUI_VER_PLACEHOLDER_API = "hyperfactions_admin.gui.ver_placeholder_api"; - public static final String GUI_VER_WIFLOW_PAPI = "hyperfactions_admin.gui.ver_wiflow_papi"; - public static final String GUI_VER_TREASURY = "hyperfactions_admin.gui.ver_treasury"; - - // Unclaim all confirm modal labels - public static final String GUI_UNCLAIM_TITLE = "hyperfactions_admin.gui.unclaim_title"; - public static final String GUI_UNCLAIM_CONFIRM_MSG1 = "hyperfactions_admin.gui.unclaim_confirm_msg1"; - public static final String GUI_UNCLAIM_CONFIRM_MSG2 = "hyperfactions_admin.gui.unclaim_confirm_msg2"; - public static final String GUI_UNCLAIM_WARNING = "hyperfactions_admin.gui.unclaim_warning"; - public static final String GUI_UNCLAIM_ALL = "hyperfactions_admin.gui.unclaim_all"; - - // Zone rename modal labels - public static final String GUI_ZREN_TITLE = "hyperfactions_admin.gui.zren_title"; - public static final String GUI_ZREN_CURRENT = "hyperfactions_admin.gui.zren_current"; - public static final String GUI_ZREN_NEW_NAME = "hyperfactions_admin.gui.zren_new_name"; - - // Zone change type modal labels - public static final String GUI_ZTYPE_TITLE = "hyperfactions_admin.gui.ztype_title"; - public static final String GUI_ZTYPE_ZONE_LABEL = "hyperfactions_admin.gui.ztype_zone_label"; - public static final String GUI_ZTYPE_CURRENT = "hyperfactions_admin.gui.ztype_current"; - public static final String GUI_ZTYPE_WILL_BECOME = "hyperfactions_admin.gui.ztype_will_become"; - public static final String GUI_ZTYPE_NEW = "hyperfactions_admin.gui.ztype_new"; - public static final String GUI_ZTYPE_WARNING1 = "hyperfactions_admin.gui.ztype_warning1"; - public static final String GUI_ZTYPE_WARNING2 = "hyperfactions_admin.gui.ztype_warning2"; - public static final String GUI_ZTYPE_KEEP_DESC = "hyperfactions_admin.gui.ztype_keep_desc"; - public static final String GUI_ZTYPE_KEEP_FLAGS = "hyperfactions_admin.gui.ztype_keep_flags"; - public static final String GUI_ZTYPE_RESET_DESC = "hyperfactions_admin.gui.ztype_reset_desc"; - public static final String GUI_ZTYPE_RESET_FLAGS = "hyperfactions_admin.gui.ztype_reset_flags"; - - // Create zone wizard labels - public static final String GUI_CZW_TITLE = "hyperfactions_admin.gui.czw_title"; - public static final String GUI_CZW_BACK = "hyperfactions_admin.gui.czw_back"; - public static final String GUI_CZW_CREATE = "hyperfactions_admin.gui.czw_create"; - public static final String GUI_CZW_ZONE_TYPE = "hyperfactions_admin.gui.czw_zone_type"; - public static final String GUI_CZW_SAFE_DESC = "hyperfactions_admin.gui.czw_safe_desc"; - public static final String GUI_CZW_WAR_DESC = "hyperfactions_admin.gui.czw_war_desc"; - public static final String GUI_CZW_ZONE_NAME = "hyperfactions_admin.gui.czw_zone_name"; - public static final String GUI_CZW_NAME_DESC = "hyperfactions_admin.gui.czw_name_desc"; - public static final String GUI_CZW_CLAIM_METHOD = "hyperfactions_admin.gui.czw_claim_method"; - public static final String GUI_CZW_METHOD_NONE_DESC = "hyperfactions_admin.gui.czw_method_none_desc"; - public static final String GUI_CZW_METHOD_NONE = "hyperfactions_admin.gui.czw_method_none"; - public static final String GUI_CZW_METHOD_SINGLE_DESC = "hyperfactions_admin.gui.czw_method_single_desc"; - public static final String GUI_CZW_METHOD_SINGLE = "hyperfactions_admin.gui.czw_method_single"; - public static final String GUI_CZW_METHOD_CIRCLE_DESC = "hyperfactions_admin.gui.czw_method_circle_desc"; - public static final String GUI_CZW_METHOD_CIRCLE = "hyperfactions_admin.gui.czw_method_circle"; - public static final String GUI_CZW_METHOD_SQUARE_DESC = "hyperfactions_admin.gui.czw_method_square_desc"; - public static final String GUI_CZW_METHOD_SQUARE = "hyperfactions_admin.gui.czw_method_square"; - public static final String GUI_CZW_METHOD_MAP_DESC = "hyperfactions_admin.gui.czw_method_map_desc"; - public static final String GUI_CZW_METHOD_MAP = "hyperfactions_admin.gui.czw_method_map"; - public static final String GUI_CZW_RADIUS = "hyperfactions_admin.gui.czw_radius"; - public static final String GUI_CZW_CUSTOM_RADIUS = "hyperfactions_admin.gui.czw_custom_radius"; - public static final String GUI_CZW_FLAGS = "hyperfactions_admin.gui.czw_flags"; - public static final String GUI_CZW_FLAGS_DEFAULTS_DESC = "hyperfactions_admin.gui.czw_flags_defaults_desc"; - public static final String GUI_CZW_FLAGS_DEFAULTS = "hyperfactions_admin.gui.czw_flags_defaults"; - public static final String GUI_CZW_FLAGS_CUSTOMIZE_DESC = "hyperfactions_admin.gui.czw_flags_customize_desc"; - public static final String GUI_CZW_FLAGS_CUSTOMIZE = "hyperfactions_admin.gui.czw_flags_customize"; - - // Faction entry labels - public static final String GUI_FAC_ENTRY_POWER = "hyperfactions_admin.gui.fac_entry_power"; - public static final String GUI_FAC_ENTRY_CLAIMS = "hyperfactions_admin.gui.fac_entry_claims"; - public static final String GUI_FAC_ENTRY_MEMBERS = "hyperfactions_admin.gui.fac_entry_members"; - public static final String GUI_FAC_ENTRY_CREATED = "hyperfactions_admin.gui.fac_entry_created"; - public static final String GUI_FAC_ENTRY_HOME = "hyperfactions_admin.gui.fac_entry_home"; - public static final String GUI_FAC_ENTRY_TP_HOME = "hyperfactions_admin.gui.fac_entry_tp_home"; - public static final String GUI_FAC_ENTRY_VIEW_INFO = "hyperfactions_admin.gui.fac_entry_view_info"; - public static final String GUI_FAC_ENTRY_MEMBERS_BTN = "hyperfactions_admin.gui.fac_entry_members_btn"; - public static final String GUI_FAC_ENTRY_SETTINGS = "hyperfactions_admin.gui.fac_entry_settings"; - public static final String GUI_FAC_ENTRY_UNCLAIM_ALL = "hyperfactions_admin.gui.fac_entry_unclaim_all"; - public static final String GUI_FAC_ENTRY_DISBAND = "hyperfactions_admin.gui.fac_entry_disband"; - // Player entry labels - public static final String GUI_PLR_ENTRY_ROLE = "hyperfactions_admin.gui.plr_entry_role"; - public static final String GUI_PLR_ENTRY_JOINED = "hyperfactions_admin.gui.plr_entry_joined"; - public static final String GUI_PLR_ENTRY_LAST_ONLINE = "hyperfactions_admin.gui.plr_entry_last_online"; - public static final String GUI_PLR_ENTRY_KDR = "hyperfactions_admin.gui.plr_entry_kdr"; - public static final String GUI_PLR_ENTRY_POWER = "hyperfactions_admin.gui.plr_entry_power"; - public static final String GUI_PLR_ENTRY_UUID = "hyperfactions_admin.gui.plr_entry_uuid"; - public static final String GUI_PLR_ENTRY_INFO = "hyperfactions_admin.gui.plr_entry_info"; - public static final String GUI_PLR_ENTRY_TELEPORT = "hyperfactions_admin.gui.plr_entry_teleport"; - public static final String GUI_PLR_ENTRY_NA = "hyperfactions_admin.gui.plr_entry_na"; - public static final String GUI_PLR_ENTRY_UNKNOWN = "hyperfactions_admin.gui.plr_entry_unknown"; - public static final String GUI_PLR_ENTRY_AGO = "hyperfactions_admin.gui.plr_entry_ago"; - // Zone entry labels - public static final String GUI_ZONE_ENTRY_WORLD = "hyperfactions_admin.gui.zone_entry_world"; - public static final String GUI_ZONE_ENTRY_CHUNKS = "hyperfactions_admin.gui.zone_entry_chunks"; - public static final String GUI_ZONE_ENTRY_BOUNDS = "hyperfactions_admin.gui.zone_entry_bounds"; - public static final String GUI_ZONE_ENTRY_CREATED = "hyperfactions_admin.gui.zone_entry_created"; - public static final String GUI_ZONE_ENTRY_EDIT_MAP = "hyperfactions_admin.gui.zone_entry_edit_map"; - public static final String GUI_ZONE_ENTRY_FLAGS = "hyperfactions_admin.gui.zone_entry_flags"; - public static final String GUI_ZONE_ENTRY_SETTINGS = "hyperfactions_admin.gui.zone_entry_settings"; - public static final String GUI_ZONE_ENTRY_DELETE = "hyperfactions_admin.gui.zone_entry_delete"; - - private AdminGui() {} - } - - /** Player settings page labels and messages. */ - public static final class PlayerSettings { - public static final String TITLE = "hyperfactions_gui.player_settings.title"; - public static final String LANGUAGE_SECTION = "hyperfactions_gui.player_settings.language_section"; - public static final String AUTO_DETECT = "hyperfactions_gui.player_settings.auto_detect"; - public static final String AUTO_DETECT_DESC = "hyperfactions_gui.player_settings.auto_detect_desc"; - public static final String LANGUAGE_LABEL = "hyperfactions_gui.player_settings.language_label"; - public static final String NOTIFICATIONS_SECTION = "hyperfactions_gui.player_settings.notifications_section"; - public static final String TERRITORY_ALERTS = "hyperfactions_gui.player_settings.territory_alerts"; - public static final String TERRITORY_ALERTS_DESC = "hyperfactions_gui.player_settings.territory_alerts_desc"; - public static final String DEATH_ANNOUNCEMENTS = "hyperfactions_gui.player_settings.death_announcements"; - public static final String DEATH_ANNOUNCEMENTS_DESC = "hyperfactions_gui.player_settings.death_announcements_desc"; - public static final String POWER_NOTIFICATIONS = "hyperfactions_gui.player_settings.power_notifications"; - public static final String POWER_NOTIFICATIONS_DESC = "hyperfactions_gui.player_settings.power_notifications_desc"; - public static final String LANGUAGE_CHANGED = "hyperfactions_gui.player_settings.language_changed"; - public static final String PREF_ENABLED = "hyperfactions_gui.player_settings.pref_enabled"; - public static final String PREF_DISABLED = "hyperfactions_gui.player_settings.pref_disabled"; - - private PlayerSettings() {} - } -} diff --git a/src/main/java/com/hyperfactions/util/MessageUtil.java b/src/main/java/com/hyperfactions/util/MessageUtil.java index 0791481a..53e860ea 100644 --- a/src/main/java/com/hyperfactions/util/MessageUtil.java +++ b/src/main/java/com/hyperfactions/util/MessageUtil.java @@ -4,6 +4,7 @@ import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.universe.PlayerRef; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * Centralized message utilities for HyperFactions. @@ -79,7 +80,7 @@ public static Message adminPrefix() { * @param args Replacement arguments for {0}, {1}, etc. */ @NotNull - public static Message error(@NotNull PlayerRef player, @NotNull String key, Object... args) { + public static Message error(@Nullable PlayerRef player, @NotNull String key, Object... args) { return prefix().insert(Message.raw(HFMessages.get(player, key, args)).color(COLOR_RED)); } @@ -87,7 +88,7 @@ public static Message error(@NotNull PlayerRef player, @NotNull String key, Obje * Creates a prefixed green success message using i18n key resolution. */ @NotNull - public static Message success(@NotNull PlayerRef player, @NotNull String key, Object... args) { + public static Message success(@Nullable PlayerRef player, @NotNull String key, Object... args) { return prefix().insert(Message.raw(HFMessages.get(player, key, args)).color(COLOR_GREEN)); } @@ -95,7 +96,7 @@ public static Message success(@NotNull PlayerRef player, @NotNull String key, Ob * Creates a prefixed info message with custom color using i18n key resolution. */ @NotNull - public static Message info(@NotNull PlayerRef player, @NotNull String key, @NotNull String color, Object... args) { + public static Message info(@Nullable PlayerRef player, @NotNull String key, @NotNull String color, Object... args) { return prefix().insert(Message.raw(HFMessages.get(player, key, args)).color(color)); } @@ -103,7 +104,7 @@ public static Message info(@NotNull PlayerRef player, @NotNull String key, @NotN * Creates a red error message (no prefix) using i18n key resolution. */ @NotNull - public static Message errorText(@NotNull PlayerRef player, @NotNull String key, Object... args) { + public static Message errorText(@Nullable PlayerRef player, @NotNull String key, Object... args) { return Message.raw(HFMessages.get(player, key, args)).color(COLOR_RED); } @@ -111,7 +112,7 @@ public static Message errorText(@NotNull PlayerRef player, @NotNull String key, * Creates a green success message (no prefix) using i18n key resolution. */ @NotNull - public static Message successText(@NotNull PlayerRef player, @NotNull String key, Object... args) { + public static Message successText(@Nullable PlayerRef player, @NotNull String key, Object... args) { return Message.raw(HFMessages.get(player, key, args)).color(COLOR_GREEN); } @@ -119,7 +120,7 @@ public static Message successText(@NotNull PlayerRef player, @NotNull String key * Creates an admin-prefixed red error message using i18n key resolution. */ @NotNull - public static Message adminError(@NotNull PlayerRef player, @NotNull String key, Object... args) { + public static Message adminError(@Nullable PlayerRef player, @NotNull String key, Object... args) { return adminPrefix().insert(Message.raw(HFMessages.get(player, key, args)).color(COLOR_RED)); } @@ -127,7 +128,7 @@ public static Message adminError(@NotNull PlayerRef player, @NotNull String key, * Creates an admin-prefixed green success message using i18n key resolution. */ @NotNull - public static Message adminSuccess(@NotNull PlayerRef player, @NotNull String key, Object... args) { + public static Message adminSuccess(@Nullable PlayerRef player, @NotNull String key, Object... args) { return adminPrefix().insert(Message.raw(HFMessages.get(player, key, args)).color(COLOR_GREEN)); } @@ -135,7 +136,7 @@ public static Message adminSuccess(@NotNull PlayerRef player, @NotNull String ke * Creates an admin-prefixed gray info message using i18n key resolution. */ @NotNull - public static Message adminInfo(@NotNull PlayerRef player, @NotNull String key, Object... args) { + public static Message adminInfo(@Nullable PlayerRef player, @NotNull String key, Object... args) { return adminPrefix().insert(Message.raw(HFMessages.get(player, key, args)).color(COLOR_GRAY)); } @@ -143,7 +144,7 @@ public static Message adminInfo(@NotNull PlayerRef player, @NotNull String key, * Creates a colored message with no prefix using i18n key resolution. */ @NotNull - public static Message text(@NotNull PlayerRef player, @NotNull String key, @NotNull String color, Object... args) { + public static Message text(@Nullable PlayerRef player, @NotNull String key, @NotNull String color, Object... args) { return Message.raw(HFMessages.get(player, key, args)).color(color); } diff --git a/src/main/resources/Server/Languages/de-DE/hyperfactions.lang b/src/main/resources/Server/Languages/de-DE/hyperfactions.lang index 66d019a8..12bdcae1 100644 --- a/src/main/resources/Server/Languages/de-DE/hyperfactions.lang +++ b/src/main/resources/Server/Languages/de-DE/hyperfactions.lang @@ -451,3 +451,470 @@ teleport.mount_entry_blocked = Sie können diese Zone nicht betreten, während S chat.display.public = Öffentlich chat.display.faction = Fraktion chat.display.ally = Verbündete + +# ========== Hilfesystem ========== +help.commands_label = Befehle: +help.default_footer = Verwenden Sie /f für weitere Details +help.title = HyperFactions +help.description = Fraktionsverwaltung und Gebietskontrolle + +# Hilfe-Abschnitte +help.section.core = Grundlagen +help.section.management = Verwaltung +help.section.territory = Territorium +help.section.relations = Beziehungen +help.section.teleport = Teleportation +help.section.information = Information +help.section.other = Sonstiges +help.section.admin = Admin + +# Hilfe-Befehlsbeschreibungen (Grundlagen) +help.cmd.create = Eine Fraktion erstellen +help.cmd.disband = Ihre Fraktion auflösen +help.cmd.invite = Einen Spieler einladen +help.cmd.accept = Eine Einladung annehmen +help.cmd.request = Beitritt zu einer Fraktion anfragen +help.cmd.leave = Ihre Fraktion verlassen +help.cmd.kick = Ein Mitglied rauswerfen + +# Hilfe-Befehlsbeschreibungen (Verwaltung) +help.cmd.rename = Ihre Fraktion umbenennen +help.cmd.desc = Fraktionsbeschreibung festlegen +help.cmd.color = Fraktionsfarbe festlegen +help.cmd.open = Jedem den Beitritt erlauben +help.cmd.close = Einladung zum Beitritt erfordern +help.cmd.promote = Zum Offizier befördern +help.cmd.demote = Zum Mitglied degradieren +help.cmd.transfer = Führung übertragen + +# Hilfe-Befehlsbeschreibungen (Territorium) +help.cmd.claim = Diesen Chunk beanspruchen +help.cmd.unclaim = Diesen Chunk freigeben +help.cmd.overclaim = Feindliches Territorium überbeanspruchen +help.cmd.map = Gebietskarte anzeigen + +# Hilfe-Befehlsbeschreibungen (Beziehungen) +help.cmd.ally = Allianz anfragen +help.cmd.enemy = Feind erklären +help.cmd.neutral = Neutrale Beziehung setzen + +# Hilfe-Befehlsbeschreibungen (Teleportation) +help.cmd.home = Zum Fraktionsheim teleportieren +help.cmd.sethome = Fraktionsheim festlegen +help.cmd.stuck = Aus feindlichem Territorium entkommen + +# Hilfe-Befehlsbeschreibungen (Information) +help.cmd.info = Fraktionsinfo anzeigen +help.cmd.list = Alle Fraktionen auflisten +help.cmd.browse = Fraktionen durchsuchen (Alias für list) +help.cmd.members = Fraktionsmitglieder anzeigen +help.cmd.invites = Einladungen/Anfragen verwalten +help.cmd.who = Spielerinfo anzeigen +help.cmd.power = Machtstufe anzeigen +help.cmd.gui = Fraktions-GUI öffnen +help.cmd.settings = Fraktionseinstellungen öffnen + +# Hilfe-Befehlsbeschreibungen (Sonstiges) +help.cmd.chat = Nachricht im Fraktionschat senden +help.cmd.chat_short = Fraktionschat (kurz) + +# Hilfe-Befehlsbeschreibungen (Admin in Haupthilfe) +help.cmd.admin = Admin-GUI öffnen +help.cmd.admin_reload = Konfiguration neu laden +help.cmd.admin_sync = Daten von Festplatte synchronisieren +help.cmd.admin_factions = Fraktionen verwalten +help.cmd.admin_zones = Zonen verwalten +help.cmd.admin_config = Konfiguration anzeigen/bearbeiten +help.cmd.admin_backups = Backups verwalten +help.cmd.admin_update = Nach Updates suchen +help.cmd.admin_debug = Debug-Befehle + +# Admin-Hilfeseite +help.admin.title = Admin-Befehle +help.admin.description = Serververwaltung +help.admin.cmd.dashboard = Admin-Dashboard-GUI öffnen +help.admin.cmd.factions = Alle Fraktionen verwalten +help.admin.cmd.zone = Zonenverwaltung +help.admin.cmd.config = Serverkonfiguration +help.admin.cmd.backup = Backup-Verwaltung +help.admin.cmd.import_cmd = Aus anderen Plugins importieren +help.admin.cmd.update = Nach Updates suchen und herunterladen +help.admin.cmd.update_mixin = HyperProtect-Mixin aktualisieren +help.admin.cmd.update_toggle = HP-Mixin Auto-Download umschalten +help.admin.cmd.rollback = Auf frühere Version zurücksetzen +help.admin.cmd.reload = Konfiguration neu laden +help.admin.cmd.sync = Daten von Festplatte synchronisieren +help.admin.cmd.debug = Debug-Befehle +help.admin.cmd.decay = Gebietsverfall-Verwaltung +help.admin.cmd.map = Weltkarten-Verwaltung +help.admin.cmd.safezone = SafeZone erstellen + Chunk beanspruchen +help.admin.cmd.warzone = WarZone erstellen + Chunk beanspruchen +help.admin.cmd.removezone = Chunk aus Zone freigeben +help.admin.cmd.zoneflag = Zonen-Flag setzen +help.admin.cmd.integrations = Übersicht aller Integrationen +help.admin.cmd.integration = Detaillierter Integrationsstatus +help.admin.cmd.clearhistory = Mitgliedschaftsverlauf eines Spielers löschen +help.admin.cmd.power = Admin-Machtverwaltung +help.admin.cmd.economy = Wirtschafts-/Schatzkammerverwaltung +help.admin.cmd.economy_upkeep = Unterhaltseinzug manuell auslösen +help.admin.cmd.info = Admin-Fraktionsinfo-GUI anzeigen +help.admin.cmd.who = Admin-Spielerinfo-GUI anzeigen +help.admin.cmd.log = Globales Aktivitätsprotokoll anzeigen +help.admin.cmd.world = Weltenspezifische Einstellungsverwaltung +help.admin.cmd.version = Mod-Version und Integrationsstatus anzeigen +help.admin.cmd.sentry = Sentry-Status anzeigen +help.admin.cmd.sentry_disable = Sentry-Fehlerberichterstattung deaktivieren +help.admin.cmd.sentry_enable = Sentry-Fehlerberichterstattung aktivieren +help.admin.cmd.test_gui = UI-Element-Testseite öffnen +help.admin.cmd.test_sentry = Testfehler an Sentry senden +help.admin.cmd.test_md = Markdown-Rendering-Testseite öffnen + +# Unterhilfe: Backup +help.backup.title = Backup-Verwaltung +help.backup.description = GFS-Rotationsschema +help.backup.cmd.create = Manuelles Backup erstellen +help.backup.cmd.list = Alle Backups nach Typ gruppiert auflisten +help.backup.cmd.restore = Aus Backup wiederherstellen (Bestätigung erforderlich) +help.backup.cmd.delete = Ein Backup löschen + +# Unterhilfe: Debug +help.debug.title = Debug-Befehle +help.debug.description = Diagnose und Fehlerbehebung +help.debug.cmd.toggle = Debug-Protokollierung umschalten +help.debug.cmd.status = Debug-Status anzeigen +help.debug.cmd.power = Machtdetails anzeigen +help.debug.cmd.claim = Gebietsanspruchsinfo anzeigen +help.debug.cmd.protection = Schutzinfo anzeigen +help.debug.cmd.combat = Kampfmarkierungsstatus anzeigen +help.debug.cmd.relation = Beziehungsinfo anzeigen + +# Unterhilfe: Macht +help.power.title = Admin-Macht +help.power.description = Spieler-/Fraktionsmacht verwalten +help.power.cmd.set = Exakte Macht festlegen +help.power.cmd.add = Macht erhöhen +help.power.cmd.remove = Macht verringern +help.power.cmd.reset = Auf Standard zurücksetzen +help.power.cmd.setmax = Maximale Macht überschreiben +help.power.cmd.resetmax = Max-Überschreibung entfernen +help.power.cmd.noloss = Machtverlust-Bypass umschalten +help.power.cmd.nodecay = Gebietsverfall-Ausnahme umschalten +help.power.cmd.faction = Fraktionsweite Operationen +help.power.cmd.info = Spieler-Machtdetails anzeigen + +# Unterhilfe: Wirtschaft +help.economy.title = Admin-Wirtschaft +help.economy.description = Fraktionsschatzkammern verwalten +help.economy.cmd.balance = Fraktionsguthaben anzeigen +help.economy.cmd.set = Exaktes Guthaben festlegen +help.economy.cmd.add = Zum Guthaben hinzufügen +help.economy.cmd.take = Vom Guthaben abziehen +help.economy.cmd.total = Gesamtguthaben des Servers anzeigen +help.economy.cmd.reset = Guthaben auf 0 zurücksetzen +help.economy.cmd.upkeep = Unterhaltseinzug manuell auslösen + +# Unterhilfe: Welt +help.world.title = Welteinstellungen +help.world.description = Weltenspezifische Konfiguration +help.world.cmd.list = Alle konfigurierten Welten auflisten +help.world.cmd.info = Einstellungen einer Welt anzeigen +help.world.cmd.set = Eine Welteinstellung festlegen +help.world.cmd.reset = Weltenspezifische Einstellungen entfernen + +# Unterhilfe: Karte +help.map.title = Weltkarte +help.map.description = Kartenoverlay-Verwaltung +help.map.cmd.status = Weltkartenstatus und Statistiken anzeigen +help.map.cmd.refresh = Sofortige Kartenaktualisierung erzwingen + +# Unterhilfe: Verfall +help.decay.title = Gebietsverfall +help.decay.description = Entfernt automatisch Ansprüche inaktiver Fraktionen +help.decay.cmd.status = Verfallstatus anzeigen +help.decay.cmd.run = Gebietsverfall manuell auslösen +help.decay.cmd.check = Verfallstatus einer Fraktion prüfen + +# Unterhilfe: Import +help.import.title = Import-Befehle +help.import.description = Von anderen Fraktions-Plugins migrieren +help.import.cmd.hyfactions = Aus HyFactions importieren +help.import.path.hyfactions = Standardpfad: mods/Kaws_Hyfaction +help.import.cmd.elbaphfactions = Aus ElbaphFactions importieren +help.import.path.elbaphfactions = Standardpfad: mods/ElbaphFactions +help.import.cmd.factionsx = Aus FactionsX importieren +help.import.path.factionsx = Standardpfad: mods/FactionsX +help.import.cmd.simpleclaims = Aus SimpleClaims importieren +help.import.path.simpleclaims = Standardpfad: Server/universe/SimpleClaims +help.import.flags_header = Flags: +help.import.flag.dryrun = Simulation ohne Änderungen +help.import.flag.overwrite = Bestehende Fraktionen ersetzen +help.import.flag.nozones = Zonenimport überspringen +help.import.flag.nopower = Machtverteilung überspringen + +# Unterhilfe: Tests +help.test.title = Test-Befehle +help.test.description = Entwicklungs-Testtools +help.test.cmd.gui = UI-Element-Testseite öffnen +help.test.cmd.sentry = Testfehler an Sentry senden +help.test.cmd.md = Markdown-Rendering-Testseite öffnen + +# ========== Admin-CLI-Nachrichten ========== +admincmd.no_permission = Sie haben keine Berechtigung. +admincmd.player_only = Dieser Befehl kann nur von einem Spieler verwendet werden. +admincmd.player_context = Spielerkontext nicht verfügbar. +admincmd.entity_not_found = Spielerentität konnte nicht gefunden werden. +admincmd.unknown_command = Unbekannter Admin-Befehl. Verwenden Sie /f admin help +admincmd.faction_not_found = Fraktion nicht gefunden. +admincmd.player_not_found = Spieler nicht gefunden: {0} +admincmd.invalid_number = Ungültige Zahl: {0} +admincmd.amount_positive = Betrag muss positiv sein. +admincmd.balance_not_negative = Guthaben darf nicht negativ sein. +admincmd.error_generic = Ein Fehler ist aufgetreten. + +# Admin - Neu laden/Synchronisieren +admincmd.reload.success = Konfiguration neu geladen. +admincmd.sync.start = Synchronisiere Fraktionsdaten von Festplatte... +admincmd.sync.complete = Synchronisierung abgeschlossen: {0} Fraktionen aktualisiert, {1} Mitglieder hinzugefügt, {2} Mitglieder aktualisiert. +admincmd.sync.failed = Synchronisierung fehlgeschlagen: {0} + +# Admin - Version +admincmd.version.title = Versionsinformation +admincmd.version.server = Hytale Server: {0} +admincmd.version.java = Java: {0} +admincmd.version.treasury = Schatzkammer: {0} +admincmd.version.active = Aktiv +admincmd.version.not_found = Nicht gefunden + +# Admin - Sentry +admincmd.sentry.header = Sentry-Fehlerberichterstattung +admincmd.sentry.config = Config: {0} +admincmd.sentry.status = Status: {0} +admincmd.sentry.already_disabled = Sentry ist bereits deaktiviert. +admincmd.sentry.already_enabled = Sentry ist bereits aktiviert. +admincmd.sentry.disabled = Sentry deaktiviert und Konfiguration gespeichert. Fehlerberichterstattung ist nun aus. +admincmd.sentry.enabled = Sentry aktiviert und Konfiguration gespeichert. Fehlerberichterstattung ist nun an. +admincmd.sentry.usage = Verwendung: /f admin sentry [disable|enable] +admincmd.sentry.not_initialized = Sentry ist nicht initialisiert. Prüfen Sie config/debug.json +admincmd.sentry.test_sent = Testfehler an Sentry gesendet. Prüfen Sie Ihr Sentry-Dashboard. +admincmd.sentry.test_failed = Senden des Testereignisses fehlgeschlagen. + +# Admin - Backup +admincmd.backup.no_permission = Sie haben keine Berechtigung, Backups zu verwalten. +admincmd.backup.creating = Erstelle Backup... +admincmd.backup.created = Backup erfolgreich erstellt! +admincmd.backup.name = Name: {0} +admincmd.backup.size = Größe: {0} +admincmd.backup.failed = Backup fehlgeschlagen: {0} +admincmd.backup.none = Keine Backups gefunden. +admincmd.backup.header = Backups +admincmd.backup.not_found = Backup '{0}' nicht gefunden. +admincmd.backup.unknown_command = Unbekannter Backup-Befehl: {0} +admincmd.backup.usage_restore = Verwendung: /f admin backup restore +admincmd.backup.usage_delete = Verwendung: /f admin backup delete +admincmd.backup.restore_warning = WARNUNG: Das Wiederherstellen eines Backups überschreibt die aktuellen Daten! +admincmd.backup.restore_confirm = Geben Sie den Befehl innerhalb von {0} Sekunden erneut ein, um zu bestätigen. +admincmd.backup.restoring = Stelle Backup wieder her... +admincmd.backup.restored = Backup erfolgreich wiederhergestellt! Daten neu geladen. +admincmd.backup.restore_failed = Wiederherstellung fehlgeschlagen: {0} +admincmd.backup.confirm_cancelled = Vorherige Bestätigung abgebrochen. Geben Sie den Befehl erneut ein, um die Wiederherstellung zu bestätigen. +admincmd.backup.deleted = Backup '{0}' gelöscht +admincmd.backup.delete_failed = Backup konnte nicht gelöscht werden. + +# Admin - Debug +admincmd.debug.no_permission = Sie haben keine Berechtigung, Debug-Befehle zu verwenden. +admincmd.debug.unknown_command = Unbekannter Debug-Befehl: {0} +admincmd.debug.player_only = Dieser Debug-Befehl kann nur von einem Spieler verwendet werden. +admincmd.debug.toggle_set = Debug-Kategorie '{0}' auf {1} gesetzt (gespeichert) +admincmd.debug.all_enabled = Alle Debug-Kategorien aktiviert. +admincmd.debug.all_disabled = Alle Debug-Kategorien deaktiviert. +admincmd.debug.unknown_category = Unbekannte Kategorie: {0} +admincmd.debug.not_implemented = Debug-Info {0} noch nicht implementiert. + +# Admin - Wirtschaft +admincmd.econ.disabled = Das Wirtschaftssystem ist nicht aktiviert. +admincmd.econ.unknown_command = Unbekannter Wirtschaftsbefehl. Verwenden Sie /f admin economy help +admincmd.econ.set = Guthaben von {0} auf {1} gesetzt (war {2}) +admincmd.econ.added = {0} zu {1} hinzugefügt (Guthaben: {2}) +admincmd.econ.deducted = {0} von {1} abgezogen (Guthaben: {2}) +admincmd.econ.reset = Guthaben von {0} auf {1} zurückgesetzt (war {2}) +admincmd.econ.failed = Fehlgeschlagen: {0} +admincmd.econ.total_header = Server-Wirtschaftsstatistiken +admincmd.econ.upkeep_disabled = Das Unterhaltssystem ist nicht aktiviert. +admincmd.econ.upkeep_trigger = Löse Unterhaltseinzug manuell aus... +admincmd.econ.upkeep_complete = Unterhaltseinzug abgeschlossen. Prüfen Sie das Serverprotokoll für Details. +admincmd.econ.upkeep_failed = Unterhaltseinzug fehlgeschlagen: {0} + +# Admin - Macht +admincmd.power.no_permission = Sie haben keine Berechtigung. +admincmd.power.unknown_command = Unbekannter Machtbefehl. Verwenden Sie /f admin power help +admincmd.power.max_positive = Maximale Macht muss positiv sein. +admincmd.power.faction_unknown_action = Unbekannte Fraktionsmacht-Aktion. Verwenden Sie: set, add, remove, reset + +# Admin - Verlauf löschen +admincmd.history.no_data = Keine Spielerdaten für {0} gefunden. +admincmd.history.empty = {0} hat keinen Mitgliedschaftsverlauf. +admincmd.history.cleared = {0} Verlaufseinträge für {1} gelöscht. +admincmd.history.cleared_reinit = {0} Verlaufseinträge für {1} gelöscht (re-initialisiert mit aktueller Fraktion: {2}). + +# Admin - Zone +admincmd.zone.created = {0} '{1}' erstellt bei {2}, {3} +admincmd.zone.chunk_claimed = Zone kann nicht erstellt werden: Dieser Chunk wird von einer Fraktion beansprucht. +admincmd.zone.already_exists = An diesem Standort existiert bereits eine Zone. +admincmd.zone.name_taken = Eine Zone mit diesem Namen existiert bereits. +admincmd.zone.not_found = Zone '{0}' nicht gefunden. +admincmd.zone.unclaimed = Chunk aus Zone freigegeben. +admincmd.zone.no_chunk = Kein Zonen-Chunk an diesem Standort gefunden. +admincmd.zone.none = Keine Zonen definiert. +admincmd.zone.deleted = Zone '{0}' gelöscht ({1} Chunks freigegeben) +admincmd.zone.renamed = Zone '{0}' umbenannt zu '{1}' +admincmd.zone.invalid_type = Ungültiger Zonentyp. Verwenden Sie 'safe' oder 'war' +admincmd.zone.invalid_name = Ungültiger Zonenname. Muss 1-32 Zeichen lang sein. +admincmd.zone.claimed_radius = {0} Chunks für Zone '{1}' beansprucht +admincmd.zone.no_chunks_claimed = Keine Chunks konnten beansprucht werden (alle belegt oder bereits in einer Zone). +admincmd.zone.unknown_command = Unbekannter Zonenbefehl. Verwenden Sie /f admin help +admincmd.zone.chunk_has_zone = Dieser Chunk gehört bereits zu einer anderen Zone. +admincmd.zone.chunk_has_faction = Dieser Chunk wird von einer Fraktion beansprucht. +admincmd.zone.notify_set = Eingangsbenachrichtigung für Zone '{0}' {1} +admincmd.zone.title_set = {0}-Titel für Zone '{1}' gesetzt auf: {2} +admincmd.zone.title_cleared = {0}-Titel für Zone '{1}' gelöscht (Standard wird verwendet) +admincmd.zone.no_zone_at = Keine Zone an Ihrem Standort. Stehen Sie in einer Zone, um Flags zu verwalten. +admincmd.zone.flag_cleared = Flag '{0}' gelöscht (jetzt Standard: {1}) +admincmd.zone.flag_set = Flag '{0}' auf {1} gesetzt +admincmd.zone.flag_invalid = Ungültiges Flag: {0} +admincmd.zone.flags_cleared = Alle benutzerdefinierten Flags für '{0}' gelöscht — jetzt werden Zonentyp-Standards verwendet. + +# Admin - Welt +admincmd.world.unknown_command = Unbekannter Weltbefehl. Verwenden Sie /f admin world help +admincmd.world.no_settings = Keine weltenspezifischen Einstellungen konfiguriert. +admincmd.world.unknown_setting = Unbekannte Einstellung: {0} +admincmd.world.set = {0}={1} für Welt {2} gesetzt +admincmd.world.reset = Weltenspezifische Einstellungen entfernt für: {0} +admincmd.world.not_found = Keine Einstellungen für Welt gefunden: {0} + +# Admin - Karte/Verfall +admincmd.map.not_available = Weltkartendienst ist nicht verfügbar. +admincmd.map.refreshing = Erzwinge vollständige Kartenaktualisierung... +admincmd.map.refreshed = Kartenaktualisierung abgeschlossen. +admincmd.map.unknown_command = Unbekannter Kartenbefehl: {0} +admincmd.decay.disabled = Gebietsverfall ist in der Konfiguration deaktiviert. +admincmd.decay.running = Führe Gebietsverfallsprüfung durch... +admincmd.decay.complete = Gebietsverfallsprüfung abgeschlossen. Prüfen Sie die Konsole für Details. +admincmd.decay.unknown_command = Unbekannter Verfallsbefehl: {0} + +# Admin - Update +admincmd.update.not_available = Update-Prüfer ist nicht verfügbar. +admincmd.update.checking = Suche nach Updates... +admincmd.update.up_to_date = Plugin ist bereits aktuell (v{0}) +admincmd.update.available = Update verfügbar: v{0} +admincmd.update.unknown_target = Unbekanntes Update-Ziel: {0} + +# Admin - Import +admincmd.import.unknown_source = Unbekannte Importquelle: {0} +admincmd.import.importing = Importiere aus {0}... +admincmd.import.complete = {0}-Import {1}abgeschlossen! +admincmd.import.failed = {0}-Import mit Fehlern fehlgeschlagen: + +# Admin - Update Notifications (login messages) +admincmd.update_notify.new_version = [HyperFactions] Eine neue Version ist verfügbar! +admincmd.update_notify.version_info = Aktuell: v{0} -> Neueste: v{1} +admincmd.update_notify.instruction = Führe /f admin update aus, um das Plugin zu aktualisieren. +admincmd.update_notify.up_to_date = [HyperFactions] Plugin ist aktuell (v{0}) + +# Admin - Update Download Flow +admincmd.update.no_info = Keine Update-Informationen verfügbar. +admincmd.update.creating_backup = Erstelle Pre-Update-Backup... +admincmd.update.backup_created = Backup erstellt: {0} +admincmd.update.backup_warning = Warnung: Backup fehlgeschlagen - {0} +admincmd.update.backup_continue = Fahre trotzdem mit dem Update fort... +admincmd.update.downloading = Lade HyperFactions v{0} herunter... +admincmd.update.download_failed = Download fehlgeschlagen. Prüfe die Server-Logs. +admincmd.update.downloaded = Update erfolgreich heruntergeladen! +admincmd.update.file_label = Datei: {0} +admincmd.update.cleanup = Bereinigung: {0} alte(s) Backup(s) entfernt +admincmd.update.kept_backup = Behalten: {0} (für Rollback) +admincmd.update.restart = Starte den Server neu, um das Update anzuwenden. +admincmd.update.use_rollback = Verwende /f admin rollback zum Rückgängigmachen vor dem Neustart. +admincmd.update.usage_hf = /f admin update — HyperFactions aktualisieren +admincmd.update.usage_mixin = /f admin update mixin — HyperProtect-Mixin aktualisieren +admincmd.update.usage_toggle = /f admin update toggle-mixin-download — Auto-Download umschalten + +# Admin - Mixin Update +admincmd.update.mixin_current = HyperProtect-Mixin: {0} +admincmd.update.mixin_up_to_date = HyperProtect-Mixin ist aktuell. +admincmd.update.mixin_none = Noch keine HyperProtect-Mixin-Releases verfügbar. +admincmd.update.mixin_available = Verfügbar: v{0} +admincmd.update.mixin_downloading = Lade HyperProtect-Mixin v{0} herunter... +admincmd.update.mixin_downloaded = Erfolgreich heruntergeladen! +admincmd.update.mixin_failed = Download fehlgeschlagen. Prüfe die Server-Logs. +admincmd.update.mixin_location = Speicherort: earlyplugins/ +admincmd.update.mixin_restart = Starte den Server neu zum Anwenden. +admincmd.update.mixin_auto_on = HP-Mixin Auto-Download aktiviert. +admincmd.update.mixin_auto_on_desc = HyperProtect-Mixin wird beim nächsten Start automatisch heruntergeladen, falls nicht installiert. +admincmd.update.mixin_auto_off = HP-Mixin Auto-Download deaktiviert. +admincmd.update.mixin_auto_off_desc = Verwende /f admin update mixin zum manuellen Download. + +# Admin - Rollback +admincmd.rollback.no_backup = Kein Backup-JAR zum Zurücksetzen gefunden. +admincmd.rollback.unsafe = Automatisches Rollback nicht möglich! +admincmd.rollback.unsafe_reason = Der Server wurde seit dem letzten Update neu gestartet. +admincmd.rollback.unsafe_migration = Konfigurations-/Datenmigrationen wurden möglicherweise angewendet. +admincmd.rollback.instructions = Für ein sicheres Rollback musst du: +admincmd.rollback.find_backup = Verwende /f admin backup list, um das Pre-Update-Backup zu finden. +admincmd.rollback.rolling = Update wird zurückgesetzt... +admincmd.rollback.from = Von: v{0} (neu) +admincmd.rollback.to = Zu: v{0} (vorherige) +admincmd.rollback.version = Setze auf v{0} zurück... +admincmd.rollback.success = Rollback erfolgreich! +admincmd.rollback.restored = Wiederhergestellt: {0} +admincmd.rollback.removed = Entfernt: {0} +admincmd.rollback.restart = Starte den Server neu, um das Rollback anzuwenden. +admincmd.rollback.failed = Rollback fehlgeschlagen: {0} + +# Admin - Zone Display +admincmd.zone.failed = Fehlgeschlagen: {0} +admincmd.zone.failed_delete = Zone konnte nicht gelöscht werden: {0} +admincmd.zone.failed_rename = Zone konnte nicht umbenannt werden: {0} +admincmd.zone.failed_flags = Flags konnten nicht zurückgesetzt werden. +admincmd.zone.failed_flag = Flag konnte nicht gesetzt werden. +admincmd.zone.list_header = Zonen ({0}) +admincmd.zone.info_header = Zone: {0} +admincmd.zone.info_notify = Benachrichtigung: {0} +admincmd.zone.info_upper_title = Oberer Titel: {0} +admincmd.zone.info_lower_title = Unterer Titel: {0} +admincmd.zone.info_custom_flags = Benutzerdefinierte Flags: +admincmd.zone.flags_header = Zone-Flags: {0} +admincmd.zone.flags_type = Zonentyp: {0} +admincmd.zone.player_only = Dieser Befehl kann nur von einem Spieler verwendet werden. + +# Admin - Decay Display +admincmd.decay.status_header = Gebietsverfall-Status +admincmd.decay.enable_hint = Setze claims.decayEnabled auf true zum Aktivieren. +admincmd.decay.error = Fehler beim Verfall: {0} +admincmd.decay.check_header = Verfallsprüfung: {0} +admincmd.decay.check_not_found = Fraktion '{0}' nicht gefunden. +admincmd.decay.no_claims = Keine Gebiete zum Verfallen. +admincmd.decay.disabled_globally = Global deaktiviert + +# Admin - Map/Debug Display +admincmd.map.status_header = Weltkarten-Status +admincmd.debug.status_header = Debug-Protokollierung +admincmd.debug.full_status_header = HyperFactions Debug-Status + +# ========== Common - Shared Labels ========== +common.no_description = Keine Beschreibung festgelegt. +common.member_count = {0} Mitglieder +common.economy_disabled = Wirtschaftssystem ist nicht aktiviert. + +# ========== Territory Display ========== +territory.display.wilderness = Wildnis +territory.display.safezone = Sicherheitszone +territory.display.warzone = Kriegszone +territory.display.unknown_faction = Unbekannte Fraktion +territory.secondary.pvp_disabled = PvP Deaktiviert +territory.secondary.pvp_no_protection = PvP Aktiviert - Kein Schutz +territory.secondary.your_territory = Dein Territorium +territory.secondary.faction_territory = Territorium +territory.secondary.relation_territory = {0}-Territorium + +# ========== Announcements ========== +announce.death_location = {0} starb bei ({1}, {2}, {3}) in {4} diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions.lang b/src/main/resources/Server/Languages/en-US/hyperfactions.lang index 2fc0c45b..4e80eed3 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions.lang @@ -451,3 +451,470 @@ teleport.mount_entry_blocked = You can't enter this zone while mounted. chat.display.public = Public chat.display.faction = Faction chat.display.ally = Ally + +# ========== Help System ========== +help.commands_label = Commands: +help.default_footer = Use /f for more details +help.title = HyperFactions +help.description = Faction management and territory control + +# Help sections +help.section.core = Core +help.section.management = Management +help.section.territory = Territory +help.section.relations = Relations +help.section.teleport = Teleport +help.section.information = Information +help.section.other = Other +help.section.admin = Admin + +# Help command descriptions (Core) +help.cmd.create = Create a faction +help.cmd.disband = Disband your faction +help.cmd.invite = Invite a player +help.cmd.accept = Accept an invite +help.cmd.request = Request to join a faction +help.cmd.leave = Leave your faction +help.cmd.kick = Kick a member + +# Help command descriptions (Management) +help.cmd.rename = Rename your faction +help.cmd.desc = Set faction description +help.cmd.color = Set faction color +help.cmd.open = Allow anyone to join +help.cmd.close = Require invite to join +help.cmd.promote = Promote to officer +help.cmd.demote = Demote to member +help.cmd.transfer = Transfer leadership + +# Help command descriptions (Territory) +help.cmd.claim = Claim this chunk +help.cmd.unclaim = Unclaim this chunk +help.cmd.overclaim = Overclaim enemy territory +help.cmd.map = View territory map + +# Help command descriptions (Relations) +help.cmd.ally = Request alliance +help.cmd.enemy = Declare enemy +help.cmd.neutral = Set neutral relation + +# Help command descriptions (Teleport) +help.cmd.home = Teleport to faction home +help.cmd.sethome = Set faction home +help.cmd.stuck = Escape from enemy territory + +# Help command descriptions (Information) +help.cmd.info = View faction info +help.cmd.list = List all factions +help.cmd.browse = Browse factions (alias for list) +help.cmd.members = View faction members +help.cmd.invites = Manage invites/requests +help.cmd.who = View player info +help.cmd.power = View power level +help.cmd.gui = Open faction GUI +help.cmd.settings = Open faction settings + +# Help command descriptions (Other) +help.cmd.chat = Send faction chat message +help.cmd.chat_short = Faction chat (short) + +# Help command descriptions (Admin in main help) +help.cmd.admin = Open admin GUI +help.cmd.admin_reload = Reload config +help.cmd.admin_sync = Sync data from disk +help.cmd.admin_factions = Manage factions +help.cmd.admin_zones = Manage zones +help.cmd.admin_config = View/edit config +help.cmd.admin_backups = Manage backups +help.cmd.admin_update = Check for updates +help.cmd.admin_debug = Debug commands + +# Admin help page +help.admin.title = Admin Commands +help.admin.description = Server administration +help.admin.cmd.dashboard = Open admin dashboard GUI +help.admin.cmd.factions = Manage all factions +help.admin.cmd.zone = Zone management +help.admin.cmd.config = Server configuration +help.admin.cmd.backup = Backup management +help.admin.cmd.import_cmd = Import from other plugins +help.admin.cmd.update = Check for & download updates +help.admin.cmd.update_mixin = Update HyperProtect-Mixin +help.admin.cmd.update_toggle = Toggle HP-Mixin auto-download +help.admin.cmd.rollback = Rollback to previous version +help.admin.cmd.reload = Reload configuration +help.admin.cmd.sync = Sync data from disk +help.admin.cmd.debug = Debug commands +help.admin.cmd.decay = Claim decay management +help.admin.cmd.map = World map management +help.admin.cmd.safezone = Create SafeZone + claim chunk +help.admin.cmd.warzone = Create WarZone + claim chunk +help.admin.cmd.removezone = Unclaim chunk from zone +help.admin.cmd.zoneflag = Set zone flag +help.admin.cmd.integrations = Summary of all integrations +help.admin.cmd.integration = Detailed integration status +help.admin.cmd.clearhistory = Clear player membership history +help.admin.cmd.power = Admin power management +help.admin.cmd.economy = Economy/treasury management +help.admin.cmd.economy_upkeep = Manually trigger upkeep collection +help.admin.cmd.info = View admin faction info GUI +help.admin.cmd.who = View admin player info GUI +help.admin.cmd.log = View global activity log +help.admin.cmd.world = Per-world settings management +help.admin.cmd.version = View mod version and integration status +help.admin.cmd.sentry = View Sentry status +help.admin.cmd.sentry_disable = Opt out of Sentry error reporting +help.admin.cmd.sentry_enable = Opt in to Sentry error reporting +help.admin.cmd.test_gui = Open UI element test page +help.admin.cmd.test_sentry = Send a test error to Sentry +help.admin.cmd.test_md = Open markdown rendering test page + +# Sub-help: Backup +help.backup.title = Backup Management +help.backup.description = GFS rotation scheme +help.backup.cmd.create = Create manual backup +help.backup.cmd.list = List all backups grouped by type +help.backup.cmd.restore = Restore from backup (requires confirmation) +help.backup.cmd.delete = Delete a backup + +# Sub-help: Debug +help.debug.title = Debug Commands +help.debug.description = Diagnostics and troubleshooting +help.debug.cmd.toggle = Toggle debug logging +help.debug.cmd.status = Show debug status +help.debug.cmd.power = Show power details +help.debug.cmd.claim = Show claim info +help.debug.cmd.protection = Show protection info +help.debug.cmd.combat = Show combat tag status +help.debug.cmd.relation = Show relation info + +# Sub-help: Power +help.power.title = Admin Power +help.power.description = Manage player/faction power +help.power.cmd.set = Set exact power +help.power.cmd.add = Increase power +help.power.cmd.remove = Decrease power +help.power.cmd.reset = Reset to default +help.power.cmd.setmax = Set max power override +help.power.cmd.resetmax = Clear max override +help.power.cmd.noloss = Toggle power loss bypass +help.power.cmd.nodecay = Toggle claim decay exemption +help.power.cmd.faction = Faction-wide operations +help.power.cmd.info = Show player power details + +# Sub-help: Economy +help.economy.title = Admin Economy +help.economy.description = Manage faction treasuries +help.economy.cmd.balance = Show faction balance +help.economy.cmd.set = Set exact balance +help.economy.cmd.add = Add to balance +help.economy.cmd.take = Deduct from balance +help.economy.cmd.total = Show server total balance +help.economy.cmd.reset = Reset balance to 0 +help.economy.cmd.upkeep = Manually trigger upkeep collection + +# Sub-help: World +help.world.title = World Settings +help.world.description = Per-world configuration +help.world.cmd.list = List all configured worlds +help.world.cmd.info = Show settings for a world +help.world.cmd.set = Set a world setting +help.world.cmd.reset = Remove world-specific settings + +# Sub-help: Map +help.map.title = World Map +help.map.description = Map overlay management +help.map.cmd.status = Show world map status and statistics +help.map.cmd.refresh = Force immediate map refresh + +# Sub-help: Decay +help.decay.title = Claim Decay +help.decay.description = Auto-removes claims from inactive factions +help.decay.cmd.status = Show decay status +help.decay.cmd.run = Manually trigger claim decay +help.decay.cmd.check = Check faction decay status + +# Sub-help: Import +help.import.title = Import Commands +help.import.description = Migrate from other faction plugins +help.import.cmd.hyfactions = Import from HyFactions mod +help.import.path.hyfactions = Default path: mods/Kaws_Hyfaction +help.import.cmd.elbaphfactions = Import from ElbaphFactions mod +help.import.path.elbaphfactions = Default path: mods/ElbaphFactions +help.import.cmd.factionsx = Import from FactionsX mod +help.import.path.factionsx = Default path: mods/FactionsX +help.import.cmd.simpleclaims = Import from SimpleClaims mod +help.import.path.simpleclaims = Default path: Server/universe/SimpleClaims +help.import.flags_header = Flags: +help.import.flag.dryrun = Simulate without changes +help.import.flag.overwrite = Replace existing factions +help.import.flag.nozones = Skip zone import +help.import.flag.nopower = Skip power distribution + +# Sub-help: Test +help.test.title = Test Commands +help.test.description = Development testing tools +help.test.cmd.gui = Open UI element test page +help.test.cmd.sentry = Send test error to Sentry +help.test.cmd.md = Open markdown rendering test page + +# ========== Admin CLI Messages ========== +admincmd.no_permission = You don't have permission. +admincmd.player_only = This command can only be used by a player. +admincmd.player_context = Player context unavailable. +admincmd.entity_not_found = Could not find player entity. +admincmd.unknown_command = Unknown admin command. Use /f admin help +admincmd.faction_not_found = Faction not found: {0} +admincmd.player_not_found = Player not found: {0} +admincmd.invalid_number = Invalid number: {0} +admincmd.amount_positive = Amount must be positive. +admincmd.balance_not_negative = Balance cannot be negative. +admincmd.error_generic = An error occurred. + +# Admin - Reload/Sync +admincmd.reload.success = Configuration reloaded. +admincmd.sync.start = Syncing faction data from disk... +admincmd.sync.complete = Sync complete: {0} factions updated, {1} members added, {2} members updated. +admincmd.sync.failed = Sync failed: {0} + +# Admin - Version +admincmd.version.title = Version Info +admincmd.version.server = Hytale Server: {0} +admincmd.version.java = Java: {0} +admincmd.version.treasury = Treasury: {0} +admincmd.version.active = Active +admincmd.version.not_found = Not Found + +# Admin - Sentry +admincmd.sentry.header = Sentry Error Reporting +admincmd.sentry.config = Config: {0} +admincmd.sentry.status = Status: {0} +admincmd.sentry.already_disabled = Sentry is already disabled. +admincmd.sentry.already_enabled = Sentry is already enabled. +admincmd.sentry.disabled = Sentry disabled and config saved. Error reporting is now off. +admincmd.sentry.enabled = Sentry enabled and config saved. Error reporting is now on. +admincmd.sentry.usage = Usage: /f admin sentry [disable|enable] +admincmd.sentry.not_initialized = Sentry is not initialized. Check config/debug.json +admincmd.sentry.test_sent = Test error sent to Sentry. Check your Sentry dashboard. +admincmd.sentry.test_failed = Failed to send test event. + +# Admin - Backup +admincmd.backup.no_permission = You don't have permission to manage backups. +admincmd.backup.creating = Creating backup... +admincmd.backup.created = Backup created successfully! +admincmd.backup.name = Name: {0} +admincmd.backup.size = Size: {0} +admincmd.backup.failed = Backup failed: {0} +admincmd.backup.none = No backups found. +admincmd.backup.header = Backups +admincmd.backup.not_found = Backup '{0}' not found. +admincmd.backup.unknown_command = Unknown backup command: {0} +admincmd.backup.usage_restore = Usage: /f admin backup restore +admincmd.backup.usage_delete = Usage: /f admin backup delete +admincmd.backup.restore_warning = WARNING: Restoring backup will overwrite current data! +admincmd.backup.restore_confirm = Type the command again within {0} seconds to confirm. +admincmd.backup.restoring = Restoring backup... +admincmd.backup.restored = Backup restored successfully! Data reloaded. +admincmd.backup.restore_failed = Restore failed: {0} +admincmd.backup.confirm_cancelled = Previous confirmation cancelled. Type again to confirm restore. +admincmd.backup.deleted = Deleted backup '{0}' +admincmd.backup.delete_failed = Failed to delete backup. + +# Admin - Debug +admincmd.debug.no_permission = You don't have permission to use debug commands. +admincmd.debug.unknown_command = Unknown debug command: {0} +admincmd.debug.player_only = This debug command can only be used by a player. +admincmd.debug.toggle_set = Debug category '{0}' set to {1} (saved) +admincmd.debug.all_enabled = All debug categories enabled. +admincmd.debug.all_disabled = All debug categories disabled. +admincmd.debug.unknown_category = Unknown category: {0} +admincmd.debug.not_implemented = Debug {0} info not yet implemented. + +# Admin - Economy +admincmd.econ.disabled = Economy system is not enabled. +admincmd.econ.unknown_command = Unknown economy command. Use /f admin economy help +admincmd.econ.set = Set {0}'s balance to {1} (was {2}) +admincmd.econ.added = Added {0} to {1} (balance: {2}) +admincmd.econ.deducted = Deducted {0} from {1} (balance: {2}) +admincmd.econ.reset = Reset {0}'s balance to {1} (was {2}) +admincmd.econ.failed = Failed: {0} +admincmd.econ.total_header = Server Economy Statistics +admincmd.econ.upkeep_disabled = Upkeep system is not enabled. +admincmd.econ.upkeep_trigger = Manually triggering upkeep collection... +admincmd.econ.upkeep_complete = Upkeep collection completed. Check server log for details. +admincmd.econ.upkeep_failed = Upkeep collection failed: {0} + +# Admin - Power +admincmd.power.no_permission = You don't have permission. +admincmd.power.unknown_command = Unknown power command. Use /f admin power help +admincmd.power.max_positive = Max power must be positive. +admincmd.power.faction_unknown_action = Unknown faction power action. Use: set, add, remove, reset + +# Admin - Clear History +admincmd.history.no_data = No player data found for {0}. +admincmd.history.empty = {0} has no membership history. +admincmd.history.cleared = Cleared {0} history records for {1}. +admincmd.history.cleared_reinit = Cleared {0} history records for {1} (re-initialized with current faction: {2}). + +# Admin - Zone +admincmd.zone.created = Created {0} '{1}' at {2}, {3} +admincmd.zone.chunk_claimed = Cannot create zone: This chunk is claimed by a faction. +admincmd.zone.already_exists = A zone already exists at this location. +admincmd.zone.name_taken = A zone with that name already exists. +admincmd.zone.not_found = Zone '{0}' not found. +admincmd.zone.unclaimed = Unclaimed chunk from zone. +admincmd.zone.no_chunk = No zone chunk found at this location. +admincmd.zone.none = No zones defined. +admincmd.zone.deleted = Deleted zone '{0}' ({1} chunks released) +admincmd.zone.renamed = Renamed zone '{0}' to '{1}' +admincmd.zone.invalid_type = Invalid zone type. Use 'safe' or 'war' +admincmd.zone.invalid_name = Invalid zone name. Must be 1-32 characters. +admincmd.zone.claimed_radius = Claimed {0} chunks for zone '{1}' +admincmd.zone.no_chunks_claimed = No chunks could be claimed (all occupied or already in zone). +admincmd.zone.unknown_command = Unknown zone command. Use /f admin help +admincmd.zone.chunk_has_zone = This chunk already belongs to another zone. +admincmd.zone.chunk_has_faction = This chunk is claimed by a faction. +admincmd.zone.notify_set = Zone '{0}' entry notification {1} +admincmd.zone.title_set = Set {0} title for zone '{1}' to: {2} +admincmd.zone.title_cleared = Cleared {0} title for zone '{1}' (using default) +admincmd.zone.no_zone_at = No zone at your location. Stand in a zone to manage flags. +admincmd.zone.flag_cleared = Cleared flag '{0}' (now using default: {1}) +admincmd.zone.flag_set = Set flag '{0}' to {1} +admincmd.zone.flag_invalid = Invalid flag: {0} +admincmd.zone.flags_cleared = Cleared all custom flags for '{0}' - now using zone type defaults. + +# Admin - World +admincmd.world.unknown_command = Unknown world command. Use /f admin world help +admincmd.world.no_settings = No per-world settings configured. +admincmd.world.unknown_setting = Unknown setting: {0} +admincmd.world.set = Set {0}={1} for world {2} +admincmd.world.reset = Removed per-world settings for: {0} +admincmd.world.not_found = No settings found for world: {0} + +# Admin - Map/Decay +admincmd.map.not_available = World map service is not available. +admincmd.map.refreshing = Forcing full world map refresh... +admincmd.map.refreshed = World map refresh complete. +admincmd.map.unknown_command = Unknown map command: {0} +admincmd.decay.disabled = Claim decay is disabled in config. +admincmd.decay.running = Running claim decay check... +admincmd.decay.complete = Claim decay check complete. Check console for details. +admincmd.decay.unknown_command = Unknown decay command: {0} + +# Admin - Update +admincmd.update.not_available = Update checker is not available. +admincmd.update.checking = Checking for updates... +admincmd.update.up_to_date = Plugin is already up-to-date (v{0}) +admincmd.update.available = Update available: v{0} +admincmd.update.unknown_target = Unknown update target: {0} + +# Admin - Import +admincmd.import.unknown_source = Unknown import source: {0} +admincmd.import.importing = Importing from {0}... +admincmd.import.complete = {0} import {1}complete! +admincmd.import.failed = {0} import failed with errors: + +# Admin - Update Notifications (login messages) +admincmd.update_notify.new_version = [HyperFactions] A new version is available! +admincmd.update_notify.version_info = Current: v{0} -> Latest: v{1} +admincmd.update_notify.instruction = Run /f admin update to update the plugin. +admincmd.update_notify.up_to_date = [HyperFactions] Plugin is up-to-date (v{0}) + +# Admin - Update Download Flow +admincmd.update.no_info = No update information available. +admincmd.update.creating_backup = Creating pre-update backup... +admincmd.update.backup_created = Backup created: {0} +admincmd.update.backup_warning = Warning: Backup failed - {0} +admincmd.update.backup_continue = Continuing with update anyway... +admincmd.update.downloading = Downloading HyperFactions v{0}... +admincmd.update.download_failed = Failed to download update. Check server logs. +admincmd.update.downloaded = Update downloaded successfully! +admincmd.update.file_label = File: {0} +admincmd.update.cleanup = Cleanup: Removed {0} old backup(s) +admincmd.update.kept_backup = Kept: {0} (for rollback) +admincmd.update.restart = Restart the server to apply the update. +admincmd.update.use_rollback = Use /f admin rollback to revert before restarting. +admincmd.update.usage_hf = /f admin update — update HyperFactions +admincmd.update.usage_mixin = /f admin update mixin — update HyperProtect-Mixin +admincmd.update.usage_toggle = /f admin update toggle-mixin-download — toggle auto-download + +# Admin - Mixin Update +admincmd.update.mixin_current = HyperProtect-Mixin: {0} +admincmd.update.mixin_up_to_date = HyperProtect-Mixin is up-to-date. +admincmd.update.mixin_none = No HyperProtect-Mixin releases available yet. +admincmd.update.mixin_available = Available: v{0} +admincmd.update.mixin_downloading = Downloading HyperProtect-Mixin v{0}... +admincmd.update.mixin_downloaded = Downloaded successfully! +admincmd.update.mixin_failed = Failed to download. Check server logs. +admincmd.update.mixin_location = Location: earlyplugins/ +admincmd.update.mixin_restart = Restart the server to apply. +admincmd.update.mixin_auto_on = HP-Mixin auto-download enabled. +admincmd.update.mixin_auto_on_desc = HyperProtect-Mixin will be downloaded automatically on next startup if not installed. +admincmd.update.mixin_auto_off = HP-Mixin auto-download disabled. +admincmd.update.mixin_auto_off_desc = Use /f admin update mixin to download manually. + +# Admin - Rollback +admincmd.rollback.no_backup = No backup JAR found to rollback to. +admincmd.rollback.unsafe = Cannot automatically rollback! +admincmd.rollback.unsafe_reason = The server has been restarted since the last update. +admincmd.rollback.unsafe_migration = Config/data migrations may have been applied. +admincmd.rollback.instructions = To rollback safely, you must: +admincmd.rollback.find_backup = Use /f admin backup list to find the pre-update backup. +admincmd.rollback.rolling = Rolling back update... +admincmd.rollback.from = From: v{0} (new) +admincmd.rollback.to = To: v{0} (previous) +admincmd.rollback.version = Rolling back to v{0}... +admincmd.rollback.success = Rollback successful! +admincmd.rollback.restored = Restored: {0} +admincmd.rollback.removed = Removed: {0} +admincmd.rollback.restart = Restart the server to apply the rollback. +admincmd.rollback.failed = Rollback failed: {0} + +# Admin - Zone Display +admincmd.zone.failed = Failed: {0} +admincmd.zone.failed_delete = Failed to delete zone: {0} +admincmd.zone.failed_rename = Failed to rename zone: {0} +admincmd.zone.failed_flags = Failed to clear flags. +admincmd.zone.failed_flag = Failed to set flag. +admincmd.zone.list_header = Zones ({0}) +admincmd.zone.info_header = Zone: {0} +admincmd.zone.info_notify = Notify: {0} +admincmd.zone.info_upper_title = Upper title: {0} +admincmd.zone.info_lower_title = Lower title: {0} +admincmd.zone.info_custom_flags = Custom Flags: +admincmd.zone.flags_header = Zone Flags: {0} +admincmd.zone.flags_type = Zone Type: {0} +admincmd.zone.player_only = This command can only be used by a player. + +# Admin - Decay Display +admincmd.decay.status_header = Claim Decay Status +admincmd.decay.enable_hint = Set claims.decayEnabled to true to enable. +admincmd.decay.error = Error during decay: {0} +admincmd.decay.check_header = Decay Check: {0} +admincmd.decay.check_not_found = Faction '{0}' not found. +admincmd.decay.no_claims = No claims to decay. +admincmd.decay.disabled_globally = Disabled globally + +# Admin - Map/Debug Display +admincmd.map.status_header = World Map Status +admincmd.debug.status_header = Debug Logging Status +admincmd.debug.full_status_header = HyperFactions Debug Status + +# ========== Common - Shared Labels (Phase B) ========== +common.no_description = No description set. +common.member_count = {0} members +common.economy_disabled = Economy system is not enabled. + +# ========== Territory Display (Phase C1) ========== +territory.display.wilderness = Wilderness +territory.display.safezone = SafeZone +territory.display.warzone = WarZone +territory.display.unknown_faction = Unknown Faction +territory.secondary.pvp_disabled = PvP Disabled +territory.secondary.pvp_no_protection = PvP Enabled - No Protection +territory.secondary.your_territory = Your Territory +territory.secondary.faction_territory = Territory +territory.secondary.relation_territory = {0} Territory + +# ========== Announcements (Phase C3) ========== +announce.death_location = {0} died at ({1}, {2}, {3}) in {4} diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions.lang index 0354cca2..99783a8f 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions.lang @@ -451,3 +451,470 @@ teleport.mount_entry_blocked = No puedes entrar a esta zona mientras estas monta chat.display.public = Publico chat.display.faction = Faccion chat.display.ally = Aliado + +# ========== Sistema de Ayuda ========== +help.commands_label = Comandos: +help.default_footer = Usa /f para mas detalles +help.title = HyperFactions +help.description = Gestion de facciones y control de territorio + +# Secciones de ayuda +help.section.core = Principal +help.section.management = Gestion +help.section.territory = Territorio +help.section.relations = Relaciones +help.section.teleport = Teletransporte +help.section.information = Informacion +help.section.other = Otros +help.section.admin = Admin + +# Descripciones de comandos de ayuda (Principal) +help.cmd.create = Crear una faccion +help.cmd.disband = Disolver tu faccion +help.cmd.invite = Invitar a un jugador +help.cmd.accept = Aceptar una invitacion +help.cmd.request = Solicitar unirse a una faccion +help.cmd.leave = Salir de tu faccion +help.cmd.kick = Expulsar a un miembro + +# Descripciones de comandos de ayuda (Gestion) +help.cmd.rename = Renombrar tu faccion +help.cmd.desc = Establecer descripcion de la faccion +help.cmd.color = Establecer color de la faccion +help.cmd.open = Permitir que cualquiera se una +help.cmd.close = Requerir invitacion para unirse +help.cmd.promote = Promover a oficial +help.cmd.demote = Degradar a miembro +help.cmd.transfer = Transferir liderazgo + +# Descripciones de comandos de ayuda (Territorio) +help.cmd.claim = Reclamar este chunk +help.cmd.unclaim = Desreclamar este chunk +help.cmd.overclaim = Sobrereclamar territorio enemigo +help.cmd.map = Ver mapa de territorio + +# Descripciones de comandos de ayuda (Relaciones) +help.cmd.ally = Solicitar alianza +help.cmd.enemy = Declarar enemigo +help.cmd.neutral = Establecer relacion neutral + +# Descripciones de comandos de ayuda (Teletransporte) +help.cmd.home = Teletransportarse al hogar de la faccion +help.cmd.sethome = Establecer hogar de la faccion +help.cmd.stuck = Escapar de territorio enemigo + +# Descripciones de comandos de ayuda (Informacion) +help.cmd.info = Ver info de la faccion +help.cmd.list = Listar todas las facciones +help.cmd.browse = Explorar facciones (alias de list) +help.cmd.members = Ver miembros de la faccion +help.cmd.invites = Gestionar invitaciones/solicitudes +help.cmd.who = Ver info de jugador +help.cmd.power = Ver nivel de poder +help.cmd.gui = Abrir GUI de faccion +help.cmd.settings = Abrir configuracion de faccion + +# Descripciones de comandos de ayuda (Otros) +help.cmd.chat = Enviar mensaje al chat de faccion +help.cmd.chat_short = Chat de faccion (corto) + +# Descripciones de comandos de ayuda (Admin en ayuda principal) +help.cmd.admin = Abrir GUI de admin +help.cmd.admin_reload = Recargar configuracion +help.cmd.admin_sync = Sincronizar datos desde disco +help.cmd.admin_factions = Gestionar facciones +help.cmd.admin_zones = Gestionar zonas +help.cmd.admin_config = Ver/editar configuracion +help.cmd.admin_backups = Gestionar respaldos +help.cmd.admin_update = Buscar actualizaciones +help.cmd.admin_debug = Comandos de depuracion + +# Pagina de ayuda de admin +help.admin.title = Comandos de Admin +help.admin.description = Administracion del servidor +help.admin.cmd.dashboard = Abrir GUI del panel de admin +help.admin.cmd.factions = Gestionar todas las facciones +help.admin.cmd.zone = Gestion de zonas +help.admin.cmd.config = Configuracion del servidor +help.admin.cmd.backup = Gestion de respaldos +help.admin.cmd.import_cmd = Importar desde otros plugins +help.admin.cmd.update = Buscar y descargar actualizaciones +help.admin.cmd.update_mixin = Actualizar HyperProtect-Mixin +help.admin.cmd.update_toggle = Alternar auto-descarga de HP-Mixin +help.admin.cmd.rollback = Revertir a version anterior +help.admin.cmd.reload = Recargar configuracion +help.admin.cmd.sync = Sincronizar datos desde disco +help.admin.cmd.debug = Comandos de depuracion +help.admin.cmd.decay = Gestion de deterioro de reclamos +help.admin.cmd.map = Gestion del mapa mundial +help.admin.cmd.safezone = Crear SafeZone + reclamar chunk +help.admin.cmd.warzone = Crear WarZone + reclamar chunk +help.admin.cmd.removezone = Desreclamar chunk de zona +help.admin.cmd.zoneflag = Establecer flag de zona +help.admin.cmd.integrations = Resumen de todas las integraciones +help.admin.cmd.integration = Estado detallado de integracion +help.admin.cmd.clearhistory = Limpiar historial de membresia del jugador +help.admin.cmd.power = Gestion de poder (admin) +help.admin.cmd.economy = Gestion de economia/tesoreria +help.admin.cmd.economy_upkeep = Ejecutar cobro de mantenimiento manualmente +help.admin.cmd.info = Ver GUI de info de faccion (admin) +help.admin.cmd.who = Ver GUI de info de jugador (admin) +help.admin.cmd.log = Ver registro de actividad global +help.admin.cmd.world = Gestion de configuracion por mundo +help.admin.cmd.version = Ver version del mod y estado de integraciones +help.admin.cmd.sentry = Ver estado de Sentry +help.admin.cmd.sentry_disable = Desactivar reporte de errores de Sentry +help.admin.cmd.sentry_enable = Activar reporte de errores de Sentry +help.admin.cmd.test_gui = Abrir pagina de prueba de elementos UI +help.admin.cmd.test_sentry = Enviar error de prueba a Sentry +help.admin.cmd.test_md = Abrir pagina de prueba de renderizado markdown + +# Sub-ayuda: Respaldos +help.backup.title = Gestion de Respaldos +help.backup.description = Esquema de rotacion GFS +help.backup.cmd.create = Crear respaldo manual +help.backup.cmd.list = Listar todos los respaldos agrupados por tipo +help.backup.cmd.restore = Restaurar desde respaldo (requiere confirmacion) +help.backup.cmd.delete = Eliminar un respaldo + +# Sub-ayuda: Depuracion +help.debug.title = Comandos de Depuracion +help.debug.description = Diagnosticos y solucion de problemas +help.debug.cmd.toggle = Alternar registro de depuracion +help.debug.cmd.status = Mostrar estado de depuracion +help.debug.cmd.power = Mostrar detalles de poder +help.debug.cmd.claim = Mostrar info de reclamo +help.debug.cmd.protection = Mostrar info de proteccion +help.debug.cmd.combat = Mostrar estado de etiqueta de combate +help.debug.cmd.relation = Mostrar info de relacion + +# Sub-ayuda: Poder +help.power.title = Poder (Admin) +help.power.description = Gestionar poder de jugador/faccion +help.power.cmd.set = Establecer poder exacto +help.power.cmd.add = Aumentar poder +help.power.cmd.remove = Disminuir poder +help.power.cmd.reset = Restablecer al valor predeterminado +help.power.cmd.setmax = Establecer limite maximo de poder +help.power.cmd.resetmax = Eliminar limite maximo +help.power.cmd.noloss = Alternar inmunidad a perdida de poder +help.power.cmd.nodecay = Alternar exencion de deterioro de reclamos +help.power.cmd.faction = Operaciones a nivel de faccion +help.power.cmd.info = Mostrar detalles de poder del jugador + +# Sub-ayuda: Economia +help.economy.title = Economia (Admin) +help.economy.description = Gestionar tesorerias de facciones +help.economy.cmd.balance = Mostrar saldo de la faccion +help.economy.cmd.set = Establecer saldo exacto +help.economy.cmd.add = Agregar al saldo +help.economy.cmd.take = Deducir del saldo +help.economy.cmd.total = Mostrar saldo total del servidor +help.economy.cmd.reset = Restablecer saldo a 0 +help.economy.cmd.upkeep = Ejecutar cobro de mantenimiento manualmente + +# Sub-ayuda: Mundo +help.world.title = Configuracion de Mundo +help.world.description = Configuracion por mundo +help.world.cmd.list = Listar todos los mundos configurados +help.world.cmd.info = Mostrar configuracion de un mundo +help.world.cmd.set = Establecer una configuracion de mundo +help.world.cmd.reset = Eliminar configuracion especifica de mundo + +# Sub-ayuda: Mapa +help.map.title = Mapa Mundial +help.map.description = Gestion de superposicion de mapa +help.map.cmd.status = Mostrar estado y estadisticas del mapa +help.map.cmd.refresh = Forzar actualizacion inmediata del mapa + +# Sub-ayuda: Deterioro +help.decay.title = Deterioro de Reclamos +help.decay.description = Elimina automaticamente reclamos de facciones inactivas +help.decay.cmd.status = Mostrar estado de deterioro +help.decay.cmd.run = Ejecutar deterioro de reclamos manualmente +help.decay.cmd.check = Verificar estado de deterioro de una faccion + +# Sub-ayuda: Importar +help.import.title = Comandos de Importacion +help.import.description = Migrar desde otros plugins de facciones +help.import.cmd.hyfactions = Importar desde HyFactions +help.import.path.hyfactions = Ruta predeterminada: mods/Kaws_Hyfaction +help.import.cmd.elbaphfactions = Importar desde ElbaphFactions +help.import.path.elbaphfactions = Ruta predeterminada: mods/ElbaphFactions +help.import.cmd.factionsx = Importar desde FactionsX +help.import.path.factionsx = Ruta predeterminada: mods/FactionsX +help.import.cmd.simpleclaims = Importar desde SimpleClaims +help.import.path.simpleclaims = Ruta predeterminada: Server/universe/SimpleClaims +help.import.flags_header = Flags: +help.import.flag.dryrun = Simular sin cambios +help.import.flag.overwrite = Reemplazar facciones existentes +help.import.flag.nozones = Omitir importacion de zonas +help.import.flag.nopower = Omitir distribucion de poder + +# Sub-ayuda: Pruebas +help.test.title = Comandos de Prueba +help.test.description = Herramientas de prueba para desarrollo +help.test.cmd.gui = Abrir pagina de prueba de elementos UI +help.test.cmd.sentry = Enviar error de prueba a Sentry +help.test.cmd.md = Abrir pagina de prueba de renderizado markdown + +# ========== Mensajes CLI de Admin ========== +admincmd.no_permission = No tienes permiso. +admincmd.player_only = Este comando solo puede ser usado por un jugador. +admincmd.player_context = Contexto de jugador no disponible. +admincmd.entity_not_found = No se pudo encontrar la entidad del jugador. +admincmd.unknown_command = Comando de admin desconocido. Usa /f admin help +admincmd.faction_not_found = Faccion no encontrada: {0} +admincmd.player_not_found = Jugador no encontrado: {0} +admincmd.invalid_number = Numero invalido: {0} +admincmd.amount_positive = La cantidad debe ser positiva. +admincmd.balance_not_negative = El saldo no puede ser negativo. +admincmd.error_generic = Ocurrio un error. + +# Admin - Recargar/Sincronizar +admincmd.reload.success = Configuracion recargada. +admincmd.sync.start = Sincronizando datos de facciones desde disco... +admincmd.sync.complete = Sincronizacion completa: {0} facciones actualizadas, {1} miembros agregados, {2} miembros actualizados. +admincmd.sync.failed = Sincronizacion fallida: {0} + +# Admin - Version +admincmd.version.title = Info de Version +admincmd.version.server = Hytale Server: {0} +admincmd.version.java = Java: {0} +admincmd.version.treasury = Tesoreria: {0} +admincmd.version.active = Activo +admincmd.version.not_found = No encontrado + +# Admin - Sentry +admincmd.sentry.header = Reporte de Errores Sentry +admincmd.sentry.config = Config: {0} +admincmd.sentry.status = Estado: {0} +admincmd.sentry.already_disabled = Sentry ya esta desactivado. +admincmd.sentry.already_enabled = Sentry ya esta activado. +admincmd.sentry.disabled = Sentry desactivado y configuracion guardada. El reporte de errores esta desactivado. +admincmd.sentry.enabled = Sentry activado y configuracion guardada. El reporte de errores esta activado. +admincmd.sentry.usage = Uso: /f admin sentry [disable|enable] +admincmd.sentry.not_initialized = Sentry no esta inicializado. Revisa config/debug.json +admincmd.sentry.test_sent = Error de prueba enviado a Sentry. Revisa tu panel de Sentry. +admincmd.sentry.test_failed = No se pudo enviar el evento de prueba. + +# Admin - Respaldos +admincmd.backup.no_permission = No tienes permiso para gestionar respaldos. +admincmd.backup.creating = Creando respaldo... +admincmd.backup.created = Respaldo creado exitosamente! +admincmd.backup.name = Nombre: {0} +admincmd.backup.size = Tamano: {0} +admincmd.backup.failed = Respaldo fallido: {0} +admincmd.backup.none = No se encontraron respaldos. +admincmd.backup.header = Respaldos +admincmd.backup.not_found = Respaldo '{0}' no encontrado. +admincmd.backup.unknown_command = Comando de respaldo desconocido: {0} +admincmd.backup.usage_restore = Uso: /f admin backup restore +admincmd.backup.usage_delete = Uso: /f admin backup delete +admincmd.backup.restore_warning = ADVERTENCIA: Restaurar un respaldo sobreescribira los datos actuales! +admincmd.backup.restore_confirm = Escribe el comando de nuevo en los proximos {0} segundos para confirmar. +admincmd.backup.restoring = Restaurando respaldo... +admincmd.backup.restored = Respaldo restaurado exitosamente! Datos recargados. +admincmd.backup.restore_failed = Restauracion fallida: {0} +admincmd.backup.confirm_cancelled = Confirmacion anterior cancelada. Escribe de nuevo para confirmar la restauracion. +admincmd.backup.deleted = Respaldo '{0}' eliminado +admincmd.backup.delete_failed = No se pudo eliminar el respaldo. + +# Admin - Depuracion +admincmd.debug.no_permission = No tienes permiso para usar comandos de depuracion. +admincmd.debug.unknown_command = Comando de depuracion desconocido: {0} +admincmd.debug.player_only = Este comando de depuracion solo puede ser usado por un jugador. +admincmd.debug.toggle_set = Categoria de depuracion '{0}' establecida a {1} (guardado) +admincmd.debug.all_enabled = Todas las categorias de depuracion activadas. +admincmd.debug.all_disabled = Todas las categorias de depuracion desactivadas. +admincmd.debug.unknown_category = Categoria desconocida: {0} +admincmd.debug.not_implemented = Info de depuracion {0} aun no implementada. + +# Admin - Economia +admincmd.econ.disabled = El sistema de economia no esta activado. +admincmd.econ.unknown_command = Comando de economia desconocido. Usa /f admin economy help +admincmd.econ.set = Saldo de {0} establecido a {1} (era {2}) +admincmd.econ.added = {0} agregado a {1} (saldo: {2}) +admincmd.econ.deducted = {0} deducido de {1} (saldo: {2}) +admincmd.econ.reset = Saldo de {0} restablecido a {1} (era {2}) +admincmd.econ.failed = Fallido: {0} +admincmd.econ.total_header = Estadisticas de Economia del Servidor +admincmd.econ.upkeep_disabled = El sistema de mantenimiento no esta activado. +admincmd.econ.upkeep_trigger = Ejecutando cobro de mantenimiento manualmente... +admincmd.econ.upkeep_complete = Cobro de mantenimiento completado. Revisa el registro del servidor para detalles. +admincmd.econ.upkeep_failed = Cobro de mantenimiento fallido: {0} + +# Admin - Poder +admincmd.power.no_permission = No tienes permiso. +admincmd.power.unknown_command = Comando de poder desconocido. Usa /f admin power help +admincmd.power.max_positive = El poder maximo debe ser positivo. +admincmd.power.faction_unknown_action = Accion de poder de faccion desconocida. Usa: set, add, remove, reset + +# Admin - Limpiar Historial +admincmd.history.no_data = No se encontraron datos de jugador para {0}. +admincmd.history.empty = {0} no tiene historial de membresia. +admincmd.history.cleared = {0} registros de historial borrados para {1}. +admincmd.history.cleared_reinit = {0} registros de historial borrados para {1} (reinicializado con faccion actual: {2}). + +# Admin - Zona +admincmd.zone.created = {0} '{1}' creada en {2}, {3} +admincmd.zone.chunk_claimed = No se puede crear zona: Este chunk esta reclamado por una faccion. +admincmd.zone.already_exists = Ya existe una zona en esta ubicacion. +admincmd.zone.name_taken = Ya existe una zona con ese nombre. +admincmd.zone.not_found = Zona '{0}' no encontrada. +admincmd.zone.unclaimed = Chunk desreclamado de la zona. +admincmd.zone.no_chunk = No se encontro chunk de zona en esta ubicacion. +admincmd.zone.none = No hay zonas definidas. +admincmd.zone.deleted = Zona '{0}' eliminada ({1} chunks liberados) +admincmd.zone.renamed = Zona '{0}' renombrada a '{1}' +admincmd.zone.invalid_type = Tipo de zona invalido. Usa 'safe' o 'war' +admincmd.zone.invalid_name = Nombre de zona invalido. Debe tener entre 1 y 32 caracteres. +admincmd.zone.claimed_radius = {0} chunks reclamados para la zona '{1}' +admincmd.zone.no_chunks_claimed = No se pudieron reclamar chunks (todos ocupados o ya pertenecen a una zona). +admincmd.zone.unknown_command = Comando de zona desconocido. Usa /f admin help +admincmd.zone.chunk_has_zone = Este chunk ya pertenece a otra zona. +admincmd.zone.chunk_has_faction = Este chunk esta reclamado por una faccion. +admincmd.zone.notify_set = Notificacion de entrada a zona '{0}' {1} +admincmd.zone.title_set = Titulo {0} de zona '{1}' establecido a: {2} +admincmd.zone.title_cleared = Titulo {0} de zona '{1}' borrado (usando predeterminado) +admincmd.zone.no_zone_at = No hay zona en tu ubicacion. Sitúate en una zona para gestionar flags. +admincmd.zone.flag_cleared = Flag '{0}' borrado (ahora usando predeterminado: {1}) +admincmd.zone.flag_set = Flag '{0}' establecido a {1} +admincmd.zone.flag_invalid = Flag invalido: {0} +admincmd.zone.flags_cleared = Todos los flags personalizados de '{0}' borrados - ahora usando valores predeterminados del tipo de zona. + +# Admin - Mundo +admincmd.world.unknown_command = Comando de mundo desconocido. Usa /f admin world help +admincmd.world.no_settings = No hay configuracion por mundo definida. +admincmd.world.unknown_setting = Configuracion desconocida: {0} +admincmd.world.set = {0}={1} establecido para el mundo {2} +admincmd.world.reset = Configuracion por mundo eliminada para: {0} +admincmd.world.not_found = No se encontro configuracion para el mundo: {0} + +# Admin - Mapa/Deterioro +admincmd.map.not_available = El servicio de mapa mundial no esta disponible. +admincmd.map.refreshing = Forzando actualizacion completa del mapa... +admincmd.map.refreshed = Actualizacion del mapa completada. +admincmd.map.unknown_command = Comando de mapa desconocido: {0} +admincmd.decay.disabled = El deterioro de reclamos esta desactivado en la configuracion. +admincmd.decay.running = Ejecutando verificacion de deterioro de reclamos... +admincmd.decay.complete = Verificacion de deterioro completada. Revisa la consola para detalles. +admincmd.decay.unknown_command = Comando de deterioro desconocido: {0} + +# Admin - Actualizacion +admincmd.update.not_available = El verificador de actualizaciones no esta disponible. +admincmd.update.checking = Buscando actualizaciones... +admincmd.update.up_to_date = El plugin ya esta actualizado (v{0}) +admincmd.update.available = Actualizacion disponible: v{0} +admincmd.update.unknown_target = Objetivo de actualizacion desconocido: {0} + +# Admin - Importar +admincmd.import.unknown_source = Fuente de importacion desconocida: {0} +admincmd.import.importing = Importando desde {0}... +admincmd.import.complete = Importacion de {0} {1}completada! +admincmd.import.failed = Importacion de {0} fallida con errores: + +# Admin - Update Notifications (login messages) +admincmd.update_notify.new_version = [HyperFactions] ¡Una nueva versión está disponible! +admincmd.update_notify.version_info = Actual: v{0} -> Última: v{1} +admincmd.update_notify.instruction = Ejecuta /f admin update para actualizar el plugin. +admincmd.update_notify.up_to_date = [HyperFactions] El plugin está actualizado (v{0}) + +# Admin - Update Download Flow +admincmd.update.no_info = No hay información de actualización disponible. +admincmd.update.creating_backup = Creando respaldo pre-actualización... +admincmd.update.backup_created = Respaldo creado: {0} +admincmd.update.backup_warning = Advertencia: Respaldo falló - {0} +admincmd.update.backup_continue = Continuando con la actualización de todos modos... +admincmd.update.downloading = Descargando HyperFactions v{0}... +admincmd.update.download_failed = Error al descargar. Revisa los registros del servidor. +admincmd.update.downloaded = ¡Actualización descargada exitosamente! +admincmd.update.file_label = Archivo: {0} +admincmd.update.cleanup = Limpieza: {0} respaldo(s) antiguo(s) eliminado(s) +admincmd.update.kept_backup = Conservado: {0} (para reversión) +admincmd.update.restart = Reinicia el servidor para aplicar la actualización. +admincmd.update.use_rollback = Usa /f admin rollback para revertir antes de reiniciar. +admincmd.update.usage_hf = /f admin update — actualizar HyperFactions +admincmd.update.usage_mixin = /f admin update mixin — actualizar HyperProtect-Mixin +admincmd.update.usage_toggle = /f admin update toggle-mixin-download — alternar descarga automática + +# Admin - Mixin Update +admincmd.update.mixin_current = HyperProtect-Mixin: {0} +admincmd.update.mixin_up_to_date = HyperProtect-Mixin está actualizado. +admincmd.update.mixin_none = Aún no hay versiones de HyperProtect-Mixin disponibles. +admincmd.update.mixin_available = Disponible: v{0} +admincmd.update.mixin_downloading = Descargando HyperProtect-Mixin v{0}... +admincmd.update.mixin_downloaded = ¡Descargado exitosamente! +admincmd.update.mixin_failed = Error al descargar. Revisa los registros del servidor. +admincmd.update.mixin_location = Ubicación: earlyplugins/ +admincmd.update.mixin_restart = Reinicia el servidor para aplicar. +admincmd.update.mixin_auto_on = Descarga automática de HP-Mixin activada. +admincmd.update.mixin_auto_on_desc = HyperProtect-Mixin se descargará automáticamente en el próximo inicio si no está instalado. +admincmd.update.mixin_auto_off = Descarga automática de HP-Mixin desactivada. +admincmd.update.mixin_auto_off_desc = Usa /f admin update mixin para descargar manualmente. + +# Admin - Rollback +admincmd.rollback.no_backup = No se encontró JAR de respaldo para revertir. +admincmd.rollback.unsafe = ¡No se puede revertir automáticamente! +admincmd.rollback.unsafe_reason = El servidor ha sido reiniciado desde la última actualización. +admincmd.rollback.unsafe_migration = Es posible que se hayan aplicado migraciones de configuración/datos. +admincmd.rollback.instructions = Para revertir de forma segura, debes: +admincmd.rollback.find_backup = Usa /f admin backup list para encontrar el respaldo pre-actualización. +admincmd.rollback.rolling = Revirtiendo actualización... +admincmd.rollback.from = Desde: v{0} (nueva) +admincmd.rollback.to = Hacia: v{0} (anterior) +admincmd.rollback.version = Revirtiendo a v{0}... +admincmd.rollback.success = ¡Reversión exitosa! +admincmd.rollback.restored = Restaurado: {0} +admincmd.rollback.removed = Eliminado: {0} +admincmd.rollback.restart = Reinicia el servidor para aplicar la reversión. +admincmd.rollback.failed = Reversión fallida: {0} + +# Admin - Zone Display +admincmd.zone.failed = Falló: {0} +admincmd.zone.failed_delete = Error al eliminar zona: {0} +admincmd.zone.failed_rename = Error al renombrar zona: {0} +admincmd.zone.failed_flags = Error al limpiar flags. +admincmd.zone.failed_flag = Error al establecer flag. +admincmd.zone.list_header = Zonas ({0}) +admincmd.zone.info_header = Zona: {0} +admincmd.zone.info_notify = Notificación: {0} +admincmd.zone.info_upper_title = Título superior: {0} +admincmd.zone.info_lower_title = Título inferior: {0} +admincmd.zone.info_custom_flags = Flags personalizados: +admincmd.zone.flags_header = Flags de Zona: {0} +admincmd.zone.flags_type = Tipo de Zona: {0} +admincmd.zone.player_only = Este comando solo puede ser usado por un jugador. + +# Admin - Decay Display +admincmd.decay.status_header = Estado de Deterioro de Territorios +admincmd.decay.enable_hint = Establece claims.decayEnabled en true para activar. +admincmd.decay.error = Error durante el deterioro: {0} +admincmd.decay.check_header = Verificación de Deterioro: {0} +admincmd.decay.check_not_found = Facción '{0}' no encontrada. +admincmd.decay.no_claims = No hay territorios que deteriorar. +admincmd.decay.disabled_globally = Desactivado globalmente + +# Admin - Map/Debug Display +admincmd.map.status_header = Estado del Mapa Mundial +admincmd.debug.status_header = Estado de Registro de Depuración +admincmd.debug.full_status_header = Estado de Depuración de HyperFactions + +# ========== Common - Shared Labels ========== +common.no_description = Sin descripción establecida. +common.member_count = {0} miembros +common.economy_disabled = El sistema económico no está habilitado. + +# ========== Territory Display ========== +territory.display.wilderness = Tierras Salvajes +territory.display.safezone = Zona Segura +territory.display.warzone = Zona de Guerra +territory.display.unknown_faction = Facción Desconocida +territory.secondary.pvp_disabled = PvP Desactivado +territory.secondary.pvp_no_protection = PvP Activado - Sin Protección +territory.secondary.your_territory = Tu Territorio +territory.secondary.faction_territory = Territorio +territory.secondary.relation_territory = Territorio de {0} + +# ========== Announcements ========== +announce.death_location = {0} murió en ({1}, {2}, {3}) en {4} diff --git a/src/main/resources/Server/Languages/fr-FR/hyperfactions.lang b/src/main/resources/Server/Languages/fr-FR/hyperfactions.lang index 77ab5767..6d3a878c 100644 --- a/src/main/resources/Server/Languages/fr-FR/hyperfactions.lang +++ b/src/main/resources/Server/Languages/fr-FR/hyperfactions.lang @@ -451,3 +451,470 @@ teleport.mount_entry_blocked = Vous ne pouvez pas entrer dans cette zone en éta chat.display.public = Public chat.display.faction = Faction chat.display.ally = Allié + +# ========== Système d'Aide ========== +help.commands_label = Commandes : +help.default_footer = Utilisez /f pour plus de détails +help.title = HyperFactions +help.description = Gestion de factions et contrôle de territoire + +# Sections d'aide +help.section.core = Fondamentaux +help.section.management = Gestion +help.section.territory = Territoire +help.section.relations = Relations +help.section.teleport = Téléportation +help.section.information = Information +help.section.other = Divers +help.section.admin = Admin + +# Descriptions des commandes d'aide (Fondamentaux) +help.cmd.create = Créer une faction +help.cmd.disband = Dissoudre votre faction +help.cmd.invite = Inviter un joueur +help.cmd.accept = Accepter une invitation +help.cmd.request = Demander à rejoindre une faction +help.cmd.leave = Quitter votre faction +help.cmd.kick = Exclure un membre + +# Descriptions des commandes d'aide (Gestion) +help.cmd.rename = Renommer votre faction +help.cmd.desc = Définir la description de la faction +help.cmd.color = Définir la couleur de la faction +help.cmd.open = Permettre à tous de rejoindre +help.cmd.close = Exiger une invitation pour rejoindre +help.cmd.promote = Promouvoir au rang d'officier +help.cmd.demote = Rétrograder au rang de membre +help.cmd.transfer = Transférer le commandement + +# Descriptions des commandes d'aide (Territoire) +help.cmd.claim = Revendiquer ce chunk +help.cmd.unclaim = Abandonner ce chunk +help.cmd.overclaim = Surrevendiquer un territoire ennemi +help.cmd.map = Afficher la carte du territoire + +# Descriptions des commandes d'aide (Relations) +help.cmd.ally = Demander une alliance +help.cmd.enemy = Déclarer ennemi +help.cmd.neutral = Définir une relation neutre + +# Descriptions des commandes d'aide (Téléportation) +help.cmd.home = Se téléporter au foyer de la faction +help.cmd.sethome = Définir le foyer de la faction +help.cmd.stuck = S'échapper du territoire ennemi + +# Descriptions des commandes d'aide (Information) +help.cmd.info = Voir les infos de la faction +help.cmd.list = Lister toutes les factions +help.cmd.browse = Parcourir les factions (alias de list) +help.cmd.members = Voir les membres de la faction +help.cmd.invites = Gérer les invitations/demandes +help.cmd.who = Voir les infos d'un joueur +help.cmd.power = Voir le niveau de puissance +help.cmd.gui = Ouvrir la GUI de faction +help.cmd.settings = Ouvrir les paramètres de faction + +# Descriptions des commandes d'aide (Divers) +help.cmd.chat = Envoyer un message dans le chat faction +help.cmd.chat_short = Chat faction (court) + +# Descriptions des commandes d'aide (Admin dans l'aide principale) +help.cmd.admin = Ouvrir la GUI admin +help.cmd.admin_reload = Recharger la configuration +help.cmd.admin_sync = Synchroniser les données depuis le disque +help.cmd.admin_factions = Gérer les factions +help.cmd.admin_zones = Gérer les zones +help.cmd.admin_config = Voir/modifier la configuration +help.cmd.admin_backups = Gérer les sauvegardes +help.cmd.admin_update = Vérifier les mises à jour +help.cmd.admin_debug = Commandes de débogage + +# Page d'aide admin +help.admin.title = Commandes Admin +help.admin.description = Administration du serveur +help.admin.cmd.dashboard = Ouvrir la GUI du tableau de bord admin +help.admin.cmd.factions = Gérer toutes les factions +help.admin.cmd.zone = Gestion des zones +help.admin.cmd.config = Configuration du serveur +help.admin.cmd.backup = Gestion des sauvegardes +help.admin.cmd.import_cmd = Importer depuis d'autres plugins +help.admin.cmd.update = Vérifier et télécharger les mises à jour +help.admin.cmd.update_mixin = Mettre à jour HyperProtect-Mixin +help.admin.cmd.update_toggle = Activer/désactiver le téléchargement auto de HP-Mixin +help.admin.cmd.rollback = Revenir à une version précédente +help.admin.cmd.reload = Recharger la configuration +help.admin.cmd.sync = Synchroniser les données depuis le disque +help.admin.cmd.debug = Commandes de débogage +help.admin.cmd.decay = Gestion de la dégradation des revendications +help.admin.cmd.map = Gestion de la carte du monde +help.admin.cmd.safezone = Créer une SafeZone + revendiquer le chunk +help.admin.cmd.warzone = Créer une WarZone + revendiquer le chunk +help.admin.cmd.removezone = Retirer un chunk d'une zone +help.admin.cmd.zoneflag = Définir un flag de zone +help.admin.cmd.integrations = Résumé de toutes les intégrations +help.admin.cmd.integration = Statut détaillé d'une intégration +help.admin.cmd.clearhistory = Effacer l'historique d'appartenance d'un joueur +help.admin.cmd.power = Gestion de la puissance (admin) +help.admin.cmd.economy = Gestion de l'économie/trésorerie +help.admin.cmd.economy_upkeep = Déclencher manuellement la collecte d'entretien +help.admin.cmd.info = Voir la GUI d'info faction (admin) +help.admin.cmd.who = Voir la GUI d'info joueur (admin) +help.admin.cmd.log = Voir le journal d'activité global +help.admin.cmd.world = Gestion des paramètres par monde +help.admin.cmd.version = Voir la version du mod et le statut des intégrations +help.admin.cmd.sentry = Voir le statut de Sentry +help.admin.cmd.sentry_disable = Désactiver le rapport d'erreurs Sentry +help.admin.cmd.sentry_enable = Activer le rapport d'erreurs Sentry +help.admin.cmd.test_gui = Ouvrir la page de test des éléments UI +help.admin.cmd.test_sentry = Envoyer une erreur de test à Sentry +help.admin.cmd.test_md = Ouvrir la page de test du rendu markdown + +# Sous-aide : Sauvegarde +help.backup.title = Gestion des Sauvegardes +help.backup.description = Schéma de rotation GFS +help.backup.cmd.create = Créer une sauvegarde manuelle +help.backup.cmd.list = Lister toutes les sauvegardes groupées par type +help.backup.cmd.restore = Restaurer depuis une sauvegarde (confirmation requise) +help.backup.cmd.delete = Supprimer une sauvegarde + +# Sous-aide : Débogage +help.debug.title = Commandes de Débogage +help.debug.description = Diagnostics et dépannage +help.debug.cmd.toggle = Activer/désactiver la journalisation de débogage +help.debug.cmd.status = Afficher le statut de débogage +help.debug.cmd.power = Afficher les détails de puissance +help.debug.cmd.claim = Afficher les infos de revendication +help.debug.cmd.protection = Afficher les infos de protection +help.debug.cmd.combat = Afficher le statut du marquage de combat +help.debug.cmd.relation = Afficher les infos de relation + +# Sous-aide : Puissance +help.power.title = Puissance Admin +help.power.description = Gérer la puissance des joueurs/factions +help.power.cmd.set = Définir la puissance exacte +help.power.cmd.add = Augmenter la puissance +help.power.cmd.remove = Diminuer la puissance +help.power.cmd.reset = Réinitialiser à la valeur par défaut +help.power.cmd.setmax = Définir un plafond de puissance +help.power.cmd.resetmax = Supprimer le plafond +help.power.cmd.noloss = Activer/désactiver l'immunité à la perte de puissance +help.power.cmd.nodecay = Activer/désactiver l'exemption de dégradation +help.power.cmd.faction = Opérations sur toute la faction +help.power.cmd.info = Afficher les détails de puissance du joueur + +# Sous-aide : Économie +help.economy.title = Économie Admin +help.economy.description = Gérer les trésoreries de faction +help.economy.cmd.balance = Afficher le solde de la faction +help.economy.cmd.set = Définir le solde exact +help.economy.cmd.add = Ajouter au solde +help.economy.cmd.take = Déduire du solde +help.economy.cmd.total = Afficher le solde total du serveur +help.economy.cmd.reset = Réinitialiser le solde à 0 +help.economy.cmd.upkeep = Déclencher manuellement la collecte d'entretien + +# Sous-aide : Monde +help.world.title = Paramètres du Monde +help.world.description = Configuration par monde +help.world.cmd.list = Lister tous les mondes configurés +help.world.cmd.info = Afficher les paramètres d'un monde +help.world.cmd.set = Définir un paramètre de monde +help.world.cmd.reset = Supprimer les paramètres spécifiques au monde + +# Sous-aide : Carte +help.map.title = Carte du Monde +help.map.description = Gestion de la superposition de carte +help.map.cmd.status = Afficher le statut et les statistiques de la carte +help.map.cmd.refresh = Forcer une actualisation immédiate de la carte + +# Sous-aide : Dégradation +help.decay.title = Dégradation des Revendications +help.decay.description = Supprime automatiquement les revendications des factions inactives +help.decay.cmd.status = Afficher le statut de dégradation +help.decay.cmd.run = Déclencher manuellement la dégradation +help.decay.cmd.check = Vérifier le statut de dégradation d'une faction + +# Sous-aide : Import +help.import.title = Commandes d'Import +help.import.description = Migrer depuis d'autres plugins de factions +help.import.cmd.hyfactions = Importer depuis HyFactions +help.import.path.hyfactions = Chemin par défaut : mods/Kaws_Hyfaction +help.import.cmd.elbaphfactions = Importer depuis ElbaphFactions +help.import.path.elbaphfactions = Chemin par défaut : mods/ElbaphFactions +help.import.cmd.factionsx = Importer depuis FactionsX +help.import.path.factionsx = Chemin par défaut : mods/FactionsX +help.import.cmd.simpleclaims = Importer depuis SimpleClaims +help.import.path.simpleclaims = Chemin par défaut : Server/universe/SimpleClaims +help.import.flags_header = Flags : +help.import.flag.dryrun = Simuler sans effectuer de changements +help.import.flag.overwrite = Remplacer les factions existantes +help.import.flag.nozones = Ignorer l'import des zones +help.import.flag.nopower = Ignorer la distribution de puissance + +# Sous-aide : Tests +help.test.title = Commandes de Test +help.test.description = Outils de test pour le développement +help.test.cmd.gui = Ouvrir la page de test des éléments UI +help.test.cmd.sentry = Envoyer une erreur de test à Sentry +help.test.cmd.md = Ouvrir la page de test du rendu markdown + +# ========== Messages CLI Admin ========== +admincmd.no_permission = Vous n'avez pas la permission. +admincmd.player_only = Cette commande ne peut être utilisée que par un joueur. +admincmd.player_context = Contexte joueur non disponible. +admincmd.entity_not_found = Impossible de trouver l'entité du joueur. +admincmd.unknown_command = Commande admin inconnue. Utilisez /f admin help +admincmd.faction_not_found = Faction introuvable. +admincmd.player_not_found = Joueur introuvable : {0} +admincmd.invalid_number = Nombre invalide : {0} +admincmd.amount_positive = Le montant doit être positif. +admincmd.balance_not_negative = Le solde ne peut pas être négatif. +admincmd.error_generic = Une erreur s'est produite. + +# Admin - Recharger/Synchroniser +admincmd.reload.success = Configuration rechargée. +admincmd.sync.start = Synchronisation des données de faction depuis le disque... +admincmd.sync.complete = Synchronisation terminée : {0} factions mises à jour, {1} membres ajoutés, {2} membres mis à jour. +admincmd.sync.failed = Synchronisation échouée : {0} + +# Admin - Version +admincmd.version.title = Informations de Version +admincmd.version.server = Hytale Server : {0} +admincmd.version.java = Java : {0} +admincmd.version.treasury = Trésorerie : {0} +admincmd.version.active = Actif +admincmd.version.not_found = Introuvable + +# Admin - Sentry +admincmd.sentry.header = Rapport d'Erreurs Sentry +admincmd.sentry.config = Config : {0} +admincmd.sentry.status = Statut : {0} +admincmd.sentry.already_disabled = Sentry est déjà désactivé. +admincmd.sentry.already_enabled = Sentry est déjà activé. +admincmd.sentry.disabled = Sentry désactivé et configuration sauvegardée. Le rapport d'erreurs est maintenant désactivé. +admincmd.sentry.enabled = Sentry activé et configuration sauvegardée. Le rapport d'erreurs est maintenant activé. +admincmd.sentry.usage = Utilisation : /f admin sentry [disable|enable] +admincmd.sentry.not_initialized = Sentry n'est pas initialisé. Vérifiez config/debug.json +admincmd.sentry.test_sent = Erreur de test envoyée à Sentry. Vérifiez votre tableau de bord Sentry. +admincmd.sentry.test_failed = Échec de l'envoi de l'événement de test. + +# Admin - Sauvegarde +admincmd.backup.no_permission = Vous n'avez pas la permission de gérer les sauvegardes. +admincmd.backup.creating = Création de la sauvegarde... +admincmd.backup.created = Sauvegarde créée avec succès ! +admincmd.backup.name = Nom : {0} +admincmd.backup.size = Taille : {0} +admincmd.backup.failed = Sauvegarde échouée : {0} +admincmd.backup.none = Aucune sauvegarde trouvée. +admincmd.backup.header = Sauvegardes +admincmd.backup.not_found = Sauvegarde « {0} » introuvable. +admincmd.backup.unknown_command = Commande de sauvegarde inconnue : {0} +admincmd.backup.usage_restore = Utilisation : /f admin backup restore +admincmd.backup.usage_delete = Utilisation : /f admin backup delete +admincmd.backup.restore_warning = ATTENTION : La restauration écrasera les données actuelles ! +admincmd.backup.restore_confirm = Tapez la commande à nouveau dans les {0} secondes pour confirmer. +admincmd.backup.restoring = Restauration en cours... +admincmd.backup.restored = Sauvegarde restaurée avec succès ! Données rechargées. +admincmd.backup.restore_failed = Restauration échouée : {0} +admincmd.backup.confirm_cancelled = Confirmation précédente annulée. Tapez à nouveau pour confirmer la restauration. +admincmd.backup.deleted = Sauvegarde « {0} » supprimée +admincmd.backup.delete_failed = Échec de la suppression de la sauvegarde. + +# Admin - Débogage +admincmd.debug.no_permission = Vous n'avez pas la permission d'utiliser les commandes de débogage. +admincmd.debug.unknown_command = Commande de débogage inconnue : {0} +admincmd.debug.player_only = Cette commande de débogage ne peut être utilisée que par un joueur. +admincmd.debug.toggle_set = Catégorie de débogage « {0} » définie à {1} (sauvegardé) +admincmd.debug.all_enabled = Toutes les catégories de débogage activées. +admincmd.debug.all_disabled = Toutes les catégories de débogage désactivées. +admincmd.debug.unknown_category = Catégorie inconnue : {0} +admincmd.debug.not_implemented = Info de débogage {0} pas encore implémentée. + +# Admin - Économie +admincmd.econ.disabled = Le système économique n'est pas activé. +admincmd.econ.unknown_command = Commande économique inconnue. Utilisez /f admin economy help +admincmd.econ.set = Solde de {0} défini à {1} (était {2}) +admincmd.econ.added = {0} ajouté à {1} (solde : {2}) +admincmd.econ.deducted = {0} déduit de {1} (solde : {2}) +admincmd.econ.reset = Solde de {0} réinitialisé à {1} (était {2}) +admincmd.econ.failed = Échoué : {0} +admincmd.econ.total_header = Statistiques Économiques du Serveur +admincmd.econ.upkeep_disabled = Le système d'entretien n'est pas activé. +admincmd.econ.upkeep_trigger = Déclenchement manuel de la collecte d'entretien... +admincmd.econ.upkeep_complete = Collecte d'entretien terminée. Consultez le journal du serveur pour les détails. +admincmd.econ.upkeep_failed = Collecte d'entretien échouée : {0} + +# Admin - Puissance +admincmd.power.no_permission = Vous n'avez pas la permission. +admincmd.power.unknown_command = Commande de puissance inconnue. Utilisez /f admin power help +admincmd.power.max_positive = La puissance maximale doit être positive. +admincmd.power.faction_unknown_action = Action de puissance de faction inconnue. Utilisez : set, add, remove, reset + +# Admin - Effacer l'historique +admincmd.history.no_data = Aucune donnée de joueur trouvée pour {0}. +admincmd.history.empty = {0} n'a pas d'historique d'appartenance. +admincmd.history.cleared = {0} enregistrements d'historique effacés pour {1}. +admincmd.history.cleared_reinit = {0} enregistrements d'historique effacés pour {1} (ré-initialisé avec la faction actuelle : {2}). + +# Admin - Zone +admincmd.zone.created = {0} « {1} » créée en {2}, {3} +admincmd.zone.chunk_claimed = Impossible de créer la zone : ce chunk est revendiqué par une faction. +admincmd.zone.already_exists = Une zone existe déjà à cet emplacement. +admincmd.zone.name_taken = Une zone avec ce nom existe déjà. +admincmd.zone.not_found = Zone « {0} » introuvable. +admincmd.zone.unclaimed = Chunk retiré de la zone. +admincmd.zone.no_chunk = Aucun chunk de zone trouvé à cet emplacement. +admincmd.zone.none = Aucune zone définie. +admincmd.zone.deleted = Zone « {0} » supprimée ({1} chunks libérés) +admincmd.zone.renamed = Zone « {0} » renommée en « {1} » +admincmd.zone.invalid_type = Type de zone invalide. Utilisez 'safe' ou 'war' +admincmd.zone.invalid_name = Nom de zone invalide. Doit contenir entre 1 et 32 caractères. +admincmd.zone.claimed_radius = {0} chunks revendiqués pour la zone « {1} » +admincmd.zone.no_chunks_claimed = Aucun chunk n'a pu être revendiqué (tous occupés ou déjà dans une zone). +admincmd.zone.unknown_command = Commande de zone inconnue. Utilisez /f admin help +admincmd.zone.chunk_has_zone = Ce chunk appartient déjà à une autre zone. +admincmd.zone.chunk_has_faction = Ce chunk est revendiqué par une faction. +admincmd.zone.notify_set = Notification d'entrée de la zone « {0} » {1} +admincmd.zone.title_set = Titre {0} de la zone « {1} » défini à : {2} +admincmd.zone.title_cleared = Titre {0} de la zone « {1} » effacé (utilisation du défaut) +admincmd.zone.no_zone_at = Aucune zone à votre position. Placez-vous dans une zone pour gérer les flags. +admincmd.zone.flag_cleared = Flag « {0} » effacé (valeur par défaut : {1}) +admincmd.zone.flag_set = Flag « {0} » défini à {1} +admincmd.zone.flag_invalid = Flag invalide : {0} +admincmd.zone.flags_cleared = Tous les flags personnalisés de « {0} » effacés — les valeurs par défaut du type de zone sont utilisées. + +# Admin - Monde +admincmd.world.unknown_command = Commande de monde inconnue. Utilisez /f admin world help +admincmd.world.no_settings = Aucun paramètre par monde configuré. +admincmd.world.unknown_setting = Paramètre inconnu : {0} +admincmd.world.set = {0}={1} défini pour le monde {2} +admincmd.world.reset = Paramètres spécifiques au monde supprimés pour : {0} +admincmd.world.not_found = Aucun paramètre trouvé pour le monde : {0} + +# Admin - Carte/Dégradation +admincmd.map.not_available = Le service de carte du monde n'est pas disponible. +admincmd.map.refreshing = Actualisation complète de la carte en cours... +admincmd.map.refreshed = Actualisation de la carte terminée. +admincmd.map.unknown_command = Commande de carte inconnue : {0} +admincmd.decay.disabled = La dégradation des revendications est désactivée dans la configuration. +admincmd.decay.running = Vérification de la dégradation des revendications en cours... +admincmd.decay.complete = Vérification de la dégradation terminée. Consultez la console pour les détails. +admincmd.decay.unknown_command = Commande de dégradation inconnue : {0} + +# Admin - Mise à jour +admincmd.update.not_available = Le vérificateur de mises à jour n'est pas disponible. +admincmd.update.checking = Recherche de mises à jour... +admincmd.update.up_to_date = Le plugin est déjà à jour (v{0}) +admincmd.update.available = Mise à jour disponible : v{0} +admincmd.update.unknown_target = Cible de mise à jour inconnue : {0} + +# Admin - Import +admincmd.import.unknown_source = Source d'import inconnue : {0} +admincmd.import.importing = Import depuis {0} en cours... +admincmd.import.complete = Import {0} {1}terminé ! +admincmd.import.failed = Import {0} échoué avec des erreurs : + +# Admin - Update Notifications (login messages) +admincmd.update_notify.new_version = [HyperFactions] Une nouvelle version est disponible ! +admincmd.update_notify.version_info = Actuelle : v{0} -> Dernière : v{1} +admincmd.update_notify.instruction = Exécutez /f admin update pour mettre à jour le plugin. +admincmd.update_notify.up_to_date = [HyperFactions] Le plugin est à jour (v{0}) + +# Admin - Update Download Flow +admincmd.update.no_info = Aucune information de mise à jour disponible. +admincmd.update.creating_backup = Création de la sauvegarde pré-mise à jour... +admincmd.update.backup_created = Sauvegarde créée : {0} +admincmd.update.backup_warning = Attention : Sauvegarde échouée - {0} +admincmd.update.backup_continue = Poursuite de la mise à jour malgré tout... +admincmd.update.downloading = Téléchargement de HyperFactions v{0}... +admincmd.update.download_failed = Échec du téléchargement. Vérifiez les journaux du serveur. +admincmd.update.downloaded = Mise à jour téléchargée avec succès ! +admincmd.update.file_label = Fichier : {0} +admincmd.update.cleanup = Nettoyage : {0} ancienne(s) sauvegarde(s) supprimée(s) +admincmd.update.kept_backup = Conservé : {0} (pour restauration) +admincmd.update.restart = Redémarrez le serveur pour appliquer la mise à jour. +admincmd.update.use_rollback = Utilisez /f admin rollback pour annuler avant le redémarrage. +admincmd.update.usage_hf = /f admin update — mettre à jour HyperFactions +admincmd.update.usage_mixin = /f admin update mixin — mettre à jour HyperProtect-Mixin +admincmd.update.usage_toggle = /f admin update toggle-mixin-download — basculer le téléchargement auto + +# Admin - Mixin Update +admincmd.update.mixin_current = HyperProtect-Mixin : {0} +admincmd.update.mixin_up_to_date = HyperProtect-Mixin est à jour. +admincmd.update.mixin_none = Aucune version de HyperProtect-Mixin disponible pour le moment. +admincmd.update.mixin_available = Disponible : v{0} +admincmd.update.mixin_downloading = Téléchargement de HyperProtect-Mixin v{0}... +admincmd.update.mixin_downloaded = Téléchargé avec succès ! +admincmd.update.mixin_failed = Échec du téléchargement. Vérifiez les journaux du serveur. +admincmd.update.mixin_location = Emplacement : earlyplugins/ +admincmd.update.mixin_restart = Redémarrez le serveur pour appliquer. +admincmd.update.mixin_auto_on = Téléchargement auto HP-Mixin activé. +admincmd.update.mixin_auto_on_desc = HyperProtect-Mixin sera téléchargé automatiquement au prochain démarrage s'il n'est pas installé. +admincmd.update.mixin_auto_off = Téléchargement auto HP-Mixin désactivé. +admincmd.update.mixin_auto_off_desc = Utilisez /f admin update mixin pour télécharger manuellement. + +# Admin - Rollback +admincmd.rollback.no_backup = Aucun JAR de sauvegarde trouvé pour la restauration. +admincmd.rollback.unsafe = Impossible de restaurer automatiquement ! +admincmd.rollback.unsafe_reason = Le serveur a été redémarré depuis la dernière mise à jour. +admincmd.rollback.unsafe_migration = Des migrations de configuration/données ont peut-être été appliquées. +admincmd.rollback.instructions = Pour restaurer en toute sécurité, vous devez : +admincmd.rollback.find_backup = Utilisez /f admin backup list pour trouver la sauvegarde pré-mise à jour. +admincmd.rollback.rolling = Restauration de la mise à jour... +admincmd.rollback.from = De : v{0} (nouvelle) +admincmd.rollback.to = Vers : v{0} (précédente) +admincmd.rollback.version = Restauration vers v{0}... +admincmd.rollback.success = Restauration réussie ! +admincmd.rollback.restored = Restauré : {0} +admincmd.rollback.removed = Supprimé : {0} +admincmd.rollback.restart = Redémarrez le serveur pour appliquer la restauration. +admincmd.rollback.failed = Restauration échouée : {0} + +# Admin - Zone Display +admincmd.zone.failed = Échec : {0} +admincmd.zone.failed_delete = Impossible de supprimer la zone : {0} +admincmd.zone.failed_rename = Impossible de renommer la zone : {0} +admincmd.zone.failed_flags = Impossible de réinitialiser les flags. +admincmd.zone.failed_flag = Impossible de définir le flag. +admincmd.zone.list_header = Zones ({0}) +admincmd.zone.info_header = Zone : {0} +admincmd.zone.info_notify = Notification : {0} +admincmd.zone.info_upper_title = Titre supérieur : {0} +admincmd.zone.info_lower_title = Titre inférieur : {0} +admincmd.zone.info_custom_flags = Flags personnalisés : +admincmd.zone.flags_header = Flags de Zone : {0} +admincmd.zone.flags_type = Type de Zone : {0} +admincmd.zone.player_only = Cette commande ne peut être utilisée que par un joueur. + +# Admin - Decay Display +admincmd.decay.status_header = État de Dégradation des Territoires +admincmd.decay.enable_hint = Définissez claims.decayEnabled sur true pour activer. +admincmd.decay.error = Erreur lors de la dégradation : {0} +admincmd.decay.check_header = Vérification de Dégradation : {0} +admincmd.decay.check_not_found = Faction '{0}' introuvable. +admincmd.decay.no_claims = Aucun territoire à dégrader. +admincmd.decay.disabled_globally = Désactivé globalement + +# Admin - Map/Debug Display +admincmd.map.status_header = État de la Carte du Monde +admincmd.debug.status_header = État de Journalisation de Débogage +admincmd.debug.full_status_header = État de Débogage HyperFactions + +# ========== Common - Shared Labels ========== +common.no_description = Aucune description définie. +common.member_count = {0} membres +common.economy_disabled = Le système économique n'est pas activé. + +# ========== Territory Display ========== +territory.display.wilderness = Terres Sauvages +territory.display.safezone = Zone Sûre +territory.display.warzone = Zone de Guerre +territory.display.unknown_faction = Faction Inconnue +territory.secondary.pvp_disabled = PvP Désactivé +territory.secondary.pvp_no_protection = PvP Activé - Sans Protection +territory.secondary.your_territory = Votre Territoire +territory.secondary.faction_territory = Territoire +territory.secondary.relation_territory = Territoire de {0} + +# ========== Announcements ========== +announce.death_location = {0} est mort(e) à ({1}, {2}, {3}) dans {4} diff --git a/src/main/resources/Server/Languages/it-IT/hyperfactions.lang b/src/main/resources/Server/Languages/it-IT/hyperfactions.lang index 9b7df507..9b96e849 100644 --- a/src/main/resources/Server/Languages/it-IT/hyperfactions.lang +++ b/src/main/resources/Server/Languages/it-IT/hyperfactions.lang @@ -451,3 +451,452 @@ teleport.mount_entry_blocked = Non puoi entrare in questa zona mentre sei in sel chat.display.public = Pubblico chat.display.faction = Fazione chat.display.ally = Alleato + +# ========== Sistema di Aiuto ========== +help.commands_label = Comandi: +help.default_footer = Usa /f per maggiori dettagli +help.title = HyperFactions +help.description = Gestione fazioni e controllo del territorio + +# Sezioni dell'aiuto +help.section.core = Principali +help.section.management = Gestione +help.section.territory = Territorio +help.section.relations = Relazioni +help.section.teleport = Teletrasporto +help.section.information = Informazioni +help.section.other = Altro +help.section.admin = Admin + +# Descrizioni comandi dell'aiuto (Principali) +help.cmd.create = Crea una fazione +help.cmd.disband = Sciogli la tua fazione +help.cmd.invite = Invita un giocatore +help.cmd.accept = Accetta un invito +help.cmd.request = Richiedi di unirti a una fazione +help.cmd.leave = Abbandona la tua fazione +help.cmd.kick = Espelli un membro + +# Descrizioni comandi dell'aiuto (Gestione) +help.cmd.rename = Rinomina la tua fazione +help.cmd.desc = Imposta la descrizione della fazione +help.cmd.color = Imposta il colore della fazione +help.cmd.open = Consenti a chiunque di unirsi +help.cmd.close = Richiedi invito per unirsi +help.cmd.promote = Promuovi a ufficiale +help.cmd.demote = Retrocedi a membro +help.cmd.transfer = Trasferisci la leadership + +# Descrizioni comandi dell'aiuto (Territorio) +help.cmd.claim = Rivendica questo chunk +help.cmd.unclaim = Rinuncia a questo chunk +help.cmd.overclaim = Conquista territorio nemico +help.cmd.map = Visualizza la mappa del territorio + +# Descrizioni comandi dell'aiuto (Relazioni) +help.cmd.ally = Richiedi un'alleanza +help.cmd.enemy = Dichiara nemico +help.cmd.neutral = Imposta relazione neutrale + +# Descrizioni comandi dell'aiuto (Teletrasporto) +help.cmd.home = Teletrasportati alla base della fazione +help.cmd.sethome = Imposta la base della fazione +help.cmd.stuck = Esci dal territorio nemico + +# Descrizioni comandi dell'aiuto (Informazioni) +help.cmd.info = Visualizza informazioni sulla fazione +help.cmd.list = Elenca tutte le fazioni +help.cmd.browse = Sfoglia le fazioni (alias di list) +help.cmd.members = Visualizza i membri della fazione +help.cmd.invites = Gestisci inviti/richieste +help.cmd.who = Visualizza informazioni sul giocatore +help.cmd.power = Visualizza livello di potere +help.cmd.gui = Apri la GUI della fazione +help.cmd.settings = Apri le impostazioni della fazione + +# Descrizioni comandi dell'aiuto (Altro) +help.cmd.chat = Invia un messaggio nella chat di fazione +help.cmd.chat_short = Chat di fazione (abbreviata) + +# Descrizioni comandi dell'aiuto (Admin nell'aiuto principale) +help.cmd.admin = Apri la GUI admin +help.cmd.admin_reload = Ricarica la configurazione +help.cmd.admin_sync = Sincronizza i dati dal disco +help.cmd.admin_factions = Gestisci le fazioni +help.cmd.admin_zones = Gestisci le zone +help.cmd.admin_config = Visualizza/modifica la configurazione +help.cmd.admin_backups = Gestisci i backup +help.cmd.admin_update = Controlla aggiornamenti +help.cmd.admin_debug = Comandi di debug + +# Pagina aiuto admin +help.admin.title = Comandi Admin +help.admin.description = Amministrazione del server +help.admin.cmd.dashboard = Apri la GUI del pannello admin +help.admin.cmd.factions = Gestisci tutte le fazioni +help.admin.cmd.zone = Gestione zone +help.admin.cmd.config = Configurazione del server +help.admin.cmd.backup = Gestione backup +help.admin.cmd.import_cmd = Importa da altri plugin +help.admin.cmd.update = Controlla e scarica aggiornamenti +help.admin.cmd.update_mixin = Aggiorna HyperProtect-Mixin +help.admin.cmd.update_toggle = Attiva/disattiva auto-download HP-Mixin +help.admin.cmd.rollback = Ripristina versione precedente +help.admin.cmd.reload = Ricarica la configurazione +help.admin.cmd.sync = Sincronizza i dati dal disco +help.admin.cmd.debug = Comandi di debug +help.admin.cmd.decay = Gestione decadimento territori +help.admin.cmd.map = Gestione mappa del mondo +help.admin.cmd.safezone = Crea SafeZone + rivendica chunk +help.admin.cmd.warzone = Crea WarZone + rivendica chunk +help.admin.cmd.removezone = Rimuovi chunk dalla zona +help.admin.cmd.zoneflag = Imposta flag della zona +help.admin.cmd.integrations = Riepilogo di tutte le integrazioni +help.admin.cmd.integration = Stato dettagliato dell'integrazione +help.admin.cmd.clearhistory = Cancella la cronologia di appartenenza del giocatore +help.admin.cmd.power = Gestione potere admin +help.admin.cmd.economy = Gestione economia/tesoreria +help.admin.cmd.economy_upkeep = Attiva manualmente la riscossione del mantenimento +help.admin.cmd.info = Visualizza GUI info fazione admin +help.admin.cmd.who = Visualizza GUI info giocatore admin +help.admin.cmd.log = Visualizza registro attività globale +help.admin.cmd.world = Gestione impostazioni per mondo +help.admin.cmd.version = Visualizza versione mod e stato integrazioni +help.admin.cmd.sentry = Visualizza stato Sentry +help.admin.cmd.sentry_disable = Disattiva segnalazione errori Sentry +help.admin.cmd.sentry_enable = Attiva segnalazione errori Sentry +help.admin.cmd.test_gui = Apri pagina di test elementi UI +help.admin.cmd.test_sentry = Invia un errore di test a Sentry +help.admin.cmd.test_md = Apri pagina di test rendering markdown + +# Sotto-aiuto: Backup +help.backup.title = Gestione Backup +help.backup.description = Schema di rotazione GFS +help.backup.cmd.create = Crea backup manuale +help.backup.cmd.list = Elenca tutti i backup raggruppati per tipo +help.backup.cmd.restore = Ripristina da backup (richiede conferma) +help.backup.cmd.delete = Elimina un backup + +# Sotto-aiuto: Debug +help.debug.title = Comandi di Debug +help.debug.description = Diagnostica e risoluzione problemi +help.debug.cmd.toggle = Attiva/disattiva il logging di debug +help.debug.cmd.status = Mostra stato del debug +help.debug.cmd.power = Mostra dettagli del potere +help.debug.cmd.claim = Mostra informazioni sul territorio +help.debug.cmd.protection = Mostra informazioni sulla protezione +help.debug.cmd.combat = Mostra stato del tag combattimento +help.debug.cmd.relation = Mostra informazioni sulle relazioni + +# Sotto-aiuto: Potere +help.power.title = Potere Admin +help.power.description = Gestisci potere giocatore/fazione +help.power.cmd.set = Imposta potere esatto +help.power.cmd.add = Aumenta potere +help.power.cmd.remove = Diminuisci potere +help.power.cmd.reset = Ripristina al valore predefinito +help.power.cmd.setmax = Imposta override potere massimo +help.power.cmd.resetmax = Rimuovi override massimo +help.power.cmd.noloss = Attiva/disattiva bypass perdita potere +help.power.cmd.nodecay = Attiva/disattiva esenzione decadimento +help.power.cmd.faction = Operazioni a livello di fazione +help.power.cmd.info = Mostra dettagli potere del giocatore + +# Sotto-aiuto: Economia +help.economy.title = Economia Admin +help.economy.description = Gestisci le tesorerie delle fazioni +help.economy.cmd.balance = Mostra saldo della fazione +help.economy.cmd.set = Imposta saldo esatto +help.economy.cmd.add = Aggiungi al saldo +help.economy.cmd.take = Deduci dal saldo +help.economy.cmd.total = Mostra saldo totale del server +help.economy.cmd.reset = Azzera il saldo +help.economy.cmd.upkeep = Attiva manualmente la riscossione del mantenimento + +# Sotto-aiuto: Mondo +help.world.title = Impostazioni Mondo +help.world.description = Configurazione per mondo +help.world.cmd.list = Elenca tutti i mondi configurati +help.world.cmd.info = Mostra le impostazioni di un mondo +help.world.cmd.set = Imposta un'impostazione del mondo +help.world.cmd.reset = Rimuovi impostazioni specifiche del mondo + +# Sotto-aiuto: Mappa +help.map.title = Mappa del Mondo +help.map.description = Gestione overlay della mappa +help.map.cmd.status = Mostra stato e statistiche della mappa del mondo +help.map.cmd.refresh = Forza aggiornamento immediato della mappa + +# Sotto-aiuto: Decadimento +help.decay.title = Decadimento Territori +help.decay.description = Rimuove automaticamente i territori delle fazioni inattive +help.decay.cmd.status = Mostra stato del decadimento +help.decay.cmd.run = Attiva manualmente il decadimento dei territori +help.decay.cmd.check = Controlla stato di decadimento della fazione + +# Sotto-aiuto: Importazione +help.import.title = Comandi di Importazione +help.import.description = Migra da altri plugin di fazioni +help.import.cmd.hyfactions = Importa dal mod HyFactions +help.import.path.hyfactions = Percorso predefinito: mods/Kaws_Hyfaction +help.import.cmd.elbaphfactions = Importa dal mod ElbaphFactions +help.import.path.elbaphfactions = Percorso predefinito: mods/ElbaphFactions +help.import.cmd.factionsx = Importa dal mod FactionsX +help.import.path.factionsx = Percorso predefinito: mods/FactionsX +help.import.cmd.simpleclaims = Importa dal mod SimpleClaims +help.import.path.simpleclaims = Percorso predefinito: Server/universe/SimpleClaims +help.import.flags_header = Flag: +help.import.flag.dryrun = Simula senza modifiche +help.import.flag.overwrite = Sostituisci fazioni esistenti +help.import.flag.nozones = Salta importazione zone +help.import.flag.nopower = Salta distribuzione potere + +# Sotto-aiuto: Test +help.test.title = Comandi di Test +help.test.description = Strumenti di test per lo sviluppo +help.test.cmd.gui = Apri pagina di test elementi UI +help.test.cmd.sentry = Invia errore di test a Sentry +help.test.cmd.md = Apri pagina di test rendering markdown + +# ========== Messaggi Admin CLI ========== +admincmd.no_permission = Non hai il permesso. +admincmd.player_only = Questo comando può essere usato solo da un giocatore. +admincmd.player_context = Contesto giocatore non disponibile. +admincmd.entity_not_found = Impossibile trovare l'entità del giocatore. +admincmd.unknown_command = Comando admin sconosciuto. Usa /f admin help +admincmd.faction_not_found = Fazione non trovata. +admincmd.player_not_found = Giocatore non trovato: {0} +admincmd.invalid_number = Numero non valido: {0} +admincmd.amount_positive = L'importo deve essere positivo. +admincmd.balance_not_negative = Il saldo non può essere negativo. +admincmd.error_generic = Si è verificato un errore. + +# Admin - Ricarica/Sincronizzazione +admincmd.reload.success = Configurazione ricaricata. +admincmd.sync.start = Sincronizzazione dati delle fazioni dal disco... +admincmd.sync.complete = Sincronizzazione completata: {0} fazioni aggiornate, {1} membri aggiunti, {2} membri aggiornati. +admincmd.sync.failed = Sincronizzazione fallita: {0} + +# Admin - Versione +admincmd.version.title = Informazioni Versione +admincmd.version.server = Hytale Server: {0} +admincmd.version.java = Java: {0} +admincmd.version.treasury = Tesoreria: {0} +admincmd.version.active = Attivo +admincmd.version.not_found = Non trovato + +# Admin - Sentry +admincmd.sentry.header = Sentry - Segnalazione Errori +admincmd.sentry.config = Configurazione: {0} +admincmd.sentry.status = Stato: {0} +admincmd.sentry.already_disabled = Sentry è già disattivato. +admincmd.sentry.already_enabled = Sentry è già attivato. +admincmd.sentry.disabled = Sentry disattivato e configurazione salvata. La segnalazione errori è ora disattivata. +admincmd.sentry.enabled = Sentry attivato e configurazione salvata. La segnalazione errori è ora attiva. +admincmd.sentry.usage = Uso: /f admin sentry [disable|enable] +admincmd.sentry.not_initialized = Sentry non è inizializzato. Controlla config/debug.json +admincmd.sentry.test_sent = Errore di test inviato a Sentry. Controlla la dashboard di Sentry. +admincmd.sentry.test_failed = Impossibile inviare l'evento di test. + +# Admin - Backup +admincmd.backup.no_permission = Non hai il permesso di gestire i backup. +admincmd.backup.creating = Creazione backup in corso... +admincmd.backup.created = Backup creato con successo! +admincmd.backup.name = Nome: {0} +admincmd.backup.size = Dimensione: {0} +admincmd.backup.failed = Backup fallito: {0} +admincmd.backup.none = Nessun backup trovato. +admincmd.backup.header = Backup +admincmd.backup.not_found = Backup '{0}' non trovato. +admincmd.backup.unknown_command = Comando backup sconosciuto: {0} +admincmd.backup.usage_restore = Uso: /f admin backup restore +admincmd.backup.usage_delete = Uso: /f admin backup delete +admincmd.backup.restore_warning = ATTENZIONE: Il ripristino sovrascriverà i dati attuali! +admincmd.backup.restore_confirm = Digita il comando di nuovo entro {0} secondi per confermare. +admincmd.backup.restoring = Ripristino backup in corso... +admincmd.backup.restored = Backup ripristinato con successo! Dati ricaricati. +admincmd.backup.restore_failed = Ripristino fallito: {0} +admincmd.backup.confirm_cancelled = Conferma precedente annullata. Digita di nuovo per confermare il ripristino. +admincmd.backup.deleted = Backup '{0}' eliminato +admincmd.backup.delete_failed = Impossibile eliminare il backup. + +# Admin - Debug +admincmd.debug.no_permission = Non hai il permesso di usare i comandi di debug. +admincmd.debug.unknown_command = Comando debug sconosciuto: {0} +admincmd.debug.player_only = Questo comando di debug può essere usato solo da un giocatore. +admincmd.debug.toggle_set = Categoria di debug '{0}' impostata su {1} (salvata) +admincmd.debug.all_enabled = Tutte le categorie di debug attivate. +admincmd.debug.all_disabled = Tutte le categorie di debug disattivate. +admincmd.debug.unknown_category = Categoria sconosciuta: {0} +admincmd.debug.not_implemented = Informazioni debug {0} non ancora implementate. + +# Admin - Economia +admincmd.econ.disabled = Il sistema economico non è attivato. +admincmd.econ.unknown_command = Comando economia sconosciuto. Usa /f admin economy help +admincmd.econ.set = Saldo di {0} impostato a {1} (era {2}) +admincmd.econ.added = Aggiunto {0} a {1} (saldo: {2}) +admincmd.econ.deducted = Dedotto {0} da {1} (saldo: {2}) +admincmd.econ.reset = Saldo di {0} azzerato a {1} (era {2}) +admincmd.econ.failed = Errore: {0} +admincmd.econ.total_header = Statistiche Economia del Server +admincmd.econ.upkeep_disabled = Il sistema di mantenimento non è attivato. +admincmd.econ.upkeep_trigger = Attivazione manuale della riscossione del mantenimento... +admincmd.econ.upkeep_complete = Riscossione del mantenimento completata. Controlla il log del server per i dettagli. +admincmd.econ.upkeep_failed = Riscossione del mantenimento fallita: {0} + +# Admin - Potere +admincmd.power.no_permission = Non hai il permesso. +admincmd.power.unknown_command = Comando potere sconosciuto. Usa /f admin power help +admincmd.power.max_positive = Il potere massimo deve essere positivo. +admincmd.power.faction_unknown_action = Azione potere fazione sconosciuta. Usa: set, add, remove, reset + +# Admin - Cancella Cronologia +admincmd.history.no_data = Nessun dato giocatore trovato per {0}. +admincmd.history.empty = {0} non ha cronologia di appartenenza. +admincmd.history.cleared = Cancellati {0} record di cronologia per {1}. +admincmd.history.cleared_reinit = Cancellati {0} record di cronologia per {1} (reinizializzato con fazione attuale: {2}). + +# Admin - Zone +admincmd.zone.created = Creata {0} '{1}' a {2}, {3} +admincmd.zone.chunk_claimed = Impossibile creare la zona: Questo chunk è rivendicato da una fazione. +admincmd.zone.already_exists = Una zona esiste già in questa posizione. +admincmd.zone.name_taken = Una zona con quel nome esiste già. +admincmd.zone.not_found = Zona '{0}' non trovata. +admincmd.zone.unclaimed = Chunk rimosso dalla zona. +admincmd.zone.no_chunk = Nessun chunk di zona trovato in questa posizione. +admincmd.zone.none = Nessuna zona definita. +admincmd.zone.deleted = Zona '{0}' eliminata ({1} chunk rilasciati) +admincmd.zone.renamed = Zona '{0}' rinominata in '{1}' +admincmd.zone.invalid_type = Tipo di zona non valido. Usa 'safe' o 'war' +admincmd.zone.invalid_name = Nome zona non valido. Deve essere tra 1 e 32 caratteri. +admincmd.zone.claimed_radius = Rivendicati {0} chunk per la zona '{1}' +admincmd.zone.no_chunks_claimed = Nessun chunk rivendicabile (tutti occupati o già in una zona). +admincmd.zone.unknown_command = Comando zona sconosciuto. Usa /f admin help +admincmd.zone.chunk_has_zone = Questo chunk appartiene già a un'altra zona. +admincmd.zone.chunk_has_faction = Questo chunk è rivendicato da una fazione. +admincmd.zone.notify_set = Notifica di ingresso della zona '{0}' {1} +admincmd.zone.title_set = Impostato titolo {0} per la zona '{1}' a: {2} +admincmd.zone.title_cleared = Cancellato titolo {0} per la zona '{1}' (uso predefinito) +admincmd.zone.no_zone_at = Nessuna zona nella tua posizione. Entra in una zona per gestirne i flag. +admincmd.zone.flag_cleared = Flag '{0}' cancellato (ora usa il predefinito: {1}) +admincmd.zone.flag_set = Flag '{0}' impostato su {1} +admincmd.zone.flag_invalid = Flag non valido: {0} +admincmd.zone.flags_cleared = Cancellati tutti i flag personalizzati per '{0}' — ora usa i predefiniti del tipo di zona. + +# Admin - Mondo +admincmd.world.unknown_command = Comando mondo sconosciuto. Usa /f admin world help +admincmd.world.no_settings = Nessuna impostazione per mondo configurata. +admincmd.world.unknown_setting = Impostazione sconosciuta: {0} +admincmd.world.set = Impostato {0}={1} per il mondo {2} +admincmd.world.reset = Rimosse le impostazioni per mondo per: {0} +admincmd.world.not_found = Nessuna impostazione trovata per il mondo: {0} + +# Admin - Mappa/Decadimento +admincmd.map.not_available = Il servizio mappa del mondo non è disponibile. +admincmd.map.refreshing = Aggiornamento forzato della mappa del mondo... +admincmd.map.refreshed = Aggiornamento mappa del mondo completato. +admincmd.map.unknown_command = Comando mappa sconosciuto: {0} +admincmd.decay.disabled = Il decadimento dei territori è disattivato nella configurazione. +admincmd.decay.running = Esecuzione del controllo decadimento... +admincmd.decay.complete = Controllo decadimento completato. Controlla la console per i dettagli. +admincmd.decay.unknown_command = Comando decadimento sconosciuto: {0} + +# Admin - Aggiornamento +admincmd.update.not_available = Il controllo aggiornamenti non è disponibile. +admincmd.update.checking = Controllo aggiornamenti in corso... +admincmd.update.up_to_date = Il plugin è già aggiornato (v{0}) +admincmd.update.available = Aggiornamento disponibile: v{0} +admincmd.update.unknown_target = Obiettivo di aggiornamento sconosciuto: {0} + +# Admin - Importazione +admincmd.import.unknown_source = Sorgente di importazione sconosciuta: {0} +admincmd.import.importing = Importazione da {0} in corso... +admincmd.import.complete = Importazione da {0} {1}completata! +admincmd.import.failed = Importazione da {0} fallita con errori: + +# Admin - Update Notifications (login messages) +admincmd.update_notify.new_version = [HyperFactions] Una nuova versione è disponibile! +admincmd.update_notify.version_info = Attuale: v{0} -> Ultima: v{1} +admincmd.update_notify.instruction = Esegui /f admin update per aggiornare il plugin. +admincmd.update_notify.up_to_date = [HyperFactions] Il plugin è aggiornato (v{0}) +admincmd.update.no_info = Nessuna informazione di aggiornamento disponibile. +admincmd.update.creating_backup = Creazione backup pre-aggiornamento... +admincmd.update.backup_created = Backup creato: {0} +admincmd.update.backup_warning = Attenzione: Backup fallito - {0} +admincmd.update.backup_continue = Continuando con l'aggiornamento comunque... +admincmd.update.downloading = Scaricamento di HyperFactions v{0}... +admincmd.update.download_failed = Scaricamento fallito. Controlla i log del server. +admincmd.update.downloaded = Aggiornamento scaricato con successo! +admincmd.update.file_label = File: {0} +admincmd.update.cleanup = Pulizia: {0} backup vecchio/i rimosso/i +admincmd.update.kept_backup = Mantenuto: {0} (per rollback) +admincmd.update.restart = Riavvia il server per applicare l'aggiornamento. +admincmd.update.use_rollback = Usa /f admin rollback per annullare prima del riavvio. +admincmd.update.usage_hf = /f admin update — aggiorna HyperFactions +admincmd.update.usage_mixin = /f admin update mixin — aggiorna HyperProtect-Mixin +admincmd.update.usage_toggle = /f admin update toggle-mixin-download — attiva/disattiva download automatico +admincmd.update.mixin_current = HyperProtect-Mixin: {0} +admincmd.update.mixin_up_to_date = HyperProtect-Mixin è aggiornato. +admincmd.update.mixin_none = Nessuna release di HyperProtect-Mixin ancora disponibile. +admincmd.update.mixin_available = Disponibile: v{0} +admincmd.update.mixin_downloading = Scaricamento di HyperProtect-Mixin v{0}... +admincmd.update.mixin_downloaded = Scaricato con successo! +admincmd.update.mixin_failed = Scaricamento fallito. Controlla i log del server. +admincmd.update.mixin_location = Posizione: earlyplugins/ +admincmd.update.mixin_restart = Riavvia il server per applicare. +admincmd.update.mixin_auto_on = Download automatico HP-Mixin attivato. +admincmd.update.mixin_auto_on_desc = HyperProtect-Mixin verrà scaricato automaticamente al prossimo avvio se non installato. +admincmd.update.mixin_auto_off = Download automatico HP-Mixin disattivato. +admincmd.update.mixin_auto_off_desc = Usa /f admin update mixin per scaricare manualmente. +admincmd.rollback.no_backup = Nessun JAR di backup trovato per il rollback. +admincmd.rollback.unsafe = Impossibile eseguire il rollback automaticamente! +admincmd.rollback.unsafe_reason = Il server è stato riavviato dall'ultimo aggiornamento. +admincmd.rollback.unsafe_migration = Le migrazioni di configurazione/dati potrebbero essere state applicate. +admincmd.rollback.instructions = Per un rollback sicuro, devi: +admincmd.rollback.find_backup = Usa /f admin backup list per trovare il backup pre-aggiornamento. +admincmd.rollback.rolling = Ripristino aggiornamento... +admincmd.rollback.from = Da: v{0} (nuova) +admincmd.rollback.to = A: v{0} (precedente) +admincmd.rollback.version = Ripristino a v{0}... +admincmd.rollback.success = Rollback riuscito! +admincmd.rollback.restored = Ripristinato: {0} +admincmd.rollback.removed = Rimosso: {0} +admincmd.rollback.restart = Riavvia il server per applicare il rollback. +admincmd.rollback.failed = Rollback fallito: {0} +admincmd.zone.failed = Fallito: {0} +admincmd.zone.failed_delete = Impossibile eliminare la zona: {0} +admincmd.zone.failed_rename = Impossibile rinominare la zona: {0} +admincmd.zone.failed_flags = Impossibile resettare i flag. +admincmd.zone.failed_flag = Impossibile impostare il flag. +admincmd.zone.list_header = Zone ({0}) +admincmd.zone.info_header = Zona: {0} +admincmd.zone.info_notify = Notifica: {0} +admincmd.zone.info_upper_title = Titolo superiore: {0} +admincmd.zone.info_lower_title = Titolo inferiore: {0} +admincmd.zone.info_custom_flags = Flag personalizzati: +admincmd.zone.flags_header = Flag della Zona: {0} +admincmd.zone.flags_type = Tipo di Zona: {0} +admincmd.zone.player_only = Questo comando può essere usato solo da un giocatore. +admincmd.decay.status_header = Stato Decadimento Territori +admincmd.decay.enable_hint = Imposta claims.decayEnabled su true per attivare. +admincmd.decay.error = Errore durante il decadimento: {0} +admincmd.decay.check_header = Controllo Decadimento: {0} +admincmd.decay.check_not_found = Fazione '{0}' non trovata. +admincmd.decay.no_claims = Nessun territorio da far decadere. +admincmd.decay.disabled_globally = Disabilitato globalmente +admincmd.map.status_header = Stato Mappa Mondiale +admincmd.debug.status_header = Stato Registrazione Debug +admincmd.debug.full_status_header = Stato Debug HyperFactions +common.no_description = Nessuna descrizione impostata. +common.member_count = {0} membri +common.economy_disabled = Il sistema economico non è abilitato. +territory.display.wilderness = Terre Selvagge +territory.display.safezone = Zona Sicura +territory.display.warzone = Zona di Guerra +territory.display.unknown_faction = Fazione Sconosciuta +territory.secondary.pvp_disabled = PvP Disabilitato +territory.secondary.pvp_no_protection = PvP Abilitato - Nessuna Protezione +territory.secondary.your_territory = Il Tuo Territorio +territory.secondary.faction_territory = Territorio +territory.secondary.relation_territory = Territorio di {0} +announce.death_location = {0} è morto/a a ({1}, {2}, {3}) in {4} diff --git a/src/main/resources/Server/Languages/nl-NL/hyperfactions.lang b/src/main/resources/Server/Languages/nl-NL/hyperfactions.lang index f8061210..7f7bd098 100644 --- a/src/main/resources/Server/Languages/nl-NL/hyperfactions.lang +++ b/src/main/resources/Server/Languages/nl-NL/hyperfactions.lang @@ -451,3 +451,452 @@ teleport.mount_entry_blocked = Je kunt deze zone niet betreden terwijl je een mo chat.display.public = Openbaar chat.display.faction = Factie chat.display.ally = Bondgenoot + +# ========== Helpsysteem ========== +help.commands_label = Commando's: +help.default_footer = Gebruik /f voor meer details +help.title = HyperFactions +help.description = Factiebeheer en gebiedscontrole + +# Helpsecties +help.section.core = Basis +help.section.management = Beheer +help.section.territory = Territorium +help.section.relations = Relaties +help.section.teleport = Teleport +help.section.information = Informatie +help.section.other = Overig +help.section.admin = Admin + +# Helpbeschrijvingen (Basis) +help.cmd.create = Maak een factie aan +help.cmd.disband = Ontbind je factie +help.cmd.invite = Nodig een speler uit +help.cmd.accept = Accepteer een uitnodiging +help.cmd.request = Vraag lidmaatschap aan +help.cmd.leave = Verlaat je factie +help.cmd.kick = Schop een lid + +# Helpbeschrijvingen (Beheer) +help.cmd.rename = Hernoem je factie +help.cmd.desc = Stel factiebeschrijving in +help.cmd.color = Stel factiekleur in +help.cmd.open = Laat iedereen toetreden +help.cmd.close = Alleen op uitnodiging +help.cmd.promote = Promoveer tot officier +help.cmd.demote = Degradeer tot lid +help.cmd.transfer = Draag leiderschap over + +# Helpbeschrijvingen (Territorium) +help.cmd.claim = Claim dit gebied +help.cmd.unclaim = Geef dit gebied vrij +help.cmd.overclaim = Neem vijandelijk territorium over +help.cmd.map = Bekijk gebiedskaart + +# Helpbeschrijvingen (Relaties) +help.cmd.ally = Vraag bondgenootschap aan +help.cmd.enemy = Verklaar vijand +help.cmd.neutral = Stel neutrale relatie in + +# Helpbeschrijvingen (Teleport) +help.cmd.home = Teleporteer naar factiebasis +help.cmd.sethome = Stel factiebasis in +help.cmd.stuck = Ontsnap uit vijandelijk territorium + +# Helpbeschrijvingen (Informatie) +help.cmd.info = Bekijk factie-info +help.cmd.list = Toon alle facties +help.cmd.browse = Blader door facties (alias voor list) +help.cmd.members = Bekijk factieleden +help.cmd.invites = Beheer uitnodigingen/verzoeken +help.cmd.who = Bekijk spelerinfo +help.cmd.power = Bekijk krachtniveau +help.cmd.gui = Open factie-GUI +help.cmd.settings = Open factie-instellingen + +# Helpbeschrijvingen (Overig) +help.cmd.chat = Stuur factiechatbericht +help.cmd.chat_short = Factiechat (kort) + +# Helpbeschrijvingen (Admin in hoofdhulp) +help.cmd.admin = Open admin-GUI +help.cmd.admin_reload = Herlaad configuratie +help.cmd.admin_sync = Synchroniseer data vanaf schijf +help.cmd.admin_factions = Beheer facties +help.cmd.admin_zones = Beheer zones +help.cmd.admin_config = Bekijk/bewerk configuratie +help.cmd.admin_backups = Beheer back-ups +help.cmd.admin_update = Controleer op updates +help.cmd.admin_debug = Debugcommando's + +# Admin-helppagina +help.admin.title = Admincommando's +help.admin.description = Serverbeheer +help.admin.cmd.dashboard = Open admin-dashboard-GUI +help.admin.cmd.factions = Beheer alle facties +help.admin.cmd.zone = Zonebeheer +help.admin.cmd.config = Serverconfiguratie +help.admin.cmd.backup = Back-upbeheer +help.admin.cmd.import_cmd = Importeer uit andere plugins +help.admin.cmd.update = Controleer op en download updates +help.admin.cmd.update_mixin = Update HyperProtect-Mixin +help.admin.cmd.update_toggle = Schakel HP-Mixin auto-download in/uit +help.admin.cmd.rollback = Terugdraaien naar vorige versie +help.admin.cmd.reload = Herlaad configuratie +help.admin.cmd.sync = Synchroniseer data vanaf schijf +help.admin.cmd.debug = Debugcommando's +help.admin.cmd.decay = Beheer gebiedsverval +help.admin.cmd.map = Beheer wereldkaart +help.admin.cmd.safezone = Maak SafeZone aan + claim gebied +help.admin.cmd.warzone = Maak WarZone aan + claim gebied +help.admin.cmd.removezone = Verwijder gebied uit zone +help.admin.cmd.zoneflag = Stel zonevlag in +help.admin.cmd.integrations = Overzicht van alle integraties +help.admin.cmd.integration = Gedetailleerde integratiestatus +help.admin.cmd.clearhistory = Wis lidmaatschapsgeschiedenis van speler +help.admin.cmd.power = Admin-krachtbeheer +help.admin.cmd.economy = Economie/schatkistbeheer +help.admin.cmd.economy_upkeep = Handmatig onderhoudsinning starten +help.admin.cmd.info = Bekijk admin factie-info-GUI +help.admin.cmd.who = Bekijk admin spelerinfo-GUI +help.admin.cmd.log = Bekijk globaal activiteitenlog +help.admin.cmd.world = Beheer per-wereld-instellingen +help.admin.cmd.version = Bekijk modversie en integratiestatus +help.admin.cmd.sentry = Bekijk Sentry-status +help.admin.cmd.sentry_disable = Schakel Sentry-foutrapportage uit +help.admin.cmd.sentry_enable = Schakel Sentry-foutrapportage in +help.admin.cmd.test_gui = Open UI-elementen testpagina +help.admin.cmd.test_sentry = Stuur testfout naar Sentry +help.admin.cmd.test_md = Open markdown rendering testpagina + +# Sub-help: Back-up +help.backup.title = Back-upbeheer +help.backup.description = GFS-rotatieschema +help.backup.cmd.create = Maak handmatige back-up +help.backup.cmd.list = Toon alle back-ups gegroepeerd per type +help.backup.cmd.restore = Herstel van back-up (bevestiging vereist) +help.backup.cmd.delete = Verwijder een back-up + +# Sub-help: Debug +help.debug.title = Debugcommando's +help.debug.description = Diagnostiek en probleemoplossing +help.debug.cmd.toggle = Schakel debug-logging in/uit +help.debug.cmd.status = Toon debugstatus +help.debug.cmd.power = Toon krachtdetails +help.debug.cmd.claim = Toon claiminfo +help.debug.cmd.protection = Toon beschermingsinfo +help.debug.cmd.combat = Toon gevechtstagstatus +help.debug.cmd.relation = Toon relatie-info + +# Sub-help: Kracht +help.power.title = Admin-kracht +help.power.description = Beheer speler-/factiekracht +help.power.cmd.set = Stel exacte kracht in +help.power.cmd.add = Verhoog kracht +help.power.cmd.remove = Verlaag kracht +help.power.cmd.reset = Herstel naar standaard +help.power.cmd.setmax = Stel max kracht-override in +help.power.cmd.resetmax = Wis max-override +help.power.cmd.noloss = Schakel krachtverliesdoorgang in/uit +help.power.cmd.nodecay = Schakel claimvervalvrijstelling in/uit +help.power.cmd.faction = Factiewijde bewerkingen +help.power.cmd.info = Toon krachtdetails van speler + +# Sub-help: Economie +help.economy.title = Admin-economie +help.economy.description = Beheer factieschatkisten +help.economy.cmd.balance = Toon factiesaldo +help.economy.cmd.set = Stel exact saldo in +help.economy.cmd.add = Voeg toe aan saldo +help.economy.cmd.take = Trek af van saldo +help.economy.cmd.total = Toon totaal serversaldo +help.economy.cmd.reset = Zet saldo op 0 +help.economy.cmd.upkeep = Handmatig onderhoudsinning starten + +# Sub-help: Wereld +help.world.title = Wereldinstellingen +help.world.description = Per-wereld-configuratie +help.world.cmd.list = Toon alle geconfigureerde werelden +help.world.cmd.info = Toon instellingen van een wereld +help.world.cmd.set = Stel een wereldinstelling in +help.world.cmd.reset = Verwijder wereld-specifieke instellingen + +# Sub-help: Kaart +help.map.title = Wereldkaart +help.map.description = Beheer kaartoverlay +help.map.cmd.status = Toon wereldkaartstatus en statistieken +help.map.cmd.refresh = Forceer directe kaartverversing + +# Sub-help: Verval +help.decay.title = Gebiedsverval +help.decay.description = Verwijdert automatisch gebieden van inactieve facties +help.decay.cmd.status = Toon vervalstatus +help.decay.cmd.run = Handmatig gebiedsverval starten +help.decay.cmd.check = Controleer vervalstatus van factie + +# Sub-help: Importeren +help.import.title = Importcommando's +help.import.description = Migreer van andere factieplugins +help.import.cmd.hyfactions = Importeer uit HyFactions mod +help.import.path.hyfactions = Standaardpad: mods/Kaws_Hyfaction +help.import.cmd.elbaphfactions = Importeer uit ElbaphFactions mod +help.import.path.elbaphfactions = Standaardpad: mods/ElbaphFactions +help.import.cmd.factionsx = Importeer uit FactionsX mod +help.import.path.factionsx = Standaardpad: mods/FactionsX +help.import.cmd.simpleclaims = Importeer uit SimpleClaims mod +help.import.path.simpleclaims = Standaardpad: Server/universe/SimpleClaims +help.import.flags_header = Vlaggen: +help.import.flag.dryrun = Simuleer zonder wijzigingen +help.import.flag.overwrite = Vervang bestaande facties +help.import.flag.nozones = Sla zone-import over +help.import.flag.nopower = Sla krachtverdeling over + +# Sub-help: Test +help.test.title = Testcommando's +help.test.description = Ontwikkelingstestgereedschap +help.test.cmd.gui = Open UI-elementen testpagina +help.test.cmd.sentry = Stuur testfout naar Sentry +help.test.cmd.md = Open markdown rendering testpagina + +# ========== Admin CLI-berichten ========== +admincmd.no_permission = Je hebt geen toestemming. +admincmd.player_only = Dit commando kan alleen door een speler worden gebruikt. +admincmd.player_context = Spelercontext niet beschikbaar. +admincmd.entity_not_found = Kon spelerentiteit niet vinden. +admincmd.unknown_command = Onbekend admincommando. Gebruik /f admin help +admincmd.faction_not_found = Factie niet gevonden. +admincmd.player_not_found = Speler niet gevonden: {0} +admincmd.invalid_number = Ongeldig nummer: {0} +admincmd.amount_positive = Bedrag moet positief zijn. +admincmd.balance_not_negative = Saldo kan niet negatief zijn. +admincmd.error_generic = Er is een fout opgetreden. + +# Admin - Herladen/Synchroniseren +admincmd.reload.success = Configuratie herladen. +admincmd.sync.start = Factiedata synchroniseren vanaf schijf... +admincmd.sync.complete = Synchronisatie voltooid: {0} facties bijgewerkt, {1} leden toegevoegd, {2} leden bijgewerkt. +admincmd.sync.failed = Synchronisatie mislukt: {0} + +# Admin - Versie +admincmd.version.title = Versie-informatie +admincmd.version.server = Hytale Server: {0} +admincmd.version.java = Java: {0} +admincmd.version.treasury = Schatkist: {0} +admincmd.version.active = Actief +admincmd.version.not_found = Niet gevonden + +# Admin - Sentry +admincmd.sentry.header = Sentry Foutrapportage +admincmd.sentry.config = Configuratie: {0} +admincmd.sentry.status = Status: {0} +admincmd.sentry.already_disabled = Sentry is al uitgeschakeld. +admincmd.sentry.already_enabled = Sentry is al ingeschakeld. +admincmd.sentry.disabled = Sentry uitgeschakeld en configuratie opgeslagen. Foutrapportage is nu uit. +admincmd.sentry.enabled = Sentry ingeschakeld en configuratie opgeslagen. Foutrapportage is nu aan. +admincmd.sentry.usage = Gebruik: /f admin sentry [disable|enable] +admincmd.sentry.not_initialized = Sentry is niet geinitialiseerd. Controleer config/debug.json +admincmd.sentry.test_sent = Testfout verstuurd naar Sentry. Controleer je Sentry-dashboard. +admincmd.sentry.test_failed = Verzenden van testgebeurtenis mislukt. + +# Admin - Back-up +admincmd.backup.no_permission = Je hebt geen toestemming om back-ups te beheren. +admincmd.backup.creating = Back-up wordt aangemaakt... +admincmd.backup.created = Back-up succesvol aangemaakt! +admincmd.backup.name = Naam: {0} +admincmd.backup.size = Grootte: {0} +admincmd.backup.failed = Back-up mislukt: {0} +admincmd.backup.none = Geen back-ups gevonden. +admincmd.backup.header = Back-ups +admincmd.backup.not_found = Back-up '{0}' niet gevonden. +admincmd.backup.unknown_command = Onbekend back-upcommando: {0} +admincmd.backup.usage_restore = Gebruik: /f admin backup restore +admincmd.backup.usage_delete = Gebruik: /f admin backup delete +admincmd.backup.restore_warning = WAARSCHUWING: Herstellen overschrijft de huidige data! +admincmd.backup.restore_confirm = Typ het commando opnieuw binnen {0} seconden om te bevestigen. +admincmd.backup.restoring = Back-up herstellen... +admincmd.backup.restored = Back-up succesvol hersteld! Data opnieuw geladen. +admincmd.backup.restore_failed = Herstellen mislukt: {0} +admincmd.backup.confirm_cancelled = Vorige bevestiging geannuleerd. Typ opnieuw om herstel te bevestigen. +admincmd.backup.deleted = Back-up '{0}' verwijderd +admincmd.backup.delete_failed = Back-up verwijderen mislukt. + +# Admin - Debug +admincmd.debug.no_permission = Je hebt geen toestemming om debugcommando's te gebruiken. +admincmd.debug.unknown_command = Onbekend debugcommando: {0} +admincmd.debug.player_only = Dit debugcommando kan alleen door een speler worden gebruikt. +admincmd.debug.toggle_set = Debugcategorie '{0}' ingesteld op {1} (opgeslagen) +admincmd.debug.all_enabled = Alle debugcategorieen ingeschakeld. +admincmd.debug.all_disabled = Alle debugcategorieen uitgeschakeld. +admincmd.debug.unknown_category = Onbekende categorie: {0} +admincmd.debug.not_implemented = Debug {0} info nog niet geimplementeerd. + +# Admin - Economie +admincmd.econ.disabled = Het economiesysteem is niet ingeschakeld. +admincmd.econ.unknown_command = Onbekend economiecommando. Gebruik /f admin economy help +admincmd.econ.set = Saldo van {0} ingesteld op {1} (was {2}) +admincmd.econ.added = {0} toegevoegd aan {1} (saldo: {2}) +admincmd.econ.deducted = {0} afgetrokken van {1} (saldo: {2}) +admincmd.econ.reset = Saldo van {0} gereset naar {1} (was {2}) +admincmd.econ.failed = Mislukt: {0} +admincmd.econ.total_header = Servereconomiestatistieken +admincmd.econ.upkeep_disabled = Het onderhoudssysteem is niet ingeschakeld. +admincmd.econ.upkeep_trigger = Handmatig onderhoudsinning starten... +admincmd.econ.upkeep_complete = Onderhoudsinning voltooid. Controleer het serverlog voor details. +admincmd.econ.upkeep_failed = Onderhoudsinning mislukt: {0} + +# Admin - Kracht +admincmd.power.no_permission = Je hebt geen toestemming. +admincmd.power.unknown_command = Onbekend krachtcommando. Gebruik /f admin power help +admincmd.power.max_positive = Maximale kracht moet positief zijn. +admincmd.power.faction_unknown_action = Onbekende factiekrachtactie. Gebruik: set, add, remove, reset + +# Admin - Geschiedenis wissen +admincmd.history.no_data = Geen spelerdata gevonden voor {0}. +admincmd.history.empty = {0} heeft geen lidmaatschapsgeschiedenis. +admincmd.history.cleared = {0} geschiedenisrecords gewist voor {1}. +admincmd.history.cleared_reinit = {0} geschiedenisrecords gewist voor {1} (opnieuw geinitialiseerd met huidige factie: {2}). + +# Admin - Zone +admincmd.zone.created = {0} '{1}' aangemaakt op {2}, {3} +admincmd.zone.chunk_claimed = Kan zone niet aanmaken: Dit gebied is geclaimd door een factie. +admincmd.zone.already_exists = Er bestaat al een zone op deze locatie. +admincmd.zone.name_taken = Er bestaat al een zone met die naam. +admincmd.zone.not_found = Zone '{0}' niet gevonden. +admincmd.zone.unclaimed = Gebied vrijgegeven uit zone. +admincmd.zone.no_chunk = Geen zonegebied gevonden op deze locatie. +admincmd.zone.none = Geen zones gedefinieerd. +admincmd.zone.deleted = Zone '{0}' verwijderd ({1} gebieden vrijgegeven) +admincmd.zone.renamed = Zone '{0}' hernoemd naar '{1}' +admincmd.zone.invalid_type = Ongeldig zonetype. Gebruik 'safe' of 'war' +admincmd.zone.invalid_name = Ongeldige zonenaam. Moet 1-32 tekens zijn. +admincmd.zone.claimed_radius = {0} gebieden geclaimd voor zone '{1}' +admincmd.zone.no_chunks_claimed = Geen gebieden konden worden geclaimd (allemaal bezet of al in een zone). +admincmd.zone.unknown_command = Onbekend zonecommando. Gebruik /f admin help +admincmd.zone.chunk_has_zone = Dit gebied behoort al tot een andere zone. +admincmd.zone.chunk_has_faction = Dit gebied is geclaimd door een factie. +admincmd.zone.notify_set = Ingangsmelding van zone '{0}' {1} +admincmd.zone.title_set = {0} titel ingesteld voor zone '{1}' op: {2} +admincmd.zone.title_cleared = {0} titel gewist voor zone '{1}' (standaard wordt gebruikt) +admincmd.zone.no_zone_at = Geen zone op je locatie. Sta in een zone om vlaggen te beheren. +admincmd.zone.flag_cleared = Vlag '{0}' gewist (gebruikt nu standaard: {1}) +admincmd.zone.flag_set = Vlag '{0}' ingesteld op {1} +admincmd.zone.flag_invalid = Ongeldige vlag: {0} +admincmd.zone.flags_cleared = Alle aangepaste vlaggen gewist voor '{0}' — gebruikt nu standaardwaarden van het zonetype. + +# Admin - Wereld +admincmd.world.unknown_command = Onbekend wereldcommando. Gebruik /f admin world help +admincmd.world.no_settings = Geen per-wereld-instellingen geconfigureerd. +admincmd.world.unknown_setting = Onbekende instelling: {0} +admincmd.world.set = {0}={1} ingesteld voor wereld {2} +admincmd.world.reset = Per-wereld-instellingen verwijderd voor: {0} +admincmd.world.not_found = Geen instellingen gevonden voor wereld: {0} + +# Admin - Kaart/Verval +admincmd.map.not_available = Wereldkaartdienst is niet beschikbaar. +admincmd.map.refreshing = Geforceerde wereldkaartverversing bezig... +admincmd.map.refreshed = Wereldkaartverversing voltooid. +admincmd.map.unknown_command = Onbekend kaartcommando: {0} +admincmd.decay.disabled = Gebiedsverval is uitgeschakeld in de configuratie. +admincmd.decay.running = Gebiedsvervalcontrole wordt uitgevoerd... +admincmd.decay.complete = Gebiedsvervalcontrole voltooid. Controleer de console voor details. +admincmd.decay.unknown_command = Onbekend vervalcommando: {0} + +# Admin - Update +admincmd.update.not_available = Updatecontrole is niet beschikbaar. +admincmd.update.checking = Controleren op updates... +admincmd.update.up_to_date = Plugin is al up-to-date (v{0}) +admincmd.update.available = Update beschikbaar: v{0} +admincmd.update.unknown_target = Onbekend updatedoel: {0} + +# Admin - Importeren +admincmd.import.unknown_source = Onbekende importbron: {0} +admincmd.import.importing = Importeren uit {0}... +admincmd.import.complete = {0} import {1}voltooid! +admincmd.import.failed = {0} import mislukt met fouten: + +# Admin - Update Notifications +admincmd.update_notify.new_version = [HyperFactions] Een nieuwe versie is beschikbaar! +admincmd.update_notify.version_info = Huidig: v{0} -> Nieuwste: v{1} +admincmd.update_notify.instruction = Voer /f admin update uit om de plugin bij te werken. +admincmd.update_notify.up_to_date = [HyperFactions] Plugin is up-to-date (v{0}) +admincmd.update.no_info = Geen update-informatie beschikbaar. +admincmd.update.creating_backup = Pre-update back-up maken... +admincmd.update.backup_created = Back-up gemaakt: {0} +admincmd.update.backup_warning = Waarschuwing: Back-up mislukt - {0} +admincmd.update.backup_continue = Toch doorgaan met de update... +admincmd.update.downloading = HyperFactions v{0} downloaden... +admincmd.update.download_failed = Download mislukt. Controleer de serverlogboeken. +admincmd.update.downloaded = Update succesvol gedownload! +admincmd.update.file_label = Bestand: {0} +admincmd.update.cleanup = Opruiming: {0} oude back-up(s) verwijderd +admincmd.update.kept_backup = Bewaard: {0} (voor rollback) +admincmd.update.restart = Herstart de server om de update toe te passen. +admincmd.update.use_rollback = Gebruik /f admin rollback om terug te draaien voor herstart. +admincmd.update.usage_hf = /f admin update — HyperFactions bijwerken +admincmd.update.usage_mixin = /f admin update mixin — HyperProtect-Mixin bijwerken +admincmd.update.usage_toggle = /f admin update toggle-mixin-download — automatisch downloaden omschakelen +admincmd.update.mixin_current = HyperProtect-Mixin: {0} +admincmd.update.mixin_up_to_date = HyperProtect-Mixin is up-to-date. +admincmd.update.mixin_none = Nog geen HyperProtect-Mixin releases beschikbaar. +admincmd.update.mixin_available = Beschikbaar: v{0} +admincmd.update.mixin_downloading = HyperProtect-Mixin v{0} downloaden... +admincmd.update.mixin_downloaded = Succesvol gedownload! +admincmd.update.mixin_failed = Download mislukt. Controleer de serverlogboeken. +admincmd.update.mixin_location = Locatie: earlyplugins/ +admincmd.update.mixin_restart = Herstart de server om toe te passen. +admincmd.update.mixin_auto_on = HP-Mixin automatisch downloaden ingeschakeld. +admincmd.update.mixin_auto_on_desc = HyperProtect-Mixin wordt automatisch gedownload bij de volgende opstart als het niet is geïnstalleerd. +admincmd.update.mixin_auto_off = HP-Mixin automatisch downloaden uitgeschakeld. +admincmd.update.mixin_auto_off_desc = Gebruik /f admin update mixin om handmatig te downloaden. +admincmd.rollback.no_backup = Geen back-up JAR gevonden om terug te draaien. +admincmd.rollback.unsafe = Kan niet automatisch terugdraaien! +admincmd.rollback.unsafe_reason = De server is herstart sinds de laatste update. +admincmd.rollback.unsafe_migration = Configuratie-/datamigraties zijn mogelijk toegepast. +admincmd.rollback.instructions = Om veilig terug te draaien, moet je: +admincmd.rollback.find_backup = Gebruik /f admin backup list om de pre-update back-up te vinden. +admincmd.rollback.rolling = Update terugdraaien... +admincmd.rollback.from = Van: v{0} (nieuw) +admincmd.rollback.to = Naar: v{0} (vorige) +admincmd.rollback.version = Terugdraaien naar v{0}... +admincmd.rollback.success = Rollback succesvol! +admincmd.rollback.restored = Hersteld: {0} +admincmd.rollback.removed = Verwijderd: {0} +admincmd.rollback.restart = Herstart de server om de rollback toe te passen. +admincmd.rollback.failed = Rollback mislukt: {0} +admincmd.zone.failed = Mislukt: {0} +admincmd.zone.failed_delete = Kan zone niet verwijderen: {0} +admincmd.zone.failed_rename = Kan zone niet hernoemen: {0} +admincmd.zone.failed_flags = Kan vlaggen niet resetten. +admincmd.zone.failed_flag = Kan vlag niet instellen. +admincmd.zone.list_header = Zones ({0}) +admincmd.zone.info_header = Zone: {0} +admincmd.zone.info_notify = Melding: {0} +admincmd.zone.info_upper_title = Bovenste titel: {0} +admincmd.zone.info_lower_title = Onderste titel: {0} +admincmd.zone.info_custom_flags = Aangepaste vlaggen: +admincmd.zone.flags_header = Zone Vlaggen: {0} +admincmd.zone.flags_type = Zone Type: {0} +admincmd.zone.player_only = Dit commando kan alleen door een speler worden gebruikt. +admincmd.decay.status_header = Gebiedsverval Status +admincmd.decay.enable_hint = Stel claims.decayEnabled in op true om te activeren. +admincmd.decay.error = Fout tijdens verval: {0} +admincmd.decay.check_header = Vervalcontrole: {0} +admincmd.decay.check_not_found = Factie '{0}' niet gevonden. +admincmd.decay.no_claims = Geen gebieden om te laten vervallen. +admincmd.decay.disabled_globally = Globaal uitgeschakeld +admincmd.map.status_header = Wereldkaart Status +admincmd.debug.status_header = Debug Logging Status +admincmd.debug.full_status_header = HyperFactions Debug Status +common.no_description = Geen beschrijving ingesteld. +common.member_count = {0} leden +common.economy_disabled = Economiesysteem is niet ingeschakeld. +territory.display.wilderness = Wildernis +territory.display.safezone = Veilige Zone +territory.display.warzone = Oorlogszone +territory.display.unknown_faction = Onbekende Factie +territory.secondary.pvp_disabled = PvP Uitgeschakeld +territory.secondary.pvp_no_protection = PvP Ingeschakeld - Geen Bescherming +territory.secondary.your_territory = Jouw Territorium +territory.secondary.faction_territory = Territorium +territory.secondary.relation_territory = {0} Territorium +announce.death_location = {0} stierf op ({1}, {2}, {3}) in {4} diff --git a/src/main/resources/Server/Languages/pl-PL/hyperfactions.lang b/src/main/resources/Server/Languages/pl-PL/hyperfactions.lang index 092800e7..dc451f2f 100644 --- a/src/main/resources/Server/Languages/pl-PL/hyperfactions.lang +++ b/src/main/resources/Server/Languages/pl-PL/hyperfactions.lang @@ -451,3 +451,452 @@ teleport.mount_entry_blocked = Nie możesz wejść do tej strefy na wierzchowcu. chat.display.public = Publiczny chat.display.faction = Frakcja chat.display.ally = Sojusznik + +# ========== System pomocy ========== +help.commands_label = Komendy: +help.default_footer = Użyj /f , aby uzyskać więcej szczegółów +help.title = HyperFactions +help.description = Zarządzanie frakcjami i kontrola terytorium + +# Sekcje pomocy +help.section.core = Podstawowe +help.section.management = Zarządzanie +help.section.territory = Terytorium +help.section.relations = Relacje +help.section.teleport = Teleportacja +help.section.information = Informacje +help.section.other = Inne +help.section.admin = Admin + +# Opisy komend pomocy (Podstawowe) +help.cmd.create = Utwórz frakcję +help.cmd.disband = Rozwiąż swoją frakcję +help.cmd.invite = Zaproś gracza +help.cmd.accept = Przyjmij zaproszenie +help.cmd.request = Poproś o dołączenie do frakcji +help.cmd.leave = Opuść swoją frakcję +help.cmd.kick = Wyrzuć członka + +# Opisy komend pomocy (Zarządzanie) +help.cmd.rename = Zmień nazwę frakcji +help.cmd.desc = Ustaw opis frakcji +help.cmd.color = Ustaw kolor frakcji +help.cmd.open = Pozwól każdemu dołączyć +help.cmd.close = Wymagaj zaproszenia do dołączenia +help.cmd.promote = Awansuj na oficera +help.cmd.demote = Zdegraduj do członka +help.cmd.transfer = Przekaż przywództwo + +# Opisy komend pomocy (Terytorium) +help.cmd.claim = Zajmij ten chunk +help.cmd.unclaim = Zrzecz się tego chunka +help.cmd.overclaim = Przejmij terytorium wroga +help.cmd.map = Pokaż mapę terytorium + +# Opisy komend pomocy (Relacje) +help.cmd.ally = Poproś o sojusz +help.cmd.enemy = Ogłoś wroga +help.cmd.neutral = Ustaw neutralną relację + +# Opisy komend pomocy (Teleportacja) +help.cmd.home = Teleportuj się do domu frakcji +help.cmd.sethome = Ustaw dom frakcji +help.cmd.stuck = Ucieknij z terytorium wroga + +# Opisy komend pomocy (Informacje) +help.cmd.info = Pokaż informacje o frakcji +help.cmd.list = Lista wszystkich frakcji +help.cmd.browse = Przeglądaj frakcje (alias dla list) +help.cmd.members = Pokaż członków frakcji +help.cmd.invites = Zarządzaj zaproszeniami/prośbami +help.cmd.who = Pokaż informacje o graczu +help.cmd.power = Pokaż poziom mocy +help.cmd.gui = Otwórz GUI frakcji +help.cmd.settings = Otwórz ustawienia frakcji + +# Opisy komend pomocy (Inne) +help.cmd.chat = Wyślij wiadomość na czacie frakcji +help.cmd.chat_short = Czat frakcji (skrót) + +# Opisy komend pomocy (Admin w głównej pomocy) +help.cmd.admin = Otwórz GUI admina +help.cmd.admin_reload = Przeładuj konfigurację +help.cmd.admin_sync = Synchronizuj dane z dysku +help.cmd.admin_factions = Zarządzaj frakcjami +help.cmd.admin_zones = Zarządzaj strefami +help.cmd.admin_config = Wyświetl/edytuj konfigurację +help.cmd.admin_backups = Zarządzaj kopiami zapasowymi +help.cmd.admin_update = Sprawdź aktualizacje +help.cmd.admin_debug = Komendy debugowania + +# Strona pomocy admina +help.admin.title = Komendy admina +help.admin.description = Administracja serwera +help.admin.cmd.dashboard = Otwórz GUI panelu admina +help.admin.cmd.factions = Zarządzaj wszystkimi frakcjami +help.admin.cmd.zone = Zarządzanie strefami +help.admin.cmd.config = Konfiguracja serwera +help.admin.cmd.backup = Zarządzanie kopiami zapasowymi +help.admin.cmd.import_cmd = Importuj z innych pluginów +help.admin.cmd.update = Sprawdź i pobierz aktualizacje +help.admin.cmd.update_mixin = Zaktualizuj HyperProtect-Mixin +help.admin.cmd.update_toggle = Włącz/wyłącz auto-pobieranie HP-Mixin +help.admin.cmd.rollback = Przywróć poprzednią wersję +help.admin.cmd.reload = Przeładuj konfigurację +help.admin.cmd.sync = Synchronizuj dane z dysku +help.admin.cmd.debug = Komendy debugowania +help.admin.cmd.decay = Zarządzanie wygasaniem terenów +help.admin.cmd.map = Zarządzanie mapą świata +help.admin.cmd.safezone = Utwórz SafeZone + zajmij chunk +help.admin.cmd.warzone = Utwórz WarZone + zajmij chunk +help.admin.cmd.removezone = Usuń chunk ze strefy +help.admin.cmd.zoneflag = Ustaw flagę strefy +help.admin.cmd.integrations = Podsumowanie wszystkich integracji +help.admin.cmd.integration = Szczegółowy status integracji +help.admin.cmd.clearhistory = Wyczyść historię członkostwa gracza +help.admin.cmd.power = Zarządzanie mocą admina +help.admin.cmd.economy = Zarządzanie ekonomią/skarbcem +help.admin.cmd.economy_upkeep = Ręcznie uruchom pobieranie utrzymania +help.admin.cmd.info = Wyświetl GUI info frakcji admina +help.admin.cmd.who = Wyświetl GUI info gracza admina +help.admin.cmd.log = Wyświetl globalny dziennik aktywności +help.admin.cmd.world = Zarządzanie ustawieniami per świat +help.admin.cmd.version = Wyświetl wersję moda i status integracji +help.admin.cmd.sentry = Wyświetl status Sentry +help.admin.cmd.sentry_disable = Wyłącz raportowanie błędów Sentry +help.admin.cmd.sentry_enable = Włącz raportowanie błędów Sentry +help.admin.cmd.test_gui = Otwórz stronę testową elementów UI +help.admin.cmd.test_sentry = Wyślij testowy błąd do Sentry +help.admin.cmd.test_md = Otwórz stronę testową renderowania markdown + +# Pod-pomoc: Kopia zapasowa +help.backup.title = Zarządzanie kopiami zapasowymi +help.backup.description = Schemat rotacji GFS +help.backup.cmd.create = Utwórz ręczną kopię zapasową +help.backup.cmd.list = Lista kopii zapasowych pogrupowanych wg typu +help.backup.cmd.restore = Przywróć z kopii zapasowej (wymaga potwierdzenia) +help.backup.cmd.delete = Usuń kopię zapasową + +# Pod-pomoc: Debug +help.debug.title = Komendy debugowania +help.debug.description = Diagnostyka i rozwiązywanie problemów +help.debug.cmd.toggle = Włącz/wyłącz logowanie debugowania +help.debug.cmd.status = Pokaż status debugowania +help.debug.cmd.power = Pokaż szczegóły mocy +help.debug.cmd.claim = Pokaż informacje o terenie +help.debug.cmd.protection = Pokaż informacje o ochronie +help.debug.cmd.combat = Pokaż status oznaczenia bojowego +help.debug.cmd.relation = Pokaż informacje o relacjach + +# Pod-pomoc: Moc +help.power.title = Moc admina +help.power.description = Zarządzaj mocą gracza/frakcji +help.power.cmd.set = Ustaw dokładną moc +help.power.cmd.add = Zwiększ moc +help.power.cmd.remove = Zmniejsz moc +help.power.cmd.reset = Przywróć domyślną wartość +help.power.cmd.setmax = Ustaw nadpisanie maksymalnej mocy +help.power.cmd.resetmax = Usuń nadpisanie maksymalnej mocy +help.power.cmd.noloss = Włącz/wyłącz bypass utraty mocy +help.power.cmd.nodecay = Włącz/wyłącz zwolnienie z wygasania +help.power.cmd.faction = Operacje na całej frakcji +help.power.cmd.info = Pokaż szczegóły mocy gracza + +# Pod-pomoc: Ekonomia +help.economy.title = Ekonomia admina +help.economy.description = Zarządzaj skarbcami frakcji +help.economy.cmd.balance = Pokaż saldo frakcji +help.economy.cmd.set = Ustaw dokładne saldo +help.economy.cmd.add = Dodaj do salda +help.economy.cmd.take = Odejmij od salda +help.economy.cmd.total = Pokaż łączne saldo serwera +help.economy.cmd.reset = Zresetuj saldo do 0 +help.economy.cmd.upkeep = Ręcznie uruchom pobieranie utrzymania + +# Pod-pomoc: Świat +help.world.title = Ustawienia świata +help.world.description = Konfiguracja per świat +help.world.cmd.list = Lista wszystkich skonfigurowanych światów +help.world.cmd.info = Pokaż ustawienia świata +help.world.cmd.set = Ustaw ustawienie świata +help.world.cmd.reset = Usuń ustawienia specyficzne dla świata + +# Pod-pomoc: Mapa +help.map.title = Mapa świata +help.map.description = Zarządzanie nakładką mapy +help.map.cmd.status = Pokaż status i statystyki mapy świata +help.map.cmd.refresh = Wymuś natychmiastowe odświeżenie mapy + +# Pod-pomoc: Wygasanie +help.decay.title = Wygasanie terenów +help.decay.description = Automatycznie usuwa tereny nieaktywnych frakcji +help.decay.cmd.status = Pokaż status wygasania +help.decay.cmd.run = Ręcznie uruchom wygasanie terenów +help.decay.cmd.check = Sprawdź status wygasania frakcji + +# Pod-pomoc: Import +help.import.title = Komendy importu +help.import.description = Migracja z innych pluginów frakcji +help.import.cmd.hyfactions = Importuj z moda HyFactions +help.import.path.hyfactions = Domyślna ścieżka: mods/Kaws_Hyfaction +help.import.cmd.elbaphfactions = Importuj z moda ElbaphFactions +help.import.path.elbaphfactions = Domyślna ścieżka: mods/ElbaphFactions +help.import.cmd.factionsx = Importuj z moda FactionsX +help.import.path.factionsx = Domyślna ścieżka: mods/FactionsX +help.import.cmd.simpleclaims = Importuj z moda SimpleClaims +help.import.path.simpleclaims = Domyślna ścieżka: Server/universe/SimpleClaims +help.import.flags_header = Flagi: +help.import.flag.dryrun = Symuluj bez zmian +help.import.flag.overwrite = Zastąp istniejące frakcje +help.import.flag.nozones = Pomiń import stref +help.import.flag.nopower = Pomiń dystrybucję mocy + +# Pod-pomoc: Test +help.test.title = Komendy testowe +help.test.description = Narzędzia testowe dla programistów +help.test.cmd.gui = Otwórz stronę testową elementów UI +help.test.cmd.sentry = Wyślij testowy błąd do Sentry +help.test.cmd.md = Otwórz stronę testową renderowania markdown + +# ========== Wiadomości Admin CLI ========== +admincmd.no_permission = Nie masz uprawnień. +admincmd.player_only = Ta komenda może być użyta tylko przez gracza. +admincmd.player_context = Kontekst gracza niedostępny. +admincmd.entity_not_found = Nie udało się znaleźć encji gracza. +admincmd.unknown_command = Nieznana komenda admina. Użyj /f admin help +admincmd.faction_not_found = Nie znaleziono frakcji. +admincmd.player_not_found = Nie znaleziono gracza: {0} +admincmd.invalid_number = Nieprawidłowa liczba: {0} +admincmd.amount_positive = Kwota musi być dodatnia. +admincmd.balance_not_negative = Saldo nie może być ujemne. +admincmd.error_generic = Wystąpił błąd. + +# Admin - Przeładowanie/Synchronizacja +admincmd.reload.success = Konfiguracja przeładowana. +admincmd.sync.start = Synchronizacja danych frakcji z dysku... +admincmd.sync.complete = Synchronizacja zakończona: {0} frakcji zaktualizowanych, {1} członków dodanych, {2} członków zaktualizowanych. +admincmd.sync.failed = Synchronizacja nieudana: {0} + +# Admin - Wersja +admincmd.version.title = Informacje o wersji +admincmd.version.server = Hytale Server: {0} +admincmd.version.java = Java: {0} +admincmd.version.treasury = Skarbiec: {0} +admincmd.version.active = Aktywny +admincmd.version.not_found = Nie znaleziono + +# Admin - Sentry +admincmd.sentry.header = Sentry - raportowanie błędów +admincmd.sentry.config = Konfiguracja: {0} +admincmd.sentry.status = Status: {0} +admincmd.sentry.already_disabled = Sentry jest już wyłączone. +admincmd.sentry.already_enabled = Sentry jest już włączone. +admincmd.sentry.disabled = Sentry wyłączone, konfiguracja zapisana. Raportowanie błędów jest teraz wyłączone. +admincmd.sentry.enabled = Sentry włączone, konfiguracja zapisana. Raportowanie błędów jest teraz włączone. +admincmd.sentry.usage = Użycie: /f admin sentry [disable|enable] +admincmd.sentry.not_initialized = Sentry nie jest zainicjalizowane. Sprawdź config/debug.json +admincmd.sentry.test_sent = Testowy błąd wysłany do Sentry. Sprawdź panel Sentry. +admincmd.sentry.test_failed = Nie udało się wysłać zdarzenia testowego. + +# Admin - Kopia zapasowa +admincmd.backup.no_permission = Nie masz uprawnień do zarządzania kopiami zapasowymi. +admincmd.backup.creating = Tworzenie kopii zapasowej... +admincmd.backup.created = Kopia zapasowa utworzona pomyślnie! +admincmd.backup.name = Nazwa: {0} +admincmd.backup.size = Rozmiar: {0} +admincmd.backup.failed = Kopia zapasowa nieudana: {0} +admincmd.backup.none = Nie znaleziono kopii zapasowych. +admincmd.backup.header = Kopie zapasowe +admincmd.backup.not_found = Kopia zapasowa '{0}' nie znaleziona. +admincmd.backup.unknown_command = Nieznana komenda kopii zapasowej: {0} +admincmd.backup.usage_restore = Użycie: /f admin backup restore +admincmd.backup.usage_delete = Użycie: /f admin backup delete +admincmd.backup.restore_warning = UWAGA: Przywracanie nadpisze bieżące dane! +admincmd.backup.restore_confirm = Wpisz komendę ponownie w ciągu {0} sekund, aby potwierdzić. +admincmd.backup.restoring = Przywracanie kopii zapasowej... +admincmd.backup.restored = Kopia zapasowa przywrócona pomyślnie! Dane przeładowane. +admincmd.backup.restore_failed = Przywracanie nieudane: {0} +admincmd.backup.confirm_cancelled = Poprzednie potwierdzenie anulowane. Wpisz ponownie, aby potwierdzić przywracanie. +admincmd.backup.deleted = Usunięto kopię zapasową '{0}' +admincmd.backup.delete_failed = Nie udało się usunąć kopii zapasowej. + +# Admin - Debug +admincmd.debug.no_permission = Nie masz uprawnień do korzystania z komend debugowania. +admincmd.debug.unknown_command = Nieznana komenda debugowania: {0} +admincmd.debug.player_only = Ta komenda debugowania może być użyta tylko przez gracza. +admincmd.debug.toggle_set = Kategoria debugowania '{0}' ustawiona na {1} (zapisane) +admincmd.debug.all_enabled = Wszystkie kategorie debugowania włączone. +admincmd.debug.all_disabled = Wszystkie kategorie debugowania wyłączone. +admincmd.debug.unknown_category = Nieznana kategoria: {0} +admincmd.debug.not_implemented = Informacje debugowania {0} jeszcze niezaimplementowane. + +# Admin - Ekonomia +admincmd.econ.disabled = System ekonomii nie jest włączony. +admincmd.econ.unknown_command = Nieznana komenda ekonomii. Użyj /f admin economy help +admincmd.econ.set = Ustawiono saldo {0} na {1} (było {2}) +admincmd.econ.added = Dodano {0} do {1} (saldo: {2}) +admincmd.econ.deducted = Odjęto {0} od {1} (saldo: {2}) +admincmd.econ.reset = Zresetowano saldo {0} do {1} (było {2}) +admincmd.econ.failed = Błąd: {0} +admincmd.econ.total_header = Statystyki ekonomii serwera +admincmd.econ.upkeep_disabled = System utrzymania nie jest włączony. +admincmd.econ.upkeep_trigger = Ręczne uruchamianie pobierania utrzymania... +admincmd.econ.upkeep_complete = Pobieranie utrzymania zakończone. Sprawdź logi serwera po szczegóły. +admincmd.econ.upkeep_failed = Pobieranie utrzymania nieudane: {0} + +# Admin - Moc +admincmd.power.no_permission = Nie masz uprawnień. +admincmd.power.unknown_command = Nieznana komenda mocy. Użyj /f admin power help +admincmd.power.max_positive = Maksymalna moc musi być dodatnia. +admincmd.power.faction_unknown_action = Nieznana akcja mocy frakcji. Użyj: set, add, remove, reset + +# Admin - Czyszczenie historii +admincmd.history.no_data = Nie znaleziono danych gracza dla {0}. +admincmd.history.empty = {0} nie ma historii członkostwa. +admincmd.history.cleared = Wyczyszczono {0} rekordów historii dla {1}. +admincmd.history.cleared_reinit = Wyczyszczono {0} rekordów historii dla {1} (ponownie zainicjalizowano z bieżącą frakcją: {2}). + +# Admin - Strefa +admincmd.zone.created = Utworzono {0} '{1}' na {2}, {3} +admincmd.zone.chunk_claimed = Nie można utworzyć strefy: Ten chunk jest zajęty przez frakcję. +admincmd.zone.already_exists = Strefa już istnieje w tej lokalizacji. +admincmd.zone.name_taken = Strefa o tej nazwie już istnieje. +admincmd.zone.not_found = Strefa '{0}' nie znaleziona. +admincmd.zone.unclaimed = Chunk usunięty ze strefy. +admincmd.zone.no_chunk = Nie znaleziono chunka strefy w tej lokalizacji. +admincmd.zone.none = Brak zdefiniowanych stref. +admincmd.zone.deleted = Usunięto strefę '{0}' ({1} chunków zwolnionych) +admincmd.zone.renamed = Zmieniono nazwę strefy '{0}' na '{1}' +admincmd.zone.invalid_type = Nieprawidłowy typ strefy. Użyj 'safe' lub 'war' +admincmd.zone.invalid_name = Nieprawidłowa nazwa strefy. Musi mieć 1-32 znaki. +admincmd.zone.claimed_radius = Zajęto {0} chunków dla strefy '{1}' +admincmd.zone.no_chunks_claimed = Żadne chunki nie mogły zostać zajęte (wszystkie zajęte lub już w strefie). +admincmd.zone.unknown_command = Nieznana komenda strefy. Użyj /f admin help +admincmd.zone.chunk_has_zone = Ten chunk już należy do innej strefy. +admincmd.zone.chunk_has_faction = Ten chunk jest zajęty przez frakcję. +admincmd.zone.notify_set = Powiadomienie o wejściu do strefy '{0}' {1} +admincmd.zone.title_set = Ustawiono tytuł {0} dla strefy '{1}' na: {2} +admincmd.zone.title_cleared = Wyczyszczono tytuł {0} dla strefy '{1}' (użyto domyślnego) +admincmd.zone.no_zone_at = Brak strefy w Twojej lokalizacji. Stań w strefie, aby zarządzać flagami. +admincmd.zone.flag_cleared = Wyczyszczono flagę '{0}' (teraz używa domyślnej: {1}) +admincmd.zone.flag_set = Ustawiono flagę '{0}' na {1} +admincmd.zone.flag_invalid = Nieprawidłowa flaga: {0} +admincmd.zone.flags_cleared = Wyczyszczono wszystkie niestandardowe flagi dla '{0}' — teraz używa domyślnych wartości typu strefy. + +# Admin - Świat +admincmd.world.unknown_command = Nieznana komenda świata. Użyj /f admin world help +admincmd.world.no_settings = Brak skonfigurowanych ustawień per świat. +admincmd.world.unknown_setting = Nieznane ustawienie: {0} +admincmd.world.set = Ustawiono {0}={1} dla świata {2} +admincmd.world.reset = Usunięto ustawienia specyficzne dla świata: {0} +admincmd.world.not_found = Nie znaleziono ustawień dla świata: {0} + +# Admin - Mapa/Wygasanie +admincmd.map.not_available = Usługa mapy świata jest niedostępna. +admincmd.map.refreshing = Wymuszanie odświeżenia mapy świata... +admincmd.map.refreshed = Odświeżenie mapy świata zakończone. +admincmd.map.unknown_command = Nieznana komenda mapy: {0} +admincmd.decay.disabled = Wygasanie terenów jest wyłączone w konfiguracji. +admincmd.decay.running = Uruchamianie sprawdzania wygasania terenów... +admincmd.decay.complete = Sprawdzanie wygasania terenów zakończone. Sprawdź konsolę po szczegóły. +admincmd.decay.unknown_command = Nieznana komenda wygasania: {0} + +# Admin - Aktualizacja +admincmd.update.not_available = Sprawdzanie aktualizacji jest niedostępne. +admincmd.update.checking = Sprawdzanie aktualizacji... +admincmd.update.up_to_date = Plugin jest już aktualny (v{0}) +admincmd.update.available = Dostępna aktualizacja: v{0} +admincmd.update.unknown_target = Nieznany cel aktualizacji: {0} + +# Admin - Import +admincmd.import.unknown_source = Nieznane źródło importu: {0} +admincmd.import.importing = Importowanie z {0}... +admincmd.import.complete = Import z {0} {1}zakończony! +admincmd.import.failed = Import z {0} nieudany z błędami: + +# Admin - Update Notifications +admincmd.update_notify.new_version = [HyperFactions] Dostępna jest nowa wersja! +admincmd.update_notify.version_info = Aktualna: v{0} -> Najnowsza: v{1} +admincmd.update_notify.instruction = Uruchom /f admin update, aby zaktualizować plugin. +admincmd.update_notify.up_to_date = [HyperFactions] Plugin jest aktualny (v{0}) +admincmd.update.no_info = Brak dostępnych informacji o aktualizacji. +admincmd.update.creating_backup = Tworzenie kopii zapasowej przed aktualizacją... +admincmd.update.backup_created = Kopia zapasowa utworzona: {0} +admincmd.update.backup_warning = Uwaga: Kopia zapasowa nie powiodła się - {0} +admincmd.update.backup_continue = Kontynuowanie aktualizacji mimo to... +admincmd.update.downloading = Pobieranie HyperFactions v{0}... +admincmd.update.download_failed = Pobieranie nie powiodło się. Sprawdź logi serwera. +admincmd.update.downloaded = Aktualizacja pobrana pomyślnie! +admincmd.update.file_label = Plik: {0} +admincmd.update.cleanup = Czyszczenie: Usunięto {0} starych kopii zapasowych +admincmd.update.kept_backup = Zachowano: {0} (do przywracania) +admincmd.update.restart = Uruchom ponownie serwer, aby zastosować aktualizację. +admincmd.update.use_rollback = Użyj /f admin rollback, aby cofnąć przed restartem. +admincmd.update.usage_hf = /f admin update — zaktualizuj HyperFactions +admincmd.update.usage_mixin = /f admin update mixin — zaktualizuj HyperProtect-Mixin +admincmd.update.usage_toggle = /f admin update toggle-mixin-download — przełącz automatyczne pobieranie +admincmd.update.mixin_current = HyperProtect-Mixin: {0} +admincmd.update.mixin_up_to_date = HyperProtect-Mixin jest aktualny. +admincmd.update.mixin_none = Brak dostępnych wydań HyperProtect-Mixin. +admincmd.update.mixin_available = Dostępna: v{0} +admincmd.update.mixin_downloading = Pobieranie HyperProtect-Mixin v{0}... +admincmd.update.mixin_downloaded = Pobrano pomyślnie! +admincmd.update.mixin_failed = Pobieranie nie powiodło się. Sprawdź logi serwera. +admincmd.update.mixin_location = Lokalizacja: earlyplugins/ +admincmd.update.mixin_restart = Uruchom ponownie serwer, aby zastosować. +admincmd.update.mixin_auto_on = Automatyczne pobieranie HP-Mixin włączone. +admincmd.update.mixin_auto_on_desc = HyperProtect-Mixin zostanie pobrany automatycznie przy następnym uruchomieniu, jeśli nie jest zainstalowany. +admincmd.update.mixin_auto_off = Automatyczne pobieranie HP-Mixin wyłączone. +admincmd.update.mixin_auto_off_desc = Użyj /f admin update mixin, aby pobrać ręcznie. +admincmd.rollback.no_backup = Nie znaleziono JAR kopii zapasowej do przywrócenia. +admincmd.rollback.unsafe = Nie można automatycznie przywrócić! +admincmd.rollback.unsafe_reason = Serwer został uruchomiony ponownie od ostatniej aktualizacji. +admincmd.rollback.unsafe_migration = Migracje konfiguracji/danych mogły zostać zastosowane. +admincmd.rollback.instructions = Aby bezpiecznie przywrócić, musisz: +admincmd.rollback.find_backup = Użyj /f admin backup list, aby znaleźć kopię zapasową sprzed aktualizacji. +admincmd.rollback.rolling = Przywracanie aktualizacji... +admincmd.rollback.from = Z: v{0} (nowa) +admincmd.rollback.to = Do: v{0} (poprzednia) +admincmd.rollback.version = Przywracanie do v{0}... +admincmd.rollback.success = Przywracanie zakończone sukcesem! +admincmd.rollback.restored = Przywrócono: {0} +admincmd.rollback.removed = Usunięto: {0} +admincmd.rollback.restart = Uruchom ponownie serwer, aby zastosować przywracanie. +admincmd.rollback.failed = Przywracanie nie powiodło się: {0} +admincmd.zone.failed = Niepowodzenie: {0} +admincmd.zone.failed_delete = Nie można usunąć strefy: {0} +admincmd.zone.failed_rename = Nie można zmienić nazwy strefy: {0} +admincmd.zone.failed_flags = Nie można zresetować flag. +admincmd.zone.failed_flag = Nie można ustawić flagi. +admincmd.zone.list_header = Strefy ({0}) +admincmd.zone.info_header = Strefa: {0} +admincmd.zone.info_notify = Powiadomienie: {0} +admincmd.zone.info_upper_title = Górny tytuł: {0} +admincmd.zone.info_lower_title = Dolny tytuł: {0} +admincmd.zone.info_custom_flags = Niestandardowe flagi: +admincmd.zone.flags_header = Flagi Strefy: {0} +admincmd.zone.flags_type = Typ Strefy: {0} +admincmd.zone.player_only = Ta komenda może być użyta tylko przez gracza. +admincmd.decay.status_header = Status Degradacji Terytoriów +admincmd.decay.enable_hint = Ustaw claims.decayEnabled na true, aby aktywować. +admincmd.decay.error = Błąd podczas degradacji: {0} +admincmd.decay.check_header = Sprawdzanie Degradacji: {0} +admincmd.decay.check_not_found = Frakcja '{0}' nie znaleziona. +admincmd.decay.no_claims = Brak terytoriów do degradacji. +admincmd.decay.disabled_globally = Wyłączone globalnie +admincmd.map.status_header = Status Mapy Świata +admincmd.debug.status_header = Status Logowania Debugowania +admincmd.debug.full_status_header = Status Debugowania HyperFactions +common.no_description = Brak ustawionego opisu. +common.member_count = {0} członków +common.economy_disabled = System ekonomii nie jest włączony. +territory.display.wilderness = Dzicz +territory.display.safezone = Strefa Bezpieczna +territory.display.warzone = Strefa Wojenna +territory.display.unknown_faction = Nieznana Frakcja +territory.secondary.pvp_disabled = PvP Wyłączone +territory.secondary.pvp_no_protection = PvP Włączone - Bez Ochrony +territory.secondary.your_territory = Twoje Terytorium +territory.secondary.faction_territory = Terytorium +territory.secondary.relation_territory = Terytorium {0} +announce.death_location = {0} zginął/a w ({1}, {2}, {3}) w {4} diff --git a/src/main/resources/Server/Languages/pt-BR/hyperfactions.lang b/src/main/resources/Server/Languages/pt-BR/hyperfactions.lang index a318ba5d..e3f3eec7 100644 --- a/src/main/resources/Server/Languages/pt-BR/hyperfactions.lang +++ b/src/main/resources/Server/Languages/pt-BR/hyperfactions.lang @@ -451,3 +451,452 @@ teleport.mount_entry_blocked = Você não pode entrar nesta zona enquanto montad chat.display.public = Público chat.display.faction = Facção chat.display.ally = Aliado + +# ========== Sistema de Ajuda ========== +help.commands_label = Comandos: +help.default_footer = Use /f para mais detalhes +help.title = HyperFactions +help.description = Gerenciamento de facções e controle de território + +# Seções de ajuda +help.section.core = Principal +help.section.management = Gerenciamento +help.section.territory = Território +help.section.relations = Relações +help.section.teleport = Teletransporte +help.section.information = Informações +help.section.other = Outros +help.section.admin = Admin + +# Descrições de comandos (Principal) +help.cmd.create = Criar uma facção +help.cmd.disband = Dissolver sua facção +help.cmd.invite = Convidar um jogador +help.cmd.accept = Aceitar um convite +help.cmd.request = Solicitar entrada em uma facção +help.cmd.leave = Sair da sua facção +help.cmd.kick = Expulsar um membro + +# Descrições de comandos (Gerenciamento) +help.cmd.rename = Renomear sua facção +help.cmd.desc = Definir descrição da facção +help.cmd.color = Definir cor da facção +help.cmd.open = Permitir entrada livre +help.cmd.close = Exigir convite para entrar +help.cmd.promote = Promover a oficial +help.cmd.demote = Rebaixar a membro +help.cmd.transfer = Transferir liderança + +# Descrições de comandos (Território) +help.cmd.claim = Reivindicar este chunk +help.cmd.unclaim = Desreivindicar este chunk +help.cmd.overclaim = Conquistar território inimigo +help.cmd.map = Ver mapa de território + +# Descrições de comandos (Relações) +help.cmd.ally = Solicitar aliança +help.cmd.enemy = Declarar inimigo +help.cmd.neutral = Definir relação neutra + +# Descrições de comandos (Teletransporte) +help.cmd.home = Teleportar para a base da facção +help.cmd.sethome = Definir base da facção +help.cmd.stuck = Escapar de território inimigo + +# Descrições de comandos (Informações) +help.cmd.info = Ver informações da facção +help.cmd.list = Listar todas as facções +help.cmd.browse = Navegar pelas facções (alias para list) +help.cmd.members = Ver membros da facção +help.cmd.invites = Gerenciar convites/solicitações +help.cmd.who = Ver informações do jogador +help.cmd.power = Ver nível de poder +help.cmd.gui = Abrir GUI da facção +help.cmd.settings = Abrir configurações da facção + +# Descrições de comandos (Outros) +help.cmd.chat = Enviar mensagem no chat da facção +help.cmd.chat_short = Chat da facção (abreviado) + +# Descrições de comandos (Admin na ajuda principal) +help.cmd.admin = Abrir GUI de admin +help.cmd.admin_reload = Recarregar configuração +help.cmd.admin_sync = Sincronizar dados do disco +help.cmd.admin_factions = Gerenciar facções +help.cmd.admin_zones = Gerenciar zonas +help.cmd.admin_config = Ver/editar configuração +help.cmd.admin_backups = Gerenciar backups +help.cmd.admin_update = Verificar atualizações +help.cmd.admin_debug = Comandos de depuração + +# Página de ajuda do admin +help.admin.title = Comandos de Admin +help.admin.description = Administração do servidor +help.admin.cmd.dashboard = Abrir GUI do painel admin +help.admin.cmd.factions = Gerenciar todas as facções +help.admin.cmd.zone = Gerenciamento de zonas +help.admin.cmd.config = Configuração do servidor +help.admin.cmd.backup = Gerenciamento de backups +help.admin.cmd.import_cmd = Importar de outros plugins +help.admin.cmd.update = Verificar e baixar atualizações +help.admin.cmd.update_mixin = Atualizar HyperProtect-Mixin +help.admin.cmd.update_toggle = Alternar auto-download do HP-Mixin +help.admin.cmd.rollback = Reverter para versão anterior +help.admin.cmd.reload = Recarregar configuração +help.admin.cmd.sync = Sincronizar dados do disco +help.admin.cmd.debug = Comandos de depuração +help.admin.cmd.decay = Gerenciamento de deterioração de claims +help.admin.cmd.map = Gerenciamento do mapa mundial +help.admin.cmd.safezone = Criar SafeZone + reivindicar chunk +help.admin.cmd.warzone = Criar WarZone + reivindicar chunk +help.admin.cmd.removezone = Desreivindicar chunk da zona +help.admin.cmd.zoneflag = Definir flag de zona +help.admin.cmd.integrations = Resumo de todas as integrações +help.admin.cmd.integration = Status detalhado da integração +help.admin.cmd.clearhistory = Limpar histórico de membros do jogador +help.admin.cmd.power = Gerenciamento admin de poder +help.admin.cmd.economy = Gerenciamento de economia/tesouraria +help.admin.cmd.economy_upkeep = Acionar coleta de manutenção manualmente +help.admin.cmd.info = Ver GUI de info admin da facção +help.admin.cmd.who = Ver GUI de info admin do jogador +help.admin.cmd.log = Ver log de atividade global +help.admin.cmd.world = Gerenciamento de configurações por mundo +help.admin.cmd.version = Ver versão do mod e status de integrações +help.admin.cmd.sentry = Ver status do Sentry +help.admin.cmd.sentry_disable = Desativar relatório de erros do Sentry +help.admin.cmd.sentry_enable = Ativar relatório de erros do Sentry +help.admin.cmd.test_gui = Abrir página de teste de elementos UI +help.admin.cmd.test_sentry = Enviar um erro de teste ao Sentry +help.admin.cmd.test_md = Abrir página de teste de renderização markdown + +# Sub-ajuda: Backup +help.backup.title = Gerenciamento de Backups +help.backup.description = Esquema de rotação GFS +help.backup.cmd.create = Criar backup manual +help.backup.cmd.list = Listar todos os backups agrupados por tipo +help.backup.cmd.restore = Restaurar de um backup (requer confirmação) +help.backup.cmd.delete = Excluir um backup + +# Sub-ajuda: Debug +help.debug.title = Comandos de Depuração +help.debug.description = Diagnósticos e solução de problemas +help.debug.cmd.toggle = Alternar log de depuração +help.debug.cmd.status = Mostrar status de depuração +help.debug.cmd.power = Mostrar detalhes de poder +help.debug.cmd.claim = Mostrar info de reivindicação +help.debug.cmd.protection = Mostrar info de proteção +help.debug.cmd.combat = Mostrar status de marca de combate +help.debug.cmd.relation = Mostrar info de relação + +# Sub-ajuda: Poder +help.power.title = Poder Admin +help.power.description = Gerenciar poder de jogador/facção +help.power.cmd.set = Definir poder exato +help.power.cmd.add = Aumentar poder +help.power.cmd.remove = Diminuir poder +help.power.cmd.reset = Redefinir para o padrão +help.power.cmd.setmax = Definir limite máximo de poder +help.power.cmd.resetmax = Limpar limite máximo +help.power.cmd.noloss = Alternar bypass de perda de poder +help.power.cmd.nodecay = Alternar isenção de deterioração de claims +help.power.cmd.faction = Operações em toda a facção +help.power.cmd.info = Mostrar detalhes de poder do jogador + +# Sub-ajuda: Economia +help.economy.title = Economia Admin +help.economy.description = Gerenciar tesourarias de facção +help.economy.cmd.balance = Mostrar saldo da facção +help.economy.cmd.set = Definir saldo exato +help.economy.cmd.add = Adicionar ao saldo +help.economy.cmd.take = Deduzir do saldo +help.economy.cmd.total = Mostrar saldo total do servidor +help.economy.cmd.reset = Redefinir saldo para 0 +help.economy.cmd.upkeep = Acionar coleta de manutenção manualmente + +# Sub-ajuda: Mundo +help.world.title = Configurações de Mundo +help.world.description = Configuração por mundo +help.world.cmd.list = Listar todos os mundos configurados +help.world.cmd.info = Mostrar configurações de um mundo +help.world.cmd.set = Definir uma configuração de mundo +help.world.cmd.reset = Remover configurações específicas do mundo + +# Sub-ajuda: Mapa +help.map.title = Mapa Mundial +help.map.description = Gerenciamento de sobreposição do mapa +help.map.cmd.status = Mostrar status e estatísticas do mapa +help.map.cmd.refresh = Forçar atualização imediata do mapa + +# Sub-ajuda: Deterioração +help.decay.title = Deterioração de Claims +help.decay.description = Remove automaticamente claims de facções inativas +help.decay.cmd.status = Mostrar status de deterioração +help.decay.cmd.run = Acionar deterioração de claims manualmente +help.decay.cmd.check = Verificar status de deterioração da facção + +# Sub-ajuda: Importação +help.import.title = Comandos de Importação +help.import.description = Migrar de outros plugins de facção +help.import.cmd.hyfactions = Importar do mod HyFactions +help.import.path.hyfactions = Caminho padrão: mods/Kaws_Hyfaction +help.import.cmd.elbaphfactions = Importar do mod ElbaphFactions +help.import.path.elbaphfactions = Caminho padrão: mods/ElbaphFactions +help.import.cmd.factionsx = Importar do mod FactionsX +help.import.path.factionsx = Caminho padrão: mods/FactionsX +help.import.cmd.simpleclaims = Importar do mod SimpleClaims +help.import.path.simpleclaims = Caminho padrão: Server/universe/SimpleClaims +help.import.flags_header = Flags: +help.import.flag.dryrun = Simular sem alterações +help.import.flag.overwrite = Substituir facções existentes +help.import.flag.nozones = Pular importação de zonas +help.import.flag.nopower = Pular distribuição de poder + +# Sub-ajuda: Teste +help.test.title = Comandos de Teste +help.test.description = Ferramentas de teste de desenvolvimento +help.test.cmd.gui = Abrir página de teste de elementos UI +help.test.cmd.sentry = Enviar erro de teste ao Sentry +help.test.cmd.md = Abrir página de teste de renderização markdown + +# ========== Mensagens CLI de Admin ========== +admincmd.no_permission = Você não tem permissão. +admincmd.player_only = Este comando só pode ser usado por um jogador. +admincmd.player_context = Contexto do jogador indisponível. +admincmd.entity_not_found = Não foi possível encontrar a entidade do jogador. +admincmd.unknown_command = Comando admin desconhecido. Use /f admin help +admincmd.faction_not_found = Facção não encontrada. +admincmd.player_not_found = Jogador não encontrado: {0} +admincmd.invalid_number = Número inválido: {0} +admincmd.amount_positive = O valor deve ser positivo. +admincmd.balance_not_negative = O saldo não pode ser negativo. +admincmd.error_generic = Ocorreu um erro. + +# Admin - Recarregar/Sincronizar +admincmd.reload.success = Configuração recarregada. +admincmd.sync.start = Sincronizando dados de facção do disco... +admincmd.sync.complete = Sincronização concluída: {0} facções atualizadas, {1} membros adicionados, {2} membros atualizados. +admincmd.sync.failed = Sincronização falhou: {0} + +# Admin - Versão +admincmd.version.title = Informações de Versão +admincmd.version.server = Hytale Server: {0} +admincmd.version.java = Java: {0} +admincmd.version.treasury = Tesouraria: {0} +admincmd.version.active = Ativo +admincmd.version.not_found = Não Encontrado + +# Admin - Sentry +admincmd.sentry.header = Relatório de Erros Sentry +admincmd.sentry.config = Configuração: {0} +admincmd.sentry.status = Status: {0} +admincmd.sentry.already_disabled = Sentry já está desativado. +admincmd.sentry.already_enabled = Sentry já está ativado. +admincmd.sentry.disabled = Sentry desativado e configuração salva. Relatório de erros desligado. +admincmd.sentry.enabled = Sentry ativado e configuração salva. Relatório de erros ligado. +admincmd.sentry.usage = Uso: /f admin sentry [disable|enable] +admincmd.sentry.not_initialized = Sentry não está inicializado. Verifique config/debug.json +admincmd.sentry.test_sent = Erro de teste enviado ao Sentry. Verifique seu painel do Sentry. +admincmd.sentry.test_failed = Falha ao enviar evento de teste. + +# Admin - Backup +admincmd.backup.no_permission = Você não tem permissão para gerenciar backups. +admincmd.backup.creating = Criando backup... +admincmd.backup.created = Backup criado com sucesso! +admincmd.backup.name = Nome: {0} +admincmd.backup.size = Tamanho: {0} +admincmd.backup.failed = Backup falhou: {0} +admincmd.backup.none = Nenhum backup encontrado. +admincmd.backup.header = Backups +admincmd.backup.not_found = Backup '{0}' não encontrado. +admincmd.backup.unknown_command = Comando de backup desconhecido: {0} +admincmd.backup.usage_restore = Uso: /f admin backup restore +admincmd.backup.usage_delete = Uso: /f admin backup delete +admincmd.backup.restore_warning = AVISO: Restaurar backup vai sobrescrever os dados atuais! +admincmd.backup.restore_confirm = Digite o comando novamente dentro de {0} segundos para confirmar. +admincmd.backup.restoring = Restaurando backup... +admincmd.backup.restored = Backup restaurado com sucesso! Dados recarregados. +admincmd.backup.restore_failed = Restauração falhou: {0} +admincmd.backup.confirm_cancelled = Confirmação anterior cancelada. Digite novamente para confirmar a restauração. +admincmd.backup.deleted = Backup '{0}' excluído +admincmd.backup.delete_failed = Falha ao excluir backup. + +# Admin - Debug +admincmd.debug.no_permission = Você não tem permissão para usar comandos de depuração. +admincmd.debug.unknown_command = Comando de depuração desconhecido: {0} +admincmd.debug.player_only = Este comando de depuração só pode ser usado por um jogador. +admincmd.debug.toggle_set = Categoria de depuração '{0}' definida como {1} (salvo) +admincmd.debug.all_enabled = Todas as categorias de depuração ativadas. +admincmd.debug.all_disabled = Todas as categorias de depuração desativadas. +admincmd.debug.unknown_category = Categoria desconhecida: {0} +admincmd.debug.not_implemented = Info de depuração {0} ainda não implementada. + +# Admin - Economia +admincmd.econ.disabled = O sistema de economia não está ativado. +admincmd.econ.unknown_command = Comando de economia desconhecido. Use /f admin economy help +admincmd.econ.set = Saldo de {0} definido para {1} (era {2}) +admincmd.econ.added = Adicionado {0} a {1} (saldo: {2}) +admincmd.econ.deducted = Deduzido {0} de {1} (saldo: {2}) +admincmd.econ.reset = Saldo de {0} redefinido para {1} (era {2}) +admincmd.econ.failed = Falhou: {0} +admincmd.econ.total_header = Estatísticas Econômicas do Servidor +admincmd.econ.upkeep_disabled = O sistema de manutenção não está ativado. +admincmd.econ.upkeep_trigger = Acionando coleta de manutenção manualmente... +admincmd.econ.upkeep_complete = Coleta de manutenção concluída. Verifique o log do servidor para detalhes. +admincmd.econ.upkeep_failed = Coleta de manutenção falhou: {0} + +# Admin - Poder +admincmd.power.no_permission = Você não tem permissão. +admincmd.power.unknown_command = Comando de poder desconhecido. Use /f admin power help +admincmd.power.max_positive = O poder máximo deve ser positivo. +admincmd.power.faction_unknown_action = Ação de poder de facção desconhecida. Use: set, add, remove, reset + +# Admin - Limpar Histórico +admincmd.history.no_data = Nenhum dado de jogador encontrado para {0}. +admincmd.history.empty = {0} não tem histórico de membros. +admincmd.history.cleared = Limpos {0} registros de histórico para {1}. +admincmd.history.cleared_reinit = Limpos {0} registros de histórico para {1} (reinicializado com facção atual: {2}). + +# Admin - Zona +admincmd.zone.created = Criada {0} '{1}' em {2}, {3} +admincmd.zone.chunk_claimed = Não é possível criar zona: Este chunk está reivindicado por uma facção. +admincmd.zone.already_exists = Já existe uma zona neste local. +admincmd.zone.name_taken = Já existe uma zona com esse nome. +admincmd.zone.not_found = Zona '{0}' não encontrada. +admincmd.zone.unclaimed = Chunk desreivindicado da zona. +admincmd.zone.no_chunk = Nenhum chunk de zona encontrado neste local. +admincmd.zone.none = Nenhuma zona definida. +admincmd.zone.deleted = Zona '{0}' excluída ({1} chunks liberados) +admincmd.zone.renamed = Zona '{0}' renomeada para '{1}' +admincmd.zone.invalid_type = Tipo de zona inválido. Use 'safe' ou 'war' +admincmd.zone.invalid_name = Nome de zona inválido. Deve ter 1-32 caracteres. +admincmd.zone.claimed_radius = Reivindicados {0} chunks para a zona '{1}' +admincmd.zone.no_chunks_claimed = Nenhum chunk pôde ser reivindicado (todos ocupados ou já na zona). +admincmd.zone.unknown_command = Comando de zona desconhecido. Use /f admin help +admincmd.zone.chunk_has_zone = Este chunk já pertence a outra zona. +admincmd.zone.chunk_has_faction = Este chunk está reivindicado por uma facção. +admincmd.zone.notify_set = Notificação de entrada da zona '{0}' {1} +admincmd.zone.title_set = Definido título {0} da zona '{1}' para: {2} +admincmd.zone.title_cleared = Removido título {0} da zona '{1}' (usando padrão) +admincmd.zone.no_zone_at = Nenhuma zona na sua localização. Fique em uma zona para gerenciar flags. +admincmd.zone.flag_cleared = Flag '{0}' removida (agora usando padrão: {1}) +admincmd.zone.flag_set = Flag '{0}' definida como {1} +admincmd.zone.flag_invalid = Flag inválida: {0} +admincmd.zone.flags_cleared = Todas as flags personalizadas de '{0}' removidas - agora usando padrões do tipo de zona. + +# Admin - Mundo +admincmd.world.unknown_command = Comando de mundo desconhecido. Use /f admin world help +admincmd.world.no_settings = Nenhuma configuração por mundo definida. +admincmd.world.unknown_setting = Configuração desconhecida: {0} +admincmd.world.set = Definido {0}={1} para o mundo {2} +admincmd.world.reset = Removidas configurações específicas para: {0} +admincmd.world.not_found = Nenhuma configuração encontrada para o mundo: {0} + +# Admin - Mapa/Deterioração +admincmd.map.not_available = Serviço de mapa mundial não disponível. +admincmd.map.refreshing = Forçando atualização completa do mapa... +admincmd.map.refreshed = Atualização do mapa concluída. +admincmd.map.unknown_command = Comando de mapa desconhecido: {0} +admincmd.decay.disabled = Deterioração de claims está desativada na configuração. +admincmd.decay.running = Executando verificação de deterioração de claims... +admincmd.decay.complete = Verificação de deterioração concluída. Verifique o console para detalhes. +admincmd.decay.unknown_command = Comando de deterioração desconhecido: {0} + +# Admin - Atualização +admincmd.update.not_available = Verificador de atualizações não disponível. +admincmd.update.checking = Verificando atualizações... +admincmd.update.up_to_date = O plugin já está atualizado (v{0}) +admincmd.update.available = Atualização disponível: v{0} +admincmd.update.unknown_target = Alvo de atualização desconhecido: {0} + +# Admin - Importação +admincmd.import.unknown_source = Fonte de importação desconhecida: {0} +admincmd.import.importing = Importando de {0}... +admincmd.import.complete = Importação de {0} {1}concluída! +admincmd.import.failed = Importação de {0} falhou com erros: + +# Admin - Update Notifications +admincmd.update_notify.new_version = [HyperFactions] Uma nova versão está disponível! +admincmd.update_notify.version_info = Atual: v{0} -> Mais recente: v{1} +admincmd.update_notify.instruction = Execute /f admin update para atualizar o plugin. +admincmd.update_notify.up_to_date = [HyperFactions] O plugin está atualizado (v{0}) +admincmd.update.no_info = Nenhuma informação de atualização disponível. +admincmd.update.creating_backup = Criando backup pré-atualização... +admincmd.update.backup_created = Backup criado: {0} +admincmd.update.backup_warning = Aviso: Backup falhou - {0} +admincmd.update.backup_continue = Continuando com a atualização mesmo assim... +admincmd.update.downloading = Baixando HyperFactions v{0}... +admincmd.update.download_failed = Falha no download. Verifique os logs do servidor. +admincmd.update.downloaded = Atualização baixada com sucesso! +admincmd.update.file_label = Arquivo: {0} +admincmd.update.cleanup = Limpeza: {0} backup(s) antigo(s) removido(s) +admincmd.update.kept_backup = Mantido: {0} (para reversão) +admincmd.update.restart = Reinicie o servidor para aplicar a atualização. +admincmd.update.use_rollback = Use /f admin rollback para reverter antes de reiniciar. +admincmd.update.usage_hf = /f admin update — atualizar HyperFactions +admincmd.update.usage_mixin = /f admin update mixin — atualizar HyperProtect-Mixin +admincmd.update.usage_toggle = /f admin update toggle-mixin-download — alternar download automático +admincmd.update.mixin_current = HyperProtect-Mixin: {0} +admincmd.update.mixin_up_to_date = HyperProtect-Mixin está atualizado. +admincmd.update.mixin_none = Nenhuma versão do HyperProtect-Mixin disponível ainda. +admincmd.update.mixin_available = Disponível: v{0} +admincmd.update.mixin_downloading = Baixando HyperProtect-Mixin v{0}... +admincmd.update.mixin_downloaded = Baixado com sucesso! +admincmd.update.mixin_failed = Falha no download. Verifique os logs do servidor. +admincmd.update.mixin_location = Local: earlyplugins/ +admincmd.update.mixin_restart = Reinicie o servidor para aplicar. +admincmd.update.mixin_auto_on = Download automático do HP-Mixin ativado. +admincmd.update.mixin_auto_on_desc = O HyperProtect-Mixin será baixado automaticamente na próxima inicialização se não estiver instalado. +admincmd.update.mixin_auto_off = Download automático do HP-Mixin desativado. +admincmd.update.mixin_auto_off_desc = Use /f admin update mixin para baixar manualmente. +admincmd.rollback.no_backup = Nenhum JAR de backup encontrado para reversão. +admincmd.rollback.unsafe = Não é possível reverter automaticamente! +admincmd.rollback.unsafe_reason = O servidor foi reiniciado desde a última atualização. +admincmd.rollback.unsafe_migration = Migrações de configuração/dados podem ter sido aplicadas. +admincmd.rollback.instructions = Para reverter com segurança, você deve: +admincmd.rollback.find_backup = Use /f admin backup list para encontrar o backup pré-atualização. +admincmd.rollback.rolling = Revertendo atualização... +admincmd.rollback.from = De: v{0} (nova) +admincmd.rollback.to = Para: v{0} (anterior) +admincmd.rollback.version = Revertendo para v{0}... +admincmd.rollback.success = Reversão bem-sucedida! +admincmd.rollback.restored = Restaurado: {0} +admincmd.rollback.removed = Removido: {0} +admincmd.rollback.restart = Reinicie o servidor para aplicar a reversão. +admincmd.rollback.failed = Reversão falhou: {0} +admincmd.zone.failed = Falhou: {0} +admincmd.zone.failed_delete = Falha ao excluir zona: {0} +admincmd.zone.failed_rename = Falha ao renomear zona: {0} +admincmd.zone.failed_flags = Falha ao limpar flags. +admincmd.zone.failed_flag = Falha ao definir flag. +admincmd.zone.list_header = Zonas ({0}) +admincmd.zone.info_header = Zona: {0} +admincmd.zone.info_notify = Notificação: {0} +admincmd.zone.info_upper_title = Título superior: {0} +admincmd.zone.info_lower_title = Título inferior: {0} +admincmd.zone.info_custom_flags = Flags personalizados: +admincmd.zone.flags_header = Flags da Zona: {0} +admincmd.zone.flags_type = Tipo de Zona: {0} +admincmd.zone.player_only = Este comando só pode ser usado por um jogador. +admincmd.decay.status_header = Status de Deterioração de Territórios +admincmd.decay.enable_hint = Defina claims.decayEnabled como true para ativar. +admincmd.decay.error = Erro durante deterioração: {0} +admincmd.decay.check_header = Verificação de Deterioração: {0} +admincmd.decay.check_not_found = Facção '{0}' não encontrada. +admincmd.decay.no_claims = Nenhum território para deteriorar. +admincmd.decay.disabled_globally = Desativado globalmente +admincmd.map.status_header = Status do Mapa Mundial +admincmd.debug.status_header = Status de Log de Depuração +admincmd.debug.full_status_header = Status de Depuração do HyperFactions +common.no_description = Nenhuma descrição definida. +common.member_count = {0} membros +common.economy_disabled = O sistema econômico não está habilitado. +territory.display.wilderness = Terras Selvagens +territory.display.safezone = Zona Segura +territory.display.warzone = Zona de Guerra +territory.display.unknown_faction = Facção Desconhecida +territory.secondary.pvp_disabled = PvP Desativado +territory.secondary.pvp_no_protection = PvP Ativado - Sem Proteção +territory.secondary.your_territory = Seu Território +territory.secondary.faction_territory = Território +territory.secondary.relation_territory = Território de {0} +announce.death_location = {0} morreu em ({1}, {2}, {3}) em {4} diff --git a/src/main/resources/Server/Languages/ru-RU/hyperfactions.lang b/src/main/resources/Server/Languages/ru-RU/hyperfactions.lang index 8c78ced0..54d02db5 100644 --- a/src/main/resources/Server/Languages/ru-RU/hyperfactions.lang +++ b/src/main/resources/Server/Languages/ru-RU/hyperfactions.lang @@ -451,3 +451,452 @@ teleport.mount_entry_blocked = Вы не можете войти в эту зо chat.display.public = Общий chat.display.faction = Фракция chat.display.ally = Союзник + +# ========== Система справки ========== +help.commands_label = Команды: +help.default_footer = Используйте /f <команда> для подробностей +help.title = HyperFactions +help.description = Управление фракциями и контроль территорий + +# Разделы справки +help.section.core = Основное +help.section.management = Управление +help.section.territory = Территория +help.section.relations = Отношения +help.section.teleport = Телепортация +help.section.information = Информация +help.section.other = Прочее +help.section.admin = Admin + +# Описания команд (Основное) +help.cmd.create = Создать фракцию +help.cmd.disband = Распустить свою фракцию +help.cmd.invite = Пригласить игрока +help.cmd.accept = Принять приглашение +help.cmd.request = Подать заявку во фракцию +help.cmd.leave = Покинуть свою фракцию +help.cmd.kick = Исключить участника + +# Описания команд (Управление) +help.cmd.rename = Переименовать свою фракцию +help.cmd.desc = Задать описание фракции +help.cmd.color = Задать цвет фракции +help.cmd.open = Разрешить свободное вступление +help.cmd.close = Требовать приглашение для вступления +help.cmd.promote = Повысить до Офицера +help.cmd.demote = Понизить до Участника +help.cmd.transfer = Передать лидерство + +# Описания команд (Территория) +help.cmd.claim = Захватить этот чанк +help.cmd.unclaim = Освободить этот чанк +help.cmd.overclaim = Перезахватить вражескую территорию +help.cmd.map = Посмотреть карту территорий + +# Описания команд (Отношения) +help.cmd.ally = Запросить союз +help.cmd.enemy = Объявить вражду +help.cmd.neutral = Установить нейтралитет + +# Описания команд (Телепортация) +help.cmd.home = Телепортироваться к дому фракции +help.cmd.sethome = Установить дом фракции +help.cmd.stuck = Выбраться из вражеской территории + +# Описания команд (Информация) +help.cmd.info = Просмотр информации о фракции +help.cmd.list = Список всех фракций +help.cmd.browse = Обзор фракций (алиас для list) +help.cmd.members = Просмотр участников фракции +help.cmd.invites = Управление приглашениями/заявками +help.cmd.who = Информация об игроке +help.cmd.power = Просмотр уровня Силы +help.cmd.gui = Открыть GUI фракции +help.cmd.settings = Открыть настройки фракции + +# Описания команд (Прочее) +help.cmd.chat = Отправить сообщение в чат фракции +help.cmd.chat_short = Чат фракции (кратко) + +# Описания команд (Admin в основной справке) +help.cmd.admin = Открыть GUI администратора +help.cmd.admin_reload = Перезагрузить конфигурацию +help.cmd.admin_sync = Синхронизировать данные с диска +help.cmd.admin_factions = Управление фракциями +help.cmd.admin_zones = Управление зонами +help.cmd.admin_config = Просмотр/изменение конфигурации +help.cmd.admin_backups = Управление бэкапами +help.cmd.admin_update = Проверить обновления +help.cmd.admin_debug = Команды отладки + +# Страница справки admin +help.admin.title = Команды администратора +help.admin.description = Администрирование сервера +help.admin.cmd.dashboard = Открыть GUI панели администратора +help.admin.cmd.factions = Управление всеми фракциями +help.admin.cmd.zone = Управление зонами +help.admin.cmd.config = Настройки сервера +help.admin.cmd.backup = Управление бэкапами +help.admin.cmd.import_cmd = Импорт из других плагинов +help.admin.cmd.update = Проверить и скачать обновления +help.admin.cmd.update_mixin = Обновить HyperProtect-Mixin +help.admin.cmd.update_toggle = Вкл/выкл авто-загрузку HP-Mixin +help.admin.cmd.rollback = Откатиться к предыдущей версии +help.admin.cmd.reload = Перезагрузить конфигурацию +help.admin.cmd.sync = Синхронизировать данные с диска +help.admin.cmd.debug = Команды отладки +help.admin.cmd.decay = Управление ветшанием территорий +help.admin.cmd.map = Управление картой мира +help.admin.cmd.safezone = Создать SafeZone + захватить чанк +help.admin.cmd.warzone = Создать WarZone + захватить чанк +help.admin.cmd.removezone = Освободить чанк из зоны +help.admin.cmd.zoneflag = Установить флаг зоны +help.admin.cmd.integrations = Обзор всех интеграций +help.admin.cmd.integration = Подробный статус интеграции +help.admin.cmd.clearhistory = Очистить историю участия игрока +help.admin.cmd.power = Управление Силой (admin) +help.admin.cmd.economy = Управление экономикой/казной +help.admin.cmd.economy_upkeep = Вручную запустить сбор содержания +help.admin.cmd.info = Открыть GUI информации о фракции (admin) +help.admin.cmd.who = Открыть GUI информации об игроке (admin) +help.admin.cmd.log = Просмотр глобального журнала активности +help.admin.cmd.world = Управление настройками по мирам +help.admin.cmd.version = Версия мода и статус интеграций +help.admin.cmd.sentry = Просмотр статуса Sentry +help.admin.cmd.sentry_disable = Отключить отчёты об ошибках Sentry +help.admin.cmd.sentry_enable = Включить отчёты об ошибках Sentry +help.admin.cmd.test_gui = Открыть тестовую страницу UI-элементов +help.admin.cmd.test_sentry = Отправить тестовую ошибку в Sentry +help.admin.cmd.test_md = Открыть тестовую страницу рендеринга markdown + +# Под-справка: Бэкап +help.backup.title = Управление бэкапами +help.backup.description = Схема ротации GFS +help.backup.cmd.create = Создать бэкап вручную +help.backup.cmd.list = Список бэкапов по типам +help.backup.cmd.restore = Восстановить из бэкапа (требует подтверждения) +help.backup.cmd.delete = Удалить бэкап + +# Под-справка: Отладка +help.debug.title = Команды отладки +help.debug.description = Диагностика и устранение неполадок +help.debug.cmd.toggle = Вкл/выкл логирование отладки +help.debug.cmd.status = Показать статус отладки +help.debug.cmd.power = Показать детали Силы +help.debug.cmd.claim = Показать информацию о захвате +help.debug.cmd.protection = Показать информацию о защите +help.debug.cmd.combat = Показать статус боевой метки +help.debug.cmd.relation = Показать информацию об отношениях + +# Под-справка: Сила +help.power.title = Сила (admin) +help.power.description = Управление Силой игрока/фракции +help.power.cmd.set = Установить точное значение Силы +help.power.cmd.add = Увеличить Силу +help.power.cmd.remove = Уменьшить Силу +help.power.cmd.reset = Сбросить до значения по умолчанию +help.power.cmd.setmax = Установить макс. значение Силы +help.power.cmd.resetmax = Сбросить макс. значение +help.power.cmd.noloss = Вкл/выкл обход потери Силы +help.power.cmd.nodecay = Вкл/выкл обход ветшания территорий +help.power.cmd.faction = Операции для всей фракции +help.power.cmd.info = Показать детали Силы игрока + +# Под-справка: Экономика +help.economy.title = Экономика (admin) +help.economy.description = Управление казной фракций +help.economy.cmd.balance = Показать баланс фракции +help.economy.cmd.set = Установить точный баланс +help.economy.cmd.add = Добавить к балансу +help.economy.cmd.take = Вычесть из баланса +help.economy.cmd.total = Общий баланс сервера +help.economy.cmd.reset = Сбросить баланс до 0 +help.economy.cmd.upkeep = Вручную запустить сбор содержания + +# Под-справка: Мир +help.world.title = Настройки мира +help.world.description = Настройка по мирам +help.world.cmd.list = Список настроенных миров +help.world.cmd.info = Показать настройки мира +help.world.cmd.set = Задать настройку мира +help.world.cmd.reset = Сбросить настройки мира + +# Под-справка: Карта +help.map.title = Карта мира +help.map.description = Управление оверлеем карты +help.map.cmd.status = Статус и статистика карты мира +help.map.cmd.refresh = Принудительно обновить карту + +# Под-справка: Ветшание +help.decay.title = Ветшание территорий +help.decay.description = Автоматическое удаление территорий неактивных фракций +help.decay.cmd.status = Показать статус ветшания +help.decay.cmd.run = Вручную запустить проверку ветшания +help.decay.cmd.check = Проверить статус ветшания фракции + +# Под-справка: Импорт +help.import.title = Команды импорта +help.import.description = Миграция из других плагинов фракций +help.import.cmd.hyfactions = Импорт из мода HyFactions +help.import.path.hyfactions = Путь по умолчанию: mods/Kaws_Hyfaction +help.import.cmd.elbaphfactions = Импорт из мода ElbaphFactions +help.import.path.elbaphfactions = Путь по умолчанию: mods/ElbaphFactions +help.import.cmd.factionsx = Импорт из мода FactionsX +help.import.path.factionsx = Путь по умолчанию: mods/FactionsX +help.import.cmd.simpleclaims = Импорт из мода SimpleClaims +help.import.path.simpleclaims = Путь по умолчанию: Server/universe/SimpleClaims +help.import.flags_header = Флаги: +help.import.flag.dryrun = Симуляция без изменений +help.import.flag.overwrite = Заменить существующие фракции +help.import.flag.nozones = Пропустить импорт зон +help.import.flag.nopower = Пропустить распределение Силы + +# Под-справка: Тест +help.test.title = Команды тестирования +help.test.description = Инструменты разработки +help.test.cmd.gui = Открыть тестовую страницу UI-элементов +help.test.cmd.sentry = Отправить тестовую ошибку в Sentry +help.test.cmd.md = Открыть тестовую страницу рендеринга markdown + +# ========== Сообщения CLI администратора ========== +admincmd.no_permission = У вас нет прав. +admincmd.player_only = Эта команда доступна только игрокам. +admincmd.player_context = Контекст игрока недоступен. +admincmd.entity_not_found = Не удалось найти сущность игрока. +admincmd.unknown_command = Неизвестная команда администратора. Используйте /f admin help +admincmd.faction_not_found = Фракция не найдена. +admincmd.player_not_found = Игрок не найден: {0} +admincmd.invalid_number = Недопустимое число: {0} +admincmd.amount_positive = Сумма должна быть положительной. +admincmd.balance_not_negative = Баланс не может быть отрицательным. +admincmd.error_generic = Произошла ошибка. + +# Admin - Перезагрузка/Синхронизация +admincmd.reload.success = Конфигурация перезагружена. +admincmd.sync.start = Синхронизация данных фракций с диска... +admincmd.sync.complete = Синхронизация завершена: {0} фракций обновлено, {1} участников добавлено, {2} участников обновлено. +admincmd.sync.failed = Ошибка синхронизации: {0} + +# Admin - Версия +admincmd.version.title = Информация о версии +admincmd.version.server = Hytale Server: {0} +admincmd.version.java = Java: {0} +admincmd.version.treasury = Казна: {0} +admincmd.version.active = Активно +admincmd.version.not_found = Не найдено + +# Admin - Sentry +admincmd.sentry.header = Отчёты об ошибках Sentry +admincmd.sentry.config = Конфигурация: {0} +admincmd.sentry.status = Статус: {0} +admincmd.sentry.already_disabled = Sentry уже отключён. +admincmd.sentry.already_enabled = Sentry уже включён. +admincmd.sentry.disabled = Sentry отключён, настройки сохранены. Отчёты об ошибках выключены. +admincmd.sentry.enabled = Sentry включён, настройки сохранены. Отчёты об ошибках включены. +admincmd.sentry.usage = Использование: /f admin sentry [disable|enable] +admincmd.sentry.not_initialized = Sentry не инициализирован. Проверьте config/debug.json +admincmd.sentry.test_sent = Тестовая ошибка отправлена в Sentry. Проверьте панель Sentry. +admincmd.sentry.test_failed = Не удалось отправить тестовое событие. + +# Admin - Бэкап +admincmd.backup.no_permission = У вас нет прав на управление бэкапами. +admincmd.backup.creating = Создание бэкапа... +admincmd.backup.created = Бэкап успешно создан! +admincmd.backup.name = Имя: {0} +admincmd.backup.size = Размер: {0} +admincmd.backup.failed = Ошибка бэкапа: {0} +admincmd.backup.none = Бэкапы не найдены. +admincmd.backup.header = Бэкапы +admincmd.backup.not_found = Бэкап '{0}' не найден. +admincmd.backup.unknown_command = Неизвестная команда бэкапа: {0} +admincmd.backup.usage_restore = Использование: /f admin backup restore <имя> +admincmd.backup.usage_delete = Использование: /f admin backup delete <имя> +admincmd.backup.restore_warning = ВНИМАНИЕ: Восстановление бэкапа перезапишет текущие данные! +admincmd.backup.restore_confirm = Введите команду снова в течение {0} секунд для подтверждения. +admincmd.backup.restoring = Восстановление бэкапа... +admincmd.backup.restored = Бэкап успешно восстановлен! Данные перезагружены. +admincmd.backup.restore_failed = Ошибка восстановления: {0} +admincmd.backup.confirm_cancelled = Предыдущее подтверждение отменено. Введите снова для подтверждения восстановления. +admincmd.backup.deleted = Бэкап '{0}' удалён +admincmd.backup.delete_failed = Не удалось удалить бэкап. + +# Admin - Отладка +admincmd.debug.no_permission = У вас нет прав на использование команд отладки. +admincmd.debug.unknown_command = Неизвестная команда отладки: {0} +admincmd.debug.player_only = Эта команда отладки доступна только игрокам. +admincmd.debug.toggle_set = Категория отладки '{0}' установлена в {1} (сохранено) +admincmd.debug.all_enabled = Все категории отладки включены. +admincmd.debug.all_disabled = Все категории отладки отключены. +admincmd.debug.unknown_category = Неизвестная категория: {0} +admincmd.debug.not_implemented = Отладочная информация {0} ещё не реализована. + +# Admin - Экономика +admincmd.econ.disabled = Система экономики не включена. +admincmd.econ.unknown_command = Неизвестная команда экономики. Используйте /f admin economy help +admincmd.econ.set = Баланс {0} установлен в {1} (было {2}) +admincmd.econ.added = Добавлено {0} к {1} (баланс: {2}) +admincmd.econ.deducted = Вычтено {0} из {1} (баланс: {2}) +admincmd.econ.reset = Баланс {0} сброшен до {1} (было {2}) +admincmd.econ.failed = Ошибка: {0} +admincmd.econ.total_header = Экономическая статистика сервера +admincmd.econ.upkeep_disabled = Система содержания не включена. +admincmd.econ.upkeep_trigger = Запуск сбора содержания вручную... +admincmd.econ.upkeep_complete = Сбор содержания завершён. Подробности в журнале сервера. +admincmd.econ.upkeep_failed = Ошибка сбора содержания: {0} + +# Admin - Сила +admincmd.power.no_permission = У вас нет прав. +admincmd.power.unknown_command = Неизвестная команда Силы. Используйте /f admin power help +admincmd.power.max_positive = Максимальная Сила должна быть положительной. +admincmd.power.faction_unknown_action = Неизвестное действие с Силой фракции. Используйте: set, add, remove, reset + +# Admin - Очистка истории +admincmd.history.no_data = Данные игрока {0} не найдены. +admincmd.history.empty = У {0} нет истории участия. +admincmd.history.cleared = Очищено {0} записей истории для {1}. +admincmd.history.cleared_reinit = Очищено {0} записей истории для {1} (переинициализировано с текущей фракцией: {2}). + +# Admin - Зона +admincmd.zone.created = Создана {0} '{1}' в {2}, {3} +admincmd.zone.chunk_claimed = Невозможно создать зону: этот чанк захвачен фракцией. +admincmd.zone.already_exists = В этом месте уже существует зона. +admincmd.zone.name_taken = Зона с таким именем уже существует. +admincmd.zone.not_found = Зона '{0}' не найдена. +admincmd.zone.unclaimed = Чанк освобождён из зоны. +admincmd.zone.no_chunk = В этом месте нет зонного чанка. +admincmd.zone.none = Зоны не определены. +admincmd.zone.deleted = Зона '{0}' удалена ({1} чанков освобождено) +admincmd.zone.renamed = Зона '{0}' переименована в '{1}' +admincmd.zone.invalid_type = Недопустимый тип зоны. Используйте 'safe' или 'war' +admincmd.zone.invalid_name = Недопустимое имя зоны. Должно быть от 1 до 32 символов. +admincmd.zone.claimed_radius = Захвачено {0} чанков для зоны '{1}' +admincmd.zone.no_chunks_claimed = Ни один чанк не удалось захватить (все заняты или уже в зоне). +admincmd.zone.unknown_command = Неизвестная команда зоны. Используйте /f admin help +admincmd.zone.chunk_has_zone = Этот чанк уже принадлежит другой зоне. +admincmd.zone.chunk_has_faction = Этот чанк захвачен фракцией. +admincmd.zone.notify_set = Уведомление при входе в зону '{0}' {1} +admincmd.zone.title_set = Задан {0} заголовок зоны '{1}': {2} +admincmd.zone.title_cleared = Очищен {0} заголовок зоны '{1}' (используется по умолчанию) +admincmd.zone.no_zone_at = В вашем местоположении нет зоны. Встаньте в зону для управления флагами. +admincmd.zone.flag_cleared = Флаг '{0}' сброшен (теперь по умолчанию: {1}) +admincmd.zone.flag_set = Флаг '{0}' установлен в {1} +admincmd.zone.flag_invalid = Недопустимый флаг: {0} +admincmd.zone.flags_cleared = Все пользовательские флаги '{0}' сброшены — используются значения по умолчанию для типа зоны. + +# Admin - Мир +admincmd.world.unknown_command = Неизвестная команда мира. Используйте /f admin world help +admincmd.world.no_settings = Настройки по мирам не заданы. +admincmd.world.unknown_setting = Неизвестная настройка: {0} +admincmd.world.set = Установлено {0}={1} для мира {2} +admincmd.world.reset = Настройки для мира удалены: {0} +admincmd.world.not_found = Настройки для мира не найдены: {0} + +# Admin - Карта/Ветшание +admincmd.map.not_available = Сервис карты мира недоступен. +admincmd.map.refreshing = Принудительное обновление карты мира... +admincmd.map.refreshed = Обновление карты мира завершено. +admincmd.map.unknown_command = Неизвестная команда карты: {0} +admincmd.decay.disabled = Ветшание территорий отключено в конфигурации. +admincmd.decay.running = Проверка ветшания территорий... +admincmd.decay.complete = Проверка ветшания завершена. Подробности в консоли. +admincmd.decay.unknown_command = Неизвестная команда ветшания: {0} + +# Admin - Обновление +admincmd.update.not_available = Система обновления недоступна. +admincmd.update.checking = Проверка обновлений... +admincmd.update.up_to_date = Плагин уже обновлён (v{0}) +admincmd.update.available = Доступно обновление: v{0} +admincmd.update.unknown_target = Неизвестная цель обновления: {0} + +# Admin - Импорт +admincmd.import.unknown_source = Неизвестный источник импорта: {0} +admincmd.import.importing = Импорт из {0}... +admincmd.import.complete = Импорт из {0} {1}завершён! +admincmd.import.failed = Импорт из {0} завершился с ошибками: + +# Admin - Update Notifications +admincmd.update_notify.new_version = [HyperFactions] Доступна новая версия! +admincmd.update_notify.version_info = Текущая: v{0} -> Последняя: v{1} +admincmd.update_notify.instruction = Выполните /f admin update для обновления плагина. +admincmd.update_notify.up_to_date = [HyperFactions] Плагин обновлён (v{0}) +admincmd.update.no_info = Информация об обновлении недоступна. +admincmd.update.creating_backup = Создание резервной копии перед обновлением... +admincmd.update.backup_created = Резервная копия создана: {0} +admincmd.update.backup_warning = Внимание: Резервное копирование не удалось - {0} +admincmd.update.backup_continue = Продолжаем обновление несмотря на это... +admincmd.update.downloading = Загрузка HyperFactions v{0}... +admincmd.update.download_failed = Ошибка загрузки. Проверьте логи сервера. +admincmd.update.downloaded = Обновление успешно загружено! +admincmd.update.file_label = Файл: {0} +admincmd.update.cleanup = Очистка: Удалено {0} старых резервных копий +admincmd.update.kept_backup = Сохранено: {0} (для отката) +admincmd.update.restart = Перезапустите сервер для применения обновления. +admincmd.update.use_rollback = Используйте /f admin rollback для отката перед перезапуском. +admincmd.update.usage_hf = /f admin update — обновить HyperFactions +admincmd.update.usage_mixin = /f admin update mixin — обновить HyperProtect-Mixin +admincmd.update.usage_toggle = /f admin update toggle-mixin-download — переключить автозагрузку +admincmd.update.mixin_current = HyperProtect-Mixin: {0} +admincmd.update.mixin_up_to_date = HyperProtect-Mixin обновлён. +admincmd.update.mixin_none = Выпуски HyperProtect-Mixin пока недоступны. +admincmd.update.mixin_available = Доступна: v{0} +admincmd.update.mixin_downloading = Загрузка HyperProtect-Mixin v{0}... +admincmd.update.mixin_downloaded = Успешно загружено! +admincmd.update.mixin_failed = Ошибка загрузки. Проверьте логи сервера. +admincmd.update.mixin_location = Расположение: earlyplugins/ +admincmd.update.mixin_restart = Перезапустите сервер для применения. +admincmd.update.mixin_auto_on = Автозагрузка HP-Mixin включена. +admincmd.update.mixin_auto_on_desc = HyperProtect-Mixin будет загружен автоматически при следующем запуске, если не установлен. +admincmd.update.mixin_auto_off = Автозагрузка HP-Mixin отключена. +admincmd.update.mixin_auto_off_desc = Используйте /f admin update mixin для ручной загрузки. +admincmd.rollback.no_backup = JAR резервной копии для отката не найден. +admincmd.rollback.unsafe = Невозможно выполнить автоматический откат! +admincmd.rollback.unsafe_reason = Сервер был перезапущен после последнего обновления. +admincmd.rollback.unsafe_migration = Миграции конфигурации/данных могли быть применены. +admincmd.rollback.instructions = Для безопасного отката необходимо: +admincmd.rollback.find_backup = Используйте /f admin backup list для поиска резервной копии перед обновлением. +admincmd.rollback.rolling = Откат обновления... +admincmd.rollback.from = С: v{0} (новая) +admincmd.rollback.to = До: v{0} (предыдущая) +admincmd.rollback.version = Откат до v{0}... +admincmd.rollback.success = Откат выполнен успешно! +admincmd.rollback.restored = Восстановлено: {0} +admincmd.rollback.removed = Удалено: {0} +admincmd.rollback.restart = Перезапустите сервер для применения отката. +admincmd.rollback.failed = Откат не удался: {0} +admincmd.zone.failed = Ошибка: {0} +admincmd.zone.failed_delete = Не удалось удалить зону: {0} +admincmd.zone.failed_rename = Не удалось переименовать зону: {0} +admincmd.zone.failed_flags = Не удалось сбросить флаги. +admincmd.zone.failed_flag = Не удалось установить флаг. +admincmd.zone.list_header = Зоны ({0}) +admincmd.zone.info_header = Зона: {0} +admincmd.zone.info_notify = Уведомление: {0} +admincmd.zone.info_upper_title = Верхний заголовок: {0} +admincmd.zone.info_lower_title = Нижний заголовок: {0} +admincmd.zone.info_custom_flags = Пользовательские флаги: +admincmd.zone.flags_header = Флаги зоны: {0} +admincmd.zone.flags_type = Тип зоны: {0} +admincmd.zone.player_only = Эта команда может быть использована только игроком. +admincmd.decay.status_header = Статус Деградации Территорий +admincmd.decay.enable_hint = Установите claims.decayEnabled в true для активации. +admincmd.decay.error = Ошибка при деградации: {0} +admincmd.decay.check_header = Проверка Деградации: {0} +admincmd.decay.check_not_found = Фракция '{0}' не найдена. +admincmd.decay.no_claims = Нет территорий для деградации. +admincmd.decay.disabled_globally = Отключено глобально +admincmd.map.status_header = Статус Карты Мира +admincmd.debug.status_header = Статус Отладочного Логирования +admincmd.debug.full_status_header = Статус Отладки HyperFactions +common.no_description = Описание не задано. +common.member_count = {0} участников +common.economy_disabled = Экономическая система не включена. +territory.display.wilderness = Дикие Земли +territory.display.safezone = Безопасная Зона +territory.display.warzone = Зона Войны +territory.display.unknown_faction = Неизвестная Фракция +territory.secondary.pvp_disabled = PvP Отключено +territory.secondary.pvp_no_protection = PvP Включено - Без Защиты +territory.secondary.your_territory = Ваша Территория +territory.secondary.faction_territory = Территория +territory.secondary.relation_territory = Территория {0} +announce.death_location = {0} погиб(ла) в ({1}, {2}, {3}) в {4} diff --git a/src/main/resources/Server/Languages/tl-PH/hyperfactions.lang b/src/main/resources/Server/Languages/tl-PH/hyperfactions.lang index 7a248789..bdcb8e33 100644 --- a/src/main/resources/Server/Languages/tl-PH/hyperfactions.lang +++ b/src/main/resources/Server/Languages/tl-PH/hyperfactions.lang @@ -451,3 +451,452 @@ teleport.mount_entry_blocked = Hindi ka maaaring pumasok sa zone na ito habang n chat.display.public = Publiko chat.display.faction = Paksyon chat.display.ally = Kakampi + +# ========== Sistema ng Tulong ========== +help.commands_label = Mga Utos: +help.default_footer = Gamitin ang /f para sa mga detalye +help.title = HyperFactions +help.description = Pamamahala ng paksyon at kontrol ng teritoryo + +# Mga seksyon ng tulong +help.section.core = Pangunahin +help.section.management = Pamamahala +help.section.territory = Teritoryo +help.section.relations = Mga Relasyon +help.section.teleport = Teleport +help.section.information = Impormasyon +help.section.other = Iba Pa +help.section.admin = Admin + +# Mga deskripsyon ng utos (Pangunahin) +help.cmd.create = Gumawa ng paksyon +help.cmd.disband = Buwagin ang iyong paksyon +help.cmd.invite = Mag-imbita ng manlalaro +help.cmd.accept = Tanggapin ang imbitasyon +help.cmd.request = Humiling na sumali sa paksyon +help.cmd.leave = Umalis sa iyong paksyon +help.cmd.kick = Paalisin ang isang kasapi + +# Mga deskripsyon ng utos (Pamamahala) +help.cmd.rename = Palitan ang pangalan ng paksyon +help.cmd.desc = Itakda ang deskripsyon ng paksyon +help.cmd.color = Itakda ang kulay ng paksyon +help.cmd.open = Payagan ang sinumang sumali +help.cmd.close = Kailangan ng imbitasyon upang sumali +help.cmd.promote = I-promote sa opisyal +help.cmd.demote = I-demote sa kasapi +help.cmd.transfer = Ilipat ang pamumuno + +# Mga deskripsyon ng utos (Teritoryo) +help.cmd.claim = I-claim ang chunk na ito +help.cmd.unclaim = I-unclaim ang chunk na ito +help.cmd.overclaim = I-overclaim ang teritoryo ng kalaban +help.cmd.map = Tingnan ang mapa ng teritoryo + +# Mga deskripsyon ng utos (Mga Relasyon) +help.cmd.ally = Humiling ng alyansa +help.cmd.enemy = Ideklara bilang kalaban +help.cmd.neutral = Itakda bilang neutral + +# Mga deskripsyon ng utos (Teleport) +help.cmd.home = Mag-teleport sa faction home +help.cmd.sethome = Itakda ang faction home +help.cmd.stuck = Tumakas sa teritoryo ng kalaban + +# Mga deskripsyon ng utos (Impormasyon) +help.cmd.info = Tingnan ang info ng paksyon +help.cmd.list = Ilista lahat ng paksyon +help.cmd.browse = Mag-browse ng mga paksyon (alias para sa list) +help.cmd.members = Tingnan ang mga kasapi ng paksyon +help.cmd.invites = Pamahalaan ang mga imbitasyon/kahilingan +help.cmd.who = Tingnan ang info ng manlalaro +help.cmd.power = Tingnan ang antas ng kapangyarihan +help.cmd.gui = Buksan ang faction GUI +help.cmd.settings = Buksan ang mga setting ng paksyon + +# Mga deskripsyon ng utos (Iba Pa) +help.cmd.chat = Magpadala ng mensahe sa faction chat +help.cmd.chat_short = Faction chat (pinaikli) + +# Mga deskripsyon ng utos (Admin sa pangunahing tulong) +help.cmd.admin = Buksan ang admin GUI +help.cmd.admin_reload = I-reload ang config +help.cmd.admin_sync = I-sync ang data mula sa disk +help.cmd.admin_factions = Pamahalaan ang mga paksyon +help.cmd.admin_zones = Pamahalaan ang mga zone +help.cmd.admin_config = Tingnan/i-edit ang config +help.cmd.admin_backups = Pamahalaan ang mga backup +help.cmd.admin_update = Mag-check ng mga update +help.cmd.admin_debug = Mga debug command + +# Pahina ng tulong ng admin +help.admin.title = Mga Admin Command +help.admin.description = Administrasyon ng server +help.admin.cmd.dashboard = Buksan ang admin dashboard GUI +help.admin.cmd.factions = Pamahalaan ang lahat ng paksyon +help.admin.cmd.zone = Pamamahala ng zone +help.admin.cmd.config = Konfigurasyong ng server +help.admin.cmd.backup = Pamamahala ng backup +help.admin.cmd.import_cmd = Mag-import mula sa ibang plugin +help.admin.cmd.update = Mag-check at mag-download ng mga update +help.admin.cmd.update_mixin = I-update ang HyperProtect-Mixin +help.admin.cmd.update_toggle = I-toggle ang auto-download ng HP-Mixin +help.admin.cmd.rollback = Mag-rollback sa nakaraang bersyon +help.admin.cmd.reload = I-reload ang konfigurasyong +help.admin.cmd.sync = I-sync ang data mula sa disk +help.admin.cmd.debug = Mga debug command +help.admin.cmd.decay = Pamamahala ng claim decay +help.admin.cmd.map = Pamamahala ng world map +help.admin.cmd.safezone = Gumawa ng SafeZone + i-claim ang chunk +help.admin.cmd.warzone = Gumawa ng WarZone + i-claim ang chunk +help.admin.cmd.removezone = I-unclaim ang chunk mula sa zone +help.admin.cmd.zoneflag = Itakda ang zone flag +help.admin.cmd.integrations = Buod ng lahat ng integration +help.admin.cmd.integration = Detalyadong integration status +help.admin.cmd.clearhistory = I-clear ang kasaysayan ng membership ng manlalaro +help.admin.cmd.power = Admin power management +help.admin.cmd.economy = Pamamahala ng economy/treasury +help.admin.cmd.economy_upkeep = Manu-manong mag-trigger ng upkeep collection +help.admin.cmd.info = Tingnan ang admin faction info GUI +help.admin.cmd.who = Tingnan ang admin player info GUI +help.admin.cmd.log = Tingnan ang global activity log +help.admin.cmd.world = Pamamahala ng per-world settings +help.admin.cmd.version = Tingnan ang mod version at integration status +help.admin.cmd.sentry = Tingnan ang Sentry status +help.admin.cmd.sentry_disable = I-opt out sa Sentry error reporting +help.admin.cmd.sentry_enable = I-opt in sa Sentry error reporting +help.admin.cmd.test_gui = Buksan ang UI element test page +help.admin.cmd.test_sentry = Magpadala ng test error sa Sentry +help.admin.cmd.test_md = Buksan ang markdown rendering test page + +# Sub-tulong: Backup +help.backup.title = Pamamahala ng Backup +help.backup.description = GFS rotation scheme +help.backup.cmd.create = Gumawa ng manual backup +help.backup.cmd.list = Ilista lahat ng backup na naka-group ayon sa uri +help.backup.cmd.restore = I-restore mula sa backup (kailangan ng kumpirmasyon) +help.backup.cmd.delete = Magtanggal ng backup + +# Sub-tulong: Debug +help.debug.title = Mga Debug Command +help.debug.description = Diagnostics at troubleshooting +help.debug.cmd.toggle = I-toggle ang debug logging +help.debug.cmd.status = Ipakita ang debug status +help.debug.cmd.power = Ipakita ang mga detalye ng kapangyarihan +help.debug.cmd.claim = Ipakita ang claim info +help.debug.cmd.protection = Ipakita ang protection info +help.debug.cmd.combat = Ipakita ang combat tag status +help.debug.cmd.relation = Ipakita ang relation info + +# Sub-tulong: Kapangyarihan +help.power.title = Admin Power +help.power.description = Pamahalaan ang kapangyarihan ng manlalaro/paksyon +help.power.cmd.set = Itakda ang eksaktong kapangyarihan +help.power.cmd.add = Dagdagan ang kapangyarihan +help.power.cmd.remove = Bawasan ang kapangyarihan +help.power.cmd.reset = I-reset sa default +help.power.cmd.setmax = Itakda ang max power override +help.power.cmd.resetmax = I-clear ang max override +help.power.cmd.noloss = I-toggle ang power loss bypass +help.power.cmd.nodecay = I-toggle ang claim decay exemption +help.power.cmd.faction = Mga operasyon sa buong paksyon +help.power.cmd.info = Ipakita ang mga detalye ng kapangyarihan ng manlalaro + +# Sub-tulong: Ekonomiya +help.economy.title = Admin Economy +help.economy.description = Pamahalaan ang mga treasury ng paksyon +help.economy.cmd.balance = Ipakita ang balanse ng paksyon +help.economy.cmd.set = Itakda ang eksaktong balanse +help.economy.cmd.add = Magdagdag sa balanse +help.economy.cmd.take = Magbawas sa balanse +help.economy.cmd.total = Ipakita ang kabuuang balanse ng server +help.economy.cmd.reset = I-reset ang balanse sa 0 +help.economy.cmd.upkeep = Manu-manong mag-trigger ng upkeep collection + +# Sub-tulong: Mundo +help.world.title = Mga Setting ng Mundo +help.world.description = Per-world na konfigurasyong +help.world.cmd.list = Ilista ang lahat ng na-configure na mga mundo +help.world.cmd.info = Ipakita ang mga setting ng isang mundo +help.world.cmd.set = Itakda ang isang world setting +help.world.cmd.reset = Alisin ang world-specific na mga setting + +# Sub-tulong: Mapa +help.map.title = World Map +help.map.description = Pamamahala ng map overlay +help.map.cmd.status = Ipakita ang world map status at mga istatistika +help.map.cmd.refresh = Pilitin ang agarang map refresh + +# Sub-tulong: Decay +help.decay.title = Claim Decay +help.decay.description = Awtomatikong nag-aalis ng mga claim mula sa mga hindi aktibong paksyon +help.decay.cmd.status = Ipakita ang decay status +help.decay.cmd.run = Manu-manong mag-trigger ng claim decay +help.decay.cmd.check = I-check ang decay status ng paksyon + +# Sub-tulong: Import +help.import.title = Mga Import Command +help.import.description = Mag-migrate mula sa ibang faction plugin +help.import.cmd.hyfactions = Mag-import mula sa HyFactions mod +help.import.path.hyfactions = Default na path: mods/Kaws_Hyfaction +help.import.cmd.elbaphfactions = Mag-import mula sa ElbaphFactions mod +help.import.path.elbaphfactions = Default na path: mods/ElbaphFactions +help.import.cmd.factionsx = Mag-import mula sa FactionsX mod +help.import.path.factionsx = Default na path: mods/FactionsX +help.import.cmd.simpleclaims = Mag-import mula sa SimpleClaims mod +help.import.path.simpleclaims = Default na path: Server/universe/SimpleClaims +help.import.flags_header = Mga Flag: +help.import.flag.dryrun = I-simulate nang walang pagbabago +help.import.flag.overwrite = Palitan ang mga umiiral na paksyon +help.import.flag.nozones = Laktawan ang zone import +help.import.flag.nopower = Laktawan ang power distribution + +# Sub-tulong: Test +help.test.title = Mga Test Command +help.test.description = Mga development testing tool +help.test.cmd.gui = Buksan ang UI element test page +help.test.cmd.sentry = Magpadala ng test error sa Sentry +help.test.cmd.md = Buksan ang markdown rendering test page + +# ========== Mga Admin CLI Message ========== +admincmd.no_permission = Wala kang pahintulot. +admincmd.player_only = Ang utos na ito ay para sa mga manlalaro lamang. +admincmd.player_context = Hindi available ang player context. +admincmd.entity_not_found = Hindi mahanap ang player entity. +admincmd.unknown_command = Hindi kilalang admin command. Gamitin ang /f admin help +admincmd.faction_not_found = Hindi nahanap ang paksyon. +admincmd.player_not_found = Hindi nahanap ang manlalaro: {0} +admincmd.invalid_number = Hindi wastong numero: {0} +admincmd.amount_positive = Ang halaga ay dapat positibo. +admincmd.balance_not_negative = Ang balanse ay hindi maaaring negatibo. +admincmd.error_generic = May nangyaring error. + +# Admin - Reload/Sync +admincmd.reload.success = Na-reload na ang konfigurasyong. +admincmd.sync.start = Sini-sync ang faction data mula sa disk... +admincmd.sync.complete = Kumpleto na ang sync: {0} paksyon na-update, {1} kasapi naidagdag, {2} kasapi na-update. +admincmd.sync.failed = Nabigo ang sync: {0} + +# Admin - Bersyon +admincmd.version.title = Impormasyon ng Bersyon +admincmd.version.server = Hytale Server: {0} +admincmd.version.java = Java: {0} +admincmd.version.treasury = Treasury: {0} +admincmd.version.active = Aktibo +admincmd.version.not_found = Hindi Nahanap + +# Admin - Sentry +admincmd.sentry.header = Sentry Error Reporting +admincmd.sentry.config = Config: {0} +admincmd.sentry.status = Status: {0} +admincmd.sentry.already_disabled = Naka-disable na ang Sentry. +admincmd.sentry.already_enabled = Naka-enable na ang Sentry. +admincmd.sentry.disabled = Na-disable ang Sentry at na-save ang config. Naka-off na ang error reporting. +admincmd.sentry.enabled = Na-enable ang Sentry at na-save ang config. Naka-on na ang error reporting. +admincmd.sentry.usage = Paggamit: /f admin sentry [disable|enable] +admincmd.sentry.not_initialized = Hindi na-initialize ang Sentry. I-check ang config/debug.json +admincmd.sentry.test_sent = Naipadala ang test error sa Sentry. I-check ang iyong Sentry dashboard. +admincmd.sentry.test_failed = Nabigo ang pagpapadala ng test event. + +# Admin - Backup +admincmd.backup.no_permission = Wala kang pahintulot na mamahala ng mga backup. +admincmd.backup.creating = Gumagawa ng backup... +admincmd.backup.created = Matagumpay na nagawa ang backup! +admincmd.backup.name = Pangalan: {0} +admincmd.backup.size = Laki: {0} +admincmd.backup.failed = Nabigo ang backup: {0} +admincmd.backup.none = Walang nahanap na mga backup. +admincmd.backup.header = Mga Backup +admincmd.backup.not_found = Hindi nahanap ang backup na '{0}'. +admincmd.backup.unknown_command = Hindi kilalang backup command: {0} +admincmd.backup.usage_restore = Paggamit: /f admin backup restore +admincmd.backup.usage_delete = Paggamit: /f admin backup delete +admincmd.backup.restore_warning = BABALA: Ang pag-restore ng backup ay mag-o-overwrite sa kasalukuyang data! +admincmd.backup.restore_confirm = I-type muli ang utos sa loob ng {0} segundo upang kumpirmahin. +admincmd.backup.restoring = Nire-restore ang backup... +admincmd.backup.restored = Matagumpay na na-restore ang backup! Na-reload ang data. +admincmd.backup.restore_failed = Nabigo ang pag-restore: {0} +admincmd.backup.confirm_cancelled = Kinansela ang nakaraang kumpirmasyon. I-type muli upang kumpirmahin ang pag-restore. +admincmd.backup.deleted = Natanggal ang backup na '{0}' +admincmd.backup.delete_failed = Nabigo ang pagtanggal ng backup. + +# Admin - Debug +admincmd.debug.no_permission = Wala kang pahintulot na gumamit ng mga debug command. +admincmd.debug.unknown_command = Hindi kilalang debug command: {0} +admincmd.debug.player_only = Ang debug command na ito ay para sa mga manlalaro lamang. +admincmd.debug.toggle_set = Debug category na '{0}' ay naitakda sa {1} (na-save) +admincmd.debug.all_enabled = Lahat ng debug category ay naka-enable na. +admincmd.debug.all_disabled = Lahat ng debug category ay naka-disable na. +admincmd.debug.unknown_category = Hindi kilalang category: {0} +admincmd.debug.not_implemented = Hindi pa naipapatupad ang debug {0} info. + +# Admin - Ekonomiya +admincmd.econ.disabled = Hindi naka-enable ang economy system. +admincmd.econ.unknown_command = Hindi kilalang economy command. Gamitin ang /f admin economy help +admincmd.econ.set = Naitakda ang balanse ni {0} sa {1} (dating {2}) +admincmd.econ.added = Naidagdag ang {0} sa {1} (balanse: {2}) +admincmd.econ.deducted = Nabawasan ng {0} mula sa {1} (balanse: {2}) +admincmd.econ.reset = Na-reset ang balanse ni {0} sa {1} (dating {2}) +admincmd.econ.failed = Nabigo: {0} +admincmd.econ.total_header = Mga Istatistika ng Server Economy +admincmd.econ.upkeep_disabled = Hindi naka-enable ang upkeep system. +admincmd.econ.upkeep_trigger = Manu-manong tini-trigger ang upkeep collection... +admincmd.econ.upkeep_complete = Kumpleto na ang upkeep collection. I-check ang server log para sa mga detalye. +admincmd.econ.upkeep_failed = Nabigo ang upkeep collection: {0} + +# Admin - Kapangyarihan +admincmd.power.no_permission = Wala kang pahintulot. +admincmd.power.unknown_command = Hindi kilalang power command. Gamitin ang /f admin power help +admincmd.power.max_positive = Ang max power ay dapat positibo. +admincmd.power.faction_unknown_action = Hindi kilalang faction power action. Gamitin: set, add, remove, reset + +# Admin - Clear History +admincmd.history.no_data = Walang nahanap na player data para kay {0}. +admincmd.history.empty = Walang membership history si {0}. +admincmd.history.cleared = Na-clear ang {0} history record para kay {1}. +admincmd.history.cleared_reinit = Na-clear ang {0} history record para kay {1} (na-reinitialize sa kasalukuyang paksyon: {2}). + +# Admin - Zone +admincmd.zone.created = Nagawa ang {0} na '{1}' sa {2}, {3} +admincmd.zone.chunk_claimed = Hindi makagawa ng zone: Ang chunk na ito ay naka-claim ng isang paksyon. +admincmd.zone.already_exists = Mayroon nang zone sa lokasyong ito. +admincmd.zone.name_taken = Mayroon nang zone na may ganitong pangalan. +admincmd.zone.not_found = Hindi nahanap ang zone na '{0}'. +admincmd.zone.unclaimed = Na-unclaim ang chunk mula sa zone. +admincmd.zone.no_chunk = Walang nahanap na zone chunk sa lokasyong ito. +admincmd.zone.none = Walang mga na-define na zone. +admincmd.zone.deleted = Natanggal ang zone na '{0}' ({1} chunk na-release) +admincmd.zone.renamed = Pinalitan ang pangalan ng zone na '{0}' sa '{1}' +admincmd.zone.invalid_type = Hindi wastong zone type. Gamitin ang 'safe' o 'war' +admincmd.zone.invalid_name = Hindi wastong zone name. Dapat 1-32 karakter. +admincmd.zone.claimed_radius = Na-claim ang {0} chunk para sa zone na '{1}' +admincmd.zone.no_chunks_claimed = Walang chunk na maaaring ma-claim (lahat ay okupado o nasa zone na). +admincmd.zone.unknown_command = Hindi kilalang zone command. Gamitin ang /f admin help +admincmd.zone.chunk_has_zone = Ang chunk na ito ay pag-aari na ng ibang zone. +admincmd.zone.chunk_has_faction = Ang chunk na ito ay naka-claim ng isang paksyon. +admincmd.zone.notify_set = Entry notification ng zone na '{0}' {1} +admincmd.zone.title_set = Naitakda ang {0} title ng zone na '{1}' sa: {2} +admincmd.zone.title_cleared = Na-clear ang {0} title ng zone na '{1}' (gamit ang default) +admincmd.zone.no_zone_at = Walang zone sa iyong lokasyon. Tumayo sa isang zone upang pamahalaan ang mga flag. +admincmd.zone.flag_cleared = Na-clear ang flag na '{0}' (gamit na ang default: {1}) +admincmd.zone.flag_set = Naitakda ang flag na '{0}' sa {1} +admincmd.zone.flag_invalid = Hindi wastong flag: {0} +admincmd.zone.flags_cleared = Na-clear lahat ng custom flag ng '{0}' - gamit na ang mga zone type default. + +# Admin - Mundo +admincmd.world.unknown_command = Hindi kilalang world command. Gamitin ang /f admin world help +admincmd.world.no_settings = Walang na-configure na per-world settings. +admincmd.world.unknown_setting = Hindi kilalang setting: {0} +admincmd.world.set = Naitakda ang {0}={1} para sa mundo na {2} +admincmd.world.reset = Natanggal ang per-world settings para sa: {0} +admincmd.world.not_found = Walang nahanap na settings para sa mundo: {0} + +# Admin - Map/Decay +admincmd.map.not_available = Hindi available ang world map service. +admincmd.map.refreshing = Pinipilit ang buong world map refresh... +admincmd.map.refreshed = Kumpleto na ang world map refresh. +admincmd.map.unknown_command = Hindi kilalang map command: {0} +admincmd.decay.disabled = Naka-disable ang claim decay sa config. +admincmd.decay.running = Nire-run ang claim decay check... +admincmd.decay.complete = Kumpleto na ang claim decay check. I-check ang console para sa mga detalye. +admincmd.decay.unknown_command = Hindi kilalang decay command: {0} + +# Admin - Update +admincmd.update.not_available = Hindi available ang update checker. +admincmd.update.checking = Nagche-check ng mga update... +admincmd.update.up_to_date = Na-update na ang plugin (v{0}) +admincmd.update.available = May available na update: v{0} +admincmd.update.unknown_target = Hindi kilalang update target: {0} + +# Admin - Import +admincmd.import.unknown_source = Hindi kilalang import source: {0} +admincmd.import.importing = Nag-i-import mula sa {0}... +admincmd.import.complete = {0} import {1}kumpleto na! +admincmd.import.failed = {0} import nabigo nang may mga error: + +# Admin - Update Notifications +admincmd.update_notify.new_version = [HyperFactions] May bagong bersyon na magagamit! +admincmd.update_notify.version_info = Kasalukuyan: v{0} -> Pinakabago: v{1} +admincmd.update_notify.instruction = Patakbuhin ang /f admin update upang i-update ang plugin. +admincmd.update_notify.up_to_date = [HyperFactions] Ang plugin ay updated na (v{0}) +admincmd.update.no_info = Walang impormasyon tungkol sa update. +admincmd.update.creating_backup = Gumagawa ng pre-update backup... +admincmd.update.backup_created = Backup nagawa: {0} +admincmd.update.backup_warning = Babala: Nabigo ang backup - {0} +admincmd.update.backup_continue = Nagpapatuloy sa update kahit na... +admincmd.update.downloading = Dina-download ang HyperFactions v{0}... +admincmd.update.download_failed = Nabigo ang download. Suriin ang mga log ng server. +admincmd.update.downloaded = Matagumpay na na-download ang update! +admincmd.update.file_label = File: {0} +admincmd.update.cleanup = Paglilinis: {0} lumang backup(s) na tinanggal +admincmd.update.kept_backup = Napanatili: {0} (para sa rollback) +admincmd.update.restart = I-restart ang server upang i-apply ang update. +admincmd.update.use_rollback = Gamitin ang /f admin rollback upang ibalik bago mag-restart. +admincmd.update.usage_hf = /f admin update — i-update ang HyperFactions +admincmd.update.usage_mixin = /f admin update mixin — i-update ang HyperProtect-Mixin +admincmd.update.usage_toggle = /f admin update toggle-mixin-download — i-toggle ang auto-download +admincmd.update.mixin_current = HyperProtect-Mixin: {0} +admincmd.update.mixin_up_to_date = Ang HyperProtect-Mixin ay updated na. +admincmd.update.mixin_none = Wala pang mga release ng HyperProtect-Mixin. +admincmd.update.mixin_available = Magagamit: v{0} +admincmd.update.mixin_downloading = Dina-download ang HyperProtect-Mixin v{0}... +admincmd.update.mixin_downloaded = Matagumpay na na-download! +admincmd.update.mixin_failed = Nabigo ang download. Suriin ang mga log ng server. +admincmd.update.mixin_location = Lokasyon: earlyplugins/ +admincmd.update.mixin_restart = I-restart ang server upang i-apply. +admincmd.update.mixin_auto_on = HP-Mixin auto-download naka-enable. +admincmd.update.mixin_auto_on_desc = Awtomatikong ida-download ang HyperProtect-Mixin sa susunod na startup kung hindi naka-install. +admincmd.update.mixin_auto_off = HP-Mixin auto-download naka-disable. +admincmd.update.mixin_auto_off_desc = Gamitin ang /f admin update mixin upang manual na mag-download. +admincmd.rollback.no_backup = Walang backup JAR na nahanap para sa rollback. +admincmd.rollback.unsafe = Hindi maaaring mag-rollback nang awtomatiko! +admincmd.rollback.unsafe_reason = Na-restart ang server mula sa huling update. +admincmd.rollback.unsafe_migration = Maaaring nai-apply na ang mga migration ng config/data. +admincmd.rollback.instructions = Upang ligtas na mag-rollback, kailangan mong: +admincmd.rollback.find_backup = Gamitin ang /f admin backup list upang mahanap ang pre-update backup. +admincmd.rollback.rolling = Inibabalik ang update... +admincmd.rollback.from = Mula: v{0} (bago) +admincmd.rollback.to = Papunta: v{0} (nakaraan) +admincmd.rollback.version = Inibabalik sa v{0}... +admincmd.rollback.success = Matagumpay ang rollback! +admincmd.rollback.restored = Naibalik: {0} +admincmd.rollback.removed = Tinanggal: {0} +admincmd.rollback.restart = I-restart ang server upang i-apply ang rollback. +admincmd.rollback.failed = Nabigo ang rollback: {0} +admincmd.zone.failed = Nabigo: {0} +admincmd.zone.failed_delete = Hindi ma-delete ang zone: {0} +admincmd.zone.failed_rename = Hindi ma-rename ang zone: {0} +admincmd.zone.failed_flags = Hindi ma-reset ang mga flag. +admincmd.zone.failed_flag = Hindi ma-set ang flag. +admincmd.zone.list_header = Mga Zone ({0}) +admincmd.zone.info_header = Zone: {0} +admincmd.zone.info_notify = Abiso: {0} +admincmd.zone.info_upper_title = Itaas na titulo: {0} +admincmd.zone.info_lower_title = Ibabang titulo: {0} +admincmd.zone.info_custom_flags = Mga Custom Flag: +admincmd.zone.flags_header = Mga Flag ng Zone: {0} +admincmd.zone.flags_type = Uri ng Zone: {0} +admincmd.zone.player_only = Ang command na ito ay para lamang sa mga manlalaro. +admincmd.decay.status_header = Status ng Pagkabulok ng Teritoryo +admincmd.decay.enable_hint = I-set ang claims.decayEnabled sa true upang i-activate. +admincmd.decay.error = Error sa pagkabulok: {0} +admincmd.decay.check_header = Pagsusuri ng Pagkabulok: {0} +admincmd.decay.check_not_found = Hindi nahanap ang faction na '{0}'. +admincmd.decay.no_claims = Walang mga teritoryo na mabubulok. +admincmd.decay.disabled_globally = Naka-disable sa buong mundo +admincmd.map.status_header = Status ng Mapa ng Mundo +admincmd.debug.status_header = Status ng Debug Logging +admincmd.debug.full_status_header = Status ng HyperFactions Debug +common.no_description = Walang nakatakdang paglalarawan. +common.member_count = {0} mga miyembro +common.economy_disabled = Hindi naka-enable ang sistema ng ekonomiya. +territory.display.wilderness = Kagubatan +territory.display.safezone = Ligtas na Zona +territory.display.warzone = Zona ng Digmaan +territory.display.unknown_faction = Hindi Kilalang Faction +territory.secondary.pvp_disabled = PvP Naka-disable +territory.secondary.pvp_no_protection = PvP Naka-enable - Walang Proteksyon +territory.secondary.your_territory = Iyong Teritoryo +territory.secondary.faction_territory = Teritoryo +territory.secondary.relation_territory = Teritoryo ng {0} +announce.death_location = {0} namatay sa ({1}, {2}, {3}) sa {4}