From 01ac52d8b412f65d1b69296b2701085133caff11 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Sun, 8 Mar 2026 22:02:58 -0700 Subject: [PATCH 01/55] feat: add i18n infrastructure (Phase 0) Add the foundational i18n system following Ecotale's proven pattern with Hytale's native I18nModule: - HFMessages: translation resolution engine with player/server language support and {0}/{1} placeholder formatting - MessageKeys: static key constants organized by nested inner classes covering common, commands, protection, territory, GUI nav, and more - MessageUtil: i18n-aware overloads (PlayerRef + key) alongside existing string-literal methods for gradual migration - ServerConfig: defaultLanguage and usePlayerLanguage settings with JSON load/write support - ConfigManager: convenience accessors for language settings - PlayerData: languagePreference and notification preference fields (territoryAlerts, deathAnnouncements, powerNotifications) - en-US/hyperfactions.lang: initial common.* translation keys (~25 keys) --- .../hyperfactions/config/ConfigManager.java | 11 + .../config/modules/ServerConfig.java | 29 ++ .../com/hyperfactions/data/PlayerData.java | 51 +++ .../com/hyperfactions/util/HFMessages.java | 154 ++++++++ .../com/hyperfactions/util/MessageKeys.java | 362 ++++++++++++++++++ .../com/hyperfactions/util/MessageUtil.java | 71 ++++ .../Server/Languages/en-US/hyperfactions.lang | 30 ++ 7 files changed, 708 insertions(+) create mode 100644 src/main/java/com/hyperfactions/util/HFMessages.java create mode 100644 src/main/java/com/hyperfactions/util/MessageKeys.java create mode 100644 src/main/resources/Server/Languages/en-US/hyperfactions.lang diff --git a/src/main/java/com/hyperfactions/config/ConfigManager.java b/src/main/java/com/hyperfactions/config/ConfigManager.java index d00ed242..300980e3 100644 --- a/src/main/java/com/hyperfactions/config/ConfigManager.java +++ b/src/main/java/com/hyperfactions/config/ConfigManager.java @@ -1225,6 +1225,17 @@ public int getChatHistoryCleanupIntervalMinutes() { return chatConfig.getHistoryCleanupIntervalMinutes(); } + // Language / i18n (from server config) + /** Returns the default server language code (e.g. "en-US"). */ + @NotNull public String getDefaultLanguage() { + return serverConfig.getDefaultLanguage(); + } + + /** Whether to respect each player's client language for translations. */ + public boolean isUsePlayerLanguage() { + return serverConfig.isUsePlayerLanguage(); + } + // Permissions (from server config) public boolean isAdminRequiresOp() { return serverConfig.isAdminRequiresOp(); diff --git a/src/main/java/com/hyperfactions/config/modules/ServerConfig.java b/src/main/java/com/hyperfactions/config/modules/ServerConfig.java index 01a8e2c2..28836632 100644 --- a/src/main/java/com/hyperfactions/config/modules/ServerConfig.java +++ b/src/main/java/com/hyperfactions/config/modules/ServerConfig.java @@ -76,6 +76,11 @@ public class ServerConfig extends ModuleConfig { private int mobClearIntervalSeconds = 10; + // Language / i18n settings + private String defaultLanguage = "en-US"; + + private boolean usePlayerLanguage = true; + // HyperProtect-Mixin management private boolean hyperProtectAutoDownload = false; @@ -165,6 +170,13 @@ protected void loadModuleSettings(@NotNull JsonObject root) { allowWithoutPermissionMod = getBool(permissions, "allowWithoutPermissionMod", allowWithoutPermissionMod); } + // Language / i18n settings + if (hasSection(root, "language")) { + JsonObject language = root.getAsJsonObject("language"); + defaultLanguage = getString(language, "default", defaultLanguage); + usePlayerLanguage = getBool(language, "usePlayerLanguage", usePlayerLanguage); + } + // Mob clearing settings if (hasSection(root, "mobClearing")) { JsonObject mobClearing = root.getAsJsonObject("mobClearing"); @@ -244,6 +256,12 @@ protected void writeModuleSettings(@NotNull JsonObject root) { permissions.addProperty("allowWithoutPermissionMod", allowWithoutPermissionMod); root.add("permissions", permissions); + // Language / i18n settings + JsonObject language = new JsonObject(); + language.addProperty("default", defaultLanguage); + language.addProperty("usePlayerLanguage", usePlayerLanguage); + root.add("language", language); + // Mob clearing settings JsonObject mobClearing = new JsonObject(); mobClearing.addProperty("enabled", mobClearEnabled); @@ -377,6 +395,17 @@ public int getMobClearIntervalSeconds() { return mobClearIntervalSeconds; } + // Language / i18n + /** Returns the default server language code (e.g. "en-US"). */ + @NotNull public String getDefaultLanguage() { + return defaultLanguage; + } + + /** Whether to respect each player's client language for translations. */ + public boolean isUsePlayerLanguage() { + return usePlayerLanguage; + } + // HyperProtect-Mixin /** Checks if hyper protect auto download. */ public boolean isHyperProtectAutoDownload() { diff --git a/src/main/java/com/hyperfactions/data/PlayerData.java b/src/main/java/com/hyperfactions/data/PlayerData.java index c0168811..4b19aa3a 100644 --- a/src/main/java/com/hyperfactions/data/PlayerData.java +++ b/src/main/java/com/hyperfactions/data/PlayerData.java @@ -47,6 +47,15 @@ public class PlayerData { private boolean adminBypassEnabled; + // === Player Preferences (i18n + notifications) === + private String languagePreference; + + private boolean territoryAlertsEnabled = true; + + private boolean deathAnnouncementsEnabled = true; + + private boolean powerNotificationsEnabled = true; + /** Creates a new PlayerData. */ public PlayerData() {} @@ -315,4 +324,46 @@ public boolean isAdminBypassEnabled() { public void setAdminBypassEnabled(boolean adminBypassEnabled) { this.adminBypassEnabled = adminBypassEnabled; } + + // === Player Preferences === + + /** Returns the player's preferred language, or null for auto-detect. */ + @Nullable public String getLanguagePreference() { + return languagePreference; + } + + /** Sets the player's preferred language (null = auto-detect from client/server). */ + public void setLanguagePreference(@Nullable String languagePreference) { + this.languagePreference = languagePreference; + } + + /** Whether territory entry/exit alerts are enabled for this player. */ + public boolean isTerritoryAlertsEnabled() { + return territoryAlertsEnabled; + } + + /** Sets territory entry/exit alerts enabled. */ + public void setTerritoryAlertsEnabled(boolean territoryAlertsEnabled) { + this.territoryAlertsEnabled = territoryAlertsEnabled; + } + + /** Whether faction death location broadcasts are enabled for this player. */ + public boolean isDeathAnnouncementsEnabled() { + return deathAnnouncementsEnabled; + } + + /** Sets faction death announcement broadcasts enabled. */ + public void setDeathAnnouncementsEnabled(boolean deathAnnouncementsEnabled) { + this.deathAnnouncementsEnabled = deathAnnouncementsEnabled; + } + + /** Whether power change notifications are enabled for this player. */ + public boolean isPowerNotificationsEnabled() { + return powerNotificationsEnabled; + } + + /** Sets power change notifications enabled. */ + public void setPowerNotificationsEnabled(boolean powerNotificationsEnabled) { + this.powerNotificationsEnabled = powerNotificationsEnabled; + } } diff --git a/src/main/java/com/hyperfactions/util/HFMessages.java b/src/main/java/com/hyperfactions/util/HFMessages.java new file mode 100644 index 00000000..aee46d40 --- /dev/null +++ b/src/main/java/com/hyperfactions/util/HFMessages.java @@ -0,0 +1,154 @@ +package com.hyperfactions.util; + +import com.hyperfactions.config.ConfigManager; +import com.hypixel.hytale.server.core.modules.i18n.I18nModule; +import com.hypixel.hytale.server.core.universe.PlayerRef; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Centralized i18n message resolution for HyperFactions. + * + *

+ * Uses Hytale's native {@link I18nModule} for translations. + * Supports server-wide language and per-player client language. + * + *

+ * Language resolution order: + *

    + *
  1. Player's client language via {@link PlayerRef#getLanguage()} (if {@code usePlayerLanguage=true})
  2. + *
  3. Server default language from config
  4. + *
+ * + *

+ * Per-player saved language preferences (from PlayerData) will be added + * when the Player Settings GUI is implemented. + * + *

Usage: + *

+ *   HFMessages.get(playerRef, MessageKeys.Common.NO_PERMISSION);
+ *   HFMessages.get(playerRef, MessageKeys.Create.SUCCESS, factionName);
+ *   HFMessages.get(MessageKeys.Common.LOADING); // server language
+ * 
+ */ +public final class HFMessages { + + private HFMessages() {} + + /** + * Gets a translated message for a specific player. + * Uses the player's resolved language (preference → client → server default). + * + * @param player The player (null falls back to server language) + * @param key The full message key (e.g. "hyperfactions.common.no_permission") + * @param args Replacement arguments for {0}, {1}, etc. + * @return Translated and formatted message, or the key itself if not found + */ + @NotNull + public static String get(@Nullable PlayerRef player, @NotNull String key, Object... args) { + String lang = getLanguageFor(player); + return getForLanguage(lang, key, args); + } + + /** + * Gets a translated message using the server default language. + * + * @param key The full message key + * @param args Replacement arguments for {0}, {1}, etc. + * @return Translated and formatted message + */ + @NotNull + public static String get(@NotNull String key, Object... args) { + return get((PlayerRef) null, key, args); + } + + /** + * Gets a translated message for a specific language code. + * + * @param language The language code (e.g. "en-US", "es-ES") + * @param key The full message key + * @param args Replacement arguments + * @return Translated and formatted message + */ + @NotNull + public static String getForLanguage(@NotNull String language, @NotNull String key, Object... args) { + I18nModule i18n = I18nModule.get(); + if (i18n == null) { + return formatFallback(key, args); + } + + String message = i18n.getMessage(language, key); + if (message == null) { + // Try fallback to en-US + message = i18n.getMessage("en-US", key); + } + if (message == null) { + // Key not found — return key itself for debugging + return key; + } + + return format(message, args); + } + + /** + * Determines the language to use for a player. + * + *

Resolution order: + *

    + *
  1. Player's client language (if {@code usePlayerLanguage} enabled in config)
  2. + *
  3. Server default language
  4. + *
+ * + * @param player The player (null returns server default) + * @return The resolved language code + */ + @NotNull + public static String getLanguageFor(@Nullable PlayerRef player) { + ConfigManager config = ConfigManager.get(); + String serverDefault = config.getDefaultLanguage(); + + if (player == null) { + return serverDefault; + } + + // Use client language if enabled + if (config.isUsePlayerLanguage()) { + return player.getLanguage(); + } + + return serverDefault; + } + + /** + * Formats a message by replacing {0}, {1}, etc. with provided arguments. + */ + @NotNull + private static String format(@NotNull String message, Object... args) { + if (args == null || args.length == 0) { + return message; + } + + String result = message; + for (int i = 0; i < args.length; i++) { + String placeholder = "{" + i + "}"; + String replacement = args[i] != null ? args[i].toString() : ""; + result = result.replace(placeholder, replacement); + } + return result; + } + + /** + * Fallback formatting when I18nModule is not available. + */ + @NotNull + private static String formatFallback(@NotNull String key, Object... args) { + StringBuilder sb = new StringBuilder(key); + if (args != null && args.length > 0) { + sb.append(": "); + for (Object arg : args) { + sb.append(arg).append(" "); + } + } + return sb.toString().trim(); + } +} diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java new file mode 100644 index 00000000..9f7465ef --- /dev/null +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -0,0 +1,362 @@ +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: + *

+ */ +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"; + + private Common() {} + } + + // ===================================================================== + // Commands — organized by command group + // ===================================================================== + + /** /f create command messages. */ + public static final class Create { + public static final String SUCCESS = "hyperfactions.cmd.create.success"; + public static final String NAME_TAKEN = "hyperfactions.cmd.create.name_taken"; + public static final String NAME_INVALID = "hyperfactions.cmd.create.name_invalid"; + 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 NAME_PROFANITY = "hyperfactions.cmd.create.name_profanity"; + public static final String MAX_FACTIONS = "hyperfactions.cmd.create.max_factions"; + + private Create() {} + } + + /** /f disband command messages. */ + public static final class Disband { + public static final String SUCCESS = "hyperfactions.cmd.disband.success"; + public static final String CONFIRM_PROMPT = "hyperfactions.cmd.disband.confirm_prompt"; + + private Disband() {} + } + + /** /f invite command messages. */ + public static final class Invite { + public static final String SENT = "hyperfactions.cmd.invite.sent"; + public static final String RECEIVED = "hyperfactions.cmd.invite.received"; + public static final String ALREADY_INVITED = "hyperfactions.cmd.invite.already_invited"; + public static final String TARGET_IN_FACTION = "hyperfactions.cmd.invite.target_in_faction"; + public static final String REVOKED = "hyperfactions.cmd.invite.revoked"; + public static final String MAX_INVITES = "hyperfactions.cmd.invite.max_invites"; + + private Invite() {} + } + + /** /f join, /f accept, /f request command messages. */ + public static final class Join { + 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 NOT_INVITED = "hyperfactions.cmd.join.not_invited"; + public static final String FACTION_CLOSED = "hyperfactions.cmd.join.faction_closed"; + public static final String REQUEST_SENT = "hyperfactions.cmd.join.request_sent"; + public static final String REQUEST_RECEIVED = "hyperfactions.cmd.join.request_received"; + + private Join() {} + } + + /** /f leave command messages. */ + public static final class Leave { + public static final String SUCCESS = "hyperfactions.cmd.leave.success"; + public static final String BROADCAST = "hyperfactions.cmd.leave.broadcast"; + public static final String LEADER_CANNOT = "hyperfactions.cmd.leave.leader_cannot"; + + private Leave() {} + } + + /** /f kick command messages. */ + public static final class Kick { + public static final String SUCCESS = "hyperfactions.cmd.kick.success"; + public static final String KICKED = "hyperfactions.cmd.kick.kicked"; + public static final String BROADCAST = "hyperfactions.cmd.kick.broadcast"; + public static final String CANNOT_KICK_SELF = "hyperfactions.cmd.kick.cannot_kick_self"; + public static final String CANNOT_KICK_HIGHER = "hyperfactions.cmd.kick.cannot_kick_higher"; + public static final String NOT_IN_YOUR_FACTION = "hyperfactions.cmd.kick.not_in_your_faction"; + + private Kick() {} + } + + /** /f promote, /f demote, /f transfer command messages. */ + public static final class Rank { + public static final String PROMOTED = "hyperfactions.cmd.rank.promoted"; + public static final String DEMOTED = "hyperfactions.cmd.rank.demoted"; + public static final String TRANSFERRED = "hyperfactions.cmd.rank.transferred"; + public static final String ALREADY_HIGHEST = "hyperfactions.cmd.rank.already_highest"; + public static final String ALREADY_LOWEST = "hyperfactions.cmd.rank.already_lowest"; + + private Rank() {} + } + + /** /f claim, /f unclaim, /f overclaim command messages. */ + public static final class Claim { + public static final String SUCCESS = "hyperfactions.cmd.claim.success"; + public static final String UNCLAIMED = "hyperfactions.cmd.claim.unclaimed"; + 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 NOT_CONNECTED = "hyperfactions.cmd.claim.not_connected"; + public static final String NOT_ENOUGH_POWER = "hyperfactions.cmd.claim.not_enough_power"; + public static final String OVERCLAIMED = "hyperfactions.cmd.claim.overclaimed"; + public static final String CANNOT_OVERCLAIM = "hyperfactions.cmd.claim.cannot_overclaim"; + public static final String NOT_YOUR_CLAIM = "hyperfactions.cmd.claim.not_your_claim"; + public static final String IN_ZONE = "hyperfactions.cmd.claim.in_zone"; + + private Claim() {} + } + + /** /f home, /f sethome, /f delhome, /f stuck command messages. */ + public static final class Home { + public static final String TELEPORTING = "hyperfactions.cmd.home.teleporting"; + public static final String SET = "hyperfactions.cmd.home.set"; + public static final String DELETED = "hyperfactions.cmd.home.deleted"; + public static final String NO_HOME = "hyperfactions.cmd.home.no_home"; + public static final String NOT_IN_TERRITORY = "hyperfactions.cmd.home.not_in_territory"; + 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"; + public static final String STUCK_TELEPORTING = "hyperfactions.cmd.home.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"; + + 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"; + + 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"; + + private Chat() {} + } + + /** /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"; + + private Economy() {} + } + + /** /f info, /f who, /f list, /f members 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"; + + 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 { + public static final String BUILD = "hyperfactions.protection.build"; + public static final String BREAK = "hyperfactions.protection.break_block"; + public static final String INTERACT = "hyperfactions.protection.interact"; + public static final String CONTAINER = "hyperfactions.protection.container"; + public static final String PVP_DISABLED = "hyperfactions.protection.pvp_disabled"; + public static final String SAFEZONE = "hyperfactions.protection.safezone"; + public static final String WARZONE = "hyperfactions.protection.warzone"; + + 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 + // ===================================================================== + + /** 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"; + + private Nav() {} + } + + /** Dashboard page labels. */ + public static final class Dashboard { + 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"; + + private Dashboard() {} + } + + /** Help GUI category display names. */ + 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"; + + private HelpGui() {} + } + + /** Player settings page labels. */ + 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 NOTIFICATIONS_SECTION = "hyperfactions_gui.player_settings.notifications_section"; + public static final String TERRITORY_ALERTS = "hyperfactions_gui.player_settings.territory_alerts"; + public static final String DEATH_ANNOUNCEMENTS = "hyperfactions_gui.player_settings.death_announcements"; + public static final String POWER_NOTIFICATIONS = "hyperfactions_gui.player_settings.power_notifications"; + + private PlayerSettings() {} + } +} diff --git a/src/main/java/com/hyperfactions/util/MessageUtil.java b/src/main/java/com/hyperfactions/util/MessageUtil.java index 92c5b4f4..fd162fde 100644 --- a/src/main/java/com/hyperfactions/util/MessageUtil.java +++ b/src/main/java/com/hyperfactions/util/MessageUtil.java @@ -2,6 +2,7 @@ import com.hyperfactions.config.ConfigManager; import com.hypixel.hytale.server.core.Message; +import com.hypixel.hytale.server.core.universe.PlayerRef; import org.jetbrains.annotations.NotNull; /** @@ -68,6 +69,76 @@ public static Message adminPrefix() { .insert(Message.raw("] ").color(bracketColor)); } + // ==================== i18n-aware (PlayerRef + key) ==================== + + /** + * Creates a prefixed red error message using i18n key resolution. + * + * @param player The player (for language resolution) + * @param key The message key + * @param args Replacement arguments for {0}, {1}, etc. + */ + @NotNull + public static Message error(@NotNull PlayerRef player, @NotNull String key, Object... args) { + return prefix().insert(Message.raw(HFMessages.get(player, key, args)).color(COLOR_RED)); + } + + /** + * Creates a prefixed green success message using i18n key resolution. + */ + @NotNull + public static Message success(@NotNull PlayerRef player, @NotNull String key, Object... args) { + return prefix().insert(Message.raw(HFMessages.get(player, key, args)).color(COLOR_GREEN)); + } + + /** + * 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) { + return prefix().insert(Message.raw(HFMessages.get(player, key, args)).color(color)); + } + + /** + * Creates a red error message (no prefix) using i18n key resolution. + */ + @NotNull + public static Message errorText(@NotNull PlayerRef player, @NotNull String key, Object... args) { + return Message.raw(HFMessages.get(player, key, args)).color(COLOR_RED); + } + + /** + * Creates a green success message (no prefix) using i18n key resolution. + */ + @NotNull + public static Message successText(@NotNull PlayerRef player, @NotNull String key, Object... args) { + return Message.raw(HFMessages.get(player, key, args)).color(COLOR_GREEN); + } + + /** + * Creates an admin-prefixed red error message using i18n key resolution. + */ + @NotNull + public static Message adminError(@NotNull PlayerRef player, @NotNull String key, Object... args) { + return adminPrefix().insert(Message.raw(HFMessages.get(player, key, args)).color(COLOR_RED)); + } + + /** + * Creates an admin-prefixed green success message using i18n key resolution. + */ + @NotNull + public static Message adminSuccess(@NotNull PlayerRef player, @NotNull String key, Object... args) { + return adminPrefix().insert(Message.raw(HFMessages.get(player, key, args)).color(COLOR_GREEN)); + } + + /** + * Creates an admin-prefixed gray info message using i18n key resolution. + */ + @NotNull + public static Message adminInfo(@NotNull PlayerRef player, @NotNull String key, Object... args) { + return adminPrefix().insert(Message.raw(HFMessages.get(player, key, args)).color(COLOR_GRAY)); + } + // ==================== Unprefixed (GUI pages) ==================== /** diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions.lang b/src/main/resources/Server/Languages/en-US/hyperfactions.lang new file mode 100644 index 00000000..822ae91d --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/hyperfactions.lang @@ -0,0 +1,30 @@ +# HyperFactions - English Translations +# Format: key = value (or key = "quoted value") +# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule +# Placeholders: {0}, {1}, etc. + +# ========== Common ========== +common.no_permission = You don't have permission to do that. +common.not_in_faction = You are not in a faction. +common.already_in_faction = You are already in a faction. +common.player_not_found = Player not found. +common.faction_not_found = Faction not found. +common.player_not_online = That player is not online. +common.must_be_leader = Only the faction leader can do that. +common.must_be_officer = You must be an Officer or Leader to do that. +common.combat_tagged = You can't do that while combat tagged. +common.cancel = Cancel +common.confirm = Confirm +common.save = Save +common.close = Close +common.yes = Yes +common.no = No +common.loading = Loading... +common.online = Online +common.offline = Offline +common.enabled = Enabled +common.disabled = Disabled +common.none = None +common.page = Page {0} of {1} +common.unknown = Unknown +common.error_generic = Something went wrong. Please try again. From 5d71da8d314e32d6776fcb62cefab6ef2bcfaeae Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Sun, 8 Mar 2026 22:10:57 -0700 Subject: [PATCH 02/55] feat: migrate faction management and claim commands to i18n keys (Phase 1a) Migrate hardcoded English strings to MessageKeys constants for: - FactionSubCommand.requireFaction() - Create, Disband, Rename, Desc, Open, Close, Color commands - Claim command (territory) Add corresponding keys to MessageKeys.java and hyperfactions.lang. --- .../command/FactionSubCommand.java | 3 +- .../command/faction/CloseSubCommand.java | 13 +-- .../command/faction/ColorSubCommand.java | 23 +++-- .../command/faction/CreateSubCommand.java | 25 +++--- .../command/faction/DescSubCommand.java | 10 ++- .../command/faction/DisbandSubCommand.java | 18 ++-- .../command/faction/OpenSubCommand.java | 13 +-- .../command/faction/RenameSubCommand.java | 21 +++-- .../command/territory/ClaimSubCommand.java | 33 ++++--- .../com/hyperfactions/util/MessageKeys.java | 86 +++++++++++++++++-- .../Server/Languages/en-US/hyperfactions.lang | 72 ++++++++++++++++ 11 files changed, 235 insertions(+), 82 deletions(-) diff --git a/src/main/java/com/hyperfactions/command/FactionSubCommand.java b/src/main/java/com/hyperfactions/command/FactionSubCommand.java index 901deb50..1a7f117f 100644 --- a/src/main/java/com/hyperfactions/command/FactionSubCommand.java +++ b/src/main/java/com/hyperfactions/command/FactionSubCommand.java @@ -4,6 +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.MessageUtil; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -109,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("You are not in a faction.")); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); return null; } return faction; diff --git a/src/main/java/com/hyperfactions/command/faction/CloseSubCommand.java b/src/main/java/com/hyperfactions/command/faction/CloseSubCommand.java index ab1e0303..20ded497 100644 --- a/src/main/java/com/hyperfactions/command/faction/CloseSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/CloseSubCommand.java @@ -9,6 +9,8 @@ import com.hyperfactions.data.FactionLog; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -38,7 +40,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.CLOSE)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Close.NO_PERMISSION)); return; } @@ -49,12 +51,12 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isLeader()) { - ctx.sendMessage(prefix().insert(msg("Only the leader can change this setting.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Close.NOT_LEADER)); return; } if (!faction.open()) { - ctx.sendMessage(prefix().insert(msg("Your faction is already closed.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Close.ALREADY_CLOSED, COLOR_YELLOW)); return; } @@ -64,9 +66,8 @@ protected void execute(@NotNull CommandContext ctx, hyperFactions.getFactionManager().updateFaction(updated); - ctx.sendMessage(prefix().insert(msg("Your faction is now invite-only.", COLOR_GREEN))); - broadcastToFaction(faction.id(), prefix().insert(msg(player.getUsername(), COLOR_YELLOW)) - .insert(msg(" closed the faction to invite-only.", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Close.SUCCESS)); + broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.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 7eced8f4..6d54beec 100644 --- a/src/main/java/com/hyperfactions/command/faction/ColorSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/ColorSubCommand.java @@ -10,8 +10,12 @@ import com.hyperfactions.data.FactionLog; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; +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; +import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.command.system.CommandContext; import com.hypixel.hytale.server.core.entity.entities.Player; import com.hypixel.hytale.server.core.universe.PlayerRef; @@ -39,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.COLOR)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Color.NO_PERMISSION)); return; } @@ -50,12 +54,12 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isOfficerOrHigher()) { - ctx.sendMessage(prefix().insert(msg("You must be an officer to change the color.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Color.NOT_OFFICER)); return; } if (!ConfigManager.get().isAllowColors()) { - ctx.sendMessage(prefix().insert(msg("Faction colors are disabled.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Color.COLORS_DISABLED)); return; } @@ -73,8 +77,8 @@ protected void execute(@NotNull CommandContext ctx, // Text mode requires args if (!fctx.hasArgs()) { - ctx.sendMessage(prefix().insert(msg("Usage: /f color ", COLOR_RED))); - ctx.sendMessage(msg("Valid codes: 0-9, a-f or #RRGGBB hex", COLOR_GRAY)); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Color.USAGE)); + ctx.sendMessage(Message.raw(HFMessages.get(player, MessageKeys.Color.USAGE_HINT)).color(COLOR_GRAY)); return; } @@ -87,7 +91,7 @@ protected void execute(@NotNull CommandContext ctx, // Legacy color code - convert to hex hexColor = com.hyperfactions.util.LegacyColorParser.codeToHex(colorInput.charAt(0)); } else { - ctx.sendMessage(prefix().insert(msg("Invalid color. Use 0-9, a-f, or #RRGGBB.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Color.INVALID)); return; } @@ -100,9 +104,10 @@ protected void execute(@NotNull CommandContext ctx, // Refresh world maps to show new faction color (respects configured refresh mode) hyperFactions.getWorldMapService().triggerFactionWideRefresh(faction.id()); - ctx.sendMessage(prefix().insert(msg("Faction color updated to ", COLOR_GREEN)) - .insert(msg("this color", null).color(hexColor)) - .insert(msg("!", COLOR_GREEN))); + // Show success with the actual color swatch + ctx.sendMessage(MessageUtil.prefix().insert( + Message.raw(HFMessages.get(player, MessageKeys.Color.SUCCESS) + " ").color(COLOR_GREEN)) + .insert(Message.raw("\u2588\u2588").color(hexColor))); // After action, open settings page if not text mode if (fctx.shouldOpenGuiAfterAction()) { diff --git a/src/main/java/com/hyperfactions/command/faction/CreateSubCommand.java b/src/main/java/com/hyperfactions/command/faction/CreateSubCommand.java index 17d6dae8..e7f5c366 100644 --- a/src/main/java/com/hyperfactions/command/faction/CreateSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/CreateSubCommand.java @@ -8,6 +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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -37,7 +39,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.CREATE)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to create factions.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Create.NO_PERMISSION)); return; } @@ -55,7 +57,7 @@ protected void execute(@NotNull CommandContext ctx, // Text mode or with args: create directly if (!fctx.hasArgs()) { - ctx.sendMessage(prefix().insert(msg("Usage: /f create ", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Create.USAGE)); return; } @@ -66,8 +68,7 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { - ctx.sendMessage(prefix().insert(msg("Faction '", COLOR_GREEN)) - .insert(msg(name, COLOR_CYAN)).insert(msg("' created!", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Create.SUCCESS, name)); // Open dashboard after creation (if not text mode) if (!fctx.isTextMode()) { Player playerEntity = store.getComponent(ref, Player.getComponentType()); @@ -80,18 +81,16 @@ protected void execute(@NotNull CommandContext ctx, case ALREADY_IN_FACTION -> { Faction existingFaction = hyperFactions.getFactionManager().getPlayerFaction(player.getUuid()); if (existingFaction != null) { - ctx.sendMessage(prefix().insert(msg("You are already in ", COLOR_RED)) - .insert(msg(existingFaction.name(), COLOR_CYAN)) - .insert(msg(".", COLOR_RED))); - ctx.sendMessage(prefix().insert(msg("Use /f leave first if you want to create a new faction.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Create.ALREADY_IN_NAMED, existingFaction.name())); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Create.USE_LEAVE_FIRST, COLOR_YELLOW)); } else { - ctx.sendMessage(prefix().insert(msg("You are already in a faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.ALREADY_IN_FACTION)); } } - case NAME_TAKEN -> ctx.sendMessage(prefix().insert(msg("That faction name is already taken.", COLOR_RED))); - case NAME_TOO_SHORT -> ctx.sendMessage(prefix().insert(msg("Faction name is too short.", COLOR_RED))); - case NAME_TOO_LONG -> ctx.sendMessage(prefix().insert(msg("Faction name is too long.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed to create faction.", COLOR_RED))); + 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)); } } } diff --git a/src/main/java/com/hyperfactions/command/faction/DescSubCommand.java b/src/main/java/com/hyperfactions/command/faction/DescSubCommand.java index 716a6c95..bd9476a2 100644 --- a/src/main/java/com/hyperfactions/command/faction/DescSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/DescSubCommand.java @@ -9,6 +9,8 @@ import com.hyperfactions.data.FactionLog; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -39,7 +41,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.DESC)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Desc.NO_PERMISSION)); return; } @@ -50,7 +52,7 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isOfficerOrHigher()) { - ctx.sendMessage(prefix().insert(msg("You must be an officer to set the description.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Desc.NOT_OFFICER)); return; } @@ -76,9 +78,9 @@ protected void execute(@NotNull CommandContext ctx, hyperFactions.getFactionManager().updateFaction(updated); if (description != null) { - ctx.sendMessage(prefix().insert(msg("Faction description set!", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Desc.SET)); } else { - ctx.sendMessage(prefix().insert(msg("Faction description cleared.", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.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 b461b81c..2e91d1fc 100644 --- a/src/main/java/com/hyperfactions/command/faction/DisbandSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/DisbandSubCommand.java @@ -12,6 +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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -42,7 +44,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.DISBAND)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to disband factions.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Disband.NO_PERMISSION)); return; } @@ -54,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(prefix().insert(msg("Only the faction leader can disband.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Disband.NOT_LEADER)); return; } @@ -78,10 +80,8 @@ protected void execute(@NotNull CommandContext ctx, switch (confirmResult) { case NEEDS_CONFIRMATION, EXPIRED_RECREATED -> { - ctx.sendMessage(prefix().insert(msg("Are you sure you want to disband your faction?", COLOR_YELLOW))); - ctx.sendMessage(prefix().insert(msg("Type ", COLOR_YELLOW)) - .insert(msg("/f disband --text", COLOR_WHITE)) - .insert(msg(" again within " + confirmManager.getTimeoutSeconds() + " seconds to confirm.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Disband.CONFIRM_PROMPT, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.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(prefix().insert(msg("Your faction has been disbanded.", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Disband.SUCCESS)); } else { - ctx.sendMessage(prefix().insert(msg("Failed to disband faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Disband.FAILED)); } } case DIFFERENT_ACTION -> { - ctx.sendMessage(prefix().insert(msg("Previous confirmation cancelled. Type again to confirm disband.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.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 2e934b7d..01a26041 100644 --- a/src/main/java/com/hyperfactions/command/faction/OpenSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/OpenSubCommand.java @@ -9,6 +9,8 @@ import com.hyperfactions.data.FactionLog; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -38,7 +40,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.OPEN)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Open.NO_PERMISSION)); return; } @@ -49,12 +51,12 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isLeader()) { - ctx.sendMessage(prefix().insert(msg("Only the leader can change this setting.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Open.NOT_LEADER)); return; } if (faction.open()) { - ctx.sendMessage(prefix().insert(msg("Your faction is already open.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Open.ALREADY_OPEN, COLOR_YELLOW)); return; } @@ -64,9 +66,8 @@ protected void execute(@NotNull CommandContext ctx, hyperFactions.getFactionManager().updateFaction(updated); - ctx.sendMessage(prefix().insert(msg("Your faction is now open! Anyone can join with /f join.", COLOR_GREEN))); - broadcastToFaction(faction.id(), prefix().insert(msg(player.getUsername(), COLOR_YELLOW)) - .insert(msg(" opened the faction to public joining.", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Open.SUCCESS)); + broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.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 a9ee6341..1a026b04 100644 --- a/src/main/java/com/hyperfactions/command/faction/RenameSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/RenameSubCommand.java @@ -10,6 +10,8 @@ import com.hyperfactions.data.FactionLog; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -39,7 +41,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.RENAME)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rename.NO_PERMISSION)); return; } @@ -50,7 +52,7 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isLeader()) { - ctx.sendMessage(prefix().insert(msg("Only the leader can rename the faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rename.NOT_LEADER)); return; } @@ -68,7 +70,7 @@ protected void execute(@NotNull CommandContext ctx, // Text mode requires args if (!fctx.hasArgs()) { - ctx.sendMessage(prefix().insert(msg("Usage: /f rename ", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rename.USAGE)); return; } @@ -76,15 +78,15 @@ protected void execute(@NotNull CommandContext ctx, ConfigManager config = ConfigManager.get(); if (newName.length() < config.getMinNameLength()) { - ctx.sendMessage(prefix().insert(msg("Name is too short (min " + config.getMinNameLength() + " chars).", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rename.TOO_SHORT, config.getMinNameLength())); return; } if (newName.length() > config.getMaxNameLength()) { - ctx.sendMessage(prefix().insert(msg("Name is too long (max " + config.getMaxNameLength() + " chars).", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rename.TOO_LONG, config.getMaxNameLength())); return; } if (hyperFactions.getFactionManager().isNameTaken(newName) && !newName.equalsIgnoreCase(faction.name())) { - ctx.sendMessage(prefix().insert(msg("That name is already taken.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rename.NAME_TAKEN)); return; } @@ -100,11 +102,8 @@ protected void execute(@NotNull CommandContext ctx, hyperFactions.getWorldMapService().triggerFactionWideRefresh(faction.id()); } - ctx.sendMessage(prefix().insert(msg("Faction renamed to ", COLOR_GREEN)) - .insert(msg(newName, COLOR_CYAN)).insert(msg("!", COLOR_GREEN))); - broadcastToFaction(faction.id(), prefix().insert(msg(player.getUsername(), COLOR_YELLOW)) - .insert(msg(" renamed the faction to ", COLOR_GREEN)) - .insert(msg(newName, COLOR_CYAN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Rename.SUCCESS, newName)); + broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.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/territory/ClaimSubCommand.java b/src/main/java/com/hyperfactions/command/territory/ClaimSubCommand.java index 329887f5..ce30da3d 100644 --- a/src/main/java/com/hyperfactions/command/territory/ClaimSubCommand.java +++ b/src/main/java/com/hyperfactions/command/territory/ClaimSubCommand.java @@ -9,6 +9,7 @@ import com.hyperfactions.manager.ClaimManager; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.ChunkUtil; +import com.hyperfactions.util.MessageKeys; 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.CLAIM)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to claim territory.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.NO_PERMISSION)); return; } @@ -71,7 +72,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(prefix().insert(msg("Your faction already owns this chunk.", COLOR_GRAY))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Claim.ALREADY_YOURS, COLOR_GRAY)); hyperFactions.getGuiManager().openChunkMap(playerEntity, ref, store, player); return; } @@ -81,11 +82,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(prefix().insert(msg("You cannot claim ally territory.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.CANNOT_CLAIM_ALLY)); } else { - ctx.sendMessage(prefix().insert(msg("This chunk is claimed. Use ", COLOR_RED)) - .insert(msg("/f overclaim", COLOR_WHITE)) - .insert(msg(" if they are raidable.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.ALREADY_CLAIMED_HINT)); } Player playerEntity = store.getComponent(ref, Player.getComponentType()); if (playerEntity != null) { @@ -101,7 +100,7 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { - ctx.sendMessage(prefix().insert(msg("Claimed chunk at " + chunkX + ", " + chunkZ + "!", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Claim.SUCCESS, chunkX, chunkZ)); // Show map after claiming (if not text mode) if (!fctx.isTextMode()) { Player playerEntity = store.getComponent(ref, Player.getComponentType()); @@ -110,16 +109,16 @@ protected void execute(@NotNull CommandContext ctx, } } } - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error("You are not in a faction.")); - case NOT_OFFICER -> ctx.sendMessage(prefix().insert(msg("You must be an officer to claim land.", COLOR_RED))); - case ALREADY_CLAIMED_SELF -> ctx.sendMessage(prefix().insert(msg("Your faction already owns this chunk.", COLOR_RED))); - case ALREADY_CLAIMED_OTHER -> ctx.sendMessage(prefix().insert(msg("This chunk is already claimed.", COLOR_RED))); - case MAX_CLAIMS_REACHED -> ctx.sendMessage(prefix().insert(msg("Your faction has reached max claims. Get more power!", COLOR_RED))); - case NOT_ADJACENT -> ctx.sendMessage(prefix().insert(msg("You must claim adjacent to existing territory.", COLOR_RED))); - case WORLD_NOT_ALLOWED -> ctx.sendMessage(prefix().insert(msg("Claiming is not allowed in this world.", COLOR_RED))); - case ORBISGUARD_PROTECTED -> ctx.sendMessage(prefix().insert(msg("This area is protected by OrbisGuard.", COLOR_RED))); - case ZONE_PROTECTED -> ctx.sendMessage(prefix().insert(msg("This chunk is in a safezone or warzone.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed to claim chunk.", COLOR_RED))); + 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)); } } } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 9f7465ef..c604dc7d 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -60,25 +60,91 @@ private Common() {} /** /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_INVALID = "hyperfactions.cmd.create.name_invalid"; 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 NAME_PROFANITY = "hyperfactions.cmd.create.name_profanity"; - public static final String MAX_FACTIONS = "hyperfactions.cmd.create.max_factions"; + public static final String FAILED = "hyperfactions.cmd.create.failed"; private Create() {} } /** /f disband command messages. */ public static final class Disband { - public static final String SUCCESS = "hyperfactions.cmd.disband.success"; + 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 SENT = "hyperfactions.cmd.invite.sent"; @@ -138,12 +204,20 @@ private Rank() {} /** /f claim, /f unclaim, /f overclaim command messages. */ public static final class 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 UNCLAIMED = "hyperfactions.cmd.claim.unclaimed"; 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 NOT_CONNECTED = "hyperfactions.cmd.claim.not_connected"; - public static final String NOT_ENOUGH_POWER = "hyperfactions.cmd.claim.not_enough_power"; + 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"; public static final String OVERCLAIMED = "hyperfactions.cmd.claim.overclaimed"; public static final String CANNOT_OVERCLAIM = "hyperfactions.cmd.claim.cannot_overclaim"; public static final String NOT_YOUR_CLAIM = "hyperfactions.cmd.claim.not_your_claim"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions.lang b/src/main/resources/Server/Languages/en-US/hyperfactions.lang index 822ae91d..46a0d840 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions.lang @@ -28,3 +28,75 @@ common.none = None common.page = Page {0} of {1} common.unknown = Unknown common.error_generic = Something went wrong. Please try again. + +# ========== Commands - Create ========== +cmd.create.no_permission = You don't have permission to create factions. +cmd.create.usage = Usage: /f create +cmd.create.success = Faction '{0}' created! +cmd.create.already_in_named = You are already in {0}. +cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. +cmd.create.name_taken = That faction name is already taken. +cmd.create.name_too_short = Faction name is too short. +cmd.create.name_too_long = Faction name is too long. +cmd.create.failed = Failed to create faction. + +# ========== Commands - Disband ========== +cmd.disband.no_permission = You don't have permission to disband factions. +cmd.disband.not_leader = Only the faction leader can disband. +cmd.disband.confirm_prompt = Are you sure you want to disband your faction? +cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. +cmd.disband.success = Your faction has been disbanded. +cmd.disband.failed = Failed to disband faction. +cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. + +# ========== Commands - Rename ========== +cmd.rename.no_permission = You don't have permission. +cmd.rename.not_leader = Only the leader can rename the faction. +cmd.rename.usage = Usage: /f rename +cmd.rename.too_short = Name is too short (min {0} chars). +cmd.rename.too_long = Name is too long (max {0} chars). +cmd.rename.name_taken = That name is already taken. +cmd.rename.success = Faction renamed to {0}! +cmd.rename.broadcast = {0} renamed the faction to {1} + +# ========== Commands - Description ========== +cmd.desc.no_permission = You don't have permission. +cmd.desc.not_officer = You must be an officer to set the description. +cmd.desc.set = Faction description set! +cmd.desc.cleared = Faction description cleared. + +# ========== Commands - Open / Close ========== +cmd.open.no_permission = You don't have permission. +cmd.open.not_leader = Only the leader can change this setting. +cmd.open.already_open = Your faction is already open. +cmd.open.success = Your faction is now open! Anyone can join with /f join. +cmd.open.broadcast = {0} opened the faction to public joining. +cmd.close.no_permission = You don't have permission. +cmd.close.not_leader = Only the leader can change this setting. +cmd.close.already_closed = Your faction is already closed. +cmd.close.success = Your faction is now invite-only. +cmd.close.broadcast = {0} closed the faction to invite-only. + +# ========== Commands - Color ========== +cmd.color.no_permission = You don't have permission. +cmd.color.not_officer = You must be an officer to change the color. +cmd.color.colors_disabled = Faction colors are disabled. +cmd.color.usage = Usage: /f color +cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex +cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. +cmd.color.success = Faction color updated! + +# ========== Commands - Claim ========== +cmd.claim.no_permission = You don't have permission to claim territory. +cmd.claim.already_yours = Your faction already owns this chunk. +cmd.claim.cannot_claim_ally = You cannot claim ally territory. +cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. +cmd.claim.success = Claimed chunk at {0}, {1}! +cmd.claim.not_officer = You must be an officer to claim land. +cmd.claim.already_claimed = This chunk is already claimed. +cmd.claim.max_claims = Your faction has reached max claims. Get more power! +cmd.claim.not_adjacent = You must claim adjacent to existing territory. +cmd.claim.world_not_allowed = Claiming is not allowed in this world. +cmd.claim.orbisguard = This area is protected by OrbisGuard. +cmd.claim.zone_protected = This chunk is in a safezone or warzone. +cmd.claim.failed = Failed to claim chunk. From 18398b4dff65eaa63788bc7edc268b10b5e0db7c Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Sun, 8 Mar 2026 22:18:27 -0700 Subject: [PATCH 03/55] feat: migrate member commands to i18n keys (Phase 1b) Migrate hardcoded English strings to MessageKeys constants for: - Invite, Accept/Join, Kick, Leave commands - Promote, Demote, Transfer commands Add corresponding keys to MessageKeys.java and hyperfactions.lang. --- .../command/member/AcceptSubCommand.java | 30 ++++----- .../command/member/DemoteSubCommand.java | 20 +++--- .../command/member/InviteSubCommand.java | 21 +++--- .../command/member/KickSubCommand.java | 22 +++---- .../command/member/LeaveSubCommand.java | 20 +++--- .../command/member/PromoteSubCommand.java | 20 +++--- .../command/member/TransferSubCommand.java | 28 ++++---- .../com/hyperfactions/util/MessageKeys.java | 60 +++++++++++++---- .../Server/Languages/en-US/hyperfactions.lang | 66 +++++++++++++++++++ 9 files changed, 190 insertions(+), 97 deletions(-) diff --git a/src/main/java/com/hyperfactions/command/member/AcceptSubCommand.java b/src/main/java/com/hyperfactions/command/member/AcceptSubCommand.java index d08bbb92..0c45d138 100644 --- a/src/main/java/com/hyperfactions/command/member/AcceptSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/AcceptSubCommand.java @@ -9,6 +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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -41,19 +43,17 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.JOIN)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to join factions.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.NO_PERMISSION)); return; } if (hyperFactions.getFactionManager().isInFaction(player.getUuid())) { Faction existingFaction = hyperFactions.getFactionManager().getPlayerFaction(player.getUuid()); if (existingFaction != null) { - ctx.sendMessage(prefix().insert(msg("You are already in ", COLOR_RED)) - .insert(msg(existingFaction.name(), COLOR_CYAN)) - .insert(msg(".", COLOR_RED))); - ctx.sendMessage(prefix().insert(msg("Use /f leave first if you want to join another faction.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.ALREADY_IN_NAMED, existingFaction.name())); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Join.USE_LEAVE_HINT, COLOR_YELLOW)); } else { - ctx.sendMessage(prefix().insert(msg("You are already in a faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.ALREADY_IN_FACTION)); } return; } @@ -73,7 +73,7 @@ protected void execute(@NotNull CommandContext ctx, } if (invites.isEmpty()) { - ctx.sendMessage(prefix().insert(msg("You have no pending invites.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.NO_INVITES)); return; } @@ -82,12 +82,12 @@ protected void execute(@NotNull CommandContext ctx, String factionName = fctx.joinArgs(); Faction targetFaction = hyperFactions.getFactionManager().getFactionByName(factionName); if (targetFaction == null) { - ctx.sendMessage(prefix().insert(msg("Faction '" + factionName + "' not found.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.FACTION_NOT_FOUND, factionName)); return; } invite = hyperFactions.getInviteManager().getInvite(targetFaction.id(), player.getUuid()); if (invite == null) { - ctx.sendMessage(prefix().insert(msg("You have no invite from that faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.NOT_INVITED)); return; } } else { @@ -96,7 +96,7 @@ protected void execute(@NotNull CommandContext ctx, Faction faction = hyperFactions.getFactionManager().getFaction(invite.factionId()); if (faction == null) { - ctx.sendMessage(prefix().insert(msg("That faction no longer exists.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.FACTION_GONE)); hyperFactions.getInviteManager().removeInvite(invite.factionId(), player.getUuid()); return; } @@ -108,14 +108,12 @@ protected void execute(@NotNull CommandContext ctx, if (result == FactionManager.FactionResult.SUCCESS) { hyperFactions.getInviteManager().clearPlayerInvites(player.getUuid()); hyperFactions.getJoinRequestManager().clearPlayerRequests(player.getUuid()); - ctx.sendMessage(prefix().insert(msg("You have joined ", COLOR_GREEN)) - .insert(msg(faction.name(), COLOR_CYAN)).insert(msg("!", COLOR_GREEN))); - broadcastToFaction(faction.id(), prefix().insert(msg(player.getUsername(), COLOR_YELLOW)) - .insert(msg(" has joined the faction!", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Join.SUCCESS, faction.name())); + broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.Join.BROADCAST, player.getUsername())); } else if (result == FactionManager.FactionResult.FACTION_FULL) { - ctx.sendMessage(prefix().insert(msg("That faction is full.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Join.FACTION_FULL)); } else { - ctx.sendMessage(prefix().insert(msg("Failed to join faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.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 c8cbf833..757ec1b4 100644 --- a/src/main/java/com/hyperfactions/command/member/DemoteSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/DemoteSubCommand.java @@ -11,6 +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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -40,7 +42,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.DEMOTE)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to demote members.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.DEMOTE_NO_PERMISSION)); return; } @@ -53,7 +55,7 @@ protected void execute(@NotNull CommandContext ctx, FactionCommandContext fctx = parseContext(rawArgs); if (!fctx.hasArgs()) { - ctx.sendMessage(prefix().insert(msg("Usage: /f demote ", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.DEMOTE_USAGE)); return; } @@ -63,7 +65,7 @@ protected void execute(@NotNull CommandContext ctx, .findFirst().orElse(null); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player not found in your faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.PLAYER_NOT_IN_FACTION)); return; } @@ -74,10 +76,8 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { String memberName = ConfigManager.get().getRoleDisplayName(FactionRole.MEMBER); - ctx.sendMessage(prefix().insert(msg("Demoted ", COLOR_GREEN)) - .insert(msg(target.username(), COLOR_YELLOW)).insert(msg(" to " + memberName + ".", COLOR_GREEN))); - broadcastToFaction(faction.id(), prefix().insert(msg(target.username(), COLOR_YELLOW)) - .insert(msg(" was demoted to " + memberName + ".", COLOR_RED))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Rank.DEMOTED, target.username(), memberName)); + broadcastToFaction(faction.id(), MessageUtil.error(player, MessageKeys.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 +86,9 @@ protected void execute(@NotNull CommandContext ctx, } } } - case NOT_LEADER -> ctx.sendMessage(prefix().insert(msg("Only the leader can demote members.", COLOR_RED))); - case CANNOT_DEMOTE_MEMBER -> ctx.sendMessage(prefix().insert(msg("That player is already a Member.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed to demote player.", COLOR_RED))); + 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)); } } } diff --git a/src/main/java/com/hyperfactions/command/member/InviteSubCommand.java b/src/main/java/com/hyperfactions/command/member/InviteSubCommand.java index f6c2fd43..d231a190 100644 --- a/src/main/java/com/hyperfactions/command/member/InviteSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/InviteSubCommand.java @@ -8,6 +8,8 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -37,7 +39,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.INVITE)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to invite players.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Invite.NO_PERMISSION)); return; } @@ -48,7 +50,7 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isOfficerOrHigher()) { - ctx.sendMessage(prefix().insert(msg("You must be an officer to invite players.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Invite.NOT_OFFICER)); return; } @@ -65,29 +67,26 @@ protected void execute(@NotNull CommandContext ctx, } if (!fctx.hasArgs()) { - ctx.sendMessage(prefix().insert(msg("Usage: /f invite ", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Invite.USAGE)); return; } String targetName = fctx.getArg(0); PlayerRef target = findOnlinePlayer(targetName); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player '" + targetName + "' not found or offline.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Invite.PLAYER_NOT_FOUND, targetName)); return; } if (hyperFactions.getFactionManager().isInFaction(target.getUuid())) { - ctx.sendMessage(prefix().insert(msg("That player is already in a faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Invite.TARGET_IN_FACTION)); return; } hyperFactions.getInviteManager().createInvite(faction.id(), target.getUuid(), player.getUuid()); - ctx.sendMessage(prefix().insert(msg("Invited ", COLOR_GREEN)) - .insert(msg(target.getUsername(), COLOR_YELLOW)).insert(msg(" to your faction.", COLOR_GREEN))); - target.sendMessage(prefix().insert(msg("You have been invited to join ", COLOR_YELLOW)) - .insert(msg(faction.name(), COLOR_CYAN)).insert(msg("!", COLOR_YELLOW))); - target.sendMessage(prefix().insert(msg("Type ", COLOR_YELLOW)) - .insert(msg("/f accept " + faction.name(), COLOR_GREEN)).insert(msg(" to join.", COLOR_YELLOW))); + 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())); } } diff --git a/src/main/java/com/hyperfactions/command/member/KickSubCommand.java b/src/main/java/com/hyperfactions/command/member/KickSubCommand.java index 694fadb9..0a796747 100644 --- a/src/main/java/com/hyperfactions/command/member/KickSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/KickSubCommand.java @@ -9,6 +9,8 @@ import com.hyperfactions.data.FactionMember; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -38,7 +40,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.KICK)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to kick members.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Kick.NO_PERMISSION)); return; } @@ -51,7 +53,7 @@ protected void execute(@NotNull CommandContext ctx, FactionCommandContext fctx = parseContext(rawArgs); if (!fctx.hasArgs()) { - ctx.sendMessage(prefix().insert(msg("Usage: /f kick ", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Kick.USAGE)); return; } @@ -61,7 +63,7 @@ protected void execute(@NotNull CommandContext ctx, .findFirst().orElse(null); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player '" + targetName + "' is not in your faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Kick.NOT_IN_YOUR_FACTION, targetName)); return; } @@ -71,13 +73,11 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { - ctx.sendMessage(prefix().insert(msg("Kicked ", COLOR_GREEN)) - .insert(msg(target.username(), COLOR_YELLOW)).insert(msg(" from the faction.", COLOR_GREEN))); - broadcastToFaction(faction.id(), prefix().insert(msg(target.username(), COLOR_YELLOW)) - .insert(msg(" was kicked from the faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Kick.SUCCESS, target.username())); + broadcastToFaction(faction.id(), MessageUtil.error(player, MessageKeys.Kick.BROADCAST, target.username())); PlayerRef targetPlayer = plugin.getTrackedPlayer(target.uuid()); if (targetPlayer != null) { - targetPlayer.sendMessage(prefix().insert(msg("You have been kicked from the faction.", COLOR_RED))); + targetPlayer.sendMessage(MessageUtil.error(targetPlayer, MessageKeys.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(prefix().insert(msg("You don't have permission to kick that player.", COLOR_RED))); - case CANNOT_KICK_LEADER -> ctx.sendMessage(prefix().insert(msg("You cannot kick the faction leader.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed to kick player.", COLOR_RED))); + 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)); } } } diff --git a/src/main/java/com/hyperfactions/command/member/LeaveSubCommand.java b/src/main/java/com/hyperfactions/command/member/LeaveSubCommand.java index 20977ea1..91176bca 100644 --- a/src/main/java/com/hyperfactions/command/member/LeaveSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/LeaveSubCommand.java @@ -13,6 +13,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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -43,7 +45,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.LEAVE)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to leave factions.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Leave.NO_PERMISSION)); return; } @@ -78,10 +80,9 @@ protected void execute(@NotNull CommandContext ctx, switch (confirmResult) { case NEEDS_CONFIRMATION, EXPIRED_RECREATED -> { - ctx.sendMessage(prefix().insert(msg("Are you sure you want to leave your faction?", COLOR_YELLOW))); - ctx.sendMessage(prefix().insert(msg("Type ", COLOR_YELLOW)) - .insert(msg("/f leave --text", COLOR_WHITE)) - .insert(msg(" again within " + confirmManager.getTimeoutSeconds() + " seconds to confirm.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Leave.CONFIRM_PROMPT, COLOR_YELLOW)); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Leave.CONFIRM_INSTRUCTION, COLOR_YELLOW, + confirmManager.getTimeoutSeconds())); } case CONFIRMED -> { UUID factionId = faction.id(); @@ -89,15 +90,14 @@ protected void execute(@NotNull CommandContext ctx, factionId, player.getUuid(), player.getUuid(), false ); if (result == FactionManager.FactionResult.SUCCESS) { - ctx.sendMessage(prefix().insert(msg("You have left your faction.", COLOR_GREEN))); - broadcastToFaction(factionId, prefix().insert(msg(player.getUsername(), COLOR_YELLOW)) - .insert(msg(" has left the faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Leave.SUCCESS)); + broadcastToFaction(factionId, MessageUtil.error(player, MessageKeys.Leave.BROADCAST, player.getUsername())); } else { - ctx.sendMessage(prefix().insert(msg("Failed to leave faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Leave.FAILED)); } } case DIFFERENT_ACTION -> { - ctx.sendMessage(prefix().insert(msg("Previous confirmation cancelled. Type again to confirm leave.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.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 7548a6f4..2ecd1f23 100644 --- a/src/main/java/com/hyperfactions/command/member/PromoteSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/PromoteSubCommand.java @@ -11,6 +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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -40,7 +42,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.PROMOTE)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to promote members.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.PROMOTE_NO_PERMISSION)); return; } @@ -53,7 +55,7 @@ protected void execute(@NotNull CommandContext ctx, FactionCommandContext fctx = parseContext(rawArgs); if (!fctx.hasArgs()) { - ctx.sendMessage(prefix().insert(msg("Usage: /f promote ", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.PROMOTE_USAGE)); return; } @@ -63,7 +65,7 @@ protected void execute(@NotNull CommandContext ctx, .findFirst().orElse(null); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player not found in your faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.PLAYER_NOT_IN_FACTION)); return; } @@ -74,10 +76,8 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { String officerName = ConfigManager.get().getRoleDisplayName(FactionRole.OFFICER); - ctx.sendMessage(prefix().insert(msg("Promoted ", COLOR_GREEN)) - .insert(msg(target.username(), COLOR_YELLOW)).insert(msg(" to " + officerName + "!", COLOR_GREEN))); - broadcastToFaction(faction.id(), prefix().insert(msg(target.username(), COLOR_YELLOW)) - .insert(msg(" was promoted to " + officerName + "!", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Rank.PROMOTED, target.username(), officerName)); + broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.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 +86,9 @@ protected void execute(@NotNull CommandContext ctx, } } } - case NOT_LEADER -> ctx.sendMessage(prefix().insert(msg("Only the leader can promote members.", COLOR_RED))); - case CANNOT_PROMOTE_LEADER -> ctx.sendMessage(prefix().insert(msg("Cannot promote further. Use /f transfer to change leader.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed to promote player.", COLOR_RED))); + 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)); } } } diff --git a/src/main/java/com/hyperfactions/command/member/TransferSubCommand.java b/src/main/java/com/hyperfactions/command/member/TransferSubCommand.java index ca766ec8..8d0cdaac 100644 --- a/src/main/java/com/hyperfactions/command/member/TransferSubCommand.java +++ b/src/main/java/com/hyperfactions/command/member/TransferSubCommand.java @@ -12,6 +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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -41,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.TRANSFER)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to transfer leadership.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.TRANSFER_NO_PERMISSION)); return; } @@ -53,7 +55,7 @@ protected void execute(@NotNull CommandContext ctx, // Check if leader FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isLeader()) { - ctx.sendMessage(prefix().insert(msg("Only the leader can transfer leadership.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.MUST_BE_LEADER)); return; } @@ -61,7 +63,7 @@ protected void execute(@NotNull CommandContext ctx, FactionCommandContext fctx = parseContext(rawArgs); if (!fctx.hasArgs()) { - ctx.sendMessage(prefix().insert(msg("Usage: /f transfer ", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.TRANSFER_USAGE)); return; } @@ -71,7 +73,7 @@ protected void execute(@NotNull CommandContext ctx, .findFirst().orElse(null); if (target == null) { - ctx.sendMessage(prefix().insert(msg("Player not found in your faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.PLAYER_NOT_IN_FACTION)); return; } @@ -93,27 +95,23 @@ protected void execute(@NotNull CommandContext ctx, switch (confirmResult) { case NEEDS_CONFIRMATION, EXPIRED_RECREATED -> { - ctx.sendMessage(prefix().insert(msg("Are you sure you want to transfer leadership to ", COLOR_YELLOW)) - .insert(msg(target.username(), COLOR_WHITE)).insert(msg("?", COLOR_YELLOW))); - ctx.sendMessage(prefix().insert(msg("Type ", COLOR_YELLOW)) - .insert(msg("/f transfer " + target.username() + " --text", COLOR_WHITE)) - .insert(msg(" again within " + confirmManager.getTimeoutSeconds() + " seconds to confirm.", COLOR_YELLOW))); + 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, + target.username(), confirmManager.getTimeoutSeconds())); } case CONFIRMED -> { FactionManager.FactionResult result = hyperFactions.getFactionManager().transferLeadership( faction.id(), target.uuid(), player.getUuid() ); if (result == FactionManager.FactionResult.SUCCESS) { - ctx.sendMessage(prefix().insert(msg("Transferred leadership to ", COLOR_GREEN)) - .insert(msg(target.username(), COLOR_YELLOW)).insert(msg("!", COLOR_GREEN))); - broadcastToFaction(faction.id(), prefix().insert(msg(target.username(), COLOR_YELLOW)) - .insert(msg(" is now the faction leader!", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Rank.TRANSFERRED, target.username())); + broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.Rank.TRANSFER_BROADCAST, target.username())); } else { - ctx.sendMessage(prefix().insert(msg("Failed to transfer leadership.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Rank.TRANSFER_FAILED)); } } case DIFFERENT_ACTION -> { - ctx.sendMessage(prefix().insert(msg("Previous confirmation cancelled. Type again to confirm transfer.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Rank.TRANSFER_CANCELLED, COLOR_YELLOW)); } default -> throw new IllegalStateException("Unexpected value"); } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index c604dc7d..0bdc950f 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -147,57 +147,89 @@ 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 ALREADY_INVITED = "hyperfactions.cmd.invite.already_invited"; - public static final String TARGET_IN_FACTION = "hyperfactions.cmd.invite.target_in_faction"; - public static final String REVOKED = "hyperfactions.cmd.invite.revoked"; - public static final String MAX_INVITES = "hyperfactions.cmd.invite.max_invites"; + 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 NOT_INVITED = "hyperfactions.cmd.join.not_invited"; - public static final String FACTION_CLOSED = "hyperfactions.cmd.join.faction_closed"; - public static final String REQUEST_SENT = "hyperfactions.cmd.join.request_sent"; - public static final String REQUEST_RECEIVED = "hyperfactions.cmd.join.request_received"; + 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 LEADER_CANNOT = "hyperfactions.cmd.leave.leader_cannot"; + 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 KICKED = "hyperfactions.cmd.kick.kicked"; public static final String BROADCAST = "hyperfactions.cmd.kick.broadcast"; - public static final String CANNOT_KICK_SELF = "hyperfactions.cmd.kick.cannot_kick_self"; + 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 NOT_IN_YOUR_FACTION = "hyperfactions.cmd.kick.not_in_your_faction"; + 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 DEMOTED = "hyperfactions.cmd.rank.demoted"; - public static final String TRANSFERRED = "hyperfactions.cmd.rank.transferred"; + 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() {} } diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions.lang b/src/main/resources/Server/Languages/en-US/hyperfactions.lang index 46a0d840..209b5b07 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions.lang @@ -100,3 +100,69 @@ cmd.claim.world_not_allowed = Claiming is not allowed in this world. cmd.claim.orbisguard = This area is protected by OrbisGuard. cmd.claim.zone_protected = This chunk is in a safezone or warzone. cmd.claim.failed = Failed to claim chunk. + +# ========== Commands - Invite ========== +cmd.invite.no_permission = You don't have permission to invite players. +cmd.invite.not_officer = You must be an officer to invite players. +cmd.invite.usage = Usage: /f invite +cmd.invite.player_not_found = Player '{0}' not found or offline. +cmd.invite.target_in_faction = That player is already in a faction. +cmd.invite.sent = Invited {0} to your faction. +cmd.invite.received = You have been invited to join {0}! +cmd.invite.accept_hint = Type /f accept {0} to join. + +# ========== Commands - Accept / Join ========== +cmd.join.no_permission = You don't have permission to join factions. +cmd.join.already_in_named = You are already in {0}. +cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.join.no_invites = You have no pending invites. +cmd.join.faction_not_found = Faction '{0}' not found. +cmd.join.not_invited = You have no invite from that faction. +cmd.join.faction_gone = That faction no longer exists. +cmd.join.success = You have joined {0}! +cmd.join.broadcast = {0} has joined the faction! +cmd.join.faction_full = That faction is full. +cmd.join.failed = Failed to join faction. + +# ========== Commands - Kick ========== +cmd.kick.no_permission = You don't have permission to kick members. +cmd.kick.usage = Usage: /f kick +cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. +cmd.kick.success = Kicked {0} from the faction. +cmd.kick.broadcast = {0} was kicked from the faction. +cmd.kick.kicked = You have been kicked from the faction. +cmd.kick.cannot_kick_higher = You don't have permission to kick that player. +cmd.kick.cannot_kick_leader = You cannot kick the faction leader. +cmd.kick.failed = Failed to kick player. + +# ========== Commands - Leave ========== +cmd.leave.no_permission = You don't have permission to leave factions. +cmd.leave.confirm_prompt = Are you sure you want to leave your faction? +cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. +cmd.leave.success = You have left your faction. +cmd.leave.broadcast = {0} has left the faction. +cmd.leave.failed = Failed to leave faction. +cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. + +# ========== Commands - Promote / Demote / Transfer ========== +cmd.rank.promote_no_permission = You don't have permission to promote members. +cmd.rank.promote_usage = Usage: /f promote +cmd.rank.promoted = Promoted {0} to {1}! +cmd.rank.promote_broadcast = {0} was promoted to {1}! +cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. +cmd.rank.promote_failed = Failed to promote player. +cmd.rank.demote_no_permission = You don't have permission to demote members. +cmd.rank.demote_usage = Usage: /f demote +cmd.rank.demoted = Demoted {0} to {1}. +cmd.rank.demote_broadcast = {0} was demoted to {1}. +cmd.rank.already_lowest = That player is already a Member. +cmd.rank.demote_failed = Failed to demote player. +cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. +cmd.rank.transfer_usage = Usage: /f transfer +cmd.rank.player_not_in_faction = Player not found in your faction. +cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? +cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. +cmd.rank.transferred = Transferred leadership to {0}! +cmd.rank.transfer_broadcast = {0} is now the faction leader! +cmd.rank.transfer_failed = Failed to transfer leadership. +cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. From 7f47fe9c5d52e24e3b1ba68a1dc4b66570a57fe0 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 07:28:38 -0700 Subject: [PATCH 04/55] feat: migrate territory and teleport commands to i18n keys (Phase 1c) Migrate hardcoded English strings to MessageKeys constants for: - Unclaim, Overclaim, Stuck commands (territory) - Home, SetHome, DelHome commands (teleport) Add corresponding keys to MessageKeys.java and hyperfactions.lang. --- .../command/teleport/DelHomeSubCommand.java | 15 +++--- .../command/teleport/HomeSubCommand.java | 11 ++-- .../command/teleport/SetHomeSubCommand.java | 17 +++--- .../territory/OverclaimSubCommand.java | 21 ++++---- .../command/territory/StuckSubCommand.java | 12 +++-- .../command/territory/UnclaimSubCommand.java | 19 +++---- .../com/hyperfactions/util/MessageKeys.java | 54 +++++++++++++++---- .../Server/Languages/en-US/hyperfactions.lang | 50 +++++++++++++++++ 8 files changed, 145 insertions(+), 54 deletions(-) diff --git a/src/main/java/com/hyperfactions/command/teleport/DelHomeSubCommand.java b/src/main/java/com/hyperfactions/command/teleport/DelHomeSubCommand.java index c005f946..7102fc14 100644 --- a/src/main/java/com/hyperfactions/command/teleport/DelHomeSubCommand.java +++ b/src/main/java/com/hyperfactions/command/teleport/DelHomeSubCommand.java @@ -6,6 +6,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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -34,7 +36,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.DELHOME)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to delete faction home.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.DELHOME_NO_PERMISSION)); return; } @@ -44,20 +46,19 @@ protected void execute(@NotNull CommandContext ctx, } if (faction.home() == null) { - ctx.sendMessage(prefix().insert(msg("Your faction does not have a home set.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.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(prefix().insert(msg("Faction home deleted!", COLOR_GREEN))); - broadcastToFaction(faction.id(), prefix().insert(msg(player.getUsername(), COLOR_YELLOW)) - .insert(msg(" deleted the faction home.", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Home.DELETED)); + broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.Home.DELHOME_BROADCAST, player.getUsername())); } else if (result == FactionManager.FactionResult.NOT_OFFICER) { - ctx.sendMessage(prefix().insert(msg("You must be an officer to delete the home.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.DELHOME_NOT_OFFICER)); } else { - ctx.sendMessage(prefix().insert(msg("Failed to delete home.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.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 96de5b6f..7f2a1726 100644 --- a/src/main/java/com/hyperfactions/command/teleport/HomeSubCommand.java +++ b/src/main/java/com/hyperfactions/command/teleport/HomeSubCommand.java @@ -6,6 +6,7 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.TeleportManager; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; 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.HOME)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to teleport to faction home.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.NO_PERMISSION)); return; } @@ -79,11 +80,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("You are not in a faction.")); - case NO_HOME -> ctx.sendMessage(prefix().insert(msg("Your faction has no home set.", COLOR_RED))); - case COMBAT_TAGGED -> ctx.sendMessage(prefix().insert(msg("You cannot teleport while in combat!", COLOR_RED))); + 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 ON_COOLDOWN -> {} // Message sent by TeleportManager - case SUCCESS_INSTANT -> ctx.sendMessage(prefix().insert(msg("Teleported to faction home!", COLOR_GREEN))); + case SUCCESS_INSTANT -> ctx.sendMessage(MessageUtil.success(player, MessageKeys.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 56ee1bf5..40f43c99 100644 --- a/src/main/java/com/hyperfactions/command/teleport/SetHomeSubCommand.java +++ b/src/main/java/com/hyperfactions/command/teleport/SetHomeSubCommand.java @@ -8,6 +8,8 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.ChunkUtil; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.math.vector.Vector3d; @@ -40,12 +42,12 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.SETHOME)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to set faction home.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.SETHOME_NO_PERMISSION)); return; } if (!ConfigManager.get().isWorldAllowed(currentWorld.getName())) { - ctx.sendMessage(prefix().insert(msg("Cannot set home in this world.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.SETHOME_WORLD_NOT_ALLOWED)); return; } @@ -66,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(prefix().insert(msg("You can only set home in your faction's territory.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.NOT_IN_TERRITORY)); return; } @@ -78,13 +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(prefix().insert(msg("Faction home set!", COLOR_GREEN))); - broadcastToFaction(faction.id(), prefix().insert(msg(player.getUsername(), COLOR_YELLOW)) - .insert(msg(" set the faction home.", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Home.SET)); + broadcastToFaction(faction.id(), MessageUtil.success(player, MessageKeys.Home.SETHOME_BROADCAST, player.getUsername())); } else if (result == FactionManager.FactionResult.NOT_OFFICER) { - ctx.sendMessage(prefix().insert(msg("You must be an officer to set the home.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.SETHOME_NOT_OFFICER)); } else { - ctx.sendMessage(prefix().insert(msg("Failed to set home.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.SETHOME_FAILED)); } } } diff --git a/src/main/java/com/hyperfactions/command/territory/OverclaimSubCommand.java b/src/main/java/com/hyperfactions/command/territory/OverclaimSubCommand.java index b905585a..96fb5374 100644 --- a/src/main/java/com/hyperfactions/command/territory/OverclaimSubCommand.java +++ b/src/main/java/com/hyperfactions/command/territory/OverclaimSubCommand.java @@ -9,6 +9,7 @@ import com.hyperfactions.manager.ClaimManager; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.ChunkUtil; +import com.hyperfactions.util.MessageKeys; 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.OVERCLAIM)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to overclaim territory.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.OVERCLAIM_NO_PERMISSION)); return; } @@ -68,7 +69,7 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { - ctx.sendMessage(prefix().insert(msg("Overclaimed enemy territory!", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Claim.OVERCLAIMED)); // Show map after overclaiming (if not text mode) if (!fctx.isTextMode()) { Player playerEntity = store.getComponent(ref, Player.getComponentType()); @@ -77,14 +78,14 @@ protected void execute(@NotNull CommandContext ctx, } } } - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error("You are not in a faction.")); - case NOT_OFFICER -> ctx.sendMessage(prefix().insert(msg("You must be an officer to overclaim.", COLOR_RED))); - case CHUNK_NOT_CLAIMED -> ctx.sendMessage(prefix().insert(msg("This chunk is not claimed. Use /f claim.", COLOR_RED))); - case ALREADY_CLAIMED_SELF -> ctx.sendMessage(prefix().insert(msg("Your faction already owns this chunk.", COLOR_RED))); - case ALREADY_CLAIMED_ALLY -> ctx.sendMessage(prefix().insert(msg("You cannot overclaim ally territory.", COLOR_RED))); - case TARGET_HAS_POWER -> ctx.sendMessage(prefix().insert(msg("This faction still has enough power.", COLOR_RED))); - case MAX_CLAIMS_REACHED -> ctx.sendMessage(prefix().insert(msg("Your faction has reached max claims.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed to overclaim.", COLOR_RED))); + 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)); } } } diff --git a/src/main/java/com/hyperfactions/command/territory/StuckSubCommand.java b/src/main/java/com/hyperfactions/command/territory/StuckSubCommand.java index 0d2aacfa..85acaa86 100644 --- a/src/main/java/com/hyperfactions/command/territory/StuckSubCommand.java +++ b/src/main/java/com/hyperfactions/command/territory/StuckSubCommand.java @@ -5,6 +5,8 @@ import com.hyperfactions.command.FactionSubCommand; import com.hyperfactions.config.ConfigManager; import com.hyperfactions.data.Faction; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hyperfactions.manager.TeleportManager; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.ChunkUtil; @@ -47,7 +49,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.STUCK)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to use /f stuck.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.STUCK_NO_PERMISSION)); return; } @@ -67,20 +69,20 @@ protected void execute(@NotNull CommandContext ctx, Faction playerFaction = hyperFactions.getFactionManager().getPlayerFaction(playerUuid); if (claimOwner == null) { - ctx.sendMessage(prefix().insert(msg("You're not stuck - this is wilderness.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.STUCK_NOT_STUCK)); return; } // Combat check if (hyperFactions.getCombatTagManager().isTagged(playerUuid)) { - ctx.sendMessage(prefix().insert(msg("You cannot use /f stuck while in combat!", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.STUCK_COMBAT_TAGGED)); return; } // Find nearest safe chunk int[] safeChunk = findNearestSafeChunk(currentWorld.getName(), chunkX, chunkZ); if (safeChunk == null) { - ctx.sendMessage(prefix().insert(msg("Could not find a safe location.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Home.STUCK_NO_SAFE)); return; } @@ -112,7 +114,7 @@ protected void execute(@NotNull CommandContext ctx, "Teleported to safety!" ); - ctx.sendMessage(prefix().insert(msg("Teleporting to safety in " + warmupSeconds + " seconds. Don't move!", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.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 06f656d8..ebc90d48 100644 --- a/src/main/java/com/hyperfactions/command/territory/UnclaimSubCommand.java +++ b/src/main/java/com/hyperfactions/command/territory/UnclaimSubCommand.java @@ -9,6 +9,7 @@ import com.hyperfactions.manager.ClaimManager; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.ChunkUtil; +import com.hyperfactions.util.MessageKeys; 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.UNCLAIM)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to unclaim territory.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Claim.UNCLAIM_NO_PERMISSION)); return; } @@ -68,7 +69,7 @@ protected void execute(@NotNull CommandContext ctx, switch (result) { case SUCCESS -> { - ctx.sendMessage(prefix().insert(msg("Unclaimed chunk at " + chunkX + ", " + chunkZ + ".", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Claim.UNCLAIMED, chunkX, chunkZ)); // Show map after unclaiming (if not text mode) if (!fctx.isTextMode()) { Player playerEntity = store.getComponent(ref, Player.getComponentType()); @@ -77,13 +78,13 @@ protected void execute(@NotNull CommandContext ctx, } } } - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error("You are not in a faction.")); - case NOT_OFFICER -> ctx.sendMessage(prefix().insert(msg("You must be an officer to unclaim land.", COLOR_RED))); - case CHUNK_NOT_CLAIMED -> ctx.sendMessage(prefix().insert(msg("This chunk is not claimed.", COLOR_RED))); - case NOT_YOUR_CLAIM -> ctx.sendMessage(prefix().insert(msg("Your faction doesn't own this chunk.", COLOR_RED))); - case CANNOT_UNCLAIM_HOME -> ctx.sendMessage(prefix().insert(msg("Cannot unclaim the chunk with faction home.", COLOR_RED))); - case WOULD_DISCONNECT -> ctx.sendMessage(prefix().insert(msg("Cannot unclaim — it would disconnect your territory.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed to unclaim chunk.", COLOR_RED))); + 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)); } } } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 0bdc950f..d6f35cf6 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -236,9 +236,9 @@ 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 UNCLAIMED = "hyperfactions.cmd.claim.unclaimed"; 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"; @@ -250,25 +250,59 @@ public static final class Claim { 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"; - public static final String OVERCLAIMED = "hyperfactions.cmd.claim.overclaimed"; - public static final String CANNOT_OVERCLAIM = "hyperfactions.cmd.claim.cannot_overclaim"; - public static final String NOT_YOUR_CLAIM = "hyperfactions.cmd.claim.not_your_claim"; - public static final String IN_ZONE = "hyperfactions.cmd.claim.in_zone"; + // 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"; private Claim() {} } /** /f home, /f sethome, /f delhome, /f stuck command messages. */ public static final class Home { - public static final String TELEPORTING = "hyperfactions.cmd.home.teleporting"; - public static final String SET = "hyperfactions.cmd.home.set"; - public static final String DELETED = "hyperfactions.cmd.home.deleted"; + // 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 NOT_IN_TERRITORY = "hyperfactions.cmd.home.not_in_territory"; + 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"; - public static final String STUCK_TELEPORTING = "hyperfactions.cmd.home.stuck_teleporting"; + // 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() {} } diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions.lang b/src/main/resources/Server/Languages/en-US/hyperfactions.lang index 209b5b07..8940afc0 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions.lang @@ -166,3 +166,53 @@ cmd.rank.transferred = Transferred leadership to {0}! cmd.rank.transfer_broadcast = {0} is now the faction leader! cmd.rank.transfer_failed = Failed to transfer leadership. cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. + +# ========== Commands - Unclaim ========== +cmd.unclaim.no_permission = You don't have permission to unclaim territory. +cmd.unclaim.success = Unclaimed chunk at {0}, {1}. +cmd.unclaim.not_officer = You must be an officer to unclaim land. +cmd.unclaim.chunk_not_claimed = This chunk is not claimed. +cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. +cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. +cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. +cmd.unclaim.failed = Failed to unclaim chunk. + +# ========== Commands - Overclaim ========== +cmd.overclaim.no_permission = You don't have permission to overclaim territory. +cmd.overclaim.success = Overclaimed enemy territory! +cmd.overclaim.not_officer = You must be an officer to overclaim. +cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. +cmd.overclaim.own_chunk = Your faction already owns this chunk. +cmd.overclaim.ally = You cannot overclaim ally territory. +cmd.overclaim.target_has_power = This faction still has enough power. +cmd.overclaim.failed = Failed to overclaim. + +# ========== Commands - Stuck ========== +cmd.stuck.no_permission = You don't have permission to use /f stuck. +cmd.stuck.not_stuck = You're not stuck - this is wilderness. +cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! +cmd.stuck.no_safe = Could not find a safe location. +cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! + +# ========== Commands - Home ========== +cmd.home.no_permission = You don't have permission to teleport to faction home. +cmd.home.no_home = Your faction has no home set. +cmd.home.combat_tagged = You cannot teleport while in combat! +cmd.home.teleported = Teleported to faction home! + +# ========== Commands - SetHome ========== +cmd.sethome.no_permission = You don't have permission to set faction home. +cmd.sethome.world_not_allowed = Cannot set home in this world. +cmd.sethome.not_in_territory = You can only set home in your faction's territory. +cmd.sethome.set = Faction home set! +cmd.sethome.broadcast = {0} set the faction home. +cmd.sethome.not_officer = You must be an officer to set the home. +cmd.sethome.failed = Failed to set home. + +# ========== Commands - DelHome ========== +cmd.delhome.no_permission = You don't have permission to delete faction home. +cmd.delhome.no_home = Your faction does not have a home set. +cmd.delhome.deleted = Faction home deleted! +cmd.delhome.broadcast = {0} deleted the faction home. +cmd.delhome.not_officer = You must be an officer to delete the home. +cmd.delhome.failed = Failed to delete home. From ecb1e077434afcf248094e59b74601090f516492 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 08:33:45 -0700 Subject: [PATCH 05/55] feat: migrate relation, social, info, and economy commands to i18n keys (Phase 1d) Migrate hardcoded English strings to MessageKeys constants for: - Ally, Enemy, Neutral, Relations commands (relation) - Chat, Invites, Request commands (social) - Info, Members, List, Help, Who, Map, Power commands (info) - Money, TreasuryCommandHandler (economy) Add Invites and Request inner classes to MessageKeys. Expand Relation, Chat, Info, Power, and Economy classes with new keys. --- .../command/economy/MoneySubCommand.java | 26 ++- .../economy/TreasuryCommandHandler.java | 158 ++++++------------ .../command/info/HelpSubCommand.java | 4 +- .../command/info/InfoSubCommand.java | 38 ++--- .../command/info/ListSubCommand.java | 15 +- .../command/info/MapSubCommand.java | 11 +- .../command/info/MembersSubCommand.java | 9 +- .../command/info/PowerSubCommand.java | 13 +- .../command/info/WhoSubCommand.java | 24 +-- .../command/relation/AllySubCommand.java | 29 ++-- .../command/relation/EnemySubCommand.java | 20 +-- .../command/relation/NeutralSubCommand.java | 17 +- .../command/relation/RelationsSubCommand.java | 19 ++- .../command/social/ChatSubCommand.java | 10 +- .../command/social/InvitesSubCommand.java | 37 ++-- .../command/social/RequestSubCommand.java | 40 ++--- .../com/hyperfactions/util/MessageKeys.java | 142 +++++++++++++++- .../Server/Languages/en-US/hyperfactions.lang | 145 ++++++++++++++++ 18 files changed, 497 insertions(+), 260 deletions(-) diff --git a/src/main/java/com/hyperfactions/command/economy/MoneySubCommand.java b/src/main/java/com/hyperfactions/command/economy/MoneySubCommand.java index 17180827..4c67ad10 100644 --- a/src/main/java/com/hyperfactions/command/economy/MoneySubCommand.java +++ b/src/main/java/com/hyperfactions/command/economy/MoneySubCommand.java @@ -4,6 +4,9 @@ import com.hyperfactions.command.FactionSubCommand; 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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -36,7 +39,7 @@ protected void execute(@NotNull CommandContext ctx, String[] parts = input != null ? input.trim().split("\\s+") : new String[0]; if (parts.length < 3) { - sendHelp(ctx); + sendHelp(ctx, player); return; } @@ -49,21 +52,16 @@ protected void execute(@NotNull CommandContext ctx, case "withdraw", "wd" -> TreasuryCommandHandler.handleWithdraw(ctx, player, hyperFactions, subArgs); case "transfer", "send" -> TreasuryCommandHandler.handleTransfer(ctx, player, hyperFactions, subArgs); case "log", "history" -> TreasuryCommandHandler.handleLog(ctx, player, hyperFactions, subArgs); - default -> sendHelp(ctx); + default -> sendHelp(ctx, player); } } - private void sendHelp(CommandContext ctx) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg("Treasury Commands:", COLOR_CYAN))); - ctx.sendMessage(CommandUtil.msg(" /f money balance [faction]", COLOR_YELLOW) - .insert(CommandUtil.msg(" - View balance", COLOR_GRAY))); - ctx.sendMessage(CommandUtil.msg(" /f money deposit ", COLOR_YELLOW) - .insert(CommandUtil.msg(" - Deposit into treasury", COLOR_GRAY))); - ctx.sendMessage(CommandUtil.msg(" /f money withdraw ", COLOR_YELLOW) - .insert(CommandUtil.msg(" - Withdraw from treasury", COLOR_GRAY))); - ctx.sendMessage(CommandUtil.msg(" /f money transfer ", COLOR_YELLOW) - .insert(CommandUtil.msg(" - Transfer between factions", COLOR_GRAY))); - ctx.sendMessage(CommandUtil.msg(" /f money log [page] [type]", COLOR_YELLOW) - .insert(CommandUtil.msg(" - View transaction history", COLOR_GRAY))); + 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)); } } diff --git a/src/main/java/com/hyperfactions/command/economy/TreasuryCommandHandler.java b/src/main/java/com/hyperfactions/command/economy/TreasuryCommandHandler.java index ef2aad40..93f3dd35 100644 --- a/src/main/java/com/hyperfactions/command/economy/TreasuryCommandHandler.java +++ b/src/main/java/com/hyperfactions/command/economy/TreasuryCommandHandler.java @@ -10,6 +10,9 @@ import com.hyperfactions.data.FactionPermissions; 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.MessageUtil; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.command.system.CommandContext; import com.hypixel.hytale.server.core.universe.PlayerRef; @@ -38,15 +41,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(CommandUtil.prefix().insert(CommandUtil.msg( - "You don't have permission to view balances.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.BALANCE_NO_PERMISSION)); return; } EconomyManager econ = hf.getEconomyManager(); if (econ == null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Treasury is not available.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TREASURY_UNAVAILABLE)); return; } @@ -54,23 +55,20 @@ public static void handleBalance(@NotNull CommandContext ctx, @NotNull PlayerRef if (args.length > 0) { faction = hf.getFactionManager().getFactionByName(args[0]); if (faction == null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Faction '" + args[0] + "' not found.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.FACTION_NOT_FOUND)); return; } } else { faction = hf.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "You are not in a faction.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); return; } } BigDecimal balance = econ.getFactionBalance(faction.id()); - ctx.sendMessage(CommandUtil.prefix() - .insert(CommandUtil.msg(faction.name() + "'s treasury: ", CommandUtil.COLOR_CYAN)) - .insert(CommandUtil.msg(econ.formatCurrency(balance), CommandUtil.COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Economy.BALANCE_DISPLAY, + faction.name(), econ.formatCurrency(balance))); } /** @@ -79,23 +77,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(CommandUtil.prefix().insert(CommandUtil.msg( - "You don't have permission to deposit.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.DEPOSIT_NO_PERMISSION)); return; } EconomyManager econ = hf.getEconomyManager(); VaultEconomyProvider vault = econ != null ? econ.getVaultProvider() : null; if (econ == null || vault == null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Treasury is not available.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TREASURY_UNAVAILABLE)); return; } Faction faction = hf.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "You are not in a faction.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); return; } @@ -103,14 +98,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(CommandUtil.prefix().insert(CommandUtil.msg( - "You don't have faction permission to deposit.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.DEPOSIT_FACTION_DENIED)); return; } if (args.length < 1) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Usage: /f deposit ", CommandUtil.COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Economy.DEPOSIT_USAGE, MessageUtil.COLOR_YELLOW)); return; } @@ -118,29 +111,25 @@ public static void handleDeposit(@NotNull CommandContext ctx, @NotNull PlayerRef try { amount = new BigDecimal(args[0]); } catch (NumberFormatException e) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Invalid amount: " + args[0], CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.INVALID_AMOUNT, args[0])); return; } if (amount.compareTo(BigDecimal.ZERO) <= 0) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Amount must be positive.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.AMOUNT_POSITIVE)); return; } // Check player has enough in wallet if (!vault.has(player.getUuid(), amount)) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "You don't have enough money. Wallet: " + econ.formatCurrency(vault.getBalanceBigDecimal(player.getUuid())), - CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WALLET_INSUFFICIENT, + econ.formatCurrency(vault.getBalanceBigDecimal(player.getUuid())))); return; } // Withdraw from player wallet if (!vault.withdraw(player.getUuid(), amount)) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Failed to withdraw from your wallet.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WALLET_WITHDRAW_FAILED)); return; } @@ -151,15 +140,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(CommandUtil.prefix().insert(CommandUtil.msg( - "Failed to deposit to faction treasury. Money returned.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.DEPOSIT_FAILED)); return; } - ctx.sendMessage(CommandUtil.prefix() - .insert(CommandUtil.msg("Deposited ", CommandUtil.COLOR_GREEN)) - .insert(CommandUtil.msg(econ.formatCurrency(amount), CommandUtil.COLOR_CYAN)) - .insert(CommandUtil.msg(" into the faction treasury.", CommandUtil.COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Economy.DEPOSITED, econ.formatCurrency(amount))); } /** @@ -168,23 +153,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(CommandUtil.prefix().insert(CommandUtil.msg( - "You don't have permission to withdraw.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WITHDRAW_NO_PERMISSION)); return; } EconomyManager econ = hf.getEconomyManager(); VaultEconomyProvider vault = econ != null ? econ.getVaultProvider() : null; if (econ == null || vault == null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Treasury is not available.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TREASURY_UNAVAILABLE)); return; } Faction faction = hf.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "You are not in a faction.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); return; } @@ -192,14 +174,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(CommandUtil.prefix().insert(CommandUtil.msg( - "You don't have faction permission to withdraw.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WITHDRAW_FACTION_DENIED)); return; } if (args.length < 1) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Usage: /f withdraw ", CommandUtil.COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Economy.WITHDRAW_USAGE, MessageUtil.COLOR_YELLOW)); return; } @@ -207,22 +187,19 @@ public static void handleWithdraw(@NotNull CommandContext ctx, @NotNull PlayerRe try { amount = new BigDecimal(args[0]); } catch (NumberFormatException e) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Invalid amount: " + args[0], CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.INVALID_AMOUNT, args[0])); return; } if (amount.compareTo(BigDecimal.ZERO) <= 0) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Amount must be positive.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.AMOUNT_POSITIVE)); return; } // Check limits before attempting String limitReason = econ.checkWithdrawLimits(faction.id(), amount); if (limitReason != null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Withdrawal denied: " + limitReason, CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WITHDRAW_LIMIT_DENIED, limitReason)); return; } @@ -235,22 +212,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(CommandUtil.prefix().insert(CommandUtil.msg( - "Warning: Failed to deposit to your wallet. Contact an admin.", - CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.WALLET_DEPOSIT_FAILED)); return; } - ctx.sendMessage(CommandUtil.prefix() - .insert(CommandUtil.msg("Withdrew ", CommandUtil.COLOR_GREEN)) - .insert(CommandUtil.msg(econ.formatCurrency(amount), CommandUtil.COLOR_CYAN)) - .insert(CommandUtil.msg(" from the faction treasury.", CommandUtil.COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Economy.WITHDRAWN, econ.formatCurrency(amount))); } - case INSUFFICIENT_FUNDS -> ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Insufficient funds in faction treasury.", CommandUtil.COLOR_RED))); - case LIMIT_EXCEEDED -> ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Withdrawal denied: limit exceeded.", CommandUtil.COLOR_RED))); - default -> ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Withdrawal failed: " + result, CommandUtil.COLOR_RED))); + 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)); } } @@ -260,22 +229,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(CommandUtil.prefix().insert(CommandUtil.msg( - "You don't have permission to transfer.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TRANSFER_NO_PERMISSION)); return; } EconomyManager econ = hf.getEconomyManager(); if (econ == null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Treasury is not available.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TREASURY_UNAVAILABLE)); return; } Faction faction = hf.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "You are not in a faction.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); return; } @@ -283,27 +249,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(CommandUtil.prefix().insert(CommandUtil.msg( - "You don't have faction permission to transfer.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TRANSFER_FACTION_DENIED)); return; } if (args.length < 2) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Usage: /f money transfer ", CommandUtil.COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Economy.TRANSFER_USAGE, MessageUtil.COLOR_YELLOW)); return; } Faction target = hf.getFactionManager().getFactionByName(args[0]); if (target == null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Faction '" + args[0] + "' not found.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.FACTION_NOT_FOUND)); return; } if (target.id().equals(faction.id())) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Cannot transfer to your own faction.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TRANSFER_SELF)); return; } @@ -311,22 +273,19 @@ public static void handleTransfer(@NotNull CommandContext ctx, @NotNull PlayerRe try { amount = new BigDecimal(args[1]); } catch (NumberFormatException e) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Invalid amount: " + args[1], CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.INVALID_AMOUNT, args[1])); return; } if (amount.compareTo(BigDecimal.ZERO) <= 0) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Amount must be positive.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.AMOUNT_POSITIVE)); return; } // Check limits String limitReason = econ.checkTransferLimits(faction.id(), amount); if (limitReason != null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Transfer denied: " + limitReason, CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TRANSFER_LIMIT_DENIED, limitReason)); return; } @@ -334,16 +293,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(CommandUtil.prefix() - .insert(CommandUtil.msg("Transferred ", CommandUtil.COLOR_GREEN)) - .insert(CommandUtil.msg(econ.formatCurrency(amount), CommandUtil.COLOR_CYAN)) - .insert(CommandUtil.msg(" to " + target.name() + ".", CommandUtil.COLOR_GREEN))); - case INSUFFICIENT_FUNDS -> ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Insufficient funds in faction treasury.", CommandUtil.COLOR_RED))); - case LIMIT_EXCEEDED -> ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Transfer denied: limit exceeded.", CommandUtil.COLOR_RED))); - default -> ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Transfer failed: " + result, CommandUtil.COLOR_RED))); + case SUCCESS -> ctx.sendMessage(MessageUtil.success(player, MessageKeys.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)); } } @@ -353,22 +307,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(CommandUtil.prefix().insert(CommandUtil.msg( - "You don't have permission to view the transaction log.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.LOG_NO_PERMISSION)); return; } EconomyManager econ = hf.getEconomyManager(); if (econ == null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "Treasury is not available.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Economy.TREASURY_UNAVAILABLE)); return; } Faction faction = hf.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg( - "You are not in a faction.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NOT_IN_FACTION)); return; } @@ -395,8 +346,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(CommandUtil.prefix() - .insert(CommandUtil.msg("Transaction Log (page " + page + "/" + totalPages + ")", CommandUtil.COLOR_CYAN))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Economy.LOG_HEADER, MessageUtil.COLOR_CYAN, page, totalPages)); int start = (page - 1) * perPage; int end = Math.min(start + perPage, all.size()); @@ -422,7 +372,7 @@ public static void handleLog(@NotNull CommandContext ctx, @NotNull PlayerRef pla } if (all.isEmpty()) { - ctx.sendMessage(CommandUtil.msg(" No transactions found.", CommandUtil.COLOR_GRAY)); + ctx.sendMessage(CommandUtil.msg(" " + HFMessages.get(player, MessageKeys.Economy.LOG_EMPTY), CommandUtil.COLOR_GRAY)); } } } diff --git a/src/main/java/com/hyperfactions/command/info/HelpSubCommand.java b/src/main/java/com/hyperfactions/command/info/HelpSubCommand.java index f60e771b..7d0829aa 100644 --- a/src/main/java/com/hyperfactions/command/info/HelpSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/HelpSubCommand.java @@ -10,6 +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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -43,7 +45,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.HELP)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to view help.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.HELP_NO_PERMISSION)); return; } diff --git a/src/main/java/com/hyperfactions/command/info/InfoSubCommand.java b/src/main/java/com/hyperfactions/command/info/InfoSubCommand.java index 061fecb3..d0dd7c07 100644 --- a/src/main/java/com/hyperfactions/command/info/InfoSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/InfoSubCommand.java @@ -11,6 +11,8 @@ import com.hyperfactions.data.RelationType; import com.hyperfactions.manager.PowerManager; import com.hyperfactions.platform.HyperFactionsPlugin; +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; @@ -43,7 +45,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.INFO)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to view faction info.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.NO_PERMISSION)); return; } @@ -55,13 +57,13 @@ protected void execute(@NotNull CommandContext ctx, String factionName = fctx.joinArgs(); faction = hyperFactions.getFactionManager().getFactionByName(factionName); if (faction == null) { - ctx.sendMessage(prefix().insert(msg("Faction '" + factionName + "' not found.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.FACTION_NOT_FOUND, factionName)); return; } } else { faction = hyperFactions.getFactionManager().getPlayerFaction(player.getUuid()); if (faction == null) { - ctx.sendMessage(MessageUtil.error("You are not in a faction. Use /f info ")); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.NOT_IN_FACTION_HINT)); return; } } @@ -79,39 +81,29 @@ protected void execute(@NotNull CommandContext ctx, PowerManager.FactionPowerStats stats = hyperFactions.getPowerManager().getFactionPowerStats(faction.id()); FactionMember leader = faction.getLeader(); - ctx.sendMessage(msg("=== " + faction.name() + " ===", COLOR_CYAN).bold(true)); - ctx.sendMessage(msg("Leader: ", COLOR_GRAY).insert(msg(leader != null ? leader.username() : "None", COLOR_YELLOW))); - ctx.sendMessage(msg("Members: ", COLOR_GRAY).insert(msg(faction.getMemberCount() + "/" + ConfigManager.get().getMaxMembers(), COLOR_WHITE))); - ctx.sendMessage(msg("Power: ", COLOR_GRAY).insert(msg(String.format("%.1f/%.1f", stats.currentPower(), stats.maxPower()), COLOR_WHITE))); - ctx.sendMessage(msg("Claims: ", COLOR_GRAY).insert(msg(stats.currentClaims() + "/" + stats.maxClaims(), COLOR_WHITE))); + 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)); if (stats.isRaidable()) { - ctx.sendMessage(msg("RAIDABLE!", COLOR_RED).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.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("Allies: ", COLOR_GRAY).insert(msg(String.valueOf(allyCount), COLOR_GREEN))); - ctx.sendMessage(msg("Enemies: ", COLOR_GRAY).insert(msg(String.valueOf(enemyCount), COLOR_RED))); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.ALLIES, allyCount), COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.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("They consider you: ", COLOR_GRAY) - .insert(msg(theyThinkOfUs.name(), relationColor(theyThinkOfUs)))); - ctx.sendMessage(msg("You consider them: ", COLOR_GRAY) - .insert(msg(weThinkOfThem.name(), relationColor(weThinkOfThem)))); + 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)); } } - - private String relationColor(RelationType type) { - return switch (type) { - case ALLY, OWN -> COLOR_GREEN; - case ENEMY -> COLOR_RED; - case NEUTRAL -> 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 7b1f25a7..b98a24fc 100644 --- a/src/main/java/com/hyperfactions/command/info/ListSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/ListSubCommand.java @@ -8,6 +8,9 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.PowerManager; import com.hyperfactions.platform.HyperFactionsPlugin; +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; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -40,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.LIST)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to view faction list.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.LIST_NO_PERMISSION)); return; } @@ -59,16 +62,16 @@ protected void execute(@NotNull CommandContext ctx, // Text mode: output to chat Collection factions = hyperFactions.getFactionManager().getAllFactions(); if (factions.isEmpty()) { - ctx.sendMessage(prefix().insert(msg("There are no factions.", COLOR_GRAY))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Info.LIST_EMPTY, COLOR_GRAY)); return; } - ctx.sendMessage(msg("=== Factions (" + factions.size() + ") ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.LIST_HEADER, factions.size()), COLOR_CYAN).bold(true)); for (Faction faction : factions) { PowerManager.FactionPowerStats stats = hyperFactions.getPowerManager().getFactionPowerStats(faction.id()); - String raidable = stats.isRaidable() ? " [RAIDABLE]" : ""; - ctx.sendMessage(msg(faction.name(), COLOR_YELLOW) - .insert(msg(" - " + faction.getMemberCount() + " members, " + String.format("%.0f", stats.currentPower()) + " power" + raidable, COLOR_GRAY))); + String key = stats.isRaidable() ? MessageKeys.Info.LIST_ENTRY_RAIDABLE : MessageKeys.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 3a0ce5e3..677bf25b 100644 --- a/src/main/java/com/hyperfactions/command/info/MapSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/MapSubCommand.java @@ -7,6 +7,9 @@ import com.hyperfactions.command.util.CommandUtil; import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.ChunkUtil; +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; import com.hypixel.hytale.math.vector.Vector3d; @@ -40,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.MAP)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to view the map.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.MAP_NO_PERMISSION)); return; } @@ -68,7 +71,7 @@ protected void execute(@NotNull CommandContext ctx, UUID playerFactionId = hyperFactions.getFactionManager().getPlayerFactionId(player.getUuid()); - ctx.sendMessage(msg("=== Territory Map ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.MAP_HEADER), COLOR_CYAN).bold(true)); for (int dz = -3; dz <= 3; dz++) { StringBuilder row = new StringBuilder(); @@ -90,7 +93,7 @@ protected void execute(@NotNull CommandContext ctx, } ctx.sendMessage(Message.raw(row.toString())); } - ctx.sendMessage(msg("Legend: +You /Own /Ally /Enemy -Wild", COLOR_GRAY)); - ctx.sendMessage(msg("Use /f gui for interactive map", COLOR_GRAY)); + 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)); } } diff --git a/src/main/java/com/hyperfactions/command/info/MembersSubCommand.java b/src/main/java/com/hyperfactions/command/info/MembersSubCommand.java index 85a1a9b6..46de7449 100644 --- a/src/main/java/com/hyperfactions/command/info/MembersSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/MembersSubCommand.java @@ -9,6 +9,9 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; +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; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -39,7 +42,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.MEMBERS)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to view faction members.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.MEMBERS_NO_PERMISSION)); return; } @@ -62,7 +65,7 @@ protected void execute(@NotNull CommandContext ctx, // Text mode: output member list to chat List members = faction.getMembersSorted(); - ctx.sendMessage(msg("=== " + faction.name() + " Members (" + members.size() + ") ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.MEMBERS_HEADER, faction.name(), members.size()), COLOR_CYAN).bold(true)); for (FactionMember member : members) { String roleColor = switch (member.role()) { @@ -71,7 +74,7 @@ protected void execute(@NotNull CommandContext ctx, default -> COLOR_GRAY; }; boolean isOnline = plugin.getTrackedPlayer(member.uuid()) != null; - String status = isOnline ? " [Online]" : ""; + String status = isOnline ? " " + HFMessages.get(player, MessageKeys.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 81d51213..bdd714dc 100644 --- a/src/main/java/com/hyperfactions/command/info/PowerSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/PowerSubCommand.java @@ -7,6 +7,9 @@ import com.hyperfactions.command.util.CommandUtil; import com.hyperfactions.data.PlayerPower; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.PlayerResolver; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -38,7 +41,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.POWER)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to view power info.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Power.NO_PERMISSION)); return; } @@ -56,7 +59,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(prefix().insert(msg("Player not found.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.PLAYER_NOT_FOUND)); return; } targetUuid = resolved.uuid(); @@ -65,8 +68,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(targetName + "'s Power:", COLOR_CYAN)); - ctx.sendMessage(msg("Current: ", COLOR_GRAY).insert(msg(String.format("%.1f/%.1f (%d%%)", - power.power(), power.getEffectiveMaxPower(), power.getPowerPercent()), COLOR_WHITE))); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Power.HEADER, targetName), COLOR_CYAN)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.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 3c0a4e1c..f5ee9baf 100644 --- a/src/main/java/com/hyperfactions/command/info/WhoSubCommand.java +++ b/src/main/java/com/hyperfactions/command/info/WhoSubCommand.java @@ -10,6 +10,9 @@ import com.hyperfactions.data.FactionMember; import com.hyperfactions.data.PlayerPower; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.PlayerResolver; import com.hyperfactions.util.TimeUtil; import com.hypixel.hytale.component.Ref; @@ -42,7 +45,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.WHO)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to view player info.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Info.WHO_NO_PERMISSION)); return; } @@ -60,7 +63,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(prefix().insert(msg("Player not found.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.PLAYER_NOT_FOUND)); return; } targetUuid = resolved.uuid(); @@ -85,14 +88,14 @@ protected void execute(@NotNull CommandContext ctx, boolean isOnline = plugin.getTrackedPlayer(targetUuid) != null; // Display info - ctx.sendMessage(msg("=== " + targetName + " ===", COLOR_CYAN)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.PLAYER_HEADER, targetName), COLOR_CYAN)); if (faction != null && member != null) { - ctx.sendMessage(msg("Faction: ", COLOR_GRAY).insert(msg(faction.name(), COLOR_WHITE))); - ctx.sendMessage(msg("Role: ", COLOR_GRAY).insert(msg(ConfigManager.get().getRoleDisplayName(member.role()), COLOR_WHITE))); - ctx.sendMessage(msg("Joined: ", COLOR_GRAY).insert(msg(TimeUtil.formatRelative(member.joinedAt()), COLOR_WHITE))); + 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)); } else { - ctx.sendMessage(msg("Faction: ", COLOR_GRAY).insert(msg("None", COLOR_WHITE))); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.WHO_FACTION_NONE), COLOR_GRAY)); } // Power display — hardcore mode shows faction power, normal mode shows player power @@ -109,11 +112,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("Power: ", COLOR_GRAY).insert(msg(powerText, COLOR_WHITE))); - ctx.sendMessage(msg("Status: ", COLOR_GRAY).insert(msg(isOnline ? "Online" : "Offline", isOnline ? COLOR_GREEN : COLOR_RED))); + 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)); if (!isOnline && member != null) { - ctx.sendMessage(msg("Last seen: ", COLOR_GRAY).insert(msg(TimeUtil.formatRelative(member.lastOnline()), COLOR_WHITE))); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Info.WHO_LAST_SEEN, TimeUtil.formatRelative(member.lastOnline())), COLOR_GRAY)); } } } diff --git a/src/main/java/com/hyperfactions/command/relation/AllySubCommand.java b/src/main/java/com/hyperfactions/command/relation/AllySubCommand.java index 97767485..fa48f858 100644 --- a/src/main/java/com/hyperfactions/command/relation/AllySubCommand.java +++ b/src/main/java/com/hyperfactions/command/relation/AllySubCommand.java @@ -8,6 +8,7 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.RelationManager; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -38,7 +39,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.ALLY)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to manage alliances.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ALLY_NO_PERMISSION)); return; } @@ -60,34 +61,28 @@ protected void execute(@NotNull CommandContext ctx, } if (!fctx.hasArgs()) { - ctx.sendMessage(prefix().insert(msg("Usage: /f ally ", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ALLY_USAGE)); return; } String factionName = fctx.joinArgs(); Faction targetFaction = hyperFactions.getFactionManager().getFactionByName(factionName); if (targetFaction == null) { - ctx.sendMessage(prefix().insert(msg("Faction '" + factionName + "' not found.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.FACTION_NOT_FOUND)); return; } RelationManager.RelationResult result = hyperFactions.getRelationManager().requestAlly(player.getUuid(), targetFaction.id()); switch (result) { - case REQUEST_SENT -> { - ctx.sendMessage(prefix().insert(msg("Ally request sent to ", COLOR_GREEN)) - .insert(msg(targetFaction.name(), COLOR_CYAN)).insert(msg("!", COLOR_GREEN))); - } - case REQUEST_ACCEPTED -> { - ctx.sendMessage(prefix().insert(msg("You are now allies with ", COLOR_GREEN)) - .insert(msg(targetFaction.name(), COLOR_CYAN)).insert(msg("!", COLOR_GREEN))); - } - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error("You are not in a faction.")); - case NOT_OFFICER -> ctx.sendMessage(prefix().insert(msg("You must be an officer to manage relations.", COLOR_RED))); - case CANNOT_RELATE_SELF -> ctx.sendMessage(prefix().insert(msg("You cannot ally with yourself.", COLOR_RED))); - case ALREADY_ALLY -> ctx.sendMessage(prefix().insert(msg("You are already allied with that faction.", COLOR_RED))); - case ALLY_LIMIT_REACHED -> ctx.sendMessage(prefix().insert(msg("You have reached the maximum number of allies.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed to send ally request.", COLOR_RED))); + 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)); } } } diff --git a/src/main/java/com/hyperfactions/command/relation/EnemySubCommand.java b/src/main/java/com/hyperfactions/command/relation/EnemySubCommand.java index d5f4da6a..0a221725 100644 --- a/src/main/java/com/hyperfactions/command/relation/EnemySubCommand.java +++ b/src/main/java/com/hyperfactions/command/relation/EnemySubCommand.java @@ -8,6 +8,7 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.RelationManager; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -38,7 +39,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.ENEMY)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to declare enemies.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ENEMY_NO_PERMISSION)); return; } @@ -60,27 +61,26 @@ protected void execute(@NotNull CommandContext ctx, } if (!fctx.hasArgs()) { - ctx.sendMessage(prefix().insert(msg("Usage: /f enemy ", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.ENEMY_USAGE)); return; } String factionName = fctx.joinArgs(); Faction targetFaction = hyperFactions.getFactionManager().getFactionByName(factionName); if (targetFaction == null) { - ctx.sendMessage(prefix().insert(msg("Faction '" + factionName + "' not found.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.FACTION_NOT_FOUND)); return; } RelationManager.RelationResult result = hyperFactions.getRelationManager().setEnemy(player.getUuid(), targetFaction.id()); switch (result) { - case SUCCESS -> ctx.sendMessage(prefix().insert(msg(targetFaction.name(), COLOR_RED)) - .insert(msg(" is now your enemy!", COLOR_RED))); - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error("You are not in a faction.")); - case NOT_OFFICER -> ctx.sendMessage(prefix().insert(msg("You must be an officer to manage relations.", COLOR_RED))); - case ALREADY_ENEMY -> ctx.sendMessage(prefix().insert(msg("You are already enemies with that faction.", COLOR_RED))); - case ENEMY_LIMIT_REACHED -> ctx.sendMessage(prefix().insert(msg("You have reached the maximum number of enemies.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed to set enemy.", COLOR_RED))); + 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)); } } } diff --git a/src/main/java/com/hyperfactions/command/relation/NeutralSubCommand.java b/src/main/java/com/hyperfactions/command/relation/NeutralSubCommand.java index 6a37e6af..ddadcbb9 100644 --- a/src/main/java/com/hyperfactions/command/relation/NeutralSubCommand.java +++ b/src/main/java/com/hyperfactions/command/relation/NeutralSubCommand.java @@ -8,6 +8,7 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.RelationManager; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -38,7 +39,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.NEUTRAL)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to set neutral relations.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.NEUTRAL_NO_PERMISSION)); return; } @@ -60,25 +61,25 @@ protected void execute(@NotNull CommandContext ctx, } if (!fctx.hasArgs()) { - ctx.sendMessage(prefix().insert(msg("Usage: /f neutral ", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.NEUTRAL_USAGE)); return; } String factionName = fctx.joinArgs(); Faction targetFaction = hyperFactions.getFactionManager().getFactionByName(factionName); if (targetFaction == null) { - ctx.sendMessage(prefix().insert(msg("Faction '" + factionName + "' not found.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.FACTION_NOT_FOUND)); return; } RelationManager.RelationResult result = hyperFactions.getRelationManager().setNeutral(player.getUuid(), targetFaction.id()); switch (result) { - case SUCCESS -> ctx.sendMessage(prefix().insert(msg("Your faction is now neutral with " + targetFaction.name() + ".", COLOR_GRAY))); - case NOT_IN_FACTION -> ctx.sendMessage(MessageUtil.error("You are not in a faction.")); - case NOT_OFFICER -> ctx.sendMessage(prefix().insert(msg("You must be an officer to manage relations.", COLOR_RED))); - case ALREADY_NEUTRAL -> ctx.sendMessage(prefix().insert(msg("You are already neutral with that faction.", COLOR_RED))); - default -> ctx.sendMessage(prefix().insert(msg("Failed to set neutral.", COLOR_RED))); + 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)); } } } diff --git a/src/main/java/com/hyperfactions/command/relation/RelationsSubCommand.java b/src/main/java/com/hyperfactions/command/relation/RelationsSubCommand.java index 95d94d74..878e08b6 100644 --- a/src/main/java/com/hyperfactions/command/relation/RelationsSubCommand.java +++ b/src/main/java/com/hyperfactions/command/relation/RelationsSubCommand.java @@ -7,6 +7,9 @@ import com.hyperfactions.command.util.CommandUtil; import com.hyperfactions.data.Faction; import com.hyperfactions.platform.HyperFactionsPlugin; +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; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -38,7 +41,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.RELATIONS)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to view relations.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Relation.VIEW_NO_PERMISSION)); return; } @@ -63,28 +66,28 @@ protected void execute(@NotNull CommandContext ctx, List allies = hyperFactions.getRelationManager().getAllies(faction.id()); List enemies = hyperFactions.getRelationManager().getEnemies(faction.id()); - ctx.sendMessage(msg("=== Faction Relations ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Relation.HEADER), COLOR_CYAN).bold(true)); - ctx.sendMessage(msg("Allies (" + allies.size() + "):", COLOR_GREEN)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Relation.ALLIES_COUNT, allies.size()), COLOR_GREEN)); if (allies.isEmpty()) { - ctx.sendMessage(msg(" (none)", COLOR_GRAY)); + ctx.sendMessage(msg(" (" + HFMessages.get(player, MessageKeys.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(ally.name(), COLOR_GREEN))); + ctx.sendMessage(msg(" ", COLOR_GRAY).insert(msg(HFMessages.get(player, MessageKeys.Relation.LIST_ENTRY, ally.name()), COLOR_GREEN))); } } } - ctx.sendMessage(msg("Enemies (" + enemies.size() + "):", COLOR_RED)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Relation.ENEMIES_COUNT, enemies.size()), COLOR_RED)); if (enemies.isEmpty()) { - ctx.sendMessage(msg(" (none)", COLOR_GRAY)); + ctx.sendMessage(msg(" (" + HFMessages.get(player, MessageKeys.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(enemy.name(), COLOR_RED))); + ctx.sendMessage(msg(" ", COLOR_GRAY).insert(msg(HFMessages.get(player, MessageKeys.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 cf0dea1d..ea79b2c9 100644 --- a/src/main/java/com/hyperfactions/command/social/ChatSubCommand.java +++ b/src/main/java/com/hyperfactions/command/social/ChatSubCommand.java @@ -6,6 +6,8 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.manager.ChatManager; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -68,7 +70,7 @@ protected void execute(@NotNull CommandContext ctx, yield new ChatManager.ToggleResult(ChatManager.ChatResult.SUCCESS, ChatManager.ChatChannel.NORMAL); } default -> { - ctx.sendMessage(prefix().insert(msg("Usage: /f c [f|a|off]", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Chat.USAGE)); yield null; } }; @@ -79,7 +81,7 @@ protected void execute(@NotNull CommandContext ctx, } if (!result.isSuccess()) { - ctx.sendMessage(prefix().insert(msg("You don't have permission for that chat mode.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Chat.NO_PERMISSION)); return; } @@ -87,8 +89,6 @@ protected void execute(@NotNull CommandContext ctx, String display = ChatManager.getChannelDisplay(channel); String color = ChatManager.getChannelColor(channel); - ctx.sendMessage(prefix() - .insert(msg("Chat mode set to ", COLOR_GRAY)) - .insert(msg(display, color))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.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 8c5cc52a..63bd6f43 100644 --- a/src/main/java/com/hyperfactions/command/social/InvitesSubCommand.java +++ b/src/main/java/com/hyperfactions/command/social/InvitesSubCommand.java @@ -9,6 +9,9 @@ import com.hyperfactions.data.JoinRequest; import com.hyperfactions.data.PendingInvite; import com.hyperfactions.platform.HyperFactionsPlugin; +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; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -47,7 +50,7 @@ protected void execute(@NotNull CommandContext ctx, if (faction != null) { FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isOfficerOrHigher()) { - ctx.sendMessage(prefix().insert(msg("You must be an officer to manage invites.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Invites.NOT_OFFICER)); return; } @@ -64,32 +67,32 @@ protected void execute(@NotNull CommandContext ctx, List invites = hyperFactions.getInviteManager().getFactionInvitesList(faction.id()); List requests = hyperFactions.getJoinRequestManager().getFactionRequests(faction.id()); - ctx.sendMessage(msg("=== Faction Invites ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Invites.HEADER), COLOR_CYAN).bold(true)); if (invites.isEmpty() && requests.isEmpty()) { - ctx.sendMessage(msg("No pending invites or requests.", COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Invites.NO_PENDING), COLOR_GRAY)); return; } if (!invites.isEmpty()) { - ctx.sendMessage(msg("Outgoing Invites:", COLOR_YELLOW)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Invites.OUTGOING), COLOR_YELLOW)); for (PendingInvite invite : invites) { String inviterName = plugin.getTrackedPlayer(invite.invitedBy()) != null ? plugin.getTrackedPlayer(invite.invitedBy()).getUsername() - : "Unknown"; - ctx.sendMessage(msg(" - ", COLOR_GRAY) - .insert(msg(invite.playerUuid().toString().substring(0, 8), COLOR_WHITE)) - .insert(msg(" (invited by " + inviterName + ")", COLOR_GRAY))); + : HFMessages.get(player, MessageKeys.Common.UNKNOWN); + ctx.sendMessage(msg(" ", COLOR_GRAY) + .insert(msg(HFMessages.get(player, MessageKeys.Invites.OUTGOING_ENTRY, + invite.playerUuid().toString().substring(0, 8), inviterName), COLOR_WHITE))); } } if (!requests.isEmpty()) { - ctx.sendMessage(msg("Join Requests:", COLOR_GREEN)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Invites.REQUESTS), COLOR_GREEN)); for (JoinRequest request : requests) { String message = request.message() != null ? " \"" + request.message() + "\"" : ""; - ctx.sendMessage(msg(" - ", COLOR_GRAY) - .insert(msg(request.playerName(), COLOR_WHITE)) - .insert(msg(message, COLOR_GRAY))); + ctx.sendMessage(msg(" ", COLOR_GRAY) + .insert(msg(HFMessages.get(player, MessageKeys.Invites.REQUEST_ENTRY, + request.playerName(), message), COLOR_WHITE))); } } } else { @@ -106,19 +109,19 @@ protected void execute(@NotNull CommandContext ctx, // Text mode: show incoming invites List invites = hyperFactions.getInviteManager().getPlayerInvites(player.getUuid()); - ctx.sendMessage(msg("=== Your Invites ===", COLOR_CYAN).bold(true)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Invites.YOUR_INVITES_HEADER), COLOR_CYAN).bold(true)); if (invites.isEmpty()) { - ctx.sendMessage(msg("You have no pending invites.", COLOR_GRAY)); + ctx.sendMessage(msg(HFMessages.get(player, MessageKeys.Invites.NO_INVITES), COLOR_GRAY)); return; } for (PendingInvite invite : invites) { Faction invitingFaction = hyperFactions.getFactionManager().getFaction(invite.factionId()); if (invitingFaction != null) { - ctx.sendMessage(msg(" - ", COLOR_GRAY) - .insert(msg(invitingFaction.name(), COLOR_YELLOW)) - .insert(msg(" - Use /f accept " + invitingFaction.name(), COLOR_GRAY))); + ctx.sendMessage(msg(" ", COLOR_GRAY) + .insert(msg(HFMessages.get(player, MessageKeys.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 23ac510f..3af34cd4 100644 --- a/src/main/java/com/hyperfactions/command/social/RequestSubCommand.java +++ b/src/main/java/com/hyperfactions/command/social/RequestSubCommand.java @@ -10,6 +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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -41,7 +43,7 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(player, Permissions.JOIN)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission to request faction membership.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Request.NO_PERMISSION)); return; } @@ -49,12 +51,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(prefix().insert(msg("You are already in ", COLOR_RED)) - .insert(msg(existingFaction.name(), COLOR_CYAN)) - .insert(msg(".", COLOR_RED))); - ctx.sendMessage(prefix().insert(msg("Use /f leave first if you want to join another faction.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Request.ALREADY_IN_NAMED, existingFaction.name())); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Request.USE_LEAVE_HINT, COLOR_YELLOW)); } else { - ctx.sendMessage(prefix().insert(msg("You are already in a faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.ALREADY_IN_FACTION)); } return; } @@ -73,7 +73,7 @@ protected void execute(@NotNull CommandContext ctx, // Text mode requires faction name if (!fctx.hasArgs()) { - ctx.sendMessage(prefix().insert(msg("Usage: /f request [message]", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Request.USAGE)); return; } @@ -81,31 +81,27 @@ protected void execute(@NotNull CommandContext ctx, String factionName = fctx.getArg(0); Faction faction = hyperFactions.getFactionManager().getFactionByName(factionName); if (faction == null) { - ctx.sendMessage(prefix().insert(msg("Faction '" + factionName + "' not found.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.FACTION_NOT_FOUND)); return; } // Check if faction is open (if open, just join directly) if (faction.open()) { - ctx.sendMessage(prefix().insert(msg("That faction is open! Use ", COLOR_YELLOW)) - .insert(msg("/f accept " + faction.name(), COLOR_GREEN)) - .insert(msg(" to join directly.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.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(prefix().insert(msg("You already have a pending request to that faction.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.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(prefix().insert(msg("You have been invited to that faction! Use ", COLOR_YELLOW)) - .insert(msg("/f accept " + faction.name(), COLOR_GREEN)) - .insert(msg(" to join.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Request.HAS_INVITE, COLOR_YELLOW, faction.name())); return; } @@ -122,12 +118,11 @@ protected void execute(@NotNull CommandContext ctx, // Create the join request requestManager.createRequest(faction.id(), player.getUuid(), player.getUsername(), message); - ctx.sendMessage(prefix().insert(msg("Sent join request to ", COLOR_GREEN)) - .insert(msg(faction.name(), COLOR_CYAN)).insert(msg("!", COLOR_GREEN))); + ctx.sendMessage(MessageUtil.success(player, MessageKeys.Request.SENT, faction.name())); if (message != null) { - ctx.sendMessage(prefix().insert(msg("Your message: \"" + message + "\"", COLOR_GRAY))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Request.YOUR_MESSAGE, COLOR_GRAY, message)); } - ctx.sendMessage(prefix().insert(msg("An officer will review your request.", COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Request.OFFICER_REVIEW, COLOR_YELLOW)); // Notify online officers for (UUID memberUuid : faction.members().keySet()) { @@ -135,11 +130,8 @@ protected void execute(@NotNull CommandContext ctx, if (member != null && member.isOfficerOrHigher()) { PlayerRef officer = plugin.getTrackedPlayer(memberUuid); if (officer != null) { - officer.sendMessage(prefix().insert(msg(player.getUsername(), COLOR_YELLOW)) - .insert(msg(" has requested to join your faction!", COLOR_GREEN))); - officer.sendMessage(prefix().insert(msg("Use ", COLOR_YELLOW)) - .insert(msg("/f gui", COLOR_GREEN)) - .insert(msg(" > Invites to review.", COLOR_YELLOW))); + officer.sendMessage(MessageUtil.success(officer, MessageKeys.Request.OFFICER_NOTIFY, player.getUsername())); + officer.sendMessage(MessageUtil.info(officer, MessageKeys.Request.OFFICER_REVIEW_HINT, COLOR_YELLOW)); } } } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index d6f35cf6..c2d2c831 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -313,6 +313,9 @@ public static final class Power { 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() {} } @@ -328,6 +331,28 @@ public static final class Relation { 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() {} } @@ -337,10 +362,47 @@ 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"; @@ -361,14 +423,92 @@ public static final class Economy { 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 command messages. */ + /** /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/resources/Server/Languages/en-US/hyperfactions.lang b/src/main/resources/Server/Languages/en-US/hyperfactions.lang index 8940afc0..6fae49b7 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions.lang @@ -216,3 +216,148 @@ cmd.delhome.deleted = Faction home deleted! cmd.delhome.broadcast = {0} deleted the faction home. cmd.delhome.not_officer = You must be an officer to delete the home. cmd.delhome.failed = Failed to delete home. + +# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== +cmd.relation.ally_no_permission = You don't have permission to manage alliances. +cmd.relation.ally_usage = Usage: /f ally +cmd.relation.ally_sent = Ally request sent to {0}! +cmd.relation.ally_formed = You are now allies with {0}! +cmd.relation.already_ally = You are already allied with that faction. +cmd.relation.ally_failed = Failed to send ally request. +cmd.relation.enemy_no_permission = You don't have permission to declare enemies. +cmd.relation.enemy_usage = Usage: /f enemy +cmd.relation.enemy_declared = {0} is now your enemy! +cmd.relation.already_enemy = You are already enemies with that faction. +cmd.relation.max_enemies = You have reached the maximum number of enemies. +cmd.relation.enemy_failed = Failed to set enemy. +cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. +cmd.relation.neutral_usage = Usage: /f neutral +cmd.relation.neutral_set = Your faction is now neutral with {0}. +cmd.relation.already_neutral = You are already neutral with that faction. +cmd.relation.neutral_failed = Failed to set neutral. +cmd.relation.cannot_self = You cannot ally with yourself. +cmd.relation.max_allies = You have reached the maximum number of allies. +cmd.relation.view_no_permission = You don't have permission to view relations. +cmd.relation.header = === Faction Relations === +cmd.relation.allies_count = Allies ({0}): +cmd.relation.enemies_count = Enemies ({0}): +cmd.relation.list_entry = - {0} + +# ========== Commands - Chat ========== +cmd.chat.usage = Usage: /f c [f|a|off] +cmd.chat.no_permission = You don't have permission for that chat mode. +cmd.chat.mode_set = Chat mode set to {0} + +# ========== Commands - Invites ========== +cmd.invites.not_officer = You must be an officer to manage invites. +cmd.invites.header = === Faction Invites === +cmd.invites.no_pending = No pending invites or requests. +cmd.invites.outgoing = Outgoing Invites: +cmd.invites.outgoing_entry = {0} (invited by {1}) +cmd.invites.requests = Join Requests: +cmd.invites.request_entry = {0}{1} +cmd.invites.your_invites_header = === Your Invites === +cmd.invites.no_invites = You have no pending invites. +cmd.invites.invite_entry = {0} - Use /f accept {1} + +# ========== Commands - Request ========== +cmd.request.no_permission = You don't have permission to request faction membership. +cmd.request.already_in_named = You are already in {0}. +cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.request.usage = Usage: /f request [message] +cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. +cmd.request.already_requested = You already have a pending request to that faction. +cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. +cmd.request.sent = Sent join request to {0}! +cmd.request.your_message = Your message: "{0}" +cmd.request.officer_review = An officer will review your request. +cmd.request.officer_notify = {0} has requested to join your faction! +cmd.request.officer_review_hint = Use /f gui > Invites to review. + +# ========== Commands - Info ========== +cmd.info.faction_header = === {0} === +cmd.info.player_header = === {0} === +cmd.info.no_permission = You don't have permission to view faction info. +cmd.info.faction_not_found = Faction '{0}' not found. +cmd.info.not_in_faction_hint = You are not in a faction. Use /f info +cmd.info.leader = Leader: {0} +cmd.info.members = Members: {0}/{1} +cmd.info.power = Power: {0} +cmd.info.claims = Claims: {0} +cmd.info.raidable = RAIDABLE! +cmd.info.allies = Allies: {0} +cmd.info.enemies = Enemies: {0} +cmd.info.they_consider = They consider you: {0} +cmd.info.you_consider = You consider them: {0} +cmd.info.members_no_permission = You don't have permission to view faction members. +cmd.info.members_header = === {0} Members ({1}) === +cmd.info.member_online = [Online] +cmd.info.list_no_permission = You don't have permission to view faction list. +cmd.info.list_empty = There are no factions. +cmd.info.list_header = === Factions ({0}) === +cmd.info.list_entry = {0} - {1} members, {2} power +cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] +cmd.info.help_no_permission = You don't have permission to view help. +cmd.info.who_no_permission = You don't have permission to view player info. +cmd.info.who_faction = Faction: {0} +cmd.info.who_role = Role: {0} +cmd.info.who_joined = Joined: {0} +cmd.info.who_faction_none = Faction: None +cmd.info.who_power = Power: {0} +cmd.info.who_status = Status: {0} +cmd.info.who_last_seen = Last seen: {0} +cmd.info.map_no_permission = You don't have permission to view the map. +cmd.info.map_header = === Territory Map === +cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild +cmd.info.map_gui_hint = Use /f gui for interactive map + +# ========== Commands - Power ========== +cmd.power.personal = Personal Power: {0}/{1} +cmd.power.faction = Faction Power: {0}/{1} +cmd.power.death_loss = Death Loss: {0} +cmd.power.regen = Regen Rate: {0}/hr +cmd.power.no_permission = You don't have permission to view power info. +cmd.power.header = {0}'s Power: +cmd.power.current = Current: {0} + +# ========== Commands - Economy ========== +cmd.economy.balance = Balance: {0} +cmd.economy.deposited = Deposited {0} into the faction treasury. +cmd.economy.withdrawn = Withdrew {0} from the faction treasury. +cmd.economy.transferred = Transferred {0} to {1}. +cmd.economy.insufficient = Insufficient funds in faction treasury. +cmd.economy.invalid_amount = Invalid amount: {0} +cmd.economy.economy_disabled = Economy is disabled. +cmd.economy.balance_no_permission = You don't have permission to view balances. +cmd.economy.treasury_unavailable = Treasury is not available. +cmd.economy.balance_display = {0}'s treasury: {1} +cmd.economy.deposit_no_permission = You don't have permission to deposit. +cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. +cmd.economy.deposit_usage = Usage: /f deposit +cmd.economy.amount_positive = Amount must be positive. +cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} +cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. +cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. +cmd.economy.withdraw_no_permission = You don't have permission to withdraw. +cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. +cmd.economy.withdraw_usage = Usage: /f withdraw +cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} +cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. +cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. +cmd.economy.withdraw_failed = Withdrawal failed: {0} +cmd.economy.transfer_no_permission = You don't have permission to transfer. +cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. +cmd.economy.transfer_usage = Usage: /f money transfer +cmd.economy.transfer_self = Cannot transfer to your own faction. +cmd.economy.transfer_limit_denied = Transfer denied: {0} +cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. +cmd.economy.transfer_failed = Transfer failed: {0} +cmd.economy.log_no_permission = You don't have permission to view the transaction log. +cmd.economy.log_header = Transaction Log (page {0}/{1}) +cmd.economy.log_empty = No transactions found. +cmd.economy.money_help_header = Treasury Commands: +cmd.economy.money_help_balance = /f money balance [faction] - View balance +cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury +cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury +cmd.economy.money_help_transfer = /f money transfer - Transfer between factions +cmd.economy.money_help_log = /f money log [page] [type] - View transaction history From fb6dd72518f0193bd835d69c4018be95f9235c78 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 09:46:04 -0700 Subject: [PATCH 06/55] feat: migrate UI commands and ProtectionChecker to i18n keys (Phase 1e) Migrate GuiSubCommand, SettingsSubCommand, FactionCommand to use MessageKeys constants. Convert ProtectionChecker's 40 hardcoded strings (action phrases, denial reasons, PvP, entity damage, combat tag) to HFMessages.get() with server-default language fallback. --- .../hyperfactions/command/FactionCommand.java | 6 +- .../command/ui/GuiSubCommand.java | 6 +- .../command/ui/SettingsSubCommand.java | 4 +- .../protection/ProtectionChecker.java | 88 ++++++++++--------- .../com/hyperfactions/util/MessageKeys.java | 53 +++++++++-- .../Server/Languages/en-US/hyperfactions.lang | 47 ++++++++++ 6 files changed, 149 insertions(+), 55 deletions(-) diff --git a/src/main/java/com/hyperfactions/command/FactionCommand.java b/src/main/java/com/hyperfactions/command/FactionCommand.java index bfbc94da..f9a03fca 100644 --- a/src/main/java/com/hyperfactions/command/FactionCommand.java +++ b/src/main/java/com/hyperfactions/command/FactionCommand.java @@ -15,6 +15,8 @@ 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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -123,7 +125,7 @@ protected void execute(@NotNull CommandContext ctx, // No subcommand provided - open faction main dashboard GUI if (!hasPermission(player, Permissions.USE)) { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg("You don't have permission to use factions.", CommandUtil.COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.NO_PERMISSION)); return; } @@ -131,7 +133,7 @@ protected void execute(@NotNull CommandContext ctx, if (playerEntity != null) { hyperFactions.getGuiManager().openFactionMain(playerEntity, ref, store, player); } else { - ctx.sendMessage(CommandUtil.prefix().insert(CommandUtil.msg("Could not access GUI. Use /f help for commands.", CommandUtil.COLOR_YELLOW))); + ctx.sendMessage(MessageUtil.info(player, MessageKeys.Common.GUI_FALLBACK, CommandUtil.COLOR_YELLOW)); } } diff --git a/src/main/java/com/hyperfactions/command/ui/GuiSubCommand.java b/src/main/java/com/hyperfactions/command/ui/GuiSubCommand.java index 081a5b3d..bc6a200f 100644 --- a/src/main/java/com/hyperfactions/command/ui/GuiSubCommand.java +++ b/src/main/java/com/hyperfactions/command/ui/GuiSubCommand.java @@ -4,6 +4,8 @@ import com.hyperfactions.Permissions; import com.hyperfactions.command.FactionSubCommand; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -35,13 +37,13 @@ protected void execute(@NotNull CommandContext ctx, @NotNull World currentWorld) { if (!hasPermission(playerRef, Permissions.USE)) { - ctx.sendMessage(prefix().insert(msg("You don't have permission.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(playerRef, MessageKeys.Common.NO_PERMISSION)); return; } Player player = store.getComponent(ref, Player.getComponentType()); if (player == null) { - ctx.sendMessage(prefix().insert(msg("Could not find player entity.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(playerRef, MessageKeys.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 250caaba..95033a5c 100644 --- a/src/main/java/com/hyperfactions/command/ui/SettingsSubCommand.java +++ b/src/main/java/com/hyperfactions/command/ui/SettingsSubCommand.java @@ -5,6 +5,8 @@ import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -40,7 +42,7 @@ protected void execute(@NotNull CommandContext ctx, FactionMember member = faction.getMember(player.getUuid()); if (member == null || !member.isOfficerOrHigher()) { - ctx.sendMessage(prefix().insert(msg("You must be an officer to access settings.", COLOR_RED))); + ctx.sendMessage(MessageUtil.error(player, MessageKeys.Common.MUST_BE_OFFICER)); return; } diff --git a/src/main/java/com/hyperfactions/protection/ProtectionChecker.java b/src/main/java/com/hyperfactions/protection/ProtectionChecker.java index 51a7ae0a..f24fc510 100644 --- a/src/main/java/com/hyperfactions/protection/ProtectionChecker.java +++ b/src/main/java/com/hyperfactions/protection/ProtectionChecker.java @@ -15,7 +15,9 @@ import com.hyperfactions.manager.*; import com.hyperfactions.util.ChunkUtil; import com.hyperfactions.util.ErrorHandler; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; import java.util.UUID; import java.util.function.Supplier; import org.jetbrains.annotations.NotNull; @@ -704,12 +706,12 @@ public String getDenialMessage(@NotNull ProtectionResult result) { public String getDenialMessage(@NotNull ProtectionResult result, @Nullable InteractionType type) { String action = getActionPhrase(type); return switch (result) { - case DENIED_SAFEZONE -> action + " in a SafeZone."; - case DENIED_WARZONE -> action + " in a WarZone."; - case DENIED_ENEMY_CLAIM -> action + " in enemy territory."; - case DENIED_NEUTRAL_CLAIM -> action + " in claimed territory."; - case DENIED_NO_PERMISSION -> action + " here."; - default -> action + " here."; + 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); }; } @@ -722,26 +724,26 @@ public String getDenialMessage(@NotNull ProtectionResult result, @Nullable Inter @NotNull private String getActionPhrase(@Nullable InteractionType type) { if (type == null) { - return "You can't do that"; + return HFMessages.get(MessageKeys.Protection.ACTION_GENERIC); } return switch (type) { - case BUILD -> "You can't build or break blocks"; - case INTERACT, USE -> "You can't interact with that"; - case DOOR -> "You can't use doors"; - case CONTAINER -> "You can't open containers"; - case BENCH -> "You can't use crafting stations"; - case PROCESSING -> "You can't use processing stations"; - case SEAT -> "You can't use seats"; - case LIGHT -> "You can't toggle lights"; - case TELEPORTER, PORTAL -> "You can't use teleporters"; - case CRATE_PICKUP, CRATE_PLACE -> "You can't use crates"; - case NPC_TAME -> "You can't tame creatures"; - case NPC_INTERACT -> "You can't interact with NPCs"; - case MOUNT -> "You can't mount creatures"; - case PVE_DAMAGE -> "You can't damage creatures"; - case DAMAGE -> "You can't do that"; - case ITEM_DROP -> "You can't drop items"; - case ITEM_PICKUP -> "You can't pick up items"; + 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); }; } @@ -754,13 +756,13 @@ private String getActionPhrase(@Nullable InteractionType type) { @NotNull public String getDenialMessage(@NotNull PvPResult result) { return switch (result) { - case DENIED_SAFEZONE -> "PvP is disabled in SafeZones."; - case DENIED_SAME_FACTION -> "You cannot attack faction members."; - case DENIED_ALLY -> "You cannot attack allies."; - case DENIED_ATTACKER_SAFEZONE, DENIED_DEFENDER_SAFEZONE -> "PvP is disabled in SafeZones."; - case DENIED_SPAWN_PROTECTED -> "That player has spawn protection."; - case DENIED_TERRITORY_NO_PVP -> "PvP is disabled in this territory."; - default -> "You cannot attack this player."; + 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); }; } @@ -824,12 +826,12 @@ private String checkMixinProtection(@NotNull UUID playerUuid, @NotNull String wo if (!zone.getEffectiveFlag(zoneFlag)) { String action = getActionPhrase(factionType); if (zone.isSafeZone()) { - return action + " in a SafeZone."; + return HFMessages.get(MessageKeys.Protection.DENIED_SAFEZONE, action); } if (zone.isWarZone()) { - return action + " in a WarZone."; + return HFMessages.get(MessageKeys.Protection.DENIED_WARZONE, action); } - return action + " in this zone."; + return HFMessages.get(MessageKeys.Protection.DENIED_ZONE, action); } if (zone.isWarZone()) { return null; @@ -856,7 +858,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 getActionPhrase(factionType) + " here. (Faction permission: " + level + ")"; + return HFMessages.get(MessageKeys.Protection.DENIED_FACTION_PERM, getActionPhrase(factionType), level); } return null; } @@ -868,7 +870,7 @@ private String checkMixinProtection(@NotNull UUID playerUuid, @NotNull String wo if (perms != null && checkPermission(perms, "ally", factionType)) { return null; } - return getActionPhrase(factionType) + " here. (Ally territory)"; + return HFMessages.get(MessageKeys.Protection.DENIED_ALLY_TERRITORY, getActionPhrase(factionType)); } } @@ -881,15 +883,15 @@ private String checkMixinProtection(@NotNull UUID playerUuid, @NotNull String wo if (playerFactionId != null) { RelationType relation = relationManager.getRelation(playerFactionId, claimOwner); if (relation == RelationType.ENEMY) { - return getActionPhrase(factionType) + " in enemy territory."; + return HFMessages.get(MessageKeys.Protection.DENIED_ENEMY_CLAIM, getActionPhrase(factionType)); } } - return getActionPhrase(factionType) + " in claimed territory."; + return HFMessages.get(MessageKeys.Protection.DENIED_CLAIMED, getActionPhrase(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 "Protection error — action blocked for safety."; + return HFMessages.get(MessageKeys.Protection.DENIED_ERROR); } } @@ -1067,7 +1069,7 @@ 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 "Mob damage is disabled in this zone."; + return HFMessages.get(MessageKeys.Protection.MOB_DAMAGE_DISABLED); } return null; } @@ -1076,7 +1078,7 @@ 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 "PvE damage is disabled in this zone."; + return HFMessages.get(MessageKeys.Protection.PVE_DAMAGE_DISABLED); } // Check territory claim permissions return checkPveInTerritory(attackerUuid, worldName, chunkX, chunkZ); @@ -1146,7 +1148,7 @@ private String checkPveInTerritory(@NotNull UUID attackerUuid, @NotNull String w } if (!checkPermission(perms, level, InteractionType.PVE_DAMAGE)) { - return "You cannot damage mobs in this territory."; + return HFMessages.get(MessageKeys.Protection.PVE_TERRITORY_DENIED); } return null; } @@ -1331,7 +1333,7 @@ public OrbisMixinsIntegration.CommandCheckResult checkCommandBlock( || lowerCmd.startsWith("/home") || lowerCmd.startsWith("/spawn") || lowerCmd.startsWith("/tp") || lowerCmd.startsWith("/tpa")) { return OrbisMixinsIntegration.CommandCheckResult.deny( - "You cannot use that command while combat tagged."); + HFMessages.get(MessageKeys.Protection.COMBAT_TAG_COMMAND)); } } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index c2d2c831..8dd9397d 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -50,6 +50,7 @@ public static final class Common { 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"; private Common() {} } @@ -530,13 +531,51 @@ private Admin() {} /** Protection denial messages shown when actions are blocked. */ public static final class Protection { - public static final String BUILD = "hyperfactions.protection.build"; - public static final String BREAK = "hyperfactions.protection.break_block"; - public static final String INTERACT = "hyperfactions.protection.interact"; - public static final String CONTAINER = "hyperfactions.protection.container"; - public static final String PVP_DISABLED = "hyperfactions.protection.pvp_disabled"; - public static final String SAFEZONE = "hyperfactions.protection.safezone"; - public static final String WARZONE = "hyperfactions.protection.warzone"; + // 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() {} } diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions.lang b/src/main/resources/Server/Languages/en-US/hyperfactions.lang index 6fae49b7..ec48fd1f 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions.lang @@ -28,6 +28,7 @@ common.none = None common.page = Page {0} of {1} common.unknown = Unknown common.error_generic = Something went wrong. Please try again. +common.gui_fallback = Could not access GUI. Use /f help for commands. # ========== Commands - Create ========== cmd.create.no_permission = You don't have permission to create factions. @@ -361,3 +362,49 @@ cmd.economy.money_help_deposit = /f money deposit - Deposit into treasu cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury cmd.economy.money_help_transfer = /f money transfer - Transfer between factions cmd.economy.money_help_log = /f money log [page] [type] - View transaction history + +# ========== Protection - Action Phrases ========== +protection.action.generic = You can't do that +protection.action.build = You can't build or break blocks +protection.action.interact = You can't interact with that +protection.action.door = You can't use doors +protection.action.container = You can't open containers +protection.action.bench = You can't use crafting stations +protection.action.processing = You can't use processing stations +protection.action.seat = You can't use seats +protection.action.light = You can't toggle lights +protection.action.teleporter = You can't use teleporters +protection.action.crate = You can't use crates +protection.action.tame = You can't tame creatures +protection.action.npc = You can't interact with NPCs +protection.action.mount = You can't mount creatures +protection.action.pve = You can't damage creatures +protection.action.item_drop = You can't drop items +protection.action.item_pickup = You can't pick up items + +# ========== Protection - Denial Reasons ========== +protection.denied.safezone = {0} in a SafeZone. +protection.denied.warzone = {0} in a WarZone. +protection.denied.enemy_claim = {0} in enemy territory. +protection.denied.claimed = {0} in claimed territory. +protection.denied.here = {0} here. +protection.denied.zone = {0} in this zone. +protection.denied.faction_perm = {0} here. (Faction permission: {1}) +protection.denied.ally_territory = {0} here. (Ally territory) +protection.denied.error = Protection error — action blocked for safety. + +# ========== Protection - PvP ========== +protection.pvp.safezone = PvP is disabled in SafeZones. +protection.pvp.same_faction = You cannot attack faction members. +protection.pvp.ally = You cannot attack allies. +protection.pvp.spawn_protected = That player has spawn protection. +protection.pvp.territory_disabled = PvP is disabled in this territory. +protection.pvp.generic = You cannot attack this player. + +# ========== Protection - Entity Damage ========== +protection.mob_damage_disabled = Mob damage is disabled in this zone. +protection.pve_damage_disabled = PvE damage is disabled in this zone. +protection.pve_territory_denied = You cannot damage mobs in this territory. + +# ========== Protection - Combat Tag ========== +protection.combat_tag_command = You cannot use that command while combat tagged. From 8336c15a315f1b78ae346a05d8f50ac2e6a564c2 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 14:36:43 -0700 Subject: [PATCH 07/55] feat: migrate AnnouncementManager, TeleportManager, ChatManager to i18n keys (Phase 1f) Convert AnnouncementManager to per-player i18n resolution for server broadcasts. Migrate TeleportManager's 10 hardcoded strings (warmup, cooldown, cancellation messages) and ChatManager's channel display names. Add mount entry/teleport blocking messages from TerritoryTickingSystem. Completes Phase 1 command/system migration. --- .../manager/AnnouncementManager.java | 43 ++++++++++++------- .../hyperfactions/manager/ChatManager.java | 8 ++-- .../manager/TeleportManager.java | 30 +++++++------ .../territory/TerritoryTickingSystem.java | 4 +- .../com/hyperfactions/util/MessageKeys.java | 41 ++++++++++++++++++ .../Server/Languages/en-US/hyperfactions.lang | 31 +++++++++++++ 6 files changed, 125 insertions(+), 32 deletions(-) diff --git a/src/main/java/com/hyperfactions/manager/AnnouncementManager.java b/src/main/java/com/hyperfactions/manager/AnnouncementManager.java index 25f86a85..5b3213fd 100644 --- a/src/main/java/com/hyperfactions/manager/AnnouncementManager.java +++ b/src/main/java/com/hyperfactions/manager/AnnouncementManager.java @@ -3,13 +3,12 @@ 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.MessageUtil; -import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.universe.PlayerRef; import java.util.Collection; import java.util.function.Supplier; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; /** * Broadcasts server-wide announcements for significant faction events. @@ -40,7 +39,7 @@ public void announceFactionCreated(@NotNull String factionName, @NotNull String return; } - broadcast(MessageUtil.info(leaderName + " has founded the faction " + factionName + "!", MessageUtil.COLOR_GREEN)); + broadcastSuccess(MessageKeys.ServerAnnounce.FACTION_CREATED, leaderName, factionName); } /** @@ -54,7 +53,7 @@ public void announceFactionDisbanded(@NotNull String factionName) { return; } - broadcast(MessageUtil.error("The faction " + factionName + " has been disbanded!")); + broadcastError(MessageKeys.ServerAnnounce.FACTION_DISBANDED, factionName); } /** @@ -71,7 +70,7 @@ public void announceLeadershipTransfer(@NotNull String factionName, return; } - broadcast(MessageUtil.info(newLeader + " is now the leader of " + factionName + "!", MessageUtil.COLOR_GOLD)); + broadcastInfo(MessageKeys.ServerAnnounce.LEADERSHIP_TRANSFER, MessageUtil.COLOR_GOLD, newLeader, factionName); } /** @@ -86,7 +85,7 @@ public void announceOverclaim(@NotNull String attackerFaction, @NotNull String d return; } - broadcast(MessageUtil.error(attackerFaction + " has overclaimed territory from " + defenderFaction + "!")); + broadcastError(MessageKeys.ServerAnnounce.OVERCLAIM, attackerFaction, defenderFaction); } /** @@ -101,7 +100,7 @@ public void announceWarDeclared(@NotNull String declaringFaction, @NotNull Strin return; } - broadcast(MessageUtil.error(declaringFaction + " has declared war on " + targetFaction + "!")); + broadcastError(MessageKeys.ServerAnnounce.WAR_DECLARED, declaringFaction, targetFaction); } /** @@ -116,7 +115,7 @@ public void announceAllianceFormed(@NotNull String faction1, @NotNull String fac return; } - broadcast(MessageUtil.info(faction1 + " and " + faction2 + " are now allies!", MessageUtil.COLOR_GREEN)); + broadcastSuccess(MessageKeys.ServerAnnounce.ALLIANCE_FORMED, faction1, faction2); } /** @@ -131,20 +130,34 @@ public void announceAllianceBroken(@NotNull String faction1, @NotNull String fac return; } - broadcast(MessageUtil.info(faction1 + " and " + faction2 + " are no longer allies!", MessageUtil.COLOR_GOLD)); + broadcastInfo(MessageKeys.ServerAnnounce.ALLIANCE_BROKEN, MessageUtil.COLOR_GOLD, faction1, faction2); } /** - * Builds a formatted announcement message using the configured prefix from config.json. + * Broadcasts a success-styled message to all online players, resolving i18n per-player. */ - private Message buildMessage(@NotNull String text, @NotNull String color) { - return MessageUtil.info(text, color); + private void broadcastSuccess(@NotNull String key, Object... args) { + broadcast(player -> MessageUtil.success(player, key, args)); } /** - * Broadcasts a message to all online players. + * Broadcasts an error-styled message to all online players, resolving i18n per-player. */ - private void broadcast(@NotNull Message message) { + private void broadcastError(@NotNull String key, Object... args) { + broadcast(player -> MessageUtil.error(player, key, args)); + } + + /** + * Broadcasts an info-styled message to all online players, resolving i18n per-player. + */ + private void broadcastInfo(@NotNull String key, @NotNull String color, Object... args) { + broadcast(player -> MessageUtil.info(player, key, color, args)); + } + + /** + * Broadcasts a per-player resolved message to all online players. + */ + private void broadcast(@NotNull java.util.function.Function messageFactory) { try { Collection players = onlinePlayersSupplier.get(); if (players == null) { @@ -152,7 +165,7 @@ private void broadcast(@NotNull Message message) { } for (PlayerRef player : players) { - player.sendMessage(message); + player.sendMessage(messageFactory.apply(player)); } } catch (Exception e) { Logger.warn("Failed to broadcast announcement: %s", e.getMessage()); diff --git a/src/main/java/com/hyperfactions/manager/ChatManager.java b/src/main/java/com/hyperfactions/manager/ChatManager.java index 9e38481a..96e1a6a3 100644 --- a/src/main/java/com/hyperfactions/manager/ChatManager.java +++ b/src/main/java/com/hyperfactions/manager/ChatManager.java @@ -8,7 +8,9 @@ import com.hyperfactions.gui.ActivePageTracker; import com.hyperfactions.gui.GuiUpdateService; import com.hyperfactions.integration.PermissionManager; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.universe.PlayerRef; import java.util.List; @@ -507,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 -> "Public"; - case FACTION -> "Faction"; - case ALLY -> "Ally"; + 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); }; } diff --git a/src/main/java/com/hyperfactions/manager/TeleportManager.java b/src/main/java/com/hyperfactions/manager/TeleportManager.java index 7f76bf55..874d4bfe 100644 --- a/src/main/java/com/hyperfactions/manager/TeleportManager.java +++ b/src/main/java/com/hyperfactions/manager/TeleportManager.java @@ -4,10 +4,13 @@ import com.hyperfactions.config.ConfigManager; import com.hyperfactions.data.Faction; import com.hyperfactions.integration.PermissionManager; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.TimeUtil; import com.hypixel.hytale.server.core.Message; +import com.hypixel.hytale.server.core.universe.PlayerRef; import java.util.Map; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; @@ -301,8 +304,8 @@ public TeleportResult teleportToHome( if (!PermissionManager.get().hasPermission(playerUuid, Permissions.BYPASS_COOLDOWN)) { if (isOnCooldown(playerUuid)) { int remaining = getCooldownRemaining(playerUuid); - sendMessage.accept(MessageUtil.error("You must wait " - + TimeUtil.formatDurationSeconds(remaining) + " before teleporting again.")); + sendMessage.accept(MessageUtil.error( + HFMessages.get((PlayerRef) null, MessageKeys.Teleport.COOLDOWN_WAIT, TimeUtil.formatDurationSeconds(remaining)))); return TeleportResult.ON_COOLDOWN; } } @@ -334,7 +337,8 @@ public TeleportResult teleportToHome( pendingTeleports.put(playerUuid, pending); // Send warmup message - sendMessage.accept(MessageUtil.info("Teleporting to faction home in " + warmup + " seconds...", MessageUtil.COLOR_YELLOW)); + sendMessage.accept(MessageUtil.info( + HFMessages.get((PlayerRef) null, MessageKeys.Teleport.WARMUP_START, warmup), MessageUtil.COLOR_YELLOW)); Logger.debug("Scheduled teleport for %s, will execute at %d", playerUuid, executeAt); return TeleportResult.SUCCESS_WARMUP; @@ -411,7 +415,7 @@ public PendingTeleport checkReady(@NotNull UUID playerUuid, @NotNull Consumer sendMessage) { applyCooldown(playerUuid); - String msg = customMessage != null ? customMessage : "Teleported to faction home!"; + String msg = customMessage != null ? customMessage : HFMessages.get((PlayerRef) null, MessageKeys.Teleport.SUCCESS_DEFAULT); sendMessage.accept(MessageUtil.success(msg)); } @@ -438,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("Your faction has no home set.")); - case WORLD_NOT_FOUND -> sendMessage.accept(MessageUtil.error("World not found.")); - default -> sendMessage.accept(MessageUtil.error("Teleportation failed.")); + 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))); } } @@ -453,8 +457,10 @@ public void onTeleportFailed(@NotNull TeleportResult result, @NotNull Consumer sendMessage) { int secondsToAnnounce = pending.checkCountdown(); if (secondsToAnnounce > 0) { - String timeText = secondsToAnnounce == 1 ? "1 second" : secondsToAnnounce + " seconds"; - sendMessage.accept(MessageUtil.info("Teleporting in " + timeText + "...", MessageUtil.COLOR_YELLOW)); + String timeText = secondsToAnnounce == 1 + ? HFMessages.get((PlayerRef) null, MessageKeys.Teleport.COUNTDOWN_ONE) + : HFMessages.get((PlayerRef) null, MessageKeys.Teleport.COUNTDOWN, secondsToAnnounce); + sendMessage.accept(MessageUtil.info(timeText, MessageUtil.COLOR_YELLOW)); } } @@ -490,7 +496,7 @@ public boolean checkMovement( if (distSq > 0.25) { // 0.5 blocks removePending(playerUuid); - sendMessage.accept(MessageUtil.error("Teleportation cancelled - you moved!")); + sendMessage.accept(MessageUtil.error(HFMessages.get((PlayerRef) null, MessageKeys.Teleport.MOVED_CANCELLED))); return true; } @@ -514,7 +520,7 @@ public boolean cancelOnDamage( if (pendingTeleports.containsKey(playerUuid)) { removePending(playerUuid); - sendMessage.accept(MessageUtil.error("Teleportation cancelled - you took damage!")); + sendMessage.accept(MessageUtil.error(HFMessages.get((PlayerRef) null, MessageKeys.Teleport.DAMAGE_CANCELLED))); return true; } diff --git a/src/main/java/com/hyperfactions/territory/TerritoryTickingSystem.java b/src/main/java/com/hyperfactions/territory/TerritoryTickingSystem.java index a93112cf..3eff31ba 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( - "You can't teleport into that zone while mounted.")); + playerRef, com.hyperfactions.util.MessageKeys.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", - "You can't enter this zone while mounted."); + com.hyperfactions.util.HFMessages.get(playerRef, com.hyperfactions.util.MessageKeys.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/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 8dd9397d..4e4adb21 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -602,6 +602,19 @@ 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"; @@ -666,6 +679,34 @@ public static final class HelpGui { 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() {} + } + /** Player settings page labels. */ public static final class PlayerSettings { public static final String TITLE = "hyperfactions_gui.player_settings.title"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions.lang b/src/main/resources/Server/Languages/en-US/hyperfactions.lang index ec48fd1f..27938a19 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions.lang @@ -408,3 +408,34 @@ protection.pve_territory_denied = You cannot damage mobs in this territory. # ========== Protection - Combat Tag ========== protection.combat_tag_command = You cannot use that command while combat tagged. + +# ========== Server Announcements ========== +# These are broadcast to all online players for significant faction events. +# {0}, {1} = dynamic values (faction names, player names) +server_announce.faction_created = {0} has founded the faction {1}! +server_announce.faction_disbanded = The faction {0} has been disbanded! +server_announce.leadership_transfer = {0} is now the leader of {1}! +server_announce.overclaim = {0} has overclaimed territory from {1}! +server_announce.war_declared = {0} has declared war on {1}! +server_announce.alliance_formed = {0} and {1} are now allies! +server_announce.alliance_broken = {0} and {1} are no longer allies! + +# ========== Teleport System ========== +teleport.cooldown_wait = You must wait {0} before teleporting again. +teleport.warmup_start = Teleporting to faction home in {0} seconds... +teleport.combat_cancelled = Teleportation cancelled - you are in combat! +teleport.success_default = Teleported to faction home! +teleport.no_home = Your faction has no home set. +teleport.world_not_found = World not found. +teleport.failed = Teleportation failed. +teleport.countdown = Teleporting in {0} seconds... +teleport.countdown_one = Teleporting in 1 second... +teleport.moved_cancelled = Teleportation cancelled - you moved! +teleport.damage_cancelled = Teleportation cancelled - you took damage! +teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. +teleport.mount_entry_blocked = You can't enter this zone while mounted. + +# ========== Chat Display ========== +chat.display.public = Public +chat.display.faction = Faction +chat.display.ally = Ally From 06be789dcfe6cf04db3c4e919f8452a3b310c861 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 14:46:52 -0700 Subject: [PATCH 08/55] feat: add help system markdown-to-lang build pipeline (Phase 2) Replace hardcoded help content with build-generated .lang files from markdown sources. Add HelpLangGenerator build-time tool that parses 22 markdown topic files into hyperfactions_help.lang and help-manifest.json. Refactor HelpRegistry to load structure from manifest, HelpMessages to delegate to HFMessages/I18nModule, and HelpCategory to use i18n display name keys. Create initial hyperfactions_gui.lang with help category names. Add generateHelpLang Gradle task wired into processResources. --- build.gradle | 22 + src/main/help/en-US/combat/death.md | 15 + src/main/help/en-US/combat/protection.md | 17 + src/main/help/en-US/combat/tagging.md | 12 + src/main/help/en-US/combat/zones.md | 14 + src/main/help/en-US/diplomacy/alliances.md | 14 + src/main/help/en-US/diplomacy/enemies.md | 17 + src/main/help/en-US/diplomacy/relations.md | 18 + src/main/help/en-US/economy/commands.md | 21 + src/main/help/en-US/economy/funds.md | 18 + src/main/help/en-US/economy/treasury.md | 13 + src/main/help/en-US/power_land/claiming.md | 16 + .../help/en-US/power_land/losing_territory.md | 14 + .../help/en-US/power_land/territory_map.md | 13 + .../en-US/power_land/understanding_power.md | 14 + src/main/help/en-US/quick_ref/all_commands.md | 80 +++ .../help/en-US/welcome/getting_started.md | 16 + src/main/help/en-US/welcome/quick_tips.md | 18 + .../help/en-US/welcome/what_are_factions.md | 14 + src/main/help/en-US/your_faction/creating.md | 13 + src/main/help/en-US/your_faction/joining.md | 17 + src/main/help/en-US/your_faction/managing.md | 22 + src/main/help/en-US/your_faction/roles.md | 16 + .../build/HelpLangGenerator.java | 336 ++++++++++++ .../hyperfactions/gui/help/HelpCategory.java | 26 +- .../hyperfactions/gui/help/HelpMessages.java | 502 +----------------- .../hyperfactions/gui/help/HelpRegistry.java | 486 ++++------------- .../Languages/en-US/hyperfactions_gui.lang | 12 + 28 files changed, 915 insertions(+), 881 deletions(-) create mode 100644 src/main/help/en-US/combat/death.md create mode 100644 src/main/help/en-US/combat/protection.md create mode 100644 src/main/help/en-US/combat/tagging.md create mode 100644 src/main/help/en-US/combat/zones.md create mode 100644 src/main/help/en-US/diplomacy/alliances.md create mode 100644 src/main/help/en-US/diplomacy/enemies.md create mode 100644 src/main/help/en-US/diplomacy/relations.md create mode 100644 src/main/help/en-US/economy/commands.md create mode 100644 src/main/help/en-US/economy/funds.md create mode 100644 src/main/help/en-US/economy/treasury.md create mode 100644 src/main/help/en-US/power_land/claiming.md create mode 100644 src/main/help/en-US/power_land/losing_territory.md create mode 100644 src/main/help/en-US/power_land/territory_map.md create mode 100644 src/main/help/en-US/power_land/understanding_power.md create mode 100644 src/main/help/en-US/quick_ref/all_commands.md create mode 100644 src/main/help/en-US/welcome/getting_started.md create mode 100644 src/main/help/en-US/welcome/quick_tips.md create mode 100644 src/main/help/en-US/welcome/what_are_factions.md create mode 100644 src/main/help/en-US/your_faction/creating.md create mode 100644 src/main/help/en-US/your_faction/joining.md create mode 100644 src/main/help/en-US/your_faction/managing.md create mode 100644 src/main/help/en-US/your_faction/roles.md create mode 100644 src/main/java/com/hyperfactions/build/HelpLangGenerator.java create mode 100644 src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang diff --git a/build.gradle b/build.gradle index b78264f6..c49acd5a 100644 --- a/build.gradle +++ b/build.gradle @@ -128,6 +128,23 @@ public final class BuildInfo { } } +// Generate help .lang files from markdown sources +tasks.register('generateHelpLang', JavaExec) { + group = 'build' + description = 'Generate help .lang files from markdown sources' + dependsOn 'compileJava' + classpath = sourceSets.main.compileClasspath + files(sourceSets.main.java.classesDirectory) + mainClass = 'com.hyperfactions.build.HelpLangGenerator' + args = [ + file('src/main/help').absolutePath, + layout.buildDirectory.dir('generated/resources').get().asFile.absolutePath + ] + inputs.dir(file('src/main/help')) + outputs.dir(layout.buildDirectory.dir('generated/resources')) +} + +sourceSets.main.resources.srcDir(layout.buildDirectory.dir('generated/resources')) + // Expand version placeholder in manifest.json processResources { def ver = buildVersion @@ -192,6 +209,11 @@ javadoc { failOnError = false } +// Ensure help lang files are generated before processResources copies them +tasks.named('processResources') { + dependsOn 'generateHelpLang' +} + // Ensure build info is generated and HyperPerms shadowJar is built before compiling tasks.named('compileJava') { dependsOn 'generateBuildInfo' diff --git a/src/main/help/en-US/combat/death.md b/src/main/help/en-US/combat/death.md new file mode 100644 index 00000000..a123776f --- /dev/null +++ b/src/main/help/en-US/combat/death.md @@ -0,0 +1,15 @@ +--- +id: combat_death +commands: home, sethome, stuck +--- +# Death & Recovery + +Death has real consequences: + +You lose personal power, lowering faction total. +If claims exceed power, enemies can overclaim. + +Power regenerates while online. Multiple deaths +can leave your faction dangerously vulnerable. + +> Pick your battles carefully! diff --git a/src/main/help/en-US/combat/protection.md b/src/main/help/en-US/combat/protection.md new file mode 100644 index 00000000..5f5ce945 --- /dev/null +++ b/src/main/help/en-US/combat/protection.md @@ -0,0 +1,17 @@ +--- +id: combat_protection +--- +# Territory Protection + +Claimed territory has several protections: + +## Block Protection +Only members can place or break blocks. + +## Container Protection +Chests, barrels, etc. are secured to members. + +## Entry Alerts +You're notified when non-members enter claims. + +> Territory protects blocks, not players! diff --git a/src/main/help/en-US/combat/tagging.md b/src/main/help/en-US/combat/tagging.md new file mode 100644 index 00000000..664c6b72 --- /dev/null +++ b/src/main/help/en-US/combat/tagging.md @@ -0,0 +1,12 @@ +--- +id: combat_tagging +--- +# Combat Tagging + +Attacking or being attacked combat tags you. +A timer shows the remaining tag duration. + +While tagged: no /f home, /f stuck, or teleports. +The tag resets with each new combat action. + +> Logging out while tagged is risky. Stay and fight! diff --git a/src/main/help/en-US/combat/zones.md b/src/main/help/en-US/combat/zones.md new file mode 100644 index 00000000..f11cb46b --- /dev/null +++ b/src/main/help/en-US/combat/zones.md @@ -0,0 +1,14 @@ +--- +id: combat_zones +--- +# Special Zones + +Admins can create zones with special rules: + +## SafeZone +No PvP, no block breaking. For spawn/trading. + +## WarZone +PvP always enabled, no protection. Battle areas. + +> Zone rules always override faction territory. diff --git a/src/main/help/en-US/diplomacy/alliances.md b/src/main/help/en-US/diplomacy/alliances.md new file mode 100644 index 00000000..b0694d30 --- /dev/null +++ b/src/main/help/en-US/diplomacy/alliances.md @@ -0,0 +1,14 @@ +--- +id: diplomacy_alliances +commands: ally +--- +# Forming Alliances + +Alliances protect both factions from friendly +fire and territorial disputes. + +`/f ally ` +Sends an alliance request. Both sides must agree. + +Benefits: no friendly fire, shared map visibility. +> There may be a limit on alliance count. diff --git a/src/main/help/en-US/diplomacy/enemies.md b/src/main/help/en-US/diplomacy/enemies.md new file mode 100644 index 00000000..180bc869 --- /dev/null +++ b/src/main/help/en-US/diplomacy/enemies.md @@ -0,0 +1,17 @@ +--- +id: diplomacy_enemies +commands: enemy, neutral +--- +# Enemy Factions + +Declaring an enemy enables PvP and territorial +aggression against them. One-way action. + +`/f enemy ` +Declares enemy immediately. No agreement needed. + +PvP enabled in each other's territory. Overclaim +possible if they become weakened. + +`/f neutral ` +Resets relation to neutral, ending enemy status. diff --git a/src/main/help/en-US/diplomacy/relations.md b/src/main/help/en-US/diplomacy/relations.md new file mode 100644 index 00000000..208db5e7 --- /dev/null +++ b/src/main/help/en-US/diplomacy/relations.md @@ -0,0 +1,18 @@ +--- +id: diplomacy_relations +commands: relations +--- +# Faction Relations + +Every faction pair has a diplomatic relation: + +Ally — No friendly fire, protected from each +other's claims. Requires mutual agreement. + +Enemy — PvP enabled in each other's territory. +Overclaiming possible if target is weakened. + +Neutral — Default state. Standard rules apply. + +`/f relations` +View all alliances, enemies, and pending requests. diff --git a/src/main/help/en-US/economy/commands.md b/src/main/help/en-US/economy/commands.md new file mode 100644 index 00000000..3720eaff --- /dev/null +++ b/src/main/help/en-US/economy/commands.md @@ -0,0 +1,21 @@ +--- +id: economy_commands +--- +# Economy Commands + +Quick reference for economy commands: + +`/f balance` +View treasury balance. + +`/f deposit ` +Deposit funds. + +`/f withdraw ` +Withdraw funds. (Officer+) + +`/f money transfer ` +Transfer to another faction. + +`/f money log [page]` +View transaction history. diff --git a/src/main/help/en-US/economy/funds.md b/src/main/help/en-US/economy/funds.md new file mode 100644 index 00000000..3b7a6da6 --- /dev/null +++ b/src/main/help/en-US/economy/funds.md @@ -0,0 +1,18 @@ +--- +id: economy_funds +commands: deposit, withdraw +--- +# Managing Funds + +Members deposit; Officers can withdraw/transfer. + +`/f deposit ` +Deposit from your balance into the treasury. + +`/f withdraw ` +Withdraw from treasury. (Officer+) + +`/f money transfer ` +Transfer funds to another faction's treasury. + +> All transactions are logged for review. diff --git a/src/main/help/en-US/economy/treasury.md b/src/main/help/en-US/economy/treasury.md new file mode 100644 index 00000000..6a148e82 --- /dev/null +++ b/src/main/help/en-US/economy/treasury.md @@ -0,0 +1,13 @@ +--- +id: economy_treasury +commands: balance +--- +# Faction Treasury + +Every faction has a shared treasury. Managed +by Officers and the Leader. + +`/f balance` +Check your faction's treasury balance. (Alias: bal) + +> Contribute regularly to keep your faction funded! diff --git a/src/main/help/en-US/power_land/claiming.md b/src/main/help/en-US/power_land/claiming.md new file mode 100644 index 00000000..f308f9e2 --- /dev/null +++ b/src/main/help/en-US/power_land/claiming.md @@ -0,0 +1,16 @@ +--- +id: power_claiming +commands: claim, unclaim +--- +# Claiming Territory + +Claiming a chunk protects it. Only members can +build, break, or access containers inside. + +`/f claim` +Claims the chunk you're standing in. (Officer+) + +`/f unclaim` +Releases a claim back to wilderness. (Officer+) + +> Each claim costs one power. Don't over-expand! diff --git a/src/main/help/en-US/power_land/losing_territory.md b/src/main/help/en-US/power_land/losing_territory.md new file mode 100644 index 00000000..6c6ab858 --- /dev/null +++ b/src/main/help/en-US/power_land/losing_territory.md @@ -0,0 +1,14 @@ +--- +id: power_losing +commands: overclaim +--- +# Losing Territory + +If total power drops below claim count, you're +raidable. Enemies can overclaim your chunks. + +`/f overclaim` +Takes a chunk from a weakened faction. (Officer+) + +Stay safe: stay active, avoid deaths, don't +over-expand beyond what your power supports. diff --git a/src/main/help/en-US/power_land/territory_map.md b/src/main/help/en-US/power_land/territory_map.md new file mode 100644 index 00000000..aa31f43d --- /dev/null +++ b/src/main/help/en-US/power_land/territory_map.md @@ -0,0 +1,13 @@ +--- +id: power_map +commands: map +--- +# The Territory Map + +A bird's-eye view of claimed chunks near you. + +`/f map` +Opens the territory map. Click chunks to claim. + +Your faction shows in your color. Allies in blue, +enemies in red, neutrals in gray, wilderness dark. diff --git a/src/main/help/en-US/power_land/understanding_power.md b/src/main/help/en-US/power_land/understanding_power.md new file mode 100644 index 00000000..d18b9bcb --- /dev/null +++ b/src/main/help/en-US/power_land/understanding_power.md @@ -0,0 +1,14 @@ +--- +id: power_understanding +commands: power +--- +# Understanding Power + +Power lets your faction hold territory. Every +player has personal power that adds to the total. + +`/f power` +Check your power and your faction's total. + +Power regenerates online, decreases on death. +> If claims exceed power, you're vulnerable! diff --git a/src/main/help/en-US/quick_ref/all_commands.md b/src/main/help/en-US/quick_ref/all_commands.md new file mode 100644 index 00000000..0097e8b8 --- /dev/null +++ b/src/main/help/en-US/quick_ref/all_commands.md @@ -0,0 +1,80 @@ +--- +id: quickref_commands +--- +# All Commands + +## Core +`/f — Open faction menu (alias: gui, menu)` +`/f help — Open this help center` +`/f create — Create a faction` +`/f disband — Delete your faction (Leader)` +`/f leave — Leave your faction` + +## Membership +`/f invite — Invite player (Officer+)` +`/f accept [faction] — Accept invite (alias: join)` +`/f request — Request to join` +`/f kick — Remove member (Officer+)` +`/f promote — Promote to Officer (Leader)` +`/f demote — Demote to Member (Leader)` +`/f transfer — Transfer leadership` + +## Territory +`/f claim — Claim current chunk (Officer+)` +`/f unclaim — Release current chunk (Officer+)` +`/f overclaim — Take weakened faction's chunk` +`/f map — Open territory map` + +## Teleport +`/f home — Teleport to faction home` +`/f sethome — Set faction home (Officer+)` +`/f delhome — Delete faction home (Officer+)` +`/f stuck — Escape enemy territory` + +## Information +`/f info [faction] — View faction details` +`/f list — Browse all factions` +`/f members — View roster` +`/f who [player] — View player info` +`/f power [player] — Check power levels` +`/f invites — Manage invites/requests` +`/f relations — View diplomatic relations` + +## Diplomacy +`/f ally — Request alliance (Officer+)` +`/f enemy — Declare enemy (Officer+)` +`/f neutral — Reset to neutral` + +## Settings +`/f settings — Open settings GUI (Officer+)` +`/f rename — Rename faction (Leader)` +`/f desc [text] — Set description (Officer+)` +`/f color — Set faction color (Officer+)` +`/f open — Allow anyone to join (Leader)` +`/f close — Require invitation (Leader)` + +## Economy +`/f balance — View treasury` +`/f deposit — Deposit funds` +`/f withdraw — Withdraw (Officer+)` +`/f money transfer — Transfer` +`/f money log [page] — Transaction history` + +## Chat +`/f c — Cycle: Normal > Faction > Ally` +`/f c f — Set faction chat` +`/f c a — Set ally chat` +`/f c off — Set public chat` + +## Admin (requires hyperfactions.admin) +`/f admin — Open admin dashboard` +`/f admin reload — Reload configuration` +`/f admin sync — Sync faction data` +`/f admin factions — Faction management` +`/f admin config — Configuration editor` +`/f admin zones — Zone management` +`/f admin backup create — Create backup` +`/f admin backup restore — Restore backup` +`/f admin safezone — Create SafeZone` +`/f admin warzone — Create WarZone` +`/f admin debug toggle — Debug logging` diff --git a/src/main/help/en-US/welcome/getting_started.md b/src/main/help/en-US/welcome/getting_started.md new file mode 100644 index 00000000..8c50830c --- /dev/null +++ b/src/main/help/en-US/welcome/getting_started.md @@ -0,0 +1,16 @@ +--- +id: welcome_started +commands: gui, menu +--- +# Getting Started + +Ready to dive in? Here's how: + +`/f` +Opens the faction menu. Browse factions, create +your own, or check invitations. + +If invited, check the Invites tab and accept. +Otherwise, browse open factions or start fresh. + +> Once in, explore territory and start claiming! diff --git a/src/main/help/en-US/welcome/quick_tips.md b/src/main/help/en-US/welcome/quick_tips.md new file mode 100644 index 00000000..bc664023 --- /dev/null +++ b/src/main/help/en-US/welcome/quick_tips.md @@ -0,0 +1,18 @@ +--- +id: welcome_tips +--- +# Quick Tips + +## Claiming Land +`/f claim` +Protects the chunk you're standing in. + +## Faction Home +`/f home` +Teleports to your faction home. Set with /f sethome. + +## Faction Chat +`/f c` +Cycles chat mode: Normal > Faction > Ally. + +> Dying costs power, weakening your territory hold! diff --git a/src/main/help/en-US/welcome/what_are_factions.md b/src/main/help/en-US/welcome/what_are_factions.md new file mode 100644 index 00000000..17f7d901 --- /dev/null +++ b/src/main/help/en-US/welcome/what_are_factions.md @@ -0,0 +1,14 @@ +--- +id: welcome_what +--- +# What Are Factions? + +Factions are player teams that claim territory, +build bases, and grow stronger together. + +As a member you get protected land, a faction +home, private chat, and diplomatic relations. + +Strength is measured by power. Active members +generate power; dying costs it. If power drops +below your claim count, enemies can steal land. diff --git a/src/main/help/en-US/your_faction/creating.md b/src/main/help/en-US/your_faction/creating.md new file mode 100644 index 00000000..d06b9f12 --- /dev/null +++ b/src/main/help/en-US/your_faction/creating.md @@ -0,0 +1,13 @@ +--- +id: faction_creating +commands: create +--- +# Creating a Faction + +Starting a faction makes you the Leader with +full control over settings, members, and land. + +`/f create ` +Creates a faction and opens your dashboard. + +> Invite friends, claim land, and start building! diff --git a/src/main/help/en-US/your_faction/joining.md b/src/main/help/en-US/your_faction/joining.md new file mode 100644 index 00000000..6f7282e5 --- /dev/null +++ b/src/main/help/en-US/your_faction/joining.md @@ -0,0 +1,17 @@ +--- +id: faction_joining +commands: accept, join, request +--- +# Joining a Faction + +Three ways to join an existing faction: + +## Browse Open Factions +Open /f and click Browse. Click Join on any open faction. + +## Accept an Invitation +Check the Invites tab and click Accept. + +## Request to Join +`/f request ` +Send a request to an invite-only faction. diff --git a/src/main/help/en-US/your_faction/managing.md b/src/main/help/en-US/your_faction/managing.md new file mode 100644 index 00000000..53560468 --- /dev/null +++ b/src/main/help/en-US/your_faction/managing.md @@ -0,0 +1,22 @@ +--- +id: faction_managing +commands: invite, kick, promote, demote, transfer +--- +# Managing Members + +Officers and Leaders manage the roster: + +`/f invite ` +Sends an invitation. (Officer+) + +`/f kick ` +Removes a member. Officers kick Members; Leaders all. + +`/f promote ` +Promotes a Member to Officer. (Leader only) + +`/f demote ` +Demotes an Officer to Member. (Leader only) + +`/f transfer ` +> Transfers leadership. You become Officer. Cannot undo! diff --git a/src/main/help/en-US/your_faction/roles.md b/src/main/help/en-US/your_faction/roles.md new file mode 100644 index 00000000..0dcc2349 --- /dev/null +++ b/src/main/help/en-US/your_faction/roles.md @@ -0,0 +1,16 @@ +--- +id: faction_roles +--- +# Roles & Ranks + +Three ranks with different capabilities: + +## Leader (1 per faction) +Full control: disband, transfer ownership, +promote/demote, plus all Officer permissions. + +## Officer +Invite/kick, claim/unclaim, set home, relations. + +## Member +Use faction home, chat, build in territory. diff --git a/src/main/java/com/hyperfactions/build/HelpLangGenerator.java b/src/main/java/com/hyperfactions/build/HelpLangGenerator.java new file mode 100644 index 00000000..ab8d2b99 --- /dev/null +++ b/src/main/java/com/hyperfactions/build/HelpLangGenerator.java @@ -0,0 +1,336 @@ +package com.hyperfactions.build; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +import java.io.IOException; +import java.nio.file.*; +import java.util.*; +import java.util.stream.Stream; + +/** + * Build-time tool that converts help markdown files into .lang translation files + * and a help-manifest.json for the HyperFactions help system. + * + *

Usage: {@code java HelpLangGenerator } + * + *

Reads {@code src/main/help/{locale}/{category}/{topic}.md} and produces: + *

    + *
  • {@code {outputDir}/Server/Languages/{locale}/hyperfactions_help.lang}
  • + *
  • {@code {outputDir}/help-manifest.json} (generated from en-US only)
  • + *
+ */ +public class HelpLangGenerator { + + /** Fixed category processing order. */ + private static final List CATEGORY_ORDER = List.of( + "welcome", "your_faction", "power_land", "diplomacy", "combat", "economy", "quick_ref" + ); + + // ── Data structures ────────────────────────────────────────────────── + + /** A single parsed entry from a markdown topic file. */ + record Entry(String type, String key) {} + + /** A fully parsed topic ready for manifest / lang output. */ + record Topic( + String id, + String category, + String topic, + String titleKey, + String titleText, + List commands, + List entries, + List entryTexts + ) {} + + // ── Entry point ────────────────────────────────────────────────────── + + public static void main(String[] args) { + if (args.length < 2) { + System.err.println("Usage: HelpLangGenerator "); + System.exit(1); + } + + Path helpDir = Paths.get(args[0]); + Path outputDir = Paths.get(args[1]); + + if (!Files.isDirectory(helpDir)) { + System.err.println("Help directory not found: " + helpDir); + System.exit(1); + } + + try { + List locales = listSortedDirectories(helpDir); + if (locales.isEmpty()) { + System.err.println("No locale directories found under " + helpDir); + System.exit(1); + } + + System.out.println("Found locales: " + locales); + + for (String locale : locales) { + Path localeDir = helpDir.resolve(locale); + List topics = parseLocale(localeDir); + writeLangFile(outputDir, locale, topics); + + if ("en-US".equals(locale)) { + writeManifest(outputDir, topics); + } + } + + System.out.println("Help language generation complete."); + } catch (IOException e) { + System.err.println("Error generating help lang files: " + e.getMessage()); + e.printStackTrace(); + System.exit(1); + } + } + + // ── Locale parsing ─────────────────────────────────────────────────── + + private static List parseLocale(Path localeDir) throws IOException { + List topics = new ArrayList<>(); + + // Process categories in defined order, skip any that don't exist + for (String category : CATEGORY_ORDER) { + Path categoryDir = localeDir.resolve(category); + if (!Files.isDirectory(categoryDir)) { + continue; + } + + List mdFiles = listMarkdownFiles(categoryDir); + for (Path mdFile : mdFiles) { + Topic topic = parseTopic(category, mdFile); + if (topic != null) { + topics.add(topic); + System.out.println(" Parsed: " + category + "/" + mdFile.getFileName()); + } + } + } + + return topics; + } + + // ── Markdown parsing ───────────────────────────────────────────────── + + private static Topic parseTopic(String category, Path mdFile) throws IOException { + String filename = mdFile.getFileName().toString(); + String topicName = filename.substring(0, filename.length() - 3); // strip .md + + List lines = Files.readAllLines(mdFile); + + // Parse frontmatter + String id = null; + List commands = new ArrayList<>(); + int contentStart = 0; + + if (!lines.isEmpty() && "---".equals(lines.get(0).trim())) { + for (int i = 1; i < lines.size(); i++) { + String line = lines.get(i).trim(); + if ("---".equals(line)) { + contentStart = i + 1; + break; + } + if (line.startsWith("id:")) { + id = line.substring(3).trim(); + } else if (line.startsWith("commands:")) { + String commandStr = line.substring(9).trim(); + for (String cmd : commandStr.split(",")) { + String trimmed = cmd.trim(); + if (!trimmed.isEmpty()) { + commands.add(trimmed); + } + } + } + } + } + + if (id == null) { + id = category + "_" + topicName; + } + + // Parse content lines + String titleText = null; + boolean foundFirstContent = false; + String keyPrefix = category + "." + topicName; + List entries = new ArrayList<>(); + List entryTexts = new ArrayList<>(); + int lineCounter = 0; + + for (int i = contentStart; i < lines.size(); i++) { + String line = lines.get(i); + String trimmed = line.trim(); + + // Skip blank lines before the title is found + if (trimmed.isEmpty() && titleText == null) { + continue; + } + + if (trimmed.startsWith("# ") && titleText == null) { + // First H1 → title + titleText = trimmed.substring(2).trim(); + continue; + } + + // Skip blank lines between title and first content + if (trimmed.isEmpty() && !foundFirstContent) { + continue; + } + + if (trimmed.isEmpty()) { + // Blank line → SPACER (only after first content line) + entries.add(new Entry("SPACER", null)); + entryTexts.add(null); + continue; + } + + foundFirstContent = true; + + if (trimmed.startsWith("## ")) { + // H2 → HEADING + lineCounter++; + String key = keyPrefix + ".line." + lineCounter; + String text = trimmed.substring(3).trim(); + entries.add(new Entry("HEADING", key)); + entryTexts.add(text); + continue; + } + + if (trimmed.startsWith("`") && trimmed.endsWith("`") && trimmed.length() > 2) { + // Command line (backtick-wrapped) + lineCounter++; + String key = keyPrefix + ".line." + lineCounter; + String text = trimmed.substring(1, trimmed.length() - 1); + entries.add(new Entry("COMMAND", key)); + entryTexts.add(text); + continue; + } + + if (trimmed.startsWith("> ")) { + // Blockquote → TIP + lineCounter++; + String key = keyPrefix + ".line." + lineCounter; + String text = trimmed.substring(2).trim(); + entries.add(new Entry("TIP", key)); + entryTexts.add(text); + continue; + } + + // Plain text → TEXT + lineCounter++; + String key = keyPrefix + ".line." + lineCounter; + entries.add(new Entry("TEXT", key)); + entryTexts.add(trimmed); + } + + if (titleText == null) { + titleText = topicName.replace('_', ' '); + } + + return new Topic(id, category, topicName, keyPrefix + ".title", titleText, commands, entries, entryTexts); + } + + // ── .lang file output ──────────────────────────────────────────────── + + private static void writeLangFile(Path outputDir, String locale, List topics) throws IOException { + Path langDir = outputDir.resolve("Server").resolve("Languages").resolve(locale); + Files.createDirectories(langDir); + Path langFile = langDir.resolve("hyperfactions_help.lang"); + + StringBuilder sb = new StringBuilder(); + sb.append("# HyperFactions Help System - ").append(locale).append("\n"); + sb.append("# AUTO-GENERATED by HelpLangGenerator — do not edit manually\n\n"); + + for (Topic topic : topics) { + sb.append("# AUTO-GENERATED from src/main/help/") + .append(locale).append("/") + .append(topic.category()).append("/") + .append(topic.topic()).append(".md\n"); + + sb.append(topic.category()).append(".").append(topic.topic()) + .append(".title = ").append(topic.titleText()).append("\n"); + + for (int i = 0; i < topic.entries().size(); i++) { + Entry entry = topic.entries().get(i); + if (entry.key() != null) { + String text = topic.entryTexts().get(i); + sb.append(entry.key()).append(" = ").append(text).append("\n"); + } + } + + sb.append("\n"); + } + + Files.writeString(langFile, sb.toString()); + System.out.println("Wrote: " + langFile); + } + + // ── Manifest output ────────────────────────────────────────────────── + + private static void writeManifest(Path outputDir, List topics) throws IOException { + List> topicList = new ArrayList<>(); + Map commandMappings = new LinkedHashMap<>(); + + for (Topic topic : topics) { + Map topicMap = new LinkedHashMap<>(); + topicMap.put("id", topic.id()); + topicMap.put("category", topic.category()); + topicMap.put("titleKey", "hyperfactions_help." + topic.titleKey()); + topicMap.put("commands", topic.commands()); + + List> entryList = new ArrayList<>(); + for (int i = 0; i < topic.entries().size(); i++) { + Entry entry = topic.entries().get(i); + Map entryMap = new LinkedHashMap<>(); + entryMap.put("type", entry.type()); + if (entry.key() != null) { + entryMap.put("key", "hyperfactions_help." + entry.key()); + } + entryList.add(entryMap); + } + topicMap.put("entries", entryList); + + topicList.add(topicMap); + + // Build command mappings + for (String cmd : topic.commands()) { + commandMappings.put(cmd, topic.category()); + } + } + + Map manifest = new LinkedHashMap<>(); + manifest.put("topics", topicList); + manifest.put("commandMappings", commandMappings); + + Gson gson = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create(); + String json = gson.toJson(manifest); + + Path manifestFile = outputDir.resolve("help-manifest.json"); + Files.createDirectories(manifestFile.getParent()); + Files.writeString(manifestFile, json + "\n"); + System.out.println("Wrote: " + manifestFile); + } + + // ── Utility ────────────────────────────────────────────────────────── + + private static List listSortedDirectories(Path dir) throws IOException { + try (Stream stream = Files.list(dir)) { + return stream + .filter(Files::isDirectory) + .map(p -> p.getFileName().toString()) + .sorted() + .toList(); + } + } + + private static List listMarkdownFiles(Path dir) throws IOException { + try (Stream stream = Files.list(dir)) { + return stream + .filter(p -> p.toString().endsWith(".md")) + .filter(Files::isRegularFile) + .sorted() + .toList(); + } + } +} diff --git a/src/main/java/com/hyperfactions/gui/help/HelpCategory.java b/src/main/java/com/hyperfactions/gui/help/HelpCategory.java index d8458761..0341e401 100644 --- a/src/main/java/com/hyperfactions/gui/help/HelpCategory.java +++ b/src/main/java/com/hyperfactions/gui/help/HelpCategory.java @@ -1,5 +1,7 @@ package com.hyperfactions.gui.help; +import com.hyperfactions.util.HFMessages; +import com.hypixel.hytale.server.core.universe.PlayerRef; import org.jetbrains.annotations.NotNull; /** @@ -7,26 +9,26 @@ * Each category represents a conceptual area with an accent color for UI rendering. */ public enum HelpCategory { - WELCOME("welcome", "Welcome", "#00FFFF", 0), - YOUR_FACTION("your_faction", "Your Faction", "#44CC44", 1), - POWER_AND_LAND("power_land", "Power & Land", "#FFD700", 2), - DIPLOMACY("diplomacy", "Diplomacy", "#55AAFF", 3), - COMBAT("combat", "Combat & Safety", "#FF5555", 4), - ECONOMY("economy", "Economy", "#FFAA00", 5), - QUICK_REFERENCE("quick_ref", "Quick Reference", "#888888", 6); + WELCOME("welcome", "hyperfactions_gui.help.category.welcome", "#00FFFF", 0), + YOUR_FACTION("your_faction", "hyperfactions_gui.help.category.your_faction", "#44CC44", 1), + POWER_AND_LAND("power_land", "hyperfactions_gui.help.category.power_land", "#FFD700", 2), + DIPLOMACY("diplomacy", "hyperfactions_gui.help.category.diplomacy", "#55AAFF", 3), + COMBAT("combat", "hyperfactions_gui.help.category.combat", "#FF5555", 4), + ECONOMY("economy", "hyperfactions_gui.help.category.economy", "#FFAA00", 5), + QUICK_REFERENCE("quick_ref", "hyperfactions_gui.help.category.quick_ref", "#888888", 6); private final String id; - private final String displayName; + private final String displayNameKey; private final String color; private final int order; - HelpCategory(@NotNull String id, @NotNull String displayName, + HelpCategory(@NotNull String id, @NotNull String displayNameKey, @NotNull String color, int order) { this.id = id; - this.displayName = displayName; + this.displayNameKey = displayNameKey; this.color = color; this.order = order; } @@ -40,11 +42,11 @@ public String id() { } /** - * Gets the display name shown in the UI. + * Gets the display name shown in the UI, resolved via i18n. */ @NotNull public String displayName() { - return displayName; + return HFMessages.get((PlayerRef) null, displayNameKey); } /** diff --git a/src/main/java/com/hyperfactions/gui/help/HelpMessages.java b/src/main/java/com/hyperfactions/gui/help/HelpMessages.java index b838025a..f985f5a5 100644 --- a/src/main/java/com/hyperfactions/gui/help/HelpMessages.java +++ b/src/main/java/com/hyperfactions/gui/help/HelpMessages.java @@ -1,510 +1,44 @@ package com.hyperfactions.gui.help; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; +import com.hyperfactions.util.HFMessages; +import com.hypixel.hytale.server.core.universe.PlayerRef; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * Key-based string store for all help content. - * Separates content from rendering code so future locale loading - * only needs to swap this class's backing map. + * Delegates to {@link HFMessages} for i18n resolution via Hytale's I18nModule. * - *

i18n future path: Replace {@link #loadDefaults()} body with a - * JSON/properties file loader keyed by locale. The {@link #get(String)} - * API stays the same.

+ *

Help content keys are prefixed {@code hyperfactions_help.} (auto-prefixed by + * I18nModule from the {@code hyperfactions_help.lang} filename). + * + *

The .lang file is build-generated from markdown sources in {@code src/main/help/}. */ public final class HelpMessages { - private static final Map MESSAGES = new LinkedHashMap<>(); - - static { - loadDefaults(); - } - private HelpMessages() {} /** - * Gets the localized string for a message key. + * Gets the localized string for a help message key. + * Uses server default language. * - * @param key The message key + * @param key The full message key (e.g. "hyperfactions_help.welcome.getting_started.title") * @return The localized string, or the key itself if not found */ @NotNull public static String get(@NotNull String key) { - return MESSAGES.getOrDefault(key, key); + return HFMessages.get((PlayerRef) null, key); } /** - * Collects ordered lines for a topic. - * Looks for keys matching {@code .line.1}, {@code .line.2}, etc. + * Gets the localized string for a help message key, resolved for a specific player's language. * - * @param topicKey The topic key prefix (e.g. "help.welcome.what_are_factions") - * @return Ordered list of line values + * @param player The player (null for server default) + * @param key The full message key + * @return The localized string, or the key itself if not found */ @NotNull - public static List getLines(@NotNull String topicKey) { - List lines = new ArrayList<>(); - for (int i = 1; ; i++) { - String key = topicKey + ".line." + i; - String value = MESSAGES.get(key); - if (value == null) { - break; - } - lines.add(value); - } - return lines; - } - - private static void put(@NotNull String key, @NotNull String value) { - MESSAGES.put(key, value); - } - - private static void loadDefaults() { - // ================================================================= - // Category names - // ================================================================= - put("help.category.welcome", "Welcome"); - put("help.category.your_faction", "Your Faction"); - put("help.category.power_land", "Power & Land"); - put("help.category.diplomacy", "Diplomacy"); - put("help.category.combat", "Combat & Safety"); - put("help.category.economy", "Economy"); - put("help.category.quick_ref", "Quick Reference"); - - // ================================================================= - // WELCOME - // ================================================================= - - // --- What Are Factions? --- - put("help.welcome.what_are_factions.title", "What Are Factions?"); - put("help.welcome.what_are_factions.line.1", - "Factions are player teams that claim territory,"); - put("help.welcome.what_are_factions.line.2", - "build bases, and grow stronger together."); - put("help.welcome.what_are_factions.line.3", - "As a member you get protected land, a faction"); - put("help.welcome.what_are_factions.line.4", - "home, private chat, and diplomatic relations."); - put("help.welcome.what_are_factions.line.5", - "Strength is measured by power. Active members"); - put("help.welcome.what_are_factions.line.6", - "generate power; dying costs it. If power drops"); - put("help.welcome.what_are_factions.line.7", - "below your claim count, enemies can steal land."); - - // --- Getting Started --- - put("help.welcome.getting_started.title", "Getting Started"); - put("help.welcome.getting_started.line.1", - "Ready to dive in? Here's how:"); - put("help.welcome.getting_started.line.2", "/f"); - put("help.welcome.getting_started.line.3", - "Opens the faction menu. Browse factions, create"); - put("help.welcome.getting_started.line.4", - "your own, or check invitations."); - put("help.welcome.getting_started.line.5", - "If invited, check the Invites tab and accept."); - put("help.welcome.getting_started.line.6", - "Otherwise, browse open factions or start fresh."); - put("help.welcome.getting_started.line.7", - "Once in, explore territory and start claiming!"); - - // --- Quick Tips --- - put("help.welcome.quick_tips.title", "Quick Tips"); - put("help.welcome.quick_tips.line.1", "Claiming Land"); - put("help.welcome.quick_tips.line.2", "/f claim"); - put("help.welcome.quick_tips.line.3", - "Protects the chunk you're standing in."); - put("help.welcome.quick_tips.line.4", "Faction Home"); - put("help.welcome.quick_tips.line.5", "/f home"); - put("help.welcome.quick_tips.line.6", - "Teleports to your faction home. Set with /f sethome."); - put("help.welcome.quick_tips.line.7", "Faction Chat"); - put("help.welcome.quick_tips.line.8", "/f c"); - put("help.welcome.quick_tips.line.9", - "Cycles chat mode: Normal > Faction > Ally."); - put("help.welcome.quick_tips.line.10", - "Dying costs power, weakening your territory hold!"); - - // ================================================================= - // YOUR FACTION - // ================================================================= - - // --- Creating a Faction --- - put("help.your_faction.creating.title", "Creating a Faction"); - put("help.your_faction.creating.line.1", - "Starting a faction makes you the Leader with"); - put("help.your_faction.creating.line.2", - "full control over settings, members, and land."); - put("help.your_faction.creating.line.3", "/f create "); - put("help.your_faction.creating.line.4", - "Creates a faction and opens your dashboard."); - put("help.your_faction.creating.line.5", - "Invite friends, claim land, and start building!"); - - // --- Joining a Faction --- - put("help.your_faction.joining.title", "Joining a Faction"); - put("help.your_faction.joining.line.1", - "Three ways to join an existing faction:"); - put("help.your_faction.joining.line.2", "Browse Open Factions"); - put("help.your_faction.joining.line.3", - "Open /f and click Browse. Click Join on any open faction."); - put("help.your_faction.joining.line.4", "Accept an Invitation"); - put("help.your_faction.joining.line.5", - "Check the Invites tab and click Accept."); - put("help.your_faction.joining.line.6", "Request to Join"); - put("help.your_faction.joining.line.7", "/f request "); - put("help.your_faction.joining.line.8", - "Send a request to an invite-only faction."); - - // --- Roles & Ranks --- - put("help.your_faction.roles.title", "Roles & Ranks"); - put("help.your_faction.roles.line.1", - "Three ranks with different capabilities:"); - put("help.your_faction.roles.line.2", "Leader (1 per faction)"); - put("help.your_faction.roles.line.3", - "Full control: disband, transfer ownership,"); - put("help.your_faction.roles.line.4", - "promote/demote, plus all Officer permissions."); - put("help.your_faction.roles.line.5", "Officer"); - put("help.your_faction.roles.line.6", - "Invite/kick, claim/unclaim, set home, relations."); - put("help.your_faction.roles.line.7", "Member"); - put("help.your_faction.roles.line.8", - "Use faction home, chat, build in territory."); - - // --- Managing Members --- - put("help.your_faction.managing.title", "Managing Members"); - put("help.your_faction.managing.line.1", - "Officers and Leaders manage the roster:"); - put("help.your_faction.managing.line.2", "/f invite "); - put("help.your_faction.managing.line.3", - "Sends an invitation. (Officer+)"); - put("help.your_faction.managing.line.4", "/f kick "); - put("help.your_faction.managing.line.5", - "Removes a member. Officers kick Members; Leaders all."); - put("help.your_faction.managing.line.6", "/f promote "); - put("help.your_faction.managing.line.7", - "Promotes a Member to Officer. (Leader only)"); - put("help.your_faction.managing.line.8", "/f demote "); - put("help.your_faction.managing.line.9", - "Demotes an Officer to Member. (Leader only)"); - put("help.your_faction.managing.line.10", "/f transfer "); - put("help.your_faction.managing.line.11", - "Transfers leadership. You become Officer. Cannot undo!"); - - // ================================================================= - // POWER & LAND - // ================================================================= - - // --- Understanding Power --- - put("help.power_land.understanding_power.title", "Understanding Power"); - put("help.power_land.understanding_power.line.1", - "Power lets your faction hold territory. Every"); - put("help.power_land.understanding_power.line.2", - "player has personal power that adds to the total."); - put("help.power_land.understanding_power.line.3", "/f power"); - put("help.power_land.understanding_power.line.4", - "Check your power and your faction's total."); - put("help.power_land.understanding_power.line.5", - "Power regenerates online, decreases on death."); - put("help.power_land.understanding_power.line.6", - "If claims exceed power, you're vulnerable!"); - - // --- Claiming Territory --- - put("help.power_land.claiming.title", "Claiming Territory"); - put("help.power_land.claiming.line.1", - "Claiming a chunk protects it. Only members can"); - put("help.power_land.claiming.line.2", - "build, break, or access containers inside."); - put("help.power_land.claiming.line.3", "/f claim"); - put("help.power_land.claiming.line.4", - "Claims the chunk you're standing in. (Officer+)"); - put("help.power_land.claiming.line.5", "/f unclaim"); - put("help.power_land.claiming.line.6", - "Releases a claim back to wilderness. (Officer+)"); - put("help.power_land.claiming.line.7", - "Each claim costs one power. Don't over-expand!"); - - // --- The Territory Map --- - put("help.power_land.territory_map.title", "The Territory Map"); - put("help.power_land.territory_map.line.1", - "A bird's-eye view of claimed chunks near you."); - put("help.power_land.territory_map.line.2", "/f map"); - put("help.power_land.territory_map.line.3", - "Opens the territory map. Click chunks to claim."); - put("help.power_land.territory_map.line.4", - "Your faction shows in your color. Allies in blue,"); - put("help.power_land.territory_map.line.5", - "enemies in red, neutrals in gray, wilderness dark."); - - // --- Losing Territory --- - put("help.power_land.losing_territory.title", "Losing Territory"); - put("help.power_land.losing_territory.line.1", - "If total power drops below claim count, you're"); - put("help.power_land.losing_territory.line.2", - "raidable. Enemies can overclaim your chunks."); - put("help.power_land.losing_territory.line.3", "/f overclaim"); - put("help.power_land.losing_territory.line.4", - "Takes a chunk from a weakened faction. (Officer+)"); - put("help.power_land.losing_territory.line.5", - "Stay safe: stay active, avoid deaths, don't"); - put("help.power_land.losing_territory.line.6", - "over-expand beyond what your power supports."); - - // ================================================================= - // DIPLOMACY - // ================================================================= - - // --- Faction Relations --- - put("help.diplomacy.relations.title", "Faction Relations"); - put("help.diplomacy.relations.line.1", - "Every faction pair has a diplomatic relation:"); - put("help.diplomacy.relations.line.2", - "Ally \u2014 No friendly fire, protected from each"); - put("help.diplomacy.relations.line.3", - "other's claims. Requires mutual agreement."); - put("help.diplomacy.relations.line.4", - "Enemy \u2014 PvP enabled in each other's territory."); - put("help.diplomacy.relations.line.5", - "Overclaiming possible if target is weakened."); - put("help.diplomacy.relations.line.6", - "Neutral \u2014 Default state. Standard rules apply."); - put("help.diplomacy.relations.line.7", "/f relations"); - put("help.diplomacy.relations.line.8", - "View all alliances, enemies, and pending requests."); - - // --- Forming Alliances --- - put("help.diplomacy.alliances.title", "Forming Alliances"); - put("help.diplomacy.alliances.line.1", - "Alliances protect both factions from friendly"); - put("help.diplomacy.alliances.line.2", - "fire and territorial disputes."); - put("help.diplomacy.alliances.line.3", "/f ally "); - put("help.diplomacy.alliances.line.4", - "Sends an alliance request. Both sides must agree."); - put("help.diplomacy.alliances.line.5", - "Benefits: no friendly fire, shared map visibility."); - put("help.diplomacy.alliances.line.6", - "There may be a limit on alliance count."); - - // --- Enemy Factions --- - put("help.diplomacy.enemies.title", "Enemy Factions"); - put("help.diplomacy.enemies.line.1", - "Declaring an enemy enables PvP and territorial"); - put("help.diplomacy.enemies.line.2", - "aggression against them. One-way action."); - put("help.diplomacy.enemies.line.3", "/f enemy "); - put("help.diplomacy.enemies.line.4", - "Declares enemy immediately. No agreement needed."); - put("help.diplomacy.enemies.line.5", - "PvP enabled in each other's territory. Overclaim"); - put("help.diplomacy.enemies.line.6", - "possible if they become weakened."); - put("help.diplomacy.enemies.line.7", "/f neutral "); - put("help.diplomacy.enemies.line.8", - "Resets relation to neutral, ending enemy status."); - - // ================================================================= - // COMBAT & SAFETY - // ================================================================= - - // --- Combat Tagging --- - put("help.combat.tagging.title", "Combat Tagging"); - put("help.combat.tagging.line.1", - "Attacking or being attacked combat tags you."); - put("help.combat.tagging.line.2", - "A timer shows the remaining tag duration."); - put("help.combat.tagging.line.3", - "While tagged: no /f home, /f stuck, or teleports."); - put("help.combat.tagging.line.4", - "The tag resets with each new combat action."); - put("help.combat.tagging.line.5", - "Logging out while tagged is risky. Stay and fight!"); - - // --- Territory Protection --- - put("help.combat.protection.title", "Territory Protection"); - put("help.combat.protection.line.1", - "Claimed territory has several protections:"); - put("help.combat.protection.line.2", "Block Protection"); - put("help.combat.protection.line.3", - "Only members can place or break blocks."); - put("help.combat.protection.line.4", "Container Protection"); - put("help.combat.protection.line.5", - "Chests, barrels, etc. are secured to members."); - put("help.combat.protection.line.6", "Entry Alerts"); - put("help.combat.protection.line.7", - "You're notified when non-members enter claims."); - put("help.combat.protection.line.8", - "Territory protects blocks, not players!"); - - // --- Special Zones --- - put("help.combat.zones.title", "Special Zones"); - put("help.combat.zones.line.1", - "Admins can create zones with special rules:"); - put("help.combat.zones.line.2", "SafeZone"); - put("help.combat.zones.line.3", - "No PvP, no block breaking. For spawn/trading."); - put("help.combat.zones.line.4", "WarZone"); - put("help.combat.zones.line.5", - "PvP always enabled, no protection. Battle areas."); - put("help.combat.zones.line.6", - "Zone rules always override faction territory."); - - // --- Death & Recovery --- - put("help.combat.death.title", "Death & Recovery"); - put("help.combat.death.line.1", - "Death has real consequences:"); - put("help.combat.death.line.2", - "You lose personal power, lowering faction total."); - put("help.combat.death.line.3", - "If claims exceed power, enemies can overclaim."); - put("help.combat.death.line.4", - "Power regenerates while online. Multiple deaths"); - put("help.combat.death.line.5", - "can leave your faction dangerously vulnerable."); - put("help.combat.death.line.6", - "Pick your battles carefully!"); - - // ================================================================= - // ECONOMY - // ================================================================= - - // --- Faction Treasury --- - put("help.economy.treasury.title", "Faction Treasury"); - put("help.economy.treasury.line.1", - "Every faction has a shared treasury. Managed"); - put("help.economy.treasury.line.2", - "by Officers and the Leader."); - put("help.economy.treasury.line.3", "/f balance"); - put("help.economy.treasury.line.4", - "Check your faction's treasury balance. (Alias: bal)"); - put("help.economy.treasury.line.5", - "Contribute regularly to keep your faction funded!"); - - // --- Managing Funds --- - put("help.economy.funds.title", "Managing Funds"); - put("help.economy.funds.line.1", - "Members deposit; Officers can withdraw/transfer."); - put("help.economy.funds.line.2", "/f deposit "); - put("help.economy.funds.line.3", - "Deposit from your balance into the treasury."); - put("help.economy.funds.line.4", "/f withdraw "); - put("help.economy.funds.line.5", - "Withdraw from treasury. (Officer+)"); - put("help.economy.funds.line.6", "/f money transfer "); - put("help.economy.funds.line.7", - "Transfer funds to another faction's treasury."); - put("help.economy.funds.line.8", - "All transactions are logged for review."); - - // --- Economy Commands --- - put("help.economy.commands.title", "Economy Commands"); - put("help.economy.commands.line.1", - "Quick reference for economy commands:"); - put("help.economy.commands.line.2", "/f balance"); - put("help.economy.commands.line.3", "View treasury balance."); - put("help.economy.commands.line.4", "/f deposit "); - put("help.economy.commands.line.5", "Deposit funds."); - put("help.economy.commands.line.6", "/f withdraw "); - put("help.economy.commands.line.7", "Withdraw funds. (Officer+)"); - put("help.economy.commands.line.8", "/f money transfer "); - put("help.economy.commands.line.9", "Transfer to another faction."); - put("help.economy.commands.line.10", "/f money log [page]"); - put("help.economy.commands.line.11", "View transaction history."); - - // ================================================================= - // QUICK REFERENCE - // ================================================================= - - // --- All Commands --- - put("help.quick_ref.all_commands.title", "All Commands"); - - // Core - put("help.quick_ref.all_commands.line.1", "Core"); - put("help.quick_ref.all_commands.line.2", "/f \u2014 Open faction menu (alias: gui, menu)"); - put("help.quick_ref.all_commands.line.3", "/f help \u2014 Open this help center"); - put("help.quick_ref.all_commands.line.4", "/f create \u2014 Create a faction"); - put("help.quick_ref.all_commands.line.5", "/f disband \u2014 Delete your faction (Leader)"); - put("help.quick_ref.all_commands.line.6", "/f leave \u2014 Leave your faction"); - - // Membership - put("help.quick_ref.all_commands.line.7", "Membership"); - put("help.quick_ref.all_commands.line.8", "/f invite \u2014 Invite player (Officer+)"); - put("help.quick_ref.all_commands.line.9", "/f accept [faction] \u2014 Accept invite (alias: join)"); - put("help.quick_ref.all_commands.line.10", "/f request \u2014 Request to join"); - put("help.quick_ref.all_commands.line.11", "/f kick \u2014 Remove member (Officer+)"); - put("help.quick_ref.all_commands.line.12", "/f promote \u2014 Promote to Officer (Leader)"); - put("help.quick_ref.all_commands.line.13", "/f demote \u2014 Demote to Member (Leader)"); - put("help.quick_ref.all_commands.line.14", "/f transfer \u2014 Transfer leadership"); - - // Territory - put("help.quick_ref.all_commands.line.15", "Territory"); - put("help.quick_ref.all_commands.line.16", "/f claim \u2014 Claim current chunk (Officer+)"); - put("help.quick_ref.all_commands.line.17", "/f unclaim \u2014 Release current chunk (Officer+)"); - put("help.quick_ref.all_commands.line.18", "/f overclaim \u2014 Take weakened faction's chunk"); - put("help.quick_ref.all_commands.line.19", "/f map \u2014 Open territory map"); - - // Teleport - put("help.quick_ref.all_commands.line.20", "Teleport"); - put("help.quick_ref.all_commands.line.21", "/f home \u2014 Teleport to faction home"); - put("help.quick_ref.all_commands.line.22", "/f sethome \u2014 Set faction home (Officer+)"); - put("help.quick_ref.all_commands.line.23", "/f delhome \u2014 Delete faction home (Officer+)"); - put("help.quick_ref.all_commands.line.24", "/f stuck \u2014 Escape enemy territory"); - - // Information - put("help.quick_ref.all_commands.line.25", "Information"); - put("help.quick_ref.all_commands.line.26", "/f info [faction] \u2014 View faction details"); - put("help.quick_ref.all_commands.line.27", "/f list \u2014 Browse all factions"); - put("help.quick_ref.all_commands.line.28", "/f members \u2014 View roster"); - put("help.quick_ref.all_commands.line.29", "/f who [player] \u2014 View player info"); - put("help.quick_ref.all_commands.line.30", "/f power [player] \u2014 Check power levels"); - put("help.quick_ref.all_commands.line.31", "/f invites \u2014 Manage invites/requests"); - put("help.quick_ref.all_commands.line.32", "/f relations \u2014 View diplomatic relations"); - - // Diplomacy - put("help.quick_ref.all_commands.line.33", "Diplomacy"); - put("help.quick_ref.all_commands.line.34", "/f ally \u2014 Request alliance (Officer+)"); - put("help.quick_ref.all_commands.line.35", "/f enemy \u2014 Declare enemy (Officer+)"); - put("help.quick_ref.all_commands.line.36", "/f neutral \u2014 Reset to neutral"); - - // Settings - put("help.quick_ref.all_commands.line.37", "Settings"); - put("help.quick_ref.all_commands.line.38", "/f settings \u2014 Open settings GUI (Officer+)"); - put("help.quick_ref.all_commands.line.39", "/f rename \u2014 Rename faction (Leader)"); - put("help.quick_ref.all_commands.line.40", "/f desc [text] \u2014 Set description (Officer+)"); - put("help.quick_ref.all_commands.line.41", "/f color \u2014 Set faction color (Officer+)"); - put("help.quick_ref.all_commands.line.42", "/f open \u2014 Allow anyone to join (Leader)"); - put("help.quick_ref.all_commands.line.43", "/f close \u2014 Require invitation (Leader)"); - - // Economy - put("help.quick_ref.all_commands.line.44", "Economy"); - put("help.quick_ref.all_commands.line.45", "/f balance \u2014 View treasury"); - put("help.quick_ref.all_commands.line.46", "/f deposit \u2014 Deposit funds"); - put("help.quick_ref.all_commands.line.47", "/f withdraw \u2014 Withdraw (Officer+)"); - put("help.quick_ref.all_commands.line.48", "/f money transfer \u2014 Transfer"); - put("help.quick_ref.all_commands.line.49", "/f money log [page] \u2014 Transaction history"); - - // Chat - put("help.quick_ref.all_commands.line.50", "Chat"); - put("help.quick_ref.all_commands.line.51", "/f c \u2014 Cycle: Normal > Faction > Ally"); - put("help.quick_ref.all_commands.line.52", "/f c f \u2014 Set faction chat"); - put("help.quick_ref.all_commands.line.53", "/f c a \u2014 Set ally chat"); - put("help.quick_ref.all_commands.line.54", "/f c off \u2014 Set public chat"); - - // Admin - put("help.quick_ref.all_commands.line.55", "Admin (requires hyperfactions.admin)"); - put("help.quick_ref.all_commands.line.56", "/f admin \u2014 Open admin dashboard"); - put("help.quick_ref.all_commands.line.57", "/f admin reload \u2014 Reload configuration"); - put("help.quick_ref.all_commands.line.58", "/f admin sync \u2014 Sync faction data"); - put("help.quick_ref.all_commands.line.59", "/f admin factions \u2014 Faction management"); - put("help.quick_ref.all_commands.line.60", "/f admin config \u2014 Configuration editor"); - put("help.quick_ref.all_commands.line.61", "/f admin zones \u2014 Zone management"); - put("help.quick_ref.all_commands.line.62", "/f admin backup create \u2014 Create backup"); - put("help.quick_ref.all_commands.line.63", "/f admin backup restore \u2014 Restore backup"); - put("help.quick_ref.all_commands.line.64", "/f admin safezone \u2014 Create SafeZone"); - put("help.quick_ref.all_commands.line.65", "/f admin warzone \u2014 Create WarZone"); - put("help.quick_ref.all_commands.line.66", "/f admin debug toggle \u2014 Debug logging"); + public static String get(@Nullable PlayerRef player, @NotNull String key) { + return HFMessages.get(player, key); } } diff --git a/src/main/java/com/hyperfactions/gui/help/HelpRegistry.java b/src/main/java/com/hyperfactions/gui/help/HelpRegistry.java index e5ffdf5e..c9f7b425 100644 --- a/src/main/java/com/hyperfactions/gui/help/HelpRegistry.java +++ b/src/main/java/com/hyperfactions/gui/help/HelpRegistry.java @@ -1,14 +1,21 @@ package com.hyperfactions.gui.help; -import static com.hyperfactions.gui.help.HelpEntry.*; - +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.hyperfactions.util.Logger; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.util.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** * Central registry of all help content. - * Provides lookup by category, topic ID, or command name. + * Loads topic structure from a build-generated {@code help-manifest.json} + * and provides lookup by category, topic ID, or command name. */ public final class HelpRegistry { @@ -21,7 +28,8 @@ public final class HelpRegistry { private final Map categoryByCommand = new HashMap<>(); private HelpRegistry() { - initializeContent(); + loadFromManifest(); + registerAdditionalCommandMappings(); } /** Returns the instance. */ @@ -59,395 +67,103 @@ private void registerCommandMapping(@NotNull String command, @NotNull HelpCatego categoryByCommand.put(command.toLowerCase(), category); } - private static String k(String category, String topic, int line) { - return "help." + category + "." + topic + ".line." + line; - } - - private void initializeContent() { - // ===================================================================== - // WELCOME - // ===================================================================== - - register(HelpTopic.of("welcome_what", "help.welcome.what_are_factions.title", List.of( - text(k("welcome", "what_are_factions", 1)), - text(k("welcome", "what_are_factions", 2)), - spacer(), - text(k("welcome", "what_are_factions", 3)), - text(k("welcome", "what_are_factions", 4)), - spacer(), - text(k("welcome", "what_are_factions", 5)), - text(k("welcome", "what_are_factions", 6)), - text(k("welcome", "what_are_factions", 7)) - ), HelpCategory.WELCOME)); - - register(HelpTopic.withCommands("welcome_started", "help.welcome.getting_started.title", List.of( - text(k("welcome", "getting_started", 1)), - spacer(), - command(k("welcome", "getting_started", 2)), - text(k("welcome", "getting_started", 3)), - text(k("welcome", "getting_started", 4)), - spacer(), - text(k("welcome", "getting_started", 5)), - text(k("welcome", "getting_started", 6)), - spacer(), - tip(k("welcome", "getting_started", 7)) - ), List.of("gui", "menu"), HelpCategory.WELCOME)); - - register(HelpTopic.of("welcome_tips", "help.welcome.quick_tips.title", List.of( - heading(k("welcome", "quick_tips", 1)), - command(k("welcome", "quick_tips", 2)), - text(k("welcome", "quick_tips", 3)), - spacer(), - heading(k("welcome", "quick_tips", 4)), - command(k("welcome", "quick_tips", 5)), - text(k("welcome", "quick_tips", 6)), - spacer(), - heading(k("welcome", "quick_tips", 7)), - command(k("welcome", "quick_tips", 8)), - text(k("welcome", "quick_tips", 9)), - spacer(), - tip(k("welcome", "quick_tips", 10)) - ), HelpCategory.WELCOME)); - - // ===================================================================== - // YOUR FACTION - // ===================================================================== - - register(HelpTopic.withCommands("faction_creating", "help.your_faction.creating.title", List.of( - text(k("your_faction", "creating", 1)), - text(k("your_faction", "creating", 2)), - spacer(), - command(k("your_faction", "creating", 3)), - text(k("your_faction", "creating", 4)), - spacer(), - tip(k("your_faction", "creating", 5)) - ), List.of("create"), HelpCategory.YOUR_FACTION)); - - register(HelpTopic.withCommands("faction_joining", "help.your_faction.joining.title", List.of( - text(k("your_faction", "joining", 1)), - spacer(), - heading(k("your_faction", "joining", 2)), - text(k("your_faction", "joining", 3)), - spacer(), - heading(k("your_faction", "joining", 4)), - text(k("your_faction", "joining", 5)), - spacer(), - heading(k("your_faction", "joining", 6)), - command(k("your_faction", "joining", 7)), - text(k("your_faction", "joining", 8)) - ), List.of("accept", "join", "request"), HelpCategory.YOUR_FACTION)); - - register(HelpTopic.of("faction_roles", "help.your_faction.roles.title", List.of( - text(k("your_faction", "roles", 1)), - spacer(), - heading(k("your_faction", "roles", 2)), - text(k("your_faction", "roles", 3)), - text(k("your_faction", "roles", 4)), - spacer(), - heading(k("your_faction", "roles", 5)), - text(k("your_faction", "roles", 6)), - spacer(), - heading(k("your_faction", "roles", 7)), - text(k("your_faction", "roles", 8)) - ), HelpCategory.YOUR_FACTION)); - - register(HelpTopic.withCommands("faction_managing", "help.your_faction.managing.title", List.of( - text(k("your_faction", "managing", 1)), - spacer(), - command(k("your_faction", "managing", 2)), - text(k("your_faction", "managing", 3)), - spacer(), - command(k("your_faction", "managing", 4)), - text(k("your_faction", "managing", 5)), - spacer(), - command(k("your_faction", "managing", 6)), - text(k("your_faction", "managing", 7)), - spacer(), - command(k("your_faction", "managing", 8)), - text(k("your_faction", "managing", 9)), - spacer(), - command(k("your_faction", "managing", 10)), - tip(k("your_faction", "managing", 11)) - ), List.of("invite", "kick", "promote", "demote", "transfer"), - HelpCategory.YOUR_FACTION)); - - // ===================================================================== - // POWER & LAND - // ===================================================================== - - register(HelpTopic.withCommands("power_understanding", "help.power_land.understanding_power.title", List.of( - text(k("power_land", "understanding_power", 1)), - text(k("power_land", "understanding_power", 2)), - spacer(), - command(k("power_land", "understanding_power", 3)), - text(k("power_land", "understanding_power", 4)), - spacer(), - text(k("power_land", "understanding_power", 5)), - tip(k("power_land", "understanding_power", 6)) - ), List.of("power"), HelpCategory.POWER_AND_LAND)); - - register(HelpTopic.withCommands("power_claiming", "help.power_land.claiming.title", List.of( - text(k("power_land", "claiming", 1)), - text(k("power_land", "claiming", 2)), - spacer(), - command(k("power_land", "claiming", 3)), - text(k("power_land", "claiming", 4)), - spacer(), - command(k("power_land", "claiming", 5)), - text(k("power_land", "claiming", 6)), - spacer(), - tip(k("power_land", "claiming", 7)) - ), List.of("claim", "unclaim"), HelpCategory.POWER_AND_LAND)); - - register(HelpTopic.withCommands("power_map", "help.power_land.territory_map.title", List.of( - text(k("power_land", "territory_map", 1)), - spacer(), - command(k("power_land", "territory_map", 2)), - text(k("power_land", "territory_map", 3)), - spacer(), - text(k("power_land", "territory_map", 4)), - text(k("power_land", "territory_map", 5)) - ), List.of("map"), HelpCategory.POWER_AND_LAND)); - - register(HelpTopic.withCommands("power_losing", "help.power_land.losing_territory.title", List.of( - text(k("power_land", "losing_territory", 1)), - text(k("power_land", "losing_territory", 2)), - spacer(), - command(k("power_land", "losing_territory", 3)), - text(k("power_land", "losing_territory", 4)), - spacer(), - text(k("power_land", "losing_territory", 5)), - text(k("power_land", "losing_territory", 6)) - ), List.of("overclaim"), HelpCategory.POWER_AND_LAND)); - - // ===================================================================== - // DIPLOMACY - // ===================================================================== - - register(HelpTopic.withCommands("diplomacy_relations", "help.diplomacy.relations.title", List.of( - text(k("diplomacy", "relations", 1)), - spacer(), - text(k("diplomacy", "relations", 2)), - text(k("diplomacy", "relations", 3)), - spacer(), - text(k("diplomacy", "relations", 4)), - text(k("diplomacy", "relations", 5)), - spacer(), - text(k("diplomacy", "relations", 6)), - spacer(), - command(k("diplomacy", "relations", 7)), - text(k("diplomacy", "relations", 8)) - ), List.of("relations"), HelpCategory.DIPLOMACY)); - - register(HelpTopic.withCommands("diplomacy_alliances", "help.diplomacy.alliances.title", List.of( - text(k("diplomacy", "alliances", 1)), - text(k("diplomacy", "alliances", 2)), - spacer(), - command(k("diplomacy", "alliances", 3)), - text(k("diplomacy", "alliances", 4)), - spacer(), - text(k("diplomacy", "alliances", 5)), - tip(k("diplomacy", "alliances", 6)) - ), List.of("ally"), HelpCategory.DIPLOMACY)); - - register(HelpTopic.withCommands("diplomacy_enemies", "help.diplomacy.enemies.title", List.of( - text(k("diplomacy", "enemies", 1)), - text(k("diplomacy", "enemies", 2)), - spacer(), - command(k("diplomacy", "enemies", 3)), - text(k("diplomacy", "enemies", 4)), - spacer(), - text(k("diplomacy", "enemies", 5)), - text(k("diplomacy", "enemies", 6)), - spacer(), - command(k("diplomacy", "enemies", 7)), - text(k("diplomacy", "enemies", 8)) - ), List.of("enemy", "neutral"), HelpCategory.DIPLOMACY)); - - // ===================================================================== - // COMBAT & SAFETY - // ===================================================================== - - register(HelpTopic.of("combat_tagging", "help.combat.tagging.title", List.of( - text(k("combat", "tagging", 1)), - text(k("combat", "tagging", 2)), - spacer(), - text(k("combat", "tagging", 3)), - text(k("combat", "tagging", 4)), - spacer(), - tip(k("combat", "tagging", 5)) - ), HelpCategory.COMBAT)); - - register(HelpTopic.of("combat_protection", "help.combat.protection.title", List.of( - text(k("combat", "protection", 1)), - spacer(), - heading(k("combat", "protection", 2)), - text(k("combat", "protection", 3)), - spacer(), - heading(k("combat", "protection", 4)), - text(k("combat", "protection", 5)), - spacer(), - heading(k("combat", "protection", 6)), - text(k("combat", "protection", 7)), - spacer(), - tip(k("combat", "protection", 8)) - ), HelpCategory.COMBAT)); - - register(HelpTopic.of("combat_zones", "help.combat.zones.title", List.of( - text(k("combat", "zones", 1)), - spacer(), - heading(k("combat", "zones", 2)), - text(k("combat", "zones", 3)), - spacer(), - heading(k("combat", "zones", 4)), - text(k("combat", "zones", 5)), - spacer(), - tip(k("combat", "zones", 6)) - ), HelpCategory.COMBAT)); - - register(HelpTopic.withCommands("combat_death", "help.combat.death.title", List.of( - text(k("combat", "death", 1)), - spacer(), - text(k("combat", "death", 2)), - text(k("combat", "death", 3)), - spacer(), - text(k("combat", "death", 4)), - text(k("combat", "death", 5)), - spacer(), - tip(k("combat", "death", 6)) - ), List.of("home", "sethome", "stuck"), HelpCategory.COMBAT)); - - // ===================================================================== - // ECONOMY - // ===================================================================== - - register(HelpTopic.withCommands("economy_treasury", "help.economy.treasury.title", List.of( - text(k("economy", "treasury", 1)), - text(k("economy", "treasury", 2)), - spacer(), - command(k("economy", "treasury", 3)), - text(k("economy", "treasury", 4)), - spacer(), - tip(k("economy", "treasury", 5)) - ), List.of("balance"), HelpCategory.ECONOMY)); - - register(HelpTopic.withCommands("economy_funds", "help.economy.funds.title", List.of( - text(k("economy", "funds", 1)), - spacer(), - command(k("economy", "funds", 2)), - text(k("economy", "funds", 3)), - spacer(), - command(k("economy", "funds", 4)), - text(k("economy", "funds", 5)), - spacer(), - command(k("economy", "funds", 6)), - text(k("economy", "funds", 7)), - spacer(), - tip(k("economy", "funds", 8)) - ), List.of("deposit", "withdraw"), HelpCategory.ECONOMY)); - - register(HelpTopic.of("economy_commands", "help.economy.commands.title", List.of( - text(k("economy", "commands", 1)), - spacer(), - command(k("economy", "commands", 2)), - text(k("economy", "commands", 3)), - spacer(), - command(k("economy", "commands", 4)), - text(k("economy", "commands", 5)), - spacer(), - command(k("economy", "commands", 6)), - text(k("economy", "commands", 7)), - spacer(), - command(k("economy", "commands", 8)), - text(k("economy", "commands", 9)), - spacer(), - command(k("economy", "commands", 10)), - text(k("economy", "commands", 11)) - ), HelpCategory.ECONOMY)); - - // ===================================================================== - // QUICK REFERENCE — All Commands - // ===================================================================== - - List cmdEntries = new ArrayList<>(); - String prefix = "help.quick_ref.all_commands.line."; - - // Core (lines 1-6) - cmdEntries.add(heading(prefix + "1")); - for (int i = 2; i <= 6; i++) { - cmdEntries.add(command(prefix + i)); - } - cmdEntries.add(spacer()); - - // Membership (lines 7-14) - cmdEntries.add(heading(prefix + "7")); - for (int i = 8; i <= 14; i++) { - cmdEntries.add(command(prefix + i)); - } - cmdEntries.add(spacer()); - - // Territory (lines 15-19) - cmdEntries.add(heading(prefix + "15")); - for (int i = 16; i <= 19; i++) { - cmdEntries.add(command(prefix + i)); - } - cmdEntries.add(spacer()); - - // Teleport (lines 20-24) - cmdEntries.add(heading(prefix + "20")); - for (int i = 21; i <= 24; i++) { - cmdEntries.add(command(prefix + i)); - } - cmdEntries.add(spacer()); - - // Information (lines 25-32) - cmdEntries.add(heading(prefix + "25")); - for (int i = 26; i <= 32; i++) { - cmdEntries.add(command(prefix + i)); - } - cmdEntries.add(spacer()); - - // Diplomacy (lines 33-36) - cmdEntries.add(heading(prefix + "33")); - for (int i = 34; i <= 36; i++) { - cmdEntries.add(command(prefix + i)); - } - cmdEntries.add(spacer()); - - // Settings (lines 37-43) - cmdEntries.add(heading(prefix + "37")); - for (int i = 38; i <= 43; i++) { - cmdEntries.add(command(prefix + i)); + /** + * Loads help content structure from the build-generated help-manifest.json. + */ + private void loadFromManifest() { + try (InputStream is = getClass().getClassLoader().getResourceAsStream("help-manifest.json")) { + if (is == null) { + Logger.warn("help-manifest.json not found in classpath — help system will be empty"); + return; + } + + Gson gson = new Gson(); + JsonObject manifest = gson.fromJson(new InputStreamReader(is, StandardCharsets.UTF_8), JsonObject.class); + + // Load topics + JsonArray topics = manifest.getAsJsonArray("topics"); + if (topics != null) { + for (JsonElement topicElement : topics) { + JsonObject topicObj = topicElement.getAsJsonObject(); + HelpTopic topic = parseTopic(topicObj); + if (topic != null) { + register(topic); + } + } + } + + // Load additional command mappings from manifest + JsonObject cmdMappings = manifest.getAsJsonObject("commandMappings"); + if (cmdMappings != null) { + for (Map.Entry entry : cmdMappings.entrySet()) { + String cmd = entry.getKey(); + String categoryId = entry.getValue().getAsString(); + HelpCategory category = HelpCategory.fromId(categoryId); + // Only add if not already mapped by a topic's commands + categoryByCommand.putIfAbsent(cmd.toLowerCase(), category); + } + } + + Logger.info("Loaded %d help topics from manifest", topicsById.size()); + } catch (Exception e) { + Logger.warn("Failed to load help manifest: %s", e.getMessage()); } - cmdEntries.add(spacer()); + } - // Economy (lines 44-49) - cmdEntries.add(heading(prefix + "44")); - for (int i = 45; i <= 49; i++) { - cmdEntries.add(command(prefix + i)); + /** + * Parses a single topic from the manifest JSON. + */ + @Nullable + private HelpTopic parseTopic(@NotNull JsonObject topicObj) { + String id = topicObj.get("id").getAsString(); + String categoryId = topicObj.get("category").getAsString(); + String titleKey = topicObj.get("titleKey").getAsString(); + + HelpCategory category = HelpCategory.fromId(categoryId); + + // Parse commands + List commands = new ArrayList<>(); + JsonArray cmds = topicObj.getAsJsonArray("commands"); + if (cmds != null) { + for (JsonElement cmd : cmds) { + commands.add(cmd.getAsString()); + } } - cmdEntries.add(spacer()); - // Chat (lines 50-54) - cmdEntries.add(heading(prefix + "50")); - for (int i = 51; i <= 54; i++) { - cmdEntries.add(command(prefix + i)); + // Parse entries + List entries = new ArrayList<>(); + JsonArray entriesArray = topicObj.getAsJsonArray("entries"); + if (entriesArray != null) { + for (JsonElement entryElement : entriesArray) { + JsonObject entryObj = entryElement.getAsJsonObject(); + String type = entryObj.get("type").getAsString(); + String key = entryObj.has("key") ? entryObj.get("key").getAsString() : ""; + + HelpEntry entry = switch (type) { + case "TEXT" -> HelpEntry.text(key); + case "COMMAND" -> HelpEntry.command(key); + case "TIP" -> HelpEntry.tip(key); + case "HEADING" -> HelpEntry.heading(key); + case "SPACER" -> HelpEntry.spacer(); + default -> null; + }; + if (entry != null) { + entries.add(entry); + } + } } - cmdEntries.add(spacer()); - // Admin (lines 55-66) - cmdEntries.add(heading(prefix + "55")); - for (int i = 56; i <= 66; i++) { - cmdEntries.add(command(prefix + i)); + if (commands.isEmpty()) { + return HelpTopic.of(id, titleKey, entries, category); } + return HelpTopic.withCommands(id, titleKey, entries, commands, category); + } - register(HelpTopic.of("quickref_commands", "help.quick_ref.all_commands.title", - cmdEntries, HelpCategory.QUICK_REFERENCE)); - - // ===================================================================== - // Additional command → category mappings for deep-linking - // ===================================================================== - + /** + * Registers additional command → category mappings that aren't tied to specific topics. + * These provide general navigation from any command to its relevant help category. + */ + private void registerAdditionalCommandMappings() { registerCommandMapping("help", HelpCategory.WELCOME); registerCommandMapping("info", HelpCategory.YOUR_FACTION); diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang new file mode 100644 index 00000000..b36330b1 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -0,0 +1,12 @@ +# HyperFactions GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule + +# ========== Help Category Names ========== +help.category.welcome = Welcome +help.category.your_faction = Your Faction +help.category.power_land = Power & Land +help.category.diplomacy = Diplomacy +help.category.combat = Combat & Safety +help.category.economy = Economy +help.category.quick_ref = Quick Reference From 9ea102a6220601190902561ef651a621697703c1 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 14:47:09 -0700 Subject: [PATCH 09/55] chore: exclude build package from gitignore pattern --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7d74e39a..af0c00dc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .gradle/ build/ !gradle/wrapper/gradle-wrapper.jar +!src/main/java/com/hyperfactions/build/ # IDE .idea/ From 5ad45e01fc106ff4d7b446a8951229285fd1e568 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 15:11:34 -0700 Subject: [PATCH 10/55] feat: localize nav system, shared pages, and modal pages (Phase 3a) Migrate navigation infrastructure to resolve display names via i18n keys instead of hardcoded English strings. NavBarUtil.buildButtons() now accepts PlayerRef and resolves keys through HFMessages. All page registry entries in GuiManager updated to use MessageKeys constants. Shared pages migrated: MainMenuPage (section titles), FactionInfoPage (status labels, descriptions), RenameModalPage, DescriptionModalPage, TagModalPage (all validation/success messages). New files: hyperfactions_admin.lang (admin nav keys). --- .../com/hyperfactions/gui/GuiManager.java | 63 +++++++------- .../gui/admin/AdminNavBarHelper.java | 2 +- .../gui/faction/NavBarHelper.java | 2 +- .../gui/newplayer/NewPlayerNavBarHelper.java | 2 +- .../hyperfactions/gui/shared/NavBarUtil.java | 9 +- .../gui/shared/page/DescriptionModalPage.java | 26 ++++-- .../gui/shared/page/FactionInfoPage.java | 27 +++--- .../gui/shared/page/MainMenuPage.java | 18 ++-- .../gui/shared/page/RenameModalPage.java | 27 +++--- .../gui/shared/page/TagModalPage.java | 34 ++++---- .../com/hyperfactions/util/MessageKeys.java | 82 +++++++++++++++++++ .../Server/Languages/en-US/hyperfactions.lang | 1 + .../Languages/en-US/hyperfactions_admin.lang | 17 ++++ .../Languages/en-US/hyperfactions_gui.lang | 58 +++++++++++++ 14 files changed, 278 insertions(+), 90 deletions(-) create mode 100644 src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang diff --git a/src/main/java/com/hyperfactions/gui/GuiManager.java b/src/main/java/com/hyperfactions/gui/GuiManager.java index ae641b07..dfb48b71 100644 --- a/src/main/java/com/hyperfactions/gui/GuiManager.java +++ b/src/main/java/com/hyperfactions/gui/GuiManager.java @@ -18,6 +18,7 @@ import com.hyperfactions.gui.shared.page.*; import com.hyperfactions.manager.*; import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.server.core.entity.entities.Player; @@ -109,7 +110,7 @@ private void registerPages() { // If player has faction, show enhanced dashboard; otherwise show main page registry.registerEntry(new Entry( "dashboard", - "Dashboard", + MessageKeys.Nav.DASHBOARD, null, // No permission required (player, ref, store, playerRef, faction, guiManager) -> { if (faction != null) { @@ -127,7 +128,7 @@ private void registerPages() { // Chat page (faction/ally chat history with send-from-GUI) registry.registerEntry(new Entry( "chat", - "Chat", + MessageKeys.Nav.CHAT, Permissions.CHAT_FACTION, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -148,7 +149,7 @@ private void registerPages() { // Members page registry.registerEntry(new Entry( "members", - "Members", + MessageKeys.Nav.MEMBERS, Permissions.MEMBERS, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -164,7 +165,7 @@ private void registerPages() { // Invites page (officers+ only) - shows outgoing invites and incoming join requests registry.registerEntry(new Entry( "invites", - "Invites", + MessageKeys.Nav.INVITES, Permissions.INVITE, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -182,7 +183,7 @@ private void registerPages() { // Browser page registry.registerEntry(new Entry( "browser", - "Browse", + MessageKeys.Nav.BROWSER, null, (player, ref, store, playerRef, faction, guiManager) -> new FactionBrowserPage(playerRef, factionManager.get(), powerManager.get(), guiManager), @@ -194,7 +195,7 @@ private void registerPages() { // Map page registry.registerEntry(new Entry( "map", - "Map", + MessageKeys.Nav.MAP, Permissions.MAP, (player, ref, store, playerRef, faction, guiManager) -> new ChunkMapPage(playerRef, factionManager.get(), claimManager.get(), @@ -207,7 +208,7 @@ private void registerPages() { // Leaderboard page registry.registerEntry(new Entry( "leaderboard", - "Leaderboard", + MessageKeys.Nav.LEADERBOARD, null, (player, ref, store, playerRef, faction, guiManager) -> { EconomyManager econ = plugin.get().isTreasuryEnabled() ? plugin.get().getEconomyManager() : null; @@ -221,7 +222,7 @@ private void registerPages() { // Relations page registry.registerEntry(new Entry( "relations", - "Relations", + MessageKeys.Nav.RELATIONS, Permissions.RELATIONS, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -239,7 +240,7 @@ private void registerPages() { if (plugin.get().isTreasuryEnabled()) { registry.registerEntry(new Entry( "treasury", - "Treasury", + MessageKeys.Nav.TREASURY, Permissions.ECONOMY_BALANCE, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -260,7 +261,7 @@ private void registerPages() { // Settings page (officers+) - unified two-column layout registry.registerEntry(new Entry( "settings", - "Settings", + MessageKeys.Nav.SETTINGS, null, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -276,7 +277,7 @@ private void registerPages() { // Logs page (faction activity log) registry.registerEntry(new Entry( "logs", - "Logs", + MessageKeys.Nav.LOGS, Permissions.LOGS, (player, ref, store, playerRef, faction, guiManager) -> { if (faction == null) { @@ -292,7 +293,7 @@ private void registerPages() { // Help page (available to all players in faction nav bar) registry.registerEntry(new Entry( "help", - "Help", + MessageKeys.Nav.HELP, null, (player, ref, store, playerRef, faction, guiManager) -> new HelpMainPage(playerRef, guiManager, factionManager.get()), @@ -304,7 +305,7 @@ private void registerPages() { // Admin page (requires permission) - accessed via /f admin, not in main nav bar registry.registerEntry(new Entry( "admin", - "Admin", + MessageKeys.Nav.ADMIN, Permissions.ADMIN, (player, ref, store, playerRef, faction, guiManager) -> new AdminMainPage(playerRef, factionManager.get(), powerManager.get(), guiManager), @@ -328,7 +329,7 @@ private void registerNewPlayerPages() { // Browse Factions (default landing page) registry.registerEntry(new NewPlayerPageRegistry.Entry( "browse", - "Browse", + MessageKeys.Nav.BROWSER, null, (player, ref, store, playerRef, guiManager) -> new NewPlayerBrowsePage(playerRef, factionManager.get(), powerManager.get(), @@ -340,7 +341,7 @@ private void registerNewPlayerPages() { // Create Faction (permission checked on actual create action, not nav visibility) registry.registerEntry(new NewPlayerPageRegistry.Entry( "create", - "Create", + MessageKeys.Nav.CREATE, null, (player, ref, store, playerRef, guiManager) -> new CreateFactionPage(playerRef, factionManager.get(), guiManager), @@ -351,7 +352,7 @@ private void registerNewPlayerPages() { // My Invites registry.registerEntry(new NewPlayerPageRegistry.Entry( "invites", - "Invites", + MessageKeys.Nav.INVITES, null, (player, ref, store, playerRef, guiManager) -> new InvitesPage(playerRef, factionManager.get(), powerManager.get(), @@ -363,7 +364,7 @@ private void registerNewPlayerPages() { // Territory Map (read-only for new players, always accessible) registry.registerEntry(new NewPlayerPageRegistry.Entry( "map", - "Map", + MessageKeys.Nav.MAP, null, (player, ref, store, playerRef, guiManager) -> new NewPlayerMapPage(playerRef, factionManager.get(), claimManager.get(), @@ -375,7 +376,7 @@ private void registerNewPlayerPages() { // Leaderboard (accessible to all players) registry.registerEntry(new NewPlayerPageRegistry.Entry( "leaderboard", - "Leaderboard", + MessageKeys.Nav.LEADERBOARD, null, (player, ref, store, playerRef, guiManager) -> { EconomyManager econ = plugin.get().isTreasuryEnabled() ? plugin.get().getEconomyManager() : null; @@ -388,7 +389,7 @@ private void registerNewPlayerPages() { // Help Page registry.registerEntry(new NewPlayerPageRegistry.Entry( "help", - "Help", + MessageKeys.Nav.HELP, null, (player, ref, store, playerRef, guiManager) -> new HelpMainPage(playerRef, guiManager, factionManager.get()), @@ -411,7 +412,7 @@ private void registerAdminPages() { // Dashboard (server-wide stats overview) registry.registerEntry(new AdminPageRegistry.Entry( "dashboard", - "Dashboard", + MessageKeys.AdminNav.DASHBOARD, null, (player, ref, store, playerRef, guiManager) -> new AdminDashboardPage(playerRef, plugin.get(), factionManager.get(), powerManager.get(), @@ -423,7 +424,7 @@ private void registerAdminPages() { // Actions page (server-wide quick actions) registry.registerEntry(new AdminPageRegistry.Entry( "actions", - "Actions", + MessageKeys.AdminNav.ACTIONS, null, (player, ref, store, playerRef, guiManager) -> new AdminActionsPage(playerRef, plugin.get().getPlayerStorage(), guiManager, plugin.get()), @@ -434,7 +435,7 @@ private void registerAdminPages() { // Factions page (faction management with expanding rows) registry.registerEntry(new AdminPageRegistry.Entry( "factions", - "Factions", + MessageKeys.AdminNav.FACTIONS, null, (player, ref, store, playerRef, guiManager) -> new AdminFactionsPage(playerRef, factionManager.get(), powerManager.get(), guiManager), @@ -445,7 +446,7 @@ private void registerAdminPages() { // Players page (server-wide player management) registry.registerEntry(new AdminPageRegistry.Entry( "players", - "Players", + MessageKeys.AdminNav.PLAYERS, Permissions.ADMIN_POWER, (player, ref, store, playerRef, guiManager) -> new AdminPlayersPage(playerRef, factionManager.get(), powerManager.get(), @@ -458,7 +459,7 @@ private void registerAdminPages() { if (plugin.get().isTreasuryEnabled()) { registry.registerEntry(new AdminPageRegistry.Entry( "economy", - "Economy", + MessageKeys.AdminNav.ECONOMY, Permissions.ADMIN_ECONOMY, (player, ref, store, playerRef, guiManager) -> new AdminEconomyPage(playerRef, factionManager.get(), @@ -471,7 +472,7 @@ private void registerAdminPages() { // Zones page registry.registerEntry(new AdminPageRegistry.Entry( "zones", - "Zones", + MessageKeys.AdminNav.ZONES, null, (player, ref, store, playerRef, guiManager) -> new AdminZonePage(playerRef, zoneManager.get(), guiManager, "all", 0), @@ -482,7 +483,7 @@ private void registerAdminPages() { // Config page (placeholder) registry.registerEntry(new AdminPageRegistry.Entry( "config", - "Config", + MessageKeys.AdminNav.CONFIG, null, (player, ref, store, playerRef, guiManager) -> new AdminConfigPage(playerRef, guiManager), @@ -493,7 +494,7 @@ private void registerAdminPages() { // Backups page (placeholder) registry.registerEntry(new AdminPageRegistry.Entry( "backups", - "Backups", + MessageKeys.AdminNav.BACKUPS, null, (player, ref, store, playerRef, guiManager) -> new AdminBackupsPage(playerRef, guiManager), @@ -504,7 +505,7 @@ private void registerAdminPages() { // Activity Log page (global log aggregation) registry.registerEntry(new AdminPageRegistry.Entry( "log", - "Log", + MessageKeys.AdminNav.LOG, null, (player, ref, store, playerRef, guiManager) -> new AdminActivityLogPage(playerRef, factionManager.get(), guiManager), @@ -515,7 +516,7 @@ private void registerAdminPages() { // Updates page (placeholder) registry.registerEntry(new AdminPageRegistry.Entry( "updates", - "Updates", + MessageKeys.AdminNav.UPDATES, null, (player, ref, store, playerRef, guiManager) -> new AdminUpdatesPage(playerRef, guiManager), @@ -526,7 +527,7 @@ private void registerAdminPages() { // Help page (placeholder) registry.registerEntry(new AdminPageRegistry.Entry( "help", - "Help", + MessageKeys.AdminNav.HELP, null, (player, ref, store, playerRef, guiManager) -> new AdminHelpPage(playerRef, guiManager), @@ -537,7 +538,7 @@ private void registerAdminPages() { // Version page (mod versions and integration status) registry.registerEntry(new AdminPageRegistry.Entry( "version", - "Version", + MessageKeys.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 2e12a454..0f208b11 100644 --- a/src/main/java/com/hyperfactions/gui/admin/AdminNavBarHelper.java +++ b/src/main/java/com/hyperfactions/gui/admin/AdminNavBarHelper.java @@ -54,7 +54,7 @@ public static void setupBar( // Create admin nav cards container and build buttons using shared utility cmd.appendInline("#HyperFactionsAdminNavBar #AdminNavBarButtons", "Group #AdminNavCards { LayoutMode: Left; }"); NavBarUtil.buildButtons(entries, "#AdminNavCards", UIPaths.ADMIN_NAV_BUTTON, "#AdminNavActionButton", - "AdminNav", "AdminNavBar", cmd, events); + "AdminNav", "AdminNavBar", playerRef, cmd, events); } /** diff --git a/src/main/java/com/hyperfactions/gui/faction/NavBarHelper.java b/src/main/java/com/hyperfactions/gui/faction/NavBarHelper.java index da7165a3..34e09ec0 100644 --- a/src/main/java/com/hyperfactions/gui/faction/NavBarHelper.java +++ b/src/main/java/com/hyperfactions/gui/faction/NavBarHelper.java @@ -60,7 +60,7 @@ public static void setupBar( // Create nav cards container and build buttons using shared utility cmd.appendInline("#HyperFactionsNavBar #NavBarButtons", "Group #NavCards { LayoutMode: Left; }"); NavBarUtil.buildButtons(entries, "#NavCards", UIPaths.NAV_BUTTON, "#NavActionButton", - "Nav", "NavBar", cmd, events); + "Nav", "NavBar", playerRef, cmd, events); } /** diff --git a/src/main/java/com/hyperfactions/gui/newplayer/NewPlayerNavBarHelper.java b/src/main/java/com/hyperfactions/gui/newplayer/NewPlayerNavBarHelper.java index 1a2d9533..c1ee40f0 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/NewPlayerNavBarHelper.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/NewPlayerNavBarHelper.java @@ -56,7 +56,7 @@ public static void setupBar( // Create nav cards container and build buttons using shared utility cmd.appendInline("#HyperFactionsNavBar #NavBarButtons", "Group #NavCards { LayoutMode: Left; }"); NavBarUtil.buildButtons(entries, "#NavCards", UIPaths.NAV_BUTTON, "#NavActionButton", - "Nav", "NavBar", cmd, events); + "Nav", "NavBar", playerRef, cmd, events); } /** diff --git a/src/main/java/com/hyperfactions/gui/shared/NavBarUtil.java b/src/main/java/com/hyperfactions/gui/shared/NavBarUtil.java index 8bf44a82..ca3ee688 100644 --- a/src/main/java/com/hyperfactions/gui/shared/NavBarUtil.java +++ b/src/main/java/com/hyperfactions/gui/shared/NavBarUtil.java @@ -1,10 +1,12 @@ package com.hyperfactions.gui.shared; import com.hyperfactions.integration.PermissionManager; +import com.hyperfactions.util.HFMessages; import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; import com.hypixel.hytale.server.core.ui.builder.EventData; import com.hypixel.hytale.server.core.ui.builder.UICommandBuilder; import com.hypixel.hytale.server.core.ui.builder.UIEventBuilder; +import com.hypixel.hytale.server.core.universe.PlayerRef; import java.util.List; import java.util.UUID; import org.jetbrains.annotations.NotNull; @@ -20,6 +22,8 @@ private NavBarUtil() {} /** * Builds navigation buttons inside a cards container. + * The entry's {@code displayName()} is treated as an i18n key and resolved + * via {@link HFMessages} for the given player. * * @param entries The nav entries to render * @param cardsId The cards container selector (e.g., "#NavCards") @@ -27,6 +31,7 @@ private NavBarUtil() {} * @param buttonId The button element ID within the template (e.g., "#NavActionButton") * @param eventType The event type value (e.g., "Nav" or "AdminNav") * @param eventKey The event data key (e.g., "NavBar" or "AdminNavBar") + * @param playerRef The player viewing the page (for i18n resolution) * @param cmd The UI command builder * @param events The UI event builder */ @@ -37,13 +42,15 @@ public static void buildButtons( @NotNull String buttonId, @NotNull String eventType, @NotNull String eventKey, + @NotNull PlayerRef playerRef, @NotNull UICommandBuilder cmd, @NotNull UIEventBuilder events ) { int index = 0; for (NavEntry entry : entries) { cmd.append(cardsId, templatePath); - cmd.set(cardsId + "[" + index + "] " + buttonId + ".Text", entry.displayName()); + cmd.set(cardsId + "[" + index + "] " + buttonId + ".Text", + HFMessages.get(playerRef, entry.displayName())); events.addEventBinding( CustomUIEventBindingType.Activating, cardsId + "[" + index + "] " + buttonId, 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 faeef87c..26ecd383 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/DescriptionModalPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/DescriptionModalPage.java @@ -7,6 +7,8 @@ import com.hyperfactions.gui.UIPaths; 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.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -73,7 +75,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Show current description String currentDesc = faction.description(); if (currentDesc == null || currentDesc.isEmpty()) { - cmd.set("#CurrentDesc.Text", "(None)"); + cmd.set("#CurrentDesc.Text", HFMessages.get(playerRef, MessageKeys.DescGui.DISPLAY_NONE)); } else { // Truncate display if too long String display = currentDesc.length() > 100 @@ -125,7 +127,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.errorText("You don't have permission to edit the description.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.DescGui.NO_PERMISSION)); guiManager.openFactionSettings(player, ref, store, playerRef, factionManager.getFaction(faction.id())); return; @@ -146,8 +148,11 @@ public void handleDataEvent(Ref ref, Store store, Faction updatedFaction = faction.withDescription(null); factionManager.updateFaction(updatedFaction); - String prefix = adminMode ? "[Admin] " : ""; - player.sendMessage(Message.raw(prefix + "Faction description cleared.").color("#AAAAAA")); + String msg = HFMessages.get(playerRef, MessageKeys.DescGui.CLEARED); + if (adminMode) { + msg = HFMessages.get(playerRef, MessageKeys.Common.ADMIN_PREFIX) + " " + msg; + } + player.sendMessage(Message.raw(msg).color("#AAAAAA")); if (adminMode) { guiManager.openAdminFactionSettings(player, ref, store, playerRef, faction.id()); @@ -159,13 +164,16 @@ public void handleDataEvent(Ref ref, Store store, case "Save" -> { String newDesc = data.description; - String prefix = adminMode ? "[Admin] " : ""; // Empty is allowed (clears description) if (newDesc == null || newDesc.trim().isEmpty()) { Faction updatedFaction = faction.withDescription(null); factionManager.updateFaction(updatedFaction); - player.sendMessage(Message.raw(prefix + "Faction description cleared.").color("#AAAAAA")); + String clearMsg = HFMessages.get(playerRef, MessageKeys.DescGui.CLEARED); + if (adminMode) { + clearMsg = HFMessages.get(playerRef, MessageKeys.Common.ADMIN_PREFIX) + " " + clearMsg; + } + player.sendMessage(Message.raw(clearMsg).color("#AAAAAA")); } else { newDesc = newDesc.trim(); @@ -176,7 +184,11 @@ public void handleDataEvent(Ref ref, Store store, Faction updatedFaction = faction.withDescription(newDesc); factionManager.updateFaction(updatedFaction); - player.sendMessage(Message.raw(prefix + "Faction description updated!").color("#55FF55")); + String updateMsg = HFMessages.get(playerRef, MessageKeys.DescGui.UPDATED); + if (adminMode) { + updateMsg = HFMessages.get(playerRef, MessageKeys.Common.ADMIN_PREFIX) + " " + updateMsg; + } + player.sendMessage(Message.raw(updateMsg).color("#55FF55")); } if (adminMode) { 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 40b25576..bb7b72d7 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/FactionInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/FactionInfoPage.java @@ -11,6 +11,8 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.manager.PowerManager; import com.hyperfactions.manager.RelationManager; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.TimeUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -150,10 +152,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Description String description = targetFaction.description(); cmd.set("#FactionDescription.Text", - description != null && !description.isEmpty() ? description : "No description set."); + description != null && !description.isEmpty() ? description + : HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.NO_DESCRIPTION)); // Open/Closed status indicator - cmd.set("#StatusIndicator.Text", targetFaction.open() ? "Open" : "Invite Only"); + cmd.set("#StatusIndicator.Text", targetFaction.open() + ? HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) + : HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)); // Note: Cannot dynamically set text color via cmd.set() // === Stats Section === @@ -171,7 +176,9 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.set("#MembersValue.Text", String.format("%d / %d", memberCount, maxMembers)); // Recruitment status - cmd.set("#RecruitmentValue.Text", targetFaction.open() ? "Open" : "Invite Only"); + cmd.set("#RecruitmentValue.Text", targetFaction.open() + ? HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) + : HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)); // Note: Cannot dynamically set text color via cmd.set() // Founded date @@ -185,11 +192,9 @@ public void build(Ref ref, UICommandBuilder cmd, // Raidable status if (powerStats.isRaidable()) { - cmd.set("#RaidableValue.Text", "Raidable"); - // Note: Cannot dynamically set text color via cmd.set() + cmd.set("#RaidableValue.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_RAIDABLE)); } else { - cmd.set("#RaidableValue.Text", "Protected"); - // Note: Cannot dynamically set text color via cmd.set() + cmd.set("#RaidableValue.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.STATUS_PROTECTED)); } // Treasury balance (visible when economy enabled) @@ -202,21 +207,23 @@ public void build(Ref ref, UICommandBuilder cmd, // === Leadership Section === // Leader FactionMember leader = targetFaction.getLeader(); - cmd.set("#LeaderName.Text", leader != null ? leader.username() : "Unknown"); + cmd.set("#LeaderName.Text", leader != null ? leader.username() + : HFMessages.get(viewerRef, MessageKeys.Common.UNKNOWN)); // Officers List officers = targetFaction.getMembersSorted().stream() .filter(m -> m.role() == FactionRole.OFFICER) .toList(); if (officers.isEmpty()) { - cmd.set("#OfficersValue.Text", "None"); + cmd.set("#OfficersValue.Text", HFMessages.get(viewerRef, MessageKeys.Common.NONE)); } else { String officerNames = officers.stream() .map(FactionMember::username) .limit(3) // Show max 3 names .collect(Collectors.joining(", ")); if (officers.size() > 3) { - officerNames += " +" + (officers.size() - 3) + " more"; + officerNames += " " + HFMessages.get(viewerRef, MessageKeys.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 8084d3ba..61f7bbeb 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/MainMenuPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/MainMenuPage.java @@ -6,6 +6,8 @@ import com.hyperfactions.gui.shared.data.MainMenuData; import com.hyperfactions.integration.PermissionManager; import com.hyperfactions.manager.FactionManager; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -59,7 +61,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Section: My Faction if (faction != null) { cmd.append("#MyFactionSection", UIPaths.MENU_SECTION); - cmd.set("#MyFactionSection #SectionTitle.Text", "My Faction"); + cmd.set("#MyFactionSection #SectionTitle.Text", HFMessages.get(playerRef, MessageKeys.MainMenu.SECTION_MY_FACTION)); cmd.append("#MyFactionSection #SectionContent", UIPaths.MAIN_MENU_FACTION); cmd.set("#MyFactionSection #FactionNameLabel.Text", faction.name()); @@ -85,7 +87,7 @@ public void build(Ref ref, UICommandBuilder cmd, ); } else { cmd.append("#MyFactionSection", UIPaths.MENU_SECTION); - cmd.set("#MyFactionSection #SectionTitle.Text", "Get Started"); + cmd.set("#MyFactionSection #SectionTitle.Text", HFMessages.get(playerRef, MessageKeys.MainMenu.SECTION_GET_STARTED)); cmd.append("#MyFactionSection #SectionContent", UIPaths.MAIN_MENU_NO_FACTION); events.addEventBinding( @@ -98,7 +100,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Section: Territory cmd.append("#TerritorySection", UIPaths.MENU_SECTION); - cmd.set("#TerritorySection #SectionTitle.Text", "Territory"); + cmd.set("#TerritorySection #SectionTitle.Text", HFMessages.get(playerRef, MessageKeys.MainMenu.SECTION_TERRITORY)); cmd.append("#TerritorySection #SectionContent", UIPaths.MAIN_MENU_TERRITORY); events.addEventBinding( @@ -119,7 +121,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Section: Browse cmd.append("#BrowseSection", UIPaths.MENU_SECTION); - cmd.set("#BrowseSection #SectionTitle.Text", "Browse"); + cmd.set("#BrowseSection #SectionTitle.Text", HFMessages.get(playerRef, MessageKeys.MainMenu.SECTION_BROWSE)); cmd.append("#BrowseSection #SectionContent", UIPaths.MAIN_MENU_BROWSE); events.addEventBinding( @@ -132,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", "Admin"); + cmd.set("#AdminSection #SectionTitle.Text", HFMessages.get(playerRef, MessageKeys.MainMenu.SECTION_ADMIN)); cmd.append("#AdminSection #SectionContent", UIPaths.MAIN_MENU_ADMIN); events.addEventBinding( @@ -194,10 +196,8 @@ public void handleDataEvent(Ref ref, Store store, if (faction != null) { guiManager.closePage(player, ref, store); player.sendMessage( - com.hypixel.hytale.server.core.Message.raw("Use ") - .color("#AAAAAA") - .insert(com.hypixel.hytale.server.core.Message.raw("/f claim").color("#55FF55")) - .insert(com.hypixel.hytale.server.core.Message.raw(" to claim territory.").color("#AAAAAA")) + com.hypixel.hytale.server.core.Message.raw( + HFMessages.get(playerRef, MessageKeys.MainMenu.CLAIM_HINT)).color("#AAAAAA") ); } } 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 a2f496b3..efd40df2 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/RenameModalPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/RenameModalPage.java @@ -7,6 +7,8 @@ import com.hyperfactions.gui.UIPaths; 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.MessageUtil; import com.hyperfactions.worldmap.WorldMapService; import com.hypixel.hytale.component.Ref; @@ -118,7 +120,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.errorText("You don't have permission to rename the faction.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RenameGui.NO_PERMISSION)); guiManager.openFactionSettings(player, ref, store, playerRef, factionManager.getFaction(faction.id())); return; @@ -139,7 +141,7 @@ public void handleDataEvent(Ref ref, Store store, // Validation if (newName == null || newName.trim().isEmpty()) { - player.sendMessage(MessageUtil.errorText("Please enter a faction name.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RenameGui.ENTER_NAME)); sendUpdate(); return; } @@ -147,20 +149,20 @@ public void handleDataEvent(Ref ref, Store store, newName = newName.trim(); if (newName.length() < MIN_NAME_LENGTH) { - player.sendMessage(MessageUtil.errorText("Faction name must be at least " + MIN_NAME_LENGTH + " characters.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RenameGui.TOO_SHORT, MIN_NAME_LENGTH)); sendUpdate(); return; } if (newName.length() > MAX_NAME_LENGTH) { - player.sendMessage(MessageUtil.errorText("Faction name cannot exceed " + MAX_NAME_LENGTH + " characters.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RenameGui.TOO_LONG, MAX_NAME_LENGTH)); sendUpdate(); return; } // Check if name is the same if (newName.equalsIgnoreCase(faction.name())) { - player.sendMessage(MessageUtil.text("That's already your faction's name.", MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.info(playerRef, MessageKeys.RenameGui.SAME_NAME, "#FFD700")); sendUpdate(); return; } @@ -168,7 +170,7 @@ public void handleDataEvent(Ref ref, Store store, // Check uniqueness Faction existing = factionManager.getFactionByName(newName); if (existing != null) { - player.sendMessage(MessageUtil.errorText("A faction with that name already exists.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RenameGui.NAME_TAKEN)); sendUpdate(); return; } @@ -183,14 +185,11 @@ public void handleDataEvent(Ref ref, Store store, worldMapService.triggerFactionWideRefresh(faction.id()); } - String prefix = adminMode ? "[Admin] " : ""; - player.sendMessage( - Message.raw(prefix + "Faction renamed from ").color("#AAAAAA") - .insert(Message.raw(oldName).color("#888888")) - .insert(Message.raw(" to ").color("#AAAAAA")) - .insert(Message.raw(newName).color("#00FFFF")) - .insert(Message.raw("!").color("#AAAAAA")) - ); + String msg = HFMessages.get(playerRef, MessageKeys.RenameGui.SUCCESS, oldName, newName); + if (adminMode) { + msg = HFMessages.get(playerRef, MessageKeys.Common.ADMIN_PREFIX) + " " + msg; + } + player.sendMessage(Message.raw(msg).color("#55FF55")); if (adminMode) { guiManager.openAdminFactionSettings(player, ref, store, playerRef, faction.id()); 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 1369ae3d..18d6083e 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/TagModalPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/TagModalPage.java @@ -7,6 +7,8 @@ import com.hyperfactions.gui.UIPaths; 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.MessageUtil; import com.hyperfactions.worldmap.WorldMapService; import com.hypixel.hytale.component.Ref; @@ -86,7 +88,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Show current tag String currentTag = faction.tag(); if (currentTag == null || currentTag.isEmpty()) { - cmd.set("#CurrentTag.Text", "(None)"); + cmd.set("#CurrentTag.Text", HFMessages.get(playerRef, MessageKeys.TagGui.DISPLAY_NONE)); } else { cmd.set("#CurrentTag.Text", "[" + currentTag.toUpperCase() + "]"); } @@ -126,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.errorText("You don't have permission to edit the tag.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.TagGui.NO_PERMISSION)); guiManager.openFactionSettings(player, ref, store, playerRef, factionManager.getFaction(faction.id())); return; @@ -155,8 +157,11 @@ public void handleDataEvent(Ref ref, Store store, worldMapService.triggerFactionWideRefresh(faction.id()); } - String prefix = adminMode ? "[Admin] " : ""; - player.sendMessage(Message.raw(prefix + "Faction tag cleared.").color("#AAAAAA")); + String clearMsg = HFMessages.get(playerRef, MessageKeys.TagGui.CLEARED); + if (adminMode) { + clearMsg = HFMessages.get(playerRef, MessageKeys.Common.ADMIN_PREFIX) + " " + clearMsg; + } + player.sendMessage(Message.raw(clearMsg).color("#AAAAAA")); if (adminMode) { guiManager.openAdminFactionSettings(player, ref, store, playerRef, faction.id()); } else { @@ -170,27 +175,27 @@ public void handleDataEvent(Ref ref, Store store, // Validate length if (newTag.length() < MIN_TAG_LENGTH) { - player.sendMessage(MessageUtil.errorText("Tag must be at least " + MIN_TAG_LENGTH + " character.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.TagGui.TOO_SHORT, MIN_TAG_LENGTH)); sendUpdate(); return; } if (newTag.length() > MAX_TAG_LENGTH) { - player.sendMessage(MessageUtil.errorText("Tag cannot exceed " + MAX_TAG_LENGTH + " characters.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.TagGui.TOO_LONG, MAX_TAG_LENGTH)); sendUpdate(); return; } // Validate format (alphanumeric only) if (!TAG_PATTERN.matcher(newTag).matches()) { - player.sendMessage(MessageUtil.errorText("Tag can only contain letters and numbers.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.TagGui.INVALID_FORMAT)); sendUpdate(); return; } // Check if same as current if (newTag.equalsIgnoreCase(faction.tag())) { - player.sendMessage(MessageUtil.text("That's already your faction's tag.", MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.info(playerRef, MessageKeys.TagGui.SAME_TAG, "#FFD700")); sendUpdate(); return; } @@ -198,7 +203,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.errorText("A faction with that tag already exists.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.TagGui.TAG_TAKEN)); sendUpdate(); return; } @@ -212,12 +217,11 @@ public void handleDataEvent(Ref ref, Store store, worldMapService.triggerFactionWideRefresh(faction.id()); } - String prefix = adminMode ? "[Admin] " : ""; - player.sendMessage( - Message.raw(prefix + "Faction tag set to ").color("#AAAAAA") - .insert(Message.raw("[" + newTag + "]").color("#FFAA00")) - .insert(Message.raw("!").color("#AAAAAA")) - ); + String successMsg = HFMessages.get(playerRef, MessageKeys.TagGui.SUCCESS, newTag); + if (adminMode) { + successMsg = HFMessages.get(playerRef, MessageKeys.Common.ADMIN_PREFIX) + " " + successMsg; + } + player.sendMessage(Message.raw(successMsg).color("#55FF55")); if (adminMode) { guiManager.openAdminFactionSettings(player, ref, store, playerRef, faction.id()); diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 4e4adb21..54b293fc 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -51,6 +51,7 @@ public static final class Common { 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"; private Common() {} } @@ -650,10 +651,91 @@ public static final class Nav { 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"; 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 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 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"; + + private FactionInfoGui() {} + } + + /** Rename modal page messages. */ + public static final class RenameGui { + 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 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 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. */ public static final class Dashboard { public static final String POWER_LABEL = "hyperfactions_gui.dashboard.power_label"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions.lang b/src/main/resources/Server/Languages/en-US/hyperfactions.lang index 27938a19..16b07b96 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions.lang @@ -29,6 +29,7 @@ common.page = Page {0} of {1} common.unknown = Unknown common.error_generic = Something went wrong. Please try again. common.gui_fallback = Could not access GUI. Use /f help for commands. +common.admin_prefix = [Admin] # ========== Commands - Create ========== cmd.create.no_permission = You don't have permission to create factions. diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang new file mode 100644 index 00000000..1aabe581 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang @@ -0,0 +1,17 @@ +# HyperFactions Admin GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule + +# ========== Admin Navigation Bar ========== +nav.dashboard = Dashboard +nav.actions = Actions +nav.factions = Factions +nav.players = Players +nav.economy = Economy +nav.zones = Zones +nav.config = Config +nav.backups = Backups +nav.log = Log +nav.updates = Updates +nav.help = Help +nav.version = Version diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index b36330b1..b6e534d6 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -2,6 +2,22 @@ # Format: key = value # Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule +# ========== Navigation Bar ========== +nav.dashboard = Dashboard +nav.chat = Chat +nav.members = Members +nav.invites = Invites +nav.browser = Browse +nav.map = Map +nav.leaderboard = Leaderboard +nav.relations = Relations +nav.treasury = Treasury +nav.settings = Settings +nav.logs = Logs +nav.help = Help +nav.admin = Admin +nav.create = Create + # ========== Help Category Names ========== help.category.welcome = Welcome help.category.your_faction = Your Faction @@ -10,3 +26,45 @@ help.category.diplomacy = Diplomacy help.category.combat = Combat & Safety help.category.economy = Economy help.category.quick_ref = Quick Reference + +# ========== Main Menu ========== +main_menu.section_my_faction = My Faction +main_menu.section_get_started = Get Started +main_menu.section_territory = Territory +main_menu.section_browse = Browse +main_menu.section_admin = Admin +main_menu.claim_hint = Use /f claim to claim territory. + +# ========== Faction Info Page ========== +faction_info.no_description = No description set. +faction_info.status_open = Open +faction_info.status_invite_only = Invite Only +faction_info.status_raidable = Raidable +faction_info.status_protected = Protected +faction_info.officers_more = +{0} more + +# ========== Rename Modal ========== +rename.no_permission = You don't have permission to rename the faction. +rename.enter_name = Please enter a faction name. +rename.too_short = Faction name must be at least {0} characters. +rename.too_long = Faction name cannot exceed {0} characters. +rename.same_name = That's already your faction's name. +rename.name_taken = A faction with that name already exists. +rename.success = Faction renamed from {0} to {1}! + +# ========== Description Modal ========== +desc.no_permission = You don't have permission to edit the description. +desc.display_none = (None) +desc.cleared = Faction description cleared. +desc.updated = Faction description updated! + +# ========== Tag Modal ========== +tag.no_permission = You don't have permission to edit the tag. +tag.display_none = (None) +tag.cleared = Faction tag cleared. +tag.too_short = Tag must be at least {0} character. +tag.too_long = Tag cannot exceed {0} characters. +tag.invalid_format = Tag can only contain letters and numbers. +tag.same_tag = That's already your faction's tag. +tag.tag_taken = A faction with that tag already exists. +tag.success = Faction tag set to [{0}]! From 6cf33965eec0a02fa8f5e2f980d8035b0ab5853a Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 15:29:55 -0700 Subject: [PATCH 11/55] feat: localize FactionDashboardPage and FactionMainPage (Phase 3b) Migrate ~55 hardcoded English strings to i18n keys across both pages. Reuse existing command keys (Home, Claim, Common, Leave) where messages are semantically identical. Add DashboardGui and FactionMainGui key classes for page-specific labels and messages. --- .../faction/page/FactionDashboardPage.java | 109 +++++++++--------- .../gui/faction/page/FactionMainPage.java | 27 ++--- .../com/hyperfactions/util/MessageKeys.java | 46 +++++++- .../Server/Languages/en-US/hyperfactions.lang | 5 + .../Languages/en-US/hyperfactions_gui.lang | 31 +++++ 5 files changed, 148 insertions(+), 70 deletions(-) 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 5a4bd0d5..5afc54ce 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionDashboardPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionDashboardPage.java @@ -26,6 +26,8 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.manager.TeleportManager; import com.hyperfactions.util.ChunkUtil; +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; @@ -106,7 +108,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", "Your faction no longer exists."); + cmd.set("#ErrorMessage.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.FACTION_GONE)); return; } @@ -182,14 +184,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", available + " available"); + cmd.set("#ClaimsAvailable.Text", HFMessages.get(playerRef, MessageKeys.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", "At Risk!"); + cmd.set("#ClaimsAvailable.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.AT_RISK)); cmd.set("#ClaimsAvailable.Style.TextColor", "#FF5555"); } @@ -197,7 +199,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", onlineCount + " online"); + cmd.set("#MembersOnline.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.ONLINE_COUNT, onlineCount)); // Row 2: Relations, Status, Invites @@ -216,10 +218,10 @@ private void buildStatCards(UICommandBuilder cmd, Faction currentFaction) { // Status stat - Open/Invite Only if (currentFaction.open()) { - cmd.set("#StatusValue.Text", "Open"); + cmd.set("#StatusValue.Text", HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN)); cmd.set("#StatusValue.Style.TextColor", "#55FF55"); } else { - cmd.set("#StatusValue.Text", "Invite"); + cmd.set("#StatusValue.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.STATUS_INVITE)); cmd.set("#StatusValue.Style.TextColor", "#FFAA00"); } cmd.set("#StatusDesc.Text", ""); @@ -257,14 +259,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("#UpkeepSubtext.Text", "IN GRACE"); + cmd.set("#UpkeepSubtext.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.IN_GRACE)); cmd.set("#UpkeepSubtext.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("#UpkeepSubtext.Text", "in " + com.hyperfactions.economy.UpkeepProcessor.formatDuration(remaining)); } else { - cmd.set("#UpkeepSubtext.Text", billableChunks + " billable chunks"); + cmd.set("#UpkeepSubtext.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.BILLABLE_CHUNKS, billableChunks)); } // Color based on affordability @@ -279,7 +281,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", "N/A"); + cmd.set("#WalletBalance.Text", HFMessages.get(playerRef, MessageKeys.Common.NA)); } } } @@ -303,7 +305,9 @@ private void buildQuickActions(UICommandBuilder cmd, UIEventBuilder events, if ((faction.hasHome() || isOfficerPlus) && PermissionManager.get().hasPermission(viewerUuid, Permissions.HOME)) { cmd.append("#HomeBtnContainer", UIPaths.DASHBOARD_ACTION_BTN); - cmd.set("#HomeBtnContainer #ActionBtn.Text", faction.hasHome() ? "Home" : "Set Home"); + cmd.set("#HomeBtnContainer #ActionBtn.Text", faction.hasHome() + ? HFMessages.get(playerRef, MessageKeys.DashboardGui.BTN_HOME) + : HFMessages.get(playerRef, MessageKeys.DashboardGui.BTN_SET_HOME)); cmd.set("#HomeBtnContainer #ActionBtn.Style", Value.ref(UIPaths.STYLES, "CyanButtonStyle")); events.addEventBinding( @@ -319,7 +323,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", "Claim"); + cmd.set("#ClaimBtnContainer #ActionBtn.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.BTN_CLAIM)); cmd.set("#ClaimBtnContainer #ActionBtn.Style", Value.ref(UIPaths.STYLES, "GreenButtonStyle")); events.addEventBinding( @@ -337,10 +341,11 @@ private void buildQuickActions(UICommandBuilder cmd, UIEventBuilder events, || PermissionManager.get().hasPermission(viewerUuid, Permissions.CHAT_ALLY)) { ChatManager chatManager = plugin.getChatManager(); ChatManager.ChatChannel currentChannel = chatManager.getChannel(viewerUuid); - String display = "Chat: " + ChatManager.getChannelDisplay(currentChannel); + String channelDisplay = ChatManager.getChannelDisplay(currentChannel); cmd.append("#ChatModeBtnContainer", UIPaths.DASHBOARD_ACTION_BTN); - cmd.set("#ChatModeBtnContainer #ActionBtn.Text", display); + cmd.set("#ChatModeBtnContainer #ActionBtn.Text", + HFMessages.get(playerRef, MessageKeys.DashboardGui.CHAT_PREFIX, channelDisplay)); events.addEventBinding( CustomUIEventBindingType.Activating, "#ChatModeBtnContainer #ActionBtn", @@ -354,7 +359,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", "Leave"); + cmd.set("#LeaveBtnContainer #ActionBtn.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.BTN_LEAVE)); cmd.set("#LeaveBtnContainer #ActionBtn.Style", Value.ref(UIPaths.STYLES, "FlatRedButtonStyle")); events.addEventBinding( @@ -382,8 +387,9 @@ 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); cmd.appendInline("#ActivityFeed", - "Label { Text: \"No recent activity.\"; Style: (FontSize: 11, TextColor: #555555); " + "Label { Text: \"" + noActivityText + "\"; Style: (FontSize: 11, TextColor: #555555); " + "Anchor: (Height: 26); }"); return; } @@ -404,16 +410,16 @@ private String formatTimeAgo(long timestamp) { long diff = now - timestamp; if (diff < TimeUnit.MINUTES.toMillis(1)) { - return "now"; + return HFMessages.get(playerRef, MessageKeys.DashboardGui.TIME_NOW); } else if (diff < TimeUnit.HOURS.toMillis(1)) { long minutes = TimeUnit.MILLISECONDS.toMinutes(diff); - return minutes + "m ago"; + return HFMessages.get(playerRef, MessageKeys.DashboardGui.TIME_MINUTES, minutes); } else if (diff < TimeUnit.DAYS.toMillis(1)) { long hours = TimeUnit.MILLISECONDS.toHours(diff); - return hours + "h ago"; + return HFMessages.get(playerRef, MessageKeys.DashboardGui.TIME_HOURS, hours); } else { long days = TimeUnit.MILLISECONDS.toDays(diff); - return days + "d ago"; + return HFMessages.get(playerRef, MessageKeys.DashboardGui.TIME_DAYS, days); } } @@ -441,7 +447,7 @@ public void handleDataEvent(Ref ref, Store store, // Verify still in faction if (currentFaction == null) { - player.sendMessage(MessageUtil.errorText("You are no longer in a faction.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Common.NOT_IN_FACTION)); guiManager.openFactionMain(player, ref, store, playerRef); return; } @@ -462,7 +468,7 @@ public void handleDataEvent(Ref ref, Store store, if (isOfficerPlus) { handleSetHomeAction(player, ref, store, uuid, currentFaction); } else { - player.sendMessage(MessageUtil.errorText("Your faction has no home set. Ask an officer to set one.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.DashboardGui.NO_HOME_HINT)); sendUpdate(); } } else { @@ -472,7 +478,7 @@ public void handleDataEvent(Ref ref, Store store, case "Claim" -> { if (!isOfficerPlus || !PermissionManager.get().hasPermission(uuid, Permissions.CLAIM)) { - player.sendMessage(MessageUtil.errorText("Only officers can claim territory.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Claim.NOT_OFFICER)); sendUpdate(); return; } @@ -484,9 +490,9 @@ public void handleDataEvent(Ref ref, Store store, ChatManager.ToggleResult chatResult = chatManager.cycleChannelChecked(uuid); if (chatResult.isSuccess() && chatResult.channel() != null) { String display = ChatManager.getChannelDisplay(chatResult.channel()); - String color = ChatManager.getChannelColor(chatResult.channel()); - player.sendMessage(Message.raw("Chat mode: ").color("#AAAAAA") - .insert(Message.raw(display).color(color))); + player.sendMessage(Message.raw( + HFMessages.get(playerRef, MessageKeys.DashboardGui.CHAT_MODE_SET, display)) + .color("#AAAAAA")); } rebuild(); } @@ -515,7 +521,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.errorText("Your faction has no home set.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Home.NO_HOME)); sendUpdate(); return; } @@ -523,7 +529,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.errorText("You are not in a faction.")); - case NO_HOME -> player.sendMessage(MessageUtil.errorText("Your faction has no home set.")); - case COMBAT_TAGGED -> player.sendMessage(MessageUtil.errorText("You cannot teleport while in combat!")); - case SUCCESS_INSTANT -> player.sendMessage(MessageUtil.successText("Teleported to faction home!")); + 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 ON_COOLDOWN, SUCCESS_WARMUP -> {} // Message sent by TeleportManager default -> {} } @@ -600,14 +606,14 @@ private void handleSetHomeAction(Player player, Ref ref, Store ref, Store ref, Store ref, Store ref, Store { - player.sendMessage( - Message.raw("Claimed chunk at (").color("#55FF55") - .insert(Message.raw(chunkX + ", " + chunkZ).color("#AAAAAA")) - .insert(Message.raw(")").color("#55FF55")) - ); + player.sendMessage(MessageUtil.success(playerRef, + MessageKeys.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.errorText("You are not in a faction.")); - case NOT_OFFICER -> player.sendMessage(MessageUtil.errorText("Only officers can claim land.")); - case ALREADY_CLAIMED_SELF -> player.sendMessage(MessageUtil.text("This chunk is already claimed by your faction.", MessageUtil.COLOR_GOLD)); - case ALREADY_CLAIMED_OTHER, ALREADY_CLAIMED_ALLY, ALREADY_CLAIMED_ENEMY -> player.sendMessage(MessageUtil.errorText("This chunk is claimed by another faction.")); - case MAX_CLAIMS_REACHED -> player.sendMessage(MessageUtil.errorText("Your faction has reached its claim limit.")); - case WORLD_NOT_ALLOWED -> player.sendMessage(MessageUtil.errorText("Claiming is not allowed in this world.")); - case NOT_ADJACENT -> player.sendMessage(MessageUtil.errorText("You can only claim chunks adjacent to existing claims.")); - case INSUFFICIENT_POWER -> player.sendMessage(MessageUtil.errorText("Your faction doesn't have enough power to claim more land.")); - case ORBISGUARD_PROTECTED -> player.sendMessage(MessageUtil.errorText("This area is protected by OrbisGuard.")); - default -> player.sendMessage(MessageUtil.errorText("Could not claim this chunk.")); + 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)); } } 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 49c4379f..465072fb 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionMainPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionMainPage.java @@ -7,6 +7,8 @@ import com.hyperfactions.gui.faction.data.FactionPageData; import com.hyperfactions.gui.newplayer.NewPlayerNavBarHelper; import com.hyperfactions.manager.*; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; @@ -15,7 +17,6 @@ import com.hypixel.hytale.math.vector.Vector3f; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; -import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.entity.entities.Player; import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; import com.hypixel.hytale.server.core.modules.entity.teleport.Teleport; @@ -130,7 +131,7 @@ private void buildInviteNotification(UICommandBuilder cmd, UIEventBuilder events } private void buildNoFactionView(UICommandBuilder cmd, UIEventBuilder events) { - cmd.set("#FactionName.Text", "No Faction"); + cmd.set("#FactionName.Text", HFMessages.get(playerRef, MessageKeys.FactionMainGui.NO_FACTION)); // Show create/browse buttons cmd.append("#ActionArea", UIPaths.NO_FACTION_ACTIONS); @@ -277,7 +278,7 @@ private void handleAcceptInvite(Player player, Ref ref, Store ref, Store ref, Store ref, Store ref, Store ref, Store ref, Store store, @@ -372,10 +373,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.text("You left the faction.", MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.success(playerRef, MessageKeys.Leave.SUCCESS)); guiManager.openFactionMain(player, ref, store, playerRef); } else { - player.sendMessage(Message.raw("Failed to leave: " + result).color("#FF5555")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.FactionMainGui.LEAVE_FAILED, result)); } } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 54b293fc..192973d1 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -52,6 +52,10 @@ public static final class Common { 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"; private Common() {} } @@ -270,6 +274,7 @@ public static final class Claim { 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() {} } @@ -736,16 +741,49 @@ public static final class TagGui { private TagGui() {} } - /** Dashboard page labels. */ - public static final class Dashboard { + /** Dashboard page labels and messages. */ + public static final class DashboardGui { 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"; - - private Dashboard() {} + 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"; + + private DashboardGui() {} + } + + /** 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. */ diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions.lang b/src/main/resources/Server/Languages/en-US/hyperfactions.lang index 16b07b96..bea46e75 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions.lang @@ -30,6 +30,10 @@ common.unknown = Unknown common.error_generic = Something went wrong. Please try again. common.gui_fallback = Could not access GUI. Use /f help for commands. common.admin_prefix = [Admin] +common.location_error = Could not determine your location. +common.world_error = Could not determine your world. +common.invalid_id = Invalid faction ID. +common.na = N/A # ========== Commands - Create ========== cmd.create.no_permission = You don't have permission to create factions. @@ -101,6 +105,7 @@ cmd.claim.not_adjacent = You must claim adjacent to existing territory. cmd.claim.world_not_allowed = Claiming is not allowed in this world. cmd.claim.orbisguard = This area is protected by OrbisGuard. cmd.claim.zone_protected = This chunk is in a safezone or warzone. +cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. cmd.claim.failed = Failed to claim chunk. # ========== Commands - Invite ========== diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index b6e534d6..4fa4e2da 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -68,3 +68,34 @@ tag.invalid_format = Tag can only contain letters and numbers. tag.same_tag = That's already your faction's tag. tag.tag_taken = A faction with that tag already exists. tag.success = Faction tag set to [{0}]! + +# ========== Dashboard Page ========== +dashboard.faction_gone = Your faction no longer exists. +dashboard.available = {0} available +dashboard.at_risk = At Risk! +dashboard.online_count = {0} online +dashboard.status_invite = Invite +dashboard.in_grace = IN GRACE +dashboard.billable_chunks = {0} billable chunks +dashboard.btn_home = Home +dashboard.btn_set_home = Set Home +dashboard.btn_claim = Claim +dashboard.chat_prefix = Chat: {0} +dashboard.btn_leave = Leave +dashboard.no_activity = No recent activity. +dashboard.time_now = now +dashboard.time_minutes = {0}m ago +dashboard.time_hours = {0}h ago +dashboard.time_days = {0}d ago +dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. +dashboard.chat_mode_set = Chat mode: {0} +dashboard.claim_success = Claimed chunk at ({0}, {1}) + +# ========== Faction Main Page ========== +main.no_faction = No Faction +main.joined = You joined the faction! +main.join_failed = Failed to join faction: {0} +main.invite_declined = Invite declined. +main.cooldown = Teleport on cooldown! {0}s remaining. +main.world_not_found = Cannot teleport - world not found. +main.leave_failed = Failed to leave: {0} From 18ee92c078fc2b3053da4a8b7792a3077c86a90e Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 15:45:43 -0700 Subject: [PATCH 12/55] feat: localize Members, Browser, Leaderboard, and PlayerInfo pages (Phase 3c) Migrate all hardcoded English strings in FactionMembersPage, FactionBrowserPage, FactionLeaderboardPage, and PlayerInfoPage to use HFMessages.get() with MessageKeys. Add GuiCommon, MembersGui, BrowserGui, LeaderboardGui, and PlayerInfoGui key classes. --- .../gui/faction/page/FactionBrowserPage.java | 25 +++---- .../faction/page/FactionLeaderboardPage.java | 40 ++++++------ .../gui/faction/page/FactionMembersPage.java | 46 +++++++------ .../gui/faction/page/PlayerInfoPage.java | 35 +++++----- .../com/hyperfactions/util/MessageKeys.java | 65 +++++++++++++++++++ .../Languages/en-US/hyperfactions_gui.lang | 45 +++++++++++++ 6 files changed, 192 insertions(+), 64 deletions(-) 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 33905033..951979c0 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionBrowserPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionBrowserPage.java @@ -8,13 +8,14 @@ import com.hyperfactions.gui.newplayer.NewPlayerNavBarHelper; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.manager.PowerManager; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; -import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.entity.entities.Player; import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; import com.hypixel.hytale.server.core.ui.DropdownEntryInfo; @@ -103,13 +104,13 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events, Facti // Get all factions sorted and filtered List entries = buildFactionEntryList(); - cmd.set("#FactionCount.Text", entries.size() + " factions"); + cmd.set("#FactionCount.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.FACTION_COUNT, entries.size())); // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString("Power"), "POWER"), - new DropdownEntryInfo(LocalizableString.fromString("Name"), "NAME"), - new DropdownEntryInfo(LocalizableString.fromString("Members"), "MEMBERS") + 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") )); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding( @@ -149,7 +150,7 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events, Facti } // Pagination - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -198,7 +199,7 @@ private List buildFactionEntryList() { stats.currentPower(), stats.maxPower(), faction.claims().size(), - leader != null ? leader.username() : "None", + leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.NONE), faction.open(), faction.description(), faction.createdAt() @@ -229,7 +230,7 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int // Basic info cmd.set(idx + " #FactionName.Text", entry.name); - cmd.set(idx + " #LeaderName.Text", "Leader: " + entry.leaderName); + cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.LEADER_LABEL, entry.leaderName)); // Stats cmd.set(idx + " #PowerDisplay.Text", String.format("%.0f/%.0f", entry.power, entry.maxPower)); @@ -238,7 +239,7 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int // Own faction indicator if (isOwnFaction) { - cmd.set(idx + " #OwnIndicator.Text", "(You)"); + cmd.set(idx + " #OwnIndicator.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.OWN_FACTION)); } // Relation indicator (only for faction members viewing other factions) @@ -268,7 +269,9 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int // Extended info (only set values if expanded) if (isExpanded) { // Recruitment status - cmd.set(idx + " #RecruitmentStatus.Text", entry.isOpen ? "Open" : "Invite Only"); + cmd.set(idx + " #RecruitmentStatus.Text", entry.isOpen + ? HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) + : HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)); cmd.set(idx + " #RecruitmentStatus.Style.TextColor", entry.isOpen ? "#44CC44" : "#FFAA00"); // Created date @@ -396,7 +399,7 @@ private void handleViewFaction(Player player, Ref ref, Store entries = buildEntryList(); - cmd.set("#FactionCount.Text", entries.size() + " factions"); + cmd.set("#FactionCount.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.FACTION_COUNT, entries.size())); // Sort dropdown List sortOptions = new ArrayList<>(); - sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString("K/D"), "KD")); - sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString("Power"), "POWER")); - sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString("Territory"), "TERRITORY")); + 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")); if (economyManager != null) { - sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString("Balance"), "BALANCE")); + sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.LeaderboardGui.SORT_BALANCE)), "BALANCE")); } - sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString("Members"), "MEMBERS")); + sortOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.GuiCommon.SORT_MEMBERS)), "MEMBERS")); cmd.set("#SortDropdown.Entries", sortOptions); cmd.set("#SortDropdown.Value", sortMode.name()); @@ -133,7 +135,7 @@ private void buildLeaderboard(UICommandBuilder cmd, UIEventBuilder events, ); // Update column header based on sort mode - cmd.set("#StatHeader.Text", sortMode.displayName); + cmd.set("#StatHeader.Text", HFMessages.get(playerRef, sortMode.displayKey)); // Calculate pagination int totalPages = Math.max(1, (int) Math.ceil((double) entries.size() / ENTRIES_PER_PAGE)); @@ -154,7 +156,7 @@ private void buildLeaderboard(UICommandBuilder cmd, UIEventBuilder events, } // Pagination - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -203,7 +205,7 @@ private List buildEntryList() { faction.name(), faction.tag(), faction.color() != null ? faction.color() : "#00FFFF", - leader != null ? leader.username() : "None", + leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.NONE), stats.currentPower(), stats.maxPower(), faction.getClaimCount(), @@ -250,7 +252,7 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, } // Leader - cmd.set(idx + " #LeaderName.Text", "Leader: " + entry.leaderName); + cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.LEADER_LABEL, entry.leaderName)); // Primary stat value based on sort mode String statValue = switch (sortMode) { @@ -259,7 +261,7 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, case TERRITORY -> String.valueOf(entry.claimCount); case BALANCE -> economyManager != null ? economyManager.formatCurrency(entry.balance) - : "N/A"; + : HFMessages.get(playerRef, MessageKeys.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/FactionMembersPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java index 3d34d3d3..8410cda7 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java @@ -13,6 +13,8 @@ import com.hyperfactions.integration.PermissionManager; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.manager.PowerManager; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.TimeUtil; import com.hyperfactions.util.UuidUtil; @@ -139,12 +141,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", totalMembers + " members"); + cmd.set("#MemberCount.Text", HFMessages.get(playerRef, MessageKeys.MembersGui.MEMBER_COUNT, totalMembers)); // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString("Role"), "ROLE"), - new DropdownEntryInfo(LocalizableString.fromString("Last Online"), "LAST_ONLINE") + 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") )); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding( @@ -225,7 +227,9 @@ private void buildMemberEntry(UICommandBuilder cmd, UIEventBuilder events, int i cmd.set(idx + " #RoleIndicator.Background.Color", GuiColors.forRole(member.role())); // Online status - cmd.set(idx + " #OnlineStatus.Text", memberIsOnline ? "Online" : "Offline"); + cmd.set(idx + " #OnlineStatus.Text", memberIsOnline + ? HFMessages.get(playerRef, MessageKeys.Common.ONLINE) + : HFMessages.get(playerRef, MessageKeys.Common.OFFLINE)); cmd.set(idx + " #OnlineStatus.Style.TextColor", GuiColors.forOnlineStatus(memberIsOnline)); if (!memberIsOnline) { cmd.set(idx + " #LastOnline.Text", formatLastOnline(member.lastOnline())); @@ -261,13 +265,14 @@ private void buildMemberEntry(UICommandBuilder cmd, UIEventBuilder events, int i // Joined date String joinedDate = member.joinedAt() > 0 ? DATE_FORMAT.format(Instant.ofEpochMilli(member.joinedAt())) - : "Unknown"; + : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); cmd.set(idx + " #JoinedDate.Text", joinedDate); // Last death (relative format) String lastDeathText = power.lastDeath() > 0 - ? TimeUtil.formatDuration(System.currentTimeMillis() - power.lastDeath()) + " ago" - : "Never"; + ? HFMessages.get(playerRef, MessageKeys.MembersGui.AGO, + TimeUtil.formatDuration(System.currentTimeMillis() - power.lastDeath())) + : HFMessages.get(playerRef, MessageKeys.MembersGui.NEVER); cmd.set(idx + " #LastDeath.Text", lastDeathText); // Determine what actions the viewer can take on this member @@ -391,9 +396,10 @@ private String formatLastOnline(long lastOnlineMs) { } long diffMs = System.currentTimeMillis() - lastOnlineMs; if (diffMs < 60000) { - return "just now"; + return HFMessages.get(playerRef, MessageKeys.MembersGui.JUST_NOW); } - return TimeUtil.formatDuration(diffMs) + " ago"; + return HFMessages.get(playerRef, MessageKeys.MembersGui.AGO, + TimeUtil.formatDuration(diffMs)); } /** Handles data event. */ @@ -499,16 +505,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.errorText("Member not found.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.MembersGui.MEMBER_NOT_FOUND)); sendUpdate(); return; } var result = factionManager.removeMember(faction.id(), targetUuid, playerRef.getUuid(), true); if (result == FactionManager.FactionResult.SUCCESS) { - player.sendMessage(Message.raw("Kicked " + target.username() + " from the faction.").color("#55FF55")); + player.sendMessage(MessageUtil.success(playerRef, MessageKeys.MembersGui.KICKED, target.username())); } else { - player.sendMessage(MessageUtil.errorText("Failed to kick: " + result.name())); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.MembersGui.KICK_FAILED, result.name())); } rebuildList(ref, store); } @@ -580,7 +588,7 @@ private void handleTransfer(Player player, Ref ref, Store ref, UICommandBuilder cmd, // Check if target is online PlayerRef targetRef = Universe.get().getPlayer(targetPlayerUuid); boolean isOnline = targetRef != null && targetRef.isValid(); - cmd.set("#OnlineIndicator.Text", isOnline ? "Online" : "Offline"); + cmd.set("#OnlineIndicator.Text", isOnline + ? HFMessages.get(viewerRef, MessageKeys.Common.ONLINE) + : HFMessages.get(viewerRef, MessageKeys.Common.OFFLINE)); cmd.set("#OnlineIndicator.Style.TextColor", GuiColors.forOnlineStatus(isOnline)); // === First Joined / Last Online === @@ -117,15 +120,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", "Unknown"); + cmd.set("#FirstJoinedValue.Text", HFMessages.get(viewerRef, MessageKeys.Common.UNKNOWN)); } if (isOnline) { - cmd.set("#LastOnlineValue.Text", "Now"); + cmd.set("#LastOnlineValue.Text", HFMessages.get(viewerRef, MessageKeys.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", "Unknown"); + cmd.set("#LastOnlineValue.Text", HFMessages.get(viewerRef, MessageKeys.Common.UNKNOWN)); } // === Faction Section === @@ -200,7 +203,7 @@ public void build(Ref ref, UICommandBuilder cmd, List history = new java.util.ArrayList<>(cachedPlayerData.getMembershipHistory()); Collections.reverse(history); - cmd.set("#HistoryCount.Text", history.size() + " records"); + cmd.set("#HistoryCount.Text", HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.HISTORY_COUNT, history.size())); cmd.appendInline("#HistoryList", "Group #HistoryCards { LayoutMode: Top; }"); for (int i = 0; i < history.size(); i++) { @@ -210,8 +213,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", "Joined: " + TimeUtil.formatDate(rec.joinedAt())); - cmd.set(idx + " #HLeft.Text", rec.isActive() ? "Current" : "Left: " + TimeUtil.formatDate(rec.leftAt())); + cmd.set(idx + " #HJoined.Text", HFMessages.get(viewerRef, MessageKeys.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()))); 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())); @@ -219,7 +224,7 @@ public void build(Ref ref, UICommandBuilder cmd, } else { cmd.set("#HistoryCount.Text", ""); cmd.appendInline("#HistoryList", - "Label { Text: \"No membership history\"; Style: (FontSize: 11, TextColor: #555555); }"); + "Label { Text: \"" + HFMessages.get(viewerRef, MessageKeys.PlayerInfoGui.NO_HISTORY) + "\"; Style: (FontSize: 11, TextColor: #555555); }"); } // Back button @@ -249,7 +254,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.playerUuid != null) { UUID factionId = UuidUtil.parseOrNull(data.playerUuid); if (factionId == null) { - player.sendMessage(MessageUtil.errorText("Invalid faction ID.")); + player.sendMessage(MessageUtil.error(viewerRef, MessageKeys.Common.INVALID_ID)); return; } @@ -258,7 +263,7 @@ public void handleDataEvent(Ref ref, Store store, guiManager.openFactionInfoFromPlayerInfo(player, ref, store, playerRef, faction, targetPlayerUuid, targetPlayerName, sourcePage); } else { - player.sendMessage(MessageUtil.errorText("Faction no longer exists.")); + player.sendMessage(MessageUtil.error(viewerRef, MessageKeys.PlayerInfoGui.FACTION_GONE)); } } } @@ -300,10 +305,10 @@ private void loadPlayerDataSync() { private String formatReason(MembershipRecord.LeaveReason reason) { return switch (reason) { - case ACTIVE -> "ACTIVE"; - case LEFT -> "LEFT"; - case KICKED -> "KICKED"; - case DISBANDED -> "DISBANDED"; + 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); }; } } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 192973d1..dc5b8f77 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -773,6 +773,71 @@ public static final class DashboardGui { 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"; + + private GuiCommon() {} + } + + /** Members page labels and messages. */ + public static final class MembersGui { + 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"; + + private MembersGui() {} + } + + /** Browser page labels. */ + public static final class BrowserGui { + public static final String SORT_NAME = "hyperfactions_gui.browser.sort_name"; + public static final String INVALID_FACTION = "hyperfactions_gui.browser.invalid_faction"; + + private BrowserGui() {} + } + + /** Leaderboard page labels. */ + public static final class LeaderboardGui { + 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 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"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index 4fa4e2da..fda358aa 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -99,3 +99,48 @@ main.invite_declined = Invite declined. main.cooldown = Teleport on cooldown! {0}s remaining. main.world_not_found = Cannot teleport - world not found. main.leave_failed = Failed to leave: {0} + +# ========== Shared GUI Labels ========== +common.faction_count = {0} factions +common.leader_label = Leader: {0} +common.sort_power = Power +common.sort_members = Members +common.page_format = {0}/{1} +common.own_faction = (You) + +# ========== Members Page ========== +members.count = {0} members +members.sort_role = Role +members.sort_last_online = Last Online +members.just_now = just now +members.ago = {0} ago +members.never = Never +members.member_not_found = Member not found. +members.promoted = Promoted {0} to {1}. +members.promote_failed = Failed to promote: {0} +members.demoted = Demoted {0} to {1}. +members.demote_failed = Failed to demote: {0} +members.kicked = Kicked {0} from the faction. +members.kick_failed = Failed to kick: {0} + +# ========== Browser Page ========== +browser.sort_name = Name +browser.invalid_faction = Invalid faction. + +# ========== Leaderboard Page ========== +leaderboard.sort_kd = K/D +leaderboard.sort_territory = Territory +leaderboard.sort_balance = Balance + +# ========== Player Info Page ========== +playerinfo.now = Now +playerinfo.history_count = {0} records +playerinfo.joined_label = Joined: {0} +playerinfo.current = Current +playerinfo.left_label = Left: {0} +playerinfo.no_history = No membership history +playerinfo.faction_gone = Faction no longer exists. +playerinfo.reason_active = ACTIVE +playerinfo.reason_left = LEFT +playerinfo.reason_kicked = KICKED +playerinfo.reason_disbanded = DISBANDED From 55a37c26c7ad4a2f0edfef15f9c9f6b446557d28 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 16:00:00 -0700 Subject: [PATCH 13/55] feat: localize Relations, Settings, and Modules pages (Phase 3d) Migrate all hardcoded English strings in FactionRelationsPage, SetRelationModalPage, FactionSettingsPage, and FactionModulesPage to use HFMessages.get() with MessageKeys. Add RelationsGui, SettingsGui, and ModulesGui key classes. Relation type labels use internal English identifiers for logic with localizeType() resolving display text. --- .../gui/faction/page/FactionModulesPage.java | 30 ++++--- .../faction/page/FactionRelationsPage.java | 87 +++++++++++-------- .../gui/faction/page/FactionSettingsPage.java | 58 +++++++------ .../faction/page/SetRelationModalPage.java | 41 ++++----- .../com/hyperfactions/util/MessageKeys.java | 73 ++++++++++++++++ .../Languages/en-US/hyperfactions_gui.lang | 61 +++++++++++++ 6 files changed, 253 insertions(+), 97 deletions(-) diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionModulesPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionModulesPage.java index 2fd3fba0..3059826e 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionModulesPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionModulesPage.java @@ -8,6 +8,8 @@ import com.hyperfactions.gui.faction.NavBarHelper; import com.hyperfactions.gui.faction.data.FactionModulesData; import com.hyperfactions.manager.FactionManager; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -31,10 +33,10 @@ public class FactionModulesPage extends InteractiveCustomUIPage MODULES = List.of( - new ModuleInfo("treasury", "Treasury", "Faction bank & economy system", "#fbbf24"), - new ModuleInfo("raids", "Raids", "Scheduled faction battles", "#ef4444"), - new ModuleInfo("levels", "Levels", "Faction progression & XP", "#22c55e"), - new ModuleInfo("war", "War", "Formal war declarations", "#a855f7") + 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") ); private final PlayerRef playerRef; @@ -78,8 +80,8 @@ public void build(Ref ref, UICommandBuilder cmd, String cardSelector = "#ModuleCard" + i; // Set module info - cmd.set(cardSelector + " #ModuleName.Text", module.name); - cmd.set(cardSelector + " #ModuleDesc.Text", module.description); + cmd.set(cardSelector + " #ModuleName.Text", HFMessages.get(playerRef, module.nameKey)); + cmd.set(cardSelector + " #ModuleDesc.Text", HFMessages.get(playerRef, module.descKey)); // Set color indicator cmd.set(cardSelector + " #ColorBar.Background.Color", module.color); @@ -89,7 +91,7 @@ public void build(Ref ref, UICommandBuilder cmd, buildTreasuryCard(cmd, events, cardSelector); } else { // Other modules: coming soon - cmd.set(cardSelector + " #StatusBadge.Text", "Coming Soon"); + cmd.set(cardSelector + " #StatusBadge.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.COMING_SOON)); cmd.set(cardSelector + " #StatusBadge.Style.TextColor", "#888888"); } } @@ -161,10 +163,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", "Active"); + cmd.set(cardSelector + " #StatusBadge.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.ACTIVE)); cmd.set(cardSelector + " #StatusBadge.Style.TextColor", "#22c55e"); cmd.set(cardSelector + " #ModuleBtn.Visible", true); - cmd.set(cardSelector + " #ModuleBtn.Text", "View Treasury"); + cmd.set(cardSelector + " #ModuleBtn.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.VIEW_TREASURY)); events.addEventBinding( CustomUIEventBindingType.Activating, cardSelector + " #ModuleBtn", @@ -175,17 +177,17 @@ 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", "Unavailable"); + cmd.set(cardSelector + " #StatusBadge.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.UNAVAILABLE)); cmd.set(cardSelector + " #StatusBadge.Style.TextColor", "#fbbf24"); - cmd.set(cardSelector + " #ModuleDesc.Text", "No economy plugin detected"); + cmd.set(cardSelector + " #ModuleDesc.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.NO_ECONOMY)); } else { // State 2: Disabled by server config - cmd.set(cardSelector + " #StatusBadge.Text", "Disabled"); + cmd.set(cardSelector + " #StatusBadge.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.DISABLED)); cmd.set(cardSelector + " #StatusBadge.Style.TextColor", "#888888"); - cmd.set(cardSelector + " #ModuleDesc.Text", "Economy features are not available on this server"); + cmd.set(cardSelector + " #ModuleDesc.Text", HFMessages.get(playerRef, MessageKeys.ModulesGui.ECONOMY_NOT_AVAILABLE)); } } } - private record ModuleInfo(String id, String name, String description, String color) {} + private record ModuleInfo(String id, String nameKey, String descKey, String color) {} } 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 58dbfc2e..6f75dbed 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionRelationsPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionRelationsPage.java @@ -13,13 +13,14 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.manager.PowerManager; import com.hyperfactions.manager.RelationManager; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; -import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.entity.entities.Player; import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; import com.hypixel.hytale.server.core.ui.Value; @@ -168,9 +169,9 @@ private void buildList(UICommandBuilder cmd, UIEventBuilder events, boolean canM }; // Count - String countText = items.size() + " " + switch (currentTab) { - case RELATIONS -> items.size() == 1 ? "relation" : "relations"; - case PENDING -> items.size() == 1 ? "request" : "requests"; + 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()); }; cmd.set("#ItemCount.Text", countText); @@ -201,7 +202,7 @@ private void buildList(UICommandBuilder cmd, UIEventBuilder events, boolean canM } // Pagination - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -236,7 +237,7 @@ private List getAllRelations() { Faction other = factionManager.getFaction(relation.targetFactionId()); if (other != null) { FactionMember leader = other.getLeader(); - String leaderName = leader != null ? leader.username() : "Unknown"; + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); String typeText = relation.type() == RelationType.ALLY ? "Ally" : "Enemy"; PowerManager.FactionPowerStats stats = powerManager.getFactionPowerStats(other.id()); items.add(new RelationItem( @@ -272,7 +273,7 @@ private List getPendingRequests() { Faction requester = factionManager.getFaction(requesterId); if (requester != null) { FactionMember leader = requester.getLeader(); - String leaderName = leader != null ? leader.username() : "Unknown"; + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); PowerManager.FactionPowerStats stats = powerManager.getFactionPowerStats(requester.id()); items.add(new RelationItem( requester.id(), @@ -296,7 +297,7 @@ private List getPendingRequests() { Faction target = factionManager.getFaction(targetId); if (target != null) { FactionMember leader = target.getLeader(); - String leaderName = leader != null ? leader.username() : "Unknown"; + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); PowerManager.FactionPowerStats stats = powerManager.getFactionPowerStats(target.id()); items.add(new RelationItem( target.id(), @@ -332,10 +333,10 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, // === Header info === cmd.set(idx + " #FactionName.Text", item.factionName); - cmd.set(idx + " #LeaderName.Text", "Leader: " + item.leaderName); + cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.LEADER_LABEL, item.leaderName)); // Relation type badge with appropriate color - cmd.set(idx + " #RelationType.Text", item.type); + cmd.set(idx + " #RelationType.Text", localizeType(item.type)); String typeColor = switch (item.type) { case "Ally" -> "#00AAFF"; case "Enemy" -> "#FF5555"; @@ -387,7 +388,9 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, cmd.set(idx + " #PendingRow.Visible", isPending); if (isPending) { - String direction = item.isIncoming ? "Incoming request" : "Outgoing request"; + String direction = item.isIncoming + ? HFMessages.get(playerRef, MessageKeys.RelationsGui.INCOMING_REQUEST) + : HFMessages.get(playerRef, MessageKeys.RelationsGui.OUTGOING_REQUEST); cmd.set(idx + " #DirectionValue.Text", direction); cmd.set(idx + " #DirectionValue.Style.TextColor", item.isIncoming ? "#FFAA00" : "#88AAFF"); @@ -519,9 +522,9 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, private String getEmptyMessage(boolean canManage) { return switch (currentTab) { case RELATIONS -> canManage - ? "No relations yet. Click + SET RELATION to add allies or enemies." - : "No relations yet."; - case PENDING -> "No pending ally requests."; + ? HFMessages.get(playerRef, MessageKeys.RelationsGui.EMPTY_RELATIONS_HINT) + : HFMessages.get(playerRef, MessageKeys.RelationsGui.EMPTY_RELATIONS); + case PENDING -> HFMessages.get(playerRef, MessageKeys.RelationsGui.EMPTY_PENDING); }; } @@ -531,14 +534,24 @@ private String formatDate(long sinceMillis) { Instant.now() ); if (daysSince == 0) { - return "Today"; + return HFMessages.get(playerRef, MessageKeys.RelationsGui.TODAY); } else if (daysSince == 1) { - return "1 day ago"; + return HFMessages.get(playerRef, MessageKeys.RelationsGui.ONE_DAY_AGO); } else { - return daysSince + " days ago"; + return HFMessages.get(playerRef, MessageKeys.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); + default -> type; + }; + } + private record RelationItem(UUID factionId, String factionName, String leaderName, String type, long sinceMillis, int memberCount, double power, double maxPower, int claims, @@ -635,7 +648,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", "Only officers and leaders can change faction settings."); + cmd.set("#ErrorMessage.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.OFFICERS_ONLY)); events.addEventBinding( CustomUIEventBindingType.Activating, "#CloseBtn", @@ -141,7 +142,7 @@ private void buildGeneralSettings(UICommandBuilder cmd, UIEventBuilder events) { // Tag String tagDisplay = faction.tag() != null && !faction.tag().isEmpty() ? "[" + faction.tag().toUpperCase() + "]" - : "(None)"; + : HFMessages.get(playerRef, MessageKeys.SettingsGui.DISPLAY_NONE); cmd.set("#TagValue.Text", tagDisplay); events.addEventBinding(CustomUIEventBindingType.Activating, "#TagEditBtn", EventData.of("Button", "OpenTagModal"), false); @@ -149,15 +150,15 @@ private void buildGeneralSettings(UICommandBuilder cmd, UIEventBuilder events) { // Description String desc = faction.description() != null && !faction.description().isEmpty() ? faction.description() - : "(None)"; + : HFMessages.get(playerRef, MessageKeys.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("Open"), "OPEN"), - new DropdownEntryInfo(LocalizableString.fromString("Invite Only"), "INVITE_ONLY") + 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") )); cmd.set("#RecruitmentDropdown.Value", faction.open() ? "OPEN" : "INVITE_ONLY"); events.addEventBinding(CustomUIEventBindingType.ValueChanged, "#RecruitmentDropdown", @@ -223,7 +224,9 @@ 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() ? "Enabled" : "Disabled"); + cmd.set("#PvPStatus.Text", perms.pvpEnabled() + ? HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_ENABLED) + : HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_DISABLED)); cmd.set("#PvPStatus.Style.TextColor", perms.pvpEnabled() ? "#55FF55" : "#FF5555"); // Officers can edit - only leader can change this @@ -300,7 +303,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", "Not set"); + cmd.set("#HomeLocation.Text", HFMessages.get(playerRef, MessageKeys.SettingsGui.HOME_NOT_SET)); cmd.set("#TeleportHomeBtn.Disabled", true); cmd.set("#DeleteHomeBtn.Disabled", true); } @@ -366,7 +369,7 @@ public void handleDataEvent(Ref ref, Store store, // Verify permissions if (member == null || member.role().getLevel() < FactionRole.OFFICER.getLevel()) { - player.sendMessage(MessageUtil.errorText("You don't have permission to change settings.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.SettingsGui.NO_PERMISSION)); sendUpdate(); return; } @@ -386,7 +389,7 @@ public void handleDataEvent(Ref ref, Store store, case "OpenModules" -> guiManager.openFactionModules(player, ref, store, playerRef, faction); case "Disband" -> { if (!isLeader) { - player.sendMessage(MessageUtil.errorText("Only the leader can disband the faction.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.SettingsGui.ONLY_LEADER_DISBAND)); sendUpdate(); return; } @@ -407,19 +410,19 @@ private void handleTogglePerm(Player player, Ref ref, Store ref, Store Faction updatedFaction = faction.withOpen(isOpen); factionManager.updateFaction(updatedFaction); - player.sendMessage(Message.raw("Recruitment set to " + (isOpen ? "Open" : "Invite Only") + ".").color("#55FF55")); + 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)); Faction freshFaction = factionManager.getFaction(faction.id()); guiManager.openFactionSettings(player, ref, store, playerRef, freshFaction); @@ -492,7 +498,7 @@ private void handleSetHome(Player player, Ref ref, Store ref, Store ref, Store store, UUID uuid) { if (faction.home() == null) { - player.sendMessage(MessageUtil.errorText("No faction home set.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.Home.NO_HOME)); sendUpdate(); return; } @@ -526,14 +532,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.errorText("You are not in a faction.")); - case NO_HOME -> player.sendMessage(MessageUtil.errorText("Your faction has no home set.")); - case COMBAT_TAGGED -> player.sendMessage(MessageUtil.errorText("You cannot teleport while in combat!")); - case SUCCESS_INSTANT -> player.sendMessage(MessageUtil.successText("Teleported to faction home!")); + 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 ON_COOLDOWN, SUCCESS_WARMUP -> {} // Message sent by TeleportManager default -> {} } @@ -592,7 +598,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.text("Your faction does not have a home set.", MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.info(playerRef, MessageKeys.SettingsGui.HOME_NO_SET, MessageUtil.COLOR_GOLD)); sendUpdate(); return; } @@ -600,7 +606,7 @@ private void handleDeleteHome(Player player, Ref ref, Store 0) { events.addEventBinding( @@ -186,7 +187,7 @@ private List getSearchResults() { PowerManager.FactionPowerStats stats = powerManager.getFactionPowerStats(f.id()); FactionMember leader = f.getLeader(); - String leaderName = leader != null ? leader.username() : "Unknown"; + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); entries.add(new FactionEntry( f.id(), @@ -217,9 +218,9 @@ private void buildFactionCards(UICommandBuilder cmd, UIEventBuilder events, // Faction info cmd.set(prefix + "#FactionName.Text", entry.name); - cmd.set(prefix + "#LeaderName.Text", "Leader: " + entry.leaderName); - cmd.set(prefix + "#PowerCount.Text", String.format("%.0f power", entry.power)); - cmd.set(prefix + "#MemberCount.Text", entry.memberCount + " members"); + 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)); // Ally button events.addEventBinding( @@ -294,7 +295,7 @@ public void handleDataEvent(Ref ref, Store store, case "RequestAlly" -> { if (!canManage) { - player.sendMessage(MessageUtil.errorText("You don't have permission to manage relations.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.SettingsGui.NO_PERMISSION)); sendUpdate(); return; } @@ -302,7 +303,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID targetId = UuidUtil.parseOrNull(data.factionId); if (targetId == null) { - player.sendMessage(MessageUtil.errorText("Invalid faction.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.BrowserGui.INVALID_FACTION)); sendUpdate(); return; } @@ -310,17 +311,17 @@ public void handleDataEvent(Ref ref, Store store, RelationManager.RelationResult result = relationManager.requestAlly(uuid, targetId); if (result == RelationManager.RelationResult.REQUEST_SENT) { - player.sendMessage(Message.raw("Alliance request sent to " + data.factionName + ".").color("#00AAFF")); + player.sendMessage(MessageUtil.info(playerRef, MessageKeys.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(Message.raw("Now allied with " + data.factionName + "!").color("#00AAFF")); + player.sendMessage(MessageUtil.info(playerRef, MessageKeys.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(Message.raw("Failed: " + result).color("#FF5555")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RelationsGui.FAILED, result)); guiManager.openFactionRelations(player, ref, store, playerRef, factionManager.getFaction(faction.id())); } @@ -329,7 +330,7 @@ public void handleDataEvent(Ref ref, Store store, case "SetEnemy" -> { if (!canManage) { - player.sendMessage(MessageUtil.errorText("You don't have permission to manage relations.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.SettingsGui.NO_PERMISSION)); sendUpdate(); return; } @@ -337,7 +338,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID targetId = UuidUtil.parseOrNull(data.factionId); if (targetId == null) { - player.sendMessage(MessageUtil.errorText("Invalid faction.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.BrowserGui.INVALID_FACTION)); sendUpdate(); return; } @@ -345,9 +346,9 @@ public void handleDataEvent(Ref ref, Store store, RelationManager.RelationResult result = relationManager.setEnemy(uuid, targetId); if (result == RelationManager.RelationResult.SUCCESS) { - player.sendMessage(Message.raw("Now enemies with " + data.factionName + "!").color("#FF5555")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RelationsGui.NOW_ENEMIES, data.factionName)); } else { - player.sendMessage(Message.raw("Failed: " + result).color("#FF5555")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.RelationsGui.FAILED, result)); } guiManager.openFactionRelations(player, ref, store, playerRef, @@ -359,7 +360,7 @@ public void handleDataEvent(Ref ref, Store store, if (data.factionId != null) { UUID targetId = UuidUtil.parseOrNull(data.factionId); if (targetId == null) { - player.sendMessage(MessageUtil.errorText("Invalid faction.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.BrowserGui.INVALID_FACTION)); sendUpdate(); return; } @@ -369,7 +370,7 @@ public void handleDataEvent(Ref ref, Store store, if (targetFaction != null) { guiManager.openFactionInfo(player, ref, store, playerRef, targetFaction, "relations"); } else { - player.sendMessage(MessageUtil.errorText("Faction no longer exists.")); + player.sendMessage(MessageUtil.error(playerRef, MessageKeys.PlayerInfoGui.FACTION_GONE)); sendUpdate(); } } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index dc5b8f77..ae9f692b 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -892,6 +892,79 @@ public static final class ChatDisplay { private ChatDisplay() {} } + /** Relations page labels and messages. */ + public static final class RelationsGui { + 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"; + + private RelationsGui() {} + } + + /** Settings page labels and messages. */ + public static final class SettingsGui { + 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 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() {} + } + /** Player settings page labels. */ public static final class PlayerSettings { public static final String TITLE = "hyperfactions_gui.player_settings.title"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index fda358aa..1531ce85 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -144,3 +144,64 @@ playerinfo.reason_active = ACTIVE playerinfo.reason_left = LEFT playerinfo.reason_kicked = KICKED playerinfo.reason_disbanded = DISBANDED + +# ========== Relations Page ========== +relations.relation_count = {0} relations +relations.request_count = {0} requests +relations.type_ally = Ally +relations.type_enemy = Enemy +relations.type_incoming = Incoming +relations.type_outgoing = Outgoing +relations.incoming_request = Incoming request +relations.outgoing_request = Outgoing request +relations.empty_relations = No relations yet. +relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. +relations.empty_pending = No pending ally requests. +relations.today = Today +relations.one_day_ago = 1 day ago +relations.days_ago = {0} days ago +relations.now_neutral = Now neutral with {0}. +relations.now_enemies = Now enemies with {0}! +relations.request_sent = Alliance request sent to {0}. +relations.now_allied = Now allied with {0}! +relations.request_declined = Ally request from {0} declined. +relations.request_cancelled = Ally request to {0} cancelled. +relations.failed = Failed: {0} +relations.search_hint = Search for a faction to set relation +relations.no_results = No factions found matching '{0}' +relations.power_display = {0} power +relations.member_count = {0} members + +# ========== Settings Page ========== +settings.officers_only = Only officers and leaders can change faction settings. +settings.display_none = (None) +settings.home_not_set = Not set +settings.no_permission = You don't have permission to change settings. +settings.only_leader_disband = Only the leader can disband the faction. +settings.perm_locked = This setting is locked by the server. +settings.no_perm_edit = You don't have permission to edit territory permissions. +settings.only_leader_officers = Only the leader can change officer access. +settings.pvp_enabled = Enabled +settings.pvp_disabled = Disabled +settings.not_in_territory = You must be in your faction's territory to set home. +settings.home_set = Faction home set to your current location! +settings.recruitment_set = Recruitment set to {0}. +settings.home_no_set = Your faction does not have a home set. +settings.home_deleted = Faction home deleted! + +# ========== Modules Page ========== +modules.treasury_name = Treasury +modules.treasury_desc = Faction bank & economy system +modules.raids_name = Raids +modules.raids_desc = Scheduled faction battles +modules.levels_name = Levels +modules.levels_desc = Faction progression & XP +modules.war_name = War +modules.war_desc = Formal war declarations +modules.coming_soon = Coming Soon +modules.active = Active +modules.view_treasury = View Treasury +modules.unavailable = Unavailable +modules.no_economy = No economy plugin detected +modules.disabled = Disabled +modules.economy_not_available = Economy features are not available on this server From b8d955c7082df2118464407e66c6b8f29754eb3e Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 16:15:58 -0700 Subject: [PATCH 14/55] feat: localize Treasury pages (Phase 3e) Migrate all 5 treasury page classes to i18n: - TreasuryPage: dashboard stats, upkeep, transaction type names, actor names - TreasuryDepositModalPage: deposit/withdraw modal labels and messages - TreasuryTransferSearchPage: search results, player/faction tags - TreasuryTransferConfirmPage: fee labels, transfer result messages - TreasurySettingsPage: leader-only permission errors, limit validation Add ~70 treasury keys to MessageKeys.TreasuryGui and hyperfactions_gui.lang. --- .../page/TreasuryDepositModalPage.java | 67 +++++++++------- .../gui/faction/page/TreasuryPage.java | 69 +++++++++------- .../faction/page/TreasurySettingsPage.java | 9 ++- .../page/TreasuryTransferConfirmPage.java | 38 +++++---- .../page/TreasuryTransferSearchPage.java | 22 ++++-- .../com/hyperfactions/util/MessageKeys.java | 79 +++++++++++++++++++ .../Languages/en-US/hyperfactions_gui.lang | 69 ++++++++++++++++ 7 files changed, 270 insertions(+), 83 deletions(-) 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 0e8b860d..a617809d 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TreasuryDepositModalPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TreasuryDepositModalPage.java @@ -16,6 +16,8 @@ import com.hyperfactions.integration.economy.VaultEconomyProvider; import com.hyperfactions.manager.EconomyManager; import com.hyperfactions.manager.FactionManager; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.UiUtil; import com.hypixel.hytale.component.Ref; @@ -81,23 +83,29 @@ public void build(Ref ref, UICommandBuilder cmd, UUID uuid = playerRef.getUuid(); // Set mode subtitle - cmd.set("#ModeLabel.Text", isDeposit ? "Deposit to Treasury" : "Withdraw from Treasury"); + cmd.set("#ModeLabel.Text", isDeposit + ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.DEPOSIT_TITLE) + : HFMessages.get(playerRef, MessageKeys.TreasuryGui.WITHDRAW_TITLE)); // Set balances VaultEconomyProvider vault = economyManager.getVaultProvider(); - cmd.set("#WalletLabel.Text", "Your wallet: " + economyManager.formatCurrency(vault.getBalanceBigDecimal(uuid))); + cmd.set("#WalletLabel.Text", HFMessages.get(playerRef, MessageKeys.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", "Treasury balance: " + economyManager.formatCurrency(treasuryBalance)); + cmd.set("#TreasuryLabel.Text", HFMessages.get(playerRef, MessageKeys.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", "Fee (" + feePercent.toPlainString() + "%):"); + cmd.set("#FeeLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.FEE_LABEL, feePercent.toPlainString())); // Confirm button text - cmd.set("#ConfirmBtn.Text", isDeposit ? "Confirm Deposit" : "Confirm Withdrawal"); + cmd.set("#ConfirmBtn.Text", isDeposit + ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.CONFIRM_DEPOSIT) + : HFMessages.get(playerRef, MessageKeys.TreasuryGui.CONFIRM_WITHDRAWAL)); // Check withdraw permission if (!isDeposit) { @@ -177,10 +185,12 @@ 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", economyManager.formatCurrency(total) + " from wallet"); + cmd.set("#FeeTotal.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.FROM_WALLET, + economyManager.formatCurrency(total))); } else { BigDecimal net = amount.subtract(fee); - cmd.set("#FeeTotal.Text", economyManager.formatCurrency(net) + " to wallet"); + cmd.set("#FeeTotal.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.TO_WALLET, + economyManager.formatCurrency(net))); } } @@ -200,7 +210,7 @@ private void handleConfirm(Player player, Ref ref, Store ref, Store ref, Store 0) { - msg += " (fee: " + economyManager.formatCurrency(fee) + ")"; + player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.TreasuryGui.DEPOSITED_FEE, + economyManager.formatCurrency(amount), economyManager.formatCurrency(fee))); + } else { + player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.TreasuryGui.DEPOSITED, + economyManager.formatCurrency(amount))); } - player.sendMessage(MessageUtil.successText(msg)); Faction fresh = factionManager.getFaction(faction.id()); if (fresh != null) { @@ -261,7 +273,7 @@ private void handleWithdrawConfirm(Player player, Ref ref, Store ref, Store ref, Store - player.sendMessage(MessageUtil.errorText("Insufficient funds in treasury.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.TreasuryGui.INSUFFICIENT_TREASURY)); case LIMIT_EXCEEDED -> - player.sendMessage(MessageUtil.errorText("Withdrawal limit exceeded.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.TreasuryGui.WITHDRAW_LIMIT)); default -> - player.sendMessage(MessageUtil.errorText("Withdrawal failed: " + result)); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.TreasuryGui.WITHDRAW_FAILED, result)); } sendUpdate(); return; @@ -293,18 +305,19 @@ private void handleWithdrawConfirm(Player player, Ref ref, Store 0) { - msg += " (fee: " + economyManager.formatCurrency(fee) + ", received: " - + economyManager.formatCurrency(netToWallet) + ")"; + player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.TreasuryGui.WITHDREW_FEE, + economyManager.formatCurrency(amount), economyManager.formatCurrency(fee), + economyManager.formatCurrency(netToWallet))); + } else { + player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.TreasuryGui.WITHDREW, + economyManager.formatCurrency(amount))); } - player.sendMessage(MessageUtil.successText(msg)); Faction fresh = factionManager.getFaction(faction.id()); if (fresh != null) { 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 66844e78..a4f0b9e8 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java @@ -16,6 +16,8 @@ import com.hyperfactions.gui.faction.data.TreasuryData; import com.hyperfactions.manager.EconomyManager; import com.hyperfactions.manager.FactionManager; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.UiUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -114,7 +116,8 @@ private void buildStatCards(UICommandBuilder cmd, FactionEconomy economy, UUID u // Wallet balance BigDecimal walletBalance = economyManager.getVaultProvider().getBalanceBigDecimal(uuid); - cmd.set("#WalletBalance.Text", "Your wallet: " + economyManager.formatCurrencyCompact(walletBalance)); + cmd.set("#WalletBalance.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.WALLET_LABEL, + economyManager.formatCurrencyCompact(walletBalance))); // 24h P&L PnlResult pnl = calculatePnl(economy); @@ -160,11 +163,10 @@ private void buildUpkeepSection(UICommandBuilder cmd, UIEventBuilder events, } // Show chunk breakdown - String chunkDetail = freeChunks > 0 - ? String.format("%d free + %d billable chunks", Math.min(freeChunks, claimCount), billableChunks) - : billableChunks + " billable chunks"; - cmd.set("#UpkeepCost.Text", "Cost: " + economyManager.formatCurrency(costPerCycle) - + " every " + intervalHours + "h"); + String chunkDetail = HFMessages.get(playerRef, MessageKeys.TreasuryGui.CHUNKS_DETAIL, + Math.min(freeChunks, claimCount), billableChunks); + String costString = economyManager.formatCurrency(costPerCycle) + " every " + intervalHours + "h"; + cmd.set("#UpkeepCost.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.COST_LABEL, costString)); cmd.set("#UpkeepDetail.Text", chunkDetail); // Color-code the progress bar based on status @@ -180,10 +182,14 @@ private void buildUpkeepSection(UICommandBuilder cmd, UIEventBuilder events, } cmd.set("#UpkeepBar.Value", progress); cmd.set("#UpkeepBar.Bar.Color", barColor); - cmd.set("#UpkeepTimer.Text", remaining < 0 ? "Pending" : formatDuration(remaining) + " left"); + cmd.set("#UpkeepTimer.Text", remaining < 0 + ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.PENDING) + : formatDuration(remaining) + " left"); boolean autoPay = economy != null && economy.upkeepAutoPay(); - cmd.set("#AutoPayStatus.Text", "Auto-pay: " + (autoPay ? "ON" : "OFF")); + cmd.set("#AutoPayStatus.Text", autoPay + ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.AUTO_PAY_ON) + : HFMessages.get(playerRef, MessageKeys.TreasuryGui.AUTO_PAY_OFF)); cmd.set("#AutoPayStatus.Style.TextColor", autoPay ? "#55FF55" : "#FF5555"); // Cost projections row @@ -206,19 +212,23 @@ private void buildUpkeepSection(UICommandBuilder cmd, UIEventBuilder events, String runwayText; String runwayColor; if (runwayDays > 90) { - runwayText = "90+ days"; + runwayText = HFMessages.get(playerRef, MessageKeys.TreasuryGui.RUNWAY_90_PLUS); runwayColor = "#55FF55"; } else if (runwayDays > 0) { - runwayText = runwayDays + " day" + (runwayDays != 1 ? "s" : ""); + runwayText = runwayDays != 1 + ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.RUNWAY_DAYS, runwayDays) + : HFMessages.get(playerRef, MessageKeys.TreasuryGui.RUNWAY_DAY, runwayDays); runwayColor = runwayDays <= 3 ? "#FF5555" : runwayDays <= 7 ? "#FFAA00" : "#55FF55"; } else { - runwayText = "< 1 day"; + runwayText = HFMessages.get(playerRef, MessageKeys.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 ? "No funds" : "N/A"); + cmd.set("#RunwayValue.Text", balance.compareTo(BigDecimal.ZERO) == 0 + ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.RUNWAY_NO_FUNDS) + : HFMessages.get(playerRef, MessageKeys.Common.NA)); cmd.set("#RunwayValue.Style.TextColor", "#FF5555"); } } @@ -229,13 +239,16 @@ 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", "Grace expires in: " + formatDuration(graceRemaining)); - cmd.set("#MissedCount.Text", "Missed payments: " + economy.consecutiveMissedPayments()); + cmd.set("#GraceTimer.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.GRACE_EXPIRES, + formatDuration(graceRemaining))); + cmd.set("#MissedCount.Text", HFMessages.get(playerRef, MessageKeys.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", "Pay " + economyManager.formatCurrency(costPerCycle) + " to clear grace"); + cmd.set("#PayNowCost.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.PAY_TO_CLEAR, + economyManager.formatCurrency(costPerCycle))); events.addEventBinding(CustomUIEventBindingType.Activating, "#PayNowBtn", EventData.of("Button", "PayNow"), false); } @@ -477,19 +490,19 @@ private static String formatDuration(long millis) { return minutes + "m"; } - private static String getHumanTypeName(EconomyAPI.TransactionType type) { + private String getHumanTypeName(EconomyAPI.TransactionType type) { return switch (type) { - case DEPOSIT -> "Deposit"; - case WITHDRAW -> "Withdrawal"; - case TRANSFER_IN -> "Transfer In"; - case TRANSFER_OUT -> "Transfer Out"; - case PLAYER_TRANSFER_OUT -> "Player Transfer"; - case UPKEEP -> "Upkeep"; - case TAX_COLLECTION -> "Tax Collection"; - case WAR_COST -> "War Cost"; - case RAID_COST -> "Raid Cost"; - case SPOILS -> "Spoils"; - case ADMIN_ADJUSTMENT -> "Admin Adjustment"; + 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); }; } @@ -511,7 +524,7 @@ private static String getTypeSign(EconomyAPI.TransactionType type) { private String resolveActorName(UUID actorId) { if (actorId == null) { - return "System"; + return HFMessages.get(playerRef, MessageKeys.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 7264dd94..655f8ae2 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TreasurySettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TreasurySettingsPage.java @@ -12,6 +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.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -150,7 +153,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) ? "[Player]" : "[Faction]"; + String typeTag = "player".equals(targetType) + ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.TAG_PLAYER) + : HFMessages.get(playerRef, MessageKeys.TreasuryGui.TAG_FACTION); cmd.set("#TargetType.Text", typeTag); // Set tag color dynamically (Labels support .Style.TextColor) if ("faction".equals(targetType)) { @@ -93,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", "Treasury: " + economyManager.formatCurrency(treasuryBalance)); + cmd.set("#TreasuryLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.TREASURY_LABEL, economyManager.formatCurrency(treasuryBalance))); // Fee label BigDecimal feePercent = ConfigManager.get().getTransferFeePercent(); - cmd.set("#FeeLabel.Text", "Fee (" + feePercent.toPlainString() + "%):"); + cmd.set("#FeeLabel.Text", HFMessages.get(playerRef, MessageKeys.TreasuryGui.FEE_LABEL, feePercent.toPlainString())); // Event bindings events.addEventBinding(CustomUIEventBindingType.Activating, "#CancelBtn", @@ -168,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", @@ -163,9 +167,11 @@ private List getSearchResults() { List players = PlayerResolver.search(plugin, searchQuery, selfUuid); for (PlayerResolver.ResolvedPlayer p : players) { String subtitle = switch (p.source()) { - case ONLINE -> "Online" + (p.factionName() != null ? " - " + p.factionName() : ""); - case FACTION_MEMBER -> "Offline - " + p.factionName(); - case PLAYER_DB -> "Hytale player"; + case ONLINE -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.SOURCE_ONLINE) + + (p.factionName() != null ? " - " + p.factionName() : ""); + case FACTION_MEMBER -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.SOURCE_OFFLINE) + + " - " + p.factionName(); + case PLAYER_DB -> HFMessages.get(playerRef, MessageKeys.TreasuryGui.SOURCE_PLAYER_DB); }; results.add(new SearchResult(p.uuid().toString(), p.username(), "player", subtitle)); } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index ae9f692b..940951f5 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -965,6 +965,85 @@ public static final class ModulesGui { private ModulesGui() {} } + /** Treasury page labels and messages. */ + public static final class TreasuryGui { + // 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"; + + private TreasuryGui() {} + } + /** Player settings page labels. */ public static final class PlayerSettings { public static final String TITLE = "hyperfactions_gui.player_settings.title"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index 1531ce85..ff77cbaf 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -205,3 +205,72 @@ modules.unavailable = Unavailable modules.no_economy = No economy plugin detected modules.disabled = Disabled modules.economy_not_available = Economy features are not available on this server + +# ========== Treasury Page ========== +treasury.wallet_label = Your wallet: {0} +treasury.treasury_label = Treasury balance: {0} +treasury.chunks_detail = {0} free + {1} billable chunks +treasury.cost_label = Cost: {0} +treasury.pending = Pending +treasury.auto_pay_on = Auto-pay: ON +treasury.auto_pay_off = Auto-pay: OFF +treasury.runway_90_plus = 90+ days +treasury.runway_days = {0} days +treasury.runway_day = {0} day +treasury.runway_less_day = < 1 day +treasury.runway_no_funds = No funds +treasury.grace_expires = Grace expires in: {0} +treasury.missed_payments = Missed payments: {0} +treasury.pay_to_clear = Pay {0} to clear grace +treasury.system = System +treasury.type_deposit = Deposit +treasury.type_withdrawal = Withdrawal +treasury.type_transfer_in = Transfer In +treasury.type_transfer_out = Transfer Out +treasury.type_player_transfer = Player Transfer +treasury.type_upkeep = Upkeep +treasury.type_tax = Tax Collection +treasury.type_war_cost = War Cost +treasury.type_raid_cost = Raid Cost +treasury.type_spoils = Spoils +treasury.type_admin = Admin Adjustment +treasury.deposit_title = Deposit to Treasury +treasury.withdraw_title = Withdraw from Treasury +treasury.fee_label = Fee ({0}%) +treasury.confirm_deposit = Confirm Deposit +treasury.confirm_withdrawal = Confirm Withdrawal +treasury.from_wallet = {0} from wallet +treasury.to_wallet = {0} to wallet +treasury.enter_valid_amount = Enter a valid positive amount. +treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. +treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. +treasury.deposit_failed_returned = Failed to deposit. Money returned. +treasury.deposited = Deposited {0} into the treasury. +treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) +treasury.no_withdraw_permission = You don't have permission to withdraw. +treasury.withdraw_denied = Withdrawal denied: {0} +treasury.insufficient_treasury = Insufficient funds in treasury. +treasury.withdraw_limit = Withdrawal limit exceeded. +treasury.withdraw_failed = Withdrawal failed: {0} +treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. +treasury.withdrew = Withdrew {0} from the treasury. +treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) +treasury.search_hint = Search for a player or faction +treasury.no_results = No results for '{0}' +treasury.tag_player = [Player] +treasury.tag_faction = [Faction] +treasury.source_online = Online +treasury.source_offline = Offline +treasury.source_player_db = Hytale player +treasury.no_transfer_permission = You don't have permission to transfer. +treasury.transfer_denied = Transfer denied: {0} +treasury.invalid_target_faction = Invalid target faction. +treasury.target_faction_gone = Target faction no longer exists. +treasury.transfer_failed = Transfer failed: {0} +treasury.transfer_failed_returned = Transfer failed. Funds returned. +treasury.transferred = Transferred {0} to {1}. +treasury.invalid_target_player = Invalid target player. +treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. +treasury.leader_only_perms = Only the leader can change treasury permissions. +treasury.leader_only_upkeep = Only the leader can change upkeep settings. +treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. From 96a3629d2aedebe7b2d34b88214bb037192b7c8f Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 16:27:54 -0700 Subject: [PATCH 15/55] feat: localize confirmation, logs, chat, invites, and map pages (Phase 3f) Migrate hardcoded strings to i18n keys across 8 remaining faction GUI pages: - DisbandConfirmPage, LeaderLeaveConfirmPage, LeaveConfirmPage, TransferConfirmPage - LogsViewerPage, FactionChatPage, FactionInvitesPage, ChunkMapPage Adds ConfirmGui, LogsGui, ChatGui, InvitesGui, and MapGui key groups with ~90 new translation entries in hyperfactions_gui.lang. --- .../gui/faction/page/ChunkMapPage.java | 67 +++++----- .../gui/faction/page/DisbandConfirmPage.java | 13 +- .../gui/faction/page/FactionChatPage.java | 18 +-- .../gui/faction/page/FactionInvitesPage.java | 48 +++---- .../faction/page/LeaderLeaveConfirmPage.java | 27 ++-- .../gui/faction/page/LeaveConfirmPage.java | 15 +-- .../gui/faction/page/LogsViewerPage.java | 16 ++- .../gui/faction/page/TransferConfirmPage.java | 15 +-- .../com/hyperfactions/util/MessageKeys.java | 118 ++++++++++++++++++ .../Languages/en-US/hyperfactions_gui.lang | 91 ++++++++++++++ 10 files changed, 318 insertions(+), 110 deletions(-) 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 43da1cf1..f8b89767 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/ChunkMapPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/ChunkMapPage.java @@ -15,6 +15,9 @@ import com.hyperfactions.gui.newplayer.NewPlayerNavBarHelper; import com.hyperfactions.integration.protection.OrbisGuardIntegration; import com.hyperfactions.manager.*; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; import com.hyperfactions.util.ChunkUtil; import com.hyperfactions.util.Logger; import com.hypixel.hytale.component.Ref; @@ -146,7 +149,7 @@ public void build(Ref ref, UICommandBuilder cmd, } // Current position info - cmd.set("#PositionInfo.Text", String.format("Your Position: Chunk (%d, %d)", playerChunkX, playerChunkZ)); + cmd.set("#PositionInfo.Text", HFMessages.get(playerRef, MessageKeys.MapGui.POSITION, playerChunkX, playerChunkZ)); // Dynamic legend: add OrbisGuard protected region entry when OG is available if (OrbisGuardIntegration.isAvailable()) { @@ -155,13 +158,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: \" Protected\"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } }"); + + "Label { Text: \" " + HFMessages.get(playerRef, MessageKeys.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: \" Protected\"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } }"); + + "Label { Text: \" " + HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_PROTECTED) + "\"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } }"); } } @@ -180,7 +183,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", String.format("Claims: %d/%d (%d Available)", currentClaims, maxClaims, available)); + cmd.set("#ClaimStats.Text", HFMessages.get(playerRef, MessageKeys.MapGui.CLAIM_STATS, currentClaims, maxClaims, available)); // Power status with overclaim warning double currentPower = stats.currentPower(); @@ -190,13 +193,13 @@ public void build(Ref ref, UICommandBuilder cmd, if (isOverclaimed) { // Show overclaim warning in red int overclaimAmount = currentClaims - (int) currentPower; - cmd.set("#PowerStatus.Text", String.format("OVERCLAIMED by %d!", overclaimAmount)); + cmd.set("#PowerStatus.Text", HFMessages.get(playerRef, MessageKeys.MapGui.OVERCLAIMED, overclaimAmount)); } else { // Normal power display - cmd.set("#PowerStatus.Text", String.format("Power: %.0f/%.0f", currentPower, maxPower)); + cmd.set("#PowerStatus.Text", HFMessages.get(playerRef, MessageKeys.MapGui.POWER_DISPLAY, (int) currentPower, (int) maxPower)); } } else { - cmd.set("#ClaimStats.Text", "Join a faction to claim"); + cmd.set("#ClaimStats.Text", HFMessages.get(playerRef, MessageKeys.MapGui.JOIN_TO_CLAIM)); cmd.set("#PowerStatus.Text", ""); } @@ -553,16 +556,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("Claimed chunk at (" + chunkX + ", " + chunkZ + ")!").color("#55FF55")); - case NOT_IN_FACTION -> CommandUtil.prefix().insert(Message.raw("You must be in a faction to claim territory.").color("#FF5555")); - case NOT_OFFICER -> CommandUtil.prefix().insert(Message.raw("Only officers and leaders can claim territory.").color("#FF5555")); - case ALREADY_CLAIMED_SELF -> CommandUtil.prefix().insert(Message.raw("You already own this chunk.").color("#FFAA00")); - case ALREADY_CLAIMED_OTHER -> CommandUtil.prefix().insert(Message.raw("This chunk is already claimed by another faction.").color("#FF5555")); - case NOT_ADJACENT -> CommandUtil.prefix().insert(Message.raw("You can only claim chunks adjacent to your territory.").color("#FF5555")); - case MAX_CLAIMS_REACHED -> CommandUtil.prefix().insert(Message.raw("You have reached your maximum claim limit.").color("#FF5555")); - case WORLD_NOT_ALLOWED -> CommandUtil.prefix().insert(Message.raw("Claiming is not allowed in this world.").color("#FF5555")); - case ORBISGUARD_PROTECTED -> CommandUtil.prefix().insert(Message.raw("This area is protected by OrbisGuard.").color("#FF5555")); - default -> CommandUtil.prefix().insert(Message.raw("Failed to claim chunk.").color("#FF5555")); + 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")); }; player.sendMessage(message); @@ -577,13 +580,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("Unclaimed chunk at (" + chunkX + ", " + chunkZ + ").").color("#55FF55")); - case NOT_IN_FACTION -> CommandUtil.prefix().insert(Message.raw("You must be in a faction.").color("#FF5555")); - case NOT_OFFICER -> CommandUtil.prefix().insert(Message.raw("Only officers and leaders can unclaim territory.").color("#FF5555")); - case CHUNK_NOT_CLAIMED -> CommandUtil.prefix().insert(Message.raw("This chunk is not claimed.").color("#FFAA00")); - case NOT_YOUR_CLAIM -> CommandUtil.prefix().insert(Message.raw("This chunk belongs to another faction.").color("#FF5555")); - case CANNOT_UNCLAIM_HOME -> CommandUtil.prefix().insert(Message.raw("Cannot unclaim the chunk containing your faction home.").color("#FF5555")); - default -> CommandUtil.prefix().insert(Message.raw("Failed to unclaim chunk.").color("#FF5555")); + 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")); }; player.sendMessage(message); @@ -598,14 +601,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("Overclaimed enemy chunk at (" + chunkX + ", " + chunkZ + ")!").color("#55FF55")); - case NOT_IN_FACTION -> CommandUtil.prefix().insert(Message.raw("You must be in a faction.").color("#FF5555")); - case NOT_OFFICER -> CommandUtil.prefix().insert(Message.raw("Only officers and leaders can overclaim territory.").color("#FF5555")); - case ALREADY_CLAIMED_SELF -> CommandUtil.prefix().insert(Message.raw("You already own this chunk.").color("#FFAA00")); - case ALREADY_CLAIMED_ALLY -> CommandUtil.prefix().insert(Message.raw("You cannot overclaim allied territory.").color("#FF5555")); - case TARGET_HAS_POWER -> CommandUtil.prefix().insert(Message.raw("This faction has enough power to defend their territory.").color("#FF5555")); - case MAX_CLAIMS_REACHED -> CommandUtil.prefix().insert(Message.raw("You have reached your maximum claim limit.").color("#FF5555")); - default -> CommandUtil.prefix().insert(Message.raw("Failed to overclaim chunk.").color("#FF5555")); + 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")); }; 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 829c9e07..703a8146 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/DisbandConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/DisbandConfirmPage.java @@ -8,11 +8,12 @@ import com.hyperfactions.gui.shared.data.DisbandConfirmData; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; -import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.entity.entities.Player; import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; import com.hypixel.hytale.server.core.ui.builder.EventData; @@ -94,7 +95,7 @@ public void handleDataEvent(Ref ref, Store store, // Verify leader permission if (member == null || member.role() != FactionRole.LEADER) { - player.sendMessage(MessageUtil.errorText("Only the leader can disband the faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.DISBAND_NOT_LEADER)); guiManager.openFactionSettings(player, ref, store, playerRef, factionManager.getFaction(faction.id())); return; @@ -115,13 +116,9 @@ public void handleDataEvent(Ref ref, Store store, FactionManager.FactionResult result = factionManager.disbandFaction(faction.id(), uuid); if (result == FactionManager.FactionResult.SUCCESS) { - player.sendMessage( - Message.raw("Faction '").color("#FF5555") - .insert(Message.raw(factionName).color("#AAAAAA")) - .insert(Message.raw("' has been disbanded.").color("#FF5555")) - ); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.DISBANDED, factionName)); } else { - player.sendMessage(MessageUtil.errorText("Failed to disband faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.DISBAND_FAILED)); } guiManager.openFactionMain(player, ref, store, playerRef); diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionChatPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionChatPage.java index 19057afb..8595ebe4 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionChatPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionChatPage.java @@ -17,6 +17,8 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.Logger; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -109,7 +111,7 @@ public void build(Ref ref, UICommandBuilder cmd, buildMessageList(cmd); // Chat input placeholder - cmd.set("#ChatInput.PlaceholderText", "Type a message..."); + cmd.set("#ChatInput.PlaceholderText", HFMessages.get(playerRef, MessageKeys.ChatGui.PLACEHOLDER)); // Build chat input bar events buildChatInputEvents(events); @@ -157,7 +159,7 @@ private void buildMessageList(UICommandBuilder cmd) { if (messages.isEmpty()) { cmd.appendInline("#MessageList", - "Label { Text: \"No messages yet.\"; Style: (FontSize: 12, TextColor: #555555); " + "Label { Text: \"" + HFMessages.get(playerRef, MessageKeys.ChatGui.NO_MESSAGES) + "\"; Style: (FontSize: 12, TextColor: #555555); " + "Anchor: (Height: 30); }"); return; } @@ -229,13 +231,13 @@ private String formatTimestamp(long timestamp) { // Recent: show relative time if (ageMs < 60_000) { - return "now"; + return HFMessages.get(playerRef, MessageKeys.ChatGui.TIME_NOW); } else if (ageMs < 3_600_000) { long minutes = ageMs / 60_000; - return minutes + "m"; + return HFMessages.get(playerRef, MessageKeys.ChatGui.TIME_MINUTES, minutes); } else if (ageMs < 86_400_000) { long hours = ageMs / 3_600_000; - return hours + "h"; + return HFMessages.get(playerRef, MessageKeys.ChatGui.TIME_HOURS, hours); } // Older: show date + time @@ -284,7 +286,7 @@ public void handleDataEvent(Ref ref, Store store, } case "TabAlly" -> { if (!PermissionManager.get().hasPermission(pRef.getUuid(), Permissions.CHAT_ALLY)) { - player.sendMessage(MessageUtil.errorText("You don't have permission for ally chat.")); + player.sendMessage(MessageUtil.errorText(pRef, MessageKeys.ChatGui.NO_ALLY_PERMISSION)); rebuild(); return; } @@ -314,7 +316,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("No permission.")); + player.sendMessage(MessageUtil.errorText(pRef, MessageKeys.ChatGui.NO_PERMISSION)); rebuild(); return; } @@ -322,7 +324,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("Your faction no longer exists.")); + player.sendMessage(MessageUtil.errorText(pRef, MessageKeys.ChatGui.FACTION_GONE)); rebuild(); return; } 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 d5bfdfde..d56634f8 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionInvitesPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionInvitesPage.java @@ -12,6 +12,8 @@ import com.hyperfactions.manager.InviteManager; import com.hyperfactions.manager.JoinRequestManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -131,7 +133,9 @@ private void buildList(UICommandBuilder cmd, UIEventBuilder events) { : getJoinRequests(); // Count - String countText = items.size() + (currentTab == Tab.OUTGOING ? " invites" : " requests"); + String countText = currentTab == Tab.OUTGOING + ? HFMessages.get(playerRef, MessageKeys.InvitesGui.INVITE_COUNT, items.size()) + : HFMessages.get(playerRef, MessageKeys.InvitesGui.REQUEST_COUNT, items.size()); cmd.set("#ItemCount.Text", countText); // Calculate pagination @@ -160,7 +164,7 @@ private void buildList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -200,7 +204,7 @@ private List getOutgoingInvites() { playerUuid.toString(), playerName, true, - "Invited by: " + inviterName, + HFMessages.get(playerRef, MessageKeys.InvitesGui.INVITED_BY, inviterName), null, invite.getRemainingSeconds() )); @@ -218,7 +222,7 @@ private List getJoinRequests() { for (JoinRequest request : requests) { String message = request.message(); if (message == null || message.isBlank()) { - message = "No message"; + message = HFMessages.get(playerRef, MessageKeys.InvitesGui.NO_MESSAGE); } else if (message.length() > 50) { message = message.substring(0, 47) + "..."; } @@ -248,14 +252,14 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, // Basic info cmd.set(idx + " #PlayerName.Text", item.playerName); - cmd.set(idx + " #StatusInfo.Text", "Expires: " + formatTime(item.remainingSeconds)); + cmd.set(idx + " #StatusInfo.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.EXPIRES, formatTime(item.remainingSeconds))); // Type badge if (item.isOutgoing) { - cmd.set(idx + " #TypeLabel.Text", "Outgoing"); + cmd.set(idx + " #TypeLabel.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.TYPE_OUTGOING)); cmd.set(idx + " #TypeLabel.Style.TextColor", "#55FFFF"); } else { - cmd.set(idx + " #TypeLabel.Text", "Request"); + cmd.set(idx + " #TypeLabel.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.TYPE_REQUEST)); cmd.set(idx + " #TypeLabel.Style.TextColor", "#FFAA00"); } @@ -277,7 +281,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", "Invited by:"); + cmd.set(idx + " #InfoLabel.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.INVITED_BY_LABEL)); cmd.set(idx + " #InfoValue.Text", item.inviterInfo); cmd.set(idx + " #MessageRow.Visible", false); @@ -324,9 +328,9 @@ private void buildEntry(UICommandBuilder cmd, UIEventBuilder events, int index, private String getEmptyMessage() { if (currentTab == Tab.OUTGOING) { - return "No outgoing invites. Use /f invite to invite someone."; + return HFMessages.get(playerRef, MessageKeys.InvitesGui.EMPTY_OUTGOING); } else { - return "No join requests. Players can request to join with /f request."; + return HFMessages.get(playerRef, MessageKeys.InvitesGui.EMPTY_REQUESTS); } } @@ -343,11 +347,11 @@ private String getPlayerName(UUID playerUuid) { private String formatTime(int seconds) { if (seconds < 60) { - return seconds + "s"; + return HFMessages.get(playerRef, MessageKeys.InvitesGui.TIME_SECONDS, seconds); } else if (seconds < 3600) { - return (seconds / 60) + "m"; + return HFMessages.get(playerRef, MessageKeys.InvitesGui.TIME_MINUTES, seconds / 60); } else { - return (seconds / 3600) + "h"; + return HFMessages.get(playerRef, MessageKeys.InvitesGui.TIME_HOURS, seconds / 3600); } } @@ -426,7 +430,7 @@ private void handleCancelInvite(Player player, FactionPageData data) { UUID targetUuid = UuidUtil.parseOrNull(data.playerUuid); if (targetUuid == null) { - player.sendMessage(MessageUtil.errorText("Invalid player.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.InvitesGui.INVALID_PLAYER)); sendUpdate(); return; } @@ -434,7 +438,7 @@ private void handleCancelInvite(Player player, FactionPageData data) { inviteManager.removeInvite(faction.id(), targetUuid); String playerName = getPlayerName(targetUuid); - player.sendMessage(Message.raw("Cancelled invite to " + playerName + ".").color("#AAAAAA")); + player.sendMessage(Message.raw(HFMessages.get(playerRef, MessageKeys.InvitesGui.CANCELLED_INVITE, playerName)).color("#AAAAAA")); expandedItems.remove(data.playerUuid); rebuildList(); @@ -449,7 +453,7 @@ private void handleAcceptRequest(Player player, Ref ref, Store ref, Store ref, UICommandBuilder cmd, // Show succession information if (successor != null) { - cmd.set("#SuccessionTitle.Text", "Leadership will transfer to:"); + cmd.set("#SuccessionTitle.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.SUCCESSION_TITLE)); cmd.set("#SuccessorName.Text", successor.username()); cmd.set("#SuccessorRole.Text", successor.role().getDisplayName()); cmd.set("#WarningText.Text", ""); @@ -84,10 +85,10 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.set("#DisbandBtn.Visible", false); } else { // No successor - faction will disband - cmd.set("#SuccessionTitle.Text", "WARNING: No other members!"); + cmd.set("#SuccessionTitle.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.NO_MEMBERS_WARNING)); cmd.set("#SuccessorName.Text", ""); cmd.set("#SuccessorRole.Text", ""); - cmd.set("#WarningText.Text", "Leaving will disband the faction permanently."); + cmd.set("#WarningText.Text", HFMessages.get(playerRef, MessageKeys.ConfirmGui.WILL_DISBAND)); // Hide Leave button, show Disband button cmd.set("#LeaveBtn.Visible", false); @@ -127,13 +128,13 @@ public void handleDataEvent(Ref ref, Store store, // Verify still in faction and still leader if (member == null) { - player.sendMessage(MessageUtil.errorText("You are not in this faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.NOT_IN_FACTION)); guiManager.openFactionMain(player, ref, store, playerRef); return; } if (member.role() != FactionRole.LEADER) { - player.sendMessage(MessageUtil.errorText("You are no longer the leader.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.NOT_LEADER_ANYMORE)); Faction fresh = factionManager.getFaction(faction.id()); if (fresh != null) { guiManager.openFactionDashboard(player, ref, store, playerRef, fresh); @@ -157,7 +158,7 @@ public void handleDataEvent(Ref ref, Store store, case "Leave" -> { // Transfer leadership to successor and leave if (successor == null) { - player.sendMessage(MessageUtil.errorText("No successor available. Use disband instead.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.NO_SUCCESSOR)); return; } @@ -168,7 +169,7 @@ public void handleDataEvent(Ref ref, Store store, faction.id(), successor.uuid(), uuid); if (transferResult != FactionManager.FactionResult.SUCCESS) { - player.sendMessage(Message.raw("Failed to transfer leadership: " + transferResult).color("#FF5555")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.TRANSFER_FAILED, transferResult)); return; } @@ -177,16 +178,10 @@ public void handleDataEvent(Ref ref, Store store, faction.id(), uuid, uuid, false); if (leaveResult == FactionManager.FactionResult.SUCCESS) { - player.sendMessage( - Message.raw("Leadership transferred to ").color("#55FF55") - .insert(Message.raw(successor.username()).color("#00FFFF")) - .insert(Message.raw(". You have left ").color("#55FF55")) - .insert(Message.raw(factionName).color("#00FFFF")) - .insert(Message.raw(".").color("#55FF55")) - ); + player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.ConfirmGui.LEADER_LEFT, successor.username(), factionName)); guiManager.openFactionMain(player, ref, store, playerRef); } else { - player.sendMessage(Message.raw("Failed to leave faction: " + leaveResult).color("#FF5555")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.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 82c24f9b..2ff83803 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/LeaveConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/LeaveConfirmPage.java @@ -8,11 +8,12 @@ import com.hyperfactions.gui.faction.data.LeaveConfirmData; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; -import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.entity.entities.Player; import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; import com.hypixel.hytale.server.core.ui.builder.EventData; @@ -94,14 +95,14 @@ public void handleDataEvent(Ref ref, Store store, // Verify still in faction if (member == null) { - player.sendMessage(MessageUtil.errorText("You are not in this faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.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("Leaders cannot leave. Transfer leadership or disband the faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.LEADER_CANNOT_LEAVE)); guiManager.openFactionDashboard(player, ref, store, playerRef, factionManager.getFaction(faction.id())); return; @@ -125,14 +126,10 @@ public void handleDataEvent(Ref ref, Store store, faction.id(), uuid, uuid, false); if (result == FactionManager.FactionResult.SUCCESS) { - player.sendMessage( - Message.raw("You have left ").color("#FFAA00") - .insert(Message.raw(factionName).color("#00FFFF")) - .insert(Message.raw(".").color("#FFAA00")) - ); + player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.ConfirmGui.LEFT_FACTION, factionName)); guiManager.openFactionMain(player, ref, store, playerRef); } else { - player.sendMessage(Message.raw("Failed to leave faction: " + result).color("#FF5555")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.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 c6083b0c..9b662345 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/LogsViewerPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/LogsViewerPage.java @@ -10,6 +10,8 @@ import com.hyperfactions.gui.newplayer.NewPlayerNavBarHelper; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.TimeUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -79,7 +81,7 @@ public void build(Ref ref, UICommandBuilder cmd, } // Set title with faction name - cmd.set("#LogsTitle.Text", faction.name() + " - Activity Logs"); + cmd.set("#LogsTitle.Text", HFMessages.get(playerRef, MessageKeys.LogsGui.TITLE, faction.name())); buildLogList(cmd, events); } @@ -114,11 +116,11 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { int endIndex = Math.min(startIndex + LOGS_PER_PAGE, totalLogs); // Log count - cmd.set("#LogCount.Text", totalLogs + " entries"); + cmd.set("#LogCount.Text", HFMessages.get(playerRef, MessageKeys.LogsGui.ENTRY_COUNT, totalLogs)); // Filter dropdown List filterOptions = new ArrayList<>(); - filterOptions.add(new DropdownEntryInfo(LocalizableString.fromString("All Types"), "ALL")); + filterOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.LogsGui.ALL_TYPES)), "ALL")); for (FactionLog.LogType type : FactionLog.LogType.values()) { filterOptions.add(new DropdownEntryInfo(LocalizableString.fromString(type.getDisplayName()), type.name())); } @@ -137,9 +139,11 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { cmd.clear("#LogsList"); if (totalLogs == 0) { + String emptyText = filterType != null + ? HFMessages.get(playerRef, MessageKeys.LogsGui.NO_LOGS_TYPE) + : HFMessages.get(playerRef, MessageKeys.LogsGui.NO_LOGS); cmd.appendInline("#LogsList", - "Label { Text: \"" - + (filterType != null ? "No logs of this type." : "No activity logs yet.") + + "Label { Text: \"" + emptyText + "\"; Style: (FontSize: 11, TextColor: #555555); Anchor: (Height: 30); }"); } else { for (int i = startIndex; i < endIndex; i++) { @@ -161,7 +165,7 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( 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 21b91026..f98dd750 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TransferConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TransferConfirmPage.java @@ -8,11 +8,12 @@ import com.hyperfactions.gui.faction.data.TransferConfirmData; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; -import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.entity.entities.Player; import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; import com.hypixel.hytale.server.core.ui.builder.EventData; @@ -102,7 +103,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("Faction no longer exists.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.FACTION_GONE)); guiManager.openFactionMain(player, ref, store, playerRef); return; } @@ -111,7 +112,7 @@ public void handleDataEvent(Ref ref, Store store, // Verify leader permission if (member == null || member.role() != FactionRole.LEADER) { - player.sendMessage(MessageUtil.errorText("Only the leader can transfer leadership.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.NOT_LEADER_TRANSFER)); guiManager.openFactionMembers(player, ref, store, playerRef, currentFaction); return; } @@ -128,11 +129,7 @@ public void handleDataEvent(Ref ref, Store store, faction.id(), targetUuid, uuid); if (result == FactionManager.FactionResult.SUCCESS) { - player.sendMessage( - Message.raw("Leadership transferred to ").color("#55FF55") - .insert(Message.raw(targetName).color("#00FFFF")) - .insert(Message.raw(".").color("#55FF55")) - ); + player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.ConfirmGui.LEADERSHIP_TRANSFERRED, targetName)); // Refresh to show updated roles Faction refreshedFaction = factionManager.getFaction(faction.id()); if (refreshedFaction != null) { @@ -141,7 +138,7 @@ public void handleDataEvent(Ref ref, Store store, guiManager.openFactionMain(player, ref, store, playerRef); } } else { - player.sendMessage(Message.raw("Failed to transfer leadership: " + result).color("#FF5555")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.ConfirmGui.TRANSFER_FAILED, result)); guiManager.openFactionMembers(player, ref, store, playerRef, currentFaction); } } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 940951f5..1d0237cf 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -1044,6 +1044,124 @@ public static final class TreasuryGui { private TreasuryGui() {} } + /** Confirmation page messages (disband, leave, transfer). */ + public static final class ConfirmGui { + // 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 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"; + + private LogsGui() {} + } + + /** Faction chat page labels and messages. */ + public static final class ChatGui { + 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 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"; + + private InvitesGui() {} + } + + /** Chunk map page labels and messages. */ + public static final class MapGui { + 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() {} + } + /** Player settings page labels. */ public static final class PlayerSettings { public static final String TITLE = "hyperfactions_gui.player_settings.title"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index ff77cbaf..cc0b1d51 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -274,3 +274,94 @@ treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer r treasury.leader_only_perms = Only the leader can change treasury permissions. treasury.leader_only_upkeep = Only the leader can change upkeep settings. treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. + +# ========== Confirmation Pages ========== +confirm.disband_not_leader = Only the leader can disband the faction. +confirm.disbanded = Faction '{0}' has been disbanded. +confirm.disband_failed = Failed to disband faction. +confirm.succession_title = Leadership will transfer to: +confirm.no_members_warning = WARNING: No other members! +confirm.will_disband = Leaving will disband the faction permanently. +confirm.not_in_faction = You are not in this faction. +confirm.not_leader_anymore = You are no longer the leader. +confirm.no_successor = No successor available. Use disband instead. +confirm.transfer_failed = Failed to transfer leadership: {0} +confirm.leader_left = Leadership transferred to {0}. You have left {1}. +confirm.leave_failed = Failed to leave faction: {0} +confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. +confirm.left_faction = You have left {0}. +confirm.faction_gone = Faction no longer exists. +confirm.not_leader_transfer = Only the leader can transfer leadership. +confirm.leadership_transferred = Leadership transferred to {0}. + +# ========== Logs Viewer Page ========== +logs.title = {0} - Activity Logs +logs.entry_count = {0} entries +logs.all_types = All Types +logs.no_logs_type = No logs of this type. +logs.no_logs = No activity logs yet. + +# ========== Chat Page ========== +chat.placeholder = Type a message... +chat.no_messages = No messages yet. +chat.no_ally_permission = You don't have permission for ally chat. +chat.no_permission = No permission. +chat.faction_gone = Your faction no longer exists. +chat.time_now = now +chat.time_minutes = {0}m +chat.time_hours = {0}h + +# ========== Invites Page ========== +invites.invite_count = {0} invites +invites.request_count = {0} requests +invites.invited_by = Invited by: {0} +invites.no_message = No message +invites.expires = Expires: {0} +invites.type_outgoing = Outgoing +invites.type_request = Request +invites.invited_by_label = Invited by: +invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. +invites.empty_requests = No join requests. Players can request to join with /f request. +invites.invalid_player = Invalid player. +invites.cancelled_invite = Cancelled invite to {0}. +invites.player_joined = {0} has joined the faction! +invites.faction_full = Faction is full. Cannot accept request. +invites.add_failed = Failed to add player to faction. +invites.request_expired = Request not found or expired. +invites.request_declined = Declined join request from {0}. +invites.time_seconds = {0}s +invites.time_minutes = {0}m +invites.time_hours = {0}h + +# ========== Map Page ========== +map.position = Your Position: Chunk ({0}, {1}) +map.legend_protected = Protected +map.claim_stats = Claims: {0}/{1} ({2} Available) +map.overclaimed = OVERCLAIMED by {0}! +map.power_display = Power: {0}/{1} +map.join_to_claim = Join a faction to claim +map.claim_success = Claimed chunk at ({0}, {1})! +map.claim_not_in_faction = You must be in a faction to claim territory. +map.claim_not_officer = Only officers and leaders can claim territory. +map.claim_already_yours = You already own this chunk. +map.claim_already_claimed = This chunk is already claimed by another faction. +map.claim_not_adjacent = You can only claim chunks adjacent to your territory. +map.claim_max = You have reached your maximum claim limit. +map.claim_world_not_allowed = Claiming is not allowed in this world. +map.claim_orbisguard = This area is protected by OrbisGuard. +map.claim_failed = Failed to claim chunk. +map.unclaim_success = Unclaimed chunk at ({0}, {1}). +map.unclaim_not_in_faction = You must be in a faction. +map.unclaim_not_officer = Only officers and leaders can unclaim territory. +map.unclaim_not_claimed = This chunk is not claimed. +map.unclaim_not_yours = This chunk belongs to another faction. +map.unclaim_home = Cannot unclaim the chunk containing your faction home. +map.unclaim_failed = Failed to unclaim chunk. +map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! +map.overclaim_not_in_faction = You must be in a faction. +map.overclaim_not_officer = Only officers and leaders can overclaim territory. +map.overclaim_already_yours = You already own this chunk. +map.overclaim_ally = You cannot overclaim allied territory. +map.overclaim_has_power = This faction has enough power to defend their territory. +map.overclaim_max = You have reached your maximum claim limit. +map.overclaim_failed = Failed to overclaim chunk. From b572584533cd713b13bde1abe402a7862d0ccd25 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 16:58:44 -0700 Subject: [PATCH 16/55] feat: localize create faction and new player pages (Phase 3g) Migrate 85+ hardcoded strings across 4 new player GUI pages to i18n keys: - CreateFactionPage: preview labels, validation errors, success messages - InvitesPage: headers, counts, time formats, join result messages - NewPlayerBrowsePage: sort dropdown, status badges, action buttons, join/request flows - NewPlayerMapPage: position info, hint text, legend labels Add CreateGui and NewPlayerGui inner classes to MessageKeys with 53 new keys. Add MessageUtil.text() overload for i18n with color parameter. Reuse existing keys: FactionInfoGui.STATUS_*, SettingsGui.PVP_*, MapGui.POSITION, MapGui.LEGEND_PROTECTED, Common.ALREADY_IN_FACTION, Common.FACTION_NOT_FOUND. --- .../gui/newplayer/page/CreateFactionPage.java | 46 +++++----- .../gui/newplayer/page/InvitesPage.java | 59 ++++++------- .../newplayer/page/NewPlayerBrowsePage.java | 87 ++++++++----------- .../gui/newplayer/page/NewPlayerMapPage.java | 10 ++- .../com/hyperfactions/util/MessageKeys.java | 69 +++++++++++++++ .../com/hyperfactions/util/MessageUtil.java | 8 ++ .../Languages/en-US/hyperfactions_gui.lang | 56 ++++++++++++ 7 files changed, 227 insertions(+), 108 deletions(-) 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 360d07c5..4ef6bd4d 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/CreateFactionPage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/CreateFactionPage.java @@ -9,6 +9,8 @@ import com.hyperfactions.gui.newplayer.data.NewPlayerPageData; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -82,13 +84,13 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.set("#FactionColorPicker.Value", DEFAULT_COLOR); // Set preview defaults - cmd.set("#PreviewName.TextSpans", Message.raw("Your Faction Name").color(DEFAULT_COLOR)); - cmd.set("#PreviewLeader.Text", "Leader: " + playerRef.getUsername()); + 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())); // Recruitment dropdown cmd.set("#RecruitmentDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString("Invite Only"), "INVITE_ONLY"), - new DropdownEntryInfo(LocalizableString.fromString("Open"), "OPEN") + 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") )); cmd.set("#RecruitmentDropdown.Value", openRecruitment ? "OPEN" : "INVITE_ONLY"); @@ -166,7 +168,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() ? "Enabled" : "Disabled"); + cmd.set("#PvPStatus.Text", perms.pvpEnabled() ? HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_ENABLED) : HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_DISABLED)); cmd.set("#PvPStatus.Style.TextColor", perms.pvpEnabled() ? "#55FF55" : "#FF5555"); } @@ -233,7 +235,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 : "Your Faction Name"; + String previewText = !name.isEmpty() ? name : HFMessages.get(playerRef, MessageKeys.CreateGui.PREVIEW_NAME); if (!tag.isEmpty()) { previewText += " [" + tag + "]"; } @@ -287,26 +289,26 @@ private void handleCreate(Player player, Ref ref, Store MAX_NAME_LENGTH) { - player.sendMessage(MessageUtil.errorText("Faction name cannot exceed " + MAX_NAME_LENGTH + " characters.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.NAME_TOO_LONG, MAX_NAME_LENGTH)); sendUpdate(); return; } // Check if name is already taken if (factionManager.getFactionByName(name) != null) { - player.sendMessage(MessageUtil.errorText("A faction with this name already exists.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.NAME_TAKEN)); sendUpdate(); return; } @@ -314,13 +316,13 @@ private void handleCreate(Player player, Ref ref, Store MAX_TAG_LENGTH) { - player.sendMessage(MessageUtil.errorText("Faction tag must be " + MIN_TAG_LENGTH + "-" + MAX_TAG_LENGTH + " characters.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.TAG_LENGTH, MIN_TAG_LENGTH, MAX_TAG_LENGTH)); sendUpdate(); return; } if (!tag.matches("^[a-zA-Z0-9]+$")) { - player.sendMessage(MessageUtil.errorText("Faction tag can only contain letters and numbers.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.TAG_FORMAT)); sendUpdate(); return; } @@ -333,14 +335,14 @@ private void handleCreate(Player player, Ref ref, Store MAX_DESCRIPTION_LENGTH) { - player.sendMessage(MessageUtil.errorText("Description cannot exceed " + MAX_DESCRIPTION_LENGTH + " characters.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.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("You are already in a faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.Common.ALREADY_IN_FACTION)); sendUpdate(); return; } @@ -376,11 +378,7 @@ private void handleCreate(Player player, Ref ref, Store ref, Store { - player.sendMessage(MessageUtil.errorText("You are already in a faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.Common.ALREADY_IN_FACTION)); sendUpdate(); } case NAME_TAKEN -> { - player.sendMessage(MessageUtil.errorText("A faction with this name already exists.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.NAME_TAKEN)); sendUpdate(); } case NAME_TOO_SHORT, NAME_TOO_LONG -> { - player.sendMessage(MessageUtil.errorText("Invalid faction name.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.INVALID_NAME)); sendUpdate(); } default -> { - player.sendMessage(MessageUtil.errorText("Could not create faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.CreateGui.CREATE_FAILED)); sendUpdate(); } } 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 7d55aa5c..4e781a8d 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/InvitesPage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/InvitesPage.java @@ -14,12 +14,13 @@ import com.hyperfactions.manager.JoinRequestManager; import com.hyperfactions.manager.PowerManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; -import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.entity.entities.Player; import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; import com.hypixel.hytale.server.core.ui.builder.EventData; @@ -103,22 +104,22 @@ public void build(Ref ref, UICommandBuilder cmd, // Set header with counts int totalCount = invites.size() + requests.size(); - cmd.set("#InviteCount.Text", totalCount + " pending"); + cmd.set("#InviteCount.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.PENDING_COUNT, totalCount)); // === RECEIVED INVITES SECTION === - cmd.set("#InvitesHeader.Text", "RECEIVED INVITES (" + invites.size() + ")"); + cmd.set("#InvitesHeader.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.RECEIVED_HEADER, invites.size())); if (invites.isEmpty()) { cmd.append("#InviteListContainer", UIPaths.RELATION_EMPTY); - cmd.set("#InviteListContainer[0] #EmptyText.Text", "No invites. Browse factions to find one!"); + cmd.set("#InviteListContainer[0] #EmptyText.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.NO_INVITES)); } else { buildInviteCards(cmd, events, invites); } // === YOUR REQUESTS SECTION === - cmd.set("#RequestsHeader.Text", "YOUR REQUESTS (" + requests.size() + ")"); + cmd.set("#RequestsHeader.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.REQUESTS_HEADER, requests.size())); if (requests.isEmpty()) { cmd.append("#RequestListContainer", UIPaths.RELATION_EMPTY); - cmd.set("#RequestListContainer[0] #EmptyText.Text", "No pending requests."); + cmd.set("#RequestListContainer[0] #EmptyText.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.NO_REQUESTS)); } else { buildRequestCards(cmd, events, requests); } @@ -145,13 +146,13 @@ private void buildInviteCards(UICommandBuilder cmd, UIEventBuilder events, // Invited by String inviterName = getPlayerName(invite.invitedBy()); - cmd.set(prefix + "#InvitedBy.Text", "Invited by: " + inviterName); + cmd.set(prefix + "#InvitedBy.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.INVITED_BY, inviterName)); // Stats PowerManager.FactionPowerStats stats = powerManager.getFactionPowerStats(faction.id()); - cmd.set(prefix + "#MemberCount.Text", faction.members().size() + " members"); - cmd.set(prefix + "#PowerCount.Text", String.format("%.0f power", stats.currentPower())); - cmd.set(prefix + "#ClaimCount.Text", faction.claims().size() + " claims"); + 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())); // Time ago cmd.set(prefix + "#TimeAgo.Text", formatTimeAgo(invite.createdAt())); @@ -197,16 +198,16 @@ private void buildRequestCards(UICommandBuilder cmd, UIEventBuilder events, cmd.set(prefix + "#FactionName.Text", faction.name()); // Status - cmd.set(prefix + "#StatusText.Text", "Awaiting review"); + cmd.set(prefix + "#StatusText.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.AWAITING_REVIEW)); // Stats PowerManager.FactionPowerStats stats = powerManager.getFactionPowerStats(faction.id()); - cmd.set(prefix + "#MemberCount.Text", faction.members().size() + " members"); - cmd.set(prefix + "#PowerCount.Text", String.format("%.0f power", stats.currentPower())); + 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()))); // Time remaining int hoursRemaining = request.getRemainingHours(); - cmd.set(prefix + "#TimeRemaining.Text", "Expires in " + hoursRemaining + "h"); + cmd.set(prefix + "#TimeRemaining.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.EXPIRES_IN, hoursRemaining)); // Cancel button events.addEventBinding( @@ -234,16 +235,16 @@ private String formatTimeAgo(long timestamp) { long diff = now - timestamp; if (diff < TimeUnit.MINUTES.toMillis(1)) { - return "just now"; + return HFMessages.get(playerRef, MessageKeys.NewPlayerGui.TIME_JUST_NOW); } else if (diff < TimeUnit.HOURS.toMillis(1)) { long minutes = TimeUnit.MILLISECONDS.toMinutes(diff); - return minutes + " min ago"; + return HFMessages.get(playerRef, MessageKeys.NewPlayerGui.TIME_MINUTES, minutes); } else if (diff < TimeUnit.DAYS.toMillis(1)) { long hours = TimeUnit.MILLISECONDS.toHours(diff); - return hours + "h ago"; + return HFMessages.get(playerRef, MessageKeys.NewPlayerGui.TIME_HOURS, hours); } else { long days = TimeUnit.MILLISECONDS.toDays(diff); - return days + "d ago"; + return HFMessages.get(playerRef, MessageKeys.NewPlayerGui.TIME_DAYS, days); } } @@ -309,7 +310,7 @@ private void handleAccept(Player player, Ref ref, Store ref, Store ref, Store { - player.sendMessage( - Message.raw("You joined ").color("#55FF55") - .insert(Message.raw(faction.name()).color("#00FFFF")) - .insert(Message.raw("!").color("#55FF55")) - ); + player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.NewPlayerGui.JOINED, faction.name())); // Clear all invites and requests inviteManager.clearPlayerInvites(playerUuid); joinRequestManager.clearPlayerRequests(playerUuid); @@ -353,15 +350,15 @@ private void handleAccept(Player player, Ref ref, Store { - player.sendMessage(MessageUtil.errorText("You are already in a faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.Common.ALREADY_IN_FACTION)); sendUpdate(); } case FACTION_FULL -> { - player.sendMessage(MessageUtil.errorText("This faction is full.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.NewPlayerGui.FACTION_FULL)); sendUpdate(); } default -> { - player.sendMessage(MessageUtil.errorText("Could not join faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.NewPlayerGui.JOIN_FAILED)); sendUpdate(); } } @@ -382,7 +379,7 @@ private void handleDecline(Player player, Ref ref, Store ref, Store entries = buildFactionEntryList(); - cmd.set("#FactionCount.Text", entries.size() + " factions"); - cmd.set("#Subtitle.Text", "Find your new home!"); + cmd.set("#FactionCount.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.FACTION_COUNT, entries.size())); + cmd.set("#Subtitle.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.BROWSE_SUBTITLE)); // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString("Power"), "POWER"), - new DropdownEntryInfo(LocalizableString.fromString("Name"), "NAME"), - new DropdownEntryInfo(LocalizableString.fromString("Members"), "MEMBERS") + 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") )); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding( @@ -179,7 +180,7 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -264,10 +265,10 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int // Recruitment badge if (entry.isOpen) { - cmd.set(idx + " #RecruitmentBadge.Text", "Open"); + cmd.set(idx + " #RecruitmentBadge.Text", HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN)); cmd.set(idx + " #RecruitmentBadge.Style.TextColor", "#44CC44"); } else { - cmd.set(idx + " #RecruitmentBadge.Text", "Invite Only"); + cmd.set(idx + " #RecruitmentBadge.Text", HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)); cmd.set(idx + " #RecruitmentBadge.Style.TextColor", "#FFAA00"); } @@ -307,7 +308,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", "Accept"); + cmd.set(idx + " #ActionBtn.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.BTN_ACCEPT)); events.addEventBinding( CustomUIEventBindingType.Activating, idx + " #ActionBtn", @@ -318,7 +319,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", "Pending"); + cmd.set(idx + " #ActionBtn.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.BTN_PENDING)); events.addEventBinding( CustomUIEventBindingType.Activating, idx + " #ActionBtn", @@ -327,7 +328,7 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int ); } else if (entry.isOpen) { // Open faction - JOIN button - cmd.set(idx + " #ActionBtn.Text", "Join"); + cmd.set(idx + " #ActionBtn.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.BTN_JOIN)); events.addEventBinding( CustomUIEventBindingType.Activating, idx + " #ActionBtn", @@ -338,7 +339,7 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int ); } else { // Invite-only faction - REQUEST button - cmd.set(idx + " #ActionBtn.Text", "Request"); + cmd.set(idx + " #ActionBtn.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.BTN_REQUEST)); events.addEventBinding( CustomUIEventBindingType.Activating, idx + " #ActionBtn", @@ -461,7 +462,7 @@ private void handleViewFaction(Player player, Ref ref, Store ref, Store ref, Store ref, Store { - player.sendMessage( - Message.raw("You joined ").color("#55FF55") - .insert(Message.raw(faction.name()).color("#00FFFF")) - .insert(Message.raw("!").color("#55FF55")) - ); + player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.NewPlayerGui.JOINED, faction.name())); // Clear any pending invites inviteManager.clearPlayerInvites(playerRef.getUuid()); // Open faction dashboard - use fresh faction data @@ -526,25 +523,25 @@ private void handleJoinFaction(Player player, Ref ref, Store { - player.sendMessage(MessageUtil.errorText("You are already in a faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.Common.ALREADY_IN_FACTION)); sendUpdate(); } case FACTION_NOT_FOUND -> { - player.sendMessage(MessageUtil.errorText("Faction not found.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.Common.FACTION_NOT_FOUND)); sendUpdate(); } case FACTION_FULL -> { - player.sendMessage(MessageUtil.errorText("This faction is full.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.NewPlayerGui.FACTION_FULL)); sendUpdate(); } default -> { - player.sendMessage(MessageUtil.errorText("Could not join faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.NewPlayerGui.JOIN_FAILED)); sendUpdate(); } } @@ -559,7 +556,7 @@ private void handleAcceptInvite(Player player, Ref ref, Store ref, Store ref, Store { - player.sendMessage( - Message.raw("You joined ").color("#55FF55") - .insert(Message.raw(faction.name()).color("#00FFFF")) - .insert(Message.raw("!").color("#55FF55")) - ); + player.sendMessage(MessageUtil.successText(playerRef, MessageKeys.NewPlayerGui.JOINED, faction.name())); // Clear invite and other pending invites inviteManager.clearPlayerInvites(playerUuid); // Open faction dashboard @@ -604,15 +597,15 @@ private void handleAcceptInvite(Player player, Ref ref, Store { - player.sendMessage(MessageUtil.errorText("You are already in a faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.Common.ALREADY_IN_FACTION)); sendUpdate(); } case FACTION_FULL -> { - player.sendMessage(MessageUtil.errorText("This faction is full.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.NewPlayerGui.FACTION_FULL)); sendUpdate(); } default -> { - player.sendMessage(MessageUtil.errorText("Could not join faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.NewPlayerGui.JOIN_FAILED)); sendUpdate(); } } @@ -627,7 +620,7 @@ private void handleRequestJoin(Player player, Ref ref, Store ref, Store ref, Store ref, Store ref, UICommandBuilder cmd, NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); // Update position info - cmd.set("#PositionInfo.Text", "Your Position: Chunk (" + playerChunkX + ", " + playerChunkZ + ")"); + cmd.set("#PositionInfo.Text", HFMessages.get(playerRef, MessageKeys.MapGui.POSITION, playerChunkX, playerChunkZ)); // Update hint text for read-only mode - cmd.set("#ActionHint.Text", "View Only - Join a faction to claim territory!"); + cmd.set("#ActionHint.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.MAP_HINT)); // Hide claim/power stats (not relevant for new players) cmd.set("#ClaimStats.Text", ""); @@ -155,12 +157,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: \" Protected\"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } }"); + + "Label { Text: \" " + HFMessages.get(playerRef, MessageKeys.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: \" Protected\"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } }"); + + "Label { Text: \" " + HFMessages.get(playerRef, MessageKeys.MapGui.LEGEND_PROTECTED) + "\"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } }"); } } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 1d0237cf..6002be64 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -1162,6 +1162,75 @@ public static final class MapGui { 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"; + + private CreateGui() {} + } + + /** New player page labels and messages (invites, browse, map). */ + public static final class NewPlayerGui { + // 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() {} + } /** Player settings page labels. */ public static final class PlayerSettings { public static final String TITLE = "hyperfactions_gui.player_settings.title"; diff --git a/src/main/java/com/hyperfactions/util/MessageUtil.java b/src/main/java/com/hyperfactions/util/MessageUtil.java index fd162fde..0791481a 100644 --- a/src/main/java/com/hyperfactions/util/MessageUtil.java +++ b/src/main/java/com/hyperfactions/util/MessageUtil.java @@ -139,6 +139,14 @@ public static Message adminInfo(@NotNull PlayerRef player, @NotNull String key, return adminPrefix().insert(Message.raw(HFMessages.get(player, key, args)).color(COLOR_GRAY)); } + /** + * 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) { + return Message.raw(HFMessages.get(player, key, args)).color(color); + } + // ==================== Unprefixed (GUI pages) ==================== /** diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index cc0b1d51..cb0cb609 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -365,3 +365,59 @@ map.overclaim_ally = You cannot overclaim allied territory. map.overclaim_has_power = This faction has enough power to defend their territory. map.overclaim_max = You have reached your maximum claim limit. map.overclaim_failed = Failed to overclaim chunk. +# ========== Create Faction Page ========== +create.preview_name = Your Faction Name +create.leader_prefix = Leader: {0} +create.enter_name = Please enter a faction name. +create.name_too_short = Faction name must be at least {0} characters. +create.name_too_long = Faction name cannot exceed {0} characters. +create.name_taken = A faction with this name already exists. +create.tag_length = Faction tag must be {0}-{1} characters. +create.tag_format = Faction tag can only contain letters and numbers. +create.desc_too_long = Description cannot exceed {0} characters. +create.created = Faction {0} created successfully! +create.created_no_dashboard = Faction created but could not open dashboard. +create.invalid_name = Invalid faction name. +create.create_failed = Could not create faction. + +# ========== New Player Pages ========== +newplayer.pending_count = {0} pending +newplayer.received_header = RECEIVED INVITES ({0}) +newplayer.requests_header = YOUR REQUESTS ({0}) +newplayer.no_invites = No invites. Browse factions to find one! +newplayer.no_requests = No pending requests. +newplayer.invited_by = Invited by: {0} +newplayer.member_count = {0} members +newplayer.power_count = {0} power +newplayer.claim_count = {0} claims +newplayer.awaiting_review = Awaiting review +newplayer.expires_in = Expires in {0}h +newplayer.time_just_now = just now +newplayer.time_minutes = {0} min ago +newplayer.time_hours = {0}h ago +newplayer.time_days = {0}d ago +newplayer.invalid_faction = Invalid faction. +newplayer.invite_expired = This invite has expired or was revoked. +newplayer.faction_gone = Faction no longer exists. +newplayer.joined = You joined {0}! +newplayer.faction_full = This faction is full. +newplayer.join_failed = Could not join faction. +newplayer.invite_declined = Invite declined. +newplayer.request_cancelled = Cancelled request to join {0}. +newplayer.faction_count = {0} factions +newplayer.browse_subtitle = Find your new home! +newplayer.sort_power = Power +newplayer.sort_name = Name +newplayer.sort_members = Members +newplayer.btn_accept = Accept +newplayer.btn_pending = Pending +newplayer.btn_join = Join +newplayer.btn_request = Request +newplayer.invite_only_msg = This faction is invite-only. +newplayer.welcome_hint = Welcome! Use /f to open faction menu. +newplayer.faction_open_hint = This faction is open! Click JOIN instead. +newplayer.already_requested = You already have a pending request to this faction. +newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. +newplayer.request_sent = Join request sent to {0}! +newplayer.officer_review = An officer will review your request. +newplayer.map_hint = View Only - Join a faction to claim territory! From 7867f74f8a1de97b1d632507411060c55e5870c8 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 17:48:57 -0700 Subject: [PATCH 17/55] feat: localize admin GUI pages (Phase 4) Migrate all 25 admin page files to use HFMessages.get() and MessageKeys. Add ~170 admin i18n keys to MessageKeys.AdminGui and hyperfactions_admin.lang covering dashboard, actions, factions, members, relations, settings, players, economy, zones, zone map, zone wizard, and version pages. --- .../gui/admin/page/AdminActionsPage.java | 18 +- .../gui/admin/page/AdminActivityLogPage.java | 9 +- .../gui/admin/page/AdminBulkEconomyPage.java | 9 +- .../gui/admin/page/AdminDashboardPage.java | 13 +- .../admin/page/AdminDisbandConfirmPage.java | 15 +- .../admin/page/AdminEconomyAdjustPage.java | 21 +- .../gui/admin/page/AdminEconomyPage.java | 13 +- .../gui/admin/page/AdminFactionInfoPage.java | 21 +- .../admin/page/AdminFactionMembersPage.java | 30 ++- .../admin/page/AdminFactionRelationsPage.java | 30 ++- .../admin/page/AdminFactionSettingsPage.java | 44 ++-- .../gui/admin/page/AdminFactionsPage.java | 36 +-- .../gui/admin/page/AdminMainPage.java | 28 +- .../gui/admin/page/AdminPlayerInfoPage.java | 45 ++-- .../gui/admin/page/AdminPlayersPage.java | 34 +-- .../page/AdminUnclaimAllConfirmPage.java | 20 +- .../gui/admin/page/AdminVersionPage.java | 15 +- .../page/AdminZoneIntegrationFlagsPage.java | 24 +- .../gui/admin/page/AdminZoneMapPage.java | 22 +- .../gui/admin/page/AdminZonePage.java | 18 +- .../admin/page/AdminZonePropertiesPage.java | 36 +-- .../gui/admin/page/AdminZoneSettingsPage.java | 22 +- .../gui/admin/page/CreateZoneWizardPage.java | 35 ++- .../admin/page/ZoneChangeTypeModalPage.java | 18 +- .../gui/admin/page/ZoneRenameModalPage.java | 28 +- .../com/hyperfactions/util/MessageKeys.java | 224 ++++++++++++++++ .../Languages/en-US/hyperfactions_admin.lang | 246 ++++++++++++++++++ 27 files changed, 783 insertions(+), 291 deletions(-) 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 39e35815..9a4b96ff 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminActionsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminActionsPage.java @@ -11,6 +11,8 @@ import com.hyperfactions.util.ErrorHandler; import com.hyperfactions.util.Logger; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -73,7 +75,7 @@ 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", "Confirm Reset?"); + cmd.set("#ResetAllKDBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ACT_CONFIRM_RESET)); } // Bind the reset button @@ -94,7 +96,7 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { if (upkeepEnabled) { if (confirmUpkeep) { - cmd.set("#TriggerUpkeepBtn.Text", "Confirm Trigger?"); + cmd.set("#TriggerUpkeepBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ACT_CONFIRM_TRIGGER)); } events.addEventBinding(CustomUIEventBindingType.Activating, "#TriggerUpkeepBtn", EventData.of("Button", "TriggerUpkeep"), false); @@ -130,7 +132,7 @@ public void handleDataEvent(Ref ref, Store store, confirmResetKD = true; UICommandBuilder cmd = new UICommandBuilder(); UIEventBuilder events = new UIEventBuilder(); - cmd.set("#ResetAllKDBtn.Text", "Confirm Reset?"); + cmd.set("#ResetAllKDBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ACT_CONFIRM_RESET)); events.addEventBinding(CustomUIEventBindingType.Activating, "#ResetAllKDBtn", EventData.of("Button", "ResetAllKD"), false); sendUpdate(cmd, events, false); @@ -149,7 +151,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("Failed to reset K/D: " + e.getMessage())); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ACT_KD_RESET_FAILED, e.getMessage())); ErrorHandler.report("[Admin] Global K/D reset failed", e); } guiManager.openAdminActions(player, ref, store, playerRef); @@ -163,7 +165,7 @@ public void handleDataEvent(Ref ref, Store store, confirmUpkeep = true; UICommandBuilder cmd = new UICommandBuilder(); UIEventBuilder events = new UIEventBuilder(); - cmd.set("#TriggerUpkeepBtn.Text", "Confirm Trigger?"); + cmd.set("#TriggerUpkeepBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ACT_CONFIRM_TRIGGER)); events.addEventBinding(CustomUIEventBindingType.Activating, "#TriggerUpkeepBtn", EventData.of("Button", "TriggerUpkeep"), false); sendUpdate(cmd, events, false); @@ -171,15 +173,15 @@ public void handleDataEvent(Ref ref, Store store, confirmUpkeep = false; UpkeepProcessor processor = plugin.getUpkeepProcessor(); if (processor == null) { - player.sendMessage(MessageUtil.adminError("Upkeep processor is not available.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ACT_UPKEEP_UNAVAILABLE)); } else { try { processor.processUpkeep(); - player.sendMessage(MessageUtil.adminSuccess("Upkeep collection triggered.")); + player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ACT_UPKEEP_TRIGGERED)); Logger.info("[Admin] %s manually triggered upkeep collection via GUI", playerRef.getUsername()); } catch (Exception e) { - player.sendMessage(MessageUtil.adminError("Upkeep failed: " + e.getMessage())); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.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 2b62822d..228fb8fb 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java @@ -1,5 +1,8 @@ package com.hyperfactions.gui.admin.page; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; + import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionLog; import com.hyperfactions.data.FactionMember; @@ -103,7 +106,7 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { // Type filter dropdown List typeOptions = new ArrayList<>(); - typeOptions.add(new DropdownEntryInfo(LocalizableString.fromString("All Types"), "ALL")); + typeOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.LOG_ALL_TYPES)), "ALL")); for (FactionLog.LogType type : FactionLog.LogType.values()) { typeOptions.add(new DropdownEntryInfo(LocalizableString.fromString(type.getDisplayName()), type.name())); } @@ -149,7 +152,7 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { // === Collect and filter logs === List allLogs = collectGlobalLogs(); - cmd.set("#LogCount.Text", allLogs.size() + " entries"); + cmd.set("#LogCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ENTRIES_SUFFIX, allLogs.size())); // Calculate pagination int totalPages = Math.max(1, (int) Math.ceil((double) allLogs.size() / LOGS_PER_PAGE)); @@ -198,7 +201,7 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( 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 905d4cde..9927c363 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminBulkEconomyPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminBulkEconomyPage.java @@ -1,5 +1,8 @@ package com.hyperfactions.gui.admin.page; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; + import com.hyperfactions.api.EconomyAPI; import com.hyperfactions.data.Faction; import com.hyperfactions.gui.GuiManager; @@ -114,7 +117,7 @@ public void handleDataEvent(Ref ref, Store store, } if (amount.compareTo(BigDecimal.ZERO) == 0) { - showError("Amount cannot be zero."); + showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_AMOUNT_ZERO)); return; } @@ -165,13 +168,13 @@ public void handleDataEvent(Ref ref, Store store, private BigDecimal parseAmountOrError(String amount) { if (amount == null || amount.isBlank()) { - showError("Please enter an amount."); + showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_ENTER_AMOUNT)); return null; } try { return new BigDecimal(amount.trim()); } catch (NumberFormatException e) { - showError("Invalid number: " + amount); + showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_INVALID_NUMBER, amount)); return null; } } 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 59612c78..a166282f 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminDashboardPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminDashboardPage.java @@ -1,5 +1,8 @@ package com.hyperfactions.gui.admin.page; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; + import com.hyperfactions.HyperFactions; import com.hyperfactions.data.*; import com.hyperfactions.gui.GuiManager; @@ -112,7 +115,7 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.set("#TotalEconomy.Text", econ.formatCurrencyCompact(total)); // Find wealthiest faction - String wealthiestName = "None"; + String wealthiestName = HFMessages.get(playerRef, MessageKeys.Common.NONE); java.math.BigDecimal wealthiestBalance = java.math.BigDecimal.ZERO; for (Faction f : allFactions) { java.math.BigDecimal balance = econ.getFactionBalance(f.id()); @@ -127,9 +130,9 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup bypass toggle boolean bypassEnabled = plugin.isAdminBypassEnabled(playerRef.getUuid()); - cmd.set("#BypassState.Text", bypassEnabled ? "On" : "Off"); + cmd.set("#BypassState.Text", bypassEnabled ? HFMessages.get(playerRef, MessageKeys.AdminGui.ON) : HFMessages.get(playerRef, MessageKeys.AdminGui.OFF)); cmd.set("#BypassState.Style.TextColor", bypassEnabled ? "#55FF55" : "#FF5555"); - cmd.set("#ToggleBypassBtn.Text", bypassEnabled ? "Disable" : "Enable"); + cmd.set("#ToggleBypassBtn.Text", bypassEnabled ? HFMessages.get(playerRef, MessageKeys.AdminGui.DISABLE_BTN) : HFMessages.get(playerRef, MessageKeys.AdminGui.ENABLE_BTN)); events.addEventBinding( CustomUIEventBindingType.Activating, @@ -173,9 +176,9 @@ private void rebuildBypassSection(boolean bypassEnabled) { UIEventBuilder events = new UIEventBuilder(); // Update bypass state display - cmd.set("#BypassState.Text", bypassEnabled ? "On" : "Off"); + cmd.set("#BypassState.Text", bypassEnabled ? HFMessages.get(playerRef, MessageKeys.AdminGui.ON) : HFMessages.get(playerRef, MessageKeys.AdminGui.OFF)); cmd.set("#BypassState.Style.TextColor", bypassEnabled ? "#55FF55" : "#FF5555"); - cmd.set("#ToggleBypassBtn.Text", bypassEnabled ? "Disable" : "Enable"); + cmd.set("#ToggleBypassBtn.Text", bypassEnabled ? HFMessages.get(playerRef, MessageKeys.AdminGui.DISABLE_BTN) : HFMessages.get(playerRef, MessageKeys.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 c7a15005..4a7f2d3a 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminDisbandConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminDisbandConfirmPage.java @@ -6,11 +6,12 @@ import com.hyperfactions.gui.admin.data.AdminDisbandConfirmData; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; -import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.entity.entities.Player; import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; import com.hypixel.hytale.server.core.ui.builder.EventData; @@ -101,7 +102,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("Faction no longer exists.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.DISBAND_FACTION_GONE)); guiManager.openAdminMain(player, ref, store, playerRef); return; } @@ -111,16 +112,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( - Message.raw("Faction '").color("#FF5555") - .insert(Message.raw(factionName).color("#AAAAAA")) - .insert(Message.raw("' has been disbanded.").color("#FF5555")) - ); + player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.DISBAND_SUCCESS, factionName)); } else { - player.sendMessage(MessageUtil.errorText("Failed to disband: " + result)); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.DISBAND_FAILED, result)); } } else { - player.sendMessage(MessageUtil.errorText("Faction has no leader, cannot disband.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.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 e3a799da..7bff708a 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyAdjustPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyAdjustPage.java @@ -1,5 +1,8 @@ package com.hyperfactions.gui.admin.page; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; + import com.hyperfactions.api.EconomyAPI; import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionEconomy; @@ -69,8 +72,8 @@ public void build(Ref ref, UICommandBuilder cmd, // Get faction info Faction faction = factionManager.getFaction(factionId); if (faction == null) { - cmd.set("#TargetFactionName.Text", "Faction Not Found"); - cmd.set("#CurrentBalance.Text", "N/A"); + cmd.set("#TargetFactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); + cmd.set("#CurrentBalance.Text", HFMessages.get(playerRef, MessageKeys.Common.NA)); return; } @@ -136,7 +139,7 @@ public void handleDataEvent(Ref ref, Store store, } if (amount.compareTo(BigDecimal.ZERO) == 0) { - showError("Amount cannot be zero."); + showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_AMOUNT_ZERO)); return; } @@ -151,7 +154,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("An error occurred."); + showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_ERROR)); return null; }); } @@ -163,7 +166,7 @@ public void handleDataEvent(Ref ref, Store store, } if (newBalance.compareTo(BigDecimal.ZERO) < 0) { - showError("Balance cannot be negative."); + showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_BALANCE_NEGATIVE)); return; } @@ -174,7 +177,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("An error occurred."); + showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_ERROR)); return null; }); } @@ -190,13 +193,13 @@ public void handleDataEvent(Ref ref, Store store, */ private @Nullable BigDecimal parseAmountOrError(@Nullable String amount) { if (amount == null || amount.isBlank()) { - showError("Please enter an amount."); + showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_ENTER_AMOUNT)); return null; } try { return new BigDecimal(amount.trim()); } catch (NumberFormatException e) { - showError("Invalid number: " + amount); + showError(HFMessages.get(playerRef, MessageKeys.AdminGui.ECON_INVALID_NUMBER, amount)); return null; } } @@ -209,7 +212,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("Failed: " + result.name()); + showError(HFMessages.get(playerRef, MessageKeys.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 edafebc4..0417282f 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java @@ -1,5 +1,8 @@ package com.hyperfactions.gui.admin.page; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; + import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionEconomy; import com.hyperfactions.data.FactionMember; @@ -151,7 +154,7 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { // Get sorted/filtered factions List factions = getSortedFactions(); - cmd.set("#FactionCount.Text", factions.size() + " factions"); + cmd.set("#FactionCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTIONS_SUFFIX, factions.size())); // Search input if (!searchQuery.isEmpty()) { @@ -166,9 +169,9 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString("Balance"), "BALANCE"), - new DropdownEntryInfo(LocalizableString.fromString("Name"), "NAME"), - new DropdownEntryInfo(LocalizableString.fromString("Members"), "MEMBERS") + 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") )); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding( @@ -242,7 +245,7 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.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 05bf4f41..1dce4db5 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java @@ -1,5 +1,8 @@ package com.hyperfactions.gui.admin.page; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; + import com.hyperfactions.config.ConfigManager; import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionLog; @@ -82,8 +85,8 @@ public void build(Ref ref, UICommandBuilder cmd, // Get the faction Faction faction = factionManager.getFaction(factionId); if (faction == null) { - cmd.set("#FactionName.Text", "Faction Not Found"); - cmd.set("#FactionDescription.Text", "This faction no longer exists."); + 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)); return; } @@ -101,10 +104,10 @@ public void build(Ref ref, UICommandBuilder cmd, // Description String description = faction.description(); cmd.set("#FactionDescription.Text", - description != null && !description.isEmpty() ? description : "No description set."); + description != null && !description.isEmpty() ? description : HFMessages.get(playerRef, MessageKeys.AdminGui.NO_DESCRIPTION)); // Open/Closed status indicator - cmd.set("#StatusIndicator.Text", faction.open() ? "Open" : "Invite Only"); + cmd.set("#StatusIndicator.Text", faction.open() ? HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) : HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)); // === Stats Section === PowerManager.FactionPowerStats powerStats = powerManager.getFactionPowerStats(faction.id()); @@ -121,7 +124,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() ? "Open" : "Invite Only"); + cmd.set("#RecruitmentValue.Text", faction.open() ? HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) : HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_INVITE_ONLY)); // Founded date cmd.set("#FoundedValue.Text", TimeUtil.formatRelative(faction.createdAt())); @@ -134,21 +137,21 @@ public void build(Ref ref, UICommandBuilder cmd, // Raidable status if (powerStats.isRaidable()) { - cmd.set("#RaidableValue.Text", "Raidable"); + cmd.set("#RaidableValue.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.RAIDABLE)); } else { - cmd.set("#RaidableValue.Text", "Protected"); + cmd.set("#RaidableValue.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.PROTECTED)); } // === Leadership Section === FactionMember leader = faction.getLeader(); - cmd.set("#LeaderName.Text", leader != null ? leader.username() : "Unknown"); + cmd.set("#LeaderName.Text", leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN)); // Officers List officers = faction.getMembersSorted().stream() .filter(m -> m.role() == FactionRole.OFFICER) .toList(); if (officers.isEmpty()) { - cmd.set("#OfficersValue.Text", "None"); + cmd.set("#OfficersValue.Text", HFMessages.get(playerRef, MessageKeys.Common.NONE)); } else { String officerNames = officers.stream() .map(FactionMember::username) 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 175e1843..093639b5 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java @@ -10,6 +10,8 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.manager.PowerManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.TimeUtil; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; @@ -78,8 +80,8 @@ public void build(Ref ref, UICommandBuilder cmd, UIEventBuilder eve AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); Faction faction = factionManager.getFaction(factionId); if (faction == null) { - cmd.set("#FactionName.Text", "Faction Not Found"); - cmd.set("#MemberCount.Text", "0 members"); + 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)); return; } cmd.set("#FactionName.Text", faction.name()); @@ -88,8 +90,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() ? allMembers.size() + " members" : allMembers.size() + " found"); - cmd.set("#SortDropdown.Entries", List.of(new DropdownEntryInfo(LocalizableString.fromString("Role"), "ROLE"), new DropdownEntryInfo(LocalizableString.fromString("Online"), "ONLINE"), new DropdownEntryInfo(LocalizableString.fromString("Name"), "NAME"), new DropdownEntryInfo(LocalizableString.fromString("Power"), "POWER"))); + 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("#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); @@ -104,7 +106,7 @@ private void buildMemberList(UICommandBuilder cmd, UIEventBuilder events, Factio buildMemberEntry(cmd, events, i, allMembers.get(idx)); i++; } - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.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); } @@ -121,7 +123,7 @@ private void buildMemberEntry(UICommandBuilder cmd, UIEventBuilder events, int i 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 ? "Online" : "Offline"); + cmd.set(idx + " #OnlineStatus.Text", memberIsOnline ? HFMessages.get(playerRef, MessageKeys.Common.ONLINE) : HFMessages.get(playerRef, MessageKeys.Common.OFFLINE)); cmd.set(idx + " #OnlineStatus.Style.TextColor", GuiColors.forOnlineStatus(memberIsOnline)); if (!memberIsOnline) { cmd.set(idx + " #LastOnline.Text", formatLastOnline(member.lastOnline())); @@ -135,8 +137,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())) : "Unknown"); - cmd.set(idx + " #LastDeath.Text", power.lastDeath() > 0 ? TimeUtil.formatDuration(System.currentTimeMillis() - power.lastDeath()) + " ago" : "Never"); + 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 + " #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); @@ -184,9 +186,9 @@ private String formatLastOnline(long lastOnlineMs) { } long diffMs = System.currentTimeMillis() - lastOnlineMs; if (diffMs < 60000) { - return "just now"; + return HFMessages.get(playerRef, MessageKeys.AdminGui.JUST_NOW); } - return TimeUtil.formatDuration(diffMs) + " ago"; + return HFMessages.get(playerRef, MessageKeys.AdminGui.AGO_SUFFIX, TimeUtil.formatDuration(diffMs)); } /** Handles data event. */ @@ -212,10 +214,10 @@ 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("Target 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(Message.raw("[Admin] Teleported to ").color("#55FF55").insert(Message.raw(data.memberName != null ? data.memberName : "player").color("#00FFFF")).insert(Message.raw(".").color("#55FF55"))); } else { player.sendMessage(MessageUtil.errorText("Player is 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(Message.raw("[Admin] Promoted ").color("#55FF55").insert(Message.raw(data.memberName != null ? data.memberName : "player").color("#00FFFF")).insert(Message.raw(" to ").color("#55FF55")).insert(Message.raw(formatRole(newRole)).color("#FFD700")).insert(Message.raw(".").color("#55FF55"))); 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(Message.raw("[Admin] Demoted ").color("#FFAA00").insert(Message.raw(data.memberName != null ? data.memberName : "player").color("#00FFFF")).insert(Message.raw(" to ").color("#FFAA00")).insert(Message.raw(formatRole(newRole)).color("#888888")).insert(Message.raw(".").color("#FFAA00"))); 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(Message.raw("[Admin] Kicked ").color("#FF5555").insert(Message.raw(data.memberName != null ? data.memberName : "player").color("#00FFFF")).insert(Message.raw(" from the faction.").color("#FF5555"))); rebuildList(); } } } } + 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 : "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 9c4edbcd..cea5e28b 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java @@ -8,6 +8,8 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.manager.RelationManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -58,24 +60,24 @@ public void build(Ref ref, UICommandBuilder cmd, UIEventBuilder eve AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); Faction faction = factionManager.getFaction(factionId); if (faction == null) { - cmd.set("#FactionName.Text", "Faction Not Found"); + cmd.set("#FactionName.Text", HFMessages.get(playerRef, MessageKeys.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", "ALLIES (" + allies.size() + ")"); + cmd.set("#AlliesHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.REL_ALLIES_HEADER, allies.size())); cmd.clear("#AlliesList"); - if (allies.isEmpty()) { cmd.appendInline("#AlliesList", "Label { Text: \"No allies.\"; Style: (FontSize: 11, TextColor: #666666); Anchor: (Height: 24); }"); } + if (allies.isEmpty()) { cmd.appendInline("#AlliesList", "Label { Text: \"" + HFMessages.get(playerRef, MessageKeys.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", "ENEMIES (" + enemies.size() + ")"); + cmd.set("#EnemiesHeader.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.REL_ENEMIES_HEADER, enemies.size())); cmd.clear("#EnemiesList"); - if (enemies.isEmpty()) { cmd.appendInline("#EnemiesList", "Label { Text: \"No enemies.\"; Style: (FontSize: 11, TextColor: #666666); Anchor: (Height: 24); }"); } + if (enemies.isEmpty()) { cmd.appendInline("#EnemiesList", "Label { Text: \"" + HFMessages.get(playerRef, MessageKeys.AdminGui.REL_NO_ENEMIES) + "\"; Style: (FontSize: 11, TextColor: #666666); Anchor: (Height: 24); }"); } else { for (int i = 0; i < enemies.size(); @@ -88,7 +90,7 @@ 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", "Leader: " + entry.leaderName); + cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.LEADER_PREFIX, entry.leaderName)); cmd.set(idx + " #DateEstablished.Text", formatDate(entry.sinceMillis)); if ("ally".equals(type)) { events.addEventBinding(CustomUIEventBindingType.Activating, idx + " #SetNeutralBtn", EventData.of("Button", "AdminSetNeutral").append("TargetFactionId", entry.factionId.toString()), false); @@ -110,7 +112,7 @@ private void buildSetRelationSection(UICommandBuilder cmd, UIEventBuilder events } } int count = Math.min(5, neutralFactions.size()); - cmd.set("#NeutralCount.Text", neutralFactions.size() + " neutral factions"); + cmd.set("#NeutralCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.REL_NEUTRAL_COUNT, neutralFactions.size())); cmd.clear("#NeutralList"); for (int i = 0; i < count; i++) { Faction other = neutralFactions.get(i); @@ -119,7 +121,7 @@ private void buildSetRelationSection(UICommandBuilder cmd, UIEventBuilder events FactionMember leader = other.getLeader(); String leaderName = leader != null ? leader.username() : "Unknown"; cmd.set(idx + " #FactionName.Text", other.name()); - cmd.set(idx + " #LeaderName.Text", "Leader: " + leaderName); + cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.LEADER_PREFIX, leaderName)); cmd.set(idx + " #DateEstablished.Text", ""); 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); @@ -129,11 +131,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 "Since: today"; + return HFMessages.get(playerRef, MessageKeys.AdminGui.REL_SINCE_TODAY); } else if (daysSince == 1) { - return "Since: 1 day ago"; + return HFMessages.get(playerRef, MessageKeys.AdminGui.REL_SINCE_ONE_DAY); } else { - return "Since: " + daysSince + " days ago"; + return HFMessages.get(playerRef, MessageKeys.AdminGui.REL_SINCE_DAYS, daysSince); } } @@ -174,9 +176,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("Invalid faction.")); return; } Faction target = factionManager.getFaction(targetId); String targetName = target != null ? target.name() : "Unknown"; RelationManager.RelationResult result = relationManager.adminSetRelation(factionId, targetId, RelationType.ALLY); if (result == RelationManager.RelationResult.SUCCESS) player.sendMessage(MessageUtil.text("[Admin] Set mutual ally status with " + targetName + ".", MessageUtil.COLOR_BLUE)); else player.sendMessage(MessageUtil.adminError("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("Invalid faction.")); return; } Faction target = factionManager.getFaction(targetId); String targetName = target != null ? target.name() : "Unknown"; RelationManager.RelationResult result = relationManager.adminSetRelation(factionId, targetId, RelationType.ENEMY); if (result == RelationManager.RelationResult.SUCCESS) player.sendMessage(MessageUtil.adminError("Set mutual enemy status with " + targetName + ".")); else player.sendMessage(MessageUtil.adminError("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("Invalid faction.")); return; } Faction target = factionManager.getFaction(targetId); String targetName = target != null ? target.name() : "Unknown"; RelationManager.RelationResult result = relationManager.adminSetRelation(factionId, targetId, RelationType.NEUTRAL); if (result == RelationManager.RelationResult.SUCCESS) player.sendMessage(MessageUtil.text("[Admin] Set mutual neutral status with " + targetName + ".", "#888888")); else player.sendMessage(MessageUtil.adminError("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, MessageKeys.AdminGui.INVALID_FACTION)); return; } Faction target = factionManager.getFaction(targetId); String targetName = target != null ? target.name() : "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() : "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() : "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); } } 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 788a3291..979a72d6 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionSettingsPage.java @@ -9,6 +9,8 @@ import com.hyperfactions.gui.admin.data.AdminFactionSettingsData; import com.hyperfactions.manager.FactionManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -67,7 +69,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Get the faction Faction faction = factionManager.getFaction(factionId); if (faction == null) { - cmd.set("#FactionName.Text", "Faction Not Found"); + cmd.set("#FactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); return; } @@ -104,7 +106,7 @@ private void buildGeneralSettings(UICommandBuilder cmd, UIEventBuilder events, F // Tag String tagDisplay = faction.tag() != null && !faction.tag().isEmpty() ? "[" + faction.tag().toUpperCase() + "]" - : "(None)"; + : HFMessages.get(playerRef, MessageKeys.AdminGui.NONE_PAREN); cmd.set("#TagValue.Text", tagDisplay); events.addEventBinding( CustomUIEventBindingType.Activating, @@ -116,7 +118,7 @@ private void buildGeneralSettings(UICommandBuilder cmd, UIEventBuilder events, F // Description String desc = faction.description() != null && !faction.description().isEmpty() ? faction.description() - : "(None)"; + : HFMessages.get(playerRef, MessageKeys.AdminGui.NONE_PAREN); cmd.set("#DescValue.Text", desc); events.addEventBinding( CustomUIEventBindingType.Activating, @@ -127,8 +129,8 @@ private void buildGeneralSettings(UICommandBuilder cmd, UIEventBuilder events, F // Recruitment dropdown cmd.set("#RecruitmentDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString("Open"), "OPEN"), - new DropdownEntryInfo(LocalizableString.fromString("Invite Only"), "INVITE_ONLY") + 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") )); cmd.set("#RecruitmentDropdown.Value", faction.open() ? "OPEN" : "INVITE_ONLY"); events.addEventBinding( @@ -150,7 +152,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", "Not set"); + cmd.set("#HomeLocation.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.NOT_SET)); } events.addEventBinding( CustomUIEventBindingType.Activating, @@ -220,7 +222,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() ? "Enabled" : "Disabled"); + cmd.set("#PvPStatus.Text", perms.pvpEnabled() ? HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_ENABLED) : HFMessages.get(playerRef, MessageKeys.SettingsGui.PVP_DISABLED)); cmd.set("#PvPStatus.Style.TextColor", perms.pvpEnabled() ? "#55FF55" : "#FF5555"); // Officers can edit @@ -284,7 +286,7 @@ public void handleDataEvent(Ref ref, Store store, Faction faction = factionManager.getFaction(factionId); if (faction == null && !data.button.equals("Back")) { - player.sendMessage(MessageUtil.adminError("Faction not found.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.Common.FACTION_NOT_FOUND)); sendUpdate(); return; } @@ -324,7 +326,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("Set recruitment to " + (isOpen ? "Open" : "Invite Only"))); + 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))); rebuildPage(); } private void handleClearHome(Player player, Ref ref, Store store, Faction faction) { if (faction.home() == null) { - player.sendMessage(MessageUtil.text("[Admin] This faction has no home set.", MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.SET_NO_HOME, MessageUtil.COLOR_GOLD)); sendUpdate(); return; } @@ -407,7 +409,7 @@ private void handleClearHome(Player player, Ref ref, Store factions = getSortedFactions(); - cmd.set("#FactionCount.Text", factions.size() + " factions"); + cmd.set("#FactionCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTIONS_SUFFIX, factions.size())); // Search input if (!searchQuery.isEmpty()) { @@ -112,9 +114,9 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString("Power"), "POWER"), - new DropdownEntryInfo(LocalizableString.fromString("Name"), "NAME"), - new DropdownEntryInfo(LocalizableString.fromString("Members"), "MEMBERS") + 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") )); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding( @@ -143,7 +145,7 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -181,8 +183,8 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int // Leader info FactionMember leader = faction.getLeader(); - String leaderName = leader != null ? leader.username() : "None"; - cmd.set(idx + " #LeaderName.Text", "Leader: " + leaderName); + 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)); // Stats cmd.set(idx + " #PowerDisplay.Text", String.format("%.0f/%.0f", stats.currentPower(), stats.maxPower())); @@ -216,7 +218,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", "Not set"); + cmd.set(idx + " #HomeLocation.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.NOT_SET)); cmd.set(idx + " #TpHomeBtn.Visible", false); } @@ -387,7 +389,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("Invalid faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); return; } Faction faction = factionManager.getFaction(factionId); @@ -398,7 +400,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("Target world not found.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.FAC_WORLD_NOT_FOUND)); return; } @@ -410,9 +412,9 @@ public void handleDataEvent(Ref ref, Store store, store.addComponent(ref, Teleport.getComponentType(), teleport); }); - player.sendMessage(MessageUtil.text("Teleported to " + faction.name() + "'s home.", "#00FFFF")); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.FAC_TELEPORTED, "#00FFFF", faction.name())); } else { - player.sendMessage(MessageUtil.errorText("Faction has no home set.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.FAC_NO_HOME)); } } } @@ -421,7 +423,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("Invalid faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); return; } Faction faction = factionManager.getFaction(factionId); @@ -436,7 +438,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("Invalid faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); return; } Faction faction = factionManager.getFaction(factionId); @@ -450,7 +452,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("Invalid faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); return; } Faction faction = factionManager.getFaction(factionId); @@ -464,7 +466,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("Invalid faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); return; } guiManager.openAdminDisbandConfirm(player, ref, store, playerRef, factionId, data.factionName); @@ -475,7 +477,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("Invalid faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); return; } Faction faction = factionManager.getFaction(factionId); 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 19b9a6ae..7e6c9a03 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminMainPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminMainPage.java @@ -8,6 +8,8 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.manager.PowerManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -74,9 +76,9 @@ public void build(Ref ref, UICommandBuilder cmd, .mapToInt(f -> f.claims().size()) .sum(); - cmd.set("#TotalFactions.Text", "Factions: " + totalFactions); - cmd.set("#TotalMembers.Text", "Total Members: " + totalMembers); - cmd.set("#TotalClaims.Text", "Total Claims: " + totalClaims); + 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)); // Navigation buttons events.addEventBinding( @@ -122,14 +124,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", faction.members().size() + " members"); - cmd.set(prefix + "#PowerCount.Text", String.format("%.0f/%.0f power", stats.currentPower(), stats.maxPower())); - cmd.set(prefix + "#ClaimCount.Text", faction.claims().size() + " claims"); + 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())); // Leader info FactionMember leader = faction.getLeader(); - String leaderName = leader != null ? leader.username() : "None"; - cmd.set(prefix + "#LeaderName.Text", "Leader: " + leaderName); + 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)); // Action buttons events.addEventBinding( @@ -153,7 +155,7 @@ public void build(Ref ref, UICommandBuilder cmd, } // Pagination - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -203,7 +205,7 @@ public void handleDataEvent(Ref ref, Store store, case "Reload" -> { guiManager.closePage(player, ref, store); - player.sendMessage(MessageUtil.text("Use /f reload to reload configuration.", "#00FFFF")); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MAIN_RELOAD_HINT, "#00FFFF")); } case "PrevPage" -> { @@ -220,7 +222,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("Invalid faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); return; } @@ -233,7 +235,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("Invalid faction.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.INVALID_FACTION)); return; } Faction faction = factionManager.getFaction(factionId); @@ -241,7 +243,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("Use /f admin unclaim " + data.factionName + " to unclaim all " + claimCount + " chunks.", MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.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 62faee3b..51b59703 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java @@ -18,6 +18,8 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.util.Logger; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.TimeUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -101,7 +103,7 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { // Online status boolean isOnline = isOnline(targetPlayerUuid); - cmd.set("#OnlineStatus.Text", isOnline ? "Online" : "Offline"); + cmd.set("#OnlineStatus.Text", isOnline ? HFMessages.get(playerRef, MessageKeys.Common.ONLINE) : HFMessages.get(playerRef, MessageKeys.Common.OFFLINE)); cmd.set("#OnlineStatus.Style.TextColor", GuiColors.forOnlineStatus(isOnline)); // Load player data once for all sections @@ -111,15 +113,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", "Unknown"); + cmd.set("#FirstJoinedValue.Text", HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN)); } if (isOnline) { - cmd.set("#LastOnlineValue.Text", "Now"); + cmd.set("#LastOnlineValue.Text", HFMessages.get(playerRef, MessageKeys.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", "Unknown"); + cmd.set("#LastOnlineValue.Text", HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN)); } // === Faction Card === @@ -132,7 +134,7 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { if (faction != null) { cmd.set("#FactionName.Text", faction.name()); } else { - cmd.set("#FactionName.Text", "No Faction"); + cmd.set("#FactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.NO_FACTION)); cmd.set("#FactionName.Style.TextColor", "#888888"); } @@ -163,9 +165,9 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { // Max override indicator if (power.maxPowerOverride() != null) { - cmd.set("#MaxOverrideLabel.Text", "(custom max)"); + cmd.set("#MaxOverrideLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.CUSTOM_MAX)); } else { - cmd.set("#MaxOverrideLabel.Text", "(default max)"); + cmd.set("#MaxOverrideLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.DEFAULT_MAX)); cmd.set("#MaxOverrideLabel.Style.TextColor", "#666666"); } @@ -196,7 +198,7 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { List history = new java.util.ArrayList<>(cachedData.getMembershipHistory()); Collections.reverse(history); - cmd.set("#HistoryCount.Text", history.size() + " records"); + cmd.set("#HistoryCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.PLR_RECORDS, history.size())); cmd.appendInline("#HistoryList", "Group #HistoryCards { LayoutMode: Top; }"); for (int i = 0; i < history.size(); i++) { @@ -206,8 +208,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", "Joined: " + TimeUtil.formatDate(rec.joinedAt())); - cmd.set(idx + " #HLeft.Text", rec.isActive() ? "Current" : "Left: " + TimeUtil.formatDate(rec.leftAt())); + 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 + " #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())); @@ -215,7 +217,7 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { } else { cmd.set("#HistoryCount.Text", ""); cmd.appendInline("#HistoryList", - "Label { Text: \"No membership history\"; Style: (FontSize: 10, TextColor: #555555); }"); + "Label { Text: \"" + HFMessages.get(playerRef, MessageKeys.AdminGui.NO_MEMBERSHIP_HISTORY) + "\"; Style: (FontSize: 10, TextColor: #555555); }"); } // === Kick button === @@ -224,9 +226,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", "Disband Faction"); + cmd.set("#KickBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.PLR_DISBAND_FACTION)); } else if (targetMember != null && targetMember.isLeader()) { - cmd.set("#KickBtn.Text", "Kick Leader"); + cmd.set("#KickBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.PLR_KICK_LEADER)); } } @@ -304,7 +306,7 @@ public void handleDataEvent(Ref ref, Store store, case "SetPower" -> { double amount = parseDoubleOrNaN(data.powerInput); if (Double.isNaN(amount)) { - player.sendMessage(MessageUtil.adminError("Enter a valid number.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.PLR_ENTER_VALID_NUMBER)); return; } double oldPower = powerManager.getPlayerPower(targetPlayerUuid).power(); @@ -327,7 +329,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("Enter a valid positive number.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.PLR_ENTER_VALID_POSITIVE)); return; } PlayerPower old = powerManager.getPlayerPower(targetPlayerUuid); @@ -379,7 +381,7 @@ public void handleDataEvent(Ref ref, Store store, "Admin reset K/D for " + targetPlayerName, adminUuid)); factionManager.updateFaction(updated); } - player.sendMessage(MessageUtil.adminSuccess("Reset K/D for " + targetPlayerName + ".")); + player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.PLR_KD_RESET, targetPlayerName)); reopenPage(player, ref, store, playerRef); } @@ -399,8 +401,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("[Admin] Faction '" + faction.name() - + "' disbanded (last member kicked).", MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.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 { @@ -419,8 +420,7 @@ public void handleDataEvent(Ref ref, Store store, // Now kick the demoted member factionManager.adminRemoveMember(faction.id(), targetPlayerUuid); - player.sendMessage(MessageUtil.adminSuccess("Kicked leader " + targetPlayerName - + ". Leadership transferred to " + successor.username() + ".")); + player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.PLR_KICKED_LEADER, targetPlayerName, successor.username())); } reopenPage(player, ref, store, playerRef); } @@ -428,8 +428,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("Kicked " + targetPlayerName - + " from " + faction.name() + ".")); + player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.PLR_KICKED_SUCCESS, targetPlayerName, faction.name())); } reopenPage(player, ref, store, playerRef); } @@ -441,7 +440,7 @@ public void handleDataEvent(Ref ref, Store store, if (viewFaction != null) { guiManager.openAdminFactionInfo(player, ref, store, playerRef, viewFaction.id()); } else { - player.sendMessage(MessageUtil.adminError("Faction no longer exists.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.PLR_FACTION_GONE)); } } 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 fb5aa298..1f8073d8 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java @@ -11,6 +11,8 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.storage.PlayerStorage; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.TimeUtil; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; @@ -214,18 +216,18 @@ private void buildPlayerList(UICommandBuilder cmd, UIEventBuilder events) { // Count display if (searchQuery.isEmpty()) { - cmd.set("#PlayerCount.Text", filtered.size() + " players"); + cmd.set("#PlayerCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.PLAYERS_SUFFIX, filtered.size())); } else { - cmd.set("#PlayerCount.Text", filtered.size() + " found"); + cmd.set("#PlayerCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FOUND_SUFFIX, filtered.size())); } // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString("Name"), "NAME"), - new DropdownEntryInfo(LocalizableString.fromString("Power"), "POWER"), - new DropdownEntryInfo(LocalizableString.fromString("Last Online"), "LAST_ONLINE"), - new DropdownEntryInfo(LocalizableString.fromString("Faction"), "FACTION"), - new DropdownEntryInfo(LocalizableString.fromString("Online"), "ONLINE") + 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") )); cmd.set("#SortDropdown.Value", sortMode.name()); events.addEventBinding( @@ -262,7 +264,7 @@ private void buildPlayerList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( @@ -301,7 +303,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() ? "Online" : "Offline"); + cmd.set(idx + " #OnlineStatus.Text", info.isOnline() ? HFMessages.get(playerRef, MessageKeys.Common.ONLINE) : HFMessages.get(playerRef, MessageKeys.Common.OFFLINE)); cmd.set(idx + " #OnlineStatus.Style.TextColor", GuiColors.forOnlineStatus(info.isOnline())); // Faction name @@ -309,7 +311,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", "No Faction"); + cmd.set(idx + " #FactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.NO_FACTION)); cmd.set(idx + " #FactionName.Style.TextColor", "#666666"); } @@ -347,11 +349,11 @@ private void buildPlayerEntry(UICommandBuilder cmd, UIEventBuilder events, int i // Last online String lastOnlineText; if (info.isOnline()) { - lastOnlineText = "Now"; + lastOnlineText = HFMessages.get(playerRef, MessageKeys.AdminGui.NOW); } else if (info.lastOnline() > 0) { lastOnlineText = TimeUtil.formatDuration(System.currentTimeMillis() - info.lastOnline()) + " ago"; } else { - lastOnlineText = "Unknown"; + lastOnlineText = HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); } cmd.set(idx + " #LastOnline.Text", lastOnlineText); @@ -532,7 +534,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("Target world not found.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.PLR_WORLD_NOT_FOUND)); return; } var targetTransform = targetPlayer.getTransform(); @@ -543,11 +545,9 @@ public void handleDataEvent(Ref ref, Store store, targetWorld, targetPos, targetRot); store.addComponent(ref, Teleport.getComponentType(), teleport); }); - player.sendMessage(Message.raw("[Admin] Teleported to ").color("#55FF55") - .insert(Message.raw(data.playerName != null ? data.playerName : "player").color("#00FFFF")) - .insert(Message.raw(".").color("#55FF55"))); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.PLR_TELEPORTED, "#55FF55", data.playerName != null ? data.playerName : "player")); } else { - player.sendMessage(MessageUtil.errorText("Player is not online.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.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 cceb0033..a9a70e39 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminUnclaimAllConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminUnclaimAllConfirmPage.java @@ -1,5 +1,9 @@ package com.hyperfactions.gui.admin.page; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; + import com.hyperfactions.data.Faction; import com.hyperfactions.gui.GuiManager; import com.hyperfactions.gui.UIPaths; @@ -61,7 +65,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Set faction info cmd.set("#FactionName.Text", factionName); - cmd.set("#ClaimCount.Text", claimCount + " chunks"); + cmd.set("#ClaimCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.CHUNKS_SUFFIX, claimCount)); // Cancel button events.addEventBinding( @@ -103,19 +107,9 @@ public void handleDataEvent(Ref ref, Store store, claimManager.unclaimAll(factionId); if (claimCount > 0) { - player.sendMessage( - Message.raw("[Admin] Removed ").color("#FF5555") - .insert(Message.raw(String.valueOf(claimCount)).color("#FFFFFF")) - .insert(Message.raw(" claims from ").color("#FF5555")) - .insert(Message.raw(factionName).color("#00FFFF")) - .insert(Message.raw(".").color("#FF5555")) - ); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.UNCLAIM_REMOVED, "#FF5555", claimCount, factionName)); } else { - player.sendMessage( - Message.raw("[Admin] ").color("#FFAA00") - .insert(Message.raw(factionName).color("#00FFFF")) - .insert(Message.raw(" had no claims to remove.").color("#FFAA00")) - ); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.UNCLAIM_NO_CLAIMS, "#FFAA00", factionName)); } guiManager.openAdminFactions(player, ref, store, playerRef); 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 fa0632ea..74cb3f6d 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminVersionPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminVersionPage.java @@ -1,5 +1,8 @@ package com.hyperfactions.gui.admin.page; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; + import com.hyperfactions.HyperFactions; import com.hyperfactions.config.ConfigManager; import com.hyperfactions.gui.GuiManager; @@ -68,7 +71,7 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.set("#JavaVersion.Text", System.getProperty("java.version", "Unknown")); // --- Permissions --- - setStatus(cmd, "#HyperPermsStatus", HyperPermsIntegration.isAvailable(), "Active", "Not Found"); + setStatus(cmd, "#HyperPermsStatus", HyperPermsIntegration.isAvailable(), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); String providerNames = PermissionManager.get().getProviderNames(); @@ -87,7 +90,7 @@ public void build(Ref ref, UICommandBuilder cmd, } else if (vaultInstalled) { setStatusColor(cmd, "#VaultUnlockedStatus", "Installed (no perm provider)", COLOR_YELLOW); } else { - setStatusColor(cmd, "#VaultUnlockedStatus", "Not Installed", COLOR_GRAY); + setStatusColor(cmd, "#VaultUnlockedStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_INSTALLED), COLOR_GRAY); } setStatus(cmd, "#NativeStatus", providerNames.contains("HytaleNative"), "Active", "Not Found"); @@ -105,14 +108,14 @@ public void build(Ref ref, UICommandBuilder cmd, case HYPERPROTECT -> { String hpVersion = System.getProperty("hyperprotect.bridge.version", "unknown"); setStatusColor(cmd, "#HyperProtectStatus", "Active (v" + hpVersion + ")", COLOR_GREEN); - setStatusColor(cmd, "#OrbisGuardMixinsStatus", "N/A", COLOR_GRAY); + setStatusColor(cmd, "#OrbisGuardMixinsStatus", HFMessages.get(playerRef, MessageKeys.Common.NA), COLOR_GRAY); } case ORBISGUARD -> { - setStatusColor(cmd, "#HyperProtectStatus", "Not Detected", COLOR_GRAY); + setStatusColor(cmd, "#HyperProtectStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); setStatusColor(cmd, "#OrbisGuardMixinsStatus", "Active", COLOR_GREEN); } case NONE -> { - setStatusColor(cmd, "#HyperProtectStatus", "Not Detected", COLOR_GRAY); + setStatusColor(cmd, "#HyperProtectStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); setStatusColor(cmd, "#OrbisGuardMixinsStatus", "Not Detected", COLOR_GRAY); } default -> throw new IllegalStateException("Unexpected value"); @@ -125,7 +128,7 @@ public void build(Ref ref, UICommandBuilder cmd, ? COLOR_YELLOW : COLOR_GREEN; setStatusColor(cmd, "#OrbisGuardApiStatus", ogLabel, ogColor); } else { - setStatusColor(cmd, "#OrbisGuardApiStatus", "Not Detected", COLOR_GRAY); + setStatusColor(cmd, "#OrbisGuardApiStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); } String mixinStatus = ProtectionMixinBridge.getStatusSummary(); 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 3acca831..8a73189b 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneIntegrationFlagsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneIntegrationFlagsPage.java @@ -10,6 +10,8 @@ import com.hyperfactions.integration.protection.GravestoneIntegration; import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -69,7 +71,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Get the zone Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - cmd.set("#ZoneName.Text", "Zone Not Found"); + cmd.set("#ZoneName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_ZONE_NOT_FOUND)); cmd.set("#FlagsContainer.Visible", false); return; } @@ -142,13 +144,13 @@ private void buildFlagToggle(UICommandBuilder cmd, UIEventBuilder events, // Default indicator (shows "(default)", "(custom)", or "(no plugin)") if (integrationUnavailable) { - cmd.set(idx + "Default.Text", "(no plugin)"); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_NO_PLUGIN)); cmd.set(idx + "Default.Style.TextColor", "#FF5555"); } else if (isDefault) { - cmd.set(idx + "Default.Text", "(default)"); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_DEFAULT)); cmd.set(idx + "Default.Style.TextColor", "#555555"); } else { - cmd.set(idx + "Default.Text", "(custom)"); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_CUSTOM)); cmd.set(idx + "Default.Style.TextColor", "#FFAA00"); } @@ -178,10 +180,10 @@ private void buildMapVisibilityControl(UICommandBuilder cmd, UIEventBuilder even // Default indicator if (isDefault) { - cmd.set("#MapVisibilityDefault.Text", "(default)"); + cmd.set("#MapVisibilityDefault.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_DEFAULT)); cmd.set("#MapVisibilityDefault.Style.TextColor", "#555555"); } else { - cmd.set("#MapVisibilityDefault.Text", "(custom)"); + cmd.set("#MapVisibilityDefault.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_CUSTOM)); cmd.set("#MapVisibilityDefault.Style.TextColor", "#FFAA00"); } @@ -259,14 +261,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("Invalid flag.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_INVALID_FLAG)); sendUpdate(); return; } Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - player.sendMessage(MessageUtil.adminError("Zone not found.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_ZONE_NOT_FOUND)); sendUpdate(); return; } @@ -290,7 +292,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("Zone not found.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_ZONE_NOT_FOUND)); sendUpdate(); return; } @@ -322,7 +324,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("Zone not found.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_ZONE_NOT_FOUND)); sendUpdate(); return; } @@ -338,7 +340,7 @@ private void handleResetDefaults(Player player) { } } - player.sendMessage(MessageUtil.adminSuccess("Reset integration flags to defaults.")); + player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.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 99a220ad..3dca8d00 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneMapPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneMapPage.java @@ -14,6 +14,8 @@ import com.hyperfactions.util.ChunkUtil; import com.hyperfactions.util.Logger; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -146,9 +148,9 @@ public void build(Ref ref, UICommandBuilder cmd, // Show world mismatch warning if player is in different world if (!sameWorld) { - cmd.set("#PositionInfo.Text", "WARNING: You are in '" + worldName + "' - zone is in '" + zone.world() + "'"); + cmd.set("#PositionInfo.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.MAP_WORLD_WARNING, worldName, zone.world())); } else { - cmd.set("#PositionInfo.Text", "Your Position: Chunk (" + playerChunkX + ", " + playerChunkZ + ")"); + cmd.set("#PositionInfo.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.MAP_POSITION, playerChunkX, playerChunkZ)); } // Dynamic legend: add OrbisGuard protected region entry when OG is available @@ -434,7 +436,7 @@ public void handleDataEvent(Ref ref, Store store, // Get fresh zone data Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - player.sendMessage(MessageUtil.errorText("Zone no longer exists.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.MAP_ZONE_GONE)); guiManager.openAdminZone(player, ref, store, playerRef); return; } @@ -455,9 +457,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("Claimed chunk (" + data.chunkX + ", " + data.chunkZ + ") for " + zone.name(), "#44cc44")); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MAP_CLAIMED, "#44cc44", data.chunkX, data.chunkZ, zone.name())); } else { - player.sendMessage(MessageUtil.errorText("Failed to claim chunk: " + result)); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.MAP_CLAIM_FAILED, result)); } // Refresh by opening new page with fresh zone data, preserving openFlagsAfter @@ -470,9 +472,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("Unclaimed chunk (" + data.chunkX + ", " + data.chunkZ + ") from " + zone.name(), "#44cc44")); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MAP_UNCLAIMED, "#44cc44", data.chunkX, data.chunkZ, zone.name())); } else { - player.sendMessage(MessageUtil.errorText("Failed to unclaim chunk: " + result)); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.MAP_UNCLAIM_FAILED, result)); } // Refresh by opening new page with fresh zone data, preserving openFlagsAfter @@ -485,15 +487,15 @@ public void handleDataEvent(Ref ref, Store store, case "OtherZone" -> { Zone otherZone = zoneManager.getZone(zoneWorld, data.chunkX, data.chunkZ); String zoneName = otherZone != null ? otherZone.name() : "another zone"; - player.sendMessage(MessageUtil.text("This chunk belongs to " + zoneName + ".", MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MAP_CHUNK_BELONGS, MessageUtil.COLOR_GOLD, zoneName)); } case "Faction" -> { - player.sendMessage(MessageUtil.text("This chunk is claimed by a faction.", MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.MAP_CHUNK_FACTION, MessageUtil.COLOR_GOLD)); } case "Protected" -> { - player.sendMessage(MessageUtil.text("This chunk is in a protected region.", MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.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 223263d5..87cbf3ac 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePage.java @@ -7,6 +7,8 @@ import com.hyperfactions.gui.admin.data.AdminZoneData; import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.UuidUtil; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; @@ -260,7 +262,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", "No chunks"); + cmd.set(idx + " #Bounds.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZONE_NO_CHUNKS)); } // Created date @@ -384,14 +386,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("Invalid zone ID.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.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("Zone not found.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZONE_NOT_FOUND)); rebuildList(); } } @@ -401,7 +403,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("Invalid zone ID.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZONE_INVALID_ID)); return; } guiManager.openAdminZoneSettings(player, ref, store, playerRef, zoneId); @@ -412,7 +414,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("Invalid zone ID.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZONE_INVALID_ID)); return; } guiManager.openAdminZoneProperties(player, ref, store, playerRef, @@ -424,15 +426,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("Invalid zone ID.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZONE_INVALID_ID)); return; } ZoneManager.ZoneResult result = zoneManager.removeZone(zoneId); if (result == ZoneManager.ZoneResult.SUCCESS) { - player.sendMessage(MessageUtil.errorText("Zone " + data.zoneName + " deleted.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZONE_DELETED, data.zoneName)); expandedZones.remove(zoneId); } else { - player.sendMessage(MessageUtil.errorText("Failed to delete zone: " + result)); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.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 99bb6894..ef016af8 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePropertiesPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePropertiesPage.java @@ -7,6 +7,8 @@ import com.hyperfactions.gui.admin.data.AdminZonePropertiesData; import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -75,7 +77,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Get the zone Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - cmd.set("#ZoneName.Text", "Zone Not Found"); + cmd.set("#ZoneName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_ZONE_NOT_FOUND)); cmd.set("#GeneralBox.Visible", false); cmd.set("#NotificationsBox.Visible", false); return; @@ -151,11 +153,11 @@ private void buildNotifications(UICommandBuilder cmd, UIEventBuilder events, Zon // Upper title String upperCustom = zone.notifyTitleUpper(); if (upperCustom != null && !upperCustom.isEmpty()) { - cmd.set("#UpperCurrent.Text", "Current: \"" + upperCustom + "\" (custom)"); + cmd.set("#UpperCurrent.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_CURRENT_CUSTOM, upperCustom)); cmd.set("#UpperTitleInput.Value", upperCustom); } else { - String defaultUpper = zone.isSafeZone() ? "PvP Disabled" : "PvP Enabled"; - cmd.set("#UpperCurrent.Text", "Current: \"" + defaultUpper + "\" (default)"); + 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)); } events.addEventBinding( @@ -178,10 +180,10 @@ private void buildNotifications(UICommandBuilder cmd, UIEventBuilder events, Zon // Lower title String lowerCustom = zone.notifyTitleLower(); if (lowerCustom != null && !lowerCustom.isEmpty()) { - cmd.set("#LowerCurrent.Text", "Current: \"" + lowerCustom + "\" (custom)"); + cmd.set("#LowerCurrent.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_CURRENT_CUSTOM, lowerCustom)); cmd.set("#LowerTitleInput.Value", lowerCustom); } else { - cmd.set("#LowerCurrent.Text", "Current: \"" + zone.name() + "\" (default)"); + cmd.set("#LowerCurrent.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_CURRENT_DEFAULT, zone.name())); } events.addEventBinding( @@ -267,7 +269,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 = "Name cannot be empty."; + nameError = HFMessages.get(playerRef, MessageKeys.AdminGui.ZPROP_NAME_EMPTY); rebuildPage(); return; } @@ -278,11 +280,11 @@ private void handleSaveName(Player player, AdminZonePropertiesData data) { switch (result) { case SUCCESS -> { nameError = null; - player.sendMessage(MessageUtil.adminSuccess("Zone renamed to \"" + newName + "\".")); + player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ZPROP_RENAMED, newName)); } - case NAME_TAKEN -> nameError = "A zone with that name already exists."; - case INVALID_NAME -> nameError = "Invalid name (max 32 characters)."; - default -> nameError = "Failed to rename: " + result; + 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); } rebuildPage(); @@ -306,38 +308,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("Upper title cannot be empty. Use Clear to reset.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZPROP_UPPER_EMPTY)); sendUpdate(); return; } zoneManager.setZoneNotifyTitle(zoneId, upper.trim(), null); - player.sendMessage(MessageUtil.adminSuccess("Upper title set.")); + player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ZPROP_UPPER_SET)); rebuildPage(); } private void handleClearUpper(Player player) { zoneManager.setZoneNotifyTitle(zoneId, "clear", null); - player.sendMessage(MessageUtil.adminSuccess("Upper title reset to default.")); + player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.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("Lower title cannot be empty. Use Clear to reset.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZPROP_LOWER_EMPTY)); sendUpdate(); return; } zoneManager.setZoneNotifyTitle(zoneId, null, lower.trim()); - player.sendMessage(MessageUtil.adminSuccess("Lower title set.")); + player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ZPROP_LOWER_SET)); rebuildPage(); } private void handleClearLower(Player player) { zoneManager.setZoneNotifyTitle(zoneId, null, "clear"); - player.sendMessage(MessageUtil.adminSuccess("Lower title reset to default.")); + player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.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 07f1dbe1..0c4d702c 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneSettingsPage.java @@ -9,6 +9,8 @@ import com.hyperfactions.integration.protection.ProtectionMixinBridge; import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -100,7 +102,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Get the zone Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - cmd.set("#ZoneName.Text", "Zone Not Found"); + cmd.set("#ZoneName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_ZONE_NOT_FOUND)); cmd.set("#FlagsContainer.Visible", false); return; } @@ -153,7 +155,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Back button - text depends on back target if ("settings".equals(backTarget)) { - cmd.set("#BackBtn.Text", "Back to Settings"); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZFLAGS_BACK_TO_SETTINGS)); } events.addEventBinding( CustomUIEventBindingType.Activating, @@ -218,16 +220,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", "(conflict)"); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZFLAGS_CONFLICT)); cmd.set(idx + "Default.Style.TextColor", "#FF5555"); } else if (mixinUnavailable) { - cmd.set(idx + "Default.Text", "(mixin)"); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZFLAGS_MIXIN)); cmd.set(idx + "Default.Style.TextColor", "#FF5555"); } else if (isDefault) { - cmd.set(idx + "Default.Text", "(default)"); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_DEFAULT)); cmd.set(idx + "Default.Style.TextColor", "#555555"); } else { - cmd.set(idx + "Default.Text", "(custom)"); + cmd.set(idx + "Default.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ZINT_CUSTOM)); cmd.set(idx + "Default.Style.TextColor", "#FFAA00"); } @@ -311,14 +313,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("Invalid flag.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_INVALID_FLAG)); sendUpdate(); return; } Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - player.sendMessage(MessageUtil.adminError("Zone not found.")); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.AdminGui.ZFLAGS_ZONE_NOT_FOUND)); sendUpdate(); return; } @@ -346,9 +348,9 @@ private void handleResetDefaults(Player player, AdminZoneSettingsData data) { ZoneManager.ZoneResult result = zoneManager.clearAllZoneFlags(zoneId); if (result == ZoneManager.ZoneResult.SUCCESS) { - player.sendMessage(MessageUtil.adminSuccess("Reset all flags to defaults.")); + player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.ZFLAGS_RESET_ALL)); } else { - player.sendMessage(MessageUtil.adminError("Failed to reset flags: " + result)); + player.sendMessage(MessageUtil.adminError(playerRef, MessageKeys.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 2ececfe9..054797ba 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/CreateZoneWizardPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/CreateZoneWizardPage.java @@ -9,6 +9,8 @@ import com.hyperfactions.util.ChunkUtil; import com.hyperfactions.util.Logger; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -239,7 +241,7 @@ private void buildRadiusSection(UICommandBuilder cmd, UIEventBuilder events) { // Calculate and show preview int previewChunks = calculateChunkCount(selectedRadius, claimMethod == ClaimMethod.RADIUS_CIRCLE); - cmd.set("#RadiusPreview.Text", "~" + previewChunks + " chunks"); + cmd.set("#RadiusPreview.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.WIZ_CHUNKS_PREVIEW, previewChunks)); // Highlight selected preset for (int preset : RADIUS_PRESETS) { @@ -361,7 +363,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("Radius must be between 1 and " + MAX_RADIUS + ".")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.WIZ_RADIUS_RANGE, MAX_RADIUS)); sendUpdate(); return; } @@ -413,26 +415,26 @@ private void handleCreate(Player player, Ref ref, Store MAX_NAME_LENGTH) { - player.sendMessage(MessageUtil.errorText("Zone name cannot exceed " + MAX_NAME_LENGTH + " characters.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.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("A zone with this name already exists.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.WIZ_NAME_TAKEN)); sendUpdate(); return; } @@ -449,25 +451,21 @@ private void handleCreate(Player player, Ref ref, Store ref, Store ref, Store 0) { - player.sendMessage(MessageUtil.text("Claimed " + claimed + " chunks in a " - + (circle ? "circular" : "square") + " radius of " + radius + ".", "#44cc44")); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.WIZ_RADIUS_CLAIMED, "#44cc44", claimed, (circle ? "circular" : "square"), radius)); newZone = zoneManager.getZoneById(newZone.id()); } else { - player.sendMessage(MessageUtil.text("No chunks could be claimed (area may be occupied).", MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.WIZ_RADIUS_NO_CLAIMS, MessageUtil.COLOR_GOLD)); } } } @@ -513,7 +510,7 @@ private void handleCreate(Player player, Ref ref, Store { // No chunks to claim now if (method == ClaimMethod.NO_CLAIMS) { - player.sendMessage(MessageUtil.text("Zone created with no claims.", "#888888")); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.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 6ed47ada..91e4fe20 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/ZoneChangeTypeModalPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/ZoneChangeTypeModalPage.java @@ -7,6 +7,8 @@ import com.hyperfactions.gui.admin.data.ZoneChangeTypeModalData; import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.MessageUtil; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -137,7 +139,7 @@ public void handleDataEvent(Ref ref, Store store, Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - player.sendMessage(MessageUtil.errorText("Zone no longer exists.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZTYPE_ZONE_GONE)); navigateBack(player, ref, store, playerRef); return; } @@ -170,17 +172,11 @@ private void handleTypeChange(Player player, Ref ref, Store ref, Store store, Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { - player.sendMessage(MessageUtil.errorText("Zone no longer exists.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_ZONE_GONE)); guiManager.openAdminZone(player, ref, store, playerRef, currentTab, currentPage); return; } @@ -121,7 +123,7 @@ public void handleDataEvent(Ref ref, Store store, // Validation if (newName == null || newName.trim().isEmpty()) { - player.sendMessage(MessageUtil.errorText("Please enter a zone name.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_ENTER_NAME)); sendUpdate(); return; } @@ -129,20 +131,20 @@ public void handleDataEvent(Ref ref, Store store, newName = newName.trim(); if (newName.length() < MIN_NAME_LENGTH) { - player.sendMessage(MessageUtil.errorText("Zone name must be at least " + MIN_NAME_LENGTH + " character.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_TOO_SHORT, MIN_NAME_LENGTH)); sendUpdate(); return; } if (newName.length() > MAX_NAME_LENGTH) { - player.sendMessage(MessageUtil.errorText("Zone name cannot exceed " + MAX_NAME_LENGTH + " characters.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_TOO_LONG, MAX_NAME_LENGTH)); sendUpdate(); return; } // Check if name is the same if (newName.equalsIgnoreCase(zone.name())) { - player.sendMessage(MessageUtil.text("That's already this zone's name.", MessageUtil.COLOR_GOLD)); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.ZREN_SAME_NAME, MessageUtil.COLOR_GOLD)); sendUpdate(); return; } @@ -153,29 +155,23 @@ public void handleDataEvent(Ref ref, Store store, switch (result) { case SUCCESS -> { - player.sendMessage( - Message.raw("[Admin] Zone renamed from ").color("#AAAAAA") - .insert(Message.raw(oldName).color("#888888")) - .insert(Message.raw(" to ").color("#AAAAAA")) - .insert(Message.raw(newName).color("#00FFFF")) - .insert(Message.raw("!").color("#AAAAAA")) - ); + player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.ZREN_RENAMED, "#AAAAAA", oldName, newName)); guiManager.openAdminZone(player, ref, store, playerRef, currentTab, currentPage); } case NAME_TAKEN -> { - player.sendMessage(MessageUtil.errorText("A zone with that name already exists.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_NAME_TAKEN)); sendUpdate(); } case INVALID_NAME -> { - player.sendMessage(MessageUtil.errorText("Invalid zone name.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_INVALID_NAME)); sendUpdate(); } case NOT_FOUND -> { - player.sendMessage(MessageUtil.errorText("Zone no longer exists.")); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_ZONE_GONE)); guiManager.openAdminZone(player, ref, store, playerRef, currentTab, currentPage); } default -> { - player.sendMessage(MessageUtil.errorText("Failed to rename zone: " + result)); + player.sendMessage(MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ZREN_RENAME_FAILED, result)); sendUpdate(); } } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 6002be64..70e0e28e 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -1231,6 +1231,230 @@ public static final class NewPlayerGui { 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 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"; + // 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"; + // 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"; + // 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 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"; + // 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"; + private AdminGui() {} + } + /** Player settings page labels. */ public static final class PlayerSettings { public static final String TITLE = "hyperfactions_gui.player_settings.title"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang index 1aabe581..0e2ccdc9 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang @@ -15,3 +15,249 @@ nav.log = Log nav.updates = Updates nav.help = Help nav.version = Version + +# ========== Common Admin Labels ========== +common.faction_not_found = Faction Not Found +common.no_faction = No Faction +common.not_set = Not set +common.on = On +common.off = Off +common.enable = Enable +common.disable = Disable +common.none_paren = (None) +common.invalid_faction = Invalid faction. +common.leader_prefix = Leader: {0} +common.members_suffix = {0} members +common.claims_suffix = {0} claims +common.factions_suffix = {0} factions +common.players_suffix = {0} players +common.chunks_suffix = {0} chunks +common.entries_suffix = {0} entries +common.found_suffix = {0} found +common.power_format = {0}/{1} power +common.raidable = Raidable +common.protected = Protected +common.no_description = No description set. +common.officers_more = +{0} more +common.custom_max = (custom max) +common.default_max = (default max) +common.now = Now +common.ago_suffix = {0} ago +common.just_now = just now +common.no_membership_history = No membership history + +# ========== Admin Dashboard ========== +dashboard.factions_prefix = Factions: {0} +dashboard.members_prefix = Total Members: {0} +dashboard.claims_prefix = Total Claims: {0} + +# ========== Admin Actions ========== +actions.confirm_reset = Confirm Reset? +actions.confirm_trigger = Confirm Trigger? +actions.kd_reset = Reset K/D for {0} players. +actions.kd_reset_failed = Failed to reset K/D: {0} +actions.upkeep_unavailable = Upkeep processor is not available. +actions.upkeep_triggered = Upkeep collection triggered. +actions.upkeep_failed = Upkeep failed: {0} + +# ========== Admin Disband ========== +disband.faction_gone = Faction no longer exists. +disband.success = Faction '{0}' has been disbanded. +disband.failed = Failed to disband: {0} +disband.no_leader = Faction has no leader, cannot disband. + +# ========== Admin Unclaim All ========== +unclaim.removed = [Admin] Removed {0} claims from {1}. +unclaim.no_claims = {0} had no claims to remove. + +# ========== Admin Factions List ========== +factions.home_not_set = Not set +factions.teleported = Teleported to {0}'s home. +factions.no_home = Faction has no home set. +factions.world_not_found = Target world not found. + +# ========== Admin Faction Info ========== +info.faction_gone = This faction no longer exists. + +# ========== Admin Faction Members ========== +members.sort_role = Role +members.sort_online = Online +members.sort_name = Name +members.sort_power = Power +members.promoted = [Admin] Promoted {0} to {1}. +members.demoted = [Admin] Demoted {0} to {1}. +members.kicked = [Admin] Kicked {0} from the faction. + +# ========== Admin Faction Relations ========== +relations.allies_header = ALLIES ({0}) +relations.enemies_header = ENEMIES ({0}) +relations.no_allies = No allies. +relations.no_enemies = No enemies. +relations.neutral_count = {0} neutral factions +relations.since_today = Since: today +relations.since_one_day = Since: 1 day ago +relations.since_days = Since: {0} days ago +relations.set_ally = [Admin] Set mutual ally status with {0}. +relations.set_enemy = Set mutual enemy status with {0}. +relations.set_neutral = [Admin] Set mutual neutral status with {0}. + +# ========== Admin Faction Settings ========== +settings.locked = This setting is locked by server configuration. +settings.perm_toggled = Set {0} to {1}. +settings.color_changed = Set faction color to {0}. +settings.recruitment_set = Set recruitment to {0}. +settings.no_home = [Admin] This faction has no home set. +settings.home_cleared = Cleared faction home for {0}. + +# ========== Sort Dropdown Labels ========== +sort.power = Power +sort.name = Name +sort.members = Members +sort.balance = Balance + +# ========== Admin Players ========== +players.sort_last_online = Last Online +players.sort_faction = Faction +players.sort_online = Online +players.not_online = Player is not online. +players.world_not_found = Target world not found. +players.teleported = [Admin] Teleported to {0}. + +# ========== Admin Player Info ========== +playerinfo.disband_faction = Disband Faction +playerinfo.kick_leader = Kick Leader +playerinfo.enter_valid_number = Enter a valid number. +playerinfo.enter_valid_positive = Enter a valid positive number. +playerinfo.faction_gone = Faction no longer exists. +playerinfo.kd_reset = Reset K/D for {0}. +playerinfo.kicked_success = Kicked {0} from {1}. +playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. +playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). + +# ========== Admin Economy ========== +economy.no_data = No factions with economy data. +economy.amount_zero = Amount cannot be zero. +economy.enter_amount = Please enter an amount. +economy.invalid_number = Invalid number: {0} +economy.error = An error occurred. +economy.balance_negative = Balance cannot be negative. +economy.failed = Failed: {0} +economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. +economy.bulk_failures = ({0} failed) + +# ========== Admin Zones ========== +zones.not_found = Zone not found. +zones.invalid_id = Invalid zone ID. +zones.deleted = Zone {0} deleted. +zones.delete_failed = Failed to delete zone: {0} +zones.no_chunks = No chunks +zones.chunks_suffix = {0} ({1} chunks) + +# ========== Zone Create Wizard ========== +wizard.enter_name = Please enter a zone name. +wizard.name_too_short = Zone name must be at least {0} characters. +wizard.name_too_long = Zone name cannot exceed {0} characters. +wizard.name_taken = A zone with this name already exists. +wizard.radius_range = Radius must be between 1 and {0}. +wizard.create_failed = Could not create zone: {0} +wizard.created_not_found = Zone created but could not be found. +wizard.created = Created {0} '{1}'! +wizard.chunk_claimed = Claimed chunk ({0}, {1}). +wizard.chunk_failed = Could not claim current chunk: {0} +wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. +wizard.radius_no_claims = No chunks could be claimed (area may be occupied). +wizard.no_claims = Zone created with no claims. +wizard.chunks_preview = ~{0} chunks + +# ========== Zone Rename ========== +zone_rename.zone_gone = Zone no longer exists. +zone_rename.enter_name = Please enter a zone name. +zone_rename.too_short = Zone name must be at least {0} character. +zone_rename.too_long = Zone name cannot exceed {0} characters. +zone_rename.same_name = That's already this zone's name. +zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! +zone_rename.name_taken = A zone with that name already exists. +zone_rename.invalid_name = Invalid zone name. +zone_rename.rename_failed = Failed to rename zone: {0} + +# ========== Zone Change Type ========== +zone_type.zone_gone = Zone no longer exists. +zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). +zone_type.failed = Failed to change zone type: {0} + +# ========== Zone Integration Flags ========== +zone_int.zone_not_found = Zone Not Found +zone_int.no_plugin = (no plugin) +zone_int.default = (default) +zone_int.custom = (custom) + +# ========== Activity Log ========== +log.all_types = All Types +log.no_logs = No activity logs matching filters. + +# ========== Version Page ========== +version.active = Active +version.not_found = Not Found +version.not_detected = Not Detected +version.not_installed = Not Installed +version.active_version = Active (v{0}) +version.active_compatible = Active (compatible) +version.active_claims_only = Active (claims only) +version.installed_no_perm = Installed (no perm provider) +version.active_provider = Active ({0}) + +# ========== Admin Main Page ========== +main.reload_hint = Use /f reload to reload configuration. +main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. + +# ========== Zone Flags/Settings ========== +zflags.invalid_flag = Invalid flag. +zflags.zone_not_found = Zone not found. +zflags.conflict = (conflict) +zflags.mixin = (mixin) +zflags.reset_int = Reset integration flags to defaults. +zflags.reset_all = Reset all flags to defaults. +zflags.reset_failed = Failed to reset flags: {0} +zflags.back_to_settings = Back to Settings + +# ========== Zone Properties ========== +zprop.current_custom = Current: "{0}" (custom) +zprop.current_default = Current: "{0}" (default) +zprop.pvp_disabled = PvP Disabled +zprop.pvp_enabled = PvP Enabled +zprop.name_empty = Name cannot be empty. +zprop.renamed = Zone renamed to "{0}". +zprop.name_taken = A zone with that name already exists. +zprop.name_invalid = Invalid name (max 32 characters). +zprop.rename_failed = Failed to rename: {0} +zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. +zprop.upper_set = Upper title set. +zprop.upper_reset = Upper title reset to default. +zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. +zprop.lower_set = Lower title set. +zprop.lower_reset = Lower title reset to default. + +# ========== Relations Additional ========== +relations.failed = Failed: {0} + +# ========== Members Additional ========== +members.never = Never +members.teleported = [Admin] Teleported to {0}. + +# ========== Player Info Additional ========== +playerinfo.records = {0} records +playerinfo.joined_date = Joined: {0} +playerinfo.current = Current +playerinfo.left_date = Left: {0} + +# ========== Zone Map ========== +map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' +map.position = Your Position: Chunk ({0}, {1}) +map.zone_gone = Zone no longer exists. +map.claimed = Claimed chunk ({0}, {1}) for {2}. +map.claim_failed = Failed to claim chunk: {0} +map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. +map.unclaim_failed = Failed to unclaim chunk: {0} +map.chunk_belongs = This chunk belongs to {0}. +map.chunk_faction = This chunk is claimed by a faction. +map.chunk_protected = This chunk is in a protected region. From d3267e9f3442431495df1e8c3d5ba89bcfec7681 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 18:09:53 -0700 Subject: [PATCH 18/55] feat: add Player Settings GUI with language and notification preferences (Phase 5) - PlayerSettingsPage with language dropdown and notification toggles - Language override cache in HFMessages for per-player i18n - TerritoryNotifier checks player alert preferences before sending - PlayerDeathSystem checks member preferences before death broadcasts - /f settings player command opens personal settings - Page registered in both faction and new player nav bars - Preferences loaded on connect, cleared on disconnect --- .../java/com/hyperfactions/HyperFactions.java | 2 +- .../command/ui/SettingsSubCommand.java | 18 +- .../hyperfactions/gui/FactionPageOpener.java | 21 ++ .../com/hyperfactions/gui/GuiManager.java | 37 ++- .../java/com/hyperfactions/gui/UIPaths.java | 2 + .../gui/shared/data/PlayerSettingsData.java | 51 +++ .../gui/shared/page/PlayerSettingsPage.java | 310 ++++++++++++++++++ .../platform/PlayerConnectionHandler.java | 11 +- .../protection/ecs/PlayerDeathSystem.java | 10 +- .../territory/TerritoryNotifier.java | 45 ++- .../com/hyperfactions/util/HFMessages.java | 43 ++- .../com/hyperfactions/util/MessageKeys.java | 11 +- .../HyperFactions/shared/player_settings.ui | 132 ++++++++ .../Languages/en-US/hyperfactions_gui.lang | 18 + 14 files changed, 698 insertions(+), 13 deletions(-) create mode 100644 src/main/java/com/hyperfactions/gui/shared/data/PlayerSettingsData.java create mode 100644 src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java create mode 100644 src/main/resources/Common/UI/Custom/HyperFactions/shared/player_settings.ui diff --git a/src/main/java/com/hyperfactions/HyperFactions.java b/src/main/java/com/hyperfactions/HyperFactions.java index 5c4a005e..b9a5196a 100644 --- a/src/main/java/com/hyperfactions/HyperFactions.java +++ b/src/main/java/com/hyperfactions/HyperFactions.java @@ -389,7 +389,7 @@ public void enable() { // Initialize territory notifier (for entry/exit notifications) territoryNotifier = new TerritoryNotifier( - factionManager, claimManager, zoneManager, relationManager + factionManager, claimManager, zoneManager, relationManager, playerStorage ); // Initialize world map service (for claim markers on map) diff --git a/src/main/java/com/hyperfactions/command/ui/SettingsSubCommand.java b/src/main/java/com/hyperfactions/command/ui/SettingsSubCommand.java index 95033a5c..9f0ae37a 100644 --- a/src/main/java/com/hyperfactions/command/ui/SettingsSubCommand.java +++ b/src/main/java/com/hyperfactions/command/ui/SettingsSubCommand.java @@ -2,6 +2,7 @@ import com.hyperfactions.HyperFactions; import com.hyperfactions.command.FactionSubCommand; +import com.hyperfactions.command.util.CommandUtil; import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionMember; import com.hyperfactions.platform.HyperFactionsPlugin; @@ -17,14 +18,14 @@ import org.jetbrains.annotations.NotNull; /** - * Subcommand: /f settings - * Opens the faction settings GUI. + * Subcommand: /f settings [player] + * Opens the faction settings GUI, or player settings with "player" argument. */ public class SettingsSubCommand extends FactionSubCommand { /** Creates a new SettingsSubCommand. */ public SettingsSubCommand(@NotNull HyperFactions hyperFactions, @NotNull HyperFactionsPlugin plugin) { - super("settings", "Open faction settings", hyperFactions, plugin); + super("settings", "Open faction or player settings", hyperFactions, plugin); } /** Executes the command. */ @@ -35,6 +36,17 @@ protected void execute(@NotNull CommandContext ctx, @NotNull PlayerRef player, @NotNull World currentWorld) { + // Check for "player" argument — opens personal settings (no faction required) + String[] rawArgs = CommandUtil.parseRawArgs(ctx.getInputString(), 2); + if (rawArgs.length > 0 && "player".equalsIgnoreCase(rawArgs[0])) { + Player playerEntity = store.getComponent(ref, Player.getComponentType()); + if (playerEntity != null) { + hyperFactions.getGuiManager().openPlayerSettings(playerEntity, ref, store, player); + } + return; + } + + // Default: open faction settings (requires faction + officer) Faction faction = requireFaction(ctx, player); if (faction == null) { return; diff --git a/src/main/java/com/hyperfactions/gui/FactionPageOpener.java b/src/main/java/com/hyperfactions/gui/FactionPageOpener.java index c05c1a4c..0d06e1cb 100644 --- a/src/main/java/com/hyperfactions/gui/FactionPageOpener.java +++ b/src/main/java/com/hyperfactions/gui/FactionPageOpener.java @@ -107,6 +107,27 @@ public void openFactionMain(Player player, Ref ref, } } + /** + * Opens the Player Settings page. + */ + public void openPlayerSettings(Player player, Ref ref, + Store store, PlayerRef playerRef) { + Logger.debug("[GUI] Opening PlayerSettingsPage for %s", playerRef.getUsername()); + try { + PageManager pageManager = player.getPageManager(); + PlayerSettingsPage page = new PlayerSettingsPage( + playerRef, + guiManager.getFactionManager().get(), + guiManager.getPlugin().get().getPlayerStorage(), + guiManager + ); + pageManager.openCustomPage(ref, store, page); + Logger.debug("[GUI] PlayerSettingsPage opened successfully"); + } catch (Exception e) { + ErrorHandler.report("[GUI] Failed to open PlayerSettingsPage", e); + } + } + /** * Opens the Faction Members page. * diff --git a/src/main/java/com/hyperfactions/gui/GuiManager.java b/src/main/java/com/hyperfactions/gui/GuiManager.java index dfb48b71..871ef748 100644 --- a/src/main/java/com/hyperfactions/gui/GuiManager.java +++ b/src/main/java/com/hyperfactions/gui/GuiManager.java @@ -290,6 +290,19 @@ private void registerPages() { 10 )); + // Player Settings page (available to all players) + registry.registerEntry(new Entry( + "player_settings", + MessageKeys.Nav.PLAYER_SETTINGS, + null, + (player, ref, store, playerRef, faction, guiManager) -> + new PlayerSettingsPage(playerRef, factionManager.get(), + plugin.get().getPlayerStorage(), guiManager), + true, // Show in nav bar + false, // Doesn't require faction + 11 + )); + // Help page (available to all players in faction nav bar) registry.registerEntry(new Entry( "help", @@ -299,7 +312,7 @@ private void registerPages() { new HelpMainPage(playerRef, guiManager, factionManager.get()), true, // Show in nav bar false, // Doesn't require faction - 11 + 12 )); // Admin page (requires permission) - accessed via /f admin, not in main nav bar @@ -311,7 +324,7 @@ private void registerPages() { new AdminMainPage(playerRef, factionManager.get(), powerManager.get(), guiManager), false, // Not in main nav bar - separate admin GUI false, - 12 + 13 )); Logger.debug("[GUI] Registered %d pages with FactionPageRegistry", registry.getEntries().size()); @@ -386,6 +399,18 @@ private void registerNewPlayerPages() { 4 )); + // Player Settings page + registry.registerEntry(new NewPlayerPageRegistry.Entry( + "player_settings", + MessageKeys.Nav.PLAYER_SETTINGS, + null, + (player, ref, store, playerRef, guiManager) -> + new PlayerSettingsPage(playerRef, factionManager.get(), + plugin.get().getPlayerStorage(), guiManager), + true, + 5 + )); + // Help Page registry.registerEntry(new NewPlayerPageRegistry.Entry( "help", @@ -394,7 +419,7 @@ private void registerNewPlayerPages() { (player, ref, store, playerRef, guiManager) -> new HelpMainPage(playerRef, guiManager, factionManager.get()), true, - 5 + 6 )); Logger.debug("[GUI] Registered %d pages with NewPlayerPageRegistry", registry.getEntries().size()); @@ -689,6 +714,12 @@ public void openTransferConfirm(Player player, Ref ref, factionPageOpener.openTransferConfirm(player, ref, store, playerRef, faction, targetUuid, targetName); } + /** Opens the player settings page. */ + public void openPlayerSettings(Player player, Ref ref, + Store store, PlayerRef playerRef) { + factionPageOpener.openPlayerSettings(player, ref, store, playerRef); + } + /** Opens the faction dashboard page. */ public void openFactionDashboard(Player player, Ref ref, Store store, PlayerRef playerRef, diff --git a/src/main/java/com/hyperfactions/gui/UIPaths.java b/src/main/java/com/hyperfactions/gui/UIPaths.java index 3960241b..f55799dd 100644 --- a/src/main/java/com/hyperfactions/gui/UIPaths.java +++ b/src/main/java/com/hyperfactions/gui/UIPaths.java @@ -45,6 +45,8 @@ private UIPaths() {} public static final String ERROR_PAGE = BASE + "shared/error_page.ui"; + public static final String PLAYER_SETTINGS = BASE + "shared/player_settings.ui"; + public static final String INVITE_NOTIFICATION = BASE + "shared/invite_notification.ui"; public static final String DISBAND_CONFIRM = BASE + "shared/disband_confirm.ui"; diff --git a/src/main/java/com/hyperfactions/gui/shared/data/PlayerSettingsData.java b/src/main/java/com/hyperfactions/gui/shared/data/PlayerSettingsData.java new file mode 100644 index 00000000..b395bc31 --- /dev/null +++ b/src/main/java/com/hyperfactions/gui/shared/data/PlayerSettingsData.java @@ -0,0 +1,51 @@ +package com.hyperfactions.gui.shared.data; + +import com.hypixel.hytale.codec.Codec; +import com.hypixel.hytale.codec.KeyedCodec; +import com.hypixel.hytale.codec.builder.BuilderCodec; + +/** + * Data for the Player Settings page. + * Handles notification toggles, language selection, and navigation. + */ +public class PlayerSettingsData implements NavAwareData { + + /** The button/action that triggered the event. */ + public String button; + + /** Navigation target from NavBar button. */ + public String navBar; + + /** Language selected from dropdown (dynamic @-prefixed value). */ + public String language; + + /** Codec for serialization/deserialization. */ + public static final BuilderCodec CODEC = BuilderCodec + .builder(PlayerSettingsData.class, PlayerSettingsData::new) + .addField( + new KeyedCodec<>("Button", Codec.STRING), + (data, value) -> data.button = value, + data -> data.button + ) + .addField( + new KeyedCodec<>("NavBar", Codec.STRING), + (data, value) -> data.navBar = value, + data -> data.navBar + ) + .addField( + new KeyedCodec<>("@Language", Codec.STRING), + (data, value) -> data.language = value, + data -> data.language + ) + .build(); + + /** Creates a new PlayerSettingsData. */ + public PlayerSettingsData() { + } + + /** Returns the nav bar. */ + @Override + public String getNavBar() { + return navBar; + } +} diff --git a/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java b/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java new file mode 100644 index 00000000..a376cbc8 --- /dev/null +++ b/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java @@ -0,0 +1,310 @@ +package com.hyperfactions.gui.shared.page; + +import com.hyperfactions.data.Faction; +import com.hyperfactions.gui.GuiManager; +import com.hyperfactions.gui.UIPaths; +import com.hyperfactions.gui.faction.NavBarHelper; +import com.hyperfactions.gui.newplayer.NewPlayerNavBarHelper; +import com.hyperfactions.gui.shared.data.PlayerSettingsData; +import com.hyperfactions.manager.FactionManager; +import com.hyperfactions.storage.PlayerStorage; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; +import com.hyperfactions.util.MessageUtil; +import com.hypixel.hytale.component.Ref; +import com.hypixel.hytale.component.Store; +import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; +import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; +import com.hypixel.hytale.server.core.entity.entities.Player; +import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; +import com.hypixel.hytale.server.core.ui.builder.EventData; +import com.hypixel.hytale.server.core.ui.builder.UICommandBuilder; +import com.hypixel.hytale.server.core.ui.builder.UIEventBuilder; +import com.hypixel.hytale.server.core.universe.PlayerRef; +import com.hypixel.hytale.server.core.universe.world.storage.EntityStore; +import java.util.List; +import java.util.UUID; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Player Settings page for personal preferences. + * Allows players to configure language and notification preferences. + * Works for both faction members and players without a faction. + */ +public class PlayerSettingsPage extends InteractiveCustomUIPage { + + private static final String PAGE_ID = "player_settings"; + + /** Available locale codes. New locales are added here as translations are completed. */ + private static final List AVAILABLE_LOCALES = List.of( + "en-US" + ); + + /** Display names for available locales (parallel to AVAILABLE_LOCALES). */ + private static final List LOCALE_DISPLAY_NAMES = List.of( + "English (US)" + ); + + private final PlayerRef playerRef; + + private final FactionManager factionManager; + + private final PlayerStorage playerStorage; + + private final GuiManager guiManager; + + private final Faction faction; + + // Cached preferences (loaded from player data) + private boolean territoryAlerts = true; + + private boolean deathAnnouncements = true; + + private boolean powerNotifications = true; + + private String languagePreference; // null = auto-detect + + /** Creates a new PlayerSettingsPage. */ + public PlayerSettingsPage(@NotNull PlayerRef playerRef, + @NotNull FactionManager factionManager, + @NotNull PlayerStorage playerStorage, + @NotNull GuiManager guiManager) { + super(playerRef, CustomPageLifetime.CanDismiss, PlayerSettingsData.CODEC); + this.playerRef = playerRef; + this.factionManager = factionManager; + this.playerStorage = playerStorage; + this.guiManager = guiManager; + this.faction = factionManager.getPlayerFaction(playerRef.getUuid()); + + // Load current preferences + loadPreferences(); + } + + private void loadPreferences() { + playerStorage.loadPlayerData(playerRef.getUuid()).thenAccept(opt -> { + opt.ifPresent(data -> { + this.territoryAlerts = data.isTerritoryAlertsEnabled(); + this.deathAnnouncements = data.isDeathAnnouncementsEnabled(); + this.powerNotifications = data.isPowerNotificationsEnabled(); + this.languagePreference = data.getLanguagePreference(); + }); + }); + } + + /** Builds the page. */ + @Override + public void build(Ref ref, UICommandBuilder cmd, + UIEventBuilder events, Store store) { + + // Load the template + cmd.append(UIPaths.PLAYER_SETTINGS); + + // Setup nav bar based on faction status + if (faction != null) { + NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); + } else { + NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); + } + + // Page title + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.PlayerSettings.TITLE)); + + // === Language Section === + cmd.set("#LanguageSectionTitle.Text", + HFMessages.get(playerRef, MessageKeys.PlayerSettings.LANGUAGE_SECTION)); + cmd.set("#AutoDetectDesc.Text", + HFMessages.get(playerRef, MessageKeys.PlayerSettings.AUTO_DETECT_DESC)); + cmd.set("#LanguageLabel.Text", + HFMessages.get(playerRef, MessageKeys.PlayerSettings.LANGUAGE_LABEL)); + + // Auto-detect checkbox + boolean autoDetect = (languagePreference == null); + cmd.set("#AutoDetectCB #CheckBox.Value", autoDetect); + + // Auto-detect checkbox event + events.addEventBinding( + CustomUIEventBindingType.ValueChanged, + "#AutoDetectCB #CheckBox", + EventData.of("Button", "ToggleAutoDetect"), + false + ); + + // Language dropdown + cmd.set("#LanguageDropdown.Entries", LOCALE_DISPLAY_NAMES); + int selectedIndex = 0; + if (languagePreference != null) { + int idx = AVAILABLE_LOCALES.indexOf(languagePreference); + if (idx >= 0) { + selectedIndex = idx; + } + } + cmd.set("#LanguageDropdown.Value", selectedIndex); + + // Disable dropdown when auto-detect is on + cmd.set("#LanguageRow.Visible", !autoDetect); + + // Language dropdown change event + events.addEventBinding( + CustomUIEventBindingType.ValueChanged, + "#LanguageDropdown", + EventData.of("Button", "LanguageChanged") + .append("@Language", "#LanguageDropdown.Value"), + false + ); + + // === Notifications Section === + cmd.set("#NotifSectionTitle.Text", + HFMessages.get(playerRef, MessageKeys.PlayerSettings.NOTIFICATIONS_SECTION)); + + // Territory Alerts + buildNotificationToggle(cmd, events, "#TerritoryAlertsCB", + MessageKeys.PlayerSettings.TERRITORY_ALERTS, + MessageKeys.PlayerSettings.TERRITORY_ALERTS_DESC, + "#TerritoryAlertsDesc", territoryAlerts, "ToggleTerritoryAlerts"); + + // Death Announcements + buildNotificationToggle(cmd, events, "#DeathAnnounceCB", + MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS, + MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS_DESC, + "#DeathAnnounceDesc", deathAnnouncements, "ToggleDeathAnnouncements"); + + // Power Notifications + buildNotificationToggle(cmd, events, "#PowerNotifCB", + MessageKeys.PlayerSettings.POWER_NOTIFICATIONS, + MessageKeys.PlayerSettings.POWER_NOTIFICATIONS_DESC, + "#PowerNotifDesc", powerNotifications, "TogglePowerNotifications"); + } + + private void buildNotificationToggle(UICommandBuilder cmd, UIEventBuilder events, + String checkboxId, String labelKey, String descKey, + String descId, boolean value, String action) { + cmd.set(checkboxId + " #CheckBox.Value", value); + + // Set localized label text + // Note: @Text param is set in .ui, but we override via child label + // CheckBoxWithLabel template has a Label child we can target + + // Description text + cmd.set(descId + ".Text", HFMessages.get(playerRef, descKey)); + + // ValueChanged event + events.addEventBinding( + CustomUIEventBindingType.ValueChanged, + checkboxId + " #CheckBox", + EventData.of("Button", action), + false + ); + } + + /** Handles data event. */ + @Override + public void handleDataEvent(Ref ref, Store store, + PlayerSettingsData data) { + super.handleDataEvent(ref, store, data); + + Player player = store.getComponent(ref, Player.getComponentType()); + PlayerRef playerRef = store.getComponent(ref, PlayerRef.getComponentType()); + + if (player == null || playerRef == null) { + return; + } + + // Handle nav bar events + if (data.navBar != null && !data.navBar.isEmpty()) { + if (faction != null) { + if (NavBarHelper.handleNavEvent(data, player, ref, store, playerRef, faction, guiManager)) { + return; + } + } else { + if (NewPlayerNavBarHelper.handleNavEvent(data, player, ref, store, playerRef, guiManager)) { + return; + } + } + } + + if (data.button == null) { + return; + } + + UUID uuid = playerRef.getUuid(); + + switch (data.button) { + case "ToggleAutoDetect" -> { + // Toggle auto-detect: if currently auto (null), set to current client language + // If currently manual, set to null (auto) + if (languagePreference == null) { + // Switching to manual - use current client language + languagePreference = playerRef.getLanguage(); + } else { + // Switching to auto-detect + languagePreference = null; + } + savePreference(uuid, d -> d.setLanguagePreference(languagePreference)); + HFMessages.setLanguageOverride(uuid, languagePreference); + sendUpdate(); + } + + case "LanguageChanged" -> { + // Dropdown value is an index into AVAILABLE_LOCALES + if (data.language != null) { + try { + int index = Integer.parseInt(data.language); + if (index >= 0 && index < AVAILABLE_LOCALES.size()) { + languagePreference = AVAILABLE_LOCALES.get(index); + savePreference(uuid, d -> d.setLanguagePreference(languagePreference)); + HFMessages.setLanguageOverride(uuid, languagePreference); + player.sendMessage(MessageUtil.successText(playerRef, + MessageKeys.PlayerSettings.LANGUAGE_CHANGED, + LOCALE_DISPLAY_NAMES.get(index))); + } + } catch (NumberFormatException e) { + // Invalid dropdown value + } + } + sendUpdate(); + } + + case "ToggleTerritoryAlerts" -> { + 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))); + sendUpdate(); + } + + case "ToggleDeathAnnouncements" -> { + 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))); + sendUpdate(); + } + + case "TogglePowerNotifications" -> { + 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))); + sendUpdate(); + } + + default -> sendUpdate(); + } + } + + private void savePreference(UUID uuid, + java.util.function.Consumer updater) { + playerStorage.updatePlayerData(uuid, updater); + } +} diff --git a/src/main/java/com/hyperfactions/platform/PlayerConnectionHandler.java b/src/main/java/com/hyperfactions/platform/PlayerConnectionHandler.java index 19292354..0a156445 100644 --- a/src/main/java/com/hyperfactions/platform/PlayerConnectionHandler.java +++ b/src/main/java/com/hyperfactions/platform/PlayerConnectionHandler.java @@ -4,6 +4,7 @@ import com.hyperfactions.Permissions; import com.hyperfactions.integration.PermissionManager; import com.hyperfactions.util.ErrorHandler; +import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.Logger; import com.hypixel.hytale.server.core.event.events.player.PlayerChatEvent; import com.hypixel.hytale.server.core.event.events.player.PlayerConnectEvent; @@ -44,7 +45,7 @@ public void onPlayerConnect(PlayerConnectEvent event) { Logger.debug("Tracked players after connect: %d (contains %s=%s)", trackedPlayers.size(), uuid, trackedPlayers.containsKey(uuid)); - // Cache username, track first join and last online + // Cache username, track first join and last online, load preferences ErrorHandler.guard("Player connect: load/save player data for " + username, hyperFactions.getPlayerStorage().loadPlayerData(uuid).thenAccept(opt -> { com.hyperfactions.data.PlayerData data = opt.orElseGet(() -> new com.hyperfactions.data.PlayerData(uuid)); @@ -55,6 +56,11 @@ public void onPlayerConnect(PlayerConnectEvent event) { } data.setLastOnline(now); hyperFactions.getPlayerStorage().savePlayerData(data); + + // Cache language preference for i18n resolution + if (data.getLanguagePreference() != null) { + HFMessages.setLanguageOverride(uuid, data.getLanguagePreference()); + } })); // Load player power @@ -163,6 +169,9 @@ public void onPlayerDisconnect(PlayerDisconnectEvent event) { // Clean up territory tracking hyperFactions.getTerritoryNotifier().onPlayerDisconnect(uuid); + // Clear cached language preference + HFMessages.clearLanguageOverride(uuid); + // Unregister from active page tracker (GUI real-time updates) if (hyperFactions.getActivePageTracker() != null) { hyperFactions.getActivePageTracker().unregister(uuid); diff --git a/src/main/java/com/hyperfactions/protection/ecs/PlayerDeathSystem.java b/src/main/java/com/hyperfactions/protection/ecs/PlayerDeathSystem.java index 80909b04..e22cca2a 100644 --- a/src/main/java/com/hyperfactions/protection/ecs/PlayerDeathSystem.java +++ b/src/main/java/com/hyperfactions/protection/ecs/PlayerDeathSystem.java @@ -303,7 +303,15 @@ private void announceDeathLocation(UUID victimUuid, PlayerRef playerRef, } PlayerRef member = hyperFactions.lookupPlayer(memberUuid); if (member != null) { - member.sendMessage(deathMsg); + // Check member's death announcement preference + final PlayerRef finalMember = member; + final Message finalMsg = deathMsg; + hyperFactions.getPlayerStorage().loadPlayerData(memberUuid).thenAccept(opt -> { + boolean enabled = opt.map(PlayerData::isDeathAnnouncementsEnabled).orElse(true); + if (enabled) { + finalMember.sendMessage(finalMsg); + } + }); } } diff --git a/src/main/java/com/hyperfactions/territory/TerritoryNotifier.java b/src/main/java/com/hyperfactions/territory/TerritoryNotifier.java index 357b7445..0eb5050a 100644 --- a/src/main/java/com/hyperfactions/territory/TerritoryNotifier.java +++ b/src/main/java/com/hyperfactions/territory/TerritoryNotifier.java @@ -9,6 +9,7 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.manager.RelationManager; import com.hyperfactions.manager.ZoneManager; +import com.hyperfactions.storage.PlayerStorage; import com.hyperfactions.territory.TerritoryInfo.TerritoryType; import com.hyperfactions.util.ChunkUtil; import com.hyperfactions.util.Logger; @@ -16,6 +17,7 @@ import com.hypixel.hytale.server.core.universe.PlayerRef; import com.hypixel.hytale.server.core.util.EventTitleUtil; import java.util.Map; +import java.util.Set; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import org.jetbrains.annotations.NotNull; @@ -35,22 +37,29 @@ public class TerritoryNotifier { private final RelationManager relationManager; + private final PlayerStorage playerStorage; + // Tracks the previous territory for each player private final Map previousTerritories = new ConcurrentHashMap<>(); // Tracks the last chunk for each player (to detect chunk changes) private final Map lastChunks = new ConcurrentHashMap<>(); + // Players who have disabled territory alerts (opt-out set) + private final Set alertsDisabledPlayers = ConcurrentHashMap.newKeySet(); + /** Creates a new TerritoryNotifier. */ public TerritoryNotifier( @NotNull FactionManager factionManager, @NotNull ClaimManager claimManager, @NotNull ZoneManager zoneManager, - @NotNull RelationManager relationManager) { + @NotNull RelationManager relationManager, + @NotNull PlayerStorage playerStorage) { this.factionManager = factionManager; this.claimManager = claimManager; this.zoneManager = zoneManager; this.relationManager = relationManager; + this.playerStorage = playerStorage; } /** @@ -135,6 +144,13 @@ private TerritoryInfo buildWildernessFromConfig(@NotNull TerritoryInfo previousT * @param territory the territory info */ private void sendTerritoryNotification(@NotNull PlayerRef playerRef, @NotNull TerritoryInfo territory) { + // Check player preference — respect opt-out + if (alertsDisabledPlayers.contains(playerRef.getUuid())) { + Logger.debugTerritory("Territory notification suppressed for %s: player disabled alerts", + playerRef.getUsername()); + return; + } + if (!territory.isNotificationEnabled()) { Logger.debugTerritory("Notification suppressed for %s: %s", playerRef.getUsername(), territory.getPrimaryText()); @@ -270,6 +286,16 @@ public void onPlayerConnect(@NotNull PlayerRef playerRef, @NotNull String world, } UUID playerUuid = playerRef.getUuid(); + + // Load territory alert preference + playerStorage.loadPlayerData(playerUuid).thenAccept(opt -> { + opt.ifPresent(data -> { + if (!data.isTerritoryAlertsEnabled()) { + alertsDisabledPlayers.add(playerUuid); + } + }); + }); + int chunkX = ChunkUtil.toChunkCoord(x); int chunkZ = ChunkUtil.toChunkCoord(z); @@ -293,6 +319,7 @@ public void onPlayerConnect(@NotNull PlayerRef playerRef, @NotNull String world, public void onPlayerDisconnect(@NotNull UUID playerUuid) { previousTerritories.remove(playerUuid); lastChunks.remove(playerUuid); + alertsDisabledPlayers.remove(playerUuid); } /** @@ -317,6 +344,21 @@ public ChunkKey getLastChunk(@NotNull UUID playerUuid) { return lastChunks.get(playerUuid); } + /** + * Updates the cached territory alerts preference for a player. + * Called from PlayerSettingsPage when the preference is toggled. + * + * @param playerUuid the player's UUID + * @param enabled whether territory alerts are enabled + */ + public void setTerritoryAlertsEnabled(@NotNull UUID playerUuid, boolean enabled) { + if (enabled) { + alertsDisabledPlayers.remove(playerUuid); + } else { + alertsDisabledPlayers.add(playerUuid); + } + } + /** * Clears all tracking data. * Called on plugin shutdown. @@ -324,5 +366,6 @@ public ChunkKey getLastChunk(@NotNull UUID playerUuid) { public void shutdown() { previousTerritories.clear(); lastChunks.clear(); + alertsDisabledPlayers.clear(); } } diff --git a/src/main/java/com/hyperfactions/util/HFMessages.java b/src/main/java/com/hyperfactions/util/HFMessages.java index aee46d40..987f43f1 100644 --- a/src/main/java/com/hyperfactions/util/HFMessages.java +++ b/src/main/java/com/hyperfactions/util/HFMessages.java @@ -3,6 +3,9 @@ import com.hyperfactions.config.ConfigManager; import com.hypixel.hytale.server.core.modules.i18n.I18nModule; import com.hypixel.hytale.server.core.universe.PlayerRef; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -21,8 +24,8 @@ * * *

- * Per-player saved language preferences (from PlayerData) will be added - * when the Player Settings GUI is implemented. + * Per-player saved language preferences are cached via + * {@link #setLanguageOverride(UUID, String)} when loaded from PlayerData. * *

Usage: *

@@ -33,8 +36,37 @@
  */
 public final class HFMessages {
 
+  /** Per-player language overrides from PlayerData preferences. */
+  private static final Map languageOverrides = new ConcurrentHashMap<>();
+
   private HFMessages() {}
 
+  /**
+   * Sets a language override for a player.
+   * Called when preferences are loaded from PlayerData on connect,
+   * or when the player changes their language in settings.
+   *
+   * @param uuid     The player's UUID
+   * @param language The language code, or null to clear the override (auto-detect)
+   */
+  public static void setLanguageOverride(@NotNull UUID uuid, @Nullable String language) {
+    if (language == null) {
+      languageOverrides.remove(uuid);
+    } else {
+      languageOverrides.put(uuid, language);
+    }
+  }
+
+  /**
+   * Clears the language override for a player.
+   * Called on player disconnect.
+   *
+   * @param uuid The player's UUID
+   */
+  public static void clearLanguageOverride(@NotNull UUID uuid) {
+    languageOverrides.remove(uuid);
+  }
+
   /**
    * Gets a translated message for a specific player.
    * Uses the player's resolved language (preference → client → server default).
@@ -95,6 +127,7 @@ public static String getForLanguage(@NotNull String language, @NotNull String ke
    *
    * 

Resolution order: *

    + *
  1. Player's saved language preference (from PlayerData, cached in memory)
  2. *
  3. Player's client language (if {@code usePlayerLanguage} enabled in config)
  4. *
  5. Server default language
  6. *
@@ -111,6 +144,12 @@ public static String getLanguageFor(@Nullable PlayerRef player) { return serverDefault; } + // Check saved language preference first + String override = languageOverrides.get(player.getUuid()); + if (override != null) { + return override; + } + // Use client language if enabled if (config.isUsePlayerLanguage()) { return player.getLanguage(); diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 70e0e28e..169d73a1 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -657,6 +657,7 @@ public static final class Nav { 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() {} } @@ -1455,15 +1456,23 @@ public static final class AdminGui { private AdminGui() {} } - /** Player settings page labels. */ + /** 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/resources/Common/UI/Custom/HyperFactions/shared/player_settings.ui b/src/main/resources/Common/UI/Custom/HyperFactions/shared/player_settings.ui new file mode 100644 index 00000000..a8776a8e --- /dev/null +++ b/src/main/resources/Common/UI/Custom/HyperFactions/shared/player_settings.ui @@ -0,0 +1,132 @@ +$C = "../../Common.ui"; +$S = "../shared/styles.ui"; +$Nav = "../nav/nav_bar.ui"; + +$C.@PageOverlay { + Group { + Anchor: (Width: 620, Height: 520); + Style: (HorizontalAlignment: Center, VerticalAlignment: Center); + LayoutMode: Top; + + // Navigation bar + $Nav.@NavBar #HyperFactionsNavBar {} + + // Page Title + Group { + Anchor: (Height: 40); + Style: (HorizontalAlignment: Center); + + Label #PageTitle { + Anchor: (Height: 36); + Style: (FontSize: 20, TextColor: #FFFFFF, HorizontalAlignment: Center, VerticalAlignment: Center); + Text: "Player Settings"; + } + } + + // Content Area + Group #Content { + Anchor: (Height: 430); + LayoutMode: Top; + Padding: (Left: 24, Right: 24, Top: 8, Bottom: 8); + + // === Language Section === + $C.@DecoratedContainer { + Anchor: (Bottom: 12); + LayoutMode: Top; + Padding: (Full: 12); + + Label #LanguageSectionTitle { + Anchor: (Height: 26); + Style: (FontSize: 15, TextColor: #55FFFF); + Text: "Language"; + } + + // Auto-detect checkbox + $C.@CheckBoxWithLabel #AutoDetectCB { + @Text = "Auto-detect from client"; + @Checked = true; + Anchor: (Height: 28, Bottom: 4); + } + + Label #AutoDetectDesc { + Anchor: (Height: 18, Bottom: 8); + Style: (FontSize: 11, TextColor: #888888); + Text: "Uses your game client's language setting"; + } + + // Language dropdown row + Group #LanguageRow { + Anchor: (Height: 32); + LayoutMode: Left; + + Label #LanguageLabel { + Anchor: (Width: 90, Height: 26); + Style: (FontSize: 13, TextColor: #AAAAAA, VerticalAlignment: Center); + Text: "Language"; + } + + Group { + Anchor: (Width: 200, Height: 26); + Background: (Color: #0d1520); + Padding: (Left: 6, Right: 6); + + DropdownBox #LanguageDropdown { + Anchor: (Height: 26); + } + } + } + } + + // === Notifications Section === + $C.@DecoratedContainer { + LayoutMode: Top; + Padding: (Full: 12); + + Label #NotifSectionTitle { + Anchor: (Height: 26); + Style: (FontSize: 15, TextColor: #55FFFF); + Text: "Notifications"; + } + + // Territory Alerts + $C.@CheckBoxWithLabel #TerritoryAlertsCB { + @Text = "Territory Alerts"; + @Checked = true; + Anchor: (Height: 28, Bottom: 2); + } + + Label #TerritoryAlertsDesc { + Anchor: (Height: 18, Bottom: 8); + Style: (FontSize: 11, TextColor: #888888); + Text: "Show notifications when entering/leaving territories"; + } + + // Death Announcements + $C.@CheckBoxWithLabel #DeathAnnounceCB { + @Text = "Death Broadcasts"; + @Checked = true; + Anchor: (Height: 28, Bottom: 2); + } + + Label #DeathAnnounceDesc { + Anchor: (Height: 18, Bottom: 8); + Style: (FontSize: 11, TextColor: #888888); + Text: "Receive faction member death location announcements"; + } + + // Power Notifications + $C.@CheckBoxWithLabel #PowerNotifCB { + @Text = "Power Changes"; + @Checked = true; + Anchor: (Height: 28, Bottom: 2); + } + + Label #PowerNotifDesc { + Anchor: (Height: 18); + Style: (FontSize: 11, TextColor: #888888); + Text: "Show messages when your power changes"; + } + } + } + } +} diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index cb0cb609..28a16084 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -421,3 +421,21 @@ newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT i newplayer.request_sent = Join request sent to {0}! newplayer.officer_review = An officer will review your request. newplayer.map_hint = View Only - Join a faction to claim territory! + +# Player Settings +nav.player_settings = Settings +player_settings.title = Player Settings +player_settings.language_section = Language +player_settings.auto_detect = Auto-detect from client +player_settings.auto_detect_desc = Uses your game client's language setting +player_settings.language_label = Language +player_settings.notifications_section = Notifications +player_settings.territory_alerts = Territory Alerts +player_settings.territory_alerts_desc = Show notifications when entering/leaving territories +player_settings.death_announcements = Death Broadcasts +player_settings.death_announcements_desc = Receive faction member death location announcements +player_settings.power_notifications = Power Changes +player_settings.power_notifications_desc = Show messages when your power changes +player_settings.language_changed = Language changed to {0} +player_settings.pref_enabled = {0} enabled +player_settings.pref_disabled = {0} disabled From 20644cc7a3818e7cc012f967870371f99c36043b Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 18:22:35 -0700 Subject: [PATCH 19/55] feat: add Spanish translations, locale stubs, and translator workflow (Phase 6) - Full es-ES translations for commands, GUI, admin, and help content - Stub .lang files for 7 additional locales (de-DE, fr-FR, ja-JP, pt-BR, ru-RU, tr-TR, zh-CN) - Locale scaffolding scripts (new-translation.sh/bat) - TRANSLATION_GUIDE.md with format docs and contribution process - checkTranslations Gradle task to diff keys across locales - fallback.lang for locale fallback documentation --- TRANSLATION_GUIDE.md | 186 +++++++ build.gradle | 62 +++ scripts/new-translation.bat | 75 +++ scripts/new-translation.sh | 80 ++++ src/main/help/es-ES/combat/death.md | 15 + src/main/help/es-ES/combat/protection.md | 17 + src/main/help/es-ES/combat/tagging.md | 12 + src/main/help/es-ES/combat/zones.md | 14 + src/main/help/es-ES/diplomacy/alliances.md | 14 + src/main/help/es-ES/diplomacy/enemies.md | 17 + src/main/help/es-ES/diplomacy/relations.md | 18 + src/main/help/es-ES/economy/commands.md | 21 + src/main/help/es-ES/economy/funds.md | 18 + src/main/help/es-ES/economy/treasury.md | 13 + src/main/help/es-ES/power_land/claiming.md | 16 + .../help/es-ES/power_land/losing_territory.md | 14 + .../help/es-ES/power_land/territory_map.md | 13 + .../es-ES/power_land/understanding_power.md | 14 + src/main/help/es-ES/quick_ref/all_commands.md | 80 ++++ .../help/es-ES/welcome/getting_started.md | 17 + src/main/help/es-ES/welcome/quick_tips.md | 18 + .../help/es-ES/welcome/what_are_factions.md | 15 + src/main/help/es-ES/your_faction/creating.md | 13 + src/main/help/es-ES/your_faction/joining.md | 17 + src/main/help/es-ES/your_faction/managing.md | 22 + src/main/help/es-ES/your_faction/roles.md | 16 + .../Server/Languages/de-DE/hyperfactions.lang | 452 ++++++++++++++++++ .../Languages/de-DE/hyperfactions_admin.lang | 268 +++++++++++ .../Languages/de-DE/hyperfactions_gui.lang | 446 +++++++++++++++++ .../Server/Languages/es-ES/hyperfactions.lang | 447 +++++++++++++++++ .../Languages/es-ES/hyperfactions_admin.lang | 263 ++++++++++ .../Languages/es-ES/hyperfactions_gui.lang | 441 +++++++++++++++++ .../resources/Server/Languages/fallback.lang | 36 ++ .../Server/Languages/fr-FR/hyperfactions.lang | 452 ++++++++++++++++++ .../Languages/fr-FR/hyperfactions_admin.lang | 268 +++++++++++ .../Languages/fr-FR/hyperfactions_gui.lang | 446 +++++++++++++++++ .../Server/Languages/ja-JP/hyperfactions.lang | 452 ++++++++++++++++++ .../Languages/ja-JP/hyperfactions_admin.lang | 268 +++++++++++ .../Languages/ja-JP/hyperfactions_gui.lang | 446 +++++++++++++++++ .../Server/Languages/pt-BR/hyperfactions.lang | 452 ++++++++++++++++++ .../Languages/pt-BR/hyperfactions_admin.lang | 268 +++++++++++ .../Languages/pt-BR/hyperfactions_gui.lang | 446 +++++++++++++++++ .../Server/Languages/ru-RU/hyperfactions.lang | 452 ++++++++++++++++++ .../Languages/ru-RU/hyperfactions_admin.lang | 268 +++++++++++ .../Languages/ru-RU/hyperfactions_gui.lang | 446 +++++++++++++++++ .../Server/Languages/tr-TR/hyperfactions.lang | 452 ++++++++++++++++++ .../Languages/tr-TR/hyperfactions_admin.lang | 268 +++++++++++ .../Languages/tr-TR/hyperfactions_gui.lang | 446 +++++++++++++++++ .../Server/Languages/zh-CN/hyperfactions.lang | 452 ++++++++++++++++++ .../Languages/zh-CN/hyperfactions_admin.lang | 268 +++++++++++ .../Languages/zh-CN/hyperfactions_gui.lang | 446 +++++++++++++++++ 51 files changed, 10166 insertions(+) create mode 100644 TRANSLATION_GUIDE.md create mode 100644 scripts/new-translation.bat create mode 100755 scripts/new-translation.sh create mode 100644 src/main/help/es-ES/combat/death.md create mode 100644 src/main/help/es-ES/combat/protection.md create mode 100644 src/main/help/es-ES/combat/tagging.md create mode 100644 src/main/help/es-ES/combat/zones.md create mode 100644 src/main/help/es-ES/diplomacy/alliances.md create mode 100644 src/main/help/es-ES/diplomacy/enemies.md create mode 100644 src/main/help/es-ES/diplomacy/relations.md create mode 100644 src/main/help/es-ES/economy/commands.md create mode 100644 src/main/help/es-ES/economy/funds.md create mode 100644 src/main/help/es-ES/economy/treasury.md create mode 100644 src/main/help/es-ES/power_land/claiming.md create mode 100644 src/main/help/es-ES/power_land/losing_territory.md create mode 100644 src/main/help/es-ES/power_land/territory_map.md create mode 100644 src/main/help/es-ES/power_land/understanding_power.md create mode 100644 src/main/help/es-ES/quick_ref/all_commands.md create mode 100644 src/main/help/es-ES/welcome/getting_started.md create mode 100644 src/main/help/es-ES/welcome/quick_tips.md create mode 100644 src/main/help/es-ES/welcome/what_are_factions.md create mode 100644 src/main/help/es-ES/your_faction/creating.md create mode 100644 src/main/help/es-ES/your_faction/joining.md create mode 100644 src/main/help/es-ES/your_faction/managing.md create mode 100644 src/main/help/es-ES/your_faction/roles.md create mode 100644 src/main/resources/Server/Languages/de-DE/hyperfactions.lang create mode 100644 src/main/resources/Server/Languages/de-DE/hyperfactions_admin.lang create mode 100644 src/main/resources/Server/Languages/de-DE/hyperfactions_gui.lang create mode 100644 src/main/resources/Server/Languages/es-ES/hyperfactions.lang create mode 100644 src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang create mode 100644 src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang create mode 100644 src/main/resources/Server/Languages/fallback.lang create mode 100644 src/main/resources/Server/Languages/fr-FR/hyperfactions.lang create mode 100644 src/main/resources/Server/Languages/fr-FR/hyperfactions_admin.lang create mode 100644 src/main/resources/Server/Languages/fr-FR/hyperfactions_gui.lang create mode 100644 src/main/resources/Server/Languages/ja-JP/hyperfactions.lang create mode 100644 src/main/resources/Server/Languages/ja-JP/hyperfactions_admin.lang create mode 100644 src/main/resources/Server/Languages/ja-JP/hyperfactions_gui.lang create mode 100644 src/main/resources/Server/Languages/pt-BR/hyperfactions.lang create mode 100644 src/main/resources/Server/Languages/pt-BR/hyperfactions_admin.lang create mode 100644 src/main/resources/Server/Languages/pt-BR/hyperfactions_gui.lang create mode 100644 src/main/resources/Server/Languages/ru-RU/hyperfactions.lang create mode 100644 src/main/resources/Server/Languages/ru-RU/hyperfactions_admin.lang create mode 100644 src/main/resources/Server/Languages/ru-RU/hyperfactions_gui.lang create mode 100644 src/main/resources/Server/Languages/tr-TR/hyperfactions.lang create mode 100644 src/main/resources/Server/Languages/tr-TR/hyperfactions_admin.lang create mode 100644 src/main/resources/Server/Languages/tr-TR/hyperfactions_gui.lang create mode 100644 src/main/resources/Server/Languages/zh-CN/hyperfactions.lang create mode 100644 src/main/resources/Server/Languages/zh-CN/hyperfactions_admin.lang create mode 100644 src/main/resources/Server/Languages/zh-CN/hyperfactions_gui.lang diff --git a/TRANSLATION_GUIDE.md b/TRANSLATION_GUIDE.md new file mode 100644 index 00000000..08192681 --- /dev/null +++ b/TRANSLATION_GUIDE.md @@ -0,0 +1,186 @@ +# HyperFactions Translation Guide + +This guide explains how to contribute translations for HyperFactions. + +## Quick Start + +1. Run the scaffolding script to create a new locale: + ```bash + ./scripts/new-translation.sh fr-FR # Linux/Mac + scripts\new-translation.bat fr-FR # Windows + ``` + +2. Edit the `.lang` files in `src/main/resources/Server/Languages//` +3. Edit the help markdown files in `src/main/help//` +4. Build to verify: `./gradlew :HyperFactions:shadowJar` +5. Submit a pull request + +## Supported Locales + +| Code | Language | Status | +|--------|-----------------------|---------------| +| en-US | English (US) | Complete | +| es-ES | Spanish (Spain) | Complete | +| de-DE | German | Untranslated | +| fr-FR | French | Untranslated | +| ja-JP | Japanese | Untranslated | +| pt-BR | Brazilian Portuguese | Untranslated | +| ru-RU | Russian | Untranslated | +| tr-TR | Turkish | Untranslated | +| zh-CN | Simplified Chinese | Untranslated | + +## File Structure + +### .lang Files (Commands, GUI, Admin) + +Located at `src/main/resources/Server/Languages//`: + +| File | Content | Key Count | +|----------------------------|----------------------------------|-----------| +| `hyperfactions.lang` | Commands, errors, common strings | ~450 | +| `hyperfactions_gui.lang` | GUI labels, buttons, nav | ~440 | +| `hyperfactions_admin.lang` | Admin GUI strings | ~260 | + +### .lang File Format + +```properties +# Section comments start with # +key.name = Translated value here +key.with.placeholder = Hello {0}, you have {1} power +``` + +**Rules:** +- Keys are on the left side of `=` — **never modify keys** +- Values are on the right side — translate these +- `{0}`, `{1}`, etc. are placeholders — keep them in the translation +- Lines starting with `#` are comments — translate for context but not required +- Blank lines are ignored +- Backslash `\` at end of line continues to next line + +### Help Markdown Files + +Located at `src/main/help///.md`. + +Each file has YAML frontmatter and markdown content: + +```markdown +--- +id: welcome_started +commands: gui, menu +--- +# Getting Started + +Ready to dive in? Here's how: + +`/f` +Opens the faction menu. + +> Tip: Once in, explore territory and start claiming! +``` + +**Rules:** +- **YAML frontmatter** (`---` block): Do NOT translate `id` or `commands` — these are identifiers +- **`# Title`**: Translate the heading text +- **Plain text**: Translate normally +- **`` `command` ``** (backtick lines): Do NOT translate command syntax (e.g., `/f create `) +- **`> Tip text`** (blockquotes): Translate the tip content +- **Blank lines**: Keep as-is (they create spacing in the help viewer) + +### Markdown → Entry Type Mapping + +| Markdown Syntax | Help Entry Type | Translate? | +|----------------------------|-----------------|------------| +| `# Heading` | Topic title | Yes | +| `## Subheading` | HEADING entry | Yes | +| Plain text line | TEXT entry | Yes | +| Blank line | SPACER entry | Keep as-is | +| `` `command text` `` | COMMAND entry | No | +| `> Tip text` | TIP entry | Yes | + +## Translation Tips + +### Character Limits + +GUI labels have limited space. Keep translations concise: + +| Element Type | Max Length (approx) | +|------------------|---------------------| +| Nav bar buttons | 12 characters | +| Button labels | 20 characters | +| Section titles | 30 characters | +| Descriptions | 60 characters | +| Chat messages | No limit | +| Help content | No limit | + +If a translation is too long, it may overflow or be truncated in the UI. + +### Gaming Terminology + +Use commonly understood gaming terms in your language. Some terms are typically kept in English across all languages: + +- **PvP** (Player vs Player) +- **PvE** (Player vs Environment) +- **NPC** (Non-Player Character) +- **K/D** (Kill/Death ratio) +- **UUID** +- **chunk** (a 16x16 block area) + +Brand names should not be translated: +- **HyperFactions** +- **HyperPerms** +- **OrbisGuard** +- **HyperProtect** + +### Placeholder Values + +Placeholders like `{0}`, `{1}` are replaced at runtime with dynamic values. The order matters — `{0}` is always the first argument, `{1}` the second, etc. + +Common placeholder meanings (by context): +- `{0}` in faction messages: usually faction name or player name +- `{0}` in error messages: usually the specific value that failed +- `{0}`, `{1}` in range messages: min and max values + +### Consistency + +Use consistent terminology throughout your translation: +- Pick one word for "faction" and use it everywhere +- Pick one word for "claim/territory" and use it consistently +- Role names should be consistent (Leader, Officer, Member, Recruit) + +## Checking Your Translation + +### Build and Test + +```bash +# Build (generates help .lang from markdown + compiles) +./gradlew :HyperFactions:shadowJar + +# Deploy to dev server +./gradlew buildAndDeploy + +# In-game: change your client language to test +``` + +### Check for Missing Keys + +```bash +# Compare key counts between locales +./gradlew :HyperFactions:checkTranslations +``` + +This task reports any keys present in en-US but missing in other locales. + +## Contributing + +1. Fork the repository +2. Create a branch: `feat/i18n-` (e.g., `feat/i18n-fr-FR`) +3. Run `./scripts/new-translation.sh ` if starting fresh +4. Translate all `.lang` files and help `.md` files +5. Build and test locally +6. Submit a pull request + +### Review Process + +- Translations are reviewed by native speakers when possible +- Machine translations are accepted as a starting point but should be refined +- Partial translations are welcome — untranslated keys fall back to English diff --git a/build.gradle b/build.gradle index c49acd5a..e82c06e2 100644 --- a/build.gradle +++ b/build.gradle @@ -145,6 +145,68 @@ tasks.register('generateHelpLang', JavaExec) { sourceSets.main.resources.srcDir(layout.buildDirectory.dir('generated/resources')) +// Check translations: compare keys in en-US against other locales +tasks.register('checkTranslations') { + group = 'verification' + description = 'Report missing translation keys compared to en-US' + doLast { + def langDir = file('src/main/resources/Server/Languages') + def enDir = new File(langDir, 'en-US') + if (!enDir.exists()) { + println "No en-US directory found at ${enDir.absolutePath}" + return + } + // Collect en-US keys per file + def enKeys = [:] + enDir.listFiles({ f -> f.name.endsWith('.lang') } as FileFilter).each { f -> + def keys = [] + f.eachLine { line -> + line = line.trim() + if (line && !line.startsWith('#') && line.contains('=')) { + keys << line.substring(0, line.indexOf('=')).trim() + } + } + enKeys[f.name] = keys + } + // Check each locale + def locales = langDir.listFiles({ f -> f.isDirectory() && f.name != 'en-US' } as FileFilter) + if (!locales) { + println "No non-English locales found." + return + } + def totalMissing = 0 + locales.sort { it.name }.each { localeDir -> + def localeMissing = 0 + enKeys.each { fileName, keys -> + def localeFile = new File(localeDir, fileName) + if (!localeFile.exists()) { + println "[${localeDir.name}] MISSING FILE: ${fileName} (${keys.size()} keys)" + localeMissing += keys.size() + return + } + def localeKeys = [] + localeFile.eachLine { line -> + line = line.trim() + if (line && !line.startsWith('#') && line.contains('=')) { + localeKeys << line.substring(0, line.indexOf('=')).trim() + } + } + def missing = keys.findAll { !localeKeys.contains(it) } + if (missing) { + println "[${localeDir.name}] ${fileName}: ${missing.size()} missing keys" + missing.each { println " - ${it}" } + localeMissing += missing.size() + } + } + if (localeMissing == 0) { + println "[${localeDir.name}] All keys present" + } + totalMissing += localeMissing + } + println "\nTotal missing keys across all locales: ${totalMissing}" + } +} + // Expand version placeholder in manifest.json processResources { def ver = buildVersion diff --git a/scripts/new-translation.bat b/scripts/new-translation.bat new file mode 100644 index 00000000..15fe2462 --- /dev/null +++ b/scripts/new-translation.bat @@ -0,0 +1,75 @@ +@echo off +REM ============================================================ +REM new-translation.bat — Scaffold a new HyperFactions locale +REM Usage: scripts\new-translation.bat +REM Example: scripts\new-translation.bat fr-FR +REM ============================================================ + +if "%~1"=="" ( + echo Usage: %~nx0 ^ + echo Example: %~nx0 fr-FR + exit /b 1 +) + +set "LOCALE=%~1" + +REM Resolve project root (parent of scripts\) +set "SCRIPT_DIR=%~dp0" +pushd "%SCRIPT_DIR%.." +set "PROJECT_ROOT=%CD%" +popd + +set "LANG_SRC=%PROJECT_ROOT%\src\main\resources\Server\Languages\en-US" +set "LANG_DST=%PROJECT_ROOT%\src\main\resources\Server\Languages\%LOCALE%" + +set "HELP_SRC=%PROJECT_ROOT%\src\main\help\en-US" +set "HELP_DST=%PROJECT_ROOT%\src\main\help\%LOCALE%" + +REM --- Validate source exists --- +if not exist "%LANG_SRC%\" ( + echo Error: Source language directory not found: %LANG_SRC% + exit /b 1 +) + +REM --- Copy .lang files --- +set LANG_COUNT=0 +if exist "%LANG_DST%\" ( + echo Language directory already exists: %LANG_DST% + echo Skipping .lang file copy (delete the directory first to re-scaffold). +) else ( + mkdir "%LANG_DST%" + for %%f in ("%LANG_SRC%\*.lang") do ( + copy "%%f" "%LANG_DST%\" >nul + set /a LANG_COUNT+=1 + ) + echo Copied %LANG_COUNT% .lang file(s) to %LANG_DST% +) + +REM --- Copy help markdown --- +set HELP_COUNT=0 +if exist "%HELP_SRC%\" ( + if exist "%HELP_DST%\" ( + echo Help directory already exists: %HELP_DST% + echo Skipping help file copy (delete the directory first to re-scaffold). + ) else ( + xcopy "%HELP_SRC%" "%HELP_DST%" /E /I /Q >nul + REM Count .md files + for /r "%HELP_DST%" %%f in (*.md) do set /a HELP_COUNT+=1 + echo Copied %HELP_COUNT% help file(s) to %HELP_DST% + ) +) else ( + echo No help directory found at %HELP_SRC% — skipping help files. +) + +REM --- Summary --- +echo. +echo === Scaffold Summary === +echo Locale: %LOCALE% +echo Lang files: %LANG_COUNT% copied to src\main\resources\Server\Languages\%LOCALE%\ +echo Help files: %HELP_COUNT% copied to src\main\help\%LOCALE%\ +echo. +echo Next steps: +echo 1. Add a header comment to each .lang file indicating the language and status +echo 2. Translate the values (keep keys and {0} placeholders unchanged) +echo 3. Translate the help markdown files +echo 4. Test in-game with /f settings to switch language diff --git a/scripts/new-translation.sh b/scripts/new-translation.sh new file mode 100755 index 00000000..f6a29e0a --- /dev/null +++ b/scripts/new-translation.sh @@ -0,0 +1,80 @@ +#!/bin/bash +# ============================================================ +# new-translation.sh — Scaffold a new HyperFactions locale +# Usage: ./scripts/new-translation.sh +# Example: ./scripts/new-translation.sh fr-FR +# ============================================================ +set -euo pipefail + +if [ $# -lt 1 ]; then + echo "Usage: $0 " + echo "Example: $0 fr-FR" + exit 1 +fi + +LOCALE="$1" + +# Resolve project root (parent of scripts/) +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" + +LANG_SRC="$PROJECT_ROOT/src/main/resources/Server/Languages/en-US" +LANG_DST="$PROJECT_ROOT/src/main/resources/Server/Languages/$LOCALE" + +HELP_SRC="$PROJECT_ROOT/src/main/help/en-US" +HELP_DST="$PROJECT_ROOT/src/main/help/$LOCALE" + +# --- Validate inputs --- +if [[ ! "$LOCALE" =~ ^[a-z]{2}-[A-Z]{2}$ ]]; then + echo "Warning: '$LOCALE' does not match standard locale format (e.g., fr-FR)." + echo "Continuing anyway..." +fi + +if [ ! -d "$LANG_SRC" ]; then + echo "Error: Source language directory not found: $LANG_SRC" + exit 1 +fi + +# --- Copy .lang files --- +LANG_COUNT=0 +if [ -d "$LANG_DST" ]; then + echo "Language directory already exists: $LANG_DST" + echo "Skipping .lang file copy (delete the directory first to re-scaffold)." +else + mkdir -p "$LANG_DST" + for file in "$LANG_SRC"/*.lang; do + if [ -f "$file" ]; then + cp "$file" "$LANG_DST/" + LANG_COUNT=$((LANG_COUNT + 1)) + fi + done + echo "Copied $LANG_COUNT .lang file(s) to $LANG_DST" +fi + +# --- Copy help markdown --- +HELP_COUNT=0 +if [ -d "$HELP_SRC" ]; then + if [ -d "$HELP_DST" ]; then + echo "Help directory already exists: $HELP_DST" + echo "Skipping help file copy (delete the directory first to re-scaffold)." + else + cp -r "$HELP_SRC" "$HELP_DST" + HELP_COUNT=$(find "$HELP_DST" -name '*.md' -type f | wc -l) + echo "Copied $HELP_COUNT help file(s) to $HELP_DST" + fi +else + echo "No help directory found at $HELP_SRC — skipping help files." +fi + +# --- Summary --- +echo "" +echo "=== Scaffold Summary ===" +echo "Locale: $LOCALE" +echo "Lang files: $LANG_COUNT copied to src/main/resources/Server/Languages/$LOCALE/" +echo "Help files: $HELP_COUNT copied to src/main/help/$LOCALE/" +echo "" +echo "Next steps:" +echo " 1. Add a header comment to each .lang file indicating the language and status" +echo " 2. Translate the values (keep keys and {0} placeholders unchanged)" +echo " 3. Translate the help markdown files" +echo " 4. Test in-game with /f settings to switch language" diff --git a/src/main/help/es-ES/combat/death.md b/src/main/help/es-ES/combat/death.md new file mode 100644 index 00000000..ba32eb8f --- /dev/null +++ b/src/main/help/es-ES/combat/death.md @@ -0,0 +1,15 @@ +--- +id: combat_death +commands: home, sethome, stuck +--- +# Muerte y Recuperacion + +Morir tiene consecuencias reales: + +Pierdes poder personal, reduciendo el total de la faccion. +Si los reclamos superan el poder, los enemigos pueden reclamar. + +El poder se regenera estando conectado. Varias muertes +pueden dejar a tu faccion peligrosamente vulnerable. + +> Elige tus batallas con cuidado! diff --git a/src/main/help/es-ES/combat/protection.md b/src/main/help/es-ES/combat/protection.md new file mode 100644 index 00000000..43b9e2a9 --- /dev/null +++ b/src/main/help/es-ES/combat/protection.md @@ -0,0 +1,17 @@ +--- +id: combat_protection +--- +# Proteccion de Territorio + +El territorio reclamado tiene varias protecciones: + +## Proteccion de Bloques +Solo los miembros pueden colocar o romper bloques. + +## Proteccion de Contenedores +Cofres, barriles, etc. estan asegurados para los miembros. + +## Alertas de Entrada +Recibes notificaciones cuando no-miembros entran en tus reclamos. + +> El territorio protege los bloques, no a los jugadores! diff --git a/src/main/help/es-ES/combat/tagging.md b/src/main/help/es-ES/combat/tagging.md new file mode 100644 index 00000000..cd292f7a --- /dev/null +++ b/src/main/help/es-ES/combat/tagging.md @@ -0,0 +1,12 @@ +--- +id: combat_tagging +--- +# Etiqueta de Combate + +Atacar o ser atacado te marca en combate. +Un temporizador muestra la duracion restante. + +Mientras estas marcado: sin /f home, /f stuck ni teletransportes. +La marca se reinicia con cada nueva accion de combate. + +> Desconectarte mientras estas marcado es arriesgado. Quedate y pelea! diff --git a/src/main/help/es-ES/combat/zones.md b/src/main/help/es-ES/combat/zones.md new file mode 100644 index 00000000..ec748ecf --- /dev/null +++ b/src/main/help/es-ES/combat/zones.md @@ -0,0 +1,14 @@ +--- +id: combat_zones +--- +# Zonas Especiales + +Los administradores pueden crear zonas con reglas especiales: + +## SafeZone +Sin PvP, sin romper bloques. Para spawn/comercio. + +## WarZone +PvP siempre habilitado, sin proteccion. Areas de batalla. + +> Las reglas de zona siempre anulan las del territorio de faccion. diff --git a/src/main/help/es-ES/diplomacy/alliances.md b/src/main/help/es-ES/diplomacy/alliances.md new file mode 100644 index 00000000..44863aeb --- /dev/null +++ b/src/main/help/es-ES/diplomacy/alliances.md @@ -0,0 +1,14 @@ +--- +id: diplomacy_alliances +commands: ally +--- +# Formar Alianzas + +Las alianzas protegen a ambas facciones del fuego +amigo y disputas territoriales. + +`/f ally ` +Envia una solicitud de alianza. Ambos lados deben aceptar. + +Beneficios: sin fuego amigo, visibilidad compartida en el mapa. +> Puede haber un limite en la cantidad de alianzas. diff --git a/src/main/help/es-ES/diplomacy/enemies.md b/src/main/help/es-ES/diplomacy/enemies.md new file mode 100644 index 00000000..7458a504 --- /dev/null +++ b/src/main/help/es-ES/diplomacy/enemies.md @@ -0,0 +1,17 @@ +--- +id: diplomacy_enemies +commands: enemy, neutral +--- +# Facciones Enemigas + +Declarar un enemigo habilita el PvP y la agresion +territorial contra ellos. Accion unilateral. + +`/f enemy ` +Declara enemigo inmediatamente. No requiere acuerdo. + +PvP habilitado en el territorio del otro. Se puede +reclamar territorio si se debilitan. + +`/f neutral ` +Restablece la relacion a neutral, finalizando la enemistad. diff --git a/src/main/help/es-ES/diplomacy/relations.md b/src/main/help/es-ES/diplomacy/relations.md new file mode 100644 index 00000000..264c169d --- /dev/null +++ b/src/main/help/es-ES/diplomacy/relations.md @@ -0,0 +1,18 @@ +--- +id: diplomacy_relations +commands: relations +--- +# Relaciones entre Facciones + +Cada par de facciones tiene una relacion diplomatica: + +Aliado — Sin fuego amigo, protegidos de los reclamos +del otro. Requiere acuerdo mutuo. + +Enemigo — PvP habilitado en el territorio del otro. +Se puede reclamar territorio si el objetivo esta debilitado. + +Neutral — Estado por defecto. Se aplican reglas estandar. + +`/f relations` +Consulta todas las alianzas, enemigos y solicitudes pendientes. diff --git a/src/main/help/es-ES/economy/commands.md b/src/main/help/es-ES/economy/commands.md new file mode 100644 index 00000000..e923c336 --- /dev/null +++ b/src/main/help/es-ES/economy/commands.md @@ -0,0 +1,21 @@ +--- +id: economy_commands +--- +# Comandos de Economia + +Referencia rapida de comandos de economia: + +`/f balance` +Ver saldo de la tesoreria. + +`/f deposit ` +Depositar fondos. + +`/f withdraw ` +Retirar fondos. (Oficial+) + +`/f money transfer ` +Transferir a otra faccion. + +`/f money log [pagina]` +Ver historial de transacciones. diff --git a/src/main/help/es-ES/economy/funds.md b/src/main/help/es-ES/economy/funds.md new file mode 100644 index 00000000..2b315846 --- /dev/null +++ b/src/main/help/es-ES/economy/funds.md @@ -0,0 +1,18 @@ +--- +id: economy_funds +commands: deposit, withdraw +--- +# Gestionar Fondos + +Los Miembros depositan; los Oficiales pueden retirar/transferir. + +`/f deposit ` +Deposita de tu saldo a la tesoreria. + +`/f withdraw ` +Retira de la tesoreria. (Oficial+) + +`/f money transfer ` +Transfiere fondos a la tesoreria de otra faccion. + +> Todas las transacciones quedan registradas para revision. diff --git a/src/main/help/es-ES/economy/treasury.md b/src/main/help/es-ES/economy/treasury.md new file mode 100644 index 00000000..b7c1d313 --- /dev/null +++ b/src/main/help/es-ES/economy/treasury.md @@ -0,0 +1,13 @@ +--- +id: economy_treasury +commands: balance +--- +# Tesoreria de Faccion + +Cada faccion tiene una tesoreria compartida. +Gestionada por los Oficiales y el Lider. + +`/f balance` +Consulta el saldo de la tesoreria de tu faccion. (Alias: bal) + +> Contribuye regularmente para mantener tu faccion financiada! diff --git a/src/main/help/es-ES/power_land/claiming.md b/src/main/help/es-ES/power_land/claiming.md new file mode 100644 index 00000000..7d2547fb --- /dev/null +++ b/src/main/help/es-ES/power_land/claiming.md @@ -0,0 +1,16 @@ +--- +id: power_claiming +commands: claim, unclaim +--- +# Reclamar Territorio + +Reclamar un chunk lo protege. Solo los miembros +pueden construir, destruir o acceder a contenedores. + +`/f claim` +Reclama el chunk en el que te encuentras. (Oficial+) + +`/f unclaim` +Libera un reclamo y lo devuelve a tierra salvaje. (Oficial+) + +> Cada reclamo cuesta un punto de poder. No te expandes de mas! diff --git a/src/main/help/es-ES/power_land/losing_territory.md b/src/main/help/es-ES/power_land/losing_territory.md new file mode 100644 index 00000000..acfb2339 --- /dev/null +++ b/src/main/help/es-ES/power_land/losing_territory.md @@ -0,0 +1,14 @@ +--- +id: power_losing +commands: overclaim +--- +# Perder Territorio + +Si el poder total cae por debajo de los reclamos, +eres vulnerable. Los enemigos pueden robar tus chunks. + +`/f overclaim` +Toma un chunk de una faccion debilitada. (Oficial+) + +Mantente a salvo: permanece activo, evita morir y +no te expandes mas de lo que tu poder soporta. diff --git a/src/main/help/es-ES/power_land/territory_map.md b/src/main/help/es-ES/power_land/territory_map.md new file mode 100644 index 00000000..9617b3fc --- /dev/null +++ b/src/main/help/es-ES/power_land/territory_map.md @@ -0,0 +1,13 @@ +--- +id: power_map +commands: map +--- +# El Mapa de Territorio + +Una vista aerea de los chunks reclamados cerca de ti. + +`/f map` +Abre el mapa de territorio. Haz clic en chunks para reclamar. + +Tu faccion aparece en tu color. Aliados en azul, +enemigos en rojo, neutrales en gris, tierra salvaje oscura. diff --git a/src/main/help/es-ES/power_land/understanding_power.md b/src/main/help/es-ES/power_land/understanding_power.md new file mode 100644 index 00000000..4cb7f4fd --- /dev/null +++ b/src/main/help/es-ES/power_land/understanding_power.md @@ -0,0 +1,14 @@ +--- +id: power_understanding +commands: power +--- +# Entender el Poder + +El poder permite a tu faccion mantener territorio. +Cada jugador tiene poder personal que se suma al total. + +`/f power` +Consulta tu poder y el total de tu faccion. + +El poder se regenera estando conectado y disminuye al morir. +> Si los reclamos superan el poder, eres vulnerable! diff --git a/src/main/help/es-ES/quick_ref/all_commands.md b/src/main/help/es-ES/quick_ref/all_commands.md new file mode 100644 index 00000000..458823f4 --- /dev/null +++ b/src/main/help/es-ES/quick_ref/all_commands.md @@ -0,0 +1,80 @@ +--- +id: quickref_commands +--- +# Todos los Comandos + +## Principal +`/f — Abrir menu de faccion (alias: gui, menu)` +`/f help — Abrir este centro de ayuda` +`/f create — Crear una faccion` +`/f disband — Disolver tu faccion (Lider)` +`/f leave — Abandonar tu faccion` + +## Miembros +`/f invite — Invitar jugador (Oficial+)` +`/f accept [faccion] — Aceptar invitacion (alias: join)` +`/f request — Solicitar unirse` +`/f kick — Expulsar miembro (Oficial+)` +`/f promote — Promover a Oficial (Lider)` +`/f demote — Degradar a Miembro (Lider)` +`/f transfer — Transferir liderazgo` + +## Territorio +`/f claim — Reclamar chunk actual (Oficial+)` +`/f unclaim — Liberar chunk actual (Oficial+)` +`/f overclaim — Tomar chunk de faccion debilitada` +`/f map — Abrir mapa de territorio` + +## Teletransporte +`/f home — Teletransportarse al hogar de faccion` +`/f sethome — Establecer hogar de faccion (Oficial+)` +`/f delhome — Eliminar hogar de faccion (Oficial+)` +`/f stuck — Escapar de territorio enemigo` + +## Informacion +`/f info [faccion] — Ver detalles de faccion` +`/f list — Explorar todas las facciones` +`/f members — Ver lista de miembros` +`/f who [jugador] — Ver info de jugador` +`/f power [jugador] — Consultar niveles de poder` +`/f invites — Gestionar invitaciones/solicitudes` +`/f relations — Ver relaciones diplomaticas` + +## Diplomacia +`/f ally — Solicitar alianza (Oficial+)` +`/f enemy — Declarar enemigo (Oficial+)` +`/f neutral — Restablecer a neutral` + +## Ajustes +`/f settings — Abrir GUI de ajustes (Oficial+)` +`/f rename — Renombrar faccion (Lider)` +`/f desc [texto] — Establecer descripcion (Oficial+)` +`/f color — Establecer color de faccion (Oficial+)` +`/f open — Permitir que cualquiera se una (Lider)` +`/f close — Requerir invitacion (Lider)` + +## Economia +`/f balance — Ver tesoreria` +`/f deposit — Depositar fondos` +`/f withdraw — Retirar (Oficial+)` +`/f money transfer — Transferir` +`/f money log [pagina] — Historial de transacciones` + +## Chat +`/f c — Ciclo: Normal > Faccion > Aliado` +`/f c f — Chat de faccion` +`/f c a — Chat de aliados` +`/f c off — Chat publico` + +## Admin (requiere hyperfactions.admin) +`/f admin — Abrir panel de administracion` +`/f admin reload — Recargar configuracion` +`/f admin sync — Sincronizar datos de faccion` +`/f admin factions — Gestion de facciones` +`/f admin config — Editor de configuracion` +`/f admin zones — Gestion de zonas` +`/f admin backup create — Crear respaldo` +`/f admin backup restore — Restaurar respaldo` +`/f admin safezone — Crear SafeZone` +`/f admin warzone — Crear WarZone` +`/f admin debug toggle — Registro de depuracion` diff --git a/src/main/help/es-ES/welcome/getting_started.md b/src/main/help/es-ES/welcome/getting_started.md new file mode 100644 index 00000000..d905ff5d --- /dev/null +++ b/src/main/help/es-ES/welcome/getting_started.md @@ -0,0 +1,17 @@ +--- +id: welcome_started +commands: gui, menu +--- +# Primeros Pasos + +Listo para empezar? Asi se hace: + +`/f` +Abre el menu de faccion. Explora facciones, crea +la tuya o revisa invitaciones. + +Si te invitaron, revisa la pestana de Invitaciones +y acepta. Si no, busca facciones abiertas o crea +una nueva. + +> Una vez dentro, explora el territorio y empieza a reclamar! diff --git a/src/main/help/es-ES/welcome/quick_tips.md b/src/main/help/es-ES/welcome/quick_tips.md new file mode 100644 index 00000000..da32d018 --- /dev/null +++ b/src/main/help/es-ES/welcome/quick_tips.md @@ -0,0 +1,18 @@ +--- +id: welcome_tips +--- +# Consejos Rapidos + +## Reclamar Tierra +`/f claim` +Protege el chunk en el que te encuentras. + +## Hogar de Faccion +`/f home` +Teletransportate al hogar de faccion. Establece con /f sethome. + +## Chat de Faccion +`/f c` +Cambia el modo de chat: Normal > Faccion > Aliado. + +> Morir cuesta poder, debilitando tu control territorial! diff --git a/src/main/help/es-ES/welcome/what_are_factions.md b/src/main/help/es-ES/welcome/what_are_factions.md new file mode 100644 index 00000000..d31c5ee9 --- /dev/null +++ b/src/main/help/es-ES/welcome/what_are_factions.md @@ -0,0 +1,15 @@ +--- +id: welcome_what +--- +# Que son las Facciones? + +Las facciones son equipos de jugadores que reclaman +territorio, construyen bases y crecen juntos. + +Como miembro obtienes tierra protegida, un hogar de +faccion, chat privado y relaciones diplomaticas. + +La fuerza se mide por poder. Los miembros activos +generan poder; morir lo reduce. Si el poder cae +por debajo de tus reclamos, los enemigos pueden +robar territorio. diff --git a/src/main/help/es-ES/your_faction/creating.md b/src/main/help/es-ES/your_faction/creating.md new file mode 100644 index 00000000..bf723183 --- /dev/null +++ b/src/main/help/es-ES/your_faction/creating.md @@ -0,0 +1,13 @@ +--- +id: faction_creating +commands: create +--- +# Crear una Faccion + +Crear una faccion te convierte en Lider con +control total sobre ajustes, miembros y tierra. + +`/f create ` +Crea una faccion y abre tu panel de control. + +> Invita amigos, reclama tierra y empieza a construir! diff --git a/src/main/help/es-ES/your_faction/joining.md b/src/main/help/es-ES/your_faction/joining.md new file mode 100644 index 00000000..fb3865d9 --- /dev/null +++ b/src/main/help/es-ES/your_faction/joining.md @@ -0,0 +1,17 @@ +--- +id: faction_joining +commands: accept, join, request +--- +# Unirse a una Faccion + +Tres formas de unirse a una faccion existente: + +## Explorar Facciones Abiertas +Abre /f y haz clic en Explorar. Haz clic en Unirse en cualquier faccion abierta. + +## Aceptar una Invitacion +Revisa la pestana de Invitaciones y haz clic en Aceptar. + +## Solicitar Unirse +`/f request ` +Envia una solicitud a una faccion solo por invitacion. diff --git a/src/main/help/es-ES/your_faction/managing.md b/src/main/help/es-ES/your_faction/managing.md new file mode 100644 index 00000000..a21c51e8 --- /dev/null +++ b/src/main/help/es-ES/your_faction/managing.md @@ -0,0 +1,22 @@ +--- +id: faction_managing +commands: invite, kick, promote, demote, transfer +--- +# Gestionar Miembros + +Los Oficiales y Lideres gestionan la lista: + +`/f invite ` +Envia una invitacion. (Oficial+) + +`/f kick ` +Expulsa a un miembro. Los Oficiales expulsan Miembros; los Lideres a todos. + +`/f promote ` +Promueve un Miembro a Oficial. (Solo Lider) + +`/f demote ` +Degrada un Oficial a Miembro. (Solo Lider) + +`/f transfer ` +> Transfiere el liderazgo. Te conviertes en Oficial. No se puede deshacer! diff --git a/src/main/help/es-ES/your_faction/roles.md b/src/main/help/es-ES/your_faction/roles.md new file mode 100644 index 00000000..b8b72fa3 --- /dev/null +++ b/src/main/help/es-ES/your_faction/roles.md @@ -0,0 +1,16 @@ +--- +id: faction_roles +--- +# Roles y Rangos + +Tres rangos con diferentes capacidades: + +## Lider (1 por faccion) +Control total: disolver, transferir liderazgo, +promover/degradar, mas todos los permisos de Oficial. + +## Oficial +Invitar/expulsar, reclamar/liberar, establecer hogar, relaciones. + +## Miembro +Usar hogar de faccion, chat, construir en territorio. diff --git a/src/main/resources/Server/Languages/de-DE/hyperfactions.lang b/src/main/resources/Server/Languages/de-DE/hyperfactions.lang new file mode 100644 index 00000000..9177f8ff --- /dev/null +++ b/src/main/resources/Server/Languages/de-DE/hyperfactions.lang @@ -0,0 +1,452 @@ +# Language: German (de-DE) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with German translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions - English Translations +# Format: key = value (or key = "quoted value") +# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule +# Placeholders: {0}, {1}, etc. + +# ========== Common ========== +common.no_permission = You don't have permission to do that. +common.not_in_faction = You are not in a faction. +common.already_in_faction = You are already in a faction. +common.player_not_found = Player not found. +common.faction_not_found = Faction not found. +common.player_not_online = That player is not online. +common.must_be_leader = Only the faction leader can do that. +common.must_be_officer = You must be an Officer or Leader to do that. +common.combat_tagged = You can't do that while combat tagged. +common.cancel = Cancel +common.confirm = Confirm +common.save = Save +common.close = Close +common.yes = Yes +common.no = No +common.loading = Loading... +common.online = Online +common.offline = Offline +common.enabled = Enabled +common.disabled = Disabled +common.none = None +common.page = Page {0} of {1} +common.unknown = Unknown +common.error_generic = Something went wrong. Please try again. +common.gui_fallback = Could not access GUI. Use /f help for commands. +common.admin_prefix = [Admin] +common.location_error = Could not determine your location. +common.world_error = Could not determine your world. +common.invalid_id = Invalid faction ID. +common.na = N/A + +# ========== Commands - Create ========== +cmd.create.no_permission = You don't have permission to create factions. +cmd.create.usage = Usage: /f create +cmd.create.success = Faction '{0}' created! +cmd.create.already_in_named = You are already in {0}. +cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. +cmd.create.name_taken = That faction name is already taken. +cmd.create.name_too_short = Faction name is too short. +cmd.create.name_too_long = Faction name is too long. +cmd.create.failed = Failed to create faction. + +# ========== Commands - Disband ========== +cmd.disband.no_permission = You don't have permission to disband factions. +cmd.disband.not_leader = Only the faction leader can disband. +cmd.disband.confirm_prompt = Are you sure you want to disband your faction? +cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. +cmd.disband.success = Your faction has been disbanded. +cmd.disband.failed = Failed to disband faction. +cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. + +# ========== Commands - Rename ========== +cmd.rename.no_permission = You don't have permission. +cmd.rename.not_leader = Only the leader can rename the faction. +cmd.rename.usage = Usage: /f rename +cmd.rename.too_short = Name is too short (min {0} chars). +cmd.rename.too_long = Name is too long (max {0} chars). +cmd.rename.name_taken = That name is already taken. +cmd.rename.success = Faction renamed to {0}! +cmd.rename.broadcast = {0} renamed the faction to {1} + +# ========== Commands - Description ========== +cmd.desc.no_permission = You don't have permission. +cmd.desc.not_officer = You must be an officer to set the description. +cmd.desc.set = Faction description set! +cmd.desc.cleared = Faction description cleared. + +# ========== Commands - Open / Close ========== +cmd.open.no_permission = You don't have permission. +cmd.open.not_leader = Only the leader can change this setting. +cmd.open.already_open = Your faction is already open. +cmd.open.success = Your faction is now open! Anyone can join with /f join. +cmd.open.broadcast = {0} opened the faction to public joining. +cmd.close.no_permission = You don't have permission. +cmd.close.not_leader = Only the leader can change this setting. +cmd.close.already_closed = Your faction is already closed. +cmd.close.success = Your faction is now invite-only. +cmd.close.broadcast = {0} closed the faction to invite-only. + +# ========== Commands - Color ========== +cmd.color.no_permission = You don't have permission. +cmd.color.not_officer = You must be an officer to change the color. +cmd.color.colors_disabled = Faction colors are disabled. +cmd.color.usage = Usage: /f color +cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex +cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. +cmd.color.success = Faction color updated! + +# ========== Commands - Claim ========== +cmd.claim.no_permission = You don't have permission to claim territory. +cmd.claim.already_yours = Your faction already owns this chunk. +cmd.claim.cannot_claim_ally = You cannot claim ally territory. +cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. +cmd.claim.success = Claimed chunk at {0}, {1}! +cmd.claim.not_officer = You must be an officer to claim land. +cmd.claim.already_claimed = This chunk is already claimed. +cmd.claim.max_claims = Your faction has reached max claims. Get more power! +cmd.claim.not_adjacent = You must claim adjacent to existing territory. +cmd.claim.world_not_allowed = Claiming is not allowed in this world. +cmd.claim.orbisguard = This area is protected by OrbisGuard. +cmd.claim.zone_protected = This chunk is in a safezone or warzone. +cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. +cmd.claim.failed = Failed to claim chunk. + +# ========== Commands - Invite ========== +cmd.invite.no_permission = You don't have permission to invite players. +cmd.invite.not_officer = You must be an officer to invite players. +cmd.invite.usage = Usage: /f invite +cmd.invite.player_not_found = Player '{0}' not found or offline. +cmd.invite.target_in_faction = That player is already in a faction. +cmd.invite.sent = Invited {0} to your faction. +cmd.invite.received = You have been invited to join {0}! +cmd.invite.accept_hint = Type /f accept {0} to join. + +# ========== Commands - Accept / Join ========== +cmd.join.no_permission = You don't have permission to join factions. +cmd.join.already_in_named = You are already in {0}. +cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.join.no_invites = You have no pending invites. +cmd.join.faction_not_found = Faction '{0}' not found. +cmd.join.not_invited = You have no invite from that faction. +cmd.join.faction_gone = That faction no longer exists. +cmd.join.success = You have joined {0}! +cmd.join.broadcast = {0} has joined the faction! +cmd.join.faction_full = That faction is full. +cmd.join.failed = Failed to join faction. + +# ========== Commands - Kick ========== +cmd.kick.no_permission = You don't have permission to kick members. +cmd.kick.usage = Usage: /f kick +cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. +cmd.kick.success = Kicked {0} from the faction. +cmd.kick.broadcast = {0} was kicked from the faction. +cmd.kick.kicked = You have been kicked from the faction. +cmd.kick.cannot_kick_higher = You don't have permission to kick that player. +cmd.kick.cannot_kick_leader = You cannot kick the faction leader. +cmd.kick.failed = Failed to kick player. + +# ========== Commands - Leave ========== +cmd.leave.no_permission = You don't have permission to leave factions. +cmd.leave.confirm_prompt = Are you sure you want to leave your faction? +cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. +cmd.leave.success = You have left your faction. +cmd.leave.broadcast = {0} has left the faction. +cmd.leave.failed = Failed to leave faction. +cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. + +# ========== Commands - Promote / Demote / Transfer ========== +cmd.rank.promote_no_permission = You don't have permission to promote members. +cmd.rank.promote_usage = Usage: /f promote +cmd.rank.promoted = Promoted {0} to {1}! +cmd.rank.promote_broadcast = {0} was promoted to {1}! +cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. +cmd.rank.promote_failed = Failed to promote player. +cmd.rank.demote_no_permission = You don't have permission to demote members. +cmd.rank.demote_usage = Usage: /f demote +cmd.rank.demoted = Demoted {0} to {1}. +cmd.rank.demote_broadcast = {0} was demoted to {1}. +cmd.rank.already_lowest = That player is already a Member. +cmd.rank.demote_failed = Failed to demote player. +cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. +cmd.rank.transfer_usage = Usage: /f transfer +cmd.rank.player_not_in_faction = Player not found in your faction. +cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? +cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. +cmd.rank.transferred = Transferred leadership to {0}! +cmd.rank.transfer_broadcast = {0} is now the faction leader! +cmd.rank.transfer_failed = Failed to transfer leadership. +cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. + +# ========== Commands - Unclaim ========== +cmd.unclaim.no_permission = You don't have permission to unclaim territory. +cmd.unclaim.success = Unclaimed chunk at {0}, {1}. +cmd.unclaim.not_officer = You must be an officer to unclaim land. +cmd.unclaim.chunk_not_claimed = This chunk is not claimed. +cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. +cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. +cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. +cmd.unclaim.failed = Failed to unclaim chunk. + +# ========== Commands - Overclaim ========== +cmd.overclaim.no_permission = You don't have permission to overclaim territory. +cmd.overclaim.success = Overclaimed enemy territory! +cmd.overclaim.not_officer = You must be an officer to overclaim. +cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. +cmd.overclaim.own_chunk = Your faction already owns this chunk. +cmd.overclaim.ally = You cannot overclaim ally territory. +cmd.overclaim.target_has_power = This faction still has enough power. +cmd.overclaim.failed = Failed to overclaim. + +# ========== Commands - Stuck ========== +cmd.stuck.no_permission = You don't have permission to use /f stuck. +cmd.stuck.not_stuck = You're not stuck - this is wilderness. +cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! +cmd.stuck.no_safe = Could not find a safe location. +cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! + +# ========== Commands - Home ========== +cmd.home.no_permission = You don't have permission to teleport to faction home. +cmd.home.no_home = Your faction has no home set. +cmd.home.combat_tagged = You cannot teleport while in combat! +cmd.home.teleported = Teleported to faction home! + +# ========== Commands - SetHome ========== +cmd.sethome.no_permission = You don't have permission to set faction home. +cmd.sethome.world_not_allowed = Cannot set home in this world. +cmd.sethome.not_in_territory = You can only set home in your faction's territory. +cmd.sethome.set = Faction home set! +cmd.sethome.broadcast = {0} set the faction home. +cmd.sethome.not_officer = You must be an officer to set the home. +cmd.sethome.failed = Failed to set home. + +# ========== Commands - DelHome ========== +cmd.delhome.no_permission = You don't have permission to delete faction home. +cmd.delhome.no_home = Your faction does not have a home set. +cmd.delhome.deleted = Faction home deleted! +cmd.delhome.broadcast = {0} deleted the faction home. +cmd.delhome.not_officer = You must be an officer to delete the home. +cmd.delhome.failed = Failed to delete home. + +# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== +cmd.relation.ally_no_permission = You don't have permission to manage alliances. +cmd.relation.ally_usage = Usage: /f ally +cmd.relation.ally_sent = Ally request sent to {0}! +cmd.relation.ally_formed = You are now allies with {0}! +cmd.relation.already_ally = You are already allied with that faction. +cmd.relation.ally_failed = Failed to send ally request. +cmd.relation.enemy_no_permission = You don't have permission to declare enemies. +cmd.relation.enemy_usage = Usage: /f enemy +cmd.relation.enemy_declared = {0} is now your enemy! +cmd.relation.already_enemy = You are already enemies with that faction. +cmd.relation.max_enemies = You have reached the maximum number of enemies. +cmd.relation.enemy_failed = Failed to set enemy. +cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. +cmd.relation.neutral_usage = Usage: /f neutral +cmd.relation.neutral_set = Your faction is now neutral with {0}. +cmd.relation.already_neutral = You are already neutral with that faction. +cmd.relation.neutral_failed = Failed to set neutral. +cmd.relation.cannot_self = You cannot ally with yourself. +cmd.relation.max_allies = You have reached the maximum number of allies. +cmd.relation.view_no_permission = You don't have permission to view relations. +cmd.relation.header = === Faction Relations === +cmd.relation.allies_count = Allies ({0}): +cmd.relation.enemies_count = Enemies ({0}): +cmd.relation.list_entry = - {0} + +# ========== Commands - Chat ========== +cmd.chat.usage = Usage: /f c [f|a|off] +cmd.chat.no_permission = You don't have permission for that chat mode. +cmd.chat.mode_set = Chat mode set to {0} + +# ========== Commands - Invites ========== +cmd.invites.not_officer = You must be an officer to manage invites. +cmd.invites.header = === Faction Invites === +cmd.invites.no_pending = No pending invites or requests. +cmd.invites.outgoing = Outgoing Invites: +cmd.invites.outgoing_entry = {0} (invited by {1}) +cmd.invites.requests = Join Requests: +cmd.invites.request_entry = {0}{1} +cmd.invites.your_invites_header = === Your Invites === +cmd.invites.no_invites = You have no pending invites. +cmd.invites.invite_entry = {0} - Use /f accept {1} + +# ========== Commands - Request ========== +cmd.request.no_permission = You don't have permission to request faction membership. +cmd.request.already_in_named = You are already in {0}. +cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.request.usage = Usage: /f request [message] +cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. +cmd.request.already_requested = You already have a pending request to that faction. +cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. +cmd.request.sent = Sent join request to {0}! +cmd.request.your_message = Your message: "{0}" +cmd.request.officer_review = An officer will review your request. +cmd.request.officer_notify = {0} has requested to join your faction! +cmd.request.officer_review_hint = Use /f gui > Invites to review. + +# ========== Commands - Info ========== +cmd.info.faction_header = === {0} === +cmd.info.player_header = === {0} === +cmd.info.no_permission = You don't have permission to view faction info. +cmd.info.faction_not_found = Faction '{0}' not found. +cmd.info.not_in_faction_hint = You are not in a faction. Use /f info +cmd.info.leader = Leader: {0} +cmd.info.members = Members: {0}/{1} +cmd.info.power = Power: {0} +cmd.info.claims = Claims: {0} +cmd.info.raidable = RAIDABLE! +cmd.info.allies = Allies: {0} +cmd.info.enemies = Enemies: {0} +cmd.info.they_consider = They consider you: {0} +cmd.info.you_consider = You consider them: {0} +cmd.info.members_no_permission = You don't have permission to view faction members. +cmd.info.members_header = === {0} Members ({1}) === +cmd.info.member_online = [Online] +cmd.info.list_no_permission = You don't have permission to view faction list. +cmd.info.list_empty = There are no factions. +cmd.info.list_header = === Factions ({0}) === +cmd.info.list_entry = {0} - {1} members, {2} power +cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] +cmd.info.help_no_permission = You don't have permission to view help. +cmd.info.who_no_permission = You don't have permission to view player info. +cmd.info.who_faction = Faction: {0} +cmd.info.who_role = Role: {0} +cmd.info.who_joined = Joined: {0} +cmd.info.who_faction_none = Faction: None +cmd.info.who_power = Power: {0} +cmd.info.who_status = Status: {0} +cmd.info.who_last_seen = Last seen: {0} +cmd.info.map_no_permission = You don't have permission to view the map. +cmd.info.map_header = === Territory Map === +cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild +cmd.info.map_gui_hint = Use /f gui for interactive map + +# ========== Commands - Power ========== +cmd.power.personal = Personal Power: {0}/{1} +cmd.power.faction = Faction Power: {0}/{1} +cmd.power.death_loss = Death Loss: {0} +cmd.power.regen = Regen Rate: {0}/hr +cmd.power.no_permission = You don't have permission to view power info. +cmd.power.header = {0}'s Power: +cmd.power.current = Current: {0} + +# ========== Commands - Economy ========== +cmd.economy.balance = Balance: {0} +cmd.economy.deposited = Deposited {0} into the faction treasury. +cmd.economy.withdrawn = Withdrew {0} from the faction treasury. +cmd.economy.transferred = Transferred {0} to {1}. +cmd.economy.insufficient = Insufficient funds in faction treasury. +cmd.economy.invalid_amount = Invalid amount: {0} +cmd.economy.economy_disabled = Economy is disabled. +cmd.economy.balance_no_permission = You don't have permission to view balances. +cmd.economy.treasury_unavailable = Treasury is not available. +cmd.economy.balance_display = {0}'s treasury: {1} +cmd.economy.deposit_no_permission = You don't have permission to deposit. +cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. +cmd.economy.deposit_usage = Usage: /f deposit +cmd.economy.amount_positive = Amount must be positive. +cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} +cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. +cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. +cmd.economy.withdraw_no_permission = You don't have permission to withdraw. +cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. +cmd.economy.withdraw_usage = Usage: /f withdraw +cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} +cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. +cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. +cmd.economy.withdraw_failed = Withdrawal failed: {0} +cmd.economy.transfer_no_permission = You don't have permission to transfer. +cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. +cmd.economy.transfer_usage = Usage: /f money transfer +cmd.economy.transfer_self = Cannot transfer to your own faction. +cmd.economy.transfer_limit_denied = Transfer denied: {0} +cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. +cmd.economy.transfer_failed = Transfer failed: {0} +cmd.economy.log_no_permission = You don't have permission to view the transaction log. +cmd.economy.log_header = Transaction Log (page {0}/{1}) +cmd.economy.log_empty = No transactions found. +cmd.economy.money_help_header = Treasury Commands: +cmd.economy.money_help_balance = /f money balance [faction] - View balance +cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury +cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury +cmd.economy.money_help_transfer = /f money transfer - Transfer between factions +cmd.economy.money_help_log = /f money log [page] [type] - View transaction history + +# ========== Protection - Action Phrases ========== +protection.action.generic = You can't do that +protection.action.build = You can't build or break blocks +protection.action.interact = You can't interact with that +protection.action.door = You can't use doors +protection.action.container = You can't open containers +protection.action.bench = You can't use crafting stations +protection.action.processing = You can't use processing stations +protection.action.seat = You can't use seats +protection.action.light = You can't toggle lights +protection.action.teleporter = You can't use teleporters +protection.action.crate = You can't use crates +protection.action.tame = You can't tame creatures +protection.action.npc = You can't interact with NPCs +protection.action.mount = You can't mount creatures +protection.action.pve = You can't damage creatures +protection.action.item_drop = You can't drop items +protection.action.item_pickup = You can't pick up items + +# ========== Protection - Denial Reasons ========== +protection.denied.safezone = {0} in a SafeZone. +protection.denied.warzone = {0} in a WarZone. +protection.denied.enemy_claim = {0} in enemy territory. +protection.denied.claimed = {0} in claimed territory. +protection.denied.here = {0} here. +protection.denied.zone = {0} in this zone. +protection.denied.faction_perm = {0} here. (Faction permission: {1}) +protection.denied.ally_territory = {0} here. (Ally territory) +protection.denied.error = Protection error — action blocked for safety. + +# ========== Protection - PvP ========== +protection.pvp.safezone = PvP is disabled in SafeZones. +protection.pvp.same_faction = You cannot attack faction members. +protection.pvp.ally = You cannot attack allies. +protection.pvp.spawn_protected = That player has spawn protection. +protection.pvp.territory_disabled = PvP is disabled in this territory. +protection.pvp.generic = You cannot attack this player. + +# ========== Protection - Entity Damage ========== +protection.mob_damage_disabled = Mob damage is disabled in this zone. +protection.pve_damage_disabled = PvE damage is disabled in this zone. +protection.pve_territory_denied = You cannot damage mobs in this territory. + +# ========== Protection - Combat Tag ========== +protection.combat_tag_command = You cannot use that command while combat tagged. + +# ========== Server Announcements ========== +# These are broadcast to all online players for significant faction events. +# {0}, {1} = dynamic values (faction names, player names) +server_announce.faction_created = {0} has founded the faction {1}! +server_announce.faction_disbanded = The faction {0} has been disbanded! +server_announce.leadership_transfer = {0} is now the leader of {1}! +server_announce.overclaim = {0} has overclaimed territory from {1}! +server_announce.war_declared = {0} has declared war on {1}! +server_announce.alliance_formed = {0} and {1} are now allies! +server_announce.alliance_broken = {0} and {1} are no longer allies! + +# ========== Teleport System ========== +teleport.cooldown_wait = You must wait {0} before teleporting again. +teleport.warmup_start = Teleporting to faction home in {0} seconds... +teleport.combat_cancelled = Teleportation cancelled - you are in combat! +teleport.success_default = Teleported to faction home! +teleport.no_home = Your faction has no home set. +teleport.world_not_found = World not found. +teleport.failed = Teleportation failed. +teleport.countdown = Teleporting in {0} seconds... +teleport.countdown_one = Teleporting in 1 second... +teleport.moved_cancelled = Teleportation cancelled - you moved! +teleport.damage_cancelled = Teleportation cancelled - you took damage! +teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. +teleport.mount_entry_blocked = You can't enter this zone while mounted. + +# ========== Chat Display ========== +chat.display.public = Public +chat.display.faction = Faction +chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/de-DE/hyperfactions_admin.lang b/src/main/resources/Server/Languages/de-DE/hyperfactions_admin.lang new file mode 100644 index 00000000..75e94c48 --- /dev/null +++ b/src/main/resources/Server/Languages/de-DE/hyperfactions_admin.lang @@ -0,0 +1,268 @@ +# Language: German (de-DE) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with German translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions Admin GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule + +# ========== Admin Navigation Bar ========== +nav.dashboard = Dashboard +nav.actions = Actions +nav.factions = Factions +nav.players = Players +nav.economy = Economy +nav.zones = Zones +nav.config = Config +nav.backups = Backups +nav.log = Log +nav.updates = Updates +nav.help = Help +nav.version = Version + +# ========== Common Admin Labels ========== +common.faction_not_found = Faction Not Found +common.no_faction = No Faction +common.not_set = Not set +common.on = On +common.off = Off +common.enable = Enable +common.disable = Disable +common.none_paren = (None) +common.invalid_faction = Invalid faction. +common.leader_prefix = Leader: {0} +common.members_suffix = {0} members +common.claims_suffix = {0} claims +common.factions_suffix = {0} factions +common.players_suffix = {0} players +common.chunks_suffix = {0} chunks +common.entries_suffix = {0} entries +common.found_suffix = {0} found +common.power_format = {0}/{1} power +common.raidable = Raidable +common.protected = Protected +common.no_description = No description set. +common.officers_more = +{0} more +common.custom_max = (custom max) +common.default_max = (default max) +common.now = Now +common.ago_suffix = {0} ago +common.just_now = just now +common.no_membership_history = No membership history + +# ========== Admin Dashboard ========== +dashboard.factions_prefix = Factions: {0} +dashboard.members_prefix = Total Members: {0} +dashboard.claims_prefix = Total Claims: {0} + +# ========== Admin Actions ========== +actions.confirm_reset = Confirm Reset? +actions.confirm_trigger = Confirm Trigger? +actions.kd_reset = Reset K/D for {0} players. +actions.kd_reset_failed = Failed to reset K/D: {0} +actions.upkeep_unavailable = Upkeep processor is not available. +actions.upkeep_triggered = Upkeep collection triggered. +actions.upkeep_failed = Upkeep failed: {0} + +# ========== Admin Disband ========== +disband.faction_gone = Faction no longer exists. +disband.success = Faction '{0}' has been disbanded. +disband.failed = Failed to disband: {0} +disband.no_leader = Faction has no leader, cannot disband. + +# ========== Admin Unclaim All ========== +unclaim.removed = [Admin] Removed {0} claims from {1}. +unclaim.no_claims = {0} had no claims to remove. + +# ========== Admin Factions List ========== +factions.home_not_set = Not set +factions.teleported = Teleported to {0}'s home. +factions.no_home = Faction has no home set. +factions.world_not_found = Target world not found. + +# ========== Admin Faction Info ========== +info.faction_gone = This faction no longer exists. + +# ========== Admin Faction Members ========== +members.sort_role = Role +members.sort_online = Online +members.sort_name = Name +members.sort_power = Power +members.promoted = [Admin] Promoted {0} to {1}. +members.demoted = [Admin] Demoted {0} to {1}. +members.kicked = [Admin] Kicked {0} from the faction. + +# ========== Admin Faction Relations ========== +relations.allies_header = ALLIES ({0}) +relations.enemies_header = ENEMIES ({0}) +relations.no_allies = No allies. +relations.no_enemies = No enemies. +relations.neutral_count = {0} neutral factions +relations.since_today = Since: today +relations.since_one_day = Since: 1 day ago +relations.since_days = Since: {0} days ago +relations.set_ally = [Admin] Set mutual ally status with {0}. +relations.set_enemy = Set mutual enemy status with {0}. +relations.set_neutral = [Admin] Set mutual neutral status with {0}. + +# ========== Admin Faction Settings ========== +settings.locked = This setting is locked by server configuration. +settings.perm_toggled = Set {0} to {1}. +settings.color_changed = Set faction color to {0}. +settings.recruitment_set = Set recruitment to {0}. +settings.no_home = [Admin] This faction has no home set. +settings.home_cleared = Cleared faction home for {0}. + +# ========== Sort Dropdown Labels ========== +sort.power = Power +sort.name = Name +sort.members = Members +sort.balance = Balance + +# ========== Admin Players ========== +players.sort_last_online = Last Online +players.sort_faction = Faction +players.sort_online = Online +players.not_online = Player is not online. +players.world_not_found = Target world not found. +players.teleported = [Admin] Teleported to {0}. + +# ========== Admin Player Info ========== +playerinfo.disband_faction = Disband Faction +playerinfo.kick_leader = Kick Leader +playerinfo.enter_valid_number = Enter a valid number. +playerinfo.enter_valid_positive = Enter a valid positive number. +playerinfo.faction_gone = Faction no longer exists. +playerinfo.kd_reset = Reset K/D for {0}. +playerinfo.kicked_success = Kicked {0} from {1}. +playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. +playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). + +# ========== Admin Economy ========== +economy.no_data = No factions with economy data. +economy.amount_zero = Amount cannot be zero. +economy.enter_amount = Please enter an amount. +economy.invalid_number = Invalid number: {0} +economy.error = An error occurred. +economy.balance_negative = Balance cannot be negative. +economy.failed = Failed: {0} +economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. +economy.bulk_failures = ({0} failed) + +# ========== Admin Zones ========== +zones.not_found = Zone not found. +zones.invalid_id = Invalid zone ID. +zones.deleted = Zone {0} deleted. +zones.delete_failed = Failed to delete zone: {0} +zones.no_chunks = No chunks +zones.chunks_suffix = {0} ({1} chunks) + +# ========== Zone Create Wizard ========== +wizard.enter_name = Please enter a zone name. +wizard.name_too_short = Zone name must be at least {0} characters. +wizard.name_too_long = Zone name cannot exceed {0} characters. +wizard.name_taken = A zone with this name already exists. +wizard.radius_range = Radius must be between 1 and {0}. +wizard.create_failed = Could not create zone: {0} +wizard.created_not_found = Zone created but could not be found. +wizard.created = Created {0} '{1}'! +wizard.chunk_claimed = Claimed chunk ({0}, {1}). +wizard.chunk_failed = Could not claim current chunk: {0} +wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. +wizard.radius_no_claims = No chunks could be claimed (area may be occupied). +wizard.no_claims = Zone created with no claims. +wizard.chunks_preview = ~{0} chunks + +# ========== Zone Rename ========== +zone_rename.zone_gone = Zone no longer exists. +zone_rename.enter_name = Please enter a zone name. +zone_rename.too_short = Zone name must be at least {0} character. +zone_rename.too_long = Zone name cannot exceed {0} characters. +zone_rename.same_name = That's already this zone's name. +zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! +zone_rename.name_taken = A zone with that name already exists. +zone_rename.invalid_name = Invalid zone name. +zone_rename.rename_failed = Failed to rename zone: {0} + +# ========== Zone Change Type ========== +zone_type.zone_gone = Zone no longer exists. +zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). +zone_type.failed = Failed to change zone type: {0} + +# ========== Zone Integration Flags ========== +zone_int.zone_not_found = Zone Not Found +zone_int.no_plugin = (no plugin) +zone_int.default = (default) +zone_int.custom = (custom) + +# ========== Activity Log ========== +log.all_types = All Types +log.no_logs = No activity logs matching filters. + +# ========== Version Page ========== +version.active = Active +version.not_found = Not Found +version.not_detected = Not Detected +version.not_installed = Not Installed +version.active_version = Active (v{0}) +version.active_compatible = Active (compatible) +version.active_claims_only = Active (claims only) +version.installed_no_perm = Installed (no perm provider) +version.active_provider = Active ({0}) + +# ========== Admin Main Page ========== +main.reload_hint = Use /f reload to reload configuration. +main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. + +# ========== Zone Flags/Settings ========== +zflags.invalid_flag = Invalid flag. +zflags.zone_not_found = Zone not found. +zflags.conflict = (conflict) +zflags.mixin = (mixin) +zflags.reset_int = Reset integration flags to defaults. +zflags.reset_all = Reset all flags to defaults. +zflags.reset_failed = Failed to reset flags: {0} +zflags.back_to_settings = Back to Settings + +# ========== Zone Properties ========== +zprop.current_custom = Current: "{0}" (custom) +zprop.current_default = Current: "{0}" (default) +zprop.pvp_disabled = PvP Disabled +zprop.pvp_enabled = PvP Enabled +zprop.name_empty = Name cannot be empty. +zprop.renamed = Zone renamed to "{0}". +zprop.name_taken = A zone with that name already exists. +zprop.name_invalid = Invalid name (max 32 characters). +zprop.rename_failed = Failed to rename: {0} +zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. +zprop.upper_set = Upper title set. +zprop.upper_reset = Upper title reset to default. +zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. +zprop.lower_set = Lower title set. +zprop.lower_reset = Lower title reset to default. + +# ========== Relations Additional ========== +relations.failed = Failed: {0} + +# ========== Members Additional ========== +members.never = Never +members.teleported = [Admin] Teleported to {0}. + +# ========== Player Info Additional ========== +playerinfo.records = {0} records +playerinfo.joined_date = Joined: {0} +playerinfo.current = Current +playerinfo.left_date = Left: {0} + +# ========== Zone Map ========== +map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' +map.position = Your Position: Chunk ({0}, {1}) +map.zone_gone = Zone no longer exists. +map.claimed = Claimed chunk ({0}, {1}) for {2}. +map.claim_failed = Failed to claim chunk: {0} +map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. +map.unclaim_failed = Failed to unclaim chunk: {0} +map.chunk_belongs = This chunk belongs to {0}. +map.chunk_faction = This chunk is claimed by a faction. +map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/de-DE/hyperfactions_gui.lang b/src/main/resources/Server/Languages/de-DE/hyperfactions_gui.lang new file mode 100644 index 00000000..c1420d61 --- /dev/null +++ b/src/main/resources/Server/Languages/de-DE/hyperfactions_gui.lang @@ -0,0 +1,446 @@ +# Language: German (de-DE) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with German translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule + +# ========== Navigation Bar ========== +nav.dashboard = Dashboard +nav.chat = Chat +nav.members = Members +nav.invites = Invites +nav.browser = Browse +nav.map = Map +nav.leaderboard = Leaderboard +nav.relations = Relations +nav.treasury = Treasury +nav.settings = Settings +nav.logs = Logs +nav.help = Help +nav.admin = Admin +nav.create = Create + +# ========== Help Category Names ========== +help.category.welcome = Welcome +help.category.your_faction = Your Faction +help.category.power_land = Power & Land +help.category.diplomacy = Diplomacy +help.category.combat = Combat & Safety +help.category.economy = Economy +help.category.quick_ref = Quick Reference + +# ========== Main Menu ========== +main_menu.section_my_faction = My Faction +main_menu.section_get_started = Get Started +main_menu.section_territory = Territory +main_menu.section_browse = Browse +main_menu.section_admin = Admin +main_menu.claim_hint = Use /f claim to claim territory. + +# ========== Faction Info Page ========== +faction_info.no_description = No description set. +faction_info.status_open = Open +faction_info.status_invite_only = Invite Only +faction_info.status_raidable = Raidable +faction_info.status_protected = Protected +faction_info.officers_more = +{0} more + +# ========== Rename Modal ========== +rename.no_permission = You don't have permission to rename the faction. +rename.enter_name = Please enter a faction name. +rename.too_short = Faction name must be at least {0} characters. +rename.too_long = Faction name cannot exceed {0} characters. +rename.same_name = That's already your faction's name. +rename.name_taken = A faction with that name already exists. +rename.success = Faction renamed from {0} to {1}! + +# ========== Description Modal ========== +desc.no_permission = You don't have permission to edit the description. +desc.display_none = (None) +desc.cleared = Faction description cleared. +desc.updated = Faction description updated! + +# ========== Tag Modal ========== +tag.no_permission = You don't have permission to edit the tag. +tag.display_none = (None) +tag.cleared = Faction tag cleared. +tag.too_short = Tag must be at least {0} character. +tag.too_long = Tag cannot exceed {0} characters. +tag.invalid_format = Tag can only contain letters and numbers. +tag.same_tag = That's already your faction's tag. +tag.tag_taken = A faction with that tag already exists. +tag.success = Faction tag set to [{0}]! + +# ========== Dashboard Page ========== +dashboard.faction_gone = Your faction no longer exists. +dashboard.available = {0} available +dashboard.at_risk = At Risk! +dashboard.online_count = {0} online +dashboard.status_invite = Invite +dashboard.in_grace = IN GRACE +dashboard.billable_chunks = {0} billable chunks +dashboard.btn_home = Home +dashboard.btn_set_home = Set Home +dashboard.btn_claim = Claim +dashboard.chat_prefix = Chat: {0} +dashboard.btn_leave = Leave +dashboard.no_activity = No recent activity. +dashboard.time_now = now +dashboard.time_minutes = {0}m ago +dashboard.time_hours = {0}h ago +dashboard.time_days = {0}d ago +dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. +dashboard.chat_mode_set = Chat mode: {0} +dashboard.claim_success = Claimed chunk at ({0}, {1}) + +# ========== Faction Main Page ========== +main.no_faction = No Faction +main.joined = You joined the faction! +main.join_failed = Failed to join faction: {0} +main.invite_declined = Invite declined. +main.cooldown = Teleport on cooldown! {0}s remaining. +main.world_not_found = Cannot teleport - world not found. +main.leave_failed = Failed to leave: {0} + +# ========== Shared GUI Labels ========== +common.faction_count = {0} factions +common.leader_label = Leader: {0} +common.sort_power = Power +common.sort_members = Members +common.page_format = {0}/{1} +common.own_faction = (You) + +# ========== Members Page ========== +members.count = {0} members +members.sort_role = Role +members.sort_last_online = Last Online +members.just_now = just now +members.ago = {0} ago +members.never = Never +members.member_not_found = Member not found. +members.promoted = Promoted {0} to {1}. +members.promote_failed = Failed to promote: {0} +members.demoted = Demoted {0} to {1}. +members.demote_failed = Failed to demote: {0} +members.kicked = Kicked {0} from the faction. +members.kick_failed = Failed to kick: {0} + +# ========== Browser Page ========== +browser.sort_name = Name +browser.invalid_faction = Invalid faction. + +# ========== Leaderboard Page ========== +leaderboard.sort_kd = K/D +leaderboard.sort_territory = Territory +leaderboard.sort_balance = Balance + +# ========== Player Info Page ========== +playerinfo.now = Now +playerinfo.history_count = {0} records +playerinfo.joined_label = Joined: {0} +playerinfo.current = Current +playerinfo.left_label = Left: {0} +playerinfo.no_history = No membership history +playerinfo.faction_gone = Faction no longer exists. +playerinfo.reason_active = ACTIVE +playerinfo.reason_left = LEFT +playerinfo.reason_kicked = KICKED +playerinfo.reason_disbanded = DISBANDED + +# ========== Relations Page ========== +relations.relation_count = {0} relations +relations.request_count = {0} requests +relations.type_ally = Ally +relations.type_enemy = Enemy +relations.type_incoming = Incoming +relations.type_outgoing = Outgoing +relations.incoming_request = Incoming request +relations.outgoing_request = Outgoing request +relations.empty_relations = No relations yet. +relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. +relations.empty_pending = No pending ally requests. +relations.today = Today +relations.one_day_ago = 1 day ago +relations.days_ago = {0} days ago +relations.now_neutral = Now neutral with {0}. +relations.now_enemies = Now enemies with {0}! +relations.request_sent = Alliance request sent to {0}. +relations.now_allied = Now allied with {0}! +relations.request_declined = Ally request from {0} declined. +relations.request_cancelled = Ally request to {0} cancelled. +relations.failed = Failed: {0} +relations.search_hint = Search for a faction to set relation +relations.no_results = No factions found matching '{0}' +relations.power_display = {0} power +relations.member_count = {0} members + +# ========== Settings Page ========== +settings.officers_only = Only officers and leaders can change faction settings. +settings.display_none = (None) +settings.home_not_set = Not set +settings.no_permission = You don't have permission to change settings. +settings.only_leader_disband = Only the leader can disband the faction. +settings.perm_locked = This setting is locked by the server. +settings.no_perm_edit = You don't have permission to edit territory permissions. +settings.only_leader_officers = Only the leader can change officer access. +settings.pvp_enabled = Enabled +settings.pvp_disabled = Disabled +settings.not_in_territory = You must be in your faction's territory to set home. +settings.home_set = Faction home set to your current location! +settings.recruitment_set = Recruitment set to {0}. +settings.home_no_set = Your faction does not have a home set. +settings.home_deleted = Faction home deleted! + +# ========== Modules Page ========== +modules.treasury_name = Treasury +modules.treasury_desc = Faction bank & economy system +modules.raids_name = Raids +modules.raids_desc = Scheduled faction battles +modules.levels_name = Levels +modules.levels_desc = Faction progression & XP +modules.war_name = War +modules.war_desc = Formal war declarations +modules.coming_soon = Coming Soon +modules.active = Active +modules.view_treasury = View Treasury +modules.unavailable = Unavailable +modules.no_economy = No economy plugin detected +modules.disabled = Disabled +modules.economy_not_available = Economy features are not available on this server + +# ========== Treasury Page ========== +treasury.wallet_label = Your wallet: {0} +treasury.treasury_label = Treasury balance: {0} +treasury.chunks_detail = {0} free + {1} billable chunks +treasury.cost_label = Cost: {0} +treasury.pending = Pending +treasury.auto_pay_on = Auto-pay: ON +treasury.auto_pay_off = Auto-pay: OFF +treasury.runway_90_plus = 90+ days +treasury.runway_days = {0} days +treasury.runway_day = {0} day +treasury.runway_less_day = < 1 day +treasury.runway_no_funds = No funds +treasury.grace_expires = Grace expires in: {0} +treasury.missed_payments = Missed payments: {0} +treasury.pay_to_clear = Pay {0} to clear grace +treasury.system = System +treasury.type_deposit = Deposit +treasury.type_withdrawal = Withdrawal +treasury.type_transfer_in = Transfer In +treasury.type_transfer_out = Transfer Out +treasury.type_player_transfer = Player Transfer +treasury.type_upkeep = Upkeep +treasury.type_tax = Tax Collection +treasury.type_war_cost = War Cost +treasury.type_raid_cost = Raid Cost +treasury.type_spoils = Spoils +treasury.type_admin = Admin Adjustment +treasury.deposit_title = Deposit to Treasury +treasury.withdraw_title = Withdraw from Treasury +treasury.fee_label = Fee ({0}%) +treasury.confirm_deposit = Confirm Deposit +treasury.confirm_withdrawal = Confirm Withdrawal +treasury.from_wallet = {0} from wallet +treasury.to_wallet = {0} to wallet +treasury.enter_valid_amount = Enter a valid positive amount. +treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. +treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. +treasury.deposit_failed_returned = Failed to deposit. Money returned. +treasury.deposited = Deposited {0} into the treasury. +treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) +treasury.no_withdraw_permission = You don't have permission to withdraw. +treasury.withdraw_denied = Withdrawal denied: {0} +treasury.insufficient_treasury = Insufficient funds in treasury. +treasury.withdraw_limit = Withdrawal limit exceeded. +treasury.withdraw_failed = Withdrawal failed: {0} +treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. +treasury.withdrew = Withdrew {0} from the treasury. +treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) +treasury.search_hint = Search for a player or faction +treasury.no_results = No results for '{0}' +treasury.tag_player = [Player] +treasury.tag_faction = [Faction] +treasury.source_online = Online +treasury.source_offline = Offline +treasury.source_player_db = Hytale player +treasury.no_transfer_permission = You don't have permission to transfer. +treasury.transfer_denied = Transfer denied: {0} +treasury.invalid_target_faction = Invalid target faction. +treasury.target_faction_gone = Target faction no longer exists. +treasury.transfer_failed = Transfer failed: {0} +treasury.transfer_failed_returned = Transfer failed. Funds returned. +treasury.transferred = Transferred {0} to {1}. +treasury.invalid_target_player = Invalid target player. +treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. +treasury.leader_only_perms = Only the leader can change treasury permissions. +treasury.leader_only_upkeep = Only the leader can change upkeep settings. +treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. + +# ========== Confirmation Pages ========== +confirm.disband_not_leader = Only the leader can disband the faction. +confirm.disbanded = Faction '{0}' has been disbanded. +confirm.disband_failed = Failed to disband faction. +confirm.succession_title = Leadership will transfer to: +confirm.no_members_warning = WARNING: No other members! +confirm.will_disband = Leaving will disband the faction permanently. +confirm.not_in_faction = You are not in this faction. +confirm.not_leader_anymore = You are no longer the leader. +confirm.no_successor = No successor available. Use disband instead. +confirm.transfer_failed = Failed to transfer leadership: {0} +confirm.leader_left = Leadership transferred to {0}. You have left {1}. +confirm.leave_failed = Failed to leave faction: {0} +confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. +confirm.left_faction = You have left {0}. +confirm.faction_gone = Faction no longer exists. +confirm.not_leader_transfer = Only the leader can transfer leadership. +confirm.leadership_transferred = Leadership transferred to {0}. + +# ========== Logs Viewer Page ========== +logs.title = {0} - Activity Logs +logs.entry_count = {0} entries +logs.all_types = All Types +logs.no_logs_type = No logs of this type. +logs.no_logs = No activity logs yet. + +# ========== Chat Page ========== +chat.placeholder = Type a message... +chat.no_messages = No messages yet. +chat.no_ally_permission = You don't have permission for ally chat. +chat.no_permission = No permission. +chat.faction_gone = Your faction no longer exists. +chat.time_now = now +chat.time_minutes = {0}m +chat.time_hours = {0}h + +# ========== Invites Page ========== +invites.invite_count = {0} invites +invites.request_count = {0} requests +invites.invited_by = Invited by: {0} +invites.no_message = No message +invites.expires = Expires: {0} +invites.type_outgoing = Outgoing +invites.type_request = Request +invites.invited_by_label = Invited by: +invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. +invites.empty_requests = No join requests. Players can request to join with /f request. +invites.invalid_player = Invalid player. +invites.cancelled_invite = Cancelled invite to {0}. +invites.player_joined = {0} has joined the faction! +invites.faction_full = Faction is full. Cannot accept request. +invites.add_failed = Failed to add player to faction. +invites.request_expired = Request not found or expired. +invites.request_declined = Declined join request from {0}. +invites.time_seconds = {0}s +invites.time_minutes = {0}m +invites.time_hours = {0}h + +# ========== Map Page ========== +map.position = Your Position: Chunk ({0}, {1}) +map.legend_protected = Protected +map.claim_stats = Claims: {0}/{1} ({2} Available) +map.overclaimed = OVERCLAIMED by {0}! +map.power_display = Power: {0}/{1} +map.join_to_claim = Join a faction to claim +map.claim_success = Claimed chunk at ({0}, {1})! +map.claim_not_in_faction = You must be in a faction to claim territory. +map.claim_not_officer = Only officers and leaders can claim territory. +map.claim_already_yours = You already own this chunk. +map.claim_already_claimed = This chunk is already claimed by another faction. +map.claim_not_adjacent = You can only claim chunks adjacent to your territory. +map.claim_max = You have reached your maximum claim limit. +map.claim_world_not_allowed = Claiming is not allowed in this world. +map.claim_orbisguard = This area is protected by OrbisGuard. +map.claim_failed = Failed to claim chunk. +map.unclaim_success = Unclaimed chunk at ({0}, {1}). +map.unclaim_not_in_faction = You must be in a faction. +map.unclaim_not_officer = Only officers and leaders can unclaim territory. +map.unclaim_not_claimed = This chunk is not claimed. +map.unclaim_not_yours = This chunk belongs to another faction. +map.unclaim_home = Cannot unclaim the chunk containing your faction home. +map.unclaim_failed = Failed to unclaim chunk. +map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! +map.overclaim_not_in_faction = You must be in a faction. +map.overclaim_not_officer = Only officers and leaders can overclaim territory. +map.overclaim_already_yours = You already own this chunk. +map.overclaim_ally = You cannot overclaim allied territory. +map.overclaim_has_power = This faction has enough power to defend their territory. +map.overclaim_max = You have reached your maximum claim limit. +map.overclaim_failed = Failed to overclaim chunk. +# ========== Create Faction Page ========== +create.preview_name = Your Faction Name +create.leader_prefix = Leader: {0} +create.enter_name = Please enter a faction name. +create.name_too_short = Faction name must be at least {0} characters. +create.name_too_long = Faction name cannot exceed {0} characters. +create.name_taken = A faction with this name already exists. +create.tag_length = Faction tag must be {0}-{1} characters. +create.tag_format = Faction tag can only contain letters and numbers. +create.desc_too_long = Description cannot exceed {0} characters. +create.created = Faction {0} created successfully! +create.created_no_dashboard = Faction created but could not open dashboard. +create.invalid_name = Invalid faction name. +create.create_failed = Could not create faction. + +# ========== New Player Pages ========== +newplayer.pending_count = {0} pending +newplayer.received_header = RECEIVED INVITES ({0}) +newplayer.requests_header = YOUR REQUESTS ({0}) +newplayer.no_invites = No invites. Browse factions to find one! +newplayer.no_requests = No pending requests. +newplayer.invited_by = Invited by: {0} +newplayer.member_count = {0} members +newplayer.power_count = {0} power +newplayer.claim_count = {0} claims +newplayer.awaiting_review = Awaiting review +newplayer.expires_in = Expires in {0}h +newplayer.time_just_now = just now +newplayer.time_minutes = {0} min ago +newplayer.time_hours = {0}h ago +newplayer.time_days = {0}d ago +newplayer.invalid_faction = Invalid faction. +newplayer.invite_expired = This invite has expired or was revoked. +newplayer.faction_gone = Faction no longer exists. +newplayer.joined = You joined {0}! +newplayer.faction_full = This faction is full. +newplayer.join_failed = Could not join faction. +newplayer.invite_declined = Invite declined. +newplayer.request_cancelled = Cancelled request to join {0}. +newplayer.faction_count = {0} factions +newplayer.browse_subtitle = Find your new home! +newplayer.sort_power = Power +newplayer.sort_name = Name +newplayer.sort_members = Members +newplayer.btn_accept = Accept +newplayer.btn_pending = Pending +newplayer.btn_join = Join +newplayer.btn_request = Request +newplayer.invite_only_msg = This faction is invite-only. +newplayer.welcome_hint = Welcome! Use /f to open faction menu. +newplayer.faction_open_hint = This faction is open! Click JOIN instead. +newplayer.already_requested = You already have a pending request to this faction. +newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. +newplayer.request_sent = Join request sent to {0}! +newplayer.officer_review = An officer will review your request. +newplayer.map_hint = View Only - Join a faction to claim territory! + +# Player Settings +nav.player_settings = Settings +player_settings.title = Player Settings +player_settings.language_section = Language +player_settings.auto_detect = Auto-detect from client +player_settings.auto_detect_desc = Uses your game client's language setting +player_settings.language_label = Language +player_settings.notifications_section = Notifications +player_settings.territory_alerts = Territory Alerts +player_settings.territory_alerts_desc = Show notifications when entering/leaving territories +player_settings.death_announcements = Death Broadcasts +player_settings.death_announcements_desc = Receive faction member death location announcements +player_settings.power_notifications = Power Changes +player_settings.power_notifications_desc = Show messages when your power changes +player_settings.language_changed = Language changed to {0} +player_settings.pref_enabled = {0} enabled +player_settings.pref_disabled = {0} disabled diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions.lang new file mode 100644 index 00000000..abccd262 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions.lang @@ -0,0 +1,447 @@ +# HyperFactions - Traducciones al Espanol +# Formato: clave = valor (o clave = "valor entre comillas") +# Nota: Las claves se prefijan automaticamente con "hyperfactions." por el I18nModule de Hytale +# Marcadores: {0}, {1}, etc. + +# ========== Comun ========== +common.no_permission = No tienes permiso para hacer eso. +common.not_in_faction = No estas en una faccion. +common.already_in_faction = Ya estas en una faccion. +common.player_not_found = Jugador no encontrado. +common.faction_not_found = Faccion no encontrada. +common.player_not_online = Ese jugador no esta conectado. +common.must_be_leader = Solo el lider de la faccion puede hacer eso. +common.must_be_officer = Debes ser Oficial o Lider para hacer eso. +common.combat_tagged = No puedes hacer eso mientras estas en combate. +common.cancel = Cancelar +common.confirm = Confirmar +common.save = Guardar +common.close = Cerrar +common.yes = Si +common.no = No +common.loading = Cargando... +common.online = Conectado +common.offline = Desconectado +common.enabled = Activado +common.disabled = Desactivado +common.none = Ninguno +common.page = Pagina {0} de {1} +common.unknown = Desconocido +common.error_generic = Algo salio mal. Intentalo de nuevo. +common.gui_fallback = No se pudo abrir la interfaz. Usa /f help para ver los comandos. +common.admin_prefix = [Admin] +common.location_error = No se pudo determinar tu ubicacion. +common.world_error = No se pudo determinar tu mundo. +common.invalid_id = ID de faccion invalido. +common.na = N/D + +# ========== Comandos - Crear ========== +cmd.create.no_permission = No tienes permiso para crear facciones. +cmd.create.usage = Uso: /f create +cmd.create.success = Faccion '{0}' creada! +cmd.create.already_in_named = Ya estas en {0}. +cmd.create.use_leave_first = Usa /f leave primero si quieres crear una nueva faccion. +cmd.create.name_taken = Ese nombre de faccion ya esta en uso. +cmd.create.name_too_short = El nombre de la faccion es demasiado corto. +cmd.create.name_too_long = El nombre de la faccion es demasiado largo. +cmd.create.failed = No se pudo crear la faccion. + +# ========== Comandos - Disolver ========== +cmd.disband.no_permission = No tienes permiso para disolver facciones. +cmd.disband.not_leader = Solo el lider de la faccion puede disolverla. +cmd.disband.confirm_prompt = Estas seguro de que quieres disolver tu faccion? +cmd.disband.confirm_instruction = Escribe /f disband --text de nuevo en los proximos {0} segundos para confirmar. +cmd.disband.success = Tu faccion ha sido disuelta. +cmd.disband.failed = No se pudo disolver la faccion. +cmd.disband.cancelled = Confirmacion anterior cancelada. Escribe de nuevo para confirmar la disolucion. + +# ========== Comandos - Renombrar ========== +cmd.rename.no_permission = No tienes permiso. +cmd.rename.not_leader = Solo el lider puede renombrar la faccion. +cmd.rename.usage = Uso: /f rename +cmd.rename.too_short = El nombre es demasiado corto (min {0} caracteres). +cmd.rename.too_long = El nombre es demasiado largo (max {0} caracteres). +cmd.rename.name_taken = Ese nombre ya esta en uso. +cmd.rename.success = Faccion renombrada a {0}! +cmd.rename.broadcast = {0} renombro la faccion a {1} + +# ========== Comandos - Descripcion ========== +cmd.desc.no_permission = No tienes permiso. +cmd.desc.not_officer = Debes ser oficial para establecer la descripcion. +cmd.desc.set = Descripcion de la faccion establecida! +cmd.desc.cleared = Descripcion de la faccion borrada. + +# ========== Comandos - Abrir / Cerrar ========== +cmd.open.no_permission = No tienes permiso. +cmd.open.not_leader = Solo el lider puede cambiar esta configuracion. +cmd.open.already_open = Tu faccion ya esta abierta. +cmd.open.success = Tu faccion ahora esta abierta! Cualquiera puede unirse con /f join. +cmd.open.broadcast = {0} abrio la faccion al ingreso publico. +cmd.close.no_permission = No tienes permiso. +cmd.close.not_leader = Solo el lider puede cambiar esta configuracion. +cmd.close.already_closed = Tu faccion ya esta cerrada. +cmd.close.success = Tu faccion ahora es solo por invitacion. +cmd.close.broadcast = {0} cerro la faccion a solo invitacion. + +# ========== Comandos - Color ========== +cmd.color.no_permission = No tienes permiso. +cmd.color.not_officer = Debes ser oficial para cambiar el color. +cmd.color.colors_disabled = Los colores de faccion estan desactivados. +cmd.color.usage = Uso: /f color +cmd.color.usage_hint = Codigos validos: 0-9, a-f o #RRGGBB hex +cmd.color.invalid = Color invalido. Usa 0-9, a-f o #RRGGBB. +cmd.color.success = Color de la faccion actualizado! + +# ========== Comandos - Reclamar ========== +cmd.claim.no_permission = No tienes permiso para reclamar territorio. +cmd.claim.already_yours = Tu faccion ya posee este chunk. +cmd.claim.cannot_claim_ally = No puedes reclamar territorio aliado. +cmd.claim.already_claimed_hint = Este chunk ya esta reclamado. Usa /f overclaim si son vulnerables. +cmd.claim.success = Chunk reclamado en {0}, {1}! +cmd.claim.not_officer = Debes ser oficial para reclamar territorio. +cmd.claim.already_claimed = Este chunk ya esta reclamado. +cmd.claim.max_claims = Tu faccion alcanzo el maximo de reclamos. Consigue mas poder! +cmd.claim.not_adjacent = Debes reclamar junto a territorio existente. +cmd.claim.world_not_allowed = No se permite reclamar en este mundo. +cmd.claim.orbisguard = Esta area esta protegida por OrbisGuard. +cmd.claim.zone_protected = Este chunk esta en una zona segura o de guerra. +cmd.claim.insufficient_power = Tu faccion no tiene suficiente poder para reclamar mas territorio. +cmd.claim.failed = No se pudo reclamar el chunk. + +# ========== Comandos - Invitar ========== +cmd.invite.no_permission = No tienes permiso para invitar jugadores. +cmd.invite.not_officer = Debes ser oficial para invitar jugadores. +cmd.invite.usage = Uso: /f invite +cmd.invite.player_not_found = Jugador '{0}' no encontrado o desconectado. +cmd.invite.target_in_faction = Ese jugador ya esta en una faccion. +cmd.invite.sent = Invitaste a {0} a tu faccion. +cmd.invite.received = Has sido invitado a unirte a {0}! +cmd.invite.accept_hint = Escribe /f accept {0} para unirte. + +# ========== Comandos - Aceptar / Unirse ========== +cmd.join.no_permission = No tienes permiso para unirte a facciones. +cmd.join.already_in_named = Ya estas en {0}. +cmd.join.use_leave_hint = Usa /f leave primero si quieres unirte a otra faccion. +cmd.join.no_invites = No tienes invitaciones pendientes. +cmd.join.faction_not_found = Faccion '{0}' no encontrada. +cmd.join.not_invited = No tienes invitacion de esa faccion. +cmd.join.faction_gone = Esa faccion ya no existe. +cmd.join.success = Te has unido a {0}! +cmd.join.broadcast = {0} se ha unido a la faccion! +cmd.join.faction_full = Esa faccion esta llena. +cmd.join.failed = No se pudo unir a la faccion. + +# ========== Comandos - Expulsar ========== +cmd.kick.no_permission = No tienes permiso para expulsar miembros. +cmd.kick.usage = Uso: /f kick +cmd.kick.not_in_your_faction = El jugador '{0}' no esta en tu faccion. +cmd.kick.success = Expulsaste a {0} de la faccion. +cmd.kick.broadcast = {0} fue expulsado de la faccion. +cmd.kick.kicked = Has sido expulsado de la faccion. +cmd.kick.cannot_kick_higher = No tienes permiso para expulsar a ese jugador. +cmd.kick.cannot_kick_leader = No puedes expulsar al lider de la faccion. +cmd.kick.failed = No se pudo expulsar al jugador. + +# ========== Comandos - Salir ========== +cmd.leave.no_permission = No tienes permiso para salir de facciones. +cmd.leave.confirm_prompt = Estas seguro de que quieres salir de tu faccion? +cmd.leave.confirm_instruction = Escribe /f leave --text de nuevo en los proximos {0} segundos para confirmar. +cmd.leave.success = Has salido de tu faccion. +cmd.leave.broadcast = {0} ha salido de la faccion. +cmd.leave.failed = No se pudo salir de la faccion. +cmd.leave.cancelled = Confirmacion anterior cancelada. Escribe de nuevo para confirmar la salida. + +# ========== Comandos - Promover / Degradar / Transferir ========== +cmd.rank.promote_no_permission = No tienes permiso para promover miembros. +cmd.rank.promote_usage = Uso: /f promote +cmd.rank.promoted = {0} promovido a {1}! +cmd.rank.promote_broadcast = {0} fue promovido a {1}! +cmd.rank.already_highest = No se puede promover mas. Usa /f transfer para cambiar de lider. +cmd.rank.promote_failed = No se pudo promover al jugador. +cmd.rank.demote_no_permission = No tienes permiso para degradar miembros. +cmd.rank.demote_usage = Uso: /f demote +cmd.rank.demoted = {0} degradado a {1}. +cmd.rank.demote_broadcast = {0} fue degradado a {1}. +cmd.rank.already_lowest = Ese jugador ya es Miembro. +cmd.rank.demote_failed = No se pudo degradar al jugador. +cmd.rank.transfer_no_permission = No tienes permiso para transferir el liderazgo. +cmd.rank.transfer_usage = Uso: /f transfer +cmd.rank.player_not_in_faction = Jugador no encontrado en tu faccion. +cmd.rank.transfer_confirm = Estas seguro de que quieres transferir el liderazgo a {0}? +cmd.rank.transfer_confirm_instruction = Escribe /f transfer {0} --text de nuevo en los proximos {1} segundos para confirmar. +cmd.rank.transferred = Liderazgo transferido a {0}! +cmd.rank.transfer_broadcast = {0} ahora es el lider de la faccion! +cmd.rank.transfer_failed = No se pudo transferir el liderazgo. +cmd.rank.transfer_cancelled = Confirmacion anterior cancelada. Escribe de nuevo para confirmar la transferencia. + +# ========== Comandos - Desreclamar ========== +cmd.unclaim.no_permission = No tienes permiso para desreclamar territorio. +cmd.unclaim.success = Chunk desreclamado en {0}, {1}. +cmd.unclaim.not_officer = Debes ser oficial para desreclamar territorio. +cmd.unclaim.chunk_not_claimed = Este chunk no esta reclamado. +cmd.unclaim.not_your_claim = Tu faccion no posee este chunk. +cmd.unclaim.cannot_unclaim_home = No puedes desreclamar el chunk con el hogar de la faccion. +cmd.unclaim.would_disconnect = No se puede desreclamar - desconectaria tu territorio. +cmd.unclaim.failed = No se pudo desreclamar el chunk. + +# ========== Comandos - Sobrereclamar ========== +cmd.overclaim.no_permission = No tienes permiso para sobrereclamar territorio. +cmd.overclaim.success = Territorio enemigo sobrereclamado! +cmd.overclaim.not_officer = Debes ser oficial para sobrereclamar. +cmd.overclaim.not_claimed = Este chunk no esta reclamado. Usa /f claim. +cmd.overclaim.own_chunk = Tu faccion ya posee este chunk. +cmd.overclaim.ally = No puedes sobrereclamar territorio aliado. +cmd.overclaim.target_has_power = Esta faccion aun tiene suficiente poder. +cmd.overclaim.failed = No se pudo sobrereclamar. + +# ========== Comandos - Atrapado ========== +cmd.stuck.no_permission = No tienes permiso para usar /f stuck. +cmd.stuck.not_stuck = No estas atrapado - esto es territorio salvaje. +cmd.stuck.combat_tagged = No puedes usar /f stuck mientras estas en combate! +cmd.stuck.no_safe = No se encontro una ubicacion segura. +cmd.stuck.teleporting = Teletransportandote a un lugar seguro en {0} segundos. No te muevas! + +# ========== Comandos - Hogar ========== +cmd.home.no_permission = No tienes permiso para teletransportarte al hogar de la faccion. +cmd.home.no_home = Tu faccion no tiene hogar establecido. +cmd.home.combat_tagged = No puedes teletransportarte mientras estas en combate! +cmd.home.teleported = Teletransportado al hogar de la faccion! + +# ========== Comandos - Establecer Hogar ========== +cmd.sethome.no_permission = No tienes permiso para establecer el hogar de la faccion. +cmd.sethome.world_not_allowed = No se puede establecer el hogar en este mundo. +cmd.sethome.not_in_territory = Solo puedes establecer el hogar en el territorio de tu faccion. +cmd.sethome.set = Hogar de la faccion establecido! +cmd.sethome.broadcast = {0} establecio el hogar de la faccion. +cmd.sethome.not_officer = Debes ser oficial para establecer el hogar. +cmd.sethome.failed = No se pudo establecer el hogar. + +# ========== Comandos - Eliminar Hogar ========== +cmd.delhome.no_permission = No tienes permiso para eliminar el hogar de la faccion. +cmd.delhome.no_home = Tu faccion no tiene un hogar establecido. +cmd.delhome.deleted = Hogar de la faccion eliminado! +cmd.delhome.broadcast = {0} elimino el hogar de la faccion. +cmd.delhome.not_officer = Debes ser oficial para eliminar el hogar. +cmd.delhome.failed = No se pudo eliminar el hogar. + +# ========== Comandos - Relacion (Aliado/Enemigo/Neutral/Relaciones) ========== +cmd.relation.ally_no_permission = No tienes permiso para gestionar alianzas. +cmd.relation.ally_usage = Uso: /f ally +cmd.relation.ally_sent = Solicitud de alianza enviada a {0}! +cmd.relation.ally_formed = Ahora son aliados con {0}! +cmd.relation.already_ally = Ya son aliados con esa faccion. +cmd.relation.ally_failed = No se pudo enviar la solicitud de alianza. +cmd.relation.enemy_no_permission = No tienes permiso para declarar enemigos. +cmd.relation.enemy_usage = Uso: /f enemy +cmd.relation.enemy_declared = {0} ahora es tu enemigo! +cmd.relation.already_enemy = Ya son enemigos con esa faccion. +cmd.relation.max_enemies = Has alcanzado el numero maximo de enemigos. +cmd.relation.enemy_failed = No se pudo establecer como enemigo. +cmd.relation.neutral_no_permission = No tienes permiso para establecer relaciones neutrales. +cmd.relation.neutral_usage = Uso: /f neutral +cmd.relation.neutral_set = Tu faccion ahora es neutral con {0}. +cmd.relation.already_neutral = Ya son neutrales con esa faccion. +cmd.relation.neutral_failed = No se pudo establecer como neutral. +cmd.relation.cannot_self = No puedes aliarte contigo mismo. +cmd.relation.max_allies = Has alcanzado el numero maximo de aliados. +cmd.relation.view_no_permission = No tienes permiso para ver las relaciones. +cmd.relation.header = === Relaciones de la Faccion === +cmd.relation.allies_count = Aliados ({0}): +cmd.relation.enemies_count = Enemigos ({0}): +cmd.relation.list_entry = - {0} + +# ========== Comandos - Chat ========== +cmd.chat.usage = Uso: /f c [f|a|off] +cmd.chat.no_permission = No tienes permiso para ese modo de chat. +cmd.chat.mode_set = Modo de chat establecido a {0} + +# ========== Comandos - Invitaciones ========== +cmd.invites.not_officer = Debes ser oficial para gestionar invitaciones. +cmd.invites.header = === Invitaciones de la Faccion === +cmd.invites.no_pending = No hay invitaciones ni solicitudes pendientes. +cmd.invites.outgoing = Invitaciones Enviadas: +cmd.invites.outgoing_entry = {0} (invitado por {1}) +cmd.invites.requests = Solicitudes de Ingreso: +cmd.invites.request_entry = {0}{1} +cmd.invites.your_invites_header = === Tus Invitaciones === +cmd.invites.no_invites = No tienes invitaciones pendientes. +cmd.invites.invite_entry = {0} - Usa /f accept {1} + +# ========== Comandos - Solicitud ========== +cmd.request.no_permission = No tienes permiso para solicitar membresia en facciones. +cmd.request.already_in_named = Ya estas en {0}. +cmd.request.use_leave_hint = Usa /f leave primero si quieres unirte a otra faccion. +cmd.request.usage = Uso: /f request [mensaje] +cmd.request.faction_open = Esa faccion esta abierta! Usa /f accept {0} para unirte directamente. +cmd.request.already_requested = Ya tienes una solicitud pendiente para esa faccion. +cmd.request.has_invite = Has sido invitado a esa faccion! Usa /f accept {0} para unirte. +cmd.request.sent = Solicitud de ingreso enviada a {0}! +cmd.request.your_message = Tu mensaje: "{0}" +cmd.request.officer_review = Un oficial revisara tu solicitud. +cmd.request.officer_notify = {0} ha solicitado unirse a tu faccion! +cmd.request.officer_review_hint = Usa /f gui > Invitaciones para revisar. + +# ========== Comandos - Info ========== +cmd.info.faction_header = === {0} === +cmd.info.player_header = === {0} === +cmd.info.no_permission = No tienes permiso para ver informacion de facciones. +cmd.info.faction_not_found = Faccion '{0}' no encontrada. +cmd.info.not_in_faction_hint = No estas en una faccion. Usa /f info +cmd.info.leader = Lider: {0} +cmd.info.members = Miembros: {0}/{1} +cmd.info.power = Poder: {0} +cmd.info.claims = Reclamos: {0} +cmd.info.raidable = VULNERABLE! +cmd.info.allies = Aliados: {0} +cmd.info.enemies = Enemigos: {0} +cmd.info.they_consider = Ellos te consideran: {0} +cmd.info.you_consider = Tu los consideras: {0} +cmd.info.members_no_permission = No tienes permiso para ver los miembros de la faccion. +cmd.info.members_header = === Miembros de {0} ({1}) === +cmd.info.member_online = [Conectado] +cmd.info.list_no_permission = No tienes permiso para ver la lista de facciones. +cmd.info.list_empty = No hay facciones. +cmd.info.list_header = === Facciones ({0}) === +cmd.info.list_entry = {0} - {1} miembros, {2} poder +cmd.info.list_entry_raidable = {0} - {1} miembros, {2} poder [VULNERABLE] +cmd.info.help_no_permission = No tienes permiso para ver la ayuda. +cmd.info.who_no_permission = No tienes permiso para ver informacion de jugadores. +cmd.info.who_faction = Faccion: {0} +cmd.info.who_role = Rol: {0} +cmd.info.who_joined = Ingreso: {0} +cmd.info.who_faction_none = Faccion: Ninguna +cmd.info.who_power = Poder: {0} +cmd.info.who_status = Estado: {0} +cmd.info.who_last_seen = Ultima vez visto: {0} +cmd.info.map_no_permission = No tienes permiso para ver el mapa. +cmd.info.map_header = === Mapa de Territorio === +cmd.info.map_legend = Leyenda: +Tu /Propio /Aliado /Enemigo -Salvaje +cmd.info.map_gui_hint = Usa /f gui para el mapa interactivo + +# ========== Comandos - Poder ========== +cmd.power.personal = Poder Personal: {0}/{1} +cmd.power.faction = Poder de Faccion: {0}/{1} +cmd.power.death_loss = Perdida por Muerte: {0} +cmd.power.regen = Velocidad de Regeneracion: {0}/hr +cmd.power.no_permission = No tienes permiso para ver informacion de poder. +cmd.power.header = Poder de {0}: +cmd.power.current = Actual: {0} + +# ========== Comandos - Economia ========== +cmd.economy.balance = Saldo: {0} +cmd.economy.deposited = Depositaste {0} en la tesoreria de la faccion. +cmd.economy.withdrawn = Retiraste {0} de la tesoreria de la faccion. +cmd.economy.transferred = Transferiste {0} a {1}. +cmd.economy.insufficient = Fondos insuficientes en la tesoreria de la faccion. +cmd.economy.invalid_amount = Cantidad invalida: {0} +cmd.economy.economy_disabled = La economia esta desactivada. +cmd.economy.balance_no_permission = No tienes permiso para ver saldos. +cmd.economy.treasury_unavailable = La tesoreria no esta disponible. +cmd.economy.balance_display = Tesoreria de {0}: {1} +cmd.economy.deposit_no_permission = No tienes permiso para depositar. +cmd.economy.deposit_faction_denied = No tienes permiso de faccion para depositar. +cmd.economy.deposit_usage = Uso: /f deposit +cmd.economy.amount_positive = La cantidad debe ser positiva. +cmd.economy.wallet_insufficient = No tienes suficiente dinero. Billetera: {0} +cmd.economy.wallet_withdraw_failed = No se pudo retirar de tu billetera. +cmd.economy.deposit_failed = No se pudo depositar en la tesoreria. Dinero devuelto. +cmd.economy.withdraw_no_permission = No tienes permiso para retirar. +cmd.economy.withdraw_faction_denied = No tienes permiso de faccion para retirar. +cmd.economy.withdraw_usage = Uso: /f withdraw +cmd.economy.withdraw_limit_denied = Retiro denegado: {0} +cmd.economy.wallet_deposit_failed = Advertencia: No se pudo depositar en tu billetera. Contacta a un admin. +cmd.economy.withdraw_limit_exceeded = Retiro denegado: limite excedido. +cmd.economy.withdraw_failed = Retiro fallido: {0} +cmd.economy.transfer_no_permission = No tienes permiso para transferir. +cmd.economy.transfer_faction_denied = No tienes permiso de faccion para transferir. +cmd.economy.transfer_usage = Uso: /f money transfer +cmd.economy.transfer_self = No puedes transferir a tu propia faccion. +cmd.economy.transfer_limit_denied = Transferencia denegada: {0} +cmd.economy.transfer_limit_exceeded = Transferencia denegada: limite excedido. +cmd.economy.transfer_failed = Transferencia fallida: {0} +cmd.economy.log_no_permission = No tienes permiso para ver el registro de transacciones. +cmd.economy.log_header = Registro de Transacciones (pagina {0}/{1}) +cmd.economy.log_empty = No se encontraron transacciones. +cmd.economy.money_help_header = Comandos de Tesoreria: +cmd.economy.money_help_balance = /f money balance [faccion] - Ver saldo +cmd.economy.money_help_deposit = /f money deposit - Depositar en la tesoreria +cmd.economy.money_help_withdraw = /f money withdraw - Retirar de la tesoreria +cmd.economy.money_help_transfer = /f money transfer - Transferir entre facciones +cmd.economy.money_help_log = /f money log [pagina] [tipo] - Ver historial de transacciones + +# ========== Proteccion - Frases de Accion ========== +protection.action.generic = No puedes hacer eso +protection.action.build = No puedes construir ni romper bloques +protection.action.interact = No puedes interactuar con eso +protection.action.door = No puedes usar puertas +protection.action.container = No puedes abrir contenedores +protection.action.bench = No puedes usar estaciones de crafteo +protection.action.processing = No puedes usar estaciones de procesamiento +protection.action.seat = No puedes usar asientos +protection.action.light = No puedes encender o apagar luces +protection.action.teleporter = No puedes usar teletransportadores +protection.action.crate = No puedes usar cajas +protection.action.tame = No puedes domesticar criaturas +protection.action.npc = No puedes interactuar con NPCs +protection.action.mount = No puedes montar criaturas +protection.action.pve = No puedes danar criaturas +protection.action.item_drop = No puedes soltar objetos +protection.action.item_pickup = No puedes recoger objetos + +# ========== Proteccion - Razones de Denegacion ========== +protection.denied.safezone = {0} en una Zona Segura. +protection.denied.warzone = {0} en una Zona de Guerra. +protection.denied.enemy_claim = {0} en territorio enemigo. +protection.denied.claimed = {0} en territorio reclamado. +protection.denied.here = {0} aqui. +protection.denied.zone = {0} en esta zona. +protection.denied.faction_perm = {0} aqui. (Permiso de faccion: {1}) +protection.denied.ally_territory = {0} aqui. (Territorio aliado) +protection.denied.error = Error de proteccion - accion bloqueada por seguridad. + +# ========== Proteccion - PvP ========== +protection.pvp.safezone = El PvP esta desactivado en Zonas Seguras. +protection.pvp.same_faction = No puedes atacar a miembros de tu faccion. +protection.pvp.ally = No puedes atacar a aliados. +protection.pvp.spawn_protected = Ese jugador tiene proteccion de aparicion. +protection.pvp.territory_disabled = El PvP esta desactivado en este territorio. +protection.pvp.generic = No puedes atacar a este jugador. + +# ========== Proteccion - Dano a Entidades ========== +protection.mob_damage_disabled = El dano a mobs esta desactivado en esta zona. +protection.pve_damage_disabled = El dano PvE esta desactivado en esta zona. +protection.pve_territory_denied = No puedes danar mobs en este territorio. + +# ========== Proteccion - Etiqueta de Combate ========== +protection.combat_tag_command = No puedes usar ese comando mientras estas en combate. + +# ========== Anuncios del Servidor ========== +# Estos se transmiten a todos los jugadores conectados para eventos significativos de facciones. +# {0}, {1} = valores dinamicos (nombres de facciones, nombres de jugadores) +server_announce.faction_created = {0} ha fundado la faccion {1}! +server_announce.faction_disbanded = La faccion {0} ha sido disuelta! +server_announce.leadership_transfer = {0} ahora es el lider de {1}! +server_announce.overclaim = {0} ha sobrereclamado territorio de {1}! +server_announce.war_declared = {0} ha declarado la guerra a {1}! +server_announce.alliance_formed = {0} y {1} ahora son aliados! +server_announce.alliance_broken = {0} y {1} ya no son aliados! + +# ========== Sistema de Teletransporte ========== +teleport.cooldown_wait = Debes esperar {0} antes de teletransportarte de nuevo. +teleport.warmup_start = Teletransportandote al hogar de la faccion en {0} segundos... +teleport.combat_cancelled = Teletransporte cancelado - estas en combate! +teleport.success_default = Teletransportado al hogar de la faccion! +teleport.no_home = Tu faccion no tiene hogar establecido. +teleport.world_not_found = Mundo no encontrado. +teleport.failed = El teletransporte fallo. +teleport.countdown = Teletransporte en {0} segundos... +teleport.countdown_one = Teletransporte en 1 segundo... +teleport.moved_cancelled = Teletransporte cancelado - te moviste! +teleport.damage_cancelled = Teletransporte cancelado - recibiste dano! +teleport.mount_teleport_blocked = No puedes teletransportarte a esa zona mientras estas montado. +teleport.mount_entry_blocked = No puedes entrar a esta zona mientras estas montado. + +# ========== Visualizacion del Chat ========== +chat.display.public = Publico +chat.display.faction = Faccion +chat.display.ally = Aliado diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang new file mode 100644 index 00000000..80931a67 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang @@ -0,0 +1,263 @@ +# HyperFactions Admin GUI - Traducciones al Espanol +# Formato: clave = valor +# Nota: Las claves se prefijan automaticamente con "hyperfactions_admin." por el I18nModule de Hytale + +# ========== Barra de Navegacion de Admin ========== +nav.dashboard = Panel +nav.actions = Acciones +nav.factions = Facciones +nav.players = Jugadores +nav.economy = Economia +nav.zones = Zonas +nav.config = Configuracion +nav.backups = Respaldos +nav.log = Registro +nav.updates = Actualizaciones +nav.help = Ayuda +nav.version = Version + +# ========== Etiquetas Comunes de Admin ========== +common.faction_not_found = Faccion No Encontrada +common.no_faction = Sin Faccion +common.not_set = Sin establecer +common.on = Activado +common.off = Desactivado +common.enable = Activar +common.disable = Desactivar +common.none_paren = (Ninguno) +common.invalid_faction = Faccion invalida. +common.leader_prefix = Lider: {0} +common.members_suffix = {0} miembros +common.claims_suffix = {0} reclamos +common.factions_suffix = {0} facciones +common.players_suffix = {0} jugadores +common.chunks_suffix = {0} chunks +common.entries_suffix = {0} entradas +common.found_suffix = {0} encontrados +common.power_format = {0}/{1} poder +common.raidable = Vulnerable +common.protected = Protegida +common.no_description = Sin descripcion. +common.officers_more = +{0} mas +common.custom_max = (max personalizado) +common.default_max = (max por defecto) +common.now = Ahora +common.ago_suffix = hace {0} +common.just_now = ahora mismo +common.no_membership_history = Sin historial de membresia + +# ========== Panel de Admin ========== +dashboard.factions_prefix = Facciones: {0} +dashboard.members_prefix = Total Miembros: {0} +dashboard.claims_prefix = Total Reclamos: {0} + +# ========== Acciones de Admin ========== +actions.confirm_reset = Confirmar Reinicio? +actions.confirm_trigger = Confirmar Ejecucion? +actions.kd_reset = K/D reiniciado para {0} jugadores. +actions.kd_reset_failed = No se pudo reiniciar K/D: {0} +actions.upkeep_unavailable = El procesador de mantenimiento no esta disponible. +actions.upkeep_triggered = Cobro de mantenimiento ejecutado. +actions.upkeep_failed = Mantenimiento fallido: {0} + +# ========== Admin Disolver ========== +disband.faction_gone = La faccion ya no existe. +disband.success = La faccion '{0}' ha sido disuelta. +disband.failed = No se pudo disolver: {0} +disband.no_leader = La faccion no tiene lider, no se puede disolver. + +# ========== Admin Desreclamar Todo ========== +unclaim.removed = [Admin] Se eliminaron {0} reclamos de {1}. +unclaim.no_claims = {0} no tenia reclamos para eliminar. + +# ========== Lista de Facciones de Admin ========== +factions.home_not_set = Sin establecer +factions.teleported = Teletransportado al hogar de {0}. +factions.no_home = La faccion no tiene hogar establecido. +factions.world_not_found = Mundo destino no encontrado. + +# ========== Info de Faccion de Admin ========== +info.faction_gone = Esta faccion ya no existe. + +# ========== Miembros de Faccion de Admin ========== +members.sort_role = Rol +members.sort_online = Conectado +members.sort_name = Nombre +members.sort_power = Poder +members.promoted = [Admin] {0} promovido a {1}. +members.demoted = [Admin] {0} degradado a {1}. +members.kicked = [Admin] {0} expulsado de la faccion. + +# ========== Relaciones de Faccion de Admin ========== +relations.allies_header = ALIADOS ({0}) +relations.enemies_header = ENEMIGOS ({0}) +relations.no_allies = Sin aliados. +relations.no_enemies = Sin enemigos. +relations.neutral_count = {0} facciones neutrales +relations.since_today = Desde: hoy +relations.since_one_day = Desde: hace 1 dia +relations.since_days = Desde: hace {0} dias +relations.set_ally = [Admin] Estado de alianza mutua establecido con {0}. +relations.set_enemy = Estado de enemistad mutua establecido con {0}. +relations.set_neutral = [Admin] Estado neutral mutuo establecido con {0}. + +# ========== Ajustes de Faccion de Admin ========== +settings.locked = Este ajuste esta bloqueado por la configuracion del servidor. +settings.perm_toggled = {0} establecido a {1}. +settings.color_changed = Color de faccion establecido a {0}. +settings.recruitment_set = Reclutamiento establecido a {0}. +settings.no_home = [Admin] Esta faccion no tiene hogar establecido. +settings.home_cleared = Hogar de faccion eliminado para {0}. + +# ========== Etiquetas de Ordenamiento ========== +sort.power = Poder +sort.name = Nombre +sort.members = Miembros +sort.balance = Saldo + +# ========== Jugadores de Admin ========== +players.sort_last_online = Ultima Conexion +players.sort_faction = Faccion +players.sort_online = Conectado +players.not_online = El jugador no esta conectado. +players.world_not_found = Mundo destino no encontrado. +players.teleported = [Admin] Teletransportado a {0}. + +# ========== Info de Jugador de Admin ========== +playerinfo.disband_faction = Disolver Faccion +playerinfo.kick_leader = Expulsar Lider +playerinfo.enter_valid_number = Ingresa un numero valido. +playerinfo.enter_valid_positive = Ingresa un numero positivo valido. +playerinfo.faction_gone = La faccion ya no existe. +playerinfo.kd_reset = K/D reiniciado para {0}. +playerinfo.kicked_success = {0} expulsado de {1}. +playerinfo.kicked_leader = Lider {0} expulsado. Liderazgo transferido a {1}. +playerinfo.disbanded_kick = [Admin] Faccion '{0}' disuelta (ultimo miembro expulsado). + +# ========== Economia de Admin ========== +economy.no_data = No hay facciones con datos economicos. +economy.amount_zero = La cantidad no puede ser cero. +economy.enter_amount = Ingresa una cantidad. +economy.invalid_number = Numero invalido: {0} +economy.error = Ocurrio un error. +economy.balance_negative = El saldo no puede ser negativo. +economy.failed = Fallo: {0} +economy.bulk_complete = Ajuste masivo completado: {0} {1} a {2} facciones. +economy.bulk_failures = ({0} fallaron) + +# ========== Zonas de Admin ========== +zones.not_found = Zona no encontrada. +zones.invalid_id = ID de zona invalido. +zones.deleted = Zona {0} eliminada. +zones.delete_failed = No se pudo eliminar la zona: {0} +zones.no_chunks = Sin chunks +zones.chunks_suffix = {0} ({1} chunks) + +# ========== Asistente de Creacion de Zona ========== +wizard.enter_name = Ingresa un nombre para la zona. +wizard.name_too_short = El nombre de zona debe tener al menos {0} caracteres. +wizard.name_too_long = El nombre de zona no puede exceder {0} caracteres. +wizard.name_taken = Ya existe una zona con este nombre. +wizard.radius_range = El radio debe estar entre 1 y {0}. +wizard.create_failed = No se pudo crear la zona: {0} +wizard.created_not_found = Zona creada pero no se pudo encontrar. +wizard.created = {0} '{1}' creada! +wizard.chunk_claimed = Chunk reclamado ({0}, {1}). +wizard.chunk_failed = No se pudo reclamar el chunk actual: {0} +wizard.radius_claimed = {0} chunks reclamados en un radio de {1} de {2}. +wizard.radius_no_claims = No se pudieron reclamar chunks (el area puede estar ocupada). +wizard.no_claims = Zona creada sin reclamos. +wizard.chunks_preview = ~{0} chunks + +# ========== Renombrar Zona ========== +zone_rename.zone_gone = La zona ya no existe. +zone_rename.enter_name = Ingresa un nombre para la zona. +zone_rename.too_short = El nombre de zona debe tener al menos {0} caracter. +zone_rename.too_long = El nombre de zona no puede exceder {0} caracteres. +zone_rename.same_name = Ese ya es el nombre de esta zona. +zone_rename.renamed = [Admin] Zona renombrada de {0} a {1}! +zone_rename.name_taken = Ya existe una zona con ese nombre. +zone_rename.invalid_name = Nombre de zona invalido. +zone_rename.rename_failed = No se pudo renombrar la zona: {0} + +# ========== Cambiar Tipo de Zona ========== +zone_type.zone_gone = La zona ya no existe. +zone_type.changed = [Admin] {0} cambiada de {1} a {2} ({3}). +zone_type.failed = No se pudo cambiar el tipo de zona: {0} + +# ========== Flags de Integracion de Zona ========== +zone_int.zone_not_found = Zona No Encontrada +zone_int.no_plugin = (sin plugin) +zone_int.default = (por defecto) +zone_int.custom = (personalizado) + +# ========== Registro de Actividad ========== +log.all_types = Todos los Tipos +log.no_logs = No hay registros de actividad que coincidan con los filtros. + +# ========== Pagina de Version ========== +version.active = Activo +version.not_found = No Encontrado +version.not_detected = No Detectado +version.not_installed = No Instalado +version.active_version = Activo (v{0}) +version.active_compatible = Activo (compatible) +version.active_claims_only = Activo (solo reclamos) +version.installed_no_perm = Instalado (sin proveedor de permisos) +version.active_provider = Activo ({0}) + +# ========== Pagina Principal de Admin ========== +main.reload_hint = Usa /f reload para recargar la configuracion. +main.unclaim_hint = Usa /f admin unclaim {0} para desreclamar los {1} chunks. + +# ========== Flags/Ajustes de Zona ========== +zflags.invalid_flag = Flag invalido. +zflags.zone_not_found = Zona no encontrada. +zflags.conflict = (conflicto) +zflags.mixin = (mixin) +zflags.reset_int = Flags de integracion reiniciados a valores por defecto. +zflags.reset_all = Todos los flags reiniciados a valores por defecto. +zflags.reset_failed = No se pudieron reiniciar los flags: {0} +zflags.back_to_settings = Volver a Ajustes + +# ========== Propiedades de Zona ========== +zprop.current_custom = Actual: "{0}" (personalizado) +zprop.current_default = Actual: "{0}" (por defecto) +zprop.pvp_disabled = PvP Desactivado +zprop.pvp_enabled = PvP Activado +zprop.name_empty = El nombre no puede estar vacio. +zprop.renamed = Zona renombrada a "{0}". +zprop.name_taken = Ya existe una zona con ese nombre. +zprop.name_invalid = Nombre invalido (maximo 32 caracteres). +zprop.rename_failed = No se pudo renombrar: {0} +zprop.upper_empty = El titulo superior no puede estar vacio. Usa Limpiar para reiniciar. +zprop.upper_set = Titulo superior establecido. +zprop.upper_reset = Titulo superior reiniciado al valor por defecto. +zprop.lower_empty = El titulo inferior no puede estar vacio. Usa Limpiar para reiniciar. +zprop.lower_set = Titulo inferior establecido. +zprop.lower_reset = Titulo inferior reiniciado al valor por defecto. + +# ========== Relaciones Adicionales ========== +relations.failed = Fallo: {0} + +# ========== Miembros Adicionales ========== +members.never = Nunca +members.teleported = [Admin] Teletransportado a {0}. + +# ========== Info de Jugador Adicional ========== +playerinfo.records = {0} registros +playerinfo.joined_date = Ingreso: {0} +playerinfo.current = Actual +playerinfo.left_date = Salio: {0} + +# ========== Mapa de Zona ========== +map.world_warning = ADVERTENCIA: Estas en '{0}' - la zona esta en '{1}' +map.position = Tu Posicion: Chunk ({0}, {1}) +map.zone_gone = La zona ya no existe. +map.claimed = Chunk ({0}, {1}) reclamado para {2}. +map.claim_failed = No se pudo reclamar el chunk: {0} +map.unclaimed = Chunk ({0}, {1}) desreclamado de {2}. +map.unclaim_failed = No se pudo desreclamar el chunk: {0} +map.chunk_belongs = Este chunk pertenece a {0}. +map.chunk_faction = Este chunk esta reclamado por una faccion. +map.chunk_protected = Este chunk esta en una region protegida. diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang new file mode 100644 index 00000000..72379ca9 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang @@ -0,0 +1,441 @@ +# HyperFactions GUI - Traducciones al Espanol +# Formato: clave = valor +# Nota: Las claves se prefijan automaticamente con "hyperfactions_gui." por el I18nModule de Hytale + +# ========== Barra de Navegacion ========== +nav.dashboard = Panel +nav.chat = Chat +nav.members = Miembros +nav.invites = Invitaciones +nav.browser = Explorar +nav.map = Mapa +nav.leaderboard = Clasificacion +nav.relations = Relaciones +nav.treasury = Tesoreria +nav.settings = Ajustes +nav.logs = Registros +nav.help = Ayuda +nav.admin = Admin +nav.create = Crear + +# ========== Nombres de Categorias de Ayuda ========== +help.category.welcome = Bienvenida +help.category.your_faction = Tu Faccion +help.category.power_land = Poder y Territorio +help.category.diplomacy = Diplomacia +help.category.combat = Combate y Seguridad +help.category.economy = Economia +help.category.quick_ref = Referencia Rapida + +# ========== Menu Principal ========== +main_menu.section_my_faction = Mi Faccion +main_menu.section_get_started = Comenzar +main_menu.section_territory = Territorio +main_menu.section_browse = Explorar +main_menu.section_admin = Admin +main_menu.claim_hint = Usa /f claim para reclamar territorio. + +# ========== Pagina de Info de Faccion ========== +faction_info.no_description = Sin descripcion. +faction_info.status_open = Abierta +faction_info.status_invite_only = Solo Invitacion +faction_info.status_raidable = Vulnerable +faction_info.status_protected = Protegida +faction_info.officers_more = +{0} mas + +# ========== Modal de Renombrar ========== +rename.no_permission = No tienes permiso para renombrar la faccion. +rename.enter_name = Ingresa un nombre para la faccion. +rename.too_short = El nombre de faccion debe tener al menos {0} caracteres. +rename.too_long = El nombre de faccion no puede exceder {0} caracteres. +rename.same_name = Ese ya es el nombre de tu faccion. +rename.name_taken = Ya existe una faccion con ese nombre. +rename.success = Faccion renombrada de {0} a {1}! + +# ========== Modal de Descripcion ========== +desc.no_permission = No tienes permiso para editar la descripcion. +desc.display_none = (Ninguna) +desc.cleared = Descripcion de la faccion borrada. +desc.updated = Descripcion de la faccion actualizada! + +# ========== Modal de Etiqueta ========== +tag.no_permission = No tienes permiso para editar la etiqueta. +tag.display_none = (Ninguna) +tag.cleared = Etiqueta de la faccion borrada. +tag.too_short = La etiqueta debe tener al menos {0} caracter. +tag.too_long = La etiqueta no puede exceder {0} caracteres. +tag.invalid_format = La etiqueta solo puede contener letras y numeros. +tag.same_tag = Esa ya es la etiqueta de tu faccion. +tag.tag_taken = Ya existe una faccion con esa etiqueta. +tag.success = Etiqueta de faccion establecida a [{0}]! + +# ========== Pagina del Panel ========== +dashboard.faction_gone = Tu faccion ya no existe. +dashboard.available = {0} disponibles +dashboard.at_risk = En riesgo! +dashboard.online_count = {0} conectados +dashboard.status_invite = Invitacion +dashboard.in_grace = EN GRACIA +dashboard.billable_chunks = {0} chunks facturables +dashboard.btn_home = Hogar +dashboard.btn_set_home = Fijar Hogar +dashboard.btn_claim = Reclamar +dashboard.chat_prefix = Chat: {0} +dashboard.btn_leave = Salir +dashboard.no_activity = Sin actividad reciente. +dashboard.time_now = ahora +dashboard.time_minutes = hace {0}m +dashboard.time_hours = hace {0}h +dashboard.time_days = hace {0}d +dashboard.no_home_hint = Tu faccion no tiene hogar. Pide a un oficial que lo establezca. +dashboard.chat_mode_set = Modo de chat: {0} +dashboard.claim_success = Chunk reclamado en ({0}, {1}) + +# ========== Pagina Principal de Faccion ========== +main.no_faction = Sin Faccion +main.joined = Te uniste a la faccion! +main.join_failed = No se pudo unir a la faccion: {0} +main.invite_declined = Invitacion rechazada. +main.cooldown = Teletransporte en enfriamiento! {0}s restantes. +main.world_not_found = No se puede teletransportar - mundo no encontrado. +main.leave_failed = No se pudo salir: {0} + +# ========== Etiquetas Compartidas de la Interfaz ========== +common.faction_count = {0} facciones +common.leader_label = Lider: {0} +common.sort_power = Poder +common.sort_members = Miembros +common.page_format = {0}/{1} +common.own_faction = (Tu) + +# ========== Pagina de Miembros ========== +members.count = {0} miembros +members.sort_role = Rol +members.sort_last_online = Ultima Conexion +members.just_now = ahora mismo +members.ago = hace {0} +members.never = Nunca +members.member_not_found = Miembro no encontrado. +members.promoted = {0} promovido a {1}. +members.promote_failed = No se pudo promover: {0} +members.demoted = {0} degradado a {1}. +members.demote_failed = No se pudo degradar: {0} +members.kicked = {0} expulsado de la faccion. +members.kick_failed = No se pudo expulsar: {0} + +# ========== Pagina del Explorador ========== +browser.sort_name = Nombre +browser.invalid_faction = Faccion invalida. + +# ========== Pagina de Clasificacion ========== +leaderboard.sort_kd = K/D +leaderboard.sort_territory = Territorio +leaderboard.sort_balance = Saldo + +# ========== Pagina de Info de Jugador ========== +playerinfo.now = Ahora +playerinfo.history_count = {0} registros +playerinfo.joined_label = Ingreso: {0} +playerinfo.current = Actual +playerinfo.left_label = Salio: {0} +playerinfo.no_history = Sin historial de membresia +playerinfo.faction_gone = La faccion ya no existe. +playerinfo.reason_active = ACTIVO +playerinfo.reason_left = SALIO +playerinfo.reason_kicked = EXPULSADO +playerinfo.reason_disbanded = DISUELTA + +# ========== Pagina de Relaciones ========== +relations.relation_count = {0} relaciones +relations.request_count = {0} solicitudes +relations.type_ally = Aliado +relations.type_enemy = Enemigo +relations.type_incoming = Entrante +relations.type_outgoing = Saliente +relations.incoming_request = Solicitud entrante +relations.outgoing_request = Solicitud saliente +relations.empty_relations = Sin relaciones aun. +relations.empty_relations_hint = Sin relaciones aun. Haz clic en + ESTABLECER RELACION para agregar aliados o enemigos. +relations.empty_pending = No hay solicitudes de alianza pendientes. +relations.today = Hoy +relations.one_day_ago = Hace 1 dia +relations.days_ago = Hace {0} dias +relations.now_neutral = Ahora neutral con {0}. +relations.now_enemies = Ahora enemigos con {0}! +relations.request_sent = Solicitud de alianza enviada a {0}. +relations.now_allied = Ahora aliados con {0}! +relations.request_declined = Solicitud de alianza de {0} rechazada. +relations.request_cancelled = Solicitud de alianza a {0} cancelada. +relations.failed = Fallo: {0} +relations.search_hint = Busca una faccion para establecer relacion +relations.no_results = No se encontraron facciones con '{0}' +relations.power_display = {0} poder +relations.member_count = {0} miembros + +# ========== Pagina de Ajustes ========== +settings.officers_only = Solo oficiales y lideres pueden cambiar los ajustes de la faccion. +settings.display_none = (Ninguna) +settings.home_not_set = Sin establecer +settings.no_permission = No tienes permiso para cambiar los ajustes. +settings.only_leader_disband = Solo el lider puede disolver la faccion. +settings.perm_locked = Este ajuste esta bloqueado por el servidor. +settings.no_perm_edit = No tienes permiso para editar los permisos de territorio. +settings.only_leader_officers = Solo el lider puede cambiar el acceso de oficiales. +settings.pvp_enabled = Activado +settings.pvp_disabled = Desactivado +settings.not_in_territory = Debes estar en el territorio de tu faccion para establecer el hogar. +settings.home_set = Hogar de la faccion establecido en tu ubicacion actual! +settings.recruitment_set = Reclutamiento establecido a {0}. +settings.home_no_set = Tu faccion no tiene un hogar establecido. +settings.home_deleted = Hogar de la faccion eliminado! + +# ========== Pagina de Modulos ========== +modules.treasury_name = Tesoreria +modules.treasury_desc = Banco y sistema economico de la faccion +modules.raids_name = Raids +modules.raids_desc = Batallas de facciones programadas +modules.levels_name = Niveles +modules.levels_desc = Progresion y XP de faccion +modules.war_name = Guerra +modules.war_desc = Declaraciones formales de guerra +modules.coming_soon = Proximamente +modules.active = Activo +modules.view_treasury = Ver Tesoreria +modules.unavailable = No disponible +modules.no_economy = No se detecto plugin de economia +modules.disabled = Desactivado +modules.economy_not_available = Las funciones de economia no estan disponibles en este servidor + +# ========== Pagina de Tesoreria ========== +treasury.wallet_label = Tu billetera: {0} +treasury.treasury_label = Saldo de tesoreria: {0} +treasury.chunks_detail = {0} gratis + {1} chunks facturables +treasury.cost_label = Costo: {0} +treasury.pending = Pendiente +treasury.auto_pay_on = Pago automatico: ACTIVADO +treasury.auto_pay_off = Pago automatico: DESACTIVADO +treasury.runway_90_plus = 90+ dias +treasury.runway_days = {0} dias +treasury.runway_day = {0} dia +treasury.runway_less_day = < 1 dia +treasury.runway_no_funds = Sin fondos +treasury.grace_expires = La gracia expira en: {0} +treasury.missed_payments = Pagos perdidos: {0} +treasury.pay_to_clear = Paga {0} para limpiar la gracia +treasury.system = Sistema +treasury.type_deposit = Deposito +treasury.type_withdrawal = Retiro +treasury.type_transfer_in = Transferencia Entrante +treasury.type_transfer_out = Transferencia Saliente +treasury.type_player_transfer = Transferencia de Jugador +treasury.type_upkeep = Mantenimiento +treasury.type_tax = Recaudacion de Impuestos +treasury.type_war_cost = Costo de Guerra +treasury.type_raid_cost = Costo de Raid +treasury.type_spoils = Botin +treasury.type_admin = Ajuste de Admin +treasury.deposit_title = Depositar en la Tesoreria +treasury.withdraw_title = Retirar de la Tesoreria +treasury.fee_label = Comision ({0}%) +treasury.confirm_deposit = Confirmar Deposito +treasury.confirm_withdrawal = Confirmar Retiro +treasury.from_wallet = {0} de la billetera +treasury.to_wallet = {0} a la billetera +treasury.enter_valid_amount = Ingresa una cantidad positiva valida. +treasury.insufficient_wallet = Fondos insuficientes en la billetera. Necesitas {0}, tienes {1}. +treasury.wallet_withdraw_failed = No se pudo retirar de tu billetera. +treasury.deposit_failed_returned = No se pudo depositar. Dinero devuelto. +treasury.deposited = Depositaste {0} en la tesoreria. +treasury.deposited_fee = Depositaste {0} en la tesoreria. (comision: {1}) +treasury.no_withdraw_permission = No tienes permiso para retirar. +treasury.withdraw_denied = Retiro denegado: {0} +treasury.insufficient_treasury = Fondos insuficientes en la tesoreria. +treasury.withdraw_limit = Limite de retiro excedido. +treasury.withdraw_failed = Retiro fallido: {0} +treasury.wallet_deposit_warn = Advertencia: No se pudo depositar en tu billetera. Contacta a un admin. +treasury.withdrew = Retiraste {0} de la tesoreria. +treasury.withdrew_fee = Retiraste {0} de la tesoreria. (comision: {1}, recibido: {2}) +treasury.search_hint = Buscar jugador o faccion +treasury.no_results = Sin resultados para '{0}' +treasury.tag_player = [Jugador] +treasury.tag_faction = [Faccion] +treasury.source_online = Conectado +treasury.source_offline = Desconectado +treasury.source_player_db = Jugador de Hytale +treasury.no_transfer_permission = No tienes permiso para transferir. +treasury.transfer_denied = Transferencia denegada: {0} +treasury.invalid_target_faction = Faccion de destino invalida. +treasury.target_faction_gone = La faccion de destino ya no existe. +treasury.transfer_failed = Transferencia fallida: {0} +treasury.transfer_failed_returned = Transferencia fallida. Fondos devueltos. +treasury.transferred = Transferiste {0} a {1}. +treasury.invalid_target_player = Jugador de destino invalido. +treasury.player_transfer_failed = No se pudo depositar en la billetera del jugador. Transferencia revertida. +treasury.leader_only_perms = Solo el lider puede cambiar los permisos de tesoreria. +treasury.leader_only_upkeep = Solo el lider puede cambiar los ajustes de mantenimiento. +treasury.invalid_limit = Numero invalido en los campos de limite. Usa 0 para ilimitado. + +# ========== Paginas de Confirmacion ========== +confirm.disband_not_leader = Solo el lider puede disolver la faccion. +confirm.disbanded = La faccion '{0}' ha sido disuelta. +confirm.disband_failed = No se pudo disolver la faccion. +confirm.succession_title = El liderazgo se transferira a: +confirm.no_members_warning = ADVERTENCIA: No hay otros miembros! +confirm.will_disband = Salir disolvera la faccion permanentemente. +confirm.not_in_faction = No estas en esta faccion. +confirm.not_leader_anymore = Ya no eres el lider. +confirm.no_successor = No hay sucesor disponible. Usa disolver en su lugar. +confirm.transfer_failed = No se pudo transferir el liderazgo: {0} +confirm.leader_left = Liderazgo transferido a {0}. Has salido de {1}. +confirm.leave_failed = No se pudo salir de la faccion: {0} +confirm.leader_cannot_leave = Los lideres no pueden salir. Transfiere el liderazgo o disuelve la faccion. +confirm.left_faction = Has salido de {0}. +confirm.faction_gone = La faccion ya no existe. +confirm.not_leader_transfer = Solo el lider puede transferir el liderazgo. +confirm.leadership_transferred = Liderazgo transferido a {0}. + +# ========== Pagina del Visor de Registros ========== +logs.title = {0} - Registros de Actividad +logs.entry_count = {0} entradas +logs.all_types = Todos los Tipos +logs.no_logs_type = No hay registros de este tipo. +logs.no_logs = No hay registros de actividad aun. + +# ========== Pagina de Chat ========== +chat.placeholder = Escribe un mensaje... +chat.no_messages = No hay mensajes aun. +chat.no_ally_permission = No tienes permiso para el chat de aliados. +chat.no_permission = Sin permiso. +chat.faction_gone = Tu faccion ya no existe. +chat.time_now = ahora +chat.time_minutes = {0}m +chat.time_hours = {0}h + +# ========== Pagina de Invitaciones ========== +invites.invite_count = {0} invitaciones +invites.request_count = {0} solicitudes +invites.invited_by = Invitado por: {0} +invites.no_message = Sin mensaje +invites.expires = Expira: {0} +invites.type_outgoing = Saliente +invites.type_request = Solicitud +invites.invited_by_label = Invitado por: +invites.empty_outgoing = Sin invitaciones salientes. Usa /f invite para invitar a alguien. +invites.empty_requests = Sin solicitudes de ingreso. Los jugadores pueden solicitar unirse con /f request. +invites.invalid_player = Jugador invalido. +invites.cancelled_invite = Invitacion a {0} cancelada. +invites.player_joined = {0} se ha unido a la faccion! +invites.faction_full = La faccion esta llena. No se puede aceptar la solicitud. +invites.add_failed = No se pudo agregar al jugador a la faccion. +invites.request_expired = Solicitud no encontrada o expirada. +invites.request_declined = Solicitud de ingreso de {0} rechazada. +invites.time_seconds = {0}s +invites.time_minutes = {0}m +invites.time_hours = {0}h + +# ========== Pagina del Mapa ========== +map.position = Tu Posicion: Chunk ({0}, {1}) +map.legend_protected = Protegido +map.claim_stats = Reclamos: {0}/{1} ({2} Disponibles) +map.overclaimed = SOBRERECLAMADO por {0}! +map.power_display = Poder: {0}/{1} +map.join_to_claim = Unete a una faccion para reclamar +map.claim_success = Chunk reclamado en ({0}, {1})! +map.claim_not_in_faction = Debes estar en una faccion para reclamar territorio. +map.claim_not_officer = Solo oficiales y lideres pueden reclamar territorio. +map.claim_already_yours = Ya posees este chunk. +map.claim_already_claimed = Este chunk ya esta reclamado por otra faccion. +map.claim_not_adjacent = Solo puedes reclamar chunks adyacentes a tu territorio. +map.claim_max = Has alcanzado tu limite maximo de reclamos. +map.claim_world_not_allowed = No se permite reclamar en este mundo. +map.claim_orbisguard = Esta area esta protegida por OrbisGuard. +map.claim_failed = No se pudo reclamar el chunk. +map.unclaim_success = Chunk desreclamado en ({0}, {1}). +map.unclaim_not_in_faction = Debes estar en una faccion. +map.unclaim_not_officer = Solo oficiales y lideres pueden desreclamar territorio. +map.unclaim_not_claimed = Este chunk no esta reclamado. +map.unclaim_not_yours = Este chunk pertenece a otra faccion. +map.unclaim_home = No puedes desreclamar el chunk que contiene el hogar de la faccion. +map.unclaim_failed = No se pudo desreclamar el chunk. +map.overclaim_success = Chunk enemigo sobrereclamado en ({0}, {1})! +map.overclaim_not_in_faction = Debes estar en una faccion. +map.overclaim_not_officer = Solo oficiales y lideres pueden sobrereclamar territorio. +map.overclaim_already_yours = Ya posees este chunk. +map.overclaim_ally = No puedes sobrereclamar territorio aliado. +map.overclaim_has_power = Esta faccion tiene suficiente poder para defender su territorio. +map.overclaim_max = Has alcanzado tu limite maximo de reclamos. +map.overclaim_failed = No se pudo sobrereclamar el chunk. +# ========== Pagina de Crear Faccion ========== +create.preview_name = Nombre de Tu Faccion +create.leader_prefix = Lider: {0} +create.enter_name = Ingresa un nombre para la faccion. +create.name_too_short = El nombre de faccion debe tener al menos {0} caracteres. +create.name_too_long = El nombre de faccion no puede exceder {0} caracteres. +create.name_taken = Ya existe una faccion con este nombre. +create.tag_length = La etiqueta de faccion debe tener entre {0} y {1} caracteres. +create.tag_format = La etiqueta de faccion solo puede contener letras y numeros. +create.desc_too_long = La descripcion no puede exceder {0} caracteres. +create.created = Faccion {0} creada exitosamente! +create.created_no_dashboard = Faccion creada pero no se pudo abrir el panel. +create.invalid_name = Nombre de faccion invalido. +create.create_failed = No se pudo crear la faccion. + +# ========== Paginas de Nuevo Jugador ========== +newplayer.pending_count = {0} pendientes +newplayer.received_header = INVITACIONES RECIBIDAS ({0}) +newplayer.requests_header = TUS SOLICITUDES ({0}) +newplayer.no_invites = Sin invitaciones. Explora facciones para encontrar una! +newplayer.no_requests = Sin solicitudes pendientes. +newplayer.invited_by = Invitado por: {0} +newplayer.member_count = {0} miembros +newplayer.power_count = {0} poder +newplayer.claim_count = {0} reclamos +newplayer.awaiting_review = Esperando revision +newplayer.expires_in = Expira en {0}h +newplayer.time_just_now = ahora mismo +newplayer.time_minutes = hace {0} min +newplayer.time_hours = hace {0}h +newplayer.time_days = hace {0}d +newplayer.invalid_faction = Faccion invalida. +newplayer.invite_expired = Esta invitacion ha expirado o fue revocada. +newplayer.faction_gone = La faccion ya no existe. +newplayer.joined = Te uniste a {0}! +newplayer.faction_full = Esta faccion esta llena. +newplayer.join_failed = No se pudo unir a la faccion. +newplayer.invite_declined = Invitacion rechazada. +newplayer.request_cancelled = Solicitud para unirte a {0} cancelada. +newplayer.faction_count = {0} facciones +newplayer.browse_subtitle = Encuentra tu nuevo hogar! +newplayer.sort_power = Poder +newplayer.sort_name = Nombre +newplayer.sort_members = Miembros +newplayer.btn_accept = Aceptar +newplayer.btn_pending = Pendiente +newplayer.btn_join = Unirse +newplayer.btn_request = Solicitar +newplayer.invite_only_msg = Esta faccion es solo por invitacion. +newplayer.welcome_hint = Bienvenido! Usa /f para abrir el menu de facciones. +newplayer.faction_open_hint = Esta faccion esta abierta! Haz clic en UNIRSE. +newplayer.already_requested = Ya tienes una solicitud pendiente para esta faccion. +newplayer.has_invite_hint = Tienes una invitacion de esta faccion! Haz clic en ACEPTAR. +newplayer.request_sent = Solicitud de ingreso enviada a {0}! +newplayer.officer_review = Un oficial revisara tu solicitud. +newplayer.map_hint = Solo Vista - Unete a una faccion para reclamar territorio! + +# Ajustes de Jugador +nav.player_settings = Ajustes +player_settings.title = Ajustes del Jugador +player_settings.language_section = Idioma +player_settings.auto_detect = Detectar automaticamente del cliente +player_settings.auto_detect_desc = Usa la configuracion de idioma de tu cliente de juego +player_settings.language_label = Idioma +player_settings.notifications_section = Notificaciones +player_settings.territory_alerts = Alertas de Territorio +player_settings.territory_alerts_desc = Mostrar notificaciones al entrar/salir de territorios +player_settings.death_announcements = Anuncios de Muerte +player_settings.death_announcements_desc = Recibir anuncios de ubicacion de muerte de miembros de la faccion +player_settings.power_notifications = Cambios de Poder +player_settings.power_notifications_desc = Mostrar mensajes cuando tu poder cambia +player_settings.language_changed = Idioma cambiado a {0} +player_settings.pref_enabled = {0} activado +player_settings.pref_disabled = {0} desactivado diff --git a/src/main/resources/Server/Languages/fallback.lang b/src/main/resources/Server/Languages/fallback.lang new file mode 100644 index 00000000..28fe8461 --- /dev/null +++ b/src/main/resources/Server/Languages/fallback.lang @@ -0,0 +1,36 @@ +# HyperFactions — Fallback Language Configuration +# +# Hytale's I18nModule automatically falls back to en-US when a translation key +# is missing from the player's locale. This means: +# +# 1. If a locale directory exists (e.g., fr-FR/) but a specific key is missing +# from its .lang file, the en-US value is used automatically. +# +# 2. If a locale directory does not exist at all, ALL keys fall back to en-US. +# +# 3. Partially translated locales work fine — translated keys use the locale's +# value, untranslated keys use en-US. +# +# No explicit mapping is needed in this file. It exists as documentation for +# translators and maintainers. +# +# Supported locales (directories under Server/Languages/): +# en-US — English (United States) [base language, complete] +# de-DE — German (Germany) [stub — untranslated] +# es-ES — Spanish (Spain) [stub — untranslated] +# fr-FR — French (France) [stub — untranslated] +# ja-JP — Japanese (Japan) [stub — untranslated] +# pt-BR — Portuguese (Brazil) [stub — untranslated] +# ru-RU — Russian (Russia) [stub — untranslated] +# tr-TR — Turkish (Turkey) [stub — untranslated] +# zh-CN — Chinese Simplified (China) [stub — untranslated] +# +# To add a new locale: +# ./scripts/new-translation.sh +# (or scripts\new-translation.bat on Windows) +# +# Translation guidelines: +# - Keep all keys exactly as they are (left side of =) +# - Keep {0}, {1}, etc. placeholders in the translated text +# - Do not translate color codes or formatting tokens +# - Test in-game by switching language in /f settings diff --git a/src/main/resources/Server/Languages/fr-FR/hyperfactions.lang b/src/main/resources/Server/Languages/fr-FR/hyperfactions.lang new file mode 100644 index 00000000..32931698 --- /dev/null +++ b/src/main/resources/Server/Languages/fr-FR/hyperfactions.lang @@ -0,0 +1,452 @@ +# Language: French (fr-FR) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with French translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions - English Translations +# Format: key = value (or key = "quoted value") +# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule +# Placeholders: {0}, {1}, etc. + +# ========== Common ========== +common.no_permission = You don't have permission to do that. +common.not_in_faction = You are not in a faction. +common.already_in_faction = You are already in a faction. +common.player_not_found = Player not found. +common.faction_not_found = Faction not found. +common.player_not_online = That player is not online. +common.must_be_leader = Only the faction leader can do that. +common.must_be_officer = You must be an Officer or Leader to do that. +common.combat_tagged = You can't do that while combat tagged. +common.cancel = Cancel +common.confirm = Confirm +common.save = Save +common.close = Close +common.yes = Yes +common.no = No +common.loading = Loading... +common.online = Online +common.offline = Offline +common.enabled = Enabled +common.disabled = Disabled +common.none = None +common.page = Page {0} of {1} +common.unknown = Unknown +common.error_generic = Something went wrong. Please try again. +common.gui_fallback = Could not access GUI. Use /f help for commands. +common.admin_prefix = [Admin] +common.location_error = Could not determine your location. +common.world_error = Could not determine your world. +common.invalid_id = Invalid faction ID. +common.na = N/A + +# ========== Commands - Create ========== +cmd.create.no_permission = You don't have permission to create factions. +cmd.create.usage = Usage: /f create +cmd.create.success = Faction '{0}' created! +cmd.create.already_in_named = You are already in {0}. +cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. +cmd.create.name_taken = That faction name is already taken. +cmd.create.name_too_short = Faction name is too short. +cmd.create.name_too_long = Faction name is too long. +cmd.create.failed = Failed to create faction. + +# ========== Commands - Disband ========== +cmd.disband.no_permission = You don't have permission to disband factions. +cmd.disband.not_leader = Only the faction leader can disband. +cmd.disband.confirm_prompt = Are you sure you want to disband your faction? +cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. +cmd.disband.success = Your faction has been disbanded. +cmd.disband.failed = Failed to disband faction. +cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. + +# ========== Commands - Rename ========== +cmd.rename.no_permission = You don't have permission. +cmd.rename.not_leader = Only the leader can rename the faction. +cmd.rename.usage = Usage: /f rename +cmd.rename.too_short = Name is too short (min {0} chars). +cmd.rename.too_long = Name is too long (max {0} chars). +cmd.rename.name_taken = That name is already taken. +cmd.rename.success = Faction renamed to {0}! +cmd.rename.broadcast = {0} renamed the faction to {1} + +# ========== Commands - Description ========== +cmd.desc.no_permission = You don't have permission. +cmd.desc.not_officer = You must be an officer to set the description. +cmd.desc.set = Faction description set! +cmd.desc.cleared = Faction description cleared. + +# ========== Commands - Open / Close ========== +cmd.open.no_permission = You don't have permission. +cmd.open.not_leader = Only the leader can change this setting. +cmd.open.already_open = Your faction is already open. +cmd.open.success = Your faction is now open! Anyone can join with /f join. +cmd.open.broadcast = {0} opened the faction to public joining. +cmd.close.no_permission = You don't have permission. +cmd.close.not_leader = Only the leader can change this setting. +cmd.close.already_closed = Your faction is already closed. +cmd.close.success = Your faction is now invite-only. +cmd.close.broadcast = {0} closed the faction to invite-only. + +# ========== Commands - Color ========== +cmd.color.no_permission = You don't have permission. +cmd.color.not_officer = You must be an officer to change the color. +cmd.color.colors_disabled = Faction colors are disabled. +cmd.color.usage = Usage: /f color +cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex +cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. +cmd.color.success = Faction color updated! + +# ========== Commands - Claim ========== +cmd.claim.no_permission = You don't have permission to claim territory. +cmd.claim.already_yours = Your faction already owns this chunk. +cmd.claim.cannot_claim_ally = You cannot claim ally territory. +cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. +cmd.claim.success = Claimed chunk at {0}, {1}! +cmd.claim.not_officer = You must be an officer to claim land. +cmd.claim.already_claimed = This chunk is already claimed. +cmd.claim.max_claims = Your faction has reached max claims. Get more power! +cmd.claim.not_adjacent = You must claim adjacent to existing territory. +cmd.claim.world_not_allowed = Claiming is not allowed in this world. +cmd.claim.orbisguard = This area is protected by OrbisGuard. +cmd.claim.zone_protected = This chunk is in a safezone or warzone. +cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. +cmd.claim.failed = Failed to claim chunk. + +# ========== Commands - Invite ========== +cmd.invite.no_permission = You don't have permission to invite players. +cmd.invite.not_officer = You must be an officer to invite players. +cmd.invite.usage = Usage: /f invite +cmd.invite.player_not_found = Player '{0}' not found or offline. +cmd.invite.target_in_faction = That player is already in a faction. +cmd.invite.sent = Invited {0} to your faction. +cmd.invite.received = You have been invited to join {0}! +cmd.invite.accept_hint = Type /f accept {0} to join. + +# ========== Commands - Accept / Join ========== +cmd.join.no_permission = You don't have permission to join factions. +cmd.join.already_in_named = You are already in {0}. +cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.join.no_invites = You have no pending invites. +cmd.join.faction_not_found = Faction '{0}' not found. +cmd.join.not_invited = You have no invite from that faction. +cmd.join.faction_gone = That faction no longer exists. +cmd.join.success = You have joined {0}! +cmd.join.broadcast = {0} has joined the faction! +cmd.join.faction_full = That faction is full. +cmd.join.failed = Failed to join faction. + +# ========== Commands - Kick ========== +cmd.kick.no_permission = You don't have permission to kick members. +cmd.kick.usage = Usage: /f kick +cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. +cmd.kick.success = Kicked {0} from the faction. +cmd.kick.broadcast = {0} was kicked from the faction. +cmd.kick.kicked = You have been kicked from the faction. +cmd.kick.cannot_kick_higher = You don't have permission to kick that player. +cmd.kick.cannot_kick_leader = You cannot kick the faction leader. +cmd.kick.failed = Failed to kick player. + +# ========== Commands - Leave ========== +cmd.leave.no_permission = You don't have permission to leave factions. +cmd.leave.confirm_prompt = Are you sure you want to leave your faction? +cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. +cmd.leave.success = You have left your faction. +cmd.leave.broadcast = {0} has left the faction. +cmd.leave.failed = Failed to leave faction. +cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. + +# ========== Commands - Promote / Demote / Transfer ========== +cmd.rank.promote_no_permission = You don't have permission to promote members. +cmd.rank.promote_usage = Usage: /f promote +cmd.rank.promoted = Promoted {0} to {1}! +cmd.rank.promote_broadcast = {0} was promoted to {1}! +cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. +cmd.rank.promote_failed = Failed to promote player. +cmd.rank.demote_no_permission = You don't have permission to demote members. +cmd.rank.demote_usage = Usage: /f demote +cmd.rank.demoted = Demoted {0} to {1}. +cmd.rank.demote_broadcast = {0} was demoted to {1}. +cmd.rank.already_lowest = That player is already a Member. +cmd.rank.demote_failed = Failed to demote player. +cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. +cmd.rank.transfer_usage = Usage: /f transfer +cmd.rank.player_not_in_faction = Player not found in your faction. +cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? +cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. +cmd.rank.transferred = Transferred leadership to {0}! +cmd.rank.transfer_broadcast = {0} is now the faction leader! +cmd.rank.transfer_failed = Failed to transfer leadership. +cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. + +# ========== Commands - Unclaim ========== +cmd.unclaim.no_permission = You don't have permission to unclaim territory. +cmd.unclaim.success = Unclaimed chunk at {0}, {1}. +cmd.unclaim.not_officer = You must be an officer to unclaim land. +cmd.unclaim.chunk_not_claimed = This chunk is not claimed. +cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. +cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. +cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. +cmd.unclaim.failed = Failed to unclaim chunk. + +# ========== Commands - Overclaim ========== +cmd.overclaim.no_permission = You don't have permission to overclaim territory. +cmd.overclaim.success = Overclaimed enemy territory! +cmd.overclaim.not_officer = You must be an officer to overclaim. +cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. +cmd.overclaim.own_chunk = Your faction already owns this chunk. +cmd.overclaim.ally = You cannot overclaim ally territory. +cmd.overclaim.target_has_power = This faction still has enough power. +cmd.overclaim.failed = Failed to overclaim. + +# ========== Commands - Stuck ========== +cmd.stuck.no_permission = You don't have permission to use /f stuck. +cmd.stuck.not_stuck = You're not stuck - this is wilderness. +cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! +cmd.stuck.no_safe = Could not find a safe location. +cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! + +# ========== Commands - Home ========== +cmd.home.no_permission = You don't have permission to teleport to faction home. +cmd.home.no_home = Your faction has no home set. +cmd.home.combat_tagged = You cannot teleport while in combat! +cmd.home.teleported = Teleported to faction home! + +# ========== Commands - SetHome ========== +cmd.sethome.no_permission = You don't have permission to set faction home. +cmd.sethome.world_not_allowed = Cannot set home in this world. +cmd.sethome.not_in_territory = You can only set home in your faction's territory. +cmd.sethome.set = Faction home set! +cmd.sethome.broadcast = {0} set the faction home. +cmd.sethome.not_officer = You must be an officer to set the home. +cmd.sethome.failed = Failed to set home. + +# ========== Commands - DelHome ========== +cmd.delhome.no_permission = You don't have permission to delete faction home. +cmd.delhome.no_home = Your faction does not have a home set. +cmd.delhome.deleted = Faction home deleted! +cmd.delhome.broadcast = {0} deleted the faction home. +cmd.delhome.not_officer = You must be an officer to delete the home. +cmd.delhome.failed = Failed to delete home. + +# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== +cmd.relation.ally_no_permission = You don't have permission to manage alliances. +cmd.relation.ally_usage = Usage: /f ally +cmd.relation.ally_sent = Ally request sent to {0}! +cmd.relation.ally_formed = You are now allies with {0}! +cmd.relation.already_ally = You are already allied with that faction. +cmd.relation.ally_failed = Failed to send ally request. +cmd.relation.enemy_no_permission = You don't have permission to declare enemies. +cmd.relation.enemy_usage = Usage: /f enemy +cmd.relation.enemy_declared = {0} is now your enemy! +cmd.relation.already_enemy = You are already enemies with that faction. +cmd.relation.max_enemies = You have reached the maximum number of enemies. +cmd.relation.enemy_failed = Failed to set enemy. +cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. +cmd.relation.neutral_usage = Usage: /f neutral +cmd.relation.neutral_set = Your faction is now neutral with {0}. +cmd.relation.already_neutral = You are already neutral with that faction. +cmd.relation.neutral_failed = Failed to set neutral. +cmd.relation.cannot_self = You cannot ally with yourself. +cmd.relation.max_allies = You have reached the maximum number of allies. +cmd.relation.view_no_permission = You don't have permission to view relations. +cmd.relation.header = === Faction Relations === +cmd.relation.allies_count = Allies ({0}): +cmd.relation.enemies_count = Enemies ({0}): +cmd.relation.list_entry = - {0} + +# ========== Commands - Chat ========== +cmd.chat.usage = Usage: /f c [f|a|off] +cmd.chat.no_permission = You don't have permission for that chat mode. +cmd.chat.mode_set = Chat mode set to {0} + +# ========== Commands - Invites ========== +cmd.invites.not_officer = You must be an officer to manage invites. +cmd.invites.header = === Faction Invites === +cmd.invites.no_pending = No pending invites or requests. +cmd.invites.outgoing = Outgoing Invites: +cmd.invites.outgoing_entry = {0} (invited by {1}) +cmd.invites.requests = Join Requests: +cmd.invites.request_entry = {0}{1} +cmd.invites.your_invites_header = === Your Invites === +cmd.invites.no_invites = You have no pending invites. +cmd.invites.invite_entry = {0} - Use /f accept {1} + +# ========== Commands - Request ========== +cmd.request.no_permission = You don't have permission to request faction membership. +cmd.request.already_in_named = You are already in {0}. +cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.request.usage = Usage: /f request [message] +cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. +cmd.request.already_requested = You already have a pending request to that faction. +cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. +cmd.request.sent = Sent join request to {0}! +cmd.request.your_message = Your message: "{0}" +cmd.request.officer_review = An officer will review your request. +cmd.request.officer_notify = {0} has requested to join your faction! +cmd.request.officer_review_hint = Use /f gui > Invites to review. + +# ========== Commands - Info ========== +cmd.info.faction_header = === {0} === +cmd.info.player_header = === {0} === +cmd.info.no_permission = You don't have permission to view faction info. +cmd.info.faction_not_found = Faction '{0}' not found. +cmd.info.not_in_faction_hint = You are not in a faction. Use /f info +cmd.info.leader = Leader: {0} +cmd.info.members = Members: {0}/{1} +cmd.info.power = Power: {0} +cmd.info.claims = Claims: {0} +cmd.info.raidable = RAIDABLE! +cmd.info.allies = Allies: {0} +cmd.info.enemies = Enemies: {0} +cmd.info.they_consider = They consider you: {0} +cmd.info.you_consider = You consider them: {0} +cmd.info.members_no_permission = You don't have permission to view faction members. +cmd.info.members_header = === {0} Members ({1}) === +cmd.info.member_online = [Online] +cmd.info.list_no_permission = You don't have permission to view faction list. +cmd.info.list_empty = There are no factions. +cmd.info.list_header = === Factions ({0}) === +cmd.info.list_entry = {0} - {1} members, {2} power +cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] +cmd.info.help_no_permission = You don't have permission to view help. +cmd.info.who_no_permission = You don't have permission to view player info. +cmd.info.who_faction = Faction: {0} +cmd.info.who_role = Role: {0} +cmd.info.who_joined = Joined: {0} +cmd.info.who_faction_none = Faction: None +cmd.info.who_power = Power: {0} +cmd.info.who_status = Status: {0} +cmd.info.who_last_seen = Last seen: {0} +cmd.info.map_no_permission = You don't have permission to view the map. +cmd.info.map_header = === Territory Map === +cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild +cmd.info.map_gui_hint = Use /f gui for interactive map + +# ========== Commands - Power ========== +cmd.power.personal = Personal Power: {0}/{1} +cmd.power.faction = Faction Power: {0}/{1} +cmd.power.death_loss = Death Loss: {0} +cmd.power.regen = Regen Rate: {0}/hr +cmd.power.no_permission = You don't have permission to view power info. +cmd.power.header = {0}'s Power: +cmd.power.current = Current: {0} + +# ========== Commands - Economy ========== +cmd.economy.balance = Balance: {0} +cmd.economy.deposited = Deposited {0} into the faction treasury. +cmd.economy.withdrawn = Withdrew {0} from the faction treasury. +cmd.economy.transferred = Transferred {0} to {1}. +cmd.economy.insufficient = Insufficient funds in faction treasury. +cmd.economy.invalid_amount = Invalid amount: {0} +cmd.economy.economy_disabled = Economy is disabled. +cmd.economy.balance_no_permission = You don't have permission to view balances. +cmd.economy.treasury_unavailable = Treasury is not available. +cmd.economy.balance_display = {0}'s treasury: {1} +cmd.economy.deposit_no_permission = You don't have permission to deposit. +cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. +cmd.economy.deposit_usage = Usage: /f deposit +cmd.economy.amount_positive = Amount must be positive. +cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} +cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. +cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. +cmd.economy.withdraw_no_permission = You don't have permission to withdraw. +cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. +cmd.economy.withdraw_usage = Usage: /f withdraw +cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} +cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. +cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. +cmd.economy.withdraw_failed = Withdrawal failed: {0} +cmd.economy.transfer_no_permission = You don't have permission to transfer. +cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. +cmd.economy.transfer_usage = Usage: /f money transfer +cmd.economy.transfer_self = Cannot transfer to your own faction. +cmd.economy.transfer_limit_denied = Transfer denied: {0} +cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. +cmd.economy.transfer_failed = Transfer failed: {0} +cmd.economy.log_no_permission = You don't have permission to view the transaction log. +cmd.economy.log_header = Transaction Log (page {0}/{1}) +cmd.economy.log_empty = No transactions found. +cmd.economy.money_help_header = Treasury Commands: +cmd.economy.money_help_balance = /f money balance [faction] - View balance +cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury +cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury +cmd.economy.money_help_transfer = /f money transfer - Transfer between factions +cmd.economy.money_help_log = /f money log [page] [type] - View transaction history + +# ========== Protection - Action Phrases ========== +protection.action.generic = You can't do that +protection.action.build = You can't build or break blocks +protection.action.interact = You can't interact with that +protection.action.door = You can't use doors +protection.action.container = You can't open containers +protection.action.bench = You can't use crafting stations +protection.action.processing = You can't use processing stations +protection.action.seat = You can't use seats +protection.action.light = You can't toggle lights +protection.action.teleporter = You can't use teleporters +protection.action.crate = You can't use crates +protection.action.tame = You can't tame creatures +protection.action.npc = You can't interact with NPCs +protection.action.mount = You can't mount creatures +protection.action.pve = You can't damage creatures +protection.action.item_drop = You can't drop items +protection.action.item_pickup = You can't pick up items + +# ========== Protection - Denial Reasons ========== +protection.denied.safezone = {0} in a SafeZone. +protection.denied.warzone = {0} in a WarZone. +protection.denied.enemy_claim = {0} in enemy territory. +protection.denied.claimed = {0} in claimed territory. +protection.denied.here = {0} here. +protection.denied.zone = {0} in this zone. +protection.denied.faction_perm = {0} here. (Faction permission: {1}) +protection.denied.ally_territory = {0} here. (Ally territory) +protection.denied.error = Protection error — action blocked for safety. + +# ========== Protection - PvP ========== +protection.pvp.safezone = PvP is disabled in SafeZones. +protection.pvp.same_faction = You cannot attack faction members. +protection.pvp.ally = You cannot attack allies. +protection.pvp.spawn_protected = That player has spawn protection. +protection.pvp.territory_disabled = PvP is disabled in this territory. +protection.pvp.generic = You cannot attack this player. + +# ========== Protection - Entity Damage ========== +protection.mob_damage_disabled = Mob damage is disabled in this zone. +protection.pve_damage_disabled = PvE damage is disabled in this zone. +protection.pve_territory_denied = You cannot damage mobs in this territory. + +# ========== Protection - Combat Tag ========== +protection.combat_tag_command = You cannot use that command while combat tagged. + +# ========== Server Announcements ========== +# These are broadcast to all online players for significant faction events. +# {0}, {1} = dynamic values (faction names, player names) +server_announce.faction_created = {0} has founded the faction {1}! +server_announce.faction_disbanded = The faction {0} has been disbanded! +server_announce.leadership_transfer = {0} is now the leader of {1}! +server_announce.overclaim = {0} has overclaimed territory from {1}! +server_announce.war_declared = {0} has declared war on {1}! +server_announce.alliance_formed = {0} and {1} are now allies! +server_announce.alliance_broken = {0} and {1} are no longer allies! + +# ========== Teleport System ========== +teleport.cooldown_wait = You must wait {0} before teleporting again. +teleport.warmup_start = Teleporting to faction home in {0} seconds... +teleport.combat_cancelled = Teleportation cancelled - you are in combat! +teleport.success_default = Teleported to faction home! +teleport.no_home = Your faction has no home set. +teleport.world_not_found = World not found. +teleport.failed = Teleportation failed. +teleport.countdown = Teleporting in {0} seconds... +teleport.countdown_one = Teleporting in 1 second... +teleport.moved_cancelled = Teleportation cancelled - you moved! +teleport.damage_cancelled = Teleportation cancelled - you took damage! +teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. +teleport.mount_entry_blocked = You can't enter this zone while mounted. + +# ========== Chat Display ========== +chat.display.public = Public +chat.display.faction = Faction +chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/fr-FR/hyperfactions_admin.lang b/src/main/resources/Server/Languages/fr-FR/hyperfactions_admin.lang new file mode 100644 index 00000000..165fd4a8 --- /dev/null +++ b/src/main/resources/Server/Languages/fr-FR/hyperfactions_admin.lang @@ -0,0 +1,268 @@ +# Language: French (fr-FR) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with French translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions Admin GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule + +# ========== Admin Navigation Bar ========== +nav.dashboard = Dashboard +nav.actions = Actions +nav.factions = Factions +nav.players = Players +nav.economy = Economy +nav.zones = Zones +nav.config = Config +nav.backups = Backups +nav.log = Log +nav.updates = Updates +nav.help = Help +nav.version = Version + +# ========== Common Admin Labels ========== +common.faction_not_found = Faction Not Found +common.no_faction = No Faction +common.not_set = Not set +common.on = On +common.off = Off +common.enable = Enable +common.disable = Disable +common.none_paren = (None) +common.invalid_faction = Invalid faction. +common.leader_prefix = Leader: {0} +common.members_suffix = {0} members +common.claims_suffix = {0} claims +common.factions_suffix = {0} factions +common.players_suffix = {0} players +common.chunks_suffix = {0} chunks +common.entries_suffix = {0} entries +common.found_suffix = {0} found +common.power_format = {0}/{1} power +common.raidable = Raidable +common.protected = Protected +common.no_description = No description set. +common.officers_more = +{0} more +common.custom_max = (custom max) +common.default_max = (default max) +common.now = Now +common.ago_suffix = {0} ago +common.just_now = just now +common.no_membership_history = No membership history + +# ========== Admin Dashboard ========== +dashboard.factions_prefix = Factions: {0} +dashboard.members_prefix = Total Members: {0} +dashboard.claims_prefix = Total Claims: {0} + +# ========== Admin Actions ========== +actions.confirm_reset = Confirm Reset? +actions.confirm_trigger = Confirm Trigger? +actions.kd_reset = Reset K/D for {0} players. +actions.kd_reset_failed = Failed to reset K/D: {0} +actions.upkeep_unavailable = Upkeep processor is not available. +actions.upkeep_triggered = Upkeep collection triggered. +actions.upkeep_failed = Upkeep failed: {0} + +# ========== Admin Disband ========== +disband.faction_gone = Faction no longer exists. +disband.success = Faction '{0}' has been disbanded. +disband.failed = Failed to disband: {0} +disband.no_leader = Faction has no leader, cannot disband. + +# ========== Admin Unclaim All ========== +unclaim.removed = [Admin] Removed {0} claims from {1}. +unclaim.no_claims = {0} had no claims to remove. + +# ========== Admin Factions List ========== +factions.home_not_set = Not set +factions.teleported = Teleported to {0}'s home. +factions.no_home = Faction has no home set. +factions.world_not_found = Target world not found. + +# ========== Admin Faction Info ========== +info.faction_gone = This faction no longer exists. + +# ========== Admin Faction Members ========== +members.sort_role = Role +members.sort_online = Online +members.sort_name = Name +members.sort_power = Power +members.promoted = [Admin] Promoted {0} to {1}. +members.demoted = [Admin] Demoted {0} to {1}. +members.kicked = [Admin] Kicked {0} from the faction. + +# ========== Admin Faction Relations ========== +relations.allies_header = ALLIES ({0}) +relations.enemies_header = ENEMIES ({0}) +relations.no_allies = No allies. +relations.no_enemies = No enemies. +relations.neutral_count = {0} neutral factions +relations.since_today = Since: today +relations.since_one_day = Since: 1 day ago +relations.since_days = Since: {0} days ago +relations.set_ally = [Admin] Set mutual ally status with {0}. +relations.set_enemy = Set mutual enemy status with {0}. +relations.set_neutral = [Admin] Set mutual neutral status with {0}. + +# ========== Admin Faction Settings ========== +settings.locked = This setting is locked by server configuration. +settings.perm_toggled = Set {0} to {1}. +settings.color_changed = Set faction color to {0}. +settings.recruitment_set = Set recruitment to {0}. +settings.no_home = [Admin] This faction has no home set. +settings.home_cleared = Cleared faction home for {0}. + +# ========== Sort Dropdown Labels ========== +sort.power = Power +sort.name = Name +sort.members = Members +sort.balance = Balance + +# ========== Admin Players ========== +players.sort_last_online = Last Online +players.sort_faction = Faction +players.sort_online = Online +players.not_online = Player is not online. +players.world_not_found = Target world not found. +players.teleported = [Admin] Teleported to {0}. + +# ========== Admin Player Info ========== +playerinfo.disband_faction = Disband Faction +playerinfo.kick_leader = Kick Leader +playerinfo.enter_valid_number = Enter a valid number. +playerinfo.enter_valid_positive = Enter a valid positive number. +playerinfo.faction_gone = Faction no longer exists. +playerinfo.kd_reset = Reset K/D for {0}. +playerinfo.kicked_success = Kicked {0} from {1}. +playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. +playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). + +# ========== Admin Economy ========== +economy.no_data = No factions with economy data. +economy.amount_zero = Amount cannot be zero. +economy.enter_amount = Please enter an amount. +economy.invalid_number = Invalid number: {0} +economy.error = An error occurred. +economy.balance_negative = Balance cannot be negative. +economy.failed = Failed: {0} +economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. +economy.bulk_failures = ({0} failed) + +# ========== Admin Zones ========== +zones.not_found = Zone not found. +zones.invalid_id = Invalid zone ID. +zones.deleted = Zone {0} deleted. +zones.delete_failed = Failed to delete zone: {0} +zones.no_chunks = No chunks +zones.chunks_suffix = {0} ({1} chunks) + +# ========== Zone Create Wizard ========== +wizard.enter_name = Please enter a zone name. +wizard.name_too_short = Zone name must be at least {0} characters. +wizard.name_too_long = Zone name cannot exceed {0} characters. +wizard.name_taken = A zone with this name already exists. +wizard.radius_range = Radius must be between 1 and {0}. +wizard.create_failed = Could not create zone: {0} +wizard.created_not_found = Zone created but could not be found. +wizard.created = Created {0} '{1}'! +wizard.chunk_claimed = Claimed chunk ({0}, {1}). +wizard.chunk_failed = Could not claim current chunk: {0} +wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. +wizard.radius_no_claims = No chunks could be claimed (area may be occupied). +wizard.no_claims = Zone created with no claims. +wizard.chunks_preview = ~{0} chunks + +# ========== Zone Rename ========== +zone_rename.zone_gone = Zone no longer exists. +zone_rename.enter_name = Please enter a zone name. +zone_rename.too_short = Zone name must be at least {0} character. +zone_rename.too_long = Zone name cannot exceed {0} characters. +zone_rename.same_name = That's already this zone's name. +zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! +zone_rename.name_taken = A zone with that name already exists. +zone_rename.invalid_name = Invalid zone name. +zone_rename.rename_failed = Failed to rename zone: {0} + +# ========== Zone Change Type ========== +zone_type.zone_gone = Zone no longer exists. +zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). +zone_type.failed = Failed to change zone type: {0} + +# ========== Zone Integration Flags ========== +zone_int.zone_not_found = Zone Not Found +zone_int.no_plugin = (no plugin) +zone_int.default = (default) +zone_int.custom = (custom) + +# ========== Activity Log ========== +log.all_types = All Types +log.no_logs = No activity logs matching filters. + +# ========== Version Page ========== +version.active = Active +version.not_found = Not Found +version.not_detected = Not Detected +version.not_installed = Not Installed +version.active_version = Active (v{0}) +version.active_compatible = Active (compatible) +version.active_claims_only = Active (claims only) +version.installed_no_perm = Installed (no perm provider) +version.active_provider = Active ({0}) + +# ========== Admin Main Page ========== +main.reload_hint = Use /f reload to reload configuration. +main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. + +# ========== Zone Flags/Settings ========== +zflags.invalid_flag = Invalid flag. +zflags.zone_not_found = Zone not found. +zflags.conflict = (conflict) +zflags.mixin = (mixin) +zflags.reset_int = Reset integration flags to defaults. +zflags.reset_all = Reset all flags to defaults. +zflags.reset_failed = Failed to reset flags: {0} +zflags.back_to_settings = Back to Settings + +# ========== Zone Properties ========== +zprop.current_custom = Current: "{0}" (custom) +zprop.current_default = Current: "{0}" (default) +zprop.pvp_disabled = PvP Disabled +zprop.pvp_enabled = PvP Enabled +zprop.name_empty = Name cannot be empty. +zprop.renamed = Zone renamed to "{0}". +zprop.name_taken = A zone with that name already exists. +zprop.name_invalid = Invalid name (max 32 characters). +zprop.rename_failed = Failed to rename: {0} +zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. +zprop.upper_set = Upper title set. +zprop.upper_reset = Upper title reset to default. +zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. +zprop.lower_set = Lower title set. +zprop.lower_reset = Lower title reset to default. + +# ========== Relations Additional ========== +relations.failed = Failed: {0} + +# ========== Members Additional ========== +members.never = Never +members.teleported = [Admin] Teleported to {0}. + +# ========== Player Info Additional ========== +playerinfo.records = {0} records +playerinfo.joined_date = Joined: {0} +playerinfo.current = Current +playerinfo.left_date = Left: {0} + +# ========== Zone Map ========== +map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' +map.position = Your Position: Chunk ({0}, {1}) +map.zone_gone = Zone no longer exists. +map.claimed = Claimed chunk ({0}, {1}) for {2}. +map.claim_failed = Failed to claim chunk: {0} +map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. +map.unclaim_failed = Failed to unclaim chunk: {0} +map.chunk_belongs = This chunk belongs to {0}. +map.chunk_faction = This chunk is claimed by a faction. +map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/fr-FR/hyperfactions_gui.lang b/src/main/resources/Server/Languages/fr-FR/hyperfactions_gui.lang new file mode 100644 index 00000000..dd53d6a4 --- /dev/null +++ b/src/main/resources/Server/Languages/fr-FR/hyperfactions_gui.lang @@ -0,0 +1,446 @@ +# Language: French (fr-FR) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with French translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule + +# ========== Navigation Bar ========== +nav.dashboard = Dashboard +nav.chat = Chat +nav.members = Members +nav.invites = Invites +nav.browser = Browse +nav.map = Map +nav.leaderboard = Leaderboard +nav.relations = Relations +nav.treasury = Treasury +nav.settings = Settings +nav.logs = Logs +nav.help = Help +nav.admin = Admin +nav.create = Create + +# ========== Help Category Names ========== +help.category.welcome = Welcome +help.category.your_faction = Your Faction +help.category.power_land = Power & Land +help.category.diplomacy = Diplomacy +help.category.combat = Combat & Safety +help.category.economy = Economy +help.category.quick_ref = Quick Reference + +# ========== Main Menu ========== +main_menu.section_my_faction = My Faction +main_menu.section_get_started = Get Started +main_menu.section_territory = Territory +main_menu.section_browse = Browse +main_menu.section_admin = Admin +main_menu.claim_hint = Use /f claim to claim territory. + +# ========== Faction Info Page ========== +faction_info.no_description = No description set. +faction_info.status_open = Open +faction_info.status_invite_only = Invite Only +faction_info.status_raidable = Raidable +faction_info.status_protected = Protected +faction_info.officers_more = +{0} more + +# ========== Rename Modal ========== +rename.no_permission = You don't have permission to rename the faction. +rename.enter_name = Please enter a faction name. +rename.too_short = Faction name must be at least {0} characters. +rename.too_long = Faction name cannot exceed {0} characters. +rename.same_name = That's already your faction's name. +rename.name_taken = A faction with that name already exists. +rename.success = Faction renamed from {0} to {1}! + +# ========== Description Modal ========== +desc.no_permission = You don't have permission to edit the description. +desc.display_none = (None) +desc.cleared = Faction description cleared. +desc.updated = Faction description updated! + +# ========== Tag Modal ========== +tag.no_permission = You don't have permission to edit the tag. +tag.display_none = (None) +tag.cleared = Faction tag cleared. +tag.too_short = Tag must be at least {0} character. +tag.too_long = Tag cannot exceed {0} characters. +tag.invalid_format = Tag can only contain letters and numbers. +tag.same_tag = That's already your faction's tag. +tag.tag_taken = A faction with that tag already exists. +tag.success = Faction tag set to [{0}]! + +# ========== Dashboard Page ========== +dashboard.faction_gone = Your faction no longer exists. +dashboard.available = {0} available +dashboard.at_risk = At Risk! +dashboard.online_count = {0} online +dashboard.status_invite = Invite +dashboard.in_grace = IN GRACE +dashboard.billable_chunks = {0} billable chunks +dashboard.btn_home = Home +dashboard.btn_set_home = Set Home +dashboard.btn_claim = Claim +dashboard.chat_prefix = Chat: {0} +dashboard.btn_leave = Leave +dashboard.no_activity = No recent activity. +dashboard.time_now = now +dashboard.time_minutes = {0}m ago +dashboard.time_hours = {0}h ago +dashboard.time_days = {0}d ago +dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. +dashboard.chat_mode_set = Chat mode: {0} +dashboard.claim_success = Claimed chunk at ({0}, {1}) + +# ========== Faction Main Page ========== +main.no_faction = No Faction +main.joined = You joined the faction! +main.join_failed = Failed to join faction: {0} +main.invite_declined = Invite declined. +main.cooldown = Teleport on cooldown! {0}s remaining. +main.world_not_found = Cannot teleport - world not found. +main.leave_failed = Failed to leave: {0} + +# ========== Shared GUI Labels ========== +common.faction_count = {0} factions +common.leader_label = Leader: {0} +common.sort_power = Power +common.sort_members = Members +common.page_format = {0}/{1} +common.own_faction = (You) + +# ========== Members Page ========== +members.count = {0} members +members.sort_role = Role +members.sort_last_online = Last Online +members.just_now = just now +members.ago = {0} ago +members.never = Never +members.member_not_found = Member not found. +members.promoted = Promoted {0} to {1}. +members.promote_failed = Failed to promote: {0} +members.demoted = Demoted {0} to {1}. +members.demote_failed = Failed to demote: {0} +members.kicked = Kicked {0} from the faction. +members.kick_failed = Failed to kick: {0} + +# ========== Browser Page ========== +browser.sort_name = Name +browser.invalid_faction = Invalid faction. + +# ========== Leaderboard Page ========== +leaderboard.sort_kd = K/D +leaderboard.sort_territory = Territory +leaderboard.sort_balance = Balance + +# ========== Player Info Page ========== +playerinfo.now = Now +playerinfo.history_count = {0} records +playerinfo.joined_label = Joined: {0} +playerinfo.current = Current +playerinfo.left_label = Left: {0} +playerinfo.no_history = No membership history +playerinfo.faction_gone = Faction no longer exists. +playerinfo.reason_active = ACTIVE +playerinfo.reason_left = LEFT +playerinfo.reason_kicked = KICKED +playerinfo.reason_disbanded = DISBANDED + +# ========== Relations Page ========== +relations.relation_count = {0} relations +relations.request_count = {0} requests +relations.type_ally = Ally +relations.type_enemy = Enemy +relations.type_incoming = Incoming +relations.type_outgoing = Outgoing +relations.incoming_request = Incoming request +relations.outgoing_request = Outgoing request +relations.empty_relations = No relations yet. +relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. +relations.empty_pending = No pending ally requests. +relations.today = Today +relations.one_day_ago = 1 day ago +relations.days_ago = {0} days ago +relations.now_neutral = Now neutral with {0}. +relations.now_enemies = Now enemies with {0}! +relations.request_sent = Alliance request sent to {0}. +relations.now_allied = Now allied with {0}! +relations.request_declined = Ally request from {0} declined. +relations.request_cancelled = Ally request to {0} cancelled. +relations.failed = Failed: {0} +relations.search_hint = Search for a faction to set relation +relations.no_results = No factions found matching '{0}' +relations.power_display = {0} power +relations.member_count = {0} members + +# ========== Settings Page ========== +settings.officers_only = Only officers and leaders can change faction settings. +settings.display_none = (None) +settings.home_not_set = Not set +settings.no_permission = You don't have permission to change settings. +settings.only_leader_disband = Only the leader can disband the faction. +settings.perm_locked = This setting is locked by the server. +settings.no_perm_edit = You don't have permission to edit territory permissions. +settings.only_leader_officers = Only the leader can change officer access. +settings.pvp_enabled = Enabled +settings.pvp_disabled = Disabled +settings.not_in_territory = You must be in your faction's territory to set home. +settings.home_set = Faction home set to your current location! +settings.recruitment_set = Recruitment set to {0}. +settings.home_no_set = Your faction does not have a home set. +settings.home_deleted = Faction home deleted! + +# ========== Modules Page ========== +modules.treasury_name = Treasury +modules.treasury_desc = Faction bank & economy system +modules.raids_name = Raids +modules.raids_desc = Scheduled faction battles +modules.levels_name = Levels +modules.levels_desc = Faction progression & XP +modules.war_name = War +modules.war_desc = Formal war declarations +modules.coming_soon = Coming Soon +modules.active = Active +modules.view_treasury = View Treasury +modules.unavailable = Unavailable +modules.no_economy = No economy plugin detected +modules.disabled = Disabled +modules.economy_not_available = Economy features are not available on this server + +# ========== Treasury Page ========== +treasury.wallet_label = Your wallet: {0} +treasury.treasury_label = Treasury balance: {0} +treasury.chunks_detail = {0} free + {1} billable chunks +treasury.cost_label = Cost: {0} +treasury.pending = Pending +treasury.auto_pay_on = Auto-pay: ON +treasury.auto_pay_off = Auto-pay: OFF +treasury.runway_90_plus = 90+ days +treasury.runway_days = {0} days +treasury.runway_day = {0} day +treasury.runway_less_day = < 1 day +treasury.runway_no_funds = No funds +treasury.grace_expires = Grace expires in: {0} +treasury.missed_payments = Missed payments: {0} +treasury.pay_to_clear = Pay {0} to clear grace +treasury.system = System +treasury.type_deposit = Deposit +treasury.type_withdrawal = Withdrawal +treasury.type_transfer_in = Transfer In +treasury.type_transfer_out = Transfer Out +treasury.type_player_transfer = Player Transfer +treasury.type_upkeep = Upkeep +treasury.type_tax = Tax Collection +treasury.type_war_cost = War Cost +treasury.type_raid_cost = Raid Cost +treasury.type_spoils = Spoils +treasury.type_admin = Admin Adjustment +treasury.deposit_title = Deposit to Treasury +treasury.withdraw_title = Withdraw from Treasury +treasury.fee_label = Fee ({0}%) +treasury.confirm_deposit = Confirm Deposit +treasury.confirm_withdrawal = Confirm Withdrawal +treasury.from_wallet = {0} from wallet +treasury.to_wallet = {0} to wallet +treasury.enter_valid_amount = Enter a valid positive amount. +treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. +treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. +treasury.deposit_failed_returned = Failed to deposit. Money returned. +treasury.deposited = Deposited {0} into the treasury. +treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) +treasury.no_withdraw_permission = You don't have permission to withdraw. +treasury.withdraw_denied = Withdrawal denied: {0} +treasury.insufficient_treasury = Insufficient funds in treasury. +treasury.withdraw_limit = Withdrawal limit exceeded. +treasury.withdraw_failed = Withdrawal failed: {0} +treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. +treasury.withdrew = Withdrew {0} from the treasury. +treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) +treasury.search_hint = Search for a player or faction +treasury.no_results = No results for '{0}' +treasury.tag_player = [Player] +treasury.tag_faction = [Faction] +treasury.source_online = Online +treasury.source_offline = Offline +treasury.source_player_db = Hytale player +treasury.no_transfer_permission = You don't have permission to transfer. +treasury.transfer_denied = Transfer denied: {0} +treasury.invalid_target_faction = Invalid target faction. +treasury.target_faction_gone = Target faction no longer exists. +treasury.transfer_failed = Transfer failed: {0} +treasury.transfer_failed_returned = Transfer failed. Funds returned. +treasury.transferred = Transferred {0} to {1}. +treasury.invalid_target_player = Invalid target player. +treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. +treasury.leader_only_perms = Only the leader can change treasury permissions. +treasury.leader_only_upkeep = Only the leader can change upkeep settings. +treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. + +# ========== Confirmation Pages ========== +confirm.disband_not_leader = Only the leader can disband the faction. +confirm.disbanded = Faction '{0}' has been disbanded. +confirm.disband_failed = Failed to disband faction. +confirm.succession_title = Leadership will transfer to: +confirm.no_members_warning = WARNING: No other members! +confirm.will_disband = Leaving will disband the faction permanently. +confirm.not_in_faction = You are not in this faction. +confirm.not_leader_anymore = You are no longer the leader. +confirm.no_successor = No successor available. Use disband instead. +confirm.transfer_failed = Failed to transfer leadership: {0} +confirm.leader_left = Leadership transferred to {0}. You have left {1}. +confirm.leave_failed = Failed to leave faction: {0} +confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. +confirm.left_faction = You have left {0}. +confirm.faction_gone = Faction no longer exists. +confirm.not_leader_transfer = Only the leader can transfer leadership. +confirm.leadership_transferred = Leadership transferred to {0}. + +# ========== Logs Viewer Page ========== +logs.title = {0} - Activity Logs +logs.entry_count = {0} entries +logs.all_types = All Types +logs.no_logs_type = No logs of this type. +logs.no_logs = No activity logs yet. + +# ========== Chat Page ========== +chat.placeholder = Type a message... +chat.no_messages = No messages yet. +chat.no_ally_permission = You don't have permission for ally chat. +chat.no_permission = No permission. +chat.faction_gone = Your faction no longer exists. +chat.time_now = now +chat.time_minutes = {0}m +chat.time_hours = {0}h + +# ========== Invites Page ========== +invites.invite_count = {0} invites +invites.request_count = {0} requests +invites.invited_by = Invited by: {0} +invites.no_message = No message +invites.expires = Expires: {0} +invites.type_outgoing = Outgoing +invites.type_request = Request +invites.invited_by_label = Invited by: +invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. +invites.empty_requests = No join requests. Players can request to join with /f request. +invites.invalid_player = Invalid player. +invites.cancelled_invite = Cancelled invite to {0}. +invites.player_joined = {0} has joined the faction! +invites.faction_full = Faction is full. Cannot accept request. +invites.add_failed = Failed to add player to faction. +invites.request_expired = Request not found or expired. +invites.request_declined = Declined join request from {0}. +invites.time_seconds = {0}s +invites.time_minutes = {0}m +invites.time_hours = {0}h + +# ========== Map Page ========== +map.position = Your Position: Chunk ({0}, {1}) +map.legend_protected = Protected +map.claim_stats = Claims: {0}/{1} ({2} Available) +map.overclaimed = OVERCLAIMED by {0}! +map.power_display = Power: {0}/{1} +map.join_to_claim = Join a faction to claim +map.claim_success = Claimed chunk at ({0}, {1})! +map.claim_not_in_faction = You must be in a faction to claim territory. +map.claim_not_officer = Only officers and leaders can claim territory. +map.claim_already_yours = You already own this chunk. +map.claim_already_claimed = This chunk is already claimed by another faction. +map.claim_not_adjacent = You can only claim chunks adjacent to your territory. +map.claim_max = You have reached your maximum claim limit. +map.claim_world_not_allowed = Claiming is not allowed in this world. +map.claim_orbisguard = This area is protected by OrbisGuard. +map.claim_failed = Failed to claim chunk. +map.unclaim_success = Unclaimed chunk at ({0}, {1}). +map.unclaim_not_in_faction = You must be in a faction. +map.unclaim_not_officer = Only officers and leaders can unclaim territory. +map.unclaim_not_claimed = This chunk is not claimed. +map.unclaim_not_yours = This chunk belongs to another faction. +map.unclaim_home = Cannot unclaim the chunk containing your faction home. +map.unclaim_failed = Failed to unclaim chunk. +map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! +map.overclaim_not_in_faction = You must be in a faction. +map.overclaim_not_officer = Only officers and leaders can overclaim territory. +map.overclaim_already_yours = You already own this chunk. +map.overclaim_ally = You cannot overclaim allied territory. +map.overclaim_has_power = This faction has enough power to defend their territory. +map.overclaim_max = You have reached your maximum claim limit. +map.overclaim_failed = Failed to overclaim chunk. +# ========== Create Faction Page ========== +create.preview_name = Your Faction Name +create.leader_prefix = Leader: {0} +create.enter_name = Please enter a faction name. +create.name_too_short = Faction name must be at least {0} characters. +create.name_too_long = Faction name cannot exceed {0} characters. +create.name_taken = A faction with this name already exists. +create.tag_length = Faction tag must be {0}-{1} characters. +create.tag_format = Faction tag can only contain letters and numbers. +create.desc_too_long = Description cannot exceed {0} characters. +create.created = Faction {0} created successfully! +create.created_no_dashboard = Faction created but could not open dashboard. +create.invalid_name = Invalid faction name. +create.create_failed = Could not create faction. + +# ========== New Player Pages ========== +newplayer.pending_count = {0} pending +newplayer.received_header = RECEIVED INVITES ({0}) +newplayer.requests_header = YOUR REQUESTS ({0}) +newplayer.no_invites = No invites. Browse factions to find one! +newplayer.no_requests = No pending requests. +newplayer.invited_by = Invited by: {0} +newplayer.member_count = {0} members +newplayer.power_count = {0} power +newplayer.claim_count = {0} claims +newplayer.awaiting_review = Awaiting review +newplayer.expires_in = Expires in {0}h +newplayer.time_just_now = just now +newplayer.time_minutes = {0} min ago +newplayer.time_hours = {0}h ago +newplayer.time_days = {0}d ago +newplayer.invalid_faction = Invalid faction. +newplayer.invite_expired = This invite has expired or was revoked. +newplayer.faction_gone = Faction no longer exists. +newplayer.joined = You joined {0}! +newplayer.faction_full = This faction is full. +newplayer.join_failed = Could not join faction. +newplayer.invite_declined = Invite declined. +newplayer.request_cancelled = Cancelled request to join {0}. +newplayer.faction_count = {0} factions +newplayer.browse_subtitle = Find your new home! +newplayer.sort_power = Power +newplayer.sort_name = Name +newplayer.sort_members = Members +newplayer.btn_accept = Accept +newplayer.btn_pending = Pending +newplayer.btn_join = Join +newplayer.btn_request = Request +newplayer.invite_only_msg = This faction is invite-only. +newplayer.welcome_hint = Welcome! Use /f to open faction menu. +newplayer.faction_open_hint = This faction is open! Click JOIN instead. +newplayer.already_requested = You already have a pending request to this faction. +newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. +newplayer.request_sent = Join request sent to {0}! +newplayer.officer_review = An officer will review your request. +newplayer.map_hint = View Only - Join a faction to claim territory! + +# Player Settings +nav.player_settings = Settings +player_settings.title = Player Settings +player_settings.language_section = Language +player_settings.auto_detect = Auto-detect from client +player_settings.auto_detect_desc = Uses your game client's language setting +player_settings.language_label = Language +player_settings.notifications_section = Notifications +player_settings.territory_alerts = Territory Alerts +player_settings.territory_alerts_desc = Show notifications when entering/leaving territories +player_settings.death_announcements = Death Broadcasts +player_settings.death_announcements_desc = Receive faction member death location announcements +player_settings.power_notifications = Power Changes +player_settings.power_notifications_desc = Show messages when your power changes +player_settings.language_changed = Language changed to {0} +player_settings.pref_enabled = {0} enabled +player_settings.pref_disabled = {0} disabled diff --git a/src/main/resources/Server/Languages/ja-JP/hyperfactions.lang b/src/main/resources/Server/Languages/ja-JP/hyperfactions.lang new file mode 100644 index 00000000..69d52da6 --- /dev/null +++ b/src/main/resources/Server/Languages/ja-JP/hyperfactions.lang @@ -0,0 +1,452 @@ +# Language: Japanese (ja-JP) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Japanese translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions - English Translations +# Format: key = value (or key = "quoted value") +# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule +# Placeholders: {0}, {1}, etc. + +# ========== Common ========== +common.no_permission = You don't have permission to do that. +common.not_in_faction = You are not in a faction. +common.already_in_faction = You are already in a faction. +common.player_not_found = Player not found. +common.faction_not_found = Faction not found. +common.player_not_online = That player is not online. +common.must_be_leader = Only the faction leader can do that. +common.must_be_officer = You must be an Officer or Leader to do that. +common.combat_tagged = You can't do that while combat tagged. +common.cancel = Cancel +common.confirm = Confirm +common.save = Save +common.close = Close +common.yes = Yes +common.no = No +common.loading = Loading... +common.online = Online +common.offline = Offline +common.enabled = Enabled +common.disabled = Disabled +common.none = None +common.page = Page {0} of {1} +common.unknown = Unknown +common.error_generic = Something went wrong. Please try again. +common.gui_fallback = Could not access GUI. Use /f help for commands. +common.admin_prefix = [Admin] +common.location_error = Could not determine your location. +common.world_error = Could not determine your world. +common.invalid_id = Invalid faction ID. +common.na = N/A + +# ========== Commands - Create ========== +cmd.create.no_permission = You don't have permission to create factions. +cmd.create.usage = Usage: /f create +cmd.create.success = Faction '{0}' created! +cmd.create.already_in_named = You are already in {0}. +cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. +cmd.create.name_taken = That faction name is already taken. +cmd.create.name_too_short = Faction name is too short. +cmd.create.name_too_long = Faction name is too long. +cmd.create.failed = Failed to create faction. + +# ========== Commands - Disband ========== +cmd.disband.no_permission = You don't have permission to disband factions. +cmd.disband.not_leader = Only the faction leader can disband. +cmd.disband.confirm_prompt = Are you sure you want to disband your faction? +cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. +cmd.disband.success = Your faction has been disbanded. +cmd.disband.failed = Failed to disband faction. +cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. + +# ========== Commands - Rename ========== +cmd.rename.no_permission = You don't have permission. +cmd.rename.not_leader = Only the leader can rename the faction. +cmd.rename.usage = Usage: /f rename +cmd.rename.too_short = Name is too short (min {0} chars). +cmd.rename.too_long = Name is too long (max {0} chars). +cmd.rename.name_taken = That name is already taken. +cmd.rename.success = Faction renamed to {0}! +cmd.rename.broadcast = {0} renamed the faction to {1} + +# ========== Commands - Description ========== +cmd.desc.no_permission = You don't have permission. +cmd.desc.not_officer = You must be an officer to set the description. +cmd.desc.set = Faction description set! +cmd.desc.cleared = Faction description cleared. + +# ========== Commands - Open / Close ========== +cmd.open.no_permission = You don't have permission. +cmd.open.not_leader = Only the leader can change this setting. +cmd.open.already_open = Your faction is already open. +cmd.open.success = Your faction is now open! Anyone can join with /f join. +cmd.open.broadcast = {0} opened the faction to public joining. +cmd.close.no_permission = You don't have permission. +cmd.close.not_leader = Only the leader can change this setting. +cmd.close.already_closed = Your faction is already closed. +cmd.close.success = Your faction is now invite-only. +cmd.close.broadcast = {0} closed the faction to invite-only. + +# ========== Commands - Color ========== +cmd.color.no_permission = You don't have permission. +cmd.color.not_officer = You must be an officer to change the color. +cmd.color.colors_disabled = Faction colors are disabled. +cmd.color.usage = Usage: /f color +cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex +cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. +cmd.color.success = Faction color updated! + +# ========== Commands - Claim ========== +cmd.claim.no_permission = You don't have permission to claim territory. +cmd.claim.already_yours = Your faction already owns this chunk. +cmd.claim.cannot_claim_ally = You cannot claim ally territory. +cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. +cmd.claim.success = Claimed chunk at {0}, {1}! +cmd.claim.not_officer = You must be an officer to claim land. +cmd.claim.already_claimed = This chunk is already claimed. +cmd.claim.max_claims = Your faction has reached max claims. Get more power! +cmd.claim.not_adjacent = You must claim adjacent to existing territory. +cmd.claim.world_not_allowed = Claiming is not allowed in this world. +cmd.claim.orbisguard = This area is protected by OrbisGuard. +cmd.claim.zone_protected = This chunk is in a safezone or warzone. +cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. +cmd.claim.failed = Failed to claim chunk. + +# ========== Commands - Invite ========== +cmd.invite.no_permission = You don't have permission to invite players. +cmd.invite.not_officer = You must be an officer to invite players. +cmd.invite.usage = Usage: /f invite +cmd.invite.player_not_found = Player '{0}' not found or offline. +cmd.invite.target_in_faction = That player is already in a faction. +cmd.invite.sent = Invited {0} to your faction. +cmd.invite.received = You have been invited to join {0}! +cmd.invite.accept_hint = Type /f accept {0} to join. + +# ========== Commands - Accept / Join ========== +cmd.join.no_permission = You don't have permission to join factions. +cmd.join.already_in_named = You are already in {0}. +cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.join.no_invites = You have no pending invites. +cmd.join.faction_not_found = Faction '{0}' not found. +cmd.join.not_invited = You have no invite from that faction. +cmd.join.faction_gone = That faction no longer exists. +cmd.join.success = You have joined {0}! +cmd.join.broadcast = {0} has joined the faction! +cmd.join.faction_full = That faction is full. +cmd.join.failed = Failed to join faction. + +# ========== Commands - Kick ========== +cmd.kick.no_permission = You don't have permission to kick members. +cmd.kick.usage = Usage: /f kick +cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. +cmd.kick.success = Kicked {0} from the faction. +cmd.kick.broadcast = {0} was kicked from the faction. +cmd.kick.kicked = You have been kicked from the faction. +cmd.kick.cannot_kick_higher = You don't have permission to kick that player. +cmd.kick.cannot_kick_leader = You cannot kick the faction leader. +cmd.kick.failed = Failed to kick player. + +# ========== Commands - Leave ========== +cmd.leave.no_permission = You don't have permission to leave factions. +cmd.leave.confirm_prompt = Are you sure you want to leave your faction? +cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. +cmd.leave.success = You have left your faction. +cmd.leave.broadcast = {0} has left the faction. +cmd.leave.failed = Failed to leave faction. +cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. + +# ========== Commands - Promote / Demote / Transfer ========== +cmd.rank.promote_no_permission = You don't have permission to promote members. +cmd.rank.promote_usage = Usage: /f promote +cmd.rank.promoted = Promoted {0} to {1}! +cmd.rank.promote_broadcast = {0} was promoted to {1}! +cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. +cmd.rank.promote_failed = Failed to promote player. +cmd.rank.demote_no_permission = You don't have permission to demote members. +cmd.rank.demote_usage = Usage: /f demote +cmd.rank.demoted = Demoted {0} to {1}. +cmd.rank.demote_broadcast = {0} was demoted to {1}. +cmd.rank.already_lowest = That player is already a Member. +cmd.rank.demote_failed = Failed to demote player. +cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. +cmd.rank.transfer_usage = Usage: /f transfer +cmd.rank.player_not_in_faction = Player not found in your faction. +cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? +cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. +cmd.rank.transferred = Transferred leadership to {0}! +cmd.rank.transfer_broadcast = {0} is now the faction leader! +cmd.rank.transfer_failed = Failed to transfer leadership. +cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. + +# ========== Commands - Unclaim ========== +cmd.unclaim.no_permission = You don't have permission to unclaim territory. +cmd.unclaim.success = Unclaimed chunk at {0}, {1}. +cmd.unclaim.not_officer = You must be an officer to unclaim land. +cmd.unclaim.chunk_not_claimed = This chunk is not claimed. +cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. +cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. +cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. +cmd.unclaim.failed = Failed to unclaim chunk. + +# ========== Commands - Overclaim ========== +cmd.overclaim.no_permission = You don't have permission to overclaim territory. +cmd.overclaim.success = Overclaimed enemy territory! +cmd.overclaim.not_officer = You must be an officer to overclaim. +cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. +cmd.overclaim.own_chunk = Your faction already owns this chunk. +cmd.overclaim.ally = You cannot overclaim ally territory. +cmd.overclaim.target_has_power = This faction still has enough power. +cmd.overclaim.failed = Failed to overclaim. + +# ========== Commands - Stuck ========== +cmd.stuck.no_permission = You don't have permission to use /f stuck. +cmd.stuck.not_stuck = You're not stuck - this is wilderness. +cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! +cmd.stuck.no_safe = Could not find a safe location. +cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! + +# ========== Commands - Home ========== +cmd.home.no_permission = You don't have permission to teleport to faction home. +cmd.home.no_home = Your faction has no home set. +cmd.home.combat_tagged = You cannot teleport while in combat! +cmd.home.teleported = Teleported to faction home! + +# ========== Commands - SetHome ========== +cmd.sethome.no_permission = You don't have permission to set faction home. +cmd.sethome.world_not_allowed = Cannot set home in this world. +cmd.sethome.not_in_territory = You can only set home in your faction's territory. +cmd.sethome.set = Faction home set! +cmd.sethome.broadcast = {0} set the faction home. +cmd.sethome.not_officer = You must be an officer to set the home. +cmd.sethome.failed = Failed to set home. + +# ========== Commands - DelHome ========== +cmd.delhome.no_permission = You don't have permission to delete faction home. +cmd.delhome.no_home = Your faction does not have a home set. +cmd.delhome.deleted = Faction home deleted! +cmd.delhome.broadcast = {0} deleted the faction home. +cmd.delhome.not_officer = You must be an officer to delete the home. +cmd.delhome.failed = Failed to delete home. + +# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== +cmd.relation.ally_no_permission = You don't have permission to manage alliances. +cmd.relation.ally_usage = Usage: /f ally +cmd.relation.ally_sent = Ally request sent to {0}! +cmd.relation.ally_formed = You are now allies with {0}! +cmd.relation.already_ally = You are already allied with that faction. +cmd.relation.ally_failed = Failed to send ally request. +cmd.relation.enemy_no_permission = You don't have permission to declare enemies. +cmd.relation.enemy_usage = Usage: /f enemy +cmd.relation.enemy_declared = {0} is now your enemy! +cmd.relation.already_enemy = You are already enemies with that faction. +cmd.relation.max_enemies = You have reached the maximum number of enemies. +cmd.relation.enemy_failed = Failed to set enemy. +cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. +cmd.relation.neutral_usage = Usage: /f neutral +cmd.relation.neutral_set = Your faction is now neutral with {0}. +cmd.relation.already_neutral = You are already neutral with that faction. +cmd.relation.neutral_failed = Failed to set neutral. +cmd.relation.cannot_self = You cannot ally with yourself. +cmd.relation.max_allies = You have reached the maximum number of allies. +cmd.relation.view_no_permission = You don't have permission to view relations. +cmd.relation.header = === Faction Relations === +cmd.relation.allies_count = Allies ({0}): +cmd.relation.enemies_count = Enemies ({0}): +cmd.relation.list_entry = - {0} + +# ========== Commands - Chat ========== +cmd.chat.usage = Usage: /f c [f|a|off] +cmd.chat.no_permission = You don't have permission for that chat mode. +cmd.chat.mode_set = Chat mode set to {0} + +# ========== Commands - Invites ========== +cmd.invites.not_officer = You must be an officer to manage invites. +cmd.invites.header = === Faction Invites === +cmd.invites.no_pending = No pending invites or requests. +cmd.invites.outgoing = Outgoing Invites: +cmd.invites.outgoing_entry = {0} (invited by {1}) +cmd.invites.requests = Join Requests: +cmd.invites.request_entry = {0}{1} +cmd.invites.your_invites_header = === Your Invites === +cmd.invites.no_invites = You have no pending invites. +cmd.invites.invite_entry = {0} - Use /f accept {1} + +# ========== Commands - Request ========== +cmd.request.no_permission = You don't have permission to request faction membership. +cmd.request.already_in_named = You are already in {0}. +cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.request.usage = Usage: /f request [message] +cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. +cmd.request.already_requested = You already have a pending request to that faction. +cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. +cmd.request.sent = Sent join request to {0}! +cmd.request.your_message = Your message: "{0}" +cmd.request.officer_review = An officer will review your request. +cmd.request.officer_notify = {0} has requested to join your faction! +cmd.request.officer_review_hint = Use /f gui > Invites to review. + +# ========== Commands - Info ========== +cmd.info.faction_header = === {0} === +cmd.info.player_header = === {0} === +cmd.info.no_permission = You don't have permission to view faction info. +cmd.info.faction_not_found = Faction '{0}' not found. +cmd.info.not_in_faction_hint = You are not in a faction. Use /f info +cmd.info.leader = Leader: {0} +cmd.info.members = Members: {0}/{1} +cmd.info.power = Power: {0} +cmd.info.claims = Claims: {0} +cmd.info.raidable = RAIDABLE! +cmd.info.allies = Allies: {0} +cmd.info.enemies = Enemies: {0} +cmd.info.they_consider = They consider you: {0} +cmd.info.you_consider = You consider them: {0} +cmd.info.members_no_permission = You don't have permission to view faction members. +cmd.info.members_header = === {0} Members ({1}) === +cmd.info.member_online = [Online] +cmd.info.list_no_permission = You don't have permission to view faction list. +cmd.info.list_empty = There are no factions. +cmd.info.list_header = === Factions ({0}) === +cmd.info.list_entry = {0} - {1} members, {2} power +cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] +cmd.info.help_no_permission = You don't have permission to view help. +cmd.info.who_no_permission = You don't have permission to view player info. +cmd.info.who_faction = Faction: {0} +cmd.info.who_role = Role: {0} +cmd.info.who_joined = Joined: {0} +cmd.info.who_faction_none = Faction: None +cmd.info.who_power = Power: {0} +cmd.info.who_status = Status: {0} +cmd.info.who_last_seen = Last seen: {0} +cmd.info.map_no_permission = You don't have permission to view the map. +cmd.info.map_header = === Territory Map === +cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild +cmd.info.map_gui_hint = Use /f gui for interactive map + +# ========== Commands - Power ========== +cmd.power.personal = Personal Power: {0}/{1} +cmd.power.faction = Faction Power: {0}/{1} +cmd.power.death_loss = Death Loss: {0} +cmd.power.regen = Regen Rate: {0}/hr +cmd.power.no_permission = You don't have permission to view power info. +cmd.power.header = {0}'s Power: +cmd.power.current = Current: {0} + +# ========== Commands - Economy ========== +cmd.economy.balance = Balance: {0} +cmd.economy.deposited = Deposited {0} into the faction treasury. +cmd.economy.withdrawn = Withdrew {0} from the faction treasury. +cmd.economy.transferred = Transferred {0} to {1}. +cmd.economy.insufficient = Insufficient funds in faction treasury. +cmd.economy.invalid_amount = Invalid amount: {0} +cmd.economy.economy_disabled = Economy is disabled. +cmd.economy.balance_no_permission = You don't have permission to view balances. +cmd.economy.treasury_unavailable = Treasury is not available. +cmd.economy.balance_display = {0}'s treasury: {1} +cmd.economy.deposit_no_permission = You don't have permission to deposit. +cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. +cmd.economy.deposit_usage = Usage: /f deposit +cmd.economy.amount_positive = Amount must be positive. +cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} +cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. +cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. +cmd.economy.withdraw_no_permission = You don't have permission to withdraw. +cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. +cmd.economy.withdraw_usage = Usage: /f withdraw +cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} +cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. +cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. +cmd.economy.withdraw_failed = Withdrawal failed: {0} +cmd.economy.transfer_no_permission = You don't have permission to transfer. +cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. +cmd.economy.transfer_usage = Usage: /f money transfer +cmd.economy.transfer_self = Cannot transfer to your own faction. +cmd.economy.transfer_limit_denied = Transfer denied: {0} +cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. +cmd.economy.transfer_failed = Transfer failed: {0} +cmd.economy.log_no_permission = You don't have permission to view the transaction log. +cmd.economy.log_header = Transaction Log (page {0}/{1}) +cmd.economy.log_empty = No transactions found. +cmd.economy.money_help_header = Treasury Commands: +cmd.economy.money_help_balance = /f money balance [faction] - View balance +cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury +cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury +cmd.economy.money_help_transfer = /f money transfer - Transfer between factions +cmd.economy.money_help_log = /f money log [page] [type] - View transaction history + +# ========== Protection - Action Phrases ========== +protection.action.generic = You can't do that +protection.action.build = You can't build or break blocks +protection.action.interact = You can't interact with that +protection.action.door = You can't use doors +protection.action.container = You can't open containers +protection.action.bench = You can't use crafting stations +protection.action.processing = You can't use processing stations +protection.action.seat = You can't use seats +protection.action.light = You can't toggle lights +protection.action.teleporter = You can't use teleporters +protection.action.crate = You can't use crates +protection.action.tame = You can't tame creatures +protection.action.npc = You can't interact with NPCs +protection.action.mount = You can't mount creatures +protection.action.pve = You can't damage creatures +protection.action.item_drop = You can't drop items +protection.action.item_pickup = You can't pick up items + +# ========== Protection - Denial Reasons ========== +protection.denied.safezone = {0} in a SafeZone. +protection.denied.warzone = {0} in a WarZone. +protection.denied.enemy_claim = {0} in enemy territory. +protection.denied.claimed = {0} in claimed territory. +protection.denied.here = {0} here. +protection.denied.zone = {0} in this zone. +protection.denied.faction_perm = {0} here. (Faction permission: {1}) +protection.denied.ally_territory = {0} here. (Ally territory) +protection.denied.error = Protection error — action blocked for safety. + +# ========== Protection - PvP ========== +protection.pvp.safezone = PvP is disabled in SafeZones. +protection.pvp.same_faction = You cannot attack faction members. +protection.pvp.ally = You cannot attack allies. +protection.pvp.spawn_protected = That player has spawn protection. +protection.pvp.territory_disabled = PvP is disabled in this territory. +protection.pvp.generic = You cannot attack this player. + +# ========== Protection - Entity Damage ========== +protection.mob_damage_disabled = Mob damage is disabled in this zone. +protection.pve_damage_disabled = PvE damage is disabled in this zone. +protection.pve_territory_denied = You cannot damage mobs in this territory. + +# ========== Protection - Combat Tag ========== +protection.combat_tag_command = You cannot use that command while combat tagged. + +# ========== Server Announcements ========== +# These are broadcast to all online players for significant faction events. +# {0}, {1} = dynamic values (faction names, player names) +server_announce.faction_created = {0} has founded the faction {1}! +server_announce.faction_disbanded = The faction {0} has been disbanded! +server_announce.leadership_transfer = {0} is now the leader of {1}! +server_announce.overclaim = {0} has overclaimed territory from {1}! +server_announce.war_declared = {0} has declared war on {1}! +server_announce.alliance_formed = {0} and {1} are now allies! +server_announce.alliance_broken = {0} and {1} are no longer allies! + +# ========== Teleport System ========== +teleport.cooldown_wait = You must wait {0} before teleporting again. +teleport.warmup_start = Teleporting to faction home in {0} seconds... +teleport.combat_cancelled = Teleportation cancelled - you are in combat! +teleport.success_default = Teleported to faction home! +teleport.no_home = Your faction has no home set. +teleport.world_not_found = World not found. +teleport.failed = Teleportation failed. +teleport.countdown = Teleporting in {0} seconds... +teleport.countdown_one = Teleporting in 1 second... +teleport.moved_cancelled = Teleportation cancelled - you moved! +teleport.damage_cancelled = Teleportation cancelled - you took damage! +teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. +teleport.mount_entry_blocked = You can't enter this zone while mounted. + +# ========== Chat Display ========== +chat.display.public = Public +chat.display.faction = Faction +chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/ja-JP/hyperfactions_admin.lang b/src/main/resources/Server/Languages/ja-JP/hyperfactions_admin.lang new file mode 100644 index 00000000..2e8d5b94 --- /dev/null +++ b/src/main/resources/Server/Languages/ja-JP/hyperfactions_admin.lang @@ -0,0 +1,268 @@ +# Language: Japanese (ja-JP) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Japanese translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions Admin GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule + +# ========== Admin Navigation Bar ========== +nav.dashboard = Dashboard +nav.actions = Actions +nav.factions = Factions +nav.players = Players +nav.economy = Economy +nav.zones = Zones +nav.config = Config +nav.backups = Backups +nav.log = Log +nav.updates = Updates +nav.help = Help +nav.version = Version + +# ========== Common Admin Labels ========== +common.faction_not_found = Faction Not Found +common.no_faction = No Faction +common.not_set = Not set +common.on = On +common.off = Off +common.enable = Enable +common.disable = Disable +common.none_paren = (None) +common.invalid_faction = Invalid faction. +common.leader_prefix = Leader: {0} +common.members_suffix = {0} members +common.claims_suffix = {0} claims +common.factions_suffix = {0} factions +common.players_suffix = {0} players +common.chunks_suffix = {0} chunks +common.entries_suffix = {0} entries +common.found_suffix = {0} found +common.power_format = {0}/{1} power +common.raidable = Raidable +common.protected = Protected +common.no_description = No description set. +common.officers_more = +{0} more +common.custom_max = (custom max) +common.default_max = (default max) +common.now = Now +common.ago_suffix = {0} ago +common.just_now = just now +common.no_membership_history = No membership history + +# ========== Admin Dashboard ========== +dashboard.factions_prefix = Factions: {0} +dashboard.members_prefix = Total Members: {0} +dashboard.claims_prefix = Total Claims: {0} + +# ========== Admin Actions ========== +actions.confirm_reset = Confirm Reset? +actions.confirm_trigger = Confirm Trigger? +actions.kd_reset = Reset K/D for {0} players. +actions.kd_reset_failed = Failed to reset K/D: {0} +actions.upkeep_unavailable = Upkeep processor is not available. +actions.upkeep_triggered = Upkeep collection triggered. +actions.upkeep_failed = Upkeep failed: {0} + +# ========== Admin Disband ========== +disband.faction_gone = Faction no longer exists. +disband.success = Faction '{0}' has been disbanded. +disband.failed = Failed to disband: {0} +disband.no_leader = Faction has no leader, cannot disband. + +# ========== Admin Unclaim All ========== +unclaim.removed = [Admin] Removed {0} claims from {1}. +unclaim.no_claims = {0} had no claims to remove. + +# ========== Admin Factions List ========== +factions.home_not_set = Not set +factions.teleported = Teleported to {0}'s home. +factions.no_home = Faction has no home set. +factions.world_not_found = Target world not found. + +# ========== Admin Faction Info ========== +info.faction_gone = This faction no longer exists. + +# ========== Admin Faction Members ========== +members.sort_role = Role +members.sort_online = Online +members.sort_name = Name +members.sort_power = Power +members.promoted = [Admin] Promoted {0} to {1}. +members.demoted = [Admin] Demoted {0} to {1}. +members.kicked = [Admin] Kicked {0} from the faction. + +# ========== Admin Faction Relations ========== +relations.allies_header = ALLIES ({0}) +relations.enemies_header = ENEMIES ({0}) +relations.no_allies = No allies. +relations.no_enemies = No enemies. +relations.neutral_count = {0} neutral factions +relations.since_today = Since: today +relations.since_one_day = Since: 1 day ago +relations.since_days = Since: {0} days ago +relations.set_ally = [Admin] Set mutual ally status with {0}. +relations.set_enemy = Set mutual enemy status with {0}. +relations.set_neutral = [Admin] Set mutual neutral status with {0}. + +# ========== Admin Faction Settings ========== +settings.locked = This setting is locked by server configuration. +settings.perm_toggled = Set {0} to {1}. +settings.color_changed = Set faction color to {0}. +settings.recruitment_set = Set recruitment to {0}. +settings.no_home = [Admin] This faction has no home set. +settings.home_cleared = Cleared faction home for {0}. + +# ========== Sort Dropdown Labels ========== +sort.power = Power +sort.name = Name +sort.members = Members +sort.balance = Balance + +# ========== Admin Players ========== +players.sort_last_online = Last Online +players.sort_faction = Faction +players.sort_online = Online +players.not_online = Player is not online. +players.world_not_found = Target world not found. +players.teleported = [Admin] Teleported to {0}. + +# ========== Admin Player Info ========== +playerinfo.disband_faction = Disband Faction +playerinfo.kick_leader = Kick Leader +playerinfo.enter_valid_number = Enter a valid number. +playerinfo.enter_valid_positive = Enter a valid positive number. +playerinfo.faction_gone = Faction no longer exists. +playerinfo.kd_reset = Reset K/D for {0}. +playerinfo.kicked_success = Kicked {0} from {1}. +playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. +playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). + +# ========== Admin Economy ========== +economy.no_data = No factions with economy data. +economy.amount_zero = Amount cannot be zero. +economy.enter_amount = Please enter an amount. +economy.invalid_number = Invalid number: {0} +economy.error = An error occurred. +economy.balance_negative = Balance cannot be negative. +economy.failed = Failed: {0} +economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. +economy.bulk_failures = ({0} failed) + +# ========== Admin Zones ========== +zones.not_found = Zone not found. +zones.invalid_id = Invalid zone ID. +zones.deleted = Zone {0} deleted. +zones.delete_failed = Failed to delete zone: {0} +zones.no_chunks = No chunks +zones.chunks_suffix = {0} ({1} chunks) + +# ========== Zone Create Wizard ========== +wizard.enter_name = Please enter a zone name. +wizard.name_too_short = Zone name must be at least {0} characters. +wizard.name_too_long = Zone name cannot exceed {0} characters. +wizard.name_taken = A zone with this name already exists. +wizard.radius_range = Radius must be between 1 and {0}. +wizard.create_failed = Could not create zone: {0} +wizard.created_not_found = Zone created but could not be found. +wizard.created = Created {0} '{1}'! +wizard.chunk_claimed = Claimed chunk ({0}, {1}). +wizard.chunk_failed = Could not claim current chunk: {0} +wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. +wizard.radius_no_claims = No chunks could be claimed (area may be occupied). +wizard.no_claims = Zone created with no claims. +wizard.chunks_preview = ~{0} chunks + +# ========== Zone Rename ========== +zone_rename.zone_gone = Zone no longer exists. +zone_rename.enter_name = Please enter a zone name. +zone_rename.too_short = Zone name must be at least {0} character. +zone_rename.too_long = Zone name cannot exceed {0} characters. +zone_rename.same_name = That's already this zone's name. +zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! +zone_rename.name_taken = A zone with that name already exists. +zone_rename.invalid_name = Invalid zone name. +zone_rename.rename_failed = Failed to rename zone: {0} + +# ========== Zone Change Type ========== +zone_type.zone_gone = Zone no longer exists. +zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). +zone_type.failed = Failed to change zone type: {0} + +# ========== Zone Integration Flags ========== +zone_int.zone_not_found = Zone Not Found +zone_int.no_plugin = (no plugin) +zone_int.default = (default) +zone_int.custom = (custom) + +# ========== Activity Log ========== +log.all_types = All Types +log.no_logs = No activity logs matching filters. + +# ========== Version Page ========== +version.active = Active +version.not_found = Not Found +version.not_detected = Not Detected +version.not_installed = Not Installed +version.active_version = Active (v{0}) +version.active_compatible = Active (compatible) +version.active_claims_only = Active (claims only) +version.installed_no_perm = Installed (no perm provider) +version.active_provider = Active ({0}) + +# ========== Admin Main Page ========== +main.reload_hint = Use /f reload to reload configuration. +main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. + +# ========== Zone Flags/Settings ========== +zflags.invalid_flag = Invalid flag. +zflags.zone_not_found = Zone not found. +zflags.conflict = (conflict) +zflags.mixin = (mixin) +zflags.reset_int = Reset integration flags to defaults. +zflags.reset_all = Reset all flags to defaults. +zflags.reset_failed = Failed to reset flags: {0} +zflags.back_to_settings = Back to Settings + +# ========== Zone Properties ========== +zprop.current_custom = Current: "{0}" (custom) +zprop.current_default = Current: "{0}" (default) +zprop.pvp_disabled = PvP Disabled +zprop.pvp_enabled = PvP Enabled +zprop.name_empty = Name cannot be empty. +zprop.renamed = Zone renamed to "{0}". +zprop.name_taken = A zone with that name already exists. +zprop.name_invalid = Invalid name (max 32 characters). +zprop.rename_failed = Failed to rename: {0} +zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. +zprop.upper_set = Upper title set. +zprop.upper_reset = Upper title reset to default. +zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. +zprop.lower_set = Lower title set. +zprop.lower_reset = Lower title reset to default. + +# ========== Relations Additional ========== +relations.failed = Failed: {0} + +# ========== Members Additional ========== +members.never = Never +members.teleported = [Admin] Teleported to {0}. + +# ========== Player Info Additional ========== +playerinfo.records = {0} records +playerinfo.joined_date = Joined: {0} +playerinfo.current = Current +playerinfo.left_date = Left: {0} + +# ========== Zone Map ========== +map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' +map.position = Your Position: Chunk ({0}, {1}) +map.zone_gone = Zone no longer exists. +map.claimed = Claimed chunk ({0}, {1}) for {2}. +map.claim_failed = Failed to claim chunk: {0} +map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. +map.unclaim_failed = Failed to unclaim chunk: {0} +map.chunk_belongs = This chunk belongs to {0}. +map.chunk_faction = This chunk is claimed by a faction. +map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/ja-JP/hyperfactions_gui.lang b/src/main/resources/Server/Languages/ja-JP/hyperfactions_gui.lang new file mode 100644 index 00000000..f5d674f0 --- /dev/null +++ b/src/main/resources/Server/Languages/ja-JP/hyperfactions_gui.lang @@ -0,0 +1,446 @@ +# Language: Japanese (ja-JP) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Japanese translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule + +# ========== Navigation Bar ========== +nav.dashboard = Dashboard +nav.chat = Chat +nav.members = Members +nav.invites = Invites +nav.browser = Browse +nav.map = Map +nav.leaderboard = Leaderboard +nav.relations = Relations +nav.treasury = Treasury +nav.settings = Settings +nav.logs = Logs +nav.help = Help +nav.admin = Admin +nav.create = Create + +# ========== Help Category Names ========== +help.category.welcome = Welcome +help.category.your_faction = Your Faction +help.category.power_land = Power & Land +help.category.diplomacy = Diplomacy +help.category.combat = Combat & Safety +help.category.economy = Economy +help.category.quick_ref = Quick Reference + +# ========== Main Menu ========== +main_menu.section_my_faction = My Faction +main_menu.section_get_started = Get Started +main_menu.section_territory = Territory +main_menu.section_browse = Browse +main_menu.section_admin = Admin +main_menu.claim_hint = Use /f claim to claim territory. + +# ========== Faction Info Page ========== +faction_info.no_description = No description set. +faction_info.status_open = Open +faction_info.status_invite_only = Invite Only +faction_info.status_raidable = Raidable +faction_info.status_protected = Protected +faction_info.officers_more = +{0} more + +# ========== Rename Modal ========== +rename.no_permission = You don't have permission to rename the faction. +rename.enter_name = Please enter a faction name. +rename.too_short = Faction name must be at least {0} characters. +rename.too_long = Faction name cannot exceed {0} characters. +rename.same_name = That's already your faction's name. +rename.name_taken = A faction with that name already exists. +rename.success = Faction renamed from {0} to {1}! + +# ========== Description Modal ========== +desc.no_permission = You don't have permission to edit the description. +desc.display_none = (None) +desc.cleared = Faction description cleared. +desc.updated = Faction description updated! + +# ========== Tag Modal ========== +tag.no_permission = You don't have permission to edit the tag. +tag.display_none = (None) +tag.cleared = Faction tag cleared. +tag.too_short = Tag must be at least {0} character. +tag.too_long = Tag cannot exceed {0} characters. +tag.invalid_format = Tag can only contain letters and numbers. +tag.same_tag = That's already your faction's tag. +tag.tag_taken = A faction with that tag already exists. +tag.success = Faction tag set to [{0}]! + +# ========== Dashboard Page ========== +dashboard.faction_gone = Your faction no longer exists. +dashboard.available = {0} available +dashboard.at_risk = At Risk! +dashboard.online_count = {0} online +dashboard.status_invite = Invite +dashboard.in_grace = IN GRACE +dashboard.billable_chunks = {0} billable chunks +dashboard.btn_home = Home +dashboard.btn_set_home = Set Home +dashboard.btn_claim = Claim +dashboard.chat_prefix = Chat: {0} +dashboard.btn_leave = Leave +dashboard.no_activity = No recent activity. +dashboard.time_now = now +dashboard.time_minutes = {0}m ago +dashboard.time_hours = {0}h ago +dashboard.time_days = {0}d ago +dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. +dashboard.chat_mode_set = Chat mode: {0} +dashboard.claim_success = Claimed chunk at ({0}, {1}) + +# ========== Faction Main Page ========== +main.no_faction = No Faction +main.joined = You joined the faction! +main.join_failed = Failed to join faction: {0} +main.invite_declined = Invite declined. +main.cooldown = Teleport on cooldown! {0}s remaining. +main.world_not_found = Cannot teleport - world not found. +main.leave_failed = Failed to leave: {0} + +# ========== Shared GUI Labels ========== +common.faction_count = {0} factions +common.leader_label = Leader: {0} +common.sort_power = Power +common.sort_members = Members +common.page_format = {0}/{1} +common.own_faction = (You) + +# ========== Members Page ========== +members.count = {0} members +members.sort_role = Role +members.sort_last_online = Last Online +members.just_now = just now +members.ago = {0} ago +members.never = Never +members.member_not_found = Member not found. +members.promoted = Promoted {0} to {1}. +members.promote_failed = Failed to promote: {0} +members.demoted = Demoted {0} to {1}. +members.demote_failed = Failed to demote: {0} +members.kicked = Kicked {0} from the faction. +members.kick_failed = Failed to kick: {0} + +# ========== Browser Page ========== +browser.sort_name = Name +browser.invalid_faction = Invalid faction. + +# ========== Leaderboard Page ========== +leaderboard.sort_kd = K/D +leaderboard.sort_territory = Territory +leaderboard.sort_balance = Balance + +# ========== Player Info Page ========== +playerinfo.now = Now +playerinfo.history_count = {0} records +playerinfo.joined_label = Joined: {0} +playerinfo.current = Current +playerinfo.left_label = Left: {0} +playerinfo.no_history = No membership history +playerinfo.faction_gone = Faction no longer exists. +playerinfo.reason_active = ACTIVE +playerinfo.reason_left = LEFT +playerinfo.reason_kicked = KICKED +playerinfo.reason_disbanded = DISBANDED + +# ========== Relations Page ========== +relations.relation_count = {0} relations +relations.request_count = {0} requests +relations.type_ally = Ally +relations.type_enemy = Enemy +relations.type_incoming = Incoming +relations.type_outgoing = Outgoing +relations.incoming_request = Incoming request +relations.outgoing_request = Outgoing request +relations.empty_relations = No relations yet. +relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. +relations.empty_pending = No pending ally requests. +relations.today = Today +relations.one_day_ago = 1 day ago +relations.days_ago = {0} days ago +relations.now_neutral = Now neutral with {0}. +relations.now_enemies = Now enemies with {0}! +relations.request_sent = Alliance request sent to {0}. +relations.now_allied = Now allied with {0}! +relations.request_declined = Ally request from {0} declined. +relations.request_cancelled = Ally request to {0} cancelled. +relations.failed = Failed: {0} +relations.search_hint = Search for a faction to set relation +relations.no_results = No factions found matching '{0}' +relations.power_display = {0} power +relations.member_count = {0} members + +# ========== Settings Page ========== +settings.officers_only = Only officers and leaders can change faction settings. +settings.display_none = (None) +settings.home_not_set = Not set +settings.no_permission = You don't have permission to change settings. +settings.only_leader_disband = Only the leader can disband the faction. +settings.perm_locked = This setting is locked by the server. +settings.no_perm_edit = You don't have permission to edit territory permissions. +settings.only_leader_officers = Only the leader can change officer access. +settings.pvp_enabled = Enabled +settings.pvp_disabled = Disabled +settings.not_in_territory = You must be in your faction's territory to set home. +settings.home_set = Faction home set to your current location! +settings.recruitment_set = Recruitment set to {0}. +settings.home_no_set = Your faction does not have a home set. +settings.home_deleted = Faction home deleted! + +# ========== Modules Page ========== +modules.treasury_name = Treasury +modules.treasury_desc = Faction bank & economy system +modules.raids_name = Raids +modules.raids_desc = Scheduled faction battles +modules.levels_name = Levels +modules.levels_desc = Faction progression & XP +modules.war_name = War +modules.war_desc = Formal war declarations +modules.coming_soon = Coming Soon +modules.active = Active +modules.view_treasury = View Treasury +modules.unavailable = Unavailable +modules.no_economy = No economy plugin detected +modules.disabled = Disabled +modules.economy_not_available = Economy features are not available on this server + +# ========== Treasury Page ========== +treasury.wallet_label = Your wallet: {0} +treasury.treasury_label = Treasury balance: {0} +treasury.chunks_detail = {0} free + {1} billable chunks +treasury.cost_label = Cost: {0} +treasury.pending = Pending +treasury.auto_pay_on = Auto-pay: ON +treasury.auto_pay_off = Auto-pay: OFF +treasury.runway_90_plus = 90+ days +treasury.runway_days = {0} days +treasury.runway_day = {0} day +treasury.runway_less_day = < 1 day +treasury.runway_no_funds = No funds +treasury.grace_expires = Grace expires in: {0} +treasury.missed_payments = Missed payments: {0} +treasury.pay_to_clear = Pay {0} to clear grace +treasury.system = System +treasury.type_deposit = Deposit +treasury.type_withdrawal = Withdrawal +treasury.type_transfer_in = Transfer In +treasury.type_transfer_out = Transfer Out +treasury.type_player_transfer = Player Transfer +treasury.type_upkeep = Upkeep +treasury.type_tax = Tax Collection +treasury.type_war_cost = War Cost +treasury.type_raid_cost = Raid Cost +treasury.type_spoils = Spoils +treasury.type_admin = Admin Adjustment +treasury.deposit_title = Deposit to Treasury +treasury.withdraw_title = Withdraw from Treasury +treasury.fee_label = Fee ({0}%) +treasury.confirm_deposit = Confirm Deposit +treasury.confirm_withdrawal = Confirm Withdrawal +treasury.from_wallet = {0} from wallet +treasury.to_wallet = {0} to wallet +treasury.enter_valid_amount = Enter a valid positive amount. +treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. +treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. +treasury.deposit_failed_returned = Failed to deposit. Money returned. +treasury.deposited = Deposited {0} into the treasury. +treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) +treasury.no_withdraw_permission = You don't have permission to withdraw. +treasury.withdraw_denied = Withdrawal denied: {0} +treasury.insufficient_treasury = Insufficient funds in treasury. +treasury.withdraw_limit = Withdrawal limit exceeded. +treasury.withdraw_failed = Withdrawal failed: {0} +treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. +treasury.withdrew = Withdrew {0} from the treasury. +treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) +treasury.search_hint = Search for a player or faction +treasury.no_results = No results for '{0}' +treasury.tag_player = [Player] +treasury.tag_faction = [Faction] +treasury.source_online = Online +treasury.source_offline = Offline +treasury.source_player_db = Hytale player +treasury.no_transfer_permission = You don't have permission to transfer. +treasury.transfer_denied = Transfer denied: {0} +treasury.invalid_target_faction = Invalid target faction. +treasury.target_faction_gone = Target faction no longer exists. +treasury.transfer_failed = Transfer failed: {0} +treasury.transfer_failed_returned = Transfer failed. Funds returned. +treasury.transferred = Transferred {0} to {1}. +treasury.invalid_target_player = Invalid target player. +treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. +treasury.leader_only_perms = Only the leader can change treasury permissions. +treasury.leader_only_upkeep = Only the leader can change upkeep settings. +treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. + +# ========== Confirmation Pages ========== +confirm.disband_not_leader = Only the leader can disband the faction. +confirm.disbanded = Faction '{0}' has been disbanded. +confirm.disband_failed = Failed to disband faction. +confirm.succession_title = Leadership will transfer to: +confirm.no_members_warning = WARNING: No other members! +confirm.will_disband = Leaving will disband the faction permanently. +confirm.not_in_faction = You are not in this faction. +confirm.not_leader_anymore = You are no longer the leader. +confirm.no_successor = No successor available. Use disband instead. +confirm.transfer_failed = Failed to transfer leadership: {0} +confirm.leader_left = Leadership transferred to {0}. You have left {1}. +confirm.leave_failed = Failed to leave faction: {0} +confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. +confirm.left_faction = You have left {0}. +confirm.faction_gone = Faction no longer exists. +confirm.not_leader_transfer = Only the leader can transfer leadership. +confirm.leadership_transferred = Leadership transferred to {0}. + +# ========== Logs Viewer Page ========== +logs.title = {0} - Activity Logs +logs.entry_count = {0} entries +logs.all_types = All Types +logs.no_logs_type = No logs of this type. +logs.no_logs = No activity logs yet. + +# ========== Chat Page ========== +chat.placeholder = Type a message... +chat.no_messages = No messages yet. +chat.no_ally_permission = You don't have permission for ally chat. +chat.no_permission = No permission. +chat.faction_gone = Your faction no longer exists. +chat.time_now = now +chat.time_minutes = {0}m +chat.time_hours = {0}h + +# ========== Invites Page ========== +invites.invite_count = {0} invites +invites.request_count = {0} requests +invites.invited_by = Invited by: {0} +invites.no_message = No message +invites.expires = Expires: {0} +invites.type_outgoing = Outgoing +invites.type_request = Request +invites.invited_by_label = Invited by: +invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. +invites.empty_requests = No join requests. Players can request to join with /f request. +invites.invalid_player = Invalid player. +invites.cancelled_invite = Cancelled invite to {0}. +invites.player_joined = {0} has joined the faction! +invites.faction_full = Faction is full. Cannot accept request. +invites.add_failed = Failed to add player to faction. +invites.request_expired = Request not found or expired. +invites.request_declined = Declined join request from {0}. +invites.time_seconds = {0}s +invites.time_minutes = {0}m +invites.time_hours = {0}h + +# ========== Map Page ========== +map.position = Your Position: Chunk ({0}, {1}) +map.legend_protected = Protected +map.claim_stats = Claims: {0}/{1} ({2} Available) +map.overclaimed = OVERCLAIMED by {0}! +map.power_display = Power: {0}/{1} +map.join_to_claim = Join a faction to claim +map.claim_success = Claimed chunk at ({0}, {1})! +map.claim_not_in_faction = You must be in a faction to claim territory. +map.claim_not_officer = Only officers and leaders can claim territory. +map.claim_already_yours = You already own this chunk. +map.claim_already_claimed = This chunk is already claimed by another faction. +map.claim_not_adjacent = You can only claim chunks adjacent to your territory. +map.claim_max = You have reached your maximum claim limit. +map.claim_world_not_allowed = Claiming is not allowed in this world. +map.claim_orbisguard = This area is protected by OrbisGuard. +map.claim_failed = Failed to claim chunk. +map.unclaim_success = Unclaimed chunk at ({0}, {1}). +map.unclaim_not_in_faction = You must be in a faction. +map.unclaim_not_officer = Only officers and leaders can unclaim territory. +map.unclaim_not_claimed = This chunk is not claimed. +map.unclaim_not_yours = This chunk belongs to another faction. +map.unclaim_home = Cannot unclaim the chunk containing your faction home. +map.unclaim_failed = Failed to unclaim chunk. +map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! +map.overclaim_not_in_faction = You must be in a faction. +map.overclaim_not_officer = Only officers and leaders can overclaim territory. +map.overclaim_already_yours = You already own this chunk. +map.overclaim_ally = You cannot overclaim allied territory. +map.overclaim_has_power = This faction has enough power to defend their territory. +map.overclaim_max = You have reached your maximum claim limit. +map.overclaim_failed = Failed to overclaim chunk. +# ========== Create Faction Page ========== +create.preview_name = Your Faction Name +create.leader_prefix = Leader: {0} +create.enter_name = Please enter a faction name. +create.name_too_short = Faction name must be at least {0} characters. +create.name_too_long = Faction name cannot exceed {0} characters. +create.name_taken = A faction with this name already exists. +create.tag_length = Faction tag must be {0}-{1} characters. +create.tag_format = Faction tag can only contain letters and numbers. +create.desc_too_long = Description cannot exceed {0} characters. +create.created = Faction {0} created successfully! +create.created_no_dashboard = Faction created but could not open dashboard. +create.invalid_name = Invalid faction name. +create.create_failed = Could not create faction. + +# ========== New Player Pages ========== +newplayer.pending_count = {0} pending +newplayer.received_header = RECEIVED INVITES ({0}) +newplayer.requests_header = YOUR REQUESTS ({0}) +newplayer.no_invites = No invites. Browse factions to find one! +newplayer.no_requests = No pending requests. +newplayer.invited_by = Invited by: {0} +newplayer.member_count = {0} members +newplayer.power_count = {0} power +newplayer.claim_count = {0} claims +newplayer.awaiting_review = Awaiting review +newplayer.expires_in = Expires in {0}h +newplayer.time_just_now = just now +newplayer.time_minutes = {0} min ago +newplayer.time_hours = {0}h ago +newplayer.time_days = {0}d ago +newplayer.invalid_faction = Invalid faction. +newplayer.invite_expired = This invite has expired or was revoked. +newplayer.faction_gone = Faction no longer exists. +newplayer.joined = You joined {0}! +newplayer.faction_full = This faction is full. +newplayer.join_failed = Could not join faction. +newplayer.invite_declined = Invite declined. +newplayer.request_cancelled = Cancelled request to join {0}. +newplayer.faction_count = {0} factions +newplayer.browse_subtitle = Find your new home! +newplayer.sort_power = Power +newplayer.sort_name = Name +newplayer.sort_members = Members +newplayer.btn_accept = Accept +newplayer.btn_pending = Pending +newplayer.btn_join = Join +newplayer.btn_request = Request +newplayer.invite_only_msg = This faction is invite-only. +newplayer.welcome_hint = Welcome! Use /f to open faction menu. +newplayer.faction_open_hint = This faction is open! Click JOIN instead. +newplayer.already_requested = You already have a pending request to this faction. +newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. +newplayer.request_sent = Join request sent to {0}! +newplayer.officer_review = An officer will review your request. +newplayer.map_hint = View Only - Join a faction to claim territory! + +# Player Settings +nav.player_settings = Settings +player_settings.title = Player Settings +player_settings.language_section = Language +player_settings.auto_detect = Auto-detect from client +player_settings.auto_detect_desc = Uses your game client's language setting +player_settings.language_label = Language +player_settings.notifications_section = Notifications +player_settings.territory_alerts = Territory Alerts +player_settings.territory_alerts_desc = Show notifications when entering/leaving territories +player_settings.death_announcements = Death Broadcasts +player_settings.death_announcements_desc = Receive faction member death location announcements +player_settings.power_notifications = Power Changes +player_settings.power_notifications_desc = Show messages when your power changes +player_settings.language_changed = Language changed to {0} +player_settings.pref_enabled = {0} enabled +player_settings.pref_disabled = {0} disabled diff --git a/src/main/resources/Server/Languages/pt-BR/hyperfactions.lang b/src/main/resources/Server/Languages/pt-BR/hyperfactions.lang new file mode 100644 index 00000000..c45e3ffb --- /dev/null +++ b/src/main/resources/Server/Languages/pt-BR/hyperfactions.lang @@ -0,0 +1,452 @@ +# Language: Brazilian Portuguese (pt-BR) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Brazilian Portuguese translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions - English Translations +# Format: key = value (or key = "quoted value") +# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule +# Placeholders: {0}, {1}, etc. + +# ========== Common ========== +common.no_permission = You don't have permission to do that. +common.not_in_faction = You are not in a faction. +common.already_in_faction = You are already in a faction. +common.player_not_found = Player not found. +common.faction_not_found = Faction not found. +common.player_not_online = That player is not online. +common.must_be_leader = Only the faction leader can do that. +common.must_be_officer = You must be an Officer or Leader to do that. +common.combat_tagged = You can't do that while combat tagged. +common.cancel = Cancel +common.confirm = Confirm +common.save = Save +common.close = Close +common.yes = Yes +common.no = No +common.loading = Loading... +common.online = Online +common.offline = Offline +common.enabled = Enabled +common.disabled = Disabled +common.none = None +common.page = Page {0} of {1} +common.unknown = Unknown +common.error_generic = Something went wrong. Please try again. +common.gui_fallback = Could not access GUI. Use /f help for commands. +common.admin_prefix = [Admin] +common.location_error = Could not determine your location. +common.world_error = Could not determine your world. +common.invalid_id = Invalid faction ID. +common.na = N/A + +# ========== Commands - Create ========== +cmd.create.no_permission = You don't have permission to create factions. +cmd.create.usage = Usage: /f create +cmd.create.success = Faction '{0}' created! +cmd.create.already_in_named = You are already in {0}. +cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. +cmd.create.name_taken = That faction name is already taken. +cmd.create.name_too_short = Faction name is too short. +cmd.create.name_too_long = Faction name is too long. +cmd.create.failed = Failed to create faction. + +# ========== Commands - Disband ========== +cmd.disband.no_permission = You don't have permission to disband factions. +cmd.disband.not_leader = Only the faction leader can disband. +cmd.disband.confirm_prompt = Are you sure you want to disband your faction? +cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. +cmd.disband.success = Your faction has been disbanded. +cmd.disband.failed = Failed to disband faction. +cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. + +# ========== Commands - Rename ========== +cmd.rename.no_permission = You don't have permission. +cmd.rename.not_leader = Only the leader can rename the faction. +cmd.rename.usage = Usage: /f rename +cmd.rename.too_short = Name is too short (min {0} chars). +cmd.rename.too_long = Name is too long (max {0} chars). +cmd.rename.name_taken = That name is already taken. +cmd.rename.success = Faction renamed to {0}! +cmd.rename.broadcast = {0} renamed the faction to {1} + +# ========== Commands - Description ========== +cmd.desc.no_permission = You don't have permission. +cmd.desc.not_officer = You must be an officer to set the description. +cmd.desc.set = Faction description set! +cmd.desc.cleared = Faction description cleared. + +# ========== Commands - Open / Close ========== +cmd.open.no_permission = You don't have permission. +cmd.open.not_leader = Only the leader can change this setting. +cmd.open.already_open = Your faction is already open. +cmd.open.success = Your faction is now open! Anyone can join with /f join. +cmd.open.broadcast = {0} opened the faction to public joining. +cmd.close.no_permission = You don't have permission. +cmd.close.not_leader = Only the leader can change this setting. +cmd.close.already_closed = Your faction is already closed. +cmd.close.success = Your faction is now invite-only. +cmd.close.broadcast = {0} closed the faction to invite-only. + +# ========== Commands - Color ========== +cmd.color.no_permission = You don't have permission. +cmd.color.not_officer = You must be an officer to change the color. +cmd.color.colors_disabled = Faction colors are disabled. +cmd.color.usage = Usage: /f color +cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex +cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. +cmd.color.success = Faction color updated! + +# ========== Commands - Claim ========== +cmd.claim.no_permission = You don't have permission to claim territory. +cmd.claim.already_yours = Your faction already owns this chunk. +cmd.claim.cannot_claim_ally = You cannot claim ally territory. +cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. +cmd.claim.success = Claimed chunk at {0}, {1}! +cmd.claim.not_officer = You must be an officer to claim land. +cmd.claim.already_claimed = This chunk is already claimed. +cmd.claim.max_claims = Your faction has reached max claims. Get more power! +cmd.claim.not_adjacent = You must claim adjacent to existing territory. +cmd.claim.world_not_allowed = Claiming is not allowed in this world. +cmd.claim.orbisguard = This area is protected by OrbisGuard. +cmd.claim.zone_protected = This chunk is in a safezone or warzone. +cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. +cmd.claim.failed = Failed to claim chunk. + +# ========== Commands - Invite ========== +cmd.invite.no_permission = You don't have permission to invite players. +cmd.invite.not_officer = You must be an officer to invite players. +cmd.invite.usage = Usage: /f invite +cmd.invite.player_not_found = Player '{0}' not found or offline. +cmd.invite.target_in_faction = That player is already in a faction. +cmd.invite.sent = Invited {0} to your faction. +cmd.invite.received = You have been invited to join {0}! +cmd.invite.accept_hint = Type /f accept {0} to join. + +# ========== Commands - Accept / Join ========== +cmd.join.no_permission = You don't have permission to join factions. +cmd.join.already_in_named = You are already in {0}. +cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.join.no_invites = You have no pending invites. +cmd.join.faction_not_found = Faction '{0}' not found. +cmd.join.not_invited = You have no invite from that faction. +cmd.join.faction_gone = That faction no longer exists. +cmd.join.success = You have joined {0}! +cmd.join.broadcast = {0} has joined the faction! +cmd.join.faction_full = That faction is full. +cmd.join.failed = Failed to join faction. + +# ========== Commands - Kick ========== +cmd.kick.no_permission = You don't have permission to kick members. +cmd.kick.usage = Usage: /f kick +cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. +cmd.kick.success = Kicked {0} from the faction. +cmd.kick.broadcast = {0} was kicked from the faction. +cmd.kick.kicked = You have been kicked from the faction. +cmd.kick.cannot_kick_higher = You don't have permission to kick that player. +cmd.kick.cannot_kick_leader = You cannot kick the faction leader. +cmd.kick.failed = Failed to kick player. + +# ========== Commands - Leave ========== +cmd.leave.no_permission = You don't have permission to leave factions. +cmd.leave.confirm_prompt = Are you sure you want to leave your faction? +cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. +cmd.leave.success = You have left your faction. +cmd.leave.broadcast = {0} has left the faction. +cmd.leave.failed = Failed to leave faction. +cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. + +# ========== Commands - Promote / Demote / Transfer ========== +cmd.rank.promote_no_permission = You don't have permission to promote members. +cmd.rank.promote_usage = Usage: /f promote +cmd.rank.promoted = Promoted {0} to {1}! +cmd.rank.promote_broadcast = {0} was promoted to {1}! +cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. +cmd.rank.promote_failed = Failed to promote player. +cmd.rank.demote_no_permission = You don't have permission to demote members. +cmd.rank.demote_usage = Usage: /f demote +cmd.rank.demoted = Demoted {0} to {1}. +cmd.rank.demote_broadcast = {0} was demoted to {1}. +cmd.rank.already_lowest = That player is already a Member. +cmd.rank.demote_failed = Failed to demote player. +cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. +cmd.rank.transfer_usage = Usage: /f transfer +cmd.rank.player_not_in_faction = Player not found in your faction. +cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? +cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. +cmd.rank.transferred = Transferred leadership to {0}! +cmd.rank.transfer_broadcast = {0} is now the faction leader! +cmd.rank.transfer_failed = Failed to transfer leadership. +cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. + +# ========== Commands - Unclaim ========== +cmd.unclaim.no_permission = You don't have permission to unclaim territory. +cmd.unclaim.success = Unclaimed chunk at {0}, {1}. +cmd.unclaim.not_officer = You must be an officer to unclaim land. +cmd.unclaim.chunk_not_claimed = This chunk is not claimed. +cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. +cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. +cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. +cmd.unclaim.failed = Failed to unclaim chunk. + +# ========== Commands - Overclaim ========== +cmd.overclaim.no_permission = You don't have permission to overclaim territory. +cmd.overclaim.success = Overclaimed enemy territory! +cmd.overclaim.not_officer = You must be an officer to overclaim. +cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. +cmd.overclaim.own_chunk = Your faction already owns this chunk. +cmd.overclaim.ally = You cannot overclaim ally territory. +cmd.overclaim.target_has_power = This faction still has enough power. +cmd.overclaim.failed = Failed to overclaim. + +# ========== Commands - Stuck ========== +cmd.stuck.no_permission = You don't have permission to use /f stuck. +cmd.stuck.not_stuck = You're not stuck - this is wilderness. +cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! +cmd.stuck.no_safe = Could not find a safe location. +cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! + +# ========== Commands - Home ========== +cmd.home.no_permission = You don't have permission to teleport to faction home. +cmd.home.no_home = Your faction has no home set. +cmd.home.combat_tagged = You cannot teleport while in combat! +cmd.home.teleported = Teleported to faction home! + +# ========== Commands - SetHome ========== +cmd.sethome.no_permission = You don't have permission to set faction home. +cmd.sethome.world_not_allowed = Cannot set home in this world. +cmd.sethome.not_in_territory = You can only set home in your faction's territory. +cmd.sethome.set = Faction home set! +cmd.sethome.broadcast = {0} set the faction home. +cmd.sethome.not_officer = You must be an officer to set the home. +cmd.sethome.failed = Failed to set home. + +# ========== Commands - DelHome ========== +cmd.delhome.no_permission = You don't have permission to delete faction home. +cmd.delhome.no_home = Your faction does not have a home set. +cmd.delhome.deleted = Faction home deleted! +cmd.delhome.broadcast = {0} deleted the faction home. +cmd.delhome.not_officer = You must be an officer to delete the home. +cmd.delhome.failed = Failed to delete home. + +# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== +cmd.relation.ally_no_permission = You don't have permission to manage alliances. +cmd.relation.ally_usage = Usage: /f ally +cmd.relation.ally_sent = Ally request sent to {0}! +cmd.relation.ally_formed = You are now allies with {0}! +cmd.relation.already_ally = You are already allied with that faction. +cmd.relation.ally_failed = Failed to send ally request. +cmd.relation.enemy_no_permission = You don't have permission to declare enemies. +cmd.relation.enemy_usage = Usage: /f enemy +cmd.relation.enemy_declared = {0} is now your enemy! +cmd.relation.already_enemy = You are already enemies with that faction. +cmd.relation.max_enemies = You have reached the maximum number of enemies. +cmd.relation.enemy_failed = Failed to set enemy. +cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. +cmd.relation.neutral_usage = Usage: /f neutral +cmd.relation.neutral_set = Your faction is now neutral with {0}. +cmd.relation.already_neutral = You are already neutral with that faction. +cmd.relation.neutral_failed = Failed to set neutral. +cmd.relation.cannot_self = You cannot ally with yourself. +cmd.relation.max_allies = You have reached the maximum number of allies. +cmd.relation.view_no_permission = You don't have permission to view relations. +cmd.relation.header = === Faction Relations === +cmd.relation.allies_count = Allies ({0}): +cmd.relation.enemies_count = Enemies ({0}): +cmd.relation.list_entry = - {0} + +# ========== Commands - Chat ========== +cmd.chat.usage = Usage: /f c [f|a|off] +cmd.chat.no_permission = You don't have permission for that chat mode. +cmd.chat.mode_set = Chat mode set to {0} + +# ========== Commands - Invites ========== +cmd.invites.not_officer = You must be an officer to manage invites. +cmd.invites.header = === Faction Invites === +cmd.invites.no_pending = No pending invites or requests. +cmd.invites.outgoing = Outgoing Invites: +cmd.invites.outgoing_entry = {0} (invited by {1}) +cmd.invites.requests = Join Requests: +cmd.invites.request_entry = {0}{1} +cmd.invites.your_invites_header = === Your Invites === +cmd.invites.no_invites = You have no pending invites. +cmd.invites.invite_entry = {0} - Use /f accept {1} + +# ========== Commands - Request ========== +cmd.request.no_permission = You don't have permission to request faction membership. +cmd.request.already_in_named = You are already in {0}. +cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.request.usage = Usage: /f request [message] +cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. +cmd.request.already_requested = You already have a pending request to that faction. +cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. +cmd.request.sent = Sent join request to {0}! +cmd.request.your_message = Your message: "{0}" +cmd.request.officer_review = An officer will review your request. +cmd.request.officer_notify = {0} has requested to join your faction! +cmd.request.officer_review_hint = Use /f gui > Invites to review. + +# ========== Commands - Info ========== +cmd.info.faction_header = === {0} === +cmd.info.player_header = === {0} === +cmd.info.no_permission = You don't have permission to view faction info. +cmd.info.faction_not_found = Faction '{0}' not found. +cmd.info.not_in_faction_hint = You are not in a faction. Use /f info +cmd.info.leader = Leader: {0} +cmd.info.members = Members: {0}/{1} +cmd.info.power = Power: {0} +cmd.info.claims = Claims: {0} +cmd.info.raidable = RAIDABLE! +cmd.info.allies = Allies: {0} +cmd.info.enemies = Enemies: {0} +cmd.info.they_consider = They consider you: {0} +cmd.info.you_consider = You consider them: {0} +cmd.info.members_no_permission = You don't have permission to view faction members. +cmd.info.members_header = === {0} Members ({1}) === +cmd.info.member_online = [Online] +cmd.info.list_no_permission = You don't have permission to view faction list. +cmd.info.list_empty = There are no factions. +cmd.info.list_header = === Factions ({0}) === +cmd.info.list_entry = {0} - {1} members, {2} power +cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] +cmd.info.help_no_permission = You don't have permission to view help. +cmd.info.who_no_permission = You don't have permission to view player info. +cmd.info.who_faction = Faction: {0} +cmd.info.who_role = Role: {0} +cmd.info.who_joined = Joined: {0} +cmd.info.who_faction_none = Faction: None +cmd.info.who_power = Power: {0} +cmd.info.who_status = Status: {0} +cmd.info.who_last_seen = Last seen: {0} +cmd.info.map_no_permission = You don't have permission to view the map. +cmd.info.map_header = === Territory Map === +cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild +cmd.info.map_gui_hint = Use /f gui for interactive map + +# ========== Commands - Power ========== +cmd.power.personal = Personal Power: {0}/{1} +cmd.power.faction = Faction Power: {0}/{1} +cmd.power.death_loss = Death Loss: {0} +cmd.power.regen = Regen Rate: {0}/hr +cmd.power.no_permission = You don't have permission to view power info. +cmd.power.header = {0}'s Power: +cmd.power.current = Current: {0} + +# ========== Commands - Economy ========== +cmd.economy.balance = Balance: {0} +cmd.economy.deposited = Deposited {0} into the faction treasury. +cmd.economy.withdrawn = Withdrew {0} from the faction treasury. +cmd.economy.transferred = Transferred {0} to {1}. +cmd.economy.insufficient = Insufficient funds in faction treasury. +cmd.economy.invalid_amount = Invalid amount: {0} +cmd.economy.economy_disabled = Economy is disabled. +cmd.economy.balance_no_permission = You don't have permission to view balances. +cmd.economy.treasury_unavailable = Treasury is not available. +cmd.economy.balance_display = {0}'s treasury: {1} +cmd.economy.deposit_no_permission = You don't have permission to deposit. +cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. +cmd.economy.deposit_usage = Usage: /f deposit +cmd.economy.amount_positive = Amount must be positive. +cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} +cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. +cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. +cmd.economy.withdraw_no_permission = You don't have permission to withdraw. +cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. +cmd.economy.withdraw_usage = Usage: /f withdraw +cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} +cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. +cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. +cmd.economy.withdraw_failed = Withdrawal failed: {0} +cmd.economy.transfer_no_permission = You don't have permission to transfer. +cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. +cmd.economy.transfer_usage = Usage: /f money transfer +cmd.economy.transfer_self = Cannot transfer to your own faction. +cmd.economy.transfer_limit_denied = Transfer denied: {0} +cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. +cmd.economy.transfer_failed = Transfer failed: {0} +cmd.economy.log_no_permission = You don't have permission to view the transaction log. +cmd.economy.log_header = Transaction Log (page {0}/{1}) +cmd.economy.log_empty = No transactions found. +cmd.economy.money_help_header = Treasury Commands: +cmd.economy.money_help_balance = /f money balance [faction] - View balance +cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury +cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury +cmd.economy.money_help_transfer = /f money transfer - Transfer between factions +cmd.economy.money_help_log = /f money log [page] [type] - View transaction history + +# ========== Protection - Action Phrases ========== +protection.action.generic = You can't do that +protection.action.build = You can't build or break blocks +protection.action.interact = You can't interact with that +protection.action.door = You can't use doors +protection.action.container = You can't open containers +protection.action.bench = You can't use crafting stations +protection.action.processing = You can't use processing stations +protection.action.seat = You can't use seats +protection.action.light = You can't toggle lights +protection.action.teleporter = You can't use teleporters +protection.action.crate = You can't use crates +protection.action.tame = You can't tame creatures +protection.action.npc = You can't interact with NPCs +protection.action.mount = You can't mount creatures +protection.action.pve = You can't damage creatures +protection.action.item_drop = You can't drop items +protection.action.item_pickup = You can't pick up items + +# ========== Protection - Denial Reasons ========== +protection.denied.safezone = {0} in a SafeZone. +protection.denied.warzone = {0} in a WarZone. +protection.denied.enemy_claim = {0} in enemy territory. +protection.denied.claimed = {0} in claimed territory. +protection.denied.here = {0} here. +protection.denied.zone = {0} in this zone. +protection.denied.faction_perm = {0} here. (Faction permission: {1}) +protection.denied.ally_territory = {0} here. (Ally territory) +protection.denied.error = Protection error — action blocked for safety. + +# ========== Protection - PvP ========== +protection.pvp.safezone = PvP is disabled in SafeZones. +protection.pvp.same_faction = You cannot attack faction members. +protection.pvp.ally = You cannot attack allies. +protection.pvp.spawn_protected = That player has spawn protection. +protection.pvp.territory_disabled = PvP is disabled in this territory. +protection.pvp.generic = You cannot attack this player. + +# ========== Protection - Entity Damage ========== +protection.mob_damage_disabled = Mob damage is disabled in this zone. +protection.pve_damage_disabled = PvE damage is disabled in this zone. +protection.pve_territory_denied = You cannot damage mobs in this territory. + +# ========== Protection - Combat Tag ========== +protection.combat_tag_command = You cannot use that command while combat tagged. + +# ========== Server Announcements ========== +# These are broadcast to all online players for significant faction events. +# {0}, {1} = dynamic values (faction names, player names) +server_announce.faction_created = {0} has founded the faction {1}! +server_announce.faction_disbanded = The faction {0} has been disbanded! +server_announce.leadership_transfer = {0} is now the leader of {1}! +server_announce.overclaim = {0} has overclaimed territory from {1}! +server_announce.war_declared = {0} has declared war on {1}! +server_announce.alliance_formed = {0} and {1} are now allies! +server_announce.alliance_broken = {0} and {1} are no longer allies! + +# ========== Teleport System ========== +teleport.cooldown_wait = You must wait {0} before teleporting again. +teleport.warmup_start = Teleporting to faction home in {0} seconds... +teleport.combat_cancelled = Teleportation cancelled - you are in combat! +teleport.success_default = Teleported to faction home! +teleport.no_home = Your faction has no home set. +teleport.world_not_found = World not found. +teleport.failed = Teleportation failed. +teleport.countdown = Teleporting in {0} seconds... +teleport.countdown_one = Teleporting in 1 second... +teleport.moved_cancelled = Teleportation cancelled - you moved! +teleport.damage_cancelled = Teleportation cancelled - you took damage! +teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. +teleport.mount_entry_blocked = You can't enter this zone while mounted. + +# ========== Chat Display ========== +chat.display.public = Public +chat.display.faction = Faction +chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/pt-BR/hyperfactions_admin.lang b/src/main/resources/Server/Languages/pt-BR/hyperfactions_admin.lang new file mode 100644 index 00000000..fe5d73cf --- /dev/null +++ b/src/main/resources/Server/Languages/pt-BR/hyperfactions_admin.lang @@ -0,0 +1,268 @@ +# Language: Brazilian Portuguese (pt-BR) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Brazilian Portuguese translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions Admin GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule + +# ========== Admin Navigation Bar ========== +nav.dashboard = Dashboard +nav.actions = Actions +nav.factions = Factions +nav.players = Players +nav.economy = Economy +nav.zones = Zones +nav.config = Config +nav.backups = Backups +nav.log = Log +nav.updates = Updates +nav.help = Help +nav.version = Version + +# ========== Common Admin Labels ========== +common.faction_not_found = Faction Not Found +common.no_faction = No Faction +common.not_set = Not set +common.on = On +common.off = Off +common.enable = Enable +common.disable = Disable +common.none_paren = (None) +common.invalid_faction = Invalid faction. +common.leader_prefix = Leader: {0} +common.members_suffix = {0} members +common.claims_suffix = {0} claims +common.factions_suffix = {0} factions +common.players_suffix = {0} players +common.chunks_suffix = {0} chunks +common.entries_suffix = {0} entries +common.found_suffix = {0} found +common.power_format = {0}/{1} power +common.raidable = Raidable +common.protected = Protected +common.no_description = No description set. +common.officers_more = +{0} more +common.custom_max = (custom max) +common.default_max = (default max) +common.now = Now +common.ago_suffix = {0} ago +common.just_now = just now +common.no_membership_history = No membership history + +# ========== Admin Dashboard ========== +dashboard.factions_prefix = Factions: {0} +dashboard.members_prefix = Total Members: {0} +dashboard.claims_prefix = Total Claims: {0} + +# ========== Admin Actions ========== +actions.confirm_reset = Confirm Reset? +actions.confirm_trigger = Confirm Trigger? +actions.kd_reset = Reset K/D for {0} players. +actions.kd_reset_failed = Failed to reset K/D: {0} +actions.upkeep_unavailable = Upkeep processor is not available. +actions.upkeep_triggered = Upkeep collection triggered. +actions.upkeep_failed = Upkeep failed: {0} + +# ========== Admin Disband ========== +disband.faction_gone = Faction no longer exists. +disband.success = Faction '{0}' has been disbanded. +disband.failed = Failed to disband: {0} +disband.no_leader = Faction has no leader, cannot disband. + +# ========== Admin Unclaim All ========== +unclaim.removed = [Admin] Removed {0} claims from {1}. +unclaim.no_claims = {0} had no claims to remove. + +# ========== Admin Factions List ========== +factions.home_not_set = Not set +factions.teleported = Teleported to {0}'s home. +factions.no_home = Faction has no home set. +factions.world_not_found = Target world not found. + +# ========== Admin Faction Info ========== +info.faction_gone = This faction no longer exists. + +# ========== Admin Faction Members ========== +members.sort_role = Role +members.sort_online = Online +members.sort_name = Name +members.sort_power = Power +members.promoted = [Admin] Promoted {0} to {1}. +members.demoted = [Admin] Demoted {0} to {1}. +members.kicked = [Admin] Kicked {0} from the faction. + +# ========== Admin Faction Relations ========== +relations.allies_header = ALLIES ({0}) +relations.enemies_header = ENEMIES ({0}) +relations.no_allies = No allies. +relations.no_enemies = No enemies. +relations.neutral_count = {0} neutral factions +relations.since_today = Since: today +relations.since_one_day = Since: 1 day ago +relations.since_days = Since: {0} days ago +relations.set_ally = [Admin] Set mutual ally status with {0}. +relations.set_enemy = Set mutual enemy status with {0}. +relations.set_neutral = [Admin] Set mutual neutral status with {0}. + +# ========== Admin Faction Settings ========== +settings.locked = This setting is locked by server configuration. +settings.perm_toggled = Set {0} to {1}. +settings.color_changed = Set faction color to {0}. +settings.recruitment_set = Set recruitment to {0}. +settings.no_home = [Admin] This faction has no home set. +settings.home_cleared = Cleared faction home for {0}. + +# ========== Sort Dropdown Labels ========== +sort.power = Power +sort.name = Name +sort.members = Members +sort.balance = Balance + +# ========== Admin Players ========== +players.sort_last_online = Last Online +players.sort_faction = Faction +players.sort_online = Online +players.not_online = Player is not online. +players.world_not_found = Target world not found. +players.teleported = [Admin] Teleported to {0}. + +# ========== Admin Player Info ========== +playerinfo.disband_faction = Disband Faction +playerinfo.kick_leader = Kick Leader +playerinfo.enter_valid_number = Enter a valid number. +playerinfo.enter_valid_positive = Enter a valid positive number. +playerinfo.faction_gone = Faction no longer exists. +playerinfo.kd_reset = Reset K/D for {0}. +playerinfo.kicked_success = Kicked {0} from {1}. +playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. +playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). + +# ========== Admin Economy ========== +economy.no_data = No factions with economy data. +economy.amount_zero = Amount cannot be zero. +economy.enter_amount = Please enter an amount. +economy.invalid_number = Invalid number: {0} +economy.error = An error occurred. +economy.balance_negative = Balance cannot be negative. +economy.failed = Failed: {0} +economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. +economy.bulk_failures = ({0} failed) + +# ========== Admin Zones ========== +zones.not_found = Zone not found. +zones.invalid_id = Invalid zone ID. +zones.deleted = Zone {0} deleted. +zones.delete_failed = Failed to delete zone: {0} +zones.no_chunks = No chunks +zones.chunks_suffix = {0} ({1} chunks) + +# ========== Zone Create Wizard ========== +wizard.enter_name = Please enter a zone name. +wizard.name_too_short = Zone name must be at least {0} characters. +wizard.name_too_long = Zone name cannot exceed {0} characters. +wizard.name_taken = A zone with this name already exists. +wizard.radius_range = Radius must be between 1 and {0}. +wizard.create_failed = Could not create zone: {0} +wizard.created_not_found = Zone created but could not be found. +wizard.created = Created {0} '{1}'! +wizard.chunk_claimed = Claimed chunk ({0}, {1}). +wizard.chunk_failed = Could not claim current chunk: {0} +wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. +wizard.radius_no_claims = No chunks could be claimed (area may be occupied). +wizard.no_claims = Zone created with no claims. +wizard.chunks_preview = ~{0} chunks + +# ========== Zone Rename ========== +zone_rename.zone_gone = Zone no longer exists. +zone_rename.enter_name = Please enter a zone name. +zone_rename.too_short = Zone name must be at least {0} character. +zone_rename.too_long = Zone name cannot exceed {0} characters. +zone_rename.same_name = That's already this zone's name. +zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! +zone_rename.name_taken = A zone with that name already exists. +zone_rename.invalid_name = Invalid zone name. +zone_rename.rename_failed = Failed to rename zone: {0} + +# ========== Zone Change Type ========== +zone_type.zone_gone = Zone no longer exists. +zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). +zone_type.failed = Failed to change zone type: {0} + +# ========== Zone Integration Flags ========== +zone_int.zone_not_found = Zone Not Found +zone_int.no_plugin = (no plugin) +zone_int.default = (default) +zone_int.custom = (custom) + +# ========== Activity Log ========== +log.all_types = All Types +log.no_logs = No activity logs matching filters. + +# ========== Version Page ========== +version.active = Active +version.not_found = Not Found +version.not_detected = Not Detected +version.not_installed = Not Installed +version.active_version = Active (v{0}) +version.active_compatible = Active (compatible) +version.active_claims_only = Active (claims only) +version.installed_no_perm = Installed (no perm provider) +version.active_provider = Active ({0}) + +# ========== Admin Main Page ========== +main.reload_hint = Use /f reload to reload configuration. +main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. + +# ========== Zone Flags/Settings ========== +zflags.invalid_flag = Invalid flag. +zflags.zone_not_found = Zone not found. +zflags.conflict = (conflict) +zflags.mixin = (mixin) +zflags.reset_int = Reset integration flags to defaults. +zflags.reset_all = Reset all flags to defaults. +zflags.reset_failed = Failed to reset flags: {0} +zflags.back_to_settings = Back to Settings + +# ========== Zone Properties ========== +zprop.current_custom = Current: "{0}" (custom) +zprop.current_default = Current: "{0}" (default) +zprop.pvp_disabled = PvP Disabled +zprop.pvp_enabled = PvP Enabled +zprop.name_empty = Name cannot be empty. +zprop.renamed = Zone renamed to "{0}". +zprop.name_taken = A zone with that name already exists. +zprop.name_invalid = Invalid name (max 32 characters). +zprop.rename_failed = Failed to rename: {0} +zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. +zprop.upper_set = Upper title set. +zprop.upper_reset = Upper title reset to default. +zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. +zprop.lower_set = Lower title set. +zprop.lower_reset = Lower title reset to default. + +# ========== Relations Additional ========== +relations.failed = Failed: {0} + +# ========== Members Additional ========== +members.never = Never +members.teleported = [Admin] Teleported to {0}. + +# ========== Player Info Additional ========== +playerinfo.records = {0} records +playerinfo.joined_date = Joined: {0} +playerinfo.current = Current +playerinfo.left_date = Left: {0} + +# ========== Zone Map ========== +map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' +map.position = Your Position: Chunk ({0}, {1}) +map.zone_gone = Zone no longer exists. +map.claimed = Claimed chunk ({0}, {1}) for {2}. +map.claim_failed = Failed to claim chunk: {0} +map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. +map.unclaim_failed = Failed to unclaim chunk: {0} +map.chunk_belongs = This chunk belongs to {0}. +map.chunk_faction = This chunk is claimed by a faction. +map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/pt-BR/hyperfactions_gui.lang b/src/main/resources/Server/Languages/pt-BR/hyperfactions_gui.lang new file mode 100644 index 00000000..45d56183 --- /dev/null +++ b/src/main/resources/Server/Languages/pt-BR/hyperfactions_gui.lang @@ -0,0 +1,446 @@ +# Language: Brazilian Portuguese (pt-BR) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Brazilian Portuguese translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule + +# ========== Navigation Bar ========== +nav.dashboard = Dashboard +nav.chat = Chat +nav.members = Members +nav.invites = Invites +nav.browser = Browse +nav.map = Map +nav.leaderboard = Leaderboard +nav.relations = Relations +nav.treasury = Treasury +nav.settings = Settings +nav.logs = Logs +nav.help = Help +nav.admin = Admin +nav.create = Create + +# ========== Help Category Names ========== +help.category.welcome = Welcome +help.category.your_faction = Your Faction +help.category.power_land = Power & Land +help.category.diplomacy = Diplomacy +help.category.combat = Combat & Safety +help.category.economy = Economy +help.category.quick_ref = Quick Reference + +# ========== Main Menu ========== +main_menu.section_my_faction = My Faction +main_menu.section_get_started = Get Started +main_menu.section_territory = Territory +main_menu.section_browse = Browse +main_menu.section_admin = Admin +main_menu.claim_hint = Use /f claim to claim territory. + +# ========== Faction Info Page ========== +faction_info.no_description = No description set. +faction_info.status_open = Open +faction_info.status_invite_only = Invite Only +faction_info.status_raidable = Raidable +faction_info.status_protected = Protected +faction_info.officers_more = +{0} more + +# ========== Rename Modal ========== +rename.no_permission = You don't have permission to rename the faction. +rename.enter_name = Please enter a faction name. +rename.too_short = Faction name must be at least {0} characters. +rename.too_long = Faction name cannot exceed {0} characters. +rename.same_name = That's already your faction's name. +rename.name_taken = A faction with that name already exists. +rename.success = Faction renamed from {0} to {1}! + +# ========== Description Modal ========== +desc.no_permission = You don't have permission to edit the description. +desc.display_none = (None) +desc.cleared = Faction description cleared. +desc.updated = Faction description updated! + +# ========== Tag Modal ========== +tag.no_permission = You don't have permission to edit the tag. +tag.display_none = (None) +tag.cleared = Faction tag cleared. +tag.too_short = Tag must be at least {0} character. +tag.too_long = Tag cannot exceed {0} characters. +tag.invalid_format = Tag can only contain letters and numbers. +tag.same_tag = That's already your faction's tag. +tag.tag_taken = A faction with that tag already exists. +tag.success = Faction tag set to [{0}]! + +# ========== Dashboard Page ========== +dashboard.faction_gone = Your faction no longer exists. +dashboard.available = {0} available +dashboard.at_risk = At Risk! +dashboard.online_count = {0} online +dashboard.status_invite = Invite +dashboard.in_grace = IN GRACE +dashboard.billable_chunks = {0} billable chunks +dashboard.btn_home = Home +dashboard.btn_set_home = Set Home +dashboard.btn_claim = Claim +dashboard.chat_prefix = Chat: {0} +dashboard.btn_leave = Leave +dashboard.no_activity = No recent activity. +dashboard.time_now = now +dashboard.time_minutes = {0}m ago +dashboard.time_hours = {0}h ago +dashboard.time_days = {0}d ago +dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. +dashboard.chat_mode_set = Chat mode: {0} +dashboard.claim_success = Claimed chunk at ({0}, {1}) + +# ========== Faction Main Page ========== +main.no_faction = No Faction +main.joined = You joined the faction! +main.join_failed = Failed to join faction: {0} +main.invite_declined = Invite declined. +main.cooldown = Teleport on cooldown! {0}s remaining. +main.world_not_found = Cannot teleport - world not found. +main.leave_failed = Failed to leave: {0} + +# ========== Shared GUI Labels ========== +common.faction_count = {0} factions +common.leader_label = Leader: {0} +common.sort_power = Power +common.sort_members = Members +common.page_format = {0}/{1} +common.own_faction = (You) + +# ========== Members Page ========== +members.count = {0} members +members.sort_role = Role +members.sort_last_online = Last Online +members.just_now = just now +members.ago = {0} ago +members.never = Never +members.member_not_found = Member not found. +members.promoted = Promoted {0} to {1}. +members.promote_failed = Failed to promote: {0} +members.demoted = Demoted {0} to {1}. +members.demote_failed = Failed to demote: {0} +members.kicked = Kicked {0} from the faction. +members.kick_failed = Failed to kick: {0} + +# ========== Browser Page ========== +browser.sort_name = Name +browser.invalid_faction = Invalid faction. + +# ========== Leaderboard Page ========== +leaderboard.sort_kd = K/D +leaderboard.sort_territory = Territory +leaderboard.sort_balance = Balance + +# ========== Player Info Page ========== +playerinfo.now = Now +playerinfo.history_count = {0} records +playerinfo.joined_label = Joined: {0} +playerinfo.current = Current +playerinfo.left_label = Left: {0} +playerinfo.no_history = No membership history +playerinfo.faction_gone = Faction no longer exists. +playerinfo.reason_active = ACTIVE +playerinfo.reason_left = LEFT +playerinfo.reason_kicked = KICKED +playerinfo.reason_disbanded = DISBANDED + +# ========== Relations Page ========== +relations.relation_count = {0} relations +relations.request_count = {0} requests +relations.type_ally = Ally +relations.type_enemy = Enemy +relations.type_incoming = Incoming +relations.type_outgoing = Outgoing +relations.incoming_request = Incoming request +relations.outgoing_request = Outgoing request +relations.empty_relations = No relations yet. +relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. +relations.empty_pending = No pending ally requests. +relations.today = Today +relations.one_day_ago = 1 day ago +relations.days_ago = {0} days ago +relations.now_neutral = Now neutral with {0}. +relations.now_enemies = Now enemies with {0}! +relations.request_sent = Alliance request sent to {0}. +relations.now_allied = Now allied with {0}! +relations.request_declined = Ally request from {0} declined. +relations.request_cancelled = Ally request to {0} cancelled. +relations.failed = Failed: {0} +relations.search_hint = Search for a faction to set relation +relations.no_results = No factions found matching '{0}' +relations.power_display = {0} power +relations.member_count = {0} members + +# ========== Settings Page ========== +settings.officers_only = Only officers and leaders can change faction settings. +settings.display_none = (None) +settings.home_not_set = Not set +settings.no_permission = You don't have permission to change settings. +settings.only_leader_disband = Only the leader can disband the faction. +settings.perm_locked = This setting is locked by the server. +settings.no_perm_edit = You don't have permission to edit territory permissions. +settings.only_leader_officers = Only the leader can change officer access. +settings.pvp_enabled = Enabled +settings.pvp_disabled = Disabled +settings.not_in_territory = You must be in your faction's territory to set home. +settings.home_set = Faction home set to your current location! +settings.recruitment_set = Recruitment set to {0}. +settings.home_no_set = Your faction does not have a home set. +settings.home_deleted = Faction home deleted! + +# ========== Modules Page ========== +modules.treasury_name = Treasury +modules.treasury_desc = Faction bank & economy system +modules.raids_name = Raids +modules.raids_desc = Scheduled faction battles +modules.levels_name = Levels +modules.levels_desc = Faction progression & XP +modules.war_name = War +modules.war_desc = Formal war declarations +modules.coming_soon = Coming Soon +modules.active = Active +modules.view_treasury = View Treasury +modules.unavailable = Unavailable +modules.no_economy = No economy plugin detected +modules.disabled = Disabled +modules.economy_not_available = Economy features are not available on this server + +# ========== Treasury Page ========== +treasury.wallet_label = Your wallet: {0} +treasury.treasury_label = Treasury balance: {0} +treasury.chunks_detail = {0} free + {1} billable chunks +treasury.cost_label = Cost: {0} +treasury.pending = Pending +treasury.auto_pay_on = Auto-pay: ON +treasury.auto_pay_off = Auto-pay: OFF +treasury.runway_90_plus = 90+ days +treasury.runway_days = {0} days +treasury.runway_day = {0} day +treasury.runway_less_day = < 1 day +treasury.runway_no_funds = No funds +treasury.grace_expires = Grace expires in: {0} +treasury.missed_payments = Missed payments: {0} +treasury.pay_to_clear = Pay {0} to clear grace +treasury.system = System +treasury.type_deposit = Deposit +treasury.type_withdrawal = Withdrawal +treasury.type_transfer_in = Transfer In +treasury.type_transfer_out = Transfer Out +treasury.type_player_transfer = Player Transfer +treasury.type_upkeep = Upkeep +treasury.type_tax = Tax Collection +treasury.type_war_cost = War Cost +treasury.type_raid_cost = Raid Cost +treasury.type_spoils = Spoils +treasury.type_admin = Admin Adjustment +treasury.deposit_title = Deposit to Treasury +treasury.withdraw_title = Withdraw from Treasury +treasury.fee_label = Fee ({0}%) +treasury.confirm_deposit = Confirm Deposit +treasury.confirm_withdrawal = Confirm Withdrawal +treasury.from_wallet = {0} from wallet +treasury.to_wallet = {0} to wallet +treasury.enter_valid_amount = Enter a valid positive amount. +treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. +treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. +treasury.deposit_failed_returned = Failed to deposit. Money returned. +treasury.deposited = Deposited {0} into the treasury. +treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) +treasury.no_withdraw_permission = You don't have permission to withdraw. +treasury.withdraw_denied = Withdrawal denied: {0} +treasury.insufficient_treasury = Insufficient funds in treasury. +treasury.withdraw_limit = Withdrawal limit exceeded. +treasury.withdraw_failed = Withdrawal failed: {0} +treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. +treasury.withdrew = Withdrew {0} from the treasury. +treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) +treasury.search_hint = Search for a player or faction +treasury.no_results = No results for '{0}' +treasury.tag_player = [Player] +treasury.tag_faction = [Faction] +treasury.source_online = Online +treasury.source_offline = Offline +treasury.source_player_db = Hytale player +treasury.no_transfer_permission = You don't have permission to transfer. +treasury.transfer_denied = Transfer denied: {0} +treasury.invalid_target_faction = Invalid target faction. +treasury.target_faction_gone = Target faction no longer exists. +treasury.transfer_failed = Transfer failed: {0} +treasury.transfer_failed_returned = Transfer failed. Funds returned. +treasury.transferred = Transferred {0} to {1}. +treasury.invalid_target_player = Invalid target player. +treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. +treasury.leader_only_perms = Only the leader can change treasury permissions. +treasury.leader_only_upkeep = Only the leader can change upkeep settings. +treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. + +# ========== Confirmation Pages ========== +confirm.disband_not_leader = Only the leader can disband the faction. +confirm.disbanded = Faction '{0}' has been disbanded. +confirm.disband_failed = Failed to disband faction. +confirm.succession_title = Leadership will transfer to: +confirm.no_members_warning = WARNING: No other members! +confirm.will_disband = Leaving will disband the faction permanently. +confirm.not_in_faction = You are not in this faction. +confirm.not_leader_anymore = You are no longer the leader. +confirm.no_successor = No successor available. Use disband instead. +confirm.transfer_failed = Failed to transfer leadership: {0} +confirm.leader_left = Leadership transferred to {0}. You have left {1}. +confirm.leave_failed = Failed to leave faction: {0} +confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. +confirm.left_faction = You have left {0}. +confirm.faction_gone = Faction no longer exists. +confirm.not_leader_transfer = Only the leader can transfer leadership. +confirm.leadership_transferred = Leadership transferred to {0}. + +# ========== Logs Viewer Page ========== +logs.title = {0} - Activity Logs +logs.entry_count = {0} entries +logs.all_types = All Types +logs.no_logs_type = No logs of this type. +logs.no_logs = No activity logs yet. + +# ========== Chat Page ========== +chat.placeholder = Type a message... +chat.no_messages = No messages yet. +chat.no_ally_permission = You don't have permission for ally chat. +chat.no_permission = No permission. +chat.faction_gone = Your faction no longer exists. +chat.time_now = now +chat.time_minutes = {0}m +chat.time_hours = {0}h + +# ========== Invites Page ========== +invites.invite_count = {0} invites +invites.request_count = {0} requests +invites.invited_by = Invited by: {0} +invites.no_message = No message +invites.expires = Expires: {0} +invites.type_outgoing = Outgoing +invites.type_request = Request +invites.invited_by_label = Invited by: +invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. +invites.empty_requests = No join requests. Players can request to join with /f request. +invites.invalid_player = Invalid player. +invites.cancelled_invite = Cancelled invite to {0}. +invites.player_joined = {0} has joined the faction! +invites.faction_full = Faction is full. Cannot accept request. +invites.add_failed = Failed to add player to faction. +invites.request_expired = Request not found or expired. +invites.request_declined = Declined join request from {0}. +invites.time_seconds = {0}s +invites.time_minutes = {0}m +invites.time_hours = {0}h + +# ========== Map Page ========== +map.position = Your Position: Chunk ({0}, {1}) +map.legend_protected = Protected +map.claim_stats = Claims: {0}/{1} ({2} Available) +map.overclaimed = OVERCLAIMED by {0}! +map.power_display = Power: {0}/{1} +map.join_to_claim = Join a faction to claim +map.claim_success = Claimed chunk at ({0}, {1})! +map.claim_not_in_faction = You must be in a faction to claim territory. +map.claim_not_officer = Only officers and leaders can claim territory. +map.claim_already_yours = You already own this chunk. +map.claim_already_claimed = This chunk is already claimed by another faction. +map.claim_not_adjacent = You can only claim chunks adjacent to your territory. +map.claim_max = You have reached your maximum claim limit. +map.claim_world_not_allowed = Claiming is not allowed in this world. +map.claim_orbisguard = This area is protected by OrbisGuard. +map.claim_failed = Failed to claim chunk. +map.unclaim_success = Unclaimed chunk at ({0}, {1}). +map.unclaim_not_in_faction = You must be in a faction. +map.unclaim_not_officer = Only officers and leaders can unclaim territory. +map.unclaim_not_claimed = This chunk is not claimed. +map.unclaim_not_yours = This chunk belongs to another faction. +map.unclaim_home = Cannot unclaim the chunk containing your faction home. +map.unclaim_failed = Failed to unclaim chunk. +map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! +map.overclaim_not_in_faction = You must be in a faction. +map.overclaim_not_officer = Only officers and leaders can overclaim territory. +map.overclaim_already_yours = You already own this chunk. +map.overclaim_ally = You cannot overclaim allied territory. +map.overclaim_has_power = This faction has enough power to defend their territory. +map.overclaim_max = You have reached your maximum claim limit. +map.overclaim_failed = Failed to overclaim chunk. +# ========== Create Faction Page ========== +create.preview_name = Your Faction Name +create.leader_prefix = Leader: {0} +create.enter_name = Please enter a faction name. +create.name_too_short = Faction name must be at least {0} characters. +create.name_too_long = Faction name cannot exceed {0} characters. +create.name_taken = A faction with this name already exists. +create.tag_length = Faction tag must be {0}-{1} characters. +create.tag_format = Faction tag can only contain letters and numbers. +create.desc_too_long = Description cannot exceed {0} characters. +create.created = Faction {0} created successfully! +create.created_no_dashboard = Faction created but could not open dashboard. +create.invalid_name = Invalid faction name. +create.create_failed = Could not create faction. + +# ========== New Player Pages ========== +newplayer.pending_count = {0} pending +newplayer.received_header = RECEIVED INVITES ({0}) +newplayer.requests_header = YOUR REQUESTS ({0}) +newplayer.no_invites = No invites. Browse factions to find one! +newplayer.no_requests = No pending requests. +newplayer.invited_by = Invited by: {0} +newplayer.member_count = {0} members +newplayer.power_count = {0} power +newplayer.claim_count = {0} claims +newplayer.awaiting_review = Awaiting review +newplayer.expires_in = Expires in {0}h +newplayer.time_just_now = just now +newplayer.time_minutes = {0} min ago +newplayer.time_hours = {0}h ago +newplayer.time_days = {0}d ago +newplayer.invalid_faction = Invalid faction. +newplayer.invite_expired = This invite has expired or was revoked. +newplayer.faction_gone = Faction no longer exists. +newplayer.joined = You joined {0}! +newplayer.faction_full = This faction is full. +newplayer.join_failed = Could not join faction. +newplayer.invite_declined = Invite declined. +newplayer.request_cancelled = Cancelled request to join {0}. +newplayer.faction_count = {0} factions +newplayer.browse_subtitle = Find your new home! +newplayer.sort_power = Power +newplayer.sort_name = Name +newplayer.sort_members = Members +newplayer.btn_accept = Accept +newplayer.btn_pending = Pending +newplayer.btn_join = Join +newplayer.btn_request = Request +newplayer.invite_only_msg = This faction is invite-only. +newplayer.welcome_hint = Welcome! Use /f to open faction menu. +newplayer.faction_open_hint = This faction is open! Click JOIN instead. +newplayer.already_requested = You already have a pending request to this faction. +newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. +newplayer.request_sent = Join request sent to {0}! +newplayer.officer_review = An officer will review your request. +newplayer.map_hint = View Only - Join a faction to claim territory! + +# Player Settings +nav.player_settings = Settings +player_settings.title = Player Settings +player_settings.language_section = Language +player_settings.auto_detect = Auto-detect from client +player_settings.auto_detect_desc = Uses your game client's language setting +player_settings.language_label = Language +player_settings.notifications_section = Notifications +player_settings.territory_alerts = Territory Alerts +player_settings.territory_alerts_desc = Show notifications when entering/leaving territories +player_settings.death_announcements = Death Broadcasts +player_settings.death_announcements_desc = Receive faction member death location announcements +player_settings.power_notifications = Power Changes +player_settings.power_notifications_desc = Show messages when your power changes +player_settings.language_changed = Language changed to {0} +player_settings.pref_enabled = {0} enabled +player_settings.pref_disabled = {0} disabled diff --git a/src/main/resources/Server/Languages/ru-RU/hyperfactions.lang b/src/main/resources/Server/Languages/ru-RU/hyperfactions.lang new file mode 100644 index 00000000..96655253 --- /dev/null +++ b/src/main/resources/Server/Languages/ru-RU/hyperfactions.lang @@ -0,0 +1,452 @@ +# Language: Russian (ru-RU) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Russian translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions - English Translations +# Format: key = value (or key = "quoted value") +# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule +# Placeholders: {0}, {1}, etc. + +# ========== Common ========== +common.no_permission = You don't have permission to do that. +common.not_in_faction = You are not in a faction. +common.already_in_faction = You are already in a faction. +common.player_not_found = Player not found. +common.faction_not_found = Faction not found. +common.player_not_online = That player is not online. +common.must_be_leader = Only the faction leader can do that. +common.must_be_officer = You must be an Officer or Leader to do that. +common.combat_tagged = You can't do that while combat tagged. +common.cancel = Cancel +common.confirm = Confirm +common.save = Save +common.close = Close +common.yes = Yes +common.no = No +common.loading = Loading... +common.online = Online +common.offline = Offline +common.enabled = Enabled +common.disabled = Disabled +common.none = None +common.page = Page {0} of {1} +common.unknown = Unknown +common.error_generic = Something went wrong. Please try again. +common.gui_fallback = Could not access GUI. Use /f help for commands. +common.admin_prefix = [Admin] +common.location_error = Could not determine your location. +common.world_error = Could not determine your world. +common.invalid_id = Invalid faction ID. +common.na = N/A + +# ========== Commands - Create ========== +cmd.create.no_permission = You don't have permission to create factions. +cmd.create.usage = Usage: /f create +cmd.create.success = Faction '{0}' created! +cmd.create.already_in_named = You are already in {0}. +cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. +cmd.create.name_taken = That faction name is already taken. +cmd.create.name_too_short = Faction name is too short. +cmd.create.name_too_long = Faction name is too long. +cmd.create.failed = Failed to create faction. + +# ========== Commands - Disband ========== +cmd.disband.no_permission = You don't have permission to disband factions. +cmd.disband.not_leader = Only the faction leader can disband. +cmd.disband.confirm_prompt = Are you sure you want to disband your faction? +cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. +cmd.disband.success = Your faction has been disbanded. +cmd.disband.failed = Failed to disband faction. +cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. + +# ========== Commands - Rename ========== +cmd.rename.no_permission = You don't have permission. +cmd.rename.not_leader = Only the leader can rename the faction. +cmd.rename.usage = Usage: /f rename +cmd.rename.too_short = Name is too short (min {0} chars). +cmd.rename.too_long = Name is too long (max {0} chars). +cmd.rename.name_taken = That name is already taken. +cmd.rename.success = Faction renamed to {0}! +cmd.rename.broadcast = {0} renamed the faction to {1} + +# ========== Commands - Description ========== +cmd.desc.no_permission = You don't have permission. +cmd.desc.not_officer = You must be an officer to set the description. +cmd.desc.set = Faction description set! +cmd.desc.cleared = Faction description cleared. + +# ========== Commands - Open / Close ========== +cmd.open.no_permission = You don't have permission. +cmd.open.not_leader = Only the leader can change this setting. +cmd.open.already_open = Your faction is already open. +cmd.open.success = Your faction is now open! Anyone can join with /f join. +cmd.open.broadcast = {0} opened the faction to public joining. +cmd.close.no_permission = You don't have permission. +cmd.close.not_leader = Only the leader can change this setting. +cmd.close.already_closed = Your faction is already closed. +cmd.close.success = Your faction is now invite-only. +cmd.close.broadcast = {0} closed the faction to invite-only. + +# ========== Commands - Color ========== +cmd.color.no_permission = You don't have permission. +cmd.color.not_officer = You must be an officer to change the color. +cmd.color.colors_disabled = Faction colors are disabled. +cmd.color.usage = Usage: /f color +cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex +cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. +cmd.color.success = Faction color updated! + +# ========== Commands - Claim ========== +cmd.claim.no_permission = You don't have permission to claim territory. +cmd.claim.already_yours = Your faction already owns this chunk. +cmd.claim.cannot_claim_ally = You cannot claim ally territory. +cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. +cmd.claim.success = Claimed chunk at {0}, {1}! +cmd.claim.not_officer = You must be an officer to claim land. +cmd.claim.already_claimed = This chunk is already claimed. +cmd.claim.max_claims = Your faction has reached max claims. Get more power! +cmd.claim.not_adjacent = You must claim adjacent to existing territory. +cmd.claim.world_not_allowed = Claiming is not allowed in this world. +cmd.claim.orbisguard = This area is protected by OrbisGuard. +cmd.claim.zone_protected = This chunk is in a safezone or warzone. +cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. +cmd.claim.failed = Failed to claim chunk. + +# ========== Commands - Invite ========== +cmd.invite.no_permission = You don't have permission to invite players. +cmd.invite.not_officer = You must be an officer to invite players. +cmd.invite.usage = Usage: /f invite +cmd.invite.player_not_found = Player '{0}' not found or offline. +cmd.invite.target_in_faction = That player is already in a faction. +cmd.invite.sent = Invited {0} to your faction. +cmd.invite.received = You have been invited to join {0}! +cmd.invite.accept_hint = Type /f accept {0} to join. + +# ========== Commands - Accept / Join ========== +cmd.join.no_permission = You don't have permission to join factions. +cmd.join.already_in_named = You are already in {0}. +cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.join.no_invites = You have no pending invites. +cmd.join.faction_not_found = Faction '{0}' not found. +cmd.join.not_invited = You have no invite from that faction. +cmd.join.faction_gone = That faction no longer exists. +cmd.join.success = You have joined {0}! +cmd.join.broadcast = {0} has joined the faction! +cmd.join.faction_full = That faction is full. +cmd.join.failed = Failed to join faction. + +# ========== Commands - Kick ========== +cmd.kick.no_permission = You don't have permission to kick members. +cmd.kick.usage = Usage: /f kick +cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. +cmd.kick.success = Kicked {0} from the faction. +cmd.kick.broadcast = {0} was kicked from the faction. +cmd.kick.kicked = You have been kicked from the faction. +cmd.kick.cannot_kick_higher = You don't have permission to kick that player. +cmd.kick.cannot_kick_leader = You cannot kick the faction leader. +cmd.kick.failed = Failed to kick player. + +# ========== Commands - Leave ========== +cmd.leave.no_permission = You don't have permission to leave factions. +cmd.leave.confirm_prompt = Are you sure you want to leave your faction? +cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. +cmd.leave.success = You have left your faction. +cmd.leave.broadcast = {0} has left the faction. +cmd.leave.failed = Failed to leave faction. +cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. + +# ========== Commands - Promote / Demote / Transfer ========== +cmd.rank.promote_no_permission = You don't have permission to promote members. +cmd.rank.promote_usage = Usage: /f promote +cmd.rank.promoted = Promoted {0} to {1}! +cmd.rank.promote_broadcast = {0} was promoted to {1}! +cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. +cmd.rank.promote_failed = Failed to promote player. +cmd.rank.demote_no_permission = You don't have permission to demote members. +cmd.rank.demote_usage = Usage: /f demote +cmd.rank.demoted = Demoted {0} to {1}. +cmd.rank.demote_broadcast = {0} was demoted to {1}. +cmd.rank.already_lowest = That player is already a Member. +cmd.rank.demote_failed = Failed to demote player. +cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. +cmd.rank.transfer_usage = Usage: /f transfer +cmd.rank.player_not_in_faction = Player not found in your faction. +cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? +cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. +cmd.rank.transferred = Transferred leadership to {0}! +cmd.rank.transfer_broadcast = {0} is now the faction leader! +cmd.rank.transfer_failed = Failed to transfer leadership. +cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. + +# ========== Commands - Unclaim ========== +cmd.unclaim.no_permission = You don't have permission to unclaim territory. +cmd.unclaim.success = Unclaimed chunk at {0}, {1}. +cmd.unclaim.not_officer = You must be an officer to unclaim land. +cmd.unclaim.chunk_not_claimed = This chunk is not claimed. +cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. +cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. +cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. +cmd.unclaim.failed = Failed to unclaim chunk. + +# ========== Commands - Overclaim ========== +cmd.overclaim.no_permission = You don't have permission to overclaim territory. +cmd.overclaim.success = Overclaimed enemy territory! +cmd.overclaim.not_officer = You must be an officer to overclaim. +cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. +cmd.overclaim.own_chunk = Your faction already owns this chunk. +cmd.overclaim.ally = You cannot overclaim ally territory. +cmd.overclaim.target_has_power = This faction still has enough power. +cmd.overclaim.failed = Failed to overclaim. + +# ========== Commands - Stuck ========== +cmd.stuck.no_permission = You don't have permission to use /f stuck. +cmd.stuck.not_stuck = You're not stuck - this is wilderness. +cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! +cmd.stuck.no_safe = Could not find a safe location. +cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! + +# ========== Commands - Home ========== +cmd.home.no_permission = You don't have permission to teleport to faction home. +cmd.home.no_home = Your faction has no home set. +cmd.home.combat_tagged = You cannot teleport while in combat! +cmd.home.teleported = Teleported to faction home! + +# ========== Commands - SetHome ========== +cmd.sethome.no_permission = You don't have permission to set faction home. +cmd.sethome.world_not_allowed = Cannot set home in this world. +cmd.sethome.not_in_territory = You can only set home in your faction's territory. +cmd.sethome.set = Faction home set! +cmd.sethome.broadcast = {0} set the faction home. +cmd.sethome.not_officer = You must be an officer to set the home. +cmd.sethome.failed = Failed to set home. + +# ========== Commands - DelHome ========== +cmd.delhome.no_permission = You don't have permission to delete faction home. +cmd.delhome.no_home = Your faction does not have a home set. +cmd.delhome.deleted = Faction home deleted! +cmd.delhome.broadcast = {0} deleted the faction home. +cmd.delhome.not_officer = You must be an officer to delete the home. +cmd.delhome.failed = Failed to delete home. + +# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== +cmd.relation.ally_no_permission = You don't have permission to manage alliances. +cmd.relation.ally_usage = Usage: /f ally +cmd.relation.ally_sent = Ally request sent to {0}! +cmd.relation.ally_formed = You are now allies with {0}! +cmd.relation.already_ally = You are already allied with that faction. +cmd.relation.ally_failed = Failed to send ally request. +cmd.relation.enemy_no_permission = You don't have permission to declare enemies. +cmd.relation.enemy_usage = Usage: /f enemy +cmd.relation.enemy_declared = {0} is now your enemy! +cmd.relation.already_enemy = You are already enemies with that faction. +cmd.relation.max_enemies = You have reached the maximum number of enemies. +cmd.relation.enemy_failed = Failed to set enemy. +cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. +cmd.relation.neutral_usage = Usage: /f neutral +cmd.relation.neutral_set = Your faction is now neutral with {0}. +cmd.relation.already_neutral = You are already neutral with that faction. +cmd.relation.neutral_failed = Failed to set neutral. +cmd.relation.cannot_self = You cannot ally with yourself. +cmd.relation.max_allies = You have reached the maximum number of allies. +cmd.relation.view_no_permission = You don't have permission to view relations. +cmd.relation.header = === Faction Relations === +cmd.relation.allies_count = Allies ({0}): +cmd.relation.enemies_count = Enemies ({0}): +cmd.relation.list_entry = - {0} + +# ========== Commands - Chat ========== +cmd.chat.usage = Usage: /f c [f|a|off] +cmd.chat.no_permission = You don't have permission for that chat mode. +cmd.chat.mode_set = Chat mode set to {0} + +# ========== Commands - Invites ========== +cmd.invites.not_officer = You must be an officer to manage invites. +cmd.invites.header = === Faction Invites === +cmd.invites.no_pending = No pending invites or requests. +cmd.invites.outgoing = Outgoing Invites: +cmd.invites.outgoing_entry = {0} (invited by {1}) +cmd.invites.requests = Join Requests: +cmd.invites.request_entry = {0}{1} +cmd.invites.your_invites_header = === Your Invites === +cmd.invites.no_invites = You have no pending invites. +cmd.invites.invite_entry = {0} - Use /f accept {1} + +# ========== Commands - Request ========== +cmd.request.no_permission = You don't have permission to request faction membership. +cmd.request.already_in_named = You are already in {0}. +cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.request.usage = Usage: /f request [message] +cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. +cmd.request.already_requested = You already have a pending request to that faction. +cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. +cmd.request.sent = Sent join request to {0}! +cmd.request.your_message = Your message: "{0}" +cmd.request.officer_review = An officer will review your request. +cmd.request.officer_notify = {0} has requested to join your faction! +cmd.request.officer_review_hint = Use /f gui > Invites to review. + +# ========== Commands - Info ========== +cmd.info.faction_header = === {0} === +cmd.info.player_header = === {0} === +cmd.info.no_permission = You don't have permission to view faction info. +cmd.info.faction_not_found = Faction '{0}' not found. +cmd.info.not_in_faction_hint = You are not in a faction. Use /f info +cmd.info.leader = Leader: {0} +cmd.info.members = Members: {0}/{1} +cmd.info.power = Power: {0} +cmd.info.claims = Claims: {0} +cmd.info.raidable = RAIDABLE! +cmd.info.allies = Allies: {0} +cmd.info.enemies = Enemies: {0} +cmd.info.they_consider = They consider you: {0} +cmd.info.you_consider = You consider them: {0} +cmd.info.members_no_permission = You don't have permission to view faction members. +cmd.info.members_header = === {0} Members ({1}) === +cmd.info.member_online = [Online] +cmd.info.list_no_permission = You don't have permission to view faction list. +cmd.info.list_empty = There are no factions. +cmd.info.list_header = === Factions ({0}) === +cmd.info.list_entry = {0} - {1} members, {2} power +cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] +cmd.info.help_no_permission = You don't have permission to view help. +cmd.info.who_no_permission = You don't have permission to view player info. +cmd.info.who_faction = Faction: {0} +cmd.info.who_role = Role: {0} +cmd.info.who_joined = Joined: {0} +cmd.info.who_faction_none = Faction: None +cmd.info.who_power = Power: {0} +cmd.info.who_status = Status: {0} +cmd.info.who_last_seen = Last seen: {0} +cmd.info.map_no_permission = You don't have permission to view the map. +cmd.info.map_header = === Territory Map === +cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild +cmd.info.map_gui_hint = Use /f gui for interactive map + +# ========== Commands - Power ========== +cmd.power.personal = Personal Power: {0}/{1} +cmd.power.faction = Faction Power: {0}/{1} +cmd.power.death_loss = Death Loss: {0} +cmd.power.regen = Regen Rate: {0}/hr +cmd.power.no_permission = You don't have permission to view power info. +cmd.power.header = {0}'s Power: +cmd.power.current = Current: {0} + +# ========== Commands - Economy ========== +cmd.economy.balance = Balance: {0} +cmd.economy.deposited = Deposited {0} into the faction treasury. +cmd.economy.withdrawn = Withdrew {0} from the faction treasury. +cmd.economy.transferred = Transferred {0} to {1}. +cmd.economy.insufficient = Insufficient funds in faction treasury. +cmd.economy.invalid_amount = Invalid amount: {0} +cmd.economy.economy_disabled = Economy is disabled. +cmd.economy.balance_no_permission = You don't have permission to view balances. +cmd.economy.treasury_unavailable = Treasury is not available. +cmd.economy.balance_display = {0}'s treasury: {1} +cmd.economy.deposit_no_permission = You don't have permission to deposit. +cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. +cmd.economy.deposit_usage = Usage: /f deposit +cmd.economy.amount_positive = Amount must be positive. +cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} +cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. +cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. +cmd.economy.withdraw_no_permission = You don't have permission to withdraw. +cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. +cmd.economy.withdraw_usage = Usage: /f withdraw +cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} +cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. +cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. +cmd.economy.withdraw_failed = Withdrawal failed: {0} +cmd.economy.transfer_no_permission = You don't have permission to transfer. +cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. +cmd.economy.transfer_usage = Usage: /f money transfer +cmd.economy.transfer_self = Cannot transfer to your own faction. +cmd.economy.transfer_limit_denied = Transfer denied: {0} +cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. +cmd.economy.transfer_failed = Transfer failed: {0} +cmd.economy.log_no_permission = You don't have permission to view the transaction log. +cmd.economy.log_header = Transaction Log (page {0}/{1}) +cmd.economy.log_empty = No transactions found. +cmd.economy.money_help_header = Treasury Commands: +cmd.economy.money_help_balance = /f money balance [faction] - View balance +cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury +cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury +cmd.economy.money_help_transfer = /f money transfer - Transfer between factions +cmd.economy.money_help_log = /f money log [page] [type] - View transaction history + +# ========== Protection - Action Phrases ========== +protection.action.generic = You can't do that +protection.action.build = You can't build or break blocks +protection.action.interact = You can't interact with that +protection.action.door = You can't use doors +protection.action.container = You can't open containers +protection.action.bench = You can't use crafting stations +protection.action.processing = You can't use processing stations +protection.action.seat = You can't use seats +protection.action.light = You can't toggle lights +protection.action.teleporter = You can't use teleporters +protection.action.crate = You can't use crates +protection.action.tame = You can't tame creatures +protection.action.npc = You can't interact with NPCs +protection.action.mount = You can't mount creatures +protection.action.pve = You can't damage creatures +protection.action.item_drop = You can't drop items +protection.action.item_pickup = You can't pick up items + +# ========== Protection - Denial Reasons ========== +protection.denied.safezone = {0} in a SafeZone. +protection.denied.warzone = {0} in a WarZone. +protection.denied.enemy_claim = {0} in enemy territory. +protection.denied.claimed = {0} in claimed territory. +protection.denied.here = {0} here. +protection.denied.zone = {0} in this zone. +protection.denied.faction_perm = {0} here. (Faction permission: {1}) +protection.denied.ally_territory = {0} here. (Ally territory) +protection.denied.error = Protection error — action blocked for safety. + +# ========== Protection - PvP ========== +protection.pvp.safezone = PvP is disabled in SafeZones. +protection.pvp.same_faction = You cannot attack faction members. +protection.pvp.ally = You cannot attack allies. +protection.pvp.spawn_protected = That player has spawn protection. +protection.pvp.territory_disabled = PvP is disabled in this territory. +protection.pvp.generic = You cannot attack this player. + +# ========== Protection - Entity Damage ========== +protection.mob_damage_disabled = Mob damage is disabled in this zone. +protection.pve_damage_disabled = PvE damage is disabled in this zone. +protection.pve_territory_denied = You cannot damage mobs in this territory. + +# ========== Protection - Combat Tag ========== +protection.combat_tag_command = You cannot use that command while combat tagged. + +# ========== Server Announcements ========== +# These are broadcast to all online players for significant faction events. +# {0}, {1} = dynamic values (faction names, player names) +server_announce.faction_created = {0} has founded the faction {1}! +server_announce.faction_disbanded = The faction {0} has been disbanded! +server_announce.leadership_transfer = {0} is now the leader of {1}! +server_announce.overclaim = {0} has overclaimed territory from {1}! +server_announce.war_declared = {0} has declared war on {1}! +server_announce.alliance_formed = {0} and {1} are now allies! +server_announce.alliance_broken = {0} and {1} are no longer allies! + +# ========== Teleport System ========== +teleport.cooldown_wait = You must wait {0} before teleporting again. +teleport.warmup_start = Teleporting to faction home in {0} seconds... +teleport.combat_cancelled = Teleportation cancelled - you are in combat! +teleport.success_default = Teleported to faction home! +teleport.no_home = Your faction has no home set. +teleport.world_not_found = World not found. +teleport.failed = Teleportation failed. +teleport.countdown = Teleporting in {0} seconds... +teleport.countdown_one = Teleporting in 1 second... +teleport.moved_cancelled = Teleportation cancelled - you moved! +teleport.damage_cancelled = Teleportation cancelled - you took damage! +teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. +teleport.mount_entry_blocked = You can't enter this zone while mounted. + +# ========== Chat Display ========== +chat.display.public = Public +chat.display.faction = Faction +chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/ru-RU/hyperfactions_admin.lang b/src/main/resources/Server/Languages/ru-RU/hyperfactions_admin.lang new file mode 100644 index 00000000..c31b51a0 --- /dev/null +++ b/src/main/resources/Server/Languages/ru-RU/hyperfactions_admin.lang @@ -0,0 +1,268 @@ +# Language: Russian (ru-RU) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Russian translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions Admin GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule + +# ========== Admin Navigation Bar ========== +nav.dashboard = Dashboard +nav.actions = Actions +nav.factions = Factions +nav.players = Players +nav.economy = Economy +nav.zones = Zones +nav.config = Config +nav.backups = Backups +nav.log = Log +nav.updates = Updates +nav.help = Help +nav.version = Version + +# ========== Common Admin Labels ========== +common.faction_not_found = Faction Not Found +common.no_faction = No Faction +common.not_set = Not set +common.on = On +common.off = Off +common.enable = Enable +common.disable = Disable +common.none_paren = (None) +common.invalid_faction = Invalid faction. +common.leader_prefix = Leader: {0} +common.members_suffix = {0} members +common.claims_suffix = {0} claims +common.factions_suffix = {0} factions +common.players_suffix = {0} players +common.chunks_suffix = {0} chunks +common.entries_suffix = {0} entries +common.found_suffix = {0} found +common.power_format = {0}/{1} power +common.raidable = Raidable +common.protected = Protected +common.no_description = No description set. +common.officers_more = +{0} more +common.custom_max = (custom max) +common.default_max = (default max) +common.now = Now +common.ago_suffix = {0} ago +common.just_now = just now +common.no_membership_history = No membership history + +# ========== Admin Dashboard ========== +dashboard.factions_prefix = Factions: {0} +dashboard.members_prefix = Total Members: {0} +dashboard.claims_prefix = Total Claims: {0} + +# ========== Admin Actions ========== +actions.confirm_reset = Confirm Reset? +actions.confirm_trigger = Confirm Trigger? +actions.kd_reset = Reset K/D for {0} players. +actions.kd_reset_failed = Failed to reset K/D: {0} +actions.upkeep_unavailable = Upkeep processor is not available. +actions.upkeep_triggered = Upkeep collection triggered. +actions.upkeep_failed = Upkeep failed: {0} + +# ========== Admin Disband ========== +disband.faction_gone = Faction no longer exists. +disband.success = Faction '{0}' has been disbanded. +disband.failed = Failed to disband: {0} +disband.no_leader = Faction has no leader, cannot disband. + +# ========== Admin Unclaim All ========== +unclaim.removed = [Admin] Removed {0} claims from {1}. +unclaim.no_claims = {0} had no claims to remove. + +# ========== Admin Factions List ========== +factions.home_not_set = Not set +factions.teleported = Teleported to {0}'s home. +factions.no_home = Faction has no home set. +factions.world_not_found = Target world not found. + +# ========== Admin Faction Info ========== +info.faction_gone = This faction no longer exists. + +# ========== Admin Faction Members ========== +members.sort_role = Role +members.sort_online = Online +members.sort_name = Name +members.sort_power = Power +members.promoted = [Admin] Promoted {0} to {1}. +members.demoted = [Admin] Demoted {0} to {1}. +members.kicked = [Admin] Kicked {0} from the faction. + +# ========== Admin Faction Relations ========== +relations.allies_header = ALLIES ({0}) +relations.enemies_header = ENEMIES ({0}) +relations.no_allies = No allies. +relations.no_enemies = No enemies. +relations.neutral_count = {0} neutral factions +relations.since_today = Since: today +relations.since_one_day = Since: 1 day ago +relations.since_days = Since: {0} days ago +relations.set_ally = [Admin] Set mutual ally status with {0}. +relations.set_enemy = Set mutual enemy status with {0}. +relations.set_neutral = [Admin] Set mutual neutral status with {0}. + +# ========== Admin Faction Settings ========== +settings.locked = This setting is locked by server configuration. +settings.perm_toggled = Set {0} to {1}. +settings.color_changed = Set faction color to {0}. +settings.recruitment_set = Set recruitment to {0}. +settings.no_home = [Admin] This faction has no home set. +settings.home_cleared = Cleared faction home for {0}. + +# ========== Sort Dropdown Labels ========== +sort.power = Power +sort.name = Name +sort.members = Members +sort.balance = Balance + +# ========== Admin Players ========== +players.sort_last_online = Last Online +players.sort_faction = Faction +players.sort_online = Online +players.not_online = Player is not online. +players.world_not_found = Target world not found. +players.teleported = [Admin] Teleported to {0}. + +# ========== Admin Player Info ========== +playerinfo.disband_faction = Disband Faction +playerinfo.kick_leader = Kick Leader +playerinfo.enter_valid_number = Enter a valid number. +playerinfo.enter_valid_positive = Enter a valid positive number. +playerinfo.faction_gone = Faction no longer exists. +playerinfo.kd_reset = Reset K/D for {0}. +playerinfo.kicked_success = Kicked {0} from {1}. +playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. +playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). + +# ========== Admin Economy ========== +economy.no_data = No factions with economy data. +economy.amount_zero = Amount cannot be zero. +economy.enter_amount = Please enter an amount. +economy.invalid_number = Invalid number: {0} +economy.error = An error occurred. +economy.balance_negative = Balance cannot be negative. +economy.failed = Failed: {0} +economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. +economy.bulk_failures = ({0} failed) + +# ========== Admin Zones ========== +zones.not_found = Zone not found. +zones.invalid_id = Invalid zone ID. +zones.deleted = Zone {0} deleted. +zones.delete_failed = Failed to delete zone: {0} +zones.no_chunks = No chunks +zones.chunks_suffix = {0} ({1} chunks) + +# ========== Zone Create Wizard ========== +wizard.enter_name = Please enter a zone name. +wizard.name_too_short = Zone name must be at least {0} characters. +wizard.name_too_long = Zone name cannot exceed {0} characters. +wizard.name_taken = A zone with this name already exists. +wizard.radius_range = Radius must be between 1 and {0}. +wizard.create_failed = Could not create zone: {0} +wizard.created_not_found = Zone created but could not be found. +wizard.created = Created {0} '{1}'! +wizard.chunk_claimed = Claimed chunk ({0}, {1}). +wizard.chunk_failed = Could not claim current chunk: {0} +wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. +wizard.radius_no_claims = No chunks could be claimed (area may be occupied). +wizard.no_claims = Zone created with no claims. +wizard.chunks_preview = ~{0} chunks + +# ========== Zone Rename ========== +zone_rename.zone_gone = Zone no longer exists. +zone_rename.enter_name = Please enter a zone name. +zone_rename.too_short = Zone name must be at least {0} character. +zone_rename.too_long = Zone name cannot exceed {0} characters. +zone_rename.same_name = That's already this zone's name. +zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! +zone_rename.name_taken = A zone with that name already exists. +zone_rename.invalid_name = Invalid zone name. +zone_rename.rename_failed = Failed to rename zone: {0} + +# ========== Zone Change Type ========== +zone_type.zone_gone = Zone no longer exists. +zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). +zone_type.failed = Failed to change zone type: {0} + +# ========== Zone Integration Flags ========== +zone_int.zone_not_found = Zone Not Found +zone_int.no_plugin = (no plugin) +zone_int.default = (default) +zone_int.custom = (custom) + +# ========== Activity Log ========== +log.all_types = All Types +log.no_logs = No activity logs matching filters. + +# ========== Version Page ========== +version.active = Active +version.not_found = Not Found +version.not_detected = Not Detected +version.not_installed = Not Installed +version.active_version = Active (v{0}) +version.active_compatible = Active (compatible) +version.active_claims_only = Active (claims only) +version.installed_no_perm = Installed (no perm provider) +version.active_provider = Active ({0}) + +# ========== Admin Main Page ========== +main.reload_hint = Use /f reload to reload configuration. +main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. + +# ========== Zone Flags/Settings ========== +zflags.invalid_flag = Invalid flag. +zflags.zone_not_found = Zone not found. +zflags.conflict = (conflict) +zflags.mixin = (mixin) +zflags.reset_int = Reset integration flags to defaults. +zflags.reset_all = Reset all flags to defaults. +zflags.reset_failed = Failed to reset flags: {0} +zflags.back_to_settings = Back to Settings + +# ========== Zone Properties ========== +zprop.current_custom = Current: "{0}" (custom) +zprop.current_default = Current: "{0}" (default) +zprop.pvp_disabled = PvP Disabled +zprop.pvp_enabled = PvP Enabled +zprop.name_empty = Name cannot be empty. +zprop.renamed = Zone renamed to "{0}". +zprop.name_taken = A zone with that name already exists. +zprop.name_invalid = Invalid name (max 32 characters). +zprop.rename_failed = Failed to rename: {0} +zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. +zprop.upper_set = Upper title set. +zprop.upper_reset = Upper title reset to default. +zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. +zprop.lower_set = Lower title set. +zprop.lower_reset = Lower title reset to default. + +# ========== Relations Additional ========== +relations.failed = Failed: {0} + +# ========== Members Additional ========== +members.never = Never +members.teleported = [Admin] Teleported to {0}. + +# ========== Player Info Additional ========== +playerinfo.records = {0} records +playerinfo.joined_date = Joined: {0} +playerinfo.current = Current +playerinfo.left_date = Left: {0} + +# ========== Zone Map ========== +map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' +map.position = Your Position: Chunk ({0}, {1}) +map.zone_gone = Zone no longer exists. +map.claimed = Claimed chunk ({0}, {1}) for {2}. +map.claim_failed = Failed to claim chunk: {0} +map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. +map.unclaim_failed = Failed to unclaim chunk: {0} +map.chunk_belongs = This chunk belongs to {0}. +map.chunk_faction = This chunk is claimed by a faction. +map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/ru-RU/hyperfactions_gui.lang b/src/main/resources/Server/Languages/ru-RU/hyperfactions_gui.lang new file mode 100644 index 00000000..bfd9aaba --- /dev/null +++ b/src/main/resources/Server/Languages/ru-RU/hyperfactions_gui.lang @@ -0,0 +1,446 @@ +# Language: Russian (ru-RU) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Russian translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule + +# ========== Navigation Bar ========== +nav.dashboard = Dashboard +nav.chat = Chat +nav.members = Members +nav.invites = Invites +nav.browser = Browse +nav.map = Map +nav.leaderboard = Leaderboard +nav.relations = Relations +nav.treasury = Treasury +nav.settings = Settings +nav.logs = Logs +nav.help = Help +nav.admin = Admin +nav.create = Create + +# ========== Help Category Names ========== +help.category.welcome = Welcome +help.category.your_faction = Your Faction +help.category.power_land = Power & Land +help.category.diplomacy = Diplomacy +help.category.combat = Combat & Safety +help.category.economy = Economy +help.category.quick_ref = Quick Reference + +# ========== Main Menu ========== +main_menu.section_my_faction = My Faction +main_menu.section_get_started = Get Started +main_menu.section_territory = Territory +main_menu.section_browse = Browse +main_menu.section_admin = Admin +main_menu.claim_hint = Use /f claim to claim territory. + +# ========== Faction Info Page ========== +faction_info.no_description = No description set. +faction_info.status_open = Open +faction_info.status_invite_only = Invite Only +faction_info.status_raidable = Raidable +faction_info.status_protected = Protected +faction_info.officers_more = +{0} more + +# ========== Rename Modal ========== +rename.no_permission = You don't have permission to rename the faction. +rename.enter_name = Please enter a faction name. +rename.too_short = Faction name must be at least {0} characters. +rename.too_long = Faction name cannot exceed {0} characters. +rename.same_name = That's already your faction's name. +rename.name_taken = A faction with that name already exists. +rename.success = Faction renamed from {0} to {1}! + +# ========== Description Modal ========== +desc.no_permission = You don't have permission to edit the description. +desc.display_none = (None) +desc.cleared = Faction description cleared. +desc.updated = Faction description updated! + +# ========== Tag Modal ========== +tag.no_permission = You don't have permission to edit the tag. +tag.display_none = (None) +tag.cleared = Faction tag cleared. +tag.too_short = Tag must be at least {0} character. +tag.too_long = Tag cannot exceed {0} characters. +tag.invalid_format = Tag can only contain letters and numbers. +tag.same_tag = That's already your faction's tag. +tag.tag_taken = A faction with that tag already exists. +tag.success = Faction tag set to [{0}]! + +# ========== Dashboard Page ========== +dashboard.faction_gone = Your faction no longer exists. +dashboard.available = {0} available +dashboard.at_risk = At Risk! +dashboard.online_count = {0} online +dashboard.status_invite = Invite +dashboard.in_grace = IN GRACE +dashboard.billable_chunks = {0} billable chunks +dashboard.btn_home = Home +dashboard.btn_set_home = Set Home +dashboard.btn_claim = Claim +dashboard.chat_prefix = Chat: {0} +dashboard.btn_leave = Leave +dashboard.no_activity = No recent activity. +dashboard.time_now = now +dashboard.time_minutes = {0}m ago +dashboard.time_hours = {0}h ago +dashboard.time_days = {0}d ago +dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. +dashboard.chat_mode_set = Chat mode: {0} +dashboard.claim_success = Claimed chunk at ({0}, {1}) + +# ========== Faction Main Page ========== +main.no_faction = No Faction +main.joined = You joined the faction! +main.join_failed = Failed to join faction: {0} +main.invite_declined = Invite declined. +main.cooldown = Teleport on cooldown! {0}s remaining. +main.world_not_found = Cannot teleport - world not found. +main.leave_failed = Failed to leave: {0} + +# ========== Shared GUI Labels ========== +common.faction_count = {0} factions +common.leader_label = Leader: {0} +common.sort_power = Power +common.sort_members = Members +common.page_format = {0}/{1} +common.own_faction = (You) + +# ========== Members Page ========== +members.count = {0} members +members.sort_role = Role +members.sort_last_online = Last Online +members.just_now = just now +members.ago = {0} ago +members.never = Never +members.member_not_found = Member not found. +members.promoted = Promoted {0} to {1}. +members.promote_failed = Failed to promote: {0} +members.demoted = Demoted {0} to {1}. +members.demote_failed = Failed to demote: {0} +members.kicked = Kicked {0} from the faction. +members.kick_failed = Failed to kick: {0} + +# ========== Browser Page ========== +browser.sort_name = Name +browser.invalid_faction = Invalid faction. + +# ========== Leaderboard Page ========== +leaderboard.sort_kd = K/D +leaderboard.sort_territory = Territory +leaderboard.sort_balance = Balance + +# ========== Player Info Page ========== +playerinfo.now = Now +playerinfo.history_count = {0} records +playerinfo.joined_label = Joined: {0} +playerinfo.current = Current +playerinfo.left_label = Left: {0} +playerinfo.no_history = No membership history +playerinfo.faction_gone = Faction no longer exists. +playerinfo.reason_active = ACTIVE +playerinfo.reason_left = LEFT +playerinfo.reason_kicked = KICKED +playerinfo.reason_disbanded = DISBANDED + +# ========== Relations Page ========== +relations.relation_count = {0} relations +relations.request_count = {0} requests +relations.type_ally = Ally +relations.type_enemy = Enemy +relations.type_incoming = Incoming +relations.type_outgoing = Outgoing +relations.incoming_request = Incoming request +relations.outgoing_request = Outgoing request +relations.empty_relations = No relations yet. +relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. +relations.empty_pending = No pending ally requests. +relations.today = Today +relations.one_day_ago = 1 day ago +relations.days_ago = {0} days ago +relations.now_neutral = Now neutral with {0}. +relations.now_enemies = Now enemies with {0}! +relations.request_sent = Alliance request sent to {0}. +relations.now_allied = Now allied with {0}! +relations.request_declined = Ally request from {0} declined. +relations.request_cancelled = Ally request to {0} cancelled. +relations.failed = Failed: {0} +relations.search_hint = Search for a faction to set relation +relations.no_results = No factions found matching '{0}' +relations.power_display = {0} power +relations.member_count = {0} members + +# ========== Settings Page ========== +settings.officers_only = Only officers and leaders can change faction settings. +settings.display_none = (None) +settings.home_not_set = Not set +settings.no_permission = You don't have permission to change settings. +settings.only_leader_disband = Only the leader can disband the faction. +settings.perm_locked = This setting is locked by the server. +settings.no_perm_edit = You don't have permission to edit territory permissions. +settings.only_leader_officers = Only the leader can change officer access. +settings.pvp_enabled = Enabled +settings.pvp_disabled = Disabled +settings.not_in_territory = You must be in your faction's territory to set home. +settings.home_set = Faction home set to your current location! +settings.recruitment_set = Recruitment set to {0}. +settings.home_no_set = Your faction does not have a home set. +settings.home_deleted = Faction home deleted! + +# ========== Modules Page ========== +modules.treasury_name = Treasury +modules.treasury_desc = Faction bank & economy system +modules.raids_name = Raids +modules.raids_desc = Scheduled faction battles +modules.levels_name = Levels +modules.levels_desc = Faction progression & XP +modules.war_name = War +modules.war_desc = Formal war declarations +modules.coming_soon = Coming Soon +modules.active = Active +modules.view_treasury = View Treasury +modules.unavailable = Unavailable +modules.no_economy = No economy plugin detected +modules.disabled = Disabled +modules.economy_not_available = Economy features are not available on this server + +# ========== Treasury Page ========== +treasury.wallet_label = Your wallet: {0} +treasury.treasury_label = Treasury balance: {0} +treasury.chunks_detail = {0} free + {1} billable chunks +treasury.cost_label = Cost: {0} +treasury.pending = Pending +treasury.auto_pay_on = Auto-pay: ON +treasury.auto_pay_off = Auto-pay: OFF +treasury.runway_90_plus = 90+ days +treasury.runway_days = {0} days +treasury.runway_day = {0} day +treasury.runway_less_day = < 1 day +treasury.runway_no_funds = No funds +treasury.grace_expires = Grace expires in: {0} +treasury.missed_payments = Missed payments: {0} +treasury.pay_to_clear = Pay {0} to clear grace +treasury.system = System +treasury.type_deposit = Deposit +treasury.type_withdrawal = Withdrawal +treasury.type_transfer_in = Transfer In +treasury.type_transfer_out = Transfer Out +treasury.type_player_transfer = Player Transfer +treasury.type_upkeep = Upkeep +treasury.type_tax = Tax Collection +treasury.type_war_cost = War Cost +treasury.type_raid_cost = Raid Cost +treasury.type_spoils = Spoils +treasury.type_admin = Admin Adjustment +treasury.deposit_title = Deposit to Treasury +treasury.withdraw_title = Withdraw from Treasury +treasury.fee_label = Fee ({0}%) +treasury.confirm_deposit = Confirm Deposit +treasury.confirm_withdrawal = Confirm Withdrawal +treasury.from_wallet = {0} from wallet +treasury.to_wallet = {0} to wallet +treasury.enter_valid_amount = Enter a valid positive amount. +treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. +treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. +treasury.deposit_failed_returned = Failed to deposit. Money returned. +treasury.deposited = Deposited {0} into the treasury. +treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) +treasury.no_withdraw_permission = You don't have permission to withdraw. +treasury.withdraw_denied = Withdrawal denied: {0} +treasury.insufficient_treasury = Insufficient funds in treasury. +treasury.withdraw_limit = Withdrawal limit exceeded. +treasury.withdraw_failed = Withdrawal failed: {0} +treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. +treasury.withdrew = Withdrew {0} from the treasury. +treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) +treasury.search_hint = Search for a player or faction +treasury.no_results = No results for '{0}' +treasury.tag_player = [Player] +treasury.tag_faction = [Faction] +treasury.source_online = Online +treasury.source_offline = Offline +treasury.source_player_db = Hytale player +treasury.no_transfer_permission = You don't have permission to transfer. +treasury.transfer_denied = Transfer denied: {0} +treasury.invalid_target_faction = Invalid target faction. +treasury.target_faction_gone = Target faction no longer exists. +treasury.transfer_failed = Transfer failed: {0} +treasury.transfer_failed_returned = Transfer failed. Funds returned. +treasury.transferred = Transferred {0} to {1}. +treasury.invalid_target_player = Invalid target player. +treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. +treasury.leader_only_perms = Only the leader can change treasury permissions. +treasury.leader_only_upkeep = Only the leader can change upkeep settings. +treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. + +# ========== Confirmation Pages ========== +confirm.disband_not_leader = Only the leader can disband the faction. +confirm.disbanded = Faction '{0}' has been disbanded. +confirm.disband_failed = Failed to disband faction. +confirm.succession_title = Leadership will transfer to: +confirm.no_members_warning = WARNING: No other members! +confirm.will_disband = Leaving will disband the faction permanently. +confirm.not_in_faction = You are not in this faction. +confirm.not_leader_anymore = You are no longer the leader. +confirm.no_successor = No successor available. Use disband instead. +confirm.transfer_failed = Failed to transfer leadership: {0} +confirm.leader_left = Leadership transferred to {0}. You have left {1}. +confirm.leave_failed = Failed to leave faction: {0} +confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. +confirm.left_faction = You have left {0}. +confirm.faction_gone = Faction no longer exists. +confirm.not_leader_transfer = Only the leader can transfer leadership. +confirm.leadership_transferred = Leadership transferred to {0}. + +# ========== Logs Viewer Page ========== +logs.title = {0} - Activity Logs +logs.entry_count = {0} entries +logs.all_types = All Types +logs.no_logs_type = No logs of this type. +logs.no_logs = No activity logs yet. + +# ========== Chat Page ========== +chat.placeholder = Type a message... +chat.no_messages = No messages yet. +chat.no_ally_permission = You don't have permission for ally chat. +chat.no_permission = No permission. +chat.faction_gone = Your faction no longer exists. +chat.time_now = now +chat.time_minutes = {0}m +chat.time_hours = {0}h + +# ========== Invites Page ========== +invites.invite_count = {0} invites +invites.request_count = {0} requests +invites.invited_by = Invited by: {0} +invites.no_message = No message +invites.expires = Expires: {0} +invites.type_outgoing = Outgoing +invites.type_request = Request +invites.invited_by_label = Invited by: +invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. +invites.empty_requests = No join requests. Players can request to join with /f request. +invites.invalid_player = Invalid player. +invites.cancelled_invite = Cancelled invite to {0}. +invites.player_joined = {0} has joined the faction! +invites.faction_full = Faction is full. Cannot accept request. +invites.add_failed = Failed to add player to faction. +invites.request_expired = Request not found or expired. +invites.request_declined = Declined join request from {0}. +invites.time_seconds = {0}s +invites.time_minutes = {0}m +invites.time_hours = {0}h + +# ========== Map Page ========== +map.position = Your Position: Chunk ({0}, {1}) +map.legend_protected = Protected +map.claim_stats = Claims: {0}/{1} ({2} Available) +map.overclaimed = OVERCLAIMED by {0}! +map.power_display = Power: {0}/{1} +map.join_to_claim = Join a faction to claim +map.claim_success = Claimed chunk at ({0}, {1})! +map.claim_not_in_faction = You must be in a faction to claim territory. +map.claim_not_officer = Only officers and leaders can claim territory. +map.claim_already_yours = You already own this chunk. +map.claim_already_claimed = This chunk is already claimed by another faction. +map.claim_not_adjacent = You can only claim chunks adjacent to your territory. +map.claim_max = You have reached your maximum claim limit. +map.claim_world_not_allowed = Claiming is not allowed in this world. +map.claim_orbisguard = This area is protected by OrbisGuard. +map.claim_failed = Failed to claim chunk. +map.unclaim_success = Unclaimed chunk at ({0}, {1}). +map.unclaim_not_in_faction = You must be in a faction. +map.unclaim_not_officer = Only officers and leaders can unclaim territory. +map.unclaim_not_claimed = This chunk is not claimed. +map.unclaim_not_yours = This chunk belongs to another faction. +map.unclaim_home = Cannot unclaim the chunk containing your faction home. +map.unclaim_failed = Failed to unclaim chunk. +map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! +map.overclaim_not_in_faction = You must be in a faction. +map.overclaim_not_officer = Only officers and leaders can overclaim territory. +map.overclaim_already_yours = You already own this chunk. +map.overclaim_ally = You cannot overclaim allied territory. +map.overclaim_has_power = This faction has enough power to defend their territory. +map.overclaim_max = You have reached your maximum claim limit. +map.overclaim_failed = Failed to overclaim chunk. +# ========== Create Faction Page ========== +create.preview_name = Your Faction Name +create.leader_prefix = Leader: {0} +create.enter_name = Please enter a faction name. +create.name_too_short = Faction name must be at least {0} characters. +create.name_too_long = Faction name cannot exceed {0} characters. +create.name_taken = A faction with this name already exists. +create.tag_length = Faction tag must be {0}-{1} characters. +create.tag_format = Faction tag can only contain letters and numbers. +create.desc_too_long = Description cannot exceed {0} characters. +create.created = Faction {0} created successfully! +create.created_no_dashboard = Faction created but could not open dashboard. +create.invalid_name = Invalid faction name. +create.create_failed = Could not create faction. + +# ========== New Player Pages ========== +newplayer.pending_count = {0} pending +newplayer.received_header = RECEIVED INVITES ({0}) +newplayer.requests_header = YOUR REQUESTS ({0}) +newplayer.no_invites = No invites. Browse factions to find one! +newplayer.no_requests = No pending requests. +newplayer.invited_by = Invited by: {0} +newplayer.member_count = {0} members +newplayer.power_count = {0} power +newplayer.claim_count = {0} claims +newplayer.awaiting_review = Awaiting review +newplayer.expires_in = Expires in {0}h +newplayer.time_just_now = just now +newplayer.time_minutes = {0} min ago +newplayer.time_hours = {0}h ago +newplayer.time_days = {0}d ago +newplayer.invalid_faction = Invalid faction. +newplayer.invite_expired = This invite has expired or was revoked. +newplayer.faction_gone = Faction no longer exists. +newplayer.joined = You joined {0}! +newplayer.faction_full = This faction is full. +newplayer.join_failed = Could not join faction. +newplayer.invite_declined = Invite declined. +newplayer.request_cancelled = Cancelled request to join {0}. +newplayer.faction_count = {0} factions +newplayer.browse_subtitle = Find your new home! +newplayer.sort_power = Power +newplayer.sort_name = Name +newplayer.sort_members = Members +newplayer.btn_accept = Accept +newplayer.btn_pending = Pending +newplayer.btn_join = Join +newplayer.btn_request = Request +newplayer.invite_only_msg = This faction is invite-only. +newplayer.welcome_hint = Welcome! Use /f to open faction menu. +newplayer.faction_open_hint = This faction is open! Click JOIN instead. +newplayer.already_requested = You already have a pending request to this faction. +newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. +newplayer.request_sent = Join request sent to {0}! +newplayer.officer_review = An officer will review your request. +newplayer.map_hint = View Only - Join a faction to claim territory! + +# Player Settings +nav.player_settings = Settings +player_settings.title = Player Settings +player_settings.language_section = Language +player_settings.auto_detect = Auto-detect from client +player_settings.auto_detect_desc = Uses your game client's language setting +player_settings.language_label = Language +player_settings.notifications_section = Notifications +player_settings.territory_alerts = Territory Alerts +player_settings.territory_alerts_desc = Show notifications when entering/leaving territories +player_settings.death_announcements = Death Broadcasts +player_settings.death_announcements_desc = Receive faction member death location announcements +player_settings.power_notifications = Power Changes +player_settings.power_notifications_desc = Show messages when your power changes +player_settings.language_changed = Language changed to {0} +player_settings.pref_enabled = {0} enabled +player_settings.pref_disabled = {0} disabled diff --git a/src/main/resources/Server/Languages/tr-TR/hyperfactions.lang b/src/main/resources/Server/Languages/tr-TR/hyperfactions.lang new file mode 100644 index 00000000..b88561fa --- /dev/null +++ b/src/main/resources/Server/Languages/tr-TR/hyperfactions.lang @@ -0,0 +1,452 @@ +# Language: Turkish (tr-TR) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Turkish translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions - English Translations +# Format: key = value (or key = "quoted value") +# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule +# Placeholders: {0}, {1}, etc. + +# ========== Common ========== +common.no_permission = You don't have permission to do that. +common.not_in_faction = You are not in a faction. +common.already_in_faction = You are already in a faction. +common.player_not_found = Player not found. +common.faction_not_found = Faction not found. +common.player_not_online = That player is not online. +common.must_be_leader = Only the faction leader can do that. +common.must_be_officer = You must be an Officer or Leader to do that. +common.combat_tagged = You can't do that while combat tagged. +common.cancel = Cancel +common.confirm = Confirm +common.save = Save +common.close = Close +common.yes = Yes +common.no = No +common.loading = Loading... +common.online = Online +common.offline = Offline +common.enabled = Enabled +common.disabled = Disabled +common.none = None +common.page = Page {0} of {1} +common.unknown = Unknown +common.error_generic = Something went wrong. Please try again. +common.gui_fallback = Could not access GUI. Use /f help for commands. +common.admin_prefix = [Admin] +common.location_error = Could not determine your location. +common.world_error = Could not determine your world. +common.invalid_id = Invalid faction ID. +common.na = N/A + +# ========== Commands - Create ========== +cmd.create.no_permission = You don't have permission to create factions. +cmd.create.usage = Usage: /f create +cmd.create.success = Faction '{0}' created! +cmd.create.already_in_named = You are already in {0}. +cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. +cmd.create.name_taken = That faction name is already taken. +cmd.create.name_too_short = Faction name is too short. +cmd.create.name_too_long = Faction name is too long. +cmd.create.failed = Failed to create faction. + +# ========== Commands - Disband ========== +cmd.disband.no_permission = You don't have permission to disband factions. +cmd.disband.not_leader = Only the faction leader can disband. +cmd.disband.confirm_prompt = Are you sure you want to disband your faction? +cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. +cmd.disband.success = Your faction has been disbanded. +cmd.disband.failed = Failed to disband faction. +cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. + +# ========== Commands - Rename ========== +cmd.rename.no_permission = You don't have permission. +cmd.rename.not_leader = Only the leader can rename the faction. +cmd.rename.usage = Usage: /f rename +cmd.rename.too_short = Name is too short (min {0} chars). +cmd.rename.too_long = Name is too long (max {0} chars). +cmd.rename.name_taken = That name is already taken. +cmd.rename.success = Faction renamed to {0}! +cmd.rename.broadcast = {0} renamed the faction to {1} + +# ========== Commands - Description ========== +cmd.desc.no_permission = You don't have permission. +cmd.desc.not_officer = You must be an officer to set the description. +cmd.desc.set = Faction description set! +cmd.desc.cleared = Faction description cleared. + +# ========== Commands - Open / Close ========== +cmd.open.no_permission = You don't have permission. +cmd.open.not_leader = Only the leader can change this setting. +cmd.open.already_open = Your faction is already open. +cmd.open.success = Your faction is now open! Anyone can join with /f join. +cmd.open.broadcast = {0} opened the faction to public joining. +cmd.close.no_permission = You don't have permission. +cmd.close.not_leader = Only the leader can change this setting. +cmd.close.already_closed = Your faction is already closed. +cmd.close.success = Your faction is now invite-only. +cmd.close.broadcast = {0} closed the faction to invite-only. + +# ========== Commands - Color ========== +cmd.color.no_permission = You don't have permission. +cmd.color.not_officer = You must be an officer to change the color. +cmd.color.colors_disabled = Faction colors are disabled. +cmd.color.usage = Usage: /f color +cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex +cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. +cmd.color.success = Faction color updated! + +# ========== Commands - Claim ========== +cmd.claim.no_permission = You don't have permission to claim territory. +cmd.claim.already_yours = Your faction already owns this chunk. +cmd.claim.cannot_claim_ally = You cannot claim ally territory. +cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. +cmd.claim.success = Claimed chunk at {0}, {1}! +cmd.claim.not_officer = You must be an officer to claim land. +cmd.claim.already_claimed = This chunk is already claimed. +cmd.claim.max_claims = Your faction has reached max claims. Get more power! +cmd.claim.not_adjacent = You must claim adjacent to existing territory. +cmd.claim.world_not_allowed = Claiming is not allowed in this world. +cmd.claim.orbisguard = This area is protected by OrbisGuard. +cmd.claim.zone_protected = This chunk is in a safezone or warzone. +cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. +cmd.claim.failed = Failed to claim chunk. + +# ========== Commands - Invite ========== +cmd.invite.no_permission = You don't have permission to invite players. +cmd.invite.not_officer = You must be an officer to invite players. +cmd.invite.usage = Usage: /f invite +cmd.invite.player_not_found = Player '{0}' not found or offline. +cmd.invite.target_in_faction = That player is already in a faction. +cmd.invite.sent = Invited {0} to your faction. +cmd.invite.received = You have been invited to join {0}! +cmd.invite.accept_hint = Type /f accept {0} to join. + +# ========== Commands - Accept / Join ========== +cmd.join.no_permission = You don't have permission to join factions. +cmd.join.already_in_named = You are already in {0}. +cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.join.no_invites = You have no pending invites. +cmd.join.faction_not_found = Faction '{0}' not found. +cmd.join.not_invited = You have no invite from that faction. +cmd.join.faction_gone = That faction no longer exists. +cmd.join.success = You have joined {0}! +cmd.join.broadcast = {0} has joined the faction! +cmd.join.faction_full = That faction is full. +cmd.join.failed = Failed to join faction. + +# ========== Commands - Kick ========== +cmd.kick.no_permission = You don't have permission to kick members. +cmd.kick.usage = Usage: /f kick +cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. +cmd.kick.success = Kicked {0} from the faction. +cmd.kick.broadcast = {0} was kicked from the faction. +cmd.kick.kicked = You have been kicked from the faction. +cmd.kick.cannot_kick_higher = You don't have permission to kick that player. +cmd.kick.cannot_kick_leader = You cannot kick the faction leader. +cmd.kick.failed = Failed to kick player. + +# ========== Commands - Leave ========== +cmd.leave.no_permission = You don't have permission to leave factions. +cmd.leave.confirm_prompt = Are you sure you want to leave your faction? +cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. +cmd.leave.success = You have left your faction. +cmd.leave.broadcast = {0} has left the faction. +cmd.leave.failed = Failed to leave faction. +cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. + +# ========== Commands - Promote / Demote / Transfer ========== +cmd.rank.promote_no_permission = You don't have permission to promote members. +cmd.rank.promote_usage = Usage: /f promote +cmd.rank.promoted = Promoted {0} to {1}! +cmd.rank.promote_broadcast = {0} was promoted to {1}! +cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. +cmd.rank.promote_failed = Failed to promote player. +cmd.rank.demote_no_permission = You don't have permission to demote members. +cmd.rank.demote_usage = Usage: /f demote +cmd.rank.demoted = Demoted {0} to {1}. +cmd.rank.demote_broadcast = {0} was demoted to {1}. +cmd.rank.already_lowest = That player is already a Member. +cmd.rank.demote_failed = Failed to demote player. +cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. +cmd.rank.transfer_usage = Usage: /f transfer +cmd.rank.player_not_in_faction = Player not found in your faction. +cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? +cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. +cmd.rank.transferred = Transferred leadership to {0}! +cmd.rank.transfer_broadcast = {0} is now the faction leader! +cmd.rank.transfer_failed = Failed to transfer leadership. +cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. + +# ========== Commands - Unclaim ========== +cmd.unclaim.no_permission = You don't have permission to unclaim territory. +cmd.unclaim.success = Unclaimed chunk at {0}, {1}. +cmd.unclaim.not_officer = You must be an officer to unclaim land. +cmd.unclaim.chunk_not_claimed = This chunk is not claimed. +cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. +cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. +cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. +cmd.unclaim.failed = Failed to unclaim chunk. + +# ========== Commands - Overclaim ========== +cmd.overclaim.no_permission = You don't have permission to overclaim territory. +cmd.overclaim.success = Overclaimed enemy territory! +cmd.overclaim.not_officer = You must be an officer to overclaim. +cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. +cmd.overclaim.own_chunk = Your faction already owns this chunk. +cmd.overclaim.ally = You cannot overclaim ally territory. +cmd.overclaim.target_has_power = This faction still has enough power. +cmd.overclaim.failed = Failed to overclaim. + +# ========== Commands - Stuck ========== +cmd.stuck.no_permission = You don't have permission to use /f stuck. +cmd.stuck.not_stuck = You're not stuck - this is wilderness. +cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! +cmd.stuck.no_safe = Could not find a safe location. +cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! + +# ========== Commands - Home ========== +cmd.home.no_permission = You don't have permission to teleport to faction home. +cmd.home.no_home = Your faction has no home set. +cmd.home.combat_tagged = You cannot teleport while in combat! +cmd.home.teleported = Teleported to faction home! + +# ========== Commands - SetHome ========== +cmd.sethome.no_permission = You don't have permission to set faction home. +cmd.sethome.world_not_allowed = Cannot set home in this world. +cmd.sethome.not_in_territory = You can only set home in your faction's territory. +cmd.sethome.set = Faction home set! +cmd.sethome.broadcast = {0} set the faction home. +cmd.sethome.not_officer = You must be an officer to set the home. +cmd.sethome.failed = Failed to set home. + +# ========== Commands - DelHome ========== +cmd.delhome.no_permission = You don't have permission to delete faction home. +cmd.delhome.no_home = Your faction does not have a home set. +cmd.delhome.deleted = Faction home deleted! +cmd.delhome.broadcast = {0} deleted the faction home. +cmd.delhome.not_officer = You must be an officer to delete the home. +cmd.delhome.failed = Failed to delete home. + +# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== +cmd.relation.ally_no_permission = You don't have permission to manage alliances. +cmd.relation.ally_usage = Usage: /f ally +cmd.relation.ally_sent = Ally request sent to {0}! +cmd.relation.ally_formed = You are now allies with {0}! +cmd.relation.already_ally = You are already allied with that faction. +cmd.relation.ally_failed = Failed to send ally request. +cmd.relation.enemy_no_permission = You don't have permission to declare enemies. +cmd.relation.enemy_usage = Usage: /f enemy +cmd.relation.enemy_declared = {0} is now your enemy! +cmd.relation.already_enemy = You are already enemies with that faction. +cmd.relation.max_enemies = You have reached the maximum number of enemies. +cmd.relation.enemy_failed = Failed to set enemy. +cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. +cmd.relation.neutral_usage = Usage: /f neutral +cmd.relation.neutral_set = Your faction is now neutral with {0}. +cmd.relation.already_neutral = You are already neutral with that faction. +cmd.relation.neutral_failed = Failed to set neutral. +cmd.relation.cannot_self = You cannot ally with yourself. +cmd.relation.max_allies = You have reached the maximum number of allies. +cmd.relation.view_no_permission = You don't have permission to view relations. +cmd.relation.header = === Faction Relations === +cmd.relation.allies_count = Allies ({0}): +cmd.relation.enemies_count = Enemies ({0}): +cmd.relation.list_entry = - {0} + +# ========== Commands - Chat ========== +cmd.chat.usage = Usage: /f c [f|a|off] +cmd.chat.no_permission = You don't have permission for that chat mode. +cmd.chat.mode_set = Chat mode set to {0} + +# ========== Commands - Invites ========== +cmd.invites.not_officer = You must be an officer to manage invites. +cmd.invites.header = === Faction Invites === +cmd.invites.no_pending = No pending invites or requests. +cmd.invites.outgoing = Outgoing Invites: +cmd.invites.outgoing_entry = {0} (invited by {1}) +cmd.invites.requests = Join Requests: +cmd.invites.request_entry = {0}{1} +cmd.invites.your_invites_header = === Your Invites === +cmd.invites.no_invites = You have no pending invites. +cmd.invites.invite_entry = {0} - Use /f accept {1} + +# ========== Commands - Request ========== +cmd.request.no_permission = You don't have permission to request faction membership. +cmd.request.already_in_named = You are already in {0}. +cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.request.usage = Usage: /f request [message] +cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. +cmd.request.already_requested = You already have a pending request to that faction. +cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. +cmd.request.sent = Sent join request to {0}! +cmd.request.your_message = Your message: "{0}" +cmd.request.officer_review = An officer will review your request. +cmd.request.officer_notify = {0} has requested to join your faction! +cmd.request.officer_review_hint = Use /f gui > Invites to review. + +# ========== Commands - Info ========== +cmd.info.faction_header = === {0} === +cmd.info.player_header = === {0} === +cmd.info.no_permission = You don't have permission to view faction info. +cmd.info.faction_not_found = Faction '{0}' not found. +cmd.info.not_in_faction_hint = You are not in a faction. Use /f info +cmd.info.leader = Leader: {0} +cmd.info.members = Members: {0}/{1} +cmd.info.power = Power: {0} +cmd.info.claims = Claims: {0} +cmd.info.raidable = RAIDABLE! +cmd.info.allies = Allies: {0} +cmd.info.enemies = Enemies: {0} +cmd.info.they_consider = They consider you: {0} +cmd.info.you_consider = You consider them: {0} +cmd.info.members_no_permission = You don't have permission to view faction members. +cmd.info.members_header = === {0} Members ({1}) === +cmd.info.member_online = [Online] +cmd.info.list_no_permission = You don't have permission to view faction list. +cmd.info.list_empty = There are no factions. +cmd.info.list_header = === Factions ({0}) === +cmd.info.list_entry = {0} - {1} members, {2} power +cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] +cmd.info.help_no_permission = You don't have permission to view help. +cmd.info.who_no_permission = You don't have permission to view player info. +cmd.info.who_faction = Faction: {0} +cmd.info.who_role = Role: {0} +cmd.info.who_joined = Joined: {0} +cmd.info.who_faction_none = Faction: None +cmd.info.who_power = Power: {0} +cmd.info.who_status = Status: {0} +cmd.info.who_last_seen = Last seen: {0} +cmd.info.map_no_permission = You don't have permission to view the map. +cmd.info.map_header = === Territory Map === +cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild +cmd.info.map_gui_hint = Use /f gui for interactive map + +# ========== Commands - Power ========== +cmd.power.personal = Personal Power: {0}/{1} +cmd.power.faction = Faction Power: {0}/{1} +cmd.power.death_loss = Death Loss: {0} +cmd.power.regen = Regen Rate: {0}/hr +cmd.power.no_permission = You don't have permission to view power info. +cmd.power.header = {0}'s Power: +cmd.power.current = Current: {0} + +# ========== Commands - Economy ========== +cmd.economy.balance = Balance: {0} +cmd.economy.deposited = Deposited {0} into the faction treasury. +cmd.economy.withdrawn = Withdrew {0} from the faction treasury. +cmd.economy.transferred = Transferred {0} to {1}. +cmd.economy.insufficient = Insufficient funds in faction treasury. +cmd.economy.invalid_amount = Invalid amount: {0} +cmd.economy.economy_disabled = Economy is disabled. +cmd.economy.balance_no_permission = You don't have permission to view balances. +cmd.economy.treasury_unavailable = Treasury is not available. +cmd.economy.balance_display = {0}'s treasury: {1} +cmd.economy.deposit_no_permission = You don't have permission to deposit. +cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. +cmd.economy.deposit_usage = Usage: /f deposit +cmd.economy.amount_positive = Amount must be positive. +cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} +cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. +cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. +cmd.economy.withdraw_no_permission = You don't have permission to withdraw. +cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. +cmd.economy.withdraw_usage = Usage: /f withdraw +cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} +cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. +cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. +cmd.economy.withdraw_failed = Withdrawal failed: {0} +cmd.economy.transfer_no_permission = You don't have permission to transfer. +cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. +cmd.economy.transfer_usage = Usage: /f money transfer +cmd.economy.transfer_self = Cannot transfer to your own faction. +cmd.economy.transfer_limit_denied = Transfer denied: {0} +cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. +cmd.economy.transfer_failed = Transfer failed: {0} +cmd.economy.log_no_permission = You don't have permission to view the transaction log. +cmd.economy.log_header = Transaction Log (page {0}/{1}) +cmd.economy.log_empty = No transactions found. +cmd.economy.money_help_header = Treasury Commands: +cmd.economy.money_help_balance = /f money balance [faction] - View balance +cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury +cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury +cmd.economy.money_help_transfer = /f money transfer - Transfer between factions +cmd.economy.money_help_log = /f money log [page] [type] - View transaction history + +# ========== Protection - Action Phrases ========== +protection.action.generic = You can't do that +protection.action.build = You can't build or break blocks +protection.action.interact = You can't interact with that +protection.action.door = You can't use doors +protection.action.container = You can't open containers +protection.action.bench = You can't use crafting stations +protection.action.processing = You can't use processing stations +protection.action.seat = You can't use seats +protection.action.light = You can't toggle lights +protection.action.teleporter = You can't use teleporters +protection.action.crate = You can't use crates +protection.action.tame = You can't tame creatures +protection.action.npc = You can't interact with NPCs +protection.action.mount = You can't mount creatures +protection.action.pve = You can't damage creatures +protection.action.item_drop = You can't drop items +protection.action.item_pickup = You can't pick up items + +# ========== Protection - Denial Reasons ========== +protection.denied.safezone = {0} in a SafeZone. +protection.denied.warzone = {0} in a WarZone. +protection.denied.enemy_claim = {0} in enemy territory. +protection.denied.claimed = {0} in claimed territory. +protection.denied.here = {0} here. +protection.denied.zone = {0} in this zone. +protection.denied.faction_perm = {0} here. (Faction permission: {1}) +protection.denied.ally_territory = {0} here. (Ally territory) +protection.denied.error = Protection error — action blocked for safety. + +# ========== Protection - PvP ========== +protection.pvp.safezone = PvP is disabled in SafeZones. +protection.pvp.same_faction = You cannot attack faction members. +protection.pvp.ally = You cannot attack allies. +protection.pvp.spawn_protected = That player has spawn protection. +protection.pvp.territory_disabled = PvP is disabled in this territory. +protection.pvp.generic = You cannot attack this player. + +# ========== Protection - Entity Damage ========== +protection.mob_damage_disabled = Mob damage is disabled in this zone. +protection.pve_damage_disabled = PvE damage is disabled in this zone. +protection.pve_territory_denied = You cannot damage mobs in this territory. + +# ========== Protection - Combat Tag ========== +protection.combat_tag_command = You cannot use that command while combat tagged. + +# ========== Server Announcements ========== +# These are broadcast to all online players for significant faction events. +# {0}, {1} = dynamic values (faction names, player names) +server_announce.faction_created = {0} has founded the faction {1}! +server_announce.faction_disbanded = The faction {0} has been disbanded! +server_announce.leadership_transfer = {0} is now the leader of {1}! +server_announce.overclaim = {0} has overclaimed territory from {1}! +server_announce.war_declared = {0} has declared war on {1}! +server_announce.alliance_formed = {0} and {1} are now allies! +server_announce.alliance_broken = {0} and {1} are no longer allies! + +# ========== Teleport System ========== +teleport.cooldown_wait = You must wait {0} before teleporting again. +teleport.warmup_start = Teleporting to faction home in {0} seconds... +teleport.combat_cancelled = Teleportation cancelled - you are in combat! +teleport.success_default = Teleported to faction home! +teleport.no_home = Your faction has no home set. +teleport.world_not_found = World not found. +teleport.failed = Teleportation failed. +teleport.countdown = Teleporting in {0} seconds... +teleport.countdown_one = Teleporting in 1 second... +teleport.moved_cancelled = Teleportation cancelled - you moved! +teleport.damage_cancelled = Teleportation cancelled - you took damage! +teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. +teleport.mount_entry_blocked = You can't enter this zone while mounted. + +# ========== Chat Display ========== +chat.display.public = Public +chat.display.faction = Faction +chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/tr-TR/hyperfactions_admin.lang b/src/main/resources/Server/Languages/tr-TR/hyperfactions_admin.lang new file mode 100644 index 00000000..932ef287 --- /dev/null +++ b/src/main/resources/Server/Languages/tr-TR/hyperfactions_admin.lang @@ -0,0 +1,268 @@ +# Language: Turkish (tr-TR) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Turkish translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions Admin GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule + +# ========== Admin Navigation Bar ========== +nav.dashboard = Dashboard +nav.actions = Actions +nav.factions = Factions +nav.players = Players +nav.economy = Economy +nav.zones = Zones +nav.config = Config +nav.backups = Backups +nav.log = Log +nav.updates = Updates +nav.help = Help +nav.version = Version + +# ========== Common Admin Labels ========== +common.faction_not_found = Faction Not Found +common.no_faction = No Faction +common.not_set = Not set +common.on = On +common.off = Off +common.enable = Enable +common.disable = Disable +common.none_paren = (None) +common.invalid_faction = Invalid faction. +common.leader_prefix = Leader: {0} +common.members_suffix = {0} members +common.claims_suffix = {0} claims +common.factions_suffix = {0} factions +common.players_suffix = {0} players +common.chunks_suffix = {0} chunks +common.entries_suffix = {0} entries +common.found_suffix = {0} found +common.power_format = {0}/{1} power +common.raidable = Raidable +common.protected = Protected +common.no_description = No description set. +common.officers_more = +{0} more +common.custom_max = (custom max) +common.default_max = (default max) +common.now = Now +common.ago_suffix = {0} ago +common.just_now = just now +common.no_membership_history = No membership history + +# ========== Admin Dashboard ========== +dashboard.factions_prefix = Factions: {0} +dashboard.members_prefix = Total Members: {0} +dashboard.claims_prefix = Total Claims: {0} + +# ========== Admin Actions ========== +actions.confirm_reset = Confirm Reset? +actions.confirm_trigger = Confirm Trigger? +actions.kd_reset = Reset K/D for {0} players. +actions.kd_reset_failed = Failed to reset K/D: {0} +actions.upkeep_unavailable = Upkeep processor is not available. +actions.upkeep_triggered = Upkeep collection triggered. +actions.upkeep_failed = Upkeep failed: {0} + +# ========== Admin Disband ========== +disband.faction_gone = Faction no longer exists. +disband.success = Faction '{0}' has been disbanded. +disband.failed = Failed to disband: {0} +disband.no_leader = Faction has no leader, cannot disband. + +# ========== Admin Unclaim All ========== +unclaim.removed = [Admin] Removed {0} claims from {1}. +unclaim.no_claims = {0} had no claims to remove. + +# ========== Admin Factions List ========== +factions.home_not_set = Not set +factions.teleported = Teleported to {0}'s home. +factions.no_home = Faction has no home set. +factions.world_not_found = Target world not found. + +# ========== Admin Faction Info ========== +info.faction_gone = This faction no longer exists. + +# ========== Admin Faction Members ========== +members.sort_role = Role +members.sort_online = Online +members.sort_name = Name +members.sort_power = Power +members.promoted = [Admin] Promoted {0} to {1}. +members.demoted = [Admin] Demoted {0} to {1}. +members.kicked = [Admin] Kicked {0} from the faction. + +# ========== Admin Faction Relations ========== +relations.allies_header = ALLIES ({0}) +relations.enemies_header = ENEMIES ({0}) +relations.no_allies = No allies. +relations.no_enemies = No enemies. +relations.neutral_count = {0} neutral factions +relations.since_today = Since: today +relations.since_one_day = Since: 1 day ago +relations.since_days = Since: {0} days ago +relations.set_ally = [Admin] Set mutual ally status with {0}. +relations.set_enemy = Set mutual enemy status with {0}. +relations.set_neutral = [Admin] Set mutual neutral status with {0}. + +# ========== Admin Faction Settings ========== +settings.locked = This setting is locked by server configuration. +settings.perm_toggled = Set {0} to {1}. +settings.color_changed = Set faction color to {0}. +settings.recruitment_set = Set recruitment to {0}. +settings.no_home = [Admin] This faction has no home set. +settings.home_cleared = Cleared faction home for {0}. + +# ========== Sort Dropdown Labels ========== +sort.power = Power +sort.name = Name +sort.members = Members +sort.balance = Balance + +# ========== Admin Players ========== +players.sort_last_online = Last Online +players.sort_faction = Faction +players.sort_online = Online +players.not_online = Player is not online. +players.world_not_found = Target world not found. +players.teleported = [Admin] Teleported to {0}. + +# ========== Admin Player Info ========== +playerinfo.disband_faction = Disband Faction +playerinfo.kick_leader = Kick Leader +playerinfo.enter_valid_number = Enter a valid number. +playerinfo.enter_valid_positive = Enter a valid positive number. +playerinfo.faction_gone = Faction no longer exists. +playerinfo.kd_reset = Reset K/D for {0}. +playerinfo.kicked_success = Kicked {0} from {1}. +playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. +playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). + +# ========== Admin Economy ========== +economy.no_data = No factions with economy data. +economy.amount_zero = Amount cannot be zero. +economy.enter_amount = Please enter an amount. +economy.invalid_number = Invalid number: {0} +economy.error = An error occurred. +economy.balance_negative = Balance cannot be negative. +economy.failed = Failed: {0} +economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. +economy.bulk_failures = ({0} failed) + +# ========== Admin Zones ========== +zones.not_found = Zone not found. +zones.invalid_id = Invalid zone ID. +zones.deleted = Zone {0} deleted. +zones.delete_failed = Failed to delete zone: {0} +zones.no_chunks = No chunks +zones.chunks_suffix = {0} ({1} chunks) + +# ========== Zone Create Wizard ========== +wizard.enter_name = Please enter a zone name. +wizard.name_too_short = Zone name must be at least {0} characters. +wizard.name_too_long = Zone name cannot exceed {0} characters. +wizard.name_taken = A zone with this name already exists. +wizard.radius_range = Radius must be between 1 and {0}. +wizard.create_failed = Could not create zone: {0} +wizard.created_not_found = Zone created but could not be found. +wizard.created = Created {0} '{1}'! +wizard.chunk_claimed = Claimed chunk ({0}, {1}). +wizard.chunk_failed = Could not claim current chunk: {0} +wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. +wizard.radius_no_claims = No chunks could be claimed (area may be occupied). +wizard.no_claims = Zone created with no claims. +wizard.chunks_preview = ~{0} chunks + +# ========== Zone Rename ========== +zone_rename.zone_gone = Zone no longer exists. +zone_rename.enter_name = Please enter a zone name. +zone_rename.too_short = Zone name must be at least {0} character. +zone_rename.too_long = Zone name cannot exceed {0} characters. +zone_rename.same_name = That's already this zone's name. +zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! +zone_rename.name_taken = A zone with that name already exists. +zone_rename.invalid_name = Invalid zone name. +zone_rename.rename_failed = Failed to rename zone: {0} + +# ========== Zone Change Type ========== +zone_type.zone_gone = Zone no longer exists. +zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). +zone_type.failed = Failed to change zone type: {0} + +# ========== Zone Integration Flags ========== +zone_int.zone_not_found = Zone Not Found +zone_int.no_plugin = (no plugin) +zone_int.default = (default) +zone_int.custom = (custom) + +# ========== Activity Log ========== +log.all_types = All Types +log.no_logs = No activity logs matching filters. + +# ========== Version Page ========== +version.active = Active +version.not_found = Not Found +version.not_detected = Not Detected +version.not_installed = Not Installed +version.active_version = Active (v{0}) +version.active_compatible = Active (compatible) +version.active_claims_only = Active (claims only) +version.installed_no_perm = Installed (no perm provider) +version.active_provider = Active ({0}) + +# ========== Admin Main Page ========== +main.reload_hint = Use /f reload to reload configuration. +main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. + +# ========== Zone Flags/Settings ========== +zflags.invalid_flag = Invalid flag. +zflags.zone_not_found = Zone not found. +zflags.conflict = (conflict) +zflags.mixin = (mixin) +zflags.reset_int = Reset integration flags to defaults. +zflags.reset_all = Reset all flags to defaults. +zflags.reset_failed = Failed to reset flags: {0} +zflags.back_to_settings = Back to Settings + +# ========== Zone Properties ========== +zprop.current_custom = Current: "{0}" (custom) +zprop.current_default = Current: "{0}" (default) +zprop.pvp_disabled = PvP Disabled +zprop.pvp_enabled = PvP Enabled +zprop.name_empty = Name cannot be empty. +zprop.renamed = Zone renamed to "{0}". +zprop.name_taken = A zone with that name already exists. +zprop.name_invalid = Invalid name (max 32 characters). +zprop.rename_failed = Failed to rename: {0} +zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. +zprop.upper_set = Upper title set. +zprop.upper_reset = Upper title reset to default. +zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. +zprop.lower_set = Lower title set. +zprop.lower_reset = Lower title reset to default. + +# ========== Relations Additional ========== +relations.failed = Failed: {0} + +# ========== Members Additional ========== +members.never = Never +members.teleported = [Admin] Teleported to {0}. + +# ========== Player Info Additional ========== +playerinfo.records = {0} records +playerinfo.joined_date = Joined: {0} +playerinfo.current = Current +playerinfo.left_date = Left: {0} + +# ========== Zone Map ========== +map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' +map.position = Your Position: Chunk ({0}, {1}) +map.zone_gone = Zone no longer exists. +map.claimed = Claimed chunk ({0}, {1}) for {2}. +map.claim_failed = Failed to claim chunk: {0} +map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. +map.unclaim_failed = Failed to unclaim chunk: {0} +map.chunk_belongs = This chunk belongs to {0}. +map.chunk_faction = This chunk is claimed by a faction. +map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/tr-TR/hyperfactions_gui.lang b/src/main/resources/Server/Languages/tr-TR/hyperfactions_gui.lang new file mode 100644 index 00000000..e5dcd0aa --- /dev/null +++ b/src/main/resources/Server/Languages/tr-TR/hyperfactions_gui.lang @@ -0,0 +1,446 @@ +# Language: Turkish (tr-TR) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Turkish translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule + +# ========== Navigation Bar ========== +nav.dashboard = Dashboard +nav.chat = Chat +nav.members = Members +nav.invites = Invites +nav.browser = Browse +nav.map = Map +nav.leaderboard = Leaderboard +nav.relations = Relations +nav.treasury = Treasury +nav.settings = Settings +nav.logs = Logs +nav.help = Help +nav.admin = Admin +nav.create = Create + +# ========== Help Category Names ========== +help.category.welcome = Welcome +help.category.your_faction = Your Faction +help.category.power_land = Power & Land +help.category.diplomacy = Diplomacy +help.category.combat = Combat & Safety +help.category.economy = Economy +help.category.quick_ref = Quick Reference + +# ========== Main Menu ========== +main_menu.section_my_faction = My Faction +main_menu.section_get_started = Get Started +main_menu.section_territory = Territory +main_menu.section_browse = Browse +main_menu.section_admin = Admin +main_menu.claim_hint = Use /f claim to claim territory. + +# ========== Faction Info Page ========== +faction_info.no_description = No description set. +faction_info.status_open = Open +faction_info.status_invite_only = Invite Only +faction_info.status_raidable = Raidable +faction_info.status_protected = Protected +faction_info.officers_more = +{0} more + +# ========== Rename Modal ========== +rename.no_permission = You don't have permission to rename the faction. +rename.enter_name = Please enter a faction name. +rename.too_short = Faction name must be at least {0} characters. +rename.too_long = Faction name cannot exceed {0} characters. +rename.same_name = That's already your faction's name. +rename.name_taken = A faction with that name already exists. +rename.success = Faction renamed from {0} to {1}! + +# ========== Description Modal ========== +desc.no_permission = You don't have permission to edit the description. +desc.display_none = (None) +desc.cleared = Faction description cleared. +desc.updated = Faction description updated! + +# ========== Tag Modal ========== +tag.no_permission = You don't have permission to edit the tag. +tag.display_none = (None) +tag.cleared = Faction tag cleared. +tag.too_short = Tag must be at least {0} character. +tag.too_long = Tag cannot exceed {0} characters. +tag.invalid_format = Tag can only contain letters and numbers. +tag.same_tag = That's already your faction's tag. +tag.tag_taken = A faction with that tag already exists. +tag.success = Faction tag set to [{0}]! + +# ========== Dashboard Page ========== +dashboard.faction_gone = Your faction no longer exists. +dashboard.available = {0} available +dashboard.at_risk = At Risk! +dashboard.online_count = {0} online +dashboard.status_invite = Invite +dashboard.in_grace = IN GRACE +dashboard.billable_chunks = {0} billable chunks +dashboard.btn_home = Home +dashboard.btn_set_home = Set Home +dashboard.btn_claim = Claim +dashboard.chat_prefix = Chat: {0} +dashboard.btn_leave = Leave +dashboard.no_activity = No recent activity. +dashboard.time_now = now +dashboard.time_minutes = {0}m ago +dashboard.time_hours = {0}h ago +dashboard.time_days = {0}d ago +dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. +dashboard.chat_mode_set = Chat mode: {0} +dashboard.claim_success = Claimed chunk at ({0}, {1}) + +# ========== Faction Main Page ========== +main.no_faction = No Faction +main.joined = You joined the faction! +main.join_failed = Failed to join faction: {0} +main.invite_declined = Invite declined. +main.cooldown = Teleport on cooldown! {0}s remaining. +main.world_not_found = Cannot teleport - world not found. +main.leave_failed = Failed to leave: {0} + +# ========== Shared GUI Labels ========== +common.faction_count = {0} factions +common.leader_label = Leader: {0} +common.sort_power = Power +common.sort_members = Members +common.page_format = {0}/{1} +common.own_faction = (You) + +# ========== Members Page ========== +members.count = {0} members +members.sort_role = Role +members.sort_last_online = Last Online +members.just_now = just now +members.ago = {0} ago +members.never = Never +members.member_not_found = Member not found. +members.promoted = Promoted {0} to {1}. +members.promote_failed = Failed to promote: {0} +members.demoted = Demoted {0} to {1}. +members.demote_failed = Failed to demote: {0} +members.kicked = Kicked {0} from the faction. +members.kick_failed = Failed to kick: {0} + +# ========== Browser Page ========== +browser.sort_name = Name +browser.invalid_faction = Invalid faction. + +# ========== Leaderboard Page ========== +leaderboard.sort_kd = K/D +leaderboard.sort_territory = Territory +leaderboard.sort_balance = Balance + +# ========== Player Info Page ========== +playerinfo.now = Now +playerinfo.history_count = {0} records +playerinfo.joined_label = Joined: {0} +playerinfo.current = Current +playerinfo.left_label = Left: {0} +playerinfo.no_history = No membership history +playerinfo.faction_gone = Faction no longer exists. +playerinfo.reason_active = ACTIVE +playerinfo.reason_left = LEFT +playerinfo.reason_kicked = KICKED +playerinfo.reason_disbanded = DISBANDED + +# ========== Relations Page ========== +relations.relation_count = {0} relations +relations.request_count = {0} requests +relations.type_ally = Ally +relations.type_enemy = Enemy +relations.type_incoming = Incoming +relations.type_outgoing = Outgoing +relations.incoming_request = Incoming request +relations.outgoing_request = Outgoing request +relations.empty_relations = No relations yet. +relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. +relations.empty_pending = No pending ally requests. +relations.today = Today +relations.one_day_ago = 1 day ago +relations.days_ago = {0} days ago +relations.now_neutral = Now neutral with {0}. +relations.now_enemies = Now enemies with {0}! +relations.request_sent = Alliance request sent to {0}. +relations.now_allied = Now allied with {0}! +relations.request_declined = Ally request from {0} declined. +relations.request_cancelled = Ally request to {0} cancelled. +relations.failed = Failed: {0} +relations.search_hint = Search for a faction to set relation +relations.no_results = No factions found matching '{0}' +relations.power_display = {0} power +relations.member_count = {0} members + +# ========== Settings Page ========== +settings.officers_only = Only officers and leaders can change faction settings. +settings.display_none = (None) +settings.home_not_set = Not set +settings.no_permission = You don't have permission to change settings. +settings.only_leader_disband = Only the leader can disband the faction. +settings.perm_locked = This setting is locked by the server. +settings.no_perm_edit = You don't have permission to edit territory permissions. +settings.only_leader_officers = Only the leader can change officer access. +settings.pvp_enabled = Enabled +settings.pvp_disabled = Disabled +settings.not_in_territory = You must be in your faction's territory to set home. +settings.home_set = Faction home set to your current location! +settings.recruitment_set = Recruitment set to {0}. +settings.home_no_set = Your faction does not have a home set. +settings.home_deleted = Faction home deleted! + +# ========== Modules Page ========== +modules.treasury_name = Treasury +modules.treasury_desc = Faction bank & economy system +modules.raids_name = Raids +modules.raids_desc = Scheduled faction battles +modules.levels_name = Levels +modules.levels_desc = Faction progression & XP +modules.war_name = War +modules.war_desc = Formal war declarations +modules.coming_soon = Coming Soon +modules.active = Active +modules.view_treasury = View Treasury +modules.unavailable = Unavailable +modules.no_economy = No economy plugin detected +modules.disabled = Disabled +modules.economy_not_available = Economy features are not available on this server + +# ========== Treasury Page ========== +treasury.wallet_label = Your wallet: {0} +treasury.treasury_label = Treasury balance: {0} +treasury.chunks_detail = {0} free + {1} billable chunks +treasury.cost_label = Cost: {0} +treasury.pending = Pending +treasury.auto_pay_on = Auto-pay: ON +treasury.auto_pay_off = Auto-pay: OFF +treasury.runway_90_plus = 90+ days +treasury.runway_days = {0} days +treasury.runway_day = {0} day +treasury.runway_less_day = < 1 day +treasury.runway_no_funds = No funds +treasury.grace_expires = Grace expires in: {0} +treasury.missed_payments = Missed payments: {0} +treasury.pay_to_clear = Pay {0} to clear grace +treasury.system = System +treasury.type_deposit = Deposit +treasury.type_withdrawal = Withdrawal +treasury.type_transfer_in = Transfer In +treasury.type_transfer_out = Transfer Out +treasury.type_player_transfer = Player Transfer +treasury.type_upkeep = Upkeep +treasury.type_tax = Tax Collection +treasury.type_war_cost = War Cost +treasury.type_raid_cost = Raid Cost +treasury.type_spoils = Spoils +treasury.type_admin = Admin Adjustment +treasury.deposit_title = Deposit to Treasury +treasury.withdraw_title = Withdraw from Treasury +treasury.fee_label = Fee ({0}%) +treasury.confirm_deposit = Confirm Deposit +treasury.confirm_withdrawal = Confirm Withdrawal +treasury.from_wallet = {0} from wallet +treasury.to_wallet = {0} to wallet +treasury.enter_valid_amount = Enter a valid positive amount. +treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. +treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. +treasury.deposit_failed_returned = Failed to deposit. Money returned. +treasury.deposited = Deposited {0} into the treasury. +treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) +treasury.no_withdraw_permission = You don't have permission to withdraw. +treasury.withdraw_denied = Withdrawal denied: {0} +treasury.insufficient_treasury = Insufficient funds in treasury. +treasury.withdraw_limit = Withdrawal limit exceeded. +treasury.withdraw_failed = Withdrawal failed: {0} +treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. +treasury.withdrew = Withdrew {0} from the treasury. +treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) +treasury.search_hint = Search for a player or faction +treasury.no_results = No results for '{0}' +treasury.tag_player = [Player] +treasury.tag_faction = [Faction] +treasury.source_online = Online +treasury.source_offline = Offline +treasury.source_player_db = Hytale player +treasury.no_transfer_permission = You don't have permission to transfer. +treasury.transfer_denied = Transfer denied: {0} +treasury.invalid_target_faction = Invalid target faction. +treasury.target_faction_gone = Target faction no longer exists. +treasury.transfer_failed = Transfer failed: {0} +treasury.transfer_failed_returned = Transfer failed. Funds returned. +treasury.transferred = Transferred {0} to {1}. +treasury.invalid_target_player = Invalid target player. +treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. +treasury.leader_only_perms = Only the leader can change treasury permissions. +treasury.leader_only_upkeep = Only the leader can change upkeep settings. +treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. + +# ========== Confirmation Pages ========== +confirm.disband_not_leader = Only the leader can disband the faction. +confirm.disbanded = Faction '{0}' has been disbanded. +confirm.disband_failed = Failed to disband faction. +confirm.succession_title = Leadership will transfer to: +confirm.no_members_warning = WARNING: No other members! +confirm.will_disband = Leaving will disband the faction permanently. +confirm.not_in_faction = You are not in this faction. +confirm.not_leader_anymore = You are no longer the leader. +confirm.no_successor = No successor available. Use disband instead. +confirm.transfer_failed = Failed to transfer leadership: {0} +confirm.leader_left = Leadership transferred to {0}. You have left {1}. +confirm.leave_failed = Failed to leave faction: {0} +confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. +confirm.left_faction = You have left {0}. +confirm.faction_gone = Faction no longer exists. +confirm.not_leader_transfer = Only the leader can transfer leadership. +confirm.leadership_transferred = Leadership transferred to {0}. + +# ========== Logs Viewer Page ========== +logs.title = {0} - Activity Logs +logs.entry_count = {0} entries +logs.all_types = All Types +logs.no_logs_type = No logs of this type. +logs.no_logs = No activity logs yet. + +# ========== Chat Page ========== +chat.placeholder = Type a message... +chat.no_messages = No messages yet. +chat.no_ally_permission = You don't have permission for ally chat. +chat.no_permission = No permission. +chat.faction_gone = Your faction no longer exists. +chat.time_now = now +chat.time_minutes = {0}m +chat.time_hours = {0}h + +# ========== Invites Page ========== +invites.invite_count = {0} invites +invites.request_count = {0} requests +invites.invited_by = Invited by: {0} +invites.no_message = No message +invites.expires = Expires: {0} +invites.type_outgoing = Outgoing +invites.type_request = Request +invites.invited_by_label = Invited by: +invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. +invites.empty_requests = No join requests. Players can request to join with /f request. +invites.invalid_player = Invalid player. +invites.cancelled_invite = Cancelled invite to {0}. +invites.player_joined = {0} has joined the faction! +invites.faction_full = Faction is full. Cannot accept request. +invites.add_failed = Failed to add player to faction. +invites.request_expired = Request not found or expired. +invites.request_declined = Declined join request from {0}. +invites.time_seconds = {0}s +invites.time_minutes = {0}m +invites.time_hours = {0}h + +# ========== Map Page ========== +map.position = Your Position: Chunk ({0}, {1}) +map.legend_protected = Protected +map.claim_stats = Claims: {0}/{1} ({2} Available) +map.overclaimed = OVERCLAIMED by {0}! +map.power_display = Power: {0}/{1} +map.join_to_claim = Join a faction to claim +map.claim_success = Claimed chunk at ({0}, {1})! +map.claim_not_in_faction = You must be in a faction to claim territory. +map.claim_not_officer = Only officers and leaders can claim territory. +map.claim_already_yours = You already own this chunk. +map.claim_already_claimed = This chunk is already claimed by another faction. +map.claim_not_adjacent = You can only claim chunks adjacent to your territory. +map.claim_max = You have reached your maximum claim limit. +map.claim_world_not_allowed = Claiming is not allowed in this world. +map.claim_orbisguard = This area is protected by OrbisGuard. +map.claim_failed = Failed to claim chunk. +map.unclaim_success = Unclaimed chunk at ({0}, {1}). +map.unclaim_not_in_faction = You must be in a faction. +map.unclaim_not_officer = Only officers and leaders can unclaim territory. +map.unclaim_not_claimed = This chunk is not claimed. +map.unclaim_not_yours = This chunk belongs to another faction. +map.unclaim_home = Cannot unclaim the chunk containing your faction home. +map.unclaim_failed = Failed to unclaim chunk. +map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! +map.overclaim_not_in_faction = You must be in a faction. +map.overclaim_not_officer = Only officers and leaders can overclaim territory. +map.overclaim_already_yours = You already own this chunk. +map.overclaim_ally = You cannot overclaim allied territory. +map.overclaim_has_power = This faction has enough power to defend their territory. +map.overclaim_max = You have reached your maximum claim limit. +map.overclaim_failed = Failed to overclaim chunk. +# ========== Create Faction Page ========== +create.preview_name = Your Faction Name +create.leader_prefix = Leader: {0} +create.enter_name = Please enter a faction name. +create.name_too_short = Faction name must be at least {0} characters. +create.name_too_long = Faction name cannot exceed {0} characters. +create.name_taken = A faction with this name already exists. +create.tag_length = Faction tag must be {0}-{1} characters. +create.tag_format = Faction tag can only contain letters and numbers. +create.desc_too_long = Description cannot exceed {0} characters. +create.created = Faction {0} created successfully! +create.created_no_dashboard = Faction created but could not open dashboard. +create.invalid_name = Invalid faction name. +create.create_failed = Could not create faction. + +# ========== New Player Pages ========== +newplayer.pending_count = {0} pending +newplayer.received_header = RECEIVED INVITES ({0}) +newplayer.requests_header = YOUR REQUESTS ({0}) +newplayer.no_invites = No invites. Browse factions to find one! +newplayer.no_requests = No pending requests. +newplayer.invited_by = Invited by: {0} +newplayer.member_count = {0} members +newplayer.power_count = {0} power +newplayer.claim_count = {0} claims +newplayer.awaiting_review = Awaiting review +newplayer.expires_in = Expires in {0}h +newplayer.time_just_now = just now +newplayer.time_minutes = {0} min ago +newplayer.time_hours = {0}h ago +newplayer.time_days = {0}d ago +newplayer.invalid_faction = Invalid faction. +newplayer.invite_expired = This invite has expired or was revoked. +newplayer.faction_gone = Faction no longer exists. +newplayer.joined = You joined {0}! +newplayer.faction_full = This faction is full. +newplayer.join_failed = Could not join faction. +newplayer.invite_declined = Invite declined. +newplayer.request_cancelled = Cancelled request to join {0}. +newplayer.faction_count = {0} factions +newplayer.browse_subtitle = Find your new home! +newplayer.sort_power = Power +newplayer.sort_name = Name +newplayer.sort_members = Members +newplayer.btn_accept = Accept +newplayer.btn_pending = Pending +newplayer.btn_join = Join +newplayer.btn_request = Request +newplayer.invite_only_msg = This faction is invite-only. +newplayer.welcome_hint = Welcome! Use /f to open faction menu. +newplayer.faction_open_hint = This faction is open! Click JOIN instead. +newplayer.already_requested = You already have a pending request to this faction. +newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. +newplayer.request_sent = Join request sent to {0}! +newplayer.officer_review = An officer will review your request. +newplayer.map_hint = View Only - Join a faction to claim territory! + +# Player Settings +nav.player_settings = Settings +player_settings.title = Player Settings +player_settings.language_section = Language +player_settings.auto_detect = Auto-detect from client +player_settings.auto_detect_desc = Uses your game client's language setting +player_settings.language_label = Language +player_settings.notifications_section = Notifications +player_settings.territory_alerts = Territory Alerts +player_settings.territory_alerts_desc = Show notifications when entering/leaving territories +player_settings.death_announcements = Death Broadcasts +player_settings.death_announcements_desc = Receive faction member death location announcements +player_settings.power_notifications = Power Changes +player_settings.power_notifications_desc = Show messages when your power changes +player_settings.language_changed = Language changed to {0} +player_settings.pref_enabled = {0} enabled +player_settings.pref_disabled = {0} disabled diff --git a/src/main/resources/Server/Languages/zh-CN/hyperfactions.lang b/src/main/resources/Server/Languages/zh-CN/hyperfactions.lang new file mode 100644 index 00000000..66ec67dc --- /dev/null +++ b/src/main/resources/Server/Languages/zh-CN/hyperfactions.lang @@ -0,0 +1,452 @@ +# Language: Simplified Chinese (zh-CN) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Simplified Chinese translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions - English Translations +# Format: key = value (or key = "quoted value") +# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule +# Placeholders: {0}, {1}, etc. + +# ========== Common ========== +common.no_permission = You don't have permission to do that. +common.not_in_faction = You are not in a faction. +common.already_in_faction = You are already in a faction. +common.player_not_found = Player not found. +common.faction_not_found = Faction not found. +common.player_not_online = That player is not online. +common.must_be_leader = Only the faction leader can do that. +common.must_be_officer = You must be an Officer or Leader to do that. +common.combat_tagged = You can't do that while combat tagged. +common.cancel = Cancel +common.confirm = Confirm +common.save = Save +common.close = Close +common.yes = Yes +common.no = No +common.loading = Loading... +common.online = Online +common.offline = Offline +common.enabled = Enabled +common.disabled = Disabled +common.none = None +common.page = Page {0} of {1} +common.unknown = Unknown +common.error_generic = Something went wrong. Please try again. +common.gui_fallback = Could not access GUI. Use /f help for commands. +common.admin_prefix = [Admin] +common.location_error = Could not determine your location. +common.world_error = Could not determine your world. +common.invalid_id = Invalid faction ID. +common.na = N/A + +# ========== Commands - Create ========== +cmd.create.no_permission = You don't have permission to create factions. +cmd.create.usage = Usage: /f create +cmd.create.success = Faction '{0}' created! +cmd.create.already_in_named = You are already in {0}. +cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. +cmd.create.name_taken = That faction name is already taken. +cmd.create.name_too_short = Faction name is too short. +cmd.create.name_too_long = Faction name is too long. +cmd.create.failed = Failed to create faction. + +# ========== Commands - Disband ========== +cmd.disband.no_permission = You don't have permission to disband factions. +cmd.disband.not_leader = Only the faction leader can disband. +cmd.disband.confirm_prompt = Are you sure you want to disband your faction? +cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. +cmd.disband.success = Your faction has been disbanded. +cmd.disband.failed = Failed to disband faction. +cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. + +# ========== Commands - Rename ========== +cmd.rename.no_permission = You don't have permission. +cmd.rename.not_leader = Only the leader can rename the faction. +cmd.rename.usage = Usage: /f rename +cmd.rename.too_short = Name is too short (min {0} chars). +cmd.rename.too_long = Name is too long (max {0} chars). +cmd.rename.name_taken = That name is already taken. +cmd.rename.success = Faction renamed to {0}! +cmd.rename.broadcast = {0} renamed the faction to {1} + +# ========== Commands - Description ========== +cmd.desc.no_permission = You don't have permission. +cmd.desc.not_officer = You must be an officer to set the description. +cmd.desc.set = Faction description set! +cmd.desc.cleared = Faction description cleared. + +# ========== Commands - Open / Close ========== +cmd.open.no_permission = You don't have permission. +cmd.open.not_leader = Only the leader can change this setting. +cmd.open.already_open = Your faction is already open. +cmd.open.success = Your faction is now open! Anyone can join with /f join. +cmd.open.broadcast = {0} opened the faction to public joining. +cmd.close.no_permission = You don't have permission. +cmd.close.not_leader = Only the leader can change this setting. +cmd.close.already_closed = Your faction is already closed. +cmd.close.success = Your faction is now invite-only. +cmd.close.broadcast = {0} closed the faction to invite-only. + +# ========== Commands - Color ========== +cmd.color.no_permission = You don't have permission. +cmd.color.not_officer = You must be an officer to change the color. +cmd.color.colors_disabled = Faction colors are disabled. +cmd.color.usage = Usage: /f color +cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex +cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. +cmd.color.success = Faction color updated! + +# ========== Commands - Claim ========== +cmd.claim.no_permission = You don't have permission to claim territory. +cmd.claim.already_yours = Your faction already owns this chunk. +cmd.claim.cannot_claim_ally = You cannot claim ally territory. +cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. +cmd.claim.success = Claimed chunk at {0}, {1}! +cmd.claim.not_officer = You must be an officer to claim land. +cmd.claim.already_claimed = This chunk is already claimed. +cmd.claim.max_claims = Your faction has reached max claims. Get more power! +cmd.claim.not_adjacent = You must claim adjacent to existing territory. +cmd.claim.world_not_allowed = Claiming is not allowed in this world. +cmd.claim.orbisguard = This area is protected by OrbisGuard. +cmd.claim.zone_protected = This chunk is in a safezone or warzone. +cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. +cmd.claim.failed = Failed to claim chunk. + +# ========== Commands - Invite ========== +cmd.invite.no_permission = You don't have permission to invite players. +cmd.invite.not_officer = You must be an officer to invite players. +cmd.invite.usage = Usage: /f invite +cmd.invite.player_not_found = Player '{0}' not found or offline. +cmd.invite.target_in_faction = That player is already in a faction. +cmd.invite.sent = Invited {0} to your faction. +cmd.invite.received = You have been invited to join {0}! +cmd.invite.accept_hint = Type /f accept {0} to join. + +# ========== Commands - Accept / Join ========== +cmd.join.no_permission = You don't have permission to join factions. +cmd.join.already_in_named = You are already in {0}. +cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.join.no_invites = You have no pending invites. +cmd.join.faction_not_found = Faction '{0}' not found. +cmd.join.not_invited = You have no invite from that faction. +cmd.join.faction_gone = That faction no longer exists. +cmd.join.success = You have joined {0}! +cmd.join.broadcast = {0} has joined the faction! +cmd.join.faction_full = That faction is full. +cmd.join.failed = Failed to join faction. + +# ========== Commands - Kick ========== +cmd.kick.no_permission = You don't have permission to kick members. +cmd.kick.usage = Usage: /f kick +cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. +cmd.kick.success = Kicked {0} from the faction. +cmd.kick.broadcast = {0} was kicked from the faction. +cmd.kick.kicked = You have been kicked from the faction. +cmd.kick.cannot_kick_higher = You don't have permission to kick that player. +cmd.kick.cannot_kick_leader = You cannot kick the faction leader. +cmd.kick.failed = Failed to kick player. + +# ========== Commands - Leave ========== +cmd.leave.no_permission = You don't have permission to leave factions. +cmd.leave.confirm_prompt = Are you sure you want to leave your faction? +cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. +cmd.leave.success = You have left your faction. +cmd.leave.broadcast = {0} has left the faction. +cmd.leave.failed = Failed to leave faction. +cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. + +# ========== Commands - Promote / Demote / Transfer ========== +cmd.rank.promote_no_permission = You don't have permission to promote members. +cmd.rank.promote_usage = Usage: /f promote +cmd.rank.promoted = Promoted {0} to {1}! +cmd.rank.promote_broadcast = {0} was promoted to {1}! +cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. +cmd.rank.promote_failed = Failed to promote player. +cmd.rank.demote_no_permission = You don't have permission to demote members. +cmd.rank.demote_usage = Usage: /f demote +cmd.rank.demoted = Demoted {0} to {1}. +cmd.rank.demote_broadcast = {0} was demoted to {1}. +cmd.rank.already_lowest = That player is already a Member. +cmd.rank.demote_failed = Failed to demote player. +cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. +cmd.rank.transfer_usage = Usage: /f transfer +cmd.rank.player_not_in_faction = Player not found in your faction. +cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? +cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. +cmd.rank.transferred = Transferred leadership to {0}! +cmd.rank.transfer_broadcast = {0} is now the faction leader! +cmd.rank.transfer_failed = Failed to transfer leadership. +cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. + +# ========== Commands - Unclaim ========== +cmd.unclaim.no_permission = You don't have permission to unclaim territory. +cmd.unclaim.success = Unclaimed chunk at {0}, {1}. +cmd.unclaim.not_officer = You must be an officer to unclaim land. +cmd.unclaim.chunk_not_claimed = This chunk is not claimed. +cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. +cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. +cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. +cmd.unclaim.failed = Failed to unclaim chunk. + +# ========== Commands - Overclaim ========== +cmd.overclaim.no_permission = You don't have permission to overclaim territory. +cmd.overclaim.success = Overclaimed enemy territory! +cmd.overclaim.not_officer = You must be an officer to overclaim. +cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. +cmd.overclaim.own_chunk = Your faction already owns this chunk. +cmd.overclaim.ally = You cannot overclaim ally territory. +cmd.overclaim.target_has_power = This faction still has enough power. +cmd.overclaim.failed = Failed to overclaim. + +# ========== Commands - Stuck ========== +cmd.stuck.no_permission = You don't have permission to use /f stuck. +cmd.stuck.not_stuck = You're not stuck - this is wilderness. +cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! +cmd.stuck.no_safe = Could not find a safe location. +cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! + +# ========== Commands - Home ========== +cmd.home.no_permission = You don't have permission to teleport to faction home. +cmd.home.no_home = Your faction has no home set. +cmd.home.combat_tagged = You cannot teleport while in combat! +cmd.home.teleported = Teleported to faction home! + +# ========== Commands - SetHome ========== +cmd.sethome.no_permission = You don't have permission to set faction home. +cmd.sethome.world_not_allowed = Cannot set home in this world. +cmd.sethome.not_in_territory = You can only set home in your faction's territory. +cmd.sethome.set = Faction home set! +cmd.sethome.broadcast = {0} set the faction home. +cmd.sethome.not_officer = You must be an officer to set the home. +cmd.sethome.failed = Failed to set home. + +# ========== Commands - DelHome ========== +cmd.delhome.no_permission = You don't have permission to delete faction home. +cmd.delhome.no_home = Your faction does not have a home set. +cmd.delhome.deleted = Faction home deleted! +cmd.delhome.broadcast = {0} deleted the faction home. +cmd.delhome.not_officer = You must be an officer to delete the home. +cmd.delhome.failed = Failed to delete home. + +# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== +cmd.relation.ally_no_permission = You don't have permission to manage alliances. +cmd.relation.ally_usage = Usage: /f ally +cmd.relation.ally_sent = Ally request sent to {0}! +cmd.relation.ally_formed = You are now allies with {0}! +cmd.relation.already_ally = You are already allied with that faction. +cmd.relation.ally_failed = Failed to send ally request. +cmd.relation.enemy_no_permission = You don't have permission to declare enemies. +cmd.relation.enemy_usage = Usage: /f enemy +cmd.relation.enemy_declared = {0} is now your enemy! +cmd.relation.already_enemy = You are already enemies with that faction. +cmd.relation.max_enemies = You have reached the maximum number of enemies. +cmd.relation.enemy_failed = Failed to set enemy. +cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. +cmd.relation.neutral_usage = Usage: /f neutral +cmd.relation.neutral_set = Your faction is now neutral with {0}. +cmd.relation.already_neutral = You are already neutral with that faction. +cmd.relation.neutral_failed = Failed to set neutral. +cmd.relation.cannot_self = You cannot ally with yourself. +cmd.relation.max_allies = You have reached the maximum number of allies. +cmd.relation.view_no_permission = You don't have permission to view relations. +cmd.relation.header = === Faction Relations === +cmd.relation.allies_count = Allies ({0}): +cmd.relation.enemies_count = Enemies ({0}): +cmd.relation.list_entry = - {0} + +# ========== Commands - Chat ========== +cmd.chat.usage = Usage: /f c [f|a|off] +cmd.chat.no_permission = You don't have permission for that chat mode. +cmd.chat.mode_set = Chat mode set to {0} + +# ========== Commands - Invites ========== +cmd.invites.not_officer = You must be an officer to manage invites. +cmd.invites.header = === Faction Invites === +cmd.invites.no_pending = No pending invites or requests. +cmd.invites.outgoing = Outgoing Invites: +cmd.invites.outgoing_entry = {0} (invited by {1}) +cmd.invites.requests = Join Requests: +cmd.invites.request_entry = {0}{1} +cmd.invites.your_invites_header = === Your Invites === +cmd.invites.no_invites = You have no pending invites. +cmd.invites.invite_entry = {0} - Use /f accept {1} + +# ========== Commands - Request ========== +cmd.request.no_permission = You don't have permission to request faction membership. +cmd.request.already_in_named = You are already in {0}. +cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. +cmd.request.usage = Usage: /f request [message] +cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. +cmd.request.already_requested = You already have a pending request to that faction. +cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. +cmd.request.sent = Sent join request to {0}! +cmd.request.your_message = Your message: "{0}" +cmd.request.officer_review = An officer will review your request. +cmd.request.officer_notify = {0} has requested to join your faction! +cmd.request.officer_review_hint = Use /f gui > Invites to review. + +# ========== Commands - Info ========== +cmd.info.faction_header = === {0} === +cmd.info.player_header = === {0} === +cmd.info.no_permission = You don't have permission to view faction info. +cmd.info.faction_not_found = Faction '{0}' not found. +cmd.info.not_in_faction_hint = You are not in a faction. Use /f info +cmd.info.leader = Leader: {0} +cmd.info.members = Members: {0}/{1} +cmd.info.power = Power: {0} +cmd.info.claims = Claims: {0} +cmd.info.raidable = RAIDABLE! +cmd.info.allies = Allies: {0} +cmd.info.enemies = Enemies: {0} +cmd.info.they_consider = They consider you: {0} +cmd.info.you_consider = You consider them: {0} +cmd.info.members_no_permission = You don't have permission to view faction members. +cmd.info.members_header = === {0} Members ({1}) === +cmd.info.member_online = [Online] +cmd.info.list_no_permission = You don't have permission to view faction list. +cmd.info.list_empty = There are no factions. +cmd.info.list_header = === Factions ({0}) === +cmd.info.list_entry = {0} - {1} members, {2} power +cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] +cmd.info.help_no_permission = You don't have permission to view help. +cmd.info.who_no_permission = You don't have permission to view player info. +cmd.info.who_faction = Faction: {0} +cmd.info.who_role = Role: {0} +cmd.info.who_joined = Joined: {0} +cmd.info.who_faction_none = Faction: None +cmd.info.who_power = Power: {0} +cmd.info.who_status = Status: {0} +cmd.info.who_last_seen = Last seen: {0} +cmd.info.map_no_permission = You don't have permission to view the map. +cmd.info.map_header = === Territory Map === +cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild +cmd.info.map_gui_hint = Use /f gui for interactive map + +# ========== Commands - Power ========== +cmd.power.personal = Personal Power: {0}/{1} +cmd.power.faction = Faction Power: {0}/{1} +cmd.power.death_loss = Death Loss: {0} +cmd.power.regen = Regen Rate: {0}/hr +cmd.power.no_permission = You don't have permission to view power info. +cmd.power.header = {0}'s Power: +cmd.power.current = Current: {0} + +# ========== Commands - Economy ========== +cmd.economy.balance = Balance: {0} +cmd.economy.deposited = Deposited {0} into the faction treasury. +cmd.economy.withdrawn = Withdrew {0} from the faction treasury. +cmd.economy.transferred = Transferred {0} to {1}. +cmd.economy.insufficient = Insufficient funds in faction treasury. +cmd.economy.invalid_amount = Invalid amount: {0} +cmd.economy.economy_disabled = Economy is disabled. +cmd.economy.balance_no_permission = You don't have permission to view balances. +cmd.economy.treasury_unavailable = Treasury is not available. +cmd.economy.balance_display = {0}'s treasury: {1} +cmd.economy.deposit_no_permission = You don't have permission to deposit. +cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. +cmd.economy.deposit_usage = Usage: /f deposit +cmd.economy.amount_positive = Amount must be positive. +cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} +cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. +cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. +cmd.economy.withdraw_no_permission = You don't have permission to withdraw. +cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. +cmd.economy.withdraw_usage = Usage: /f withdraw +cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} +cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. +cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. +cmd.economy.withdraw_failed = Withdrawal failed: {0} +cmd.economy.transfer_no_permission = You don't have permission to transfer. +cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. +cmd.economy.transfer_usage = Usage: /f money transfer +cmd.economy.transfer_self = Cannot transfer to your own faction. +cmd.economy.transfer_limit_denied = Transfer denied: {0} +cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. +cmd.economy.transfer_failed = Transfer failed: {0} +cmd.economy.log_no_permission = You don't have permission to view the transaction log. +cmd.economy.log_header = Transaction Log (page {0}/{1}) +cmd.economy.log_empty = No transactions found. +cmd.economy.money_help_header = Treasury Commands: +cmd.economy.money_help_balance = /f money balance [faction] - View balance +cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury +cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury +cmd.economy.money_help_transfer = /f money transfer - Transfer between factions +cmd.economy.money_help_log = /f money log [page] [type] - View transaction history + +# ========== Protection - Action Phrases ========== +protection.action.generic = You can't do that +protection.action.build = You can't build or break blocks +protection.action.interact = You can't interact with that +protection.action.door = You can't use doors +protection.action.container = You can't open containers +protection.action.bench = You can't use crafting stations +protection.action.processing = You can't use processing stations +protection.action.seat = You can't use seats +protection.action.light = You can't toggle lights +protection.action.teleporter = You can't use teleporters +protection.action.crate = You can't use crates +protection.action.tame = You can't tame creatures +protection.action.npc = You can't interact with NPCs +protection.action.mount = You can't mount creatures +protection.action.pve = You can't damage creatures +protection.action.item_drop = You can't drop items +protection.action.item_pickup = You can't pick up items + +# ========== Protection - Denial Reasons ========== +protection.denied.safezone = {0} in a SafeZone. +protection.denied.warzone = {0} in a WarZone. +protection.denied.enemy_claim = {0} in enemy territory. +protection.denied.claimed = {0} in claimed territory. +protection.denied.here = {0} here. +protection.denied.zone = {0} in this zone. +protection.denied.faction_perm = {0} here. (Faction permission: {1}) +protection.denied.ally_territory = {0} here. (Ally territory) +protection.denied.error = Protection error — action blocked for safety. + +# ========== Protection - PvP ========== +protection.pvp.safezone = PvP is disabled in SafeZones. +protection.pvp.same_faction = You cannot attack faction members. +protection.pvp.ally = You cannot attack allies. +protection.pvp.spawn_protected = That player has spawn protection. +protection.pvp.territory_disabled = PvP is disabled in this territory. +protection.pvp.generic = You cannot attack this player. + +# ========== Protection - Entity Damage ========== +protection.mob_damage_disabled = Mob damage is disabled in this zone. +protection.pve_damage_disabled = PvE damage is disabled in this zone. +protection.pve_territory_denied = You cannot damage mobs in this territory. + +# ========== Protection - Combat Tag ========== +protection.combat_tag_command = You cannot use that command while combat tagged. + +# ========== Server Announcements ========== +# These are broadcast to all online players for significant faction events. +# {0}, {1} = dynamic values (faction names, player names) +server_announce.faction_created = {0} has founded the faction {1}! +server_announce.faction_disbanded = The faction {0} has been disbanded! +server_announce.leadership_transfer = {0} is now the leader of {1}! +server_announce.overclaim = {0} has overclaimed territory from {1}! +server_announce.war_declared = {0} has declared war on {1}! +server_announce.alliance_formed = {0} and {1} are now allies! +server_announce.alliance_broken = {0} and {1} are no longer allies! + +# ========== Teleport System ========== +teleport.cooldown_wait = You must wait {0} before teleporting again. +teleport.warmup_start = Teleporting to faction home in {0} seconds... +teleport.combat_cancelled = Teleportation cancelled - you are in combat! +teleport.success_default = Teleported to faction home! +teleport.no_home = Your faction has no home set. +teleport.world_not_found = World not found. +teleport.failed = Teleportation failed. +teleport.countdown = Teleporting in {0} seconds... +teleport.countdown_one = Teleporting in 1 second... +teleport.moved_cancelled = Teleportation cancelled - you moved! +teleport.damage_cancelled = Teleportation cancelled - you took damage! +teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. +teleport.mount_entry_blocked = You can't enter this zone while mounted. + +# ========== Chat Display ========== +chat.display.public = Public +chat.display.faction = Faction +chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/zh-CN/hyperfactions_admin.lang b/src/main/resources/Server/Languages/zh-CN/hyperfactions_admin.lang new file mode 100644 index 00000000..9f59bc07 --- /dev/null +++ b/src/main/resources/Server/Languages/zh-CN/hyperfactions_admin.lang @@ -0,0 +1,268 @@ +# Language: Simplified Chinese (zh-CN) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Simplified Chinese translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions Admin GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule + +# ========== Admin Navigation Bar ========== +nav.dashboard = Dashboard +nav.actions = Actions +nav.factions = Factions +nav.players = Players +nav.economy = Economy +nav.zones = Zones +nav.config = Config +nav.backups = Backups +nav.log = Log +nav.updates = Updates +nav.help = Help +nav.version = Version + +# ========== Common Admin Labels ========== +common.faction_not_found = Faction Not Found +common.no_faction = No Faction +common.not_set = Not set +common.on = On +common.off = Off +common.enable = Enable +common.disable = Disable +common.none_paren = (None) +common.invalid_faction = Invalid faction. +common.leader_prefix = Leader: {0} +common.members_suffix = {0} members +common.claims_suffix = {0} claims +common.factions_suffix = {0} factions +common.players_suffix = {0} players +common.chunks_suffix = {0} chunks +common.entries_suffix = {0} entries +common.found_suffix = {0} found +common.power_format = {0}/{1} power +common.raidable = Raidable +common.protected = Protected +common.no_description = No description set. +common.officers_more = +{0} more +common.custom_max = (custom max) +common.default_max = (default max) +common.now = Now +common.ago_suffix = {0} ago +common.just_now = just now +common.no_membership_history = No membership history + +# ========== Admin Dashboard ========== +dashboard.factions_prefix = Factions: {0} +dashboard.members_prefix = Total Members: {0} +dashboard.claims_prefix = Total Claims: {0} + +# ========== Admin Actions ========== +actions.confirm_reset = Confirm Reset? +actions.confirm_trigger = Confirm Trigger? +actions.kd_reset = Reset K/D for {0} players. +actions.kd_reset_failed = Failed to reset K/D: {0} +actions.upkeep_unavailable = Upkeep processor is not available. +actions.upkeep_triggered = Upkeep collection triggered. +actions.upkeep_failed = Upkeep failed: {0} + +# ========== Admin Disband ========== +disband.faction_gone = Faction no longer exists. +disband.success = Faction '{0}' has been disbanded. +disband.failed = Failed to disband: {0} +disband.no_leader = Faction has no leader, cannot disband. + +# ========== Admin Unclaim All ========== +unclaim.removed = [Admin] Removed {0} claims from {1}. +unclaim.no_claims = {0} had no claims to remove. + +# ========== Admin Factions List ========== +factions.home_not_set = Not set +factions.teleported = Teleported to {0}'s home. +factions.no_home = Faction has no home set. +factions.world_not_found = Target world not found. + +# ========== Admin Faction Info ========== +info.faction_gone = This faction no longer exists. + +# ========== Admin Faction Members ========== +members.sort_role = Role +members.sort_online = Online +members.sort_name = Name +members.sort_power = Power +members.promoted = [Admin] Promoted {0} to {1}. +members.demoted = [Admin] Demoted {0} to {1}. +members.kicked = [Admin] Kicked {0} from the faction. + +# ========== Admin Faction Relations ========== +relations.allies_header = ALLIES ({0}) +relations.enemies_header = ENEMIES ({0}) +relations.no_allies = No allies. +relations.no_enemies = No enemies. +relations.neutral_count = {0} neutral factions +relations.since_today = Since: today +relations.since_one_day = Since: 1 day ago +relations.since_days = Since: {0} days ago +relations.set_ally = [Admin] Set mutual ally status with {0}. +relations.set_enemy = Set mutual enemy status with {0}. +relations.set_neutral = [Admin] Set mutual neutral status with {0}. + +# ========== Admin Faction Settings ========== +settings.locked = This setting is locked by server configuration. +settings.perm_toggled = Set {0} to {1}. +settings.color_changed = Set faction color to {0}. +settings.recruitment_set = Set recruitment to {0}. +settings.no_home = [Admin] This faction has no home set. +settings.home_cleared = Cleared faction home for {0}. + +# ========== Sort Dropdown Labels ========== +sort.power = Power +sort.name = Name +sort.members = Members +sort.balance = Balance + +# ========== Admin Players ========== +players.sort_last_online = Last Online +players.sort_faction = Faction +players.sort_online = Online +players.not_online = Player is not online. +players.world_not_found = Target world not found. +players.teleported = [Admin] Teleported to {0}. + +# ========== Admin Player Info ========== +playerinfo.disband_faction = Disband Faction +playerinfo.kick_leader = Kick Leader +playerinfo.enter_valid_number = Enter a valid number. +playerinfo.enter_valid_positive = Enter a valid positive number. +playerinfo.faction_gone = Faction no longer exists. +playerinfo.kd_reset = Reset K/D for {0}. +playerinfo.kicked_success = Kicked {0} from {1}. +playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. +playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). + +# ========== Admin Economy ========== +economy.no_data = No factions with economy data. +economy.amount_zero = Amount cannot be zero. +economy.enter_amount = Please enter an amount. +economy.invalid_number = Invalid number: {0} +economy.error = An error occurred. +economy.balance_negative = Balance cannot be negative. +economy.failed = Failed: {0} +economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. +economy.bulk_failures = ({0} failed) + +# ========== Admin Zones ========== +zones.not_found = Zone not found. +zones.invalid_id = Invalid zone ID. +zones.deleted = Zone {0} deleted. +zones.delete_failed = Failed to delete zone: {0} +zones.no_chunks = No chunks +zones.chunks_suffix = {0} ({1} chunks) + +# ========== Zone Create Wizard ========== +wizard.enter_name = Please enter a zone name. +wizard.name_too_short = Zone name must be at least {0} characters. +wizard.name_too_long = Zone name cannot exceed {0} characters. +wizard.name_taken = A zone with this name already exists. +wizard.radius_range = Radius must be between 1 and {0}. +wizard.create_failed = Could not create zone: {0} +wizard.created_not_found = Zone created but could not be found. +wizard.created = Created {0} '{1}'! +wizard.chunk_claimed = Claimed chunk ({0}, {1}). +wizard.chunk_failed = Could not claim current chunk: {0} +wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. +wizard.radius_no_claims = No chunks could be claimed (area may be occupied). +wizard.no_claims = Zone created with no claims. +wizard.chunks_preview = ~{0} chunks + +# ========== Zone Rename ========== +zone_rename.zone_gone = Zone no longer exists. +zone_rename.enter_name = Please enter a zone name. +zone_rename.too_short = Zone name must be at least {0} character. +zone_rename.too_long = Zone name cannot exceed {0} characters. +zone_rename.same_name = That's already this zone's name. +zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! +zone_rename.name_taken = A zone with that name already exists. +zone_rename.invalid_name = Invalid zone name. +zone_rename.rename_failed = Failed to rename zone: {0} + +# ========== Zone Change Type ========== +zone_type.zone_gone = Zone no longer exists. +zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). +zone_type.failed = Failed to change zone type: {0} + +# ========== Zone Integration Flags ========== +zone_int.zone_not_found = Zone Not Found +zone_int.no_plugin = (no plugin) +zone_int.default = (default) +zone_int.custom = (custom) + +# ========== Activity Log ========== +log.all_types = All Types +log.no_logs = No activity logs matching filters. + +# ========== Version Page ========== +version.active = Active +version.not_found = Not Found +version.not_detected = Not Detected +version.not_installed = Not Installed +version.active_version = Active (v{0}) +version.active_compatible = Active (compatible) +version.active_claims_only = Active (claims only) +version.installed_no_perm = Installed (no perm provider) +version.active_provider = Active ({0}) + +# ========== Admin Main Page ========== +main.reload_hint = Use /f reload to reload configuration. +main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. + +# ========== Zone Flags/Settings ========== +zflags.invalid_flag = Invalid flag. +zflags.zone_not_found = Zone not found. +zflags.conflict = (conflict) +zflags.mixin = (mixin) +zflags.reset_int = Reset integration flags to defaults. +zflags.reset_all = Reset all flags to defaults. +zflags.reset_failed = Failed to reset flags: {0} +zflags.back_to_settings = Back to Settings + +# ========== Zone Properties ========== +zprop.current_custom = Current: "{0}" (custom) +zprop.current_default = Current: "{0}" (default) +zprop.pvp_disabled = PvP Disabled +zprop.pvp_enabled = PvP Enabled +zprop.name_empty = Name cannot be empty. +zprop.renamed = Zone renamed to "{0}". +zprop.name_taken = A zone with that name already exists. +zprop.name_invalid = Invalid name (max 32 characters). +zprop.rename_failed = Failed to rename: {0} +zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. +zprop.upper_set = Upper title set. +zprop.upper_reset = Upper title reset to default. +zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. +zprop.lower_set = Lower title set. +zprop.lower_reset = Lower title reset to default. + +# ========== Relations Additional ========== +relations.failed = Failed: {0} + +# ========== Members Additional ========== +members.never = Never +members.teleported = [Admin] Teleported to {0}. + +# ========== Player Info Additional ========== +playerinfo.records = {0} records +playerinfo.joined_date = Joined: {0} +playerinfo.current = Current +playerinfo.left_date = Left: {0} + +# ========== Zone Map ========== +map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' +map.position = Your Position: Chunk ({0}, {1}) +map.zone_gone = Zone no longer exists. +map.claimed = Claimed chunk ({0}, {1}) for {2}. +map.claim_failed = Failed to claim chunk: {0} +map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. +map.unclaim_failed = Failed to unclaim chunk: {0} +map.chunk_belongs = This chunk belongs to {0}. +map.chunk_faction = This chunk is claimed by a faction. +map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/zh-CN/hyperfactions_gui.lang b/src/main/resources/Server/Languages/zh-CN/hyperfactions_gui.lang new file mode 100644 index 00000000..4483628b --- /dev/null +++ b/src/main/resources/Server/Languages/zh-CN/hyperfactions_gui.lang @@ -0,0 +1,446 @@ +# Language: Simplified Chinese (zh-CN) +# Status: Untranslated — English placeholder values +# To translate: Replace English values with Simplified Chinese translations +# Keep keys and {0} placeholders unchanged + +# HyperFactions GUI - English Translations +# Format: key = value +# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule + +# ========== Navigation Bar ========== +nav.dashboard = Dashboard +nav.chat = Chat +nav.members = Members +nav.invites = Invites +nav.browser = Browse +nav.map = Map +nav.leaderboard = Leaderboard +nav.relations = Relations +nav.treasury = Treasury +nav.settings = Settings +nav.logs = Logs +nav.help = Help +nav.admin = Admin +nav.create = Create + +# ========== Help Category Names ========== +help.category.welcome = Welcome +help.category.your_faction = Your Faction +help.category.power_land = Power & Land +help.category.diplomacy = Diplomacy +help.category.combat = Combat & Safety +help.category.economy = Economy +help.category.quick_ref = Quick Reference + +# ========== Main Menu ========== +main_menu.section_my_faction = My Faction +main_menu.section_get_started = Get Started +main_menu.section_territory = Territory +main_menu.section_browse = Browse +main_menu.section_admin = Admin +main_menu.claim_hint = Use /f claim to claim territory. + +# ========== Faction Info Page ========== +faction_info.no_description = No description set. +faction_info.status_open = Open +faction_info.status_invite_only = Invite Only +faction_info.status_raidable = Raidable +faction_info.status_protected = Protected +faction_info.officers_more = +{0} more + +# ========== Rename Modal ========== +rename.no_permission = You don't have permission to rename the faction. +rename.enter_name = Please enter a faction name. +rename.too_short = Faction name must be at least {0} characters. +rename.too_long = Faction name cannot exceed {0} characters. +rename.same_name = That's already your faction's name. +rename.name_taken = A faction with that name already exists. +rename.success = Faction renamed from {0} to {1}! + +# ========== Description Modal ========== +desc.no_permission = You don't have permission to edit the description. +desc.display_none = (None) +desc.cleared = Faction description cleared. +desc.updated = Faction description updated! + +# ========== Tag Modal ========== +tag.no_permission = You don't have permission to edit the tag. +tag.display_none = (None) +tag.cleared = Faction tag cleared. +tag.too_short = Tag must be at least {0} character. +tag.too_long = Tag cannot exceed {0} characters. +tag.invalid_format = Tag can only contain letters and numbers. +tag.same_tag = That's already your faction's tag. +tag.tag_taken = A faction with that tag already exists. +tag.success = Faction tag set to [{0}]! + +# ========== Dashboard Page ========== +dashboard.faction_gone = Your faction no longer exists. +dashboard.available = {0} available +dashboard.at_risk = At Risk! +dashboard.online_count = {0} online +dashboard.status_invite = Invite +dashboard.in_grace = IN GRACE +dashboard.billable_chunks = {0} billable chunks +dashboard.btn_home = Home +dashboard.btn_set_home = Set Home +dashboard.btn_claim = Claim +dashboard.chat_prefix = Chat: {0} +dashboard.btn_leave = Leave +dashboard.no_activity = No recent activity. +dashboard.time_now = now +dashboard.time_minutes = {0}m ago +dashboard.time_hours = {0}h ago +dashboard.time_days = {0}d ago +dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. +dashboard.chat_mode_set = Chat mode: {0} +dashboard.claim_success = Claimed chunk at ({0}, {1}) + +# ========== Faction Main Page ========== +main.no_faction = No Faction +main.joined = You joined the faction! +main.join_failed = Failed to join faction: {0} +main.invite_declined = Invite declined. +main.cooldown = Teleport on cooldown! {0}s remaining. +main.world_not_found = Cannot teleport - world not found. +main.leave_failed = Failed to leave: {0} + +# ========== Shared GUI Labels ========== +common.faction_count = {0} factions +common.leader_label = Leader: {0} +common.sort_power = Power +common.sort_members = Members +common.page_format = {0}/{1} +common.own_faction = (You) + +# ========== Members Page ========== +members.count = {0} members +members.sort_role = Role +members.sort_last_online = Last Online +members.just_now = just now +members.ago = {0} ago +members.never = Never +members.member_not_found = Member not found. +members.promoted = Promoted {0} to {1}. +members.promote_failed = Failed to promote: {0} +members.demoted = Demoted {0} to {1}. +members.demote_failed = Failed to demote: {0} +members.kicked = Kicked {0} from the faction. +members.kick_failed = Failed to kick: {0} + +# ========== Browser Page ========== +browser.sort_name = Name +browser.invalid_faction = Invalid faction. + +# ========== Leaderboard Page ========== +leaderboard.sort_kd = K/D +leaderboard.sort_territory = Territory +leaderboard.sort_balance = Balance + +# ========== Player Info Page ========== +playerinfo.now = Now +playerinfo.history_count = {0} records +playerinfo.joined_label = Joined: {0} +playerinfo.current = Current +playerinfo.left_label = Left: {0} +playerinfo.no_history = No membership history +playerinfo.faction_gone = Faction no longer exists. +playerinfo.reason_active = ACTIVE +playerinfo.reason_left = LEFT +playerinfo.reason_kicked = KICKED +playerinfo.reason_disbanded = DISBANDED + +# ========== Relations Page ========== +relations.relation_count = {0} relations +relations.request_count = {0} requests +relations.type_ally = Ally +relations.type_enemy = Enemy +relations.type_incoming = Incoming +relations.type_outgoing = Outgoing +relations.incoming_request = Incoming request +relations.outgoing_request = Outgoing request +relations.empty_relations = No relations yet. +relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. +relations.empty_pending = No pending ally requests. +relations.today = Today +relations.one_day_ago = 1 day ago +relations.days_ago = {0} days ago +relations.now_neutral = Now neutral with {0}. +relations.now_enemies = Now enemies with {0}! +relations.request_sent = Alliance request sent to {0}. +relations.now_allied = Now allied with {0}! +relations.request_declined = Ally request from {0} declined. +relations.request_cancelled = Ally request to {0} cancelled. +relations.failed = Failed: {0} +relations.search_hint = Search for a faction to set relation +relations.no_results = No factions found matching '{0}' +relations.power_display = {0} power +relations.member_count = {0} members + +# ========== Settings Page ========== +settings.officers_only = Only officers and leaders can change faction settings. +settings.display_none = (None) +settings.home_not_set = Not set +settings.no_permission = You don't have permission to change settings. +settings.only_leader_disband = Only the leader can disband the faction. +settings.perm_locked = This setting is locked by the server. +settings.no_perm_edit = You don't have permission to edit territory permissions. +settings.only_leader_officers = Only the leader can change officer access. +settings.pvp_enabled = Enabled +settings.pvp_disabled = Disabled +settings.not_in_territory = You must be in your faction's territory to set home. +settings.home_set = Faction home set to your current location! +settings.recruitment_set = Recruitment set to {0}. +settings.home_no_set = Your faction does not have a home set. +settings.home_deleted = Faction home deleted! + +# ========== Modules Page ========== +modules.treasury_name = Treasury +modules.treasury_desc = Faction bank & economy system +modules.raids_name = Raids +modules.raids_desc = Scheduled faction battles +modules.levels_name = Levels +modules.levels_desc = Faction progression & XP +modules.war_name = War +modules.war_desc = Formal war declarations +modules.coming_soon = Coming Soon +modules.active = Active +modules.view_treasury = View Treasury +modules.unavailable = Unavailable +modules.no_economy = No economy plugin detected +modules.disabled = Disabled +modules.economy_not_available = Economy features are not available on this server + +# ========== Treasury Page ========== +treasury.wallet_label = Your wallet: {0} +treasury.treasury_label = Treasury balance: {0} +treasury.chunks_detail = {0} free + {1} billable chunks +treasury.cost_label = Cost: {0} +treasury.pending = Pending +treasury.auto_pay_on = Auto-pay: ON +treasury.auto_pay_off = Auto-pay: OFF +treasury.runway_90_plus = 90+ days +treasury.runway_days = {0} days +treasury.runway_day = {0} day +treasury.runway_less_day = < 1 day +treasury.runway_no_funds = No funds +treasury.grace_expires = Grace expires in: {0} +treasury.missed_payments = Missed payments: {0} +treasury.pay_to_clear = Pay {0} to clear grace +treasury.system = System +treasury.type_deposit = Deposit +treasury.type_withdrawal = Withdrawal +treasury.type_transfer_in = Transfer In +treasury.type_transfer_out = Transfer Out +treasury.type_player_transfer = Player Transfer +treasury.type_upkeep = Upkeep +treasury.type_tax = Tax Collection +treasury.type_war_cost = War Cost +treasury.type_raid_cost = Raid Cost +treasury.type_spoils = Spoils +treasury.type_admin = Admin Adjustment +treasury.deposit_title = Deposit to Treasury +treasury.withdraw_title = Withdraw from Treasury +treasury.fee_label = Fee ({0}%) +treasury.confirm_deposit = Confirm Deposit +treasury.confirm_withdrawal = Confirm Withdrawal +treasury.from_wallet = {0} from wallet +treasury.to_wallet = {0} to wallet +treasury.enter_valid_amount = Enter a valid positive amount. +treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. +treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. +treasury.deposit_failed_returned = Failed to deposit. Money returned. +treasury.deposited = Deposited {0} into the treasury. +treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) +treasury.no_withdraw_permission = You don't have permission to withdraw. +treasury.withdraw_denied = Withdrawal denied: {0} +treasury.insufficient_treasury = Insufficient funds in treasury. +treasury.withdraw_limit = Withdrawal limit exceeded. +treasury.withdraw_failed = Withdrawal failed: {0} +treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. +treasury.withdrew = Withdrew {0} from the treasury. +treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) +treasury.search_hint = Search for a player or faction +treasury.no_results = No results for '{0}' +treasury.tag_player = [Player] +treasury.tag_faction = [Faction] +treasury.source_online = Online +treasury.source_offline = Offline +treasury.source_player_db = Hytale player +treasury.no_transfer_permission = You don't have permission to transfer. +treasury.transfer_denied = Transfer denied: {0} +treasury.invalid_target_faction = Invalid target faction. +treasury.target_faction_gone = Target faction no longer exists. +treasury.transfer_failed = Transfer failed: {0} +treasury.transfer_failed_returned = Transfer failed. Funds returned. +treasury.transferred = Transferred {0} to {1}. +treasury.invalid_target_player = Invalid target player. +treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. +treasury.leader_only_perms = Only the leader can change treasury permissions. +treasury.leader_only_upkeep = Only the leader can change upkeep settings. +treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. + +# ========== Confirmation Pages ========== +confirm.disband_not_leader = Only the leader can disband the faction. +confirm.disbanded = Faction '{0}' has been disbanded. +confirm.disband_failed = Failed to disband faction. +confirm.succession_title = Leadership will transfer to: +confirm.no_members_warning = WARNING: No other members! +confirm.will_disband = Leaving will disband the faction permanently. +confirm.not_in_faction = You are not in this faction. +confirm.not_leader_anymore = You are no longer the leader. +confirm.no_successor = No successor available. Use disband instead. +confirm.transfer_failed = Failed to transfer leadership: {0} +confirm.leader_left = Leadership transferred to {0}. You have left {1}. +confirm.leave_failed = Failed to leave faction: {0} +confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. +confirm.left_faction = You have left {0}. +confirm.faction_gone = Faction no longer exists. +confirm.not_leader_transfer = Only the leader can transfer leadership. +confirm.leadership_transferred = Leadership transferred to {0}. + +# ========== Logs Viewer Page ========== +logs.title = {0} - Activity Logs +logs.entry_count = {0} entries +logs.all_types = All Types +logs.no_logs_type = No logs of this type. +logs.no_logs = No activity logs yet. + +# ========== Chat Page ========== +chat.placeholder = Type a message... +chat.no_messages = No messages yet. +chat.no_ally_permission = You don't have permission for ally chat. +chat.no_permission = No permission. +chat.faction_gone = Your faction no longer exists. +chat.time_now = now +chat.time_minutes = {0}m +chat.time_hours = {0}h + +# ========== Invites Page ========== +invites.invite_count = {0} invites +invites.request_count = {0} requests +invites.invited_by = Invited by: {0} +invites.no_message = No message +invites.expires = Expires: {0} +invites.type_outgoing = Outgoing +invites.type_request = Request +invites.invited_by_label = Invited by: +invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. +invites.empty_requests = No join requests. Players can request to join with /f request. +invites.invalid_player = Invalid player. +invites.cancelled_invite = Cancelled invite to {0}. +invites.player_joined = {0} has joined the faction! +invites.faction_full = Faction is full. Cannot accept request. +invites.add_failed = Failed to add player to faction. +invites.request_expired = Request not found or expired. +invites.request_declined = Declined join request from {0}. +invites.time_seconds = {0}s +invites.time_minutes = {0}m +invites.time_hours = {0}h + +# ========== Map Page ========== +map.position = Your Position: Chunk ({0}, {1}) +map.legend_protected = Protected +map.claim_stats = Claims: {0}/{1} ({2} Available) +map.overclaimed = OVERCLAIMED by {0}! +map.power_display = Power: {0}/{1} +map.join_to_claim = Join a faction to claim +map.claim_success = Claimed chunk at ({0}, {1})! +map.claim_not_in_faction = You must be in a faction to claim territory. +map.claim_not_officer = Only officers and leaders can claim territory. +map.claim_already_yours = You already own this chunk. +map.claim_already_claimed = This chunk is already claimed by another faction. +map.claim_not_adjacent = You can only claim chunks adjacent to your territory. +map.claim_max = You have reached your maximum claim limit. +map.claim_world_not_allowed = Claiming is not allowed in this world. +map.claim_orbisguard = This area is protected by OrbisGuard. +map.claim_failed = Failed to claim chunk. +map.unclaim_success = Unclaimed chunk at ({0}, {1}). +map.unclaim_not_in_faction = You must be in a faction. +map.unclaim_not_officer = Only officers and leaders can unclaim territory. +map.unclaim_not_claimed = This chunk is not claimed. +map.unclaim_not_yours = This chunk belongs to another faction. +map.unclaim_home = Cannot unclaim the chunk containing your faction home. +map.unclaim_failed = Failed to unclaim chunk. +map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! +map.overclaim_not_in_faction = You must be in a faction. +map.overclaim_not_officer = Only officers and leaders can overclaim territory. +map.overclaim_already_yours = You already own this chunk. +map.overclaim_ally = You cannot overclaim allied territory. +map.overclaim_has_power = This faction has enough power to defend their territory. +map.overclaim_max = You have reached your maximum claim limit. +map.overclaim_failed = Failed to overclaim chunk. +# ========== Create Faction Page ========== +create.preview_name = Your Faction Name +create.leader_prefix = Leader: {0} +create.enter_name = Please enter a faction name. +create.name_too_short = Faction name must be at least {0} characters. +create.name_too_long = Faction name cannot exceed {0} characters. +create.name_taken = A faction with this name already exists. +create.tag_length = Faction tag must be {0}-{1} characters. +create.tag_format = Faction tag can only contain letters and numbers. +create.desc_too_long = Description cannot exceed {0} characters. +create.created = Faction {0} created successfully! +create.created_no_dashboard = Faction created but could not open dashboard. +create.invalid_name = Invalid faction name. +create.create_failed = Could not create faction. + +# ========== New Player Pages ========== +newplayer.pending_count = {0} pending +newplayer.received_header = RECEIVED INVITES ({0}) +newplayer.requests_header = YOUR REQUESTS ({0}) +newplayer.no_invites = No invites. Browse factions to find one! +newplayer.no_requests = No pending requests. +newplayer.invited_by = Invited by: {0} +newplayer.member_count = {0} members +newplayer.power_count = {0} power +newplayer.claim_count = {0} claims +newplayer.awaiting_review = Awaiting review +newplayer.expires_in = Expires in {0}h +newplayer.time_just_now = just now +newplayer.time_minutes = {0} min ago +newplayer.time_hours = {0}h ago +newplayer.time_days = {0}d ago +newplayer.invalid_faction = Invalid faction. +newplayer.invite_expired = This invite has expired or was revoked. +newplayer.faction_gone = Faction no longer exists. +newplayer.joined = You joined {0}! +newplayer.faction_full = This faction is full. +newplayer.join_failed = Could not join faction. +newplayer.invite_declined = Invite declined. +newplayer.request_cancelled = Cancelled request to join {0}. +newplayer.faction_count = {0} factions +newplayer.browse_subtitle = Find your new home! +newplayer.sort_power = Power +newplayer.sort_name = Name +newplayer.sort_members = Members +newplayer.btn_accept = Accept +newplayer.btn_pending = Pending +newplayer.btn_join = Join +newplayer.btn_request = Request +newplayer.invite_only_msg = This faction is invite-only. +newplayer.welcome_hint = Welcome! Use /f to open faction menu. +newplayer.faction_open_hint = This faction is open! Click JOIN instead. +newplayer.already_requested = You already have a pending request to this faction. +newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. +newplayer.request_sent = Join request sent to {0}! +newplayer.officer_review = An officer will review your request. +newplayer.map_hint = View Only - Join a faction to claim territory! + +# Player Settings +nav.player_settings = Settings +player_settings.title = Player Settings +player_settings.language_section = Language +player_settings.auto_detect = Auto-detect from client +player_settings.auto_detect_desc = Uses your game client's language setting +player_settings.language_label = Language +player_settings.notifications_section = Notifications +player_settings.territory_alerts = Territory Alerts +player_settings.territory_alerts_desc = Show notifications when entering/leaving territories +player_settings.death_announcements = Death Broadcasts +player_settings.death_announcements_desc = Receive faction member death location announcements +player_settings.power_notifications = Power Changes +player_settings.power_notifications_desc = Show messages when your power changes +player_settings.language_changed = Language changed to {0} +player_settings.pref_enabled = {0} enabled +player_settings.pref_disabled = {0} disabled From 894a7b301146cf07ba220b32a3fa0710aa3c8f12 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 19:03:27 -0700 Subject: [PATCH 20/55] fix: redesign Player Settings UI and fix nav bar placement - Rewrite player_settings.ui to follow established Container/Title/Content pattern from browse.ui and faction_settings.ui - Fix crash from Style (HorizontalAlignment) on Group elements - Fix DropdownBox crash by using DropdownEntryInfo with LocalizableString instead of plain List, and string Value instead of integer index - Move "Player" nav button to far right of both faction and new player nav bars using FlexWeight spacer pattern - Remove player_settings from nav bar button list (rendered separately) - Use rebuild() for state changes since page stores preferences as instance fields (async load race condition with openPlayerSettings) --- .../com/hyperfactions/gui/GuiManager.java | 44 ++--- .../gui/faction/NavBarHelper.java | 19 ++ .../gui/newplayer/NewPlayerNavBarHelper.java | 19 ++ .../gui/shared/page/PlayerSettingsPage.java | 60 +++--- .../UI/Custom/HyperFactions/nav/nav_bar.ui | 1 + .../HyperFactions/shared/player_settings.ui | 173 +++++++++++------- .../Languages/en-US/hyperfactions_gui.lang | 2 +- 7 files changed, 194 insertions(+), 124 deletions(-) diff --git a/src/main/java/com/hyperfactions/gui/GuiManager.java b/src/main/java/com/hyperfactions/gui/GuiManager.java index 871ef748..df7a2703 100644 --- a/src/main/java/com/hyperfactions/gui/GuiManager.java +++ b/src/main/java/com/hyperfactions/gui/GuiManager.java @@ -290,29 +290,29 @@ private void registerPages() { 10 )); - // Player Settings page (available to all players) + // Help page (available to all players in faction nav bar) registry.registerEntry(new Entry( - "player_settings", - MessageKeys.Nav.PLAYER_SETTINGS, + "help", + MessageKeys.Nav.HELP, null, (player, ref, store, playerRef, faction, guiManager) -> - new PlayerSettingsPage(playerRef, factionManager.get(), - plugin.get().getPlayerStorage(), guiManager), + new HelpMainPage(playerRef, guiManager, factionManager.get()), true, // Show in nav bar false, // Doesn't require faction 11 )); - // Help page (available to all players in faction nav bar) + // Player Settings page (registered but NOT in nav bar — rendered separately on far right) registry.registerEntry(new Entry( - "help", - MessageKeys.Nav.HELP, + "player_settings", + MessageKeys.Nav.PLAYER_SETTINGS, null, (player, ref, store, playerRef, faction, guiManager) -> - new HelpMainPage(playerRef, guiManager, factionManager.get()), - true, // Show in nav bar + new PlayerSettingsPage(playerRef, factionManager.get(), + plugin.get().getPlayerStorage(), guiManager), + false, // NOT in nav bar (rendered separately on far right) false, // Doesn't require faction - 12 + 99 )); // Admin page (requires permission) - accessed via /f admin, not in main nav bar @@ -399,27 +399,27 @@ private void registerNewPlayerPages() { 4 )); - // Player Settings page + // Help Page registry.registerEntry(new NewPlayerPageRegistry.Entry( - "player_settings", - MessageKeys.Nav.PLAYER_SETTINGS, + "help", + MessageKeys.Nav.HELP, null, (player, ref, store, playerRef, guiManager) -> - new PlayerSettingsPage(playerRef, factionManager.get(), - plugin.get().getPlayerStorage(), guiManager), + new HelpMainPage(playerRef, guiManager, factionManager.get()), true, 5 )); - // Help Page + // Player Settings page (registered but NOT in nav bar — rendered separately on far right) registry.registerEntry(new NewPlayerPageRegistry.Entry( - "help", - MessageKeys.Nav.HELP, + "player_settings", + MessageKeys.Nav.PLAYER_SETTINGS, null, (player, ref, store, playerRef, guiManager) -> - new HelpMainPage(playerRef, guiManager, factionManager.get()), - true, - 6 + new PlayerSettingsPage(playerRef, factionManager.get(), + plugin.get().getPlayerStorage(), guiManager), + false, + 99 )); Logger.debug("[GUI] Registered %d pages with NewPlayerPageRegistry", registry.getEntries().size()); diff --git a/src/main/java/com/hyperfactions/gui/faction/NavBarHelper.java b/src/main/java/com/hyperfactions/gui/faction/NavBarHelper.java index 34e09ec0..73fa9a0c 100644 --- a/src/main/java/com/hyperfactions/gui/faction/NavBarHelper.java +++ b/src/main/java/com/hyperfactions/gui/faction/NavBarHelper.java @@ -6,10 +6,14 @@ import com.hyperfactions.gui.UIPaths; 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.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; +import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; import com.hypixel.hytale.server.core.entity.entities.Player; import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; +import com.hypixel.hytale.server.core.ui.builder.EventData; import com.hypixel.hytale.server.core.ui.builder.UICommandBuilder; import com.hypixel.hytale.server.core.ui.builder.UIEventBuilder; import com.hypixel.hytale.server.core.universe.PlayerRef; @@ -61,6 +65,21 @@ public static void setupBar( cmd.appendInline("#HyperFactionsNavBar #NavBarButtons", "Group #NavCards { LayoutMode: Left; }"); NavBarUtil.buildButtons(entries, "#NavCards", UIPaths.NAV_BUTTON, "#NavActionButton", "Nav", "NavBar", playerRef, cmd, events); + + // Flex spacer pushes "Player" button to far right + cmd.appendInline("#HyperFactionsNavBar #NavBarButtons", + "Group { FlexWeight: 1; }"); + + // "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)); + events.addEventBinding( + CustomUIEventBindingType.Activating, + "#HyperFactionsNavBar #NavBarButtons[2] #NavActionButton", + EventData.of("Button", "Nav").append("NavBar", "player_settings"), + false + ); } /** diff --git a/src/main/java/com/hyperfactions/gui/newplayer/NewPlayerNavBarHelper.java b/src/main/java/com/hyperfactions/gui/newplayer/NewPlayerNavBarHelper.java index c1ee40f0..20f913df 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/NewPlayerNavBarHelper.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/NewPlayerNavBarHelper.java @@ -5,10 +5,14 @@ import com.hyperfactions.gui.UIPaths; 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.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; +import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; import com.hypixel.hytale.server.core.entity.entities.Player; import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; +import com.hypixel.hytale.server.core.ui.builder.EventData; import com.hypixel.hytale.server.core.ui.builder.UICommandBuilder; import com.hypixel.hytale.server.core.ui.builder.UIEventBuilder; import com.hypixel.hytale.server.core.universe.PlayerRef; @@ -57,6 +61,21 @@ public static void setupBar( cmd.appendInline("#HyperFactionsNavBar #NavBarButtons", "Group #NavCards { LayoutMode: Left; }"); NavBarUtil.buildButtons(entries, "#NavCards", UIPaths.NAV_BUTTON, "#NavActionButton", "Nav", "NavBar", playerRef, cmd, events); + + // Flex spacer pushes "Player" button to far right + cmd.appendInline("#HyperFactionsNavBar #NavBarButtons", + "Group { FlexWeight: 1; }"); + + // "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)); + events.addEventBinding( + CustomUIEventBindingType.Activating, + "#HyperFactionsNavBar #NavBarButtons[2] #NavActionButton", + EventData.of("Button", "Nav").append("NavBar", "player_settings"), + false + ); } /** 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 a376cbc8..f22103c2 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,6 @@ import com.hyperfactions.manager.FactionManager; import com.hyperfactions.storage.PlayerStorage; import com.hyperfactions.util.HFMessages; -import com.hyperfactions.util.Logger; import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.MessageUtil; import com.hypixel.hytale.component.Ref; @@ -23,10 +22,11 @@ import com.hypixel.hytale.server.core.ui.builder.UIEventBuilder; import com.hypixel.hytale.server.core.universe.PlayerRef; import com.hypixel.hytale.server.core.universe.world.storage.EntityStore; +import com.hypixel.hytale.server.core.ui.DropdownEntryInfo; +import com.hypixel.hytale.server.core.ui.LocalizableString; import java.util.List; import java.util.UUID; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; /** * Player Settings page for personal preferences. @@ -108,9 +108,6 @@ public void build(Ref ref, UICommandBuilder cmd, NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); } - // Page title - cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.PlayerSettings.TITLE)); - // === Language Section === cmd.set("#LanguageSectionTitle.Text", HFMessages.get(playerRef, MessageKeys.PlayerSettings.LANGUAGE_SECTION)); @@ -132,18 +129,21 @@ public void build(Ref ref, UICommandBuilder cmd, ); // Language dropdown - cmd.set("#LanguageDropdown.Entries", LOCALE_DISPLAY_NAMES); - int selectedIndex = 0; - if (languagePreference != null) { - int idx = AVAILABLE_LOCALES.indexOf(languagePreference); - if (idx >= 0) { - selectedIndex = idx; - } + List localeEntries = new java.util.ArrayList<>(); + for (int i = 0; i < AVAILABLE_LOCALES.size(); i++) { + localeEntries.add(new DropdownEntryInfo( + LocalizableString.fromString(LOCALE_DISPLAY_NAMES.get(i)), + AVAILABLE_LOCALES.get(i))); } - cmd.set("#LanguageDropdown.Value", selectedIndex); + cmd.set("#LanguageDropdown.Entries", localeEntries); + String selectedLocale = (languagePreference != null && AVAILABLE_LOCALES.contains(languagePreference)) + ? languagePreference : AVAILABLE_LOCALES.get(0); + cmd.set("#LanguageDropdown.Value", selectedLocale); // Disable dropdown when auto-detect is on - cmd.set("#LanguageRow.Visible", !autoDetect); + if (autoDetect) { + cmd.set("#LanguageDropdown.Disabled", true); + } // Language dropdown change event events.addEventBinding( @@ -243,27 +243,23 @@ public void handleDataEvent(Ref ref, Store store, } savePreference(uuid, d -> d.setLanguagePreference(languagePreference)); HFMessages.setLanguageOverride(uuid, languagePreference); - sendUpdate(); + rebuild(); } case "LanguageChanged" -> { - // Dropdown value is an index into AVAILABLE_LOCALES + // Dropdown value is the locale code string (e.g. "en-US") if (data.language != null) { - try { - int index = Integer.parseInt(data.language); - if (index >= 0 && index < AVAILABLE_LOCALES.size()) { - languagePreference = AVAILABLE_LOCALES.get(index); - savePreference(uuid, d -> d.setLanguagePreference(languagePreference)); - HFMessages.setLanguageOverride(uuid, languagePreference); - player.sendMessage(MessageUtil.successText(playerRef, - MessageKeys.PlayerSettings.LANGUAGE_CHANGED, - LOCALE_DISPLAY_NAMES.get(index))); - } - } catch (NumberFormatException e) { - // Invalid dropdown value + int idx = AVAILABLE_LOCALES.indexOf(data.language); + if (idx >= 0) { + languagePreference = data.language; + savePreference(uuid, d -> d.setLanguagePreference(languagePreference)); + HFMessages.setLanguageOverride(uuid, languagePreference); + player.sendMessage(MessageUtil.successText(playerRef, + MessageKeys.PlayerSettings.LANGUAGE_CHANGED, + LOCALE_DISPLAY_NAMES.get(idx))); } } - sendUpdate(); + rebuild(); } case "ToggleTerritoryAlerts" -> { @@ -274,7 +270,7 @@ public void handleDataEvent(Ref ref, Store store, HFMessages.get(playerRef, MessageKeys.PlayerSettings.TERRITORY_ALERTS)) : MessageUtil.text(playerRef, MessageKeys.PlayerSettings.PREF_DISABLED, "#FFAA00", HFMessages.get(playerRef, MessageKeys.PlayerSettings.TERRITORY_ALERTS))); - sendUpdate(); + rebuild(); } case "ToggleDeathAnnouncements" -> { @@ -285,7 +281,7 @@ public void handleDataEvent(Ref ref, Store store, HFMessages.get(playerRef, MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS)) : MessageUtil.text(playerRef, MessageKeys.PlayerSettings.PREF_DISABLED, "#FFAA00", HFMessages.get(playerRef, MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS))); - sendUpdate(); + rebuild(); } case "TogglePowerNotifications" -> { @@ -296,7 +292,7 @@ public void handleDataEvent(Ref ref, Store store, HFMessages.get(playerRef, MessageKeys.PlayerSettings.POWER_NOTIFICATIONS)) : MessageUtil.text(playerRef, MessageKeys.PlayerSettings.PREF_DISABLED, "#FFAA00", HFMessages.get(playerRef, MessageKeys.PlayerSettings.POWER_NOTIFICATIONS))); - sendUpdate(); + rebuild(); } default -> sendUpdate(); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/nav/nav_bar.ui b/src/main/resources/Common/UI/Custom/HyperFactions/nav/nav_bar.ui index b068e8d4..885487c3 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/nav/nav_bar.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/nav/nav_bar.ui @@ -41,6 +41,7 @@ } Group #NavBarButtons { + FlexWeight: 1; LayoutMode: Left; } }; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/shared/player_settings.ui b/src/main/resources/Common/UI/Custom/HyperFactions/shared/player_settings.ui index a8776a8e..c9792e7d 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/shared/player_settings.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/shared/player_settings.ui @@ -1,56 +1,53 @@ +// Player Settings Page - Language & Notification Preferences +// Available to all players (faction and non-faction) + $C = "../../Common.ui"; $S = "../shared/styles.ui"; $Nav = "../nav/nav_bar.ui"; $C.@PageOverlay { - Group { - Anchor: (Width: 620, Height: 520); - Style: (HorizontalAlignment: Center, VerticalAlignment: Center); - LayoutMode: Top; - - // Navigation bar - $Nav.@NavBar #HyperFactionsNavBar {} - - // Page Title - Group { - Anchor: (Height: 40); - Style: (HorizontalAlignment: Center); - - Label #PageTitle { - Anchor: (Height: 36); - Style: (FontSize: 20, TextColor: #FFFFFF, HorizontalAlignment: Center, VerticalAlignment: Center); - Text: "Player Settings"; + $Nav.@HyperFactionsNavBar #HyperFactionsNavBar {} + + $C.@Container { + Anchor: (Width: 550, Height: 480); + + #Title { + $C.@Title { + @Text = "Player Settings"; } } - // Content Area - Group #Content { - Anchor: (Height: 430); + #Content { LayoutMode: Top; - Padding: (Left: 24, Right: 24, Top: 8, Bottom: 8); + Padding: (Left: 20, Right: 20, Top: 10, Bottom: 10); // === Language Section === - $C.@DecoratedContainer { - Anchor: (Bottom: 12); - LayoutMode: Top; - Padding: (Full: 12); + Label #LanguageSectionTitle { + Text: "Language"; + Style: (FontSize: 13, TextColor: #55FFFF, RenderBold: true); + Anchor: (Height: 22, Bottom: 4); + } + Group { + Anchor: (Height: 1, Bottom: 8); + Background: (Color: #334455); + } - Label #LanguageSectionTitle { - Anchor: (Height: 26); - Style: (FontSize: 15, TextColor: #55FFFF); - Text: "Language"; - } + Group { + Background: (Color: #1a2a3a); + Padding: (Left: 12, Right: 12, Top: 8, Bottom: 8); + LayoutMode: Top; + Anchor: (Bottom: 12); // Auto-detect checkbox $C.@CheckBoxWithLabel #AutoDetectCB { @Text = "Auto-detect from client"; @Checked = true; - Anchor: (Height: 28, Bottom: 4); + Anchor: (Height: 28, Bottom: 2); } Label #AutoDetectDesc { - Anchor: (Height: 18, Bottom: 8); - Style: (FontSize: 11, TextColor: #888888); + Anchor: (Height: 16, Bottom: 8); + Style: (FontSize: 10, TextColor: #666666); Text: "Uses your game client's language setting"; } @@ -60,73 +57,111 @@ $C.@PageOverlay { LayoutMode: Left; Label #LanguageLabel { - Anchor: (Width: 90, Height: 26); - Style: (FontSize: 13, TextColor: #AAAAAA, VerticalAlignment: Center); + Anchor: (Width: 80, Height: 26); + Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Text: "Language"; } - Group { - Anchor: (Width: 200, Height: 26); - Background: (Color: #0d1520); - Padding: (Left: 6, Right: 6); - - DropdownBox #LanguageDropdown { - Anchor: (Height: 26); - } + DropdownBox #LanguageDropdown { + Style: $C.@DefaultDropdownBoxStyle; + Anchor: (Height: 28, Width: 180); } } } // === Notifications Section === - $C.@DecoratedContainer { - LayoutMode: Top; - Padding: (Full: 12); + Label #NotifSectionTitle { + Text: "Notifications"; + Style: (FontSize: 13, TextColor: #55FFFF, RenderBold: true); + Anchor: (Height: 22, Bottom: 4); + } + Group { + Anchor: (Height: 1, Bottom: 8); + Background: (Color: #334455); + } - Label #NotifSectionTitle { - Anchor: (Height: 26); - Style: (FontSize: 15, TextColor: #55FFFF); - Text: "Notifications"; - } + Group { + Background: (Color: #1a2a3a); + Padding: (Left: 12, Right: 12, Top: 8, Bottom: 8); + LayoutMode: Top; // Territory Alerts - $C.@CheckBoxWithLabel #TerritoryAlertsCB { - @Text = "Territory Alerts"; - @Checked = true; - Anchor: (Height: 28, Bottom: 2); + Group { + LayoutMode: Left; + Anchor: (Height: 28, Bottom: 1); + Background: (Color: #0d1520); + Padding: (Left: 6, Right: 6); + + Label { + Text: "Territory Alerts"; + Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); + Anchor: (Width: 160); + } + Label { FlexWeight: 1; } + $C.@CheckBoxWithLabel #TerritoryAlertsCB { + @Text = ""; @Checked = true; + Anchor: (Height: 22, Width: 44); + } } Label #TerritoryAlertsDesc { - Anchor: (Height: 18, Bottom: 8); - Style: (FontSize: 11, TextColor: #888888); + Anchor: (Height: 16, Bottom: 6); + Style: (FontSize: 10, TextColor: #555555); Text: "Show notifications when entering/leaving territories"; } // Death Announcements - $C.@CheckBoxWithLabel #DeathAnnounceCB { - @Text = "Death Broadcasts"; - @Checked = true; - Anchor: (Height: 28, Bottom: 2); + Group { + LayoutMode: Left; + Anchor: (Height: 28, Bottom: 1); + Background: (Color: #111a28); + Padding: (Left: 6, Right: 6); + + Label { + Text: "Death Broadcasts"; + Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); + Anchor: (Width: 160); + } + Label { FlexWeight: 1; } + $C.@CheckBoxWithLabel #DeathAnnounceCB { + @Text = ""; @Checked = true; + Anchor: (Height: 22, Width: 44); + } } Label #DeathAnnounceDesc { - Anchor: (Height: 18, Bottom: 8); - Style: (FontSize: 11, TextColor: #888888); + Anchor: (Height: 16, Bottom: 6); + Style: (FontSize: 10, TextColor: #555555); Text: "Receive faction member death location announcements"; } // Power Notifications - $C.@CheckBoxWithLabel #PowerNotifCB { - @Text = "Power Changes"; - @Checked = true; - Anchor: (Height: 28, Bottom: 2); + Group { + LayoutMode: Left; + Anchor: (Height: 28, Bottom: 1); + Background: (Color: #0d1520); + Padding: (Left: 6, Right: 6); + + Label { + Text: "Power Changes"; + Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); + Anchor: (Width: 160); + } + Label { FlexWeight: 1; } + $C.@CheckBoxWithLabel #PowerNotifCB { + @Text = ""; @Checked = true; + Anchor: (Height: 22, Width: 44); + } } Label #PowerNotifDesc { - Anchor: (Height: 18); - Style: (FontSize: 11, TextColor: #888888); + Anchor: (Height: 16); + Style: (FontSize: 10, TextColor: #555555); Text: "Show messages when your power changes"; } } } } } + +$C.@BackButton {} diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index 28a16084..3229e562 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -423,7 +423,7 @@ newplayer.officer_review = An officer will review your request. newplayer.map_hint = View Only - Join a faction to claim territory! # Player Settings -nav.player_settings = Settings +nav.player_settings = Player player_settings.title = Player Settings player_settings.language_section = Language player_settings.auto_detect = Auto-detect from client From e62e2d9156b3d90544d19de3bf8263d6b772909b Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 19:11:28 -0700 Subject: [PATCH 21/55] feat: use native locale display names and add es-ES to language selector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace hardcoded LOCALE_DISPLAY_NAMES list with Java's Locale class to generate native display names (e.g. "Español (España)") - Add es-ES as second available locale in the language dropdown - Fix es-ES nav.player_settings to match en-US ("Jugador" not "Ajustes") --- .../gui/shared/page/PlayerSettingsPage.java | 46 +++++++++++-------- .../Languages/es-ES/hyperfactions_gui.lang | 2 +- 2 files changed, 28 insertions(+), 20 deletions(-) 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 f22103c2..30e9c989 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java @@ -25,6 +25,7 @@ import com.hypixel.hytale.server.core.ui.DropdownEntryInfo; import com.hypixel.hytale.server.core.ui.LocalizableString; import java.util.List; +import java.util.Locale; import java.util.UUID; import org.jetbrains.annotations.NotNull; @@ -39,13 +40,23 @@ public class PlayerSettingsPage extends InteractiveCustomUIPage AVAILABLE_LOCALES = List.of( - "en-US" + "en-US", + "es-ES" ); - /** Display names for available locales (parallel to AVAILABLE_LOCALES). */ - private static final List LOCALE_DISPLAY_NAMES = List.of( - "English (US)" - ); + /** + * Returns the native display name for a locale code (e.g. "es-ES" → "Español (España)"). + * Uses Java's Locale class so each language name is shown in its own language. + */ + private static String nativeDisplayName(String localeCode) { + Locale locale = Locale.forLanguageTag(localeCode); + String name = locale.getDisplayName(locale); + // Capitalize first letter (Java returns lowercase for some locales) + if (!name.isEmpty()) { + name = Character.toUpperCase(name.charAt(0)) + name.substring(1); + } + return name; + } private final PlayerRef playerRef; @@ -128,12 +139,12 @@ public void build(Ref ref, UICommandBuilder cmd, false ); - // Language dropdown + // Language dropdown — display names in native language List localeEntries = new java.util.ArrayList<>(); - for (int i = 0; i < AVAILABLE_LOCALES.size(); i++) { + for (String code : AVAILABLE_LOCALES) { localeEntries.add(new DropdownEntryInfo( - LocalizableString.fromString(LOCALE_DISPLAY_NAMES.get(i)), - AVAILABLE_LOCALES.get(i))); + LocalizableString.fromString(nativeDisplayName(code)), + code)); } cmd.set("#LanguageDropdown.Entries", localeEntries); String selectedLocale = (languagePreference != null && AVAILABLE_LOCALES.contains(languagePreference)) @@ -248,16 +259,13 @@ public void handleDataEvent(Ref ref, Store store, case "LanguageChanged" -> { // Dropdown value is the locale code string (e.g. "en-US") - if (data.language != null) { - int idx = AVAILABLE_LOCALES.indexOf(data.language); - if (idx >= 0) { - languagePreference = data.language; - savePreference(uuid, d -> d.setLanguagePreference(languagePreference)); - HFMessages.setLanguageOverride(uuid, languagePreference); - player.sendMessage(MessageUtil.successText(playerRef, - MessageKeys.PlayerSettings.LANGUAGE_CHANGED, - LOCALE_DISPLAY_NAMES.get(idx))); - } + if (data.language != null && AVAILABLE_LOCALES.contains(data.language)) { + languagePreference = data.language; + savePreference(uuid, d -> d.setLanguagePreference(languagePreference)); + HFMessages.setLanguageOverride(uuid, languagePreference); + player.sendMessage(MessageUtil.successText(playerRef, + MessageKeys.PlayerSettings.LANGUAGE_CHANGED, + nativeDisplayName(data.language))); } rebuild(); } diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang index 72379ca9..2fa3285c 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang @@ -423,7 +423,7 @@ newplayer.officer_review = Un oficial revisara tu solicitud. newplayer.map_hint = Solo Vista - Unete a una faccion para reclamar territorio! # Ajustes de Jugador -nav.player_settings = Ajustes +nav.player_settings = Jugador player_settings.title = Ajustes del Jugador player_settings.language_section = Idioma player_settings.auto_detect = Detectar automaticamente del cliente From 028e53e8dc512fdaf043feae512043194bd807d3 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 20:16:59 -0700 Subject: [PATCH 22/55] feat: localize all GUI pages with i18n support Add cmd.set() calls to override hardcoded English text in all .ui templates with HFMessages.get() lookups. Covers faction pages, admin pages, shared/modal pages, new player pages, and help pages. - Add ~570 new MessageKeys constants across all page domains - Add ~280 new en-US .lang keys for GUI labels - Add ~320 new es-ES admin .lang keys - Add ~280 new es-ES GUI .lang keys - Add element IDs to ~95 .ui template files for runtime text override - Add common keys: clear, back, leave, transfer, disband --- .../gui/admin/page/AdminActionsPage.java | 10 + .../gui/admin/page/AdminActivityLogPage.java | 20 +- .../gui/admin/page/AdminBackupsPage.java | 9 + .../gui/admin/page/AdminBulkEconomyPage.java | 11 + .../gui/admin/page/AdminConfigPage.java | 9 + .../gui/admin/page/AdminDashboardPage.java | 15 + .../admin/page/AdminEconomyAdjustPage.java | 13 + .../gui/admin/page/AdminEconomyPage.java | 29 +- .../gui/admin/page/AdminFactionInfoPage.java | 33 + .../admin/page/AdminFactionMembersPage.java | 9 + .../admin/page/AdminFactionRelationsPage.java | 7 + .../admin/page/AdminFactionSettingsPage.java | 6 + .../gui/admin/page/AdminFactionsPage.java | 7 + .../gui/admin/page/AdminHelpPage.java | 9 + .../gui/admin/page/AdminMainPage.java | 7 + .../gui/admin/page/AdminPlayerInfoPage.java | 34 + .../gui/admin/page/AdminPlayersPage.java | 7 + .../gui/admin/page/AdminUpdatesPage.java | 9 + .../gui/admin/page/AdminVersionPage.java | 46 +- .../page/AdminZoneIntegrationFlagsPage.java | 11 + .../gui/admin/page/AdminZoneMapPage.java | 17 +- .../gui/admin/page/AdminZonePage.java | 22 +- .../admin/page/AdminZonePropertiesPage.java | 19 + .../gui/admin/page/AdminZoneSettingsPage.java | 21 + .../gui/faction/page/ChunkMapPage.java | 15 + .../gui/faction/page/DisbandConfirmPage.java | 7 + .../gui/faction/page/FactionBrowserPage.java | 7 + .../gui/faction/page/FactionChatPage.java | 6 + .../faction/page/FactionDashboardPage.java | 31 +- .../gui/faction/page/FactionHelpPage.java | 27 + .../gui/faction/page/FactionInvitesPage.java | 7 + .../faction/page/FactionLeaderboardPage.java | 10 + .../gui/faction/page/FactionMembersPage.java | 7 + .../gui/faction/page/FactionModulesPage.java | 5 + .../faction/page/FactionRelationsPage.java | 8 + .../gui/faction/page/FactionSettingsPage.java | 57 ++ .../faction/page/LeaderLeaveConfirmPage.java | 7 + .../gui/faction/page/LeaveConfirmPage.java | 7 + .../gui/faction/page/LogsViewerPage.java | 8 + .../gui/faction/page/PlayerInfoPage.java | 17 + .../gui/faction/page/TransferConfirmPage.java | 7 + .../gui/faction/page/TreasuryPage.java | 26 + .../faction/page/TreasurySettingsPage.java | 13 + .../hyperfactions/gui/help/HelpCategory.java | 10 +- .../gui/help/page/HelpMainPage.java | 11 + .../gui/newplayer/page/CreateFactionPage.java | 47 ++ .../gui/newplayer/page/HelpPage.java | 27 +- .../gui/newplayer/page/InvitesPage.java | 3 + .../newplayer/page/NewPlayerBrowsePage.java | 7 + .../gui/shared/page/DescriptionModalPage.java | 8 + .../gui/shared/page/FactionInfoPage.java | 24 + .../gui/shared/page/MainMenuPage.java | 2 +- .../gui/shared/page/PlayerSettingsPage.java | 12 + .../gui/shared/page/RenameModalPage.java | 7 + .../gui/shared/page/TagModalPage.java | 8 + .../com/hyperfactions/util/MessageKeys.java | 617 +++++++++++++++++- .../HyperFactions/admin/admin_actions.ui | 12 +- .../HyperFactions/admin/admin_activity_log.ui | 14 +- .../HyperFactions/admin/admin_bulk_economy.ui | 12 +- .../HyperFactions/admin/admin_dashboard.ui | 24 +- .../HyperFactions/admin/admin_economy.ui | 24 +- .../admin/admin_economy_adjust.ui | 12 +- .../HyperFactions/admin/admin_faction_info.ui | 32 +- .../admin/admin_faction_members.ui | 4 +- .../admin/admin_faction_relations.ui | 4 +- .../admin/admin_faction_settings.ui | 4 +- .../HyperFactions/admin/admin_factions.ui | 4 +- .../HyperFactions/admin/admin_player_info.ui | 28 +- .../HyperFactions/admin/admin_players.ui | 4 +- .../HyperFactions/admin/admin_version.ui | 14 +- .../admin/admin_zone_integration_flags.ui | 10 +- .../HyperFactions/admin/admin_zone_map.ui | 16 +- .../admin/admin_zone_map_terrain.ui | 14 +- .../admin/admin_zone_properties.ui | 12 +- .../admin/admin_zone_settings.ui | 28 +- .../Custom/HyperFactions/admin/admin_zones.ui | 2 +- .../admin/unclaim_all_confirm.ui | 6 +- .../admin/zone_change_type_modal.ui | 6 +- .../HyperFactions/admin/zone_rename_modal.ui | 4 +- .../Custom/HyperFactions/faction/chunk_map.ui | 18 +- .../faction/chunk_map_terrain.ui | 16 +- .../HyperFactions/faction/faction_browser.ui | 6 +- .../HyperFactions/faction/faction_chat.ui | 2 +- .../faction/faction_dashboard.ui | 40 +- .../HyperFactions/faction/faction_invites.ui | 2 +- .../faction/faction_leaderboard.ui | 12 +- .../HyperFactions/faction/faction_members.ui | 6 +- .../HyperFactions/faction/faction_modules.ui | 4 +- .../faction/faction_relations.ui | 2 +- .../HyperFactions/faction/faction_settings.ui | 94 +-- .../HyperFactions/faction/faction_treasury.ui | 36 +- .../HyperFactions/faction/logs_viewer.ui | 8 +- .../HyperFactions/faction/player_info.ui | 24 +- .../HyperFactions/faction/transfer_confirm.ui | 6 +- .../faction/treasury_settings.ui | 20 +- .../UI/Custom/HyperFactions/help/help_main.ui | 2 +- .../Custom/HyperFactions/newplayer/browse.ui | 6 +- .../HyperFactions/newplayer/create_faction.ui | 80 +-- .../UI/Custom/HyperFactions/newplayer/help.ui | 46 +- .../Custom/HyperFactions/newplayer/invites.ui | 2 +- .../HyperFactions/newplayer/map_readonly.ui | 4 +- .../HyperFactions/shared/description_modal.ui | 6 +- .../HyperFactions/shared/disband_confirm.ui | 6 +- .../Custom/HyperFactions/shared/error_page.ui | 2 +- .../HyperFactions/shared/faction_info.ui | 26 +- .../shared/leader_leave_confirm.ui | 4 +- .../HyperFactions/shared/leave_confirm.ui | 6 +- .../HyperFactions/shared/player_settings.ui | 25 +- .../HyperFactions/shared/rename_modal.ui | 6 +- .../Custom/HyperFactions/shared/tag_modal.ui | 8 +- .../Server/Languages/en-US/hyperfactions.lang | 5 + .../Languages/en-US/hyperfactions_admin.lang | 319 +++++++++ .../Languages/en-US/hyperfactions_gui.lang | 283 ++++++++ .../Server/Languages/es-ES/hyperfactions.lang | 5 + .../Languages/es-ES/hyperfactions_admin.lang | 319 +++++++++ .../Languages/es-ES/hyperfactions_gui.lang | 277 ++++++++ 116 files changed, 3021 insertions(+), 437 deletions(-) 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 9a4b96ff..caec4d5e 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminActionsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminActionsPage.java @@ -69,6 +69,16 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar (highlight "actions" tab) AdminNavBarHelper.setupBar(playerRef, "actions", cmd, events); + // Localize page title and labels + cmd.set("#Title.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)); + buildContent(cmd, events); } 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 228fb8fb..dda724c0 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java @@ -98,6 +98,24 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "log", cmd, events); + // Localize page title + cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.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)); + + // 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)); + + // 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)); + buildLogList(cmd, events); } @@ -196,7 +214,7 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { // Empty state if (index == 0) { cmd.appendInline("#LogList", - "Label { Text: \"No activity logs matching filters.\"; " + "Label { Text: \"" + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_LOG_NO_LOGS) + "\"; " + "Style: (FontSize: 11, TextColor: #555555); Anchor: (Height: 30); }"); } 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 6b309f51..48fcc22b 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminBackupsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminBackupsPage.java @@ -4,6 +4,8 @@ import com.hyperfactions.gui.UIPaths; 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.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -39,6 +41,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar (must be after template load) AdminNavBarHelper.setupBar(playerRef, "backups", cmd, events); + + // Localize page title and labels + cmd.set("#Title.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)); } /** 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 9927c363..f6240104 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminBulkEconomyPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminBulkEconomyPage.java @@ -64,6 +64,17 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "actions", cmd, events); + // Localize labels + cmd.set("#Title.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)); + int factionCount = economyManager.getFactionEconomyCount(); BigDecimal totalBalance = economyManager.getServerTotalBalance(); 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 2069f8aa..0a1c7179 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminConfigPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminConfigPage.java @@ -4,6 +4,8 @@ import com.hyperfactions.gui.UIPaths; 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.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -39,6 +41,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar (must be after template load) AdminNavBarHelper.setupBar(playerRef, "config", cmd, events); + + // Localize page title and labels + cmd.set("#Title.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)); } /** 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 a166282f..7ddb3f9d 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminDashboardPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminDashboardPage.java @@ -70,6 +70,21 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "dashboard", cmd, events); + // Localize page title and stat labels + cmd.set("#Title.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)); + // Calculate server-wide statistics Collection allFactions = factionManager.getAllFactions(); int totalFactions = allFactions.size(); 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 7bff708a..ff907247 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyAdjustPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyAdjustPage.java @@ -69,6 +69,19 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "economy", cmd, events); + // Localize labels + cmd.set("#Title.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)); + // Get faction info Faction faction = factionManager.getFaction(factionId); if (faction == null) { 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 0417282f..8acad8fe 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java @@ -80,6 +80,33 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "economy", cmd, events); + // Localize page title + cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.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)); + + // 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)); + + // 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)); + + // 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)); + + // 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)); + // === Server Economy Stats === buildServerStats(cmd); @@ -240,7 +267,7 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { // Empty state if (index == 0) { cmd.appendInline("#FactionList", - "Label { Text: \"No factions with economy data.\"; " + "Label { Text: \"" + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECON_NO_DATA) + "\"; " + "Style: (FontSize: 11, TextColor: #555555); Anchor: (Height: 30); }"); } 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 1dce4db5..83e7fe7e 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java @@ -82,6 +82,39 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); + // Localize page title + cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.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)); + + // 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)); + + // 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)); + // Get the faction Faction faction = factionManager.getFaction(factionId); if (faction == null) { 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 093639b5..a7d01afb 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java @@ -78,6 +78,15 @@ public AdminFactionMembersPage(PlayerRef playerRef, UUID factionId, FactionManag public void build(Ref ref, UICommandBuilder cmd, UIEventBuilder events, Store store) { cmd.append(UIPaths.ADMIN_FACTION_MEMBERS); AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); + + // Localize page title and labels + cmd.set("#Title.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)); + Faction faction = factionManager.getFaction(factionId); if (faction == null) { cmd.set("#FactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); 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 cea5e28b..39860604 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java @@ -58,6 +58,13 @@ public AdminFactionRelationsPage(PlayerRef playerRef, UUID factionId, FactionMan public void build(Ref ref, UICommandBuilder cmd, UIEventBuilder events, Store store) { cmd.append(UIPaths.ADMIN_FACTION_RELATIONS); AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); + + // Localize page title and labels + cmd.set("#Title.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)); + Faction faction = factionManager.getFaction(factionId); if (faction == null) { cmd.set("#FactionName.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.FACTION_NOT_FOUND_LABEL)); 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 979a72d6..3f96b51e 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionSettingsPage.java @@ -66,6 +66,12 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); + // Localize page title and labels + cmd.set("#Title.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_BACK)); + // Get the faction Faction faction = factionManager.getFaction(factionId); if (faction == null) { diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionsPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionsPage.java index 11544d40..89a539cd 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionsPage.java @@ -91,6 +91,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); + // Localize page title and common labels + cmd.set("#Title.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)); + // Build faction list buildFactionList(cmd, events); } 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 d2c9fe75..3549b99c 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminHelpPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminHelpPage.java @@ -4,6 +4,8 @@ import com.hyperfactions.gui.UIPaths; import com.hyperfactions.gui.admin.AdminNavBarHelper; import com.hyperfactions.gui.admin.data.AdminHelpData; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -39,6 +41,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar (must be after template load) AdminNavBarHelper.setupBar(playerRef, "help", cmd, events); + + // Localize page title and labels + cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_HELP)); + cmd.set("#ComingSoon.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_HELP_HEADING)); + cmd.set("#ComingSoonSub.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COMING_SOON)); + cmd.set("#Description.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_HELP_DESC1)); + cmd.set("#Description2.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_HELP_DESC2)); } /** Handles data event. */ 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 7e6c9a03..ee395cce 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminMainPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminMainPage.java @@ -66,6 +66,13 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "dashboard", cmd, events); + // Localize page title and buttons + cmd.set("#Title.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)); + // Stats overview Collection allFactions = factionManager.getAllFactions(); int totalFactions = allFactions.size(); 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 51b59703..634912ca 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java @@ -94,6 +94,40 @@ public void build(Ref ref, UICommandBuilder cmd, UIEventBuilder events, Store store) { cmd.append(UIPaths.ADMIN_PLAYER_INFO); AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); + + // Localize page title + cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.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)); + + // 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)); + + // 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)); + + // 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)); + buildContent(cmd, events); } 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 1f8073d8..93538650 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java @@ -115,6 +115,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "players", cmd, events); + // Localize page title and common labels + cmd.set("#Title.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)); + // Load player data (synchronous for initial build) loadPlayerCache(); 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 cbcb2680..6b2dc6e2 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminUpdatesPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminUpdatesPage.java @@ -4,6 +4,8 @@ import com.hyperfactions.gui.UIPaths; 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.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -39,6 +41,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar (must be after template load) AdminNavBarHelper.setupBar(playerRef, "updates", cmd, events); + + // Localize page title and labels + cmd.set("#Title.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)); } /** 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 74cb3f6d..1d8d74ad 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminVersionPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminVersionPage.java @@ -62,6 +62,20 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "version", cmd, events); + // Localize page title + cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.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)); + + // 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)); + // --- Version Info --- cmd.set("#FactionsVersion.Text", "v" + HyperFactions.VERSION); @@ -75,7 +89,7 @@ public void build(Ref ref, UICommandBuilder cmd, String providerNames = PermissionManager.get().getProviderNames(); - setStatus(cmd, "#LuckPermsStatus", providerNames.contains("LuckPerms"), "Active", "Not Found"); + setStatus(cmd, "#LuckPermsStatus", providerNames.contains("LuckPerms"), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); boolean vaultAvailable = providerNames.contains("VaultUnlocked"); boolean vaultInstalled = false; @@ -86,14 +100,14 @@ public void build(Ref ref, UICommandBuilder cmd, } catch (ClassNotFoundException ignored) {} } if (vaultAvailable) { - setStatusColor(cmd, "#VaultUnlockedStatus", "Active", COLOR_GREEN); + setStatusColor(cmd, "#VaultUnlockedStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), COLOR_GREEN); } else if (vaultInstalled) { - setStatusColor(cmd, "#VaultUnlockedStatus", "Installed (no perm provider)", COLOR_YELLOW); + setStatusColor(cmd, "#VaultUnlockedStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE_PROVIDER), COLOR_YELLOW); } else { setStatusColor(cmd, "#VaultUnlockedStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_INSTALLED), COLOR_GRAY); } - setStatus(cmd, "#NativeStatus", providerNames.contains("HytaleNative"), "Active", "Not Found"); + setStatus(cmd, "#NativeStatus", providerNames.contains("HytaleNative"), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); // --- Protection --- ProtectionMixinBridge.MixinProvider provider = ProtectionMixinBridge.getProvider(); @@ -102,28 +116,28 @@ public void build(Ref ref, UICommandBuilder cmd, switch (provider) { case BOTH -> { String hpVersion = System.getProperty("hyperprotect.bridge.version", "unknown"); - setStatusColor(cmd, "#HyperProtectStatus", "Active (v" + hpVersion + ")", COLOR_GREEN); - setStatusColor(cmd, "#OrbisGuardMixinsStatus", "Active (compatible)", COLOR_GREEN); + 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); } case HYPERPROTECT -> { String hpVersion = System.getProperty("hyperprotect.bridge.version", "unknown"); - setStatusColor(cmd, "#HyperProtectStatus", "Active (v" + hpVersion + ")", COLOR_GREEN); + 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); } case ORBISGUARD -> { setStatusColor(cmd, "#HyperProtectStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); - setStatusColor(cmd, "#OrbisGuardMixinsStatus", "Active", COLOR_GREEN); + setStatusColor(cmd, "#OrbisGuardMixinsStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), COLOR_GREEN); } case NONE -> { setStatusColor(cmd, "#HyperProtectStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); - setStatusColor(cmd, "#OrbisGuardMixinsStatus", "Not Detected", COLOR_GRAY); + setStatusColor(cmd, "#OrbisGuardMixinsStatus", HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_DETECTED), COLOR_GRAY); } default -> throw new IllegalStateException("Unexpected value"); } if (ogApiAvailable) { String ogLabel = provider == ProtectionMixinBridge.MixinProvider.NONE - ? "Active (claims only)" : "Active"; + ? HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE) + " (claims only)" : HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE); String ogColor = provider == ProtectionMixinBridge.MixinProvider.NONE ? COLOR_YELLOW : COLOR_GREEN; setStatusColor(cmd, "#OrbisGuardApiStatus", ogLabel, ogColor); @@ -138,16 +152,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 ? "Not Found" : (gsEnabled ? "Active" : "Disabled"); + 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 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, "Active", "Not Found"); + setStatus(cmd, "#KyuubiSoftStatus", ksAvailable, HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); // --- Placeholders --- - setStatus(cmd, "#PlaceholderAPIStatus", PlaceholderAPIIntegration.isAvailable(), "Active", "Not Found"); + setStatus(cmd, "#PlaceholderAPIStatus", PlaceholderAPIIntegration.isAvailable(), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); boolean wiflowAvailable; try { @@ -155,7 +169,7 @@ public void build(Ref ref, UICommandBuilder cmd, } catch (NoClassDefFoundError e) { wiflowAvailable = false; } - setStatus(cmd, "#WiFlowPAPIStatus", wiflowAvailable, "Active", "Not Found"); + setStatus(cmd, "#WiFlowPAPIStatus", wiflowAvailable, HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); // --- Economy --- if (plugin.isTreasuryEnabled()) { @@ -164,10 +178,10 @@ public void build(Ref ref, UICommandBuilder cmd, if (econMgr != null) { econName = econMgr.getVaultProvider().getEconomyName(); } - String treasuryLabel = econName != null ? "Active (" + econName + ")" : "Active"; + String treasuryLabel = econName != null ? HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE) + " (" + econName + ")" : HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE); setStatusColor(cmd, "#TreasuryStatus", treasuryLabel, COLOR_GREEN); } else { - setStatusColor(cmd, "#TreasuryStatus", "Not Found", COLOR_GRAY); + setStatusColor(cmd, "#TreasuryStatus", HFMessages.get(playerRef, MessageKeys.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 8a73189b..56f5a8d0 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneIntegrationFlagsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneIntegrationFlagsPage.java @@ -68,6 +68,17 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "zones", cmd, events); + // Localize labels + cmd.set("#Title.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)); + // Get the zone Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { 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 3dca8d00..d7c5bfb5 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneMapPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneMapPage.java @@ -142,6 +142,18 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.ADMIN_ZONE_MAP); } + // Localize labels + cmd.set("#Title.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)); + // Zone header info cmd.set("#ZoneTitle.Text", zone.name() + " (" + zone.type().getDisplayName() + ")"); cmd.set("#ZoneStats.Text", zone.getChunkCount() + " chunks in " + zone.world()); @@ -154,19 +166,20 @@ public void build(Ref ref, UICommandBuilder cmd, } // Dynamic legend: add OrbisGuard protected region entry when OG is available + String protectedLabel = " " + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_MAP_PROTECTED); if (OrbisGuardIntegration.isAvailable()) { if (terrainEnabled) { // Terrain mode: append to row 2 (#LegendContainer[1]) cmd.appendInline("#LegendContainer[1]", "Group { LayoutMode: Left; Anchor: (Width: 110); " + "Group { Anchor: (Width: 10, Height: 10); Background: (Color: " + COLOR_OG_PROTECTED + "); } " - + "Label { Text: \" Protected\"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } }"); + + "Label { Text: \"" + protectedLabel + "\"; 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: \" Protected\"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } }"); + + "Label { Text: \"" + protectedLabel + "\"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } }"); } } 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 87cbf3ac..094de186 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePage.java @@ -92,6 +92,16 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "zones", cmd, events); + // Localize page title and common labels + cmd.set("#Title.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)); + // Build zone list buildZoneList(cmd, events); } @@ -126,10 +136,10 @@ private void buildZoneList(UICommandBuilder cmd, UIEventBuilder events) { // Sort dropdown cmd.set("#SortDropdown.Entries", List.of( - new DropdownEntryInfo(LocalizableString.fromString("Name"), "NAME"), - new DropdownEntryInfo(LocalizableString.fromString("Type"), "TYPE"), - new DropdownEntryInfo(LocalizableString.fromString("Chunks"), "CHUNKS"), - new DropdownEntryInfo(LocalizableString.fromString("World"), "WORLD") + 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") )); cmd.set("#SortDropdown.Value", zoneSortMode.name()); events.addEventBinding( @@ -157,7 +167,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", zones.size() + " " + tabLabel + "zones (" + totalChunks + " chunks)"); + cmd.set("#ZoneCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZONE_COUNT_FORMAT, zones.size(), tabLabel, totalChunks)); // Create zone button events.addEventBinding( @@ -186,7 +196,7 @@ private void buildZoneList(UICommandBuilder cmd, UIEventBuilder events) { } // Pagination - cmd.set("#PageInfo.Text", (currentPage + 1) + "/" + totalPages); + cmd.set("#PageInfo.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.PAGE_FORMAT, currentPage + 1, totalPages)); if (currentPage > 0) { events.addEventBinding( 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 ef016af8..e79c40b6 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePropertiesPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePropertiesPage.java @@ -74,6 +74,25 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "zones", cmd, events); + // Localize labels + cmd.set("#Title.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("#SaveNameBtn.Text", saveText); + cmd.set("#SaveUpperBtn.Text", saveText); + cmd.set("#SaveLowerBtn.Text", saveText); + String clearText = HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_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)); + // Get the zone Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { 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 0c4d702c..a59a3fdd 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneSettingsPage.java @@ -99,6 +99,27 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "zones", cmd, events); + // Localize labels + cmd.set("#Title.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("#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)); + // Get the zone Zone zone = zoneManager.getZoneById(zoneId); if (zone == null) { 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 f8b89767..55b90c65 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/ChunkMapPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/ChunkMapPage.java @@ -141,6 +141,21 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.CHUNK_MAP); } + // 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)); + if (!terrainEnabled) { + // Flat mode has additional legend entries + cmd.set("#LegendWildernessLabel.Text", HFMessages.get(playerRef, MessageKeys.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)); + // Setup navigation bar - use new player nav when no faction if (viewerFaction != null) { NavBarHelper.setupBar(playerRef, viewerFaction, PAGE_ID, cmd, events); 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 703a8146..76f048bd 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/DisbandConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/DisbandConfirmPage.java @@ -57,6 +57,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the disband confirmation template 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)); + // Set faction name in the modal cmd.set("#FactionName.Text", faction.name()); 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 951979c0..8de7a5f1 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionBrowserPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionBrowserPage.java @@ -89,6 +89,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the main template 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)); + // Setup navigation bar - use new player nav when no faction if (viewerFaction != null) { NavBarHelper.setupBar(playerRef, viewerFaction, PAGE_ID, cmd, events); diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionChatPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionChatPage.java index 8595ebe4..0c298655 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionChatPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionChatPage.java @@ -95,6 +95,12 @@ public void build(Ref 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)); + // Setup navigation bar NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); 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 5afc54ce..636c81c7 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionDashboardPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionDashboardPage.java @@ -121,6 +121,29 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the main template 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)); + // Setup navigation bar setupNavBar(cmd, events); @@ -259,14 +282,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("#UpkeepSubtext.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.IN_GRACE)); - cmd.set("#UpkeepSubtext.Style.TextColor", "#FF5555"); + cmd.set("#PerCycleLabel.Text", HFMessages.get(playerRef, MessageKeys.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("#UpkeepSubtext.Text", "in " + com.hyperfactions.economy.UpkeepProcessor.formatDuration(remaining)); + cmd.set("#PerCycleLabel.Text", "in " + com.hyperfactions.economy.UpkeepProcessor.formatDuration(remaining)); } else { - cmd.set("#UpkeepSubtext.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.BILLABLE_CHUNKS, billableChunks)); + cmd.set("#PerCycleLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.BILLABLE_CHUNKS, billableChunks)); } // Color based on affordability 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 9c357fe7..6d6a51c0 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionHelpPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionHelpPage.java @@ -5,6 +5,8 @@ import com.hyperfactions.gui.UIPaths; 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.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -48,6 +50,31 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup faction navigation bar 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)); } /** 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 d56634f8..47c810cd 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionInvitesPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionInvitesPage.java @@ -92,6 +92,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the main template 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)); + // Setup navigation bar NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionLeaderboardPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionLeaderboardPage.java index 534c1eba..8da3fc75 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionLeaderboardPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionLeaderboardPage.java @@ -98,6 +98,16 @@ public void build(Ref 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)); + // Setup navigation bar if (viewerFaction != null) { NavBarHelper.setupBar(playerRef, viewerFaction, PAGE_ID, cmd, events); 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 8410cda7..0f38a18d 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java @@ -102,6 +102,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the main template 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)); + // Setup navigation bar NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionModulesPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionModulesPage.java index 3059826e..8cc0c9db 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionModulesPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionModulesPage.java @@ -71,6 +71,11 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the modules template 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)); + // Setup navigation bar NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); 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 6f75dbed..531030df 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionRelationsPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionRelationsPage.java @@ -103,6 +103,14 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the main template 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)); + // Setup navigation bar NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); diff --git a/src/main/java/com/hyperfactions/gui/faction/page/FactionSettingsPage.java b/src/main/java/com/hyperfactions/gui/faction/page/FactionSettingsPage.java index 5e352135..ddd65c04 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionSettingsPage.java @@ -105,6 +105,63 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the unified settings template 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)); + // Setup navigation bar NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); diff --git a/src/main/java/com/hyperfactions/gui/faction/page/LeaderLeaveConfirmPage.java b/src/main/java/com/hyperfactions/gui/faction/page/LeaderLeaveConfirmPage.java index 07cfb196..2cda86e1 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/LeaderLeaveConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/LeaderLeaveConfirmPage.java @@ -62,6 +62,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the leader leave confirmation template 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)); + // Set faction name cmd.set("#FactionName.Text", faction.name()); 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 2ff83803..b1893a82 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/LeaveConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/LeaveConfirmPage.java @@ -57,6 +57,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the leave confirmation template 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)); + // Set faction name in the modal cmd.set("#FactionName.Text", faction.name()); 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 9b662345..5995e499 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/LogsViewerPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/LogsViewerPage.java @@ -83,6 +83,14 @@ public void build(Ref ref, UICommandBuilder cmd, // Set title with faction name cmd.set("#LogsTitle.Text", HFMessages.get(playerRef, MessageKeys.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)); + buildLogList(cmd, events); } 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 61af636f..deb7c9b3 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/PlayerInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/PlayerInfoPage.java @@ -104,6 +104,23 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the player info template 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)); + // === Header === cmd.set("#PlayerName.Text", targetPlayerName); 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 f98dd750..778d1921 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TransferConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TransferConfirmPage.java @@ -65,6 +65,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the transfer confirmation template 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)); + // Set dynamic values cmd.set("#TargetName.Text", targetName); 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 a4f0b9e8..7e407df5 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java @@ -86,6 +86,32 @@ public void build(Ref ref, UICommandBuilder cmd, UIEventBuilder events, Store store) { 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)); + NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); UUID uuid = playerRef.getUuid(); 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 655f8ae2..006853f1 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TreasurySettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TreasurySettingsPage.java @@ -67,6 +67,19 @@ 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)); + FactionPermissions perms = faction.getEffectivePermissions(); FactionEconomy economy = economyManager.getEconomy(faction.id()); diff --git a/src/main/java/com/hyperfactions/gui/help/HelpCategory.java b/src/main/java/com/hyperfactions/gui/help/HelpCategory.java index 0341e401..03561abc 100644 --- a/src/main/java/com/hyperfactions/gui/help/HelpCategory.java +++ b/src/main/java/com/hyperfactions/gui/help/HelpCategory.java @@ -42,13 +42,21 @@ public String id() { } /** - * Gets the display name shown in the UI, resolved via i18n. + * Gets the display name shown in the UI, resolved via i18n (default locale). */ @NotNull public String displayName() { return HFMessages.get((PlayerRef) null, displayNameKey); } + /** + * Gets the display name shown in the UI, resolved via i18n for a specific player. + */ + @NotNull + public String displayName(PlayerRef playerRef) { + return HFMessages.get(playerRef, displayNameKey); + } + /** * Gets the accent color hex string (e.g. "#00FFFF") for UI rendering. */ 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 32439ded..56092ca4 100644 --- a/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java +++ b/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java @@ -8,6 +8,8 @@ import com.hyperfactions.gui.help.data.HelpPageData; import com.hyperfactions.gui.newplayer.NewPlayerNavBarHelper; import com.hyperfactions.manager.FactionManager; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -93,6 +95,15 @@ public void build(Ref ref, UICommandBuilder cmd, NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); } + // Page title + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.HELP_CENTER_TITLE)); + + // Set localized sidebar button labels + for (HelpCategory category : HelpCategory.values()) { + int idx = category.ordinal(); + cmd.set("#Cat" + idx + ".Text", " " + category.displayName(playerRef)); + } + // Setup category buttons (disable selected, bind events to others) setupCategoryButtons(cmd, events); 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 4ef6bd4d..1009acbb 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/CreateFactionPage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/CreateFactionPage.java @@ -80,6 +80,53 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup navigation bar 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)); + + // 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)); + + // 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)); + // Set default ColorPicker value (cyan) cmd.set("#FactionColorPicker.Value", DEFAULT_COLOR); 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 844baec4..a9b6c237 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/HelpPage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/HelpPage.java @@ -4,6 +4,8 @@ import com.hyperfactions.gui.UIPaths; 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.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; @@ -44,7 +46,30 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup navigation bar for new players NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); - // Content is defined in the template - this is a static page + // 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)); } /** 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 4e781a8d..486fdf6a 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/InvitesPage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/InvitesPage.java @@ -89,6 +89,9 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the main template cmd.append(UIPaths.NEWPLAYER_INVITES); + // Static labels + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.NewPlayerGui.INVITES_TITLE)); + // Setup navigation bar for new players NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); diff --git a/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerBrowsePage.java b/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerBrowsePage.java index 3c08efac..26f20ab4 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerBrowsePage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerBrowsePage.java @@ -120,6 +120,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the main template 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)); + // Setup navigation bar for new players NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); 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 26ecd383..01f5efaf 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/DescriptionModalPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/DescriptionModalPage.java @@ -72,6 +72,14 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the modal template 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)); + // Show current description String currentDesc = faction.description(); if (currentDesc == null || currentDesc.isEmpty()) { 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 bb7b72d7..20bc9ed1 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/FactionInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/FactionInfoPage.java @@ -136,6 +136,9 @@ public void build(Ref ref, UICommandBuilder cmd, Faction viewerFaction = factionManager.getPlayerFaction(viewerRef.getUuid()); boolean isOwnFaction = viewerFaction != null && viewerFaction.id().equals(targetFaction.id()); + // === Page Title === + cmd.set("#PageTitle.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.TITLE)); + // === Header Section === // Faction name cmd.set("#FactionName.Text", targetFaction.name()); @@ -162,6 +165,27 @@ public void build(Ref ref, UICommandBuilder cmd, // 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)); + + // Leadership labels + cmd.set("#LeaderLabel.Text", HFMessages.get(viewerRef, MessageKeys.FactionInfoGui.LEADER_LABEL)); + cmd.set("#OfficersLabel.Text", HFMessages.get(viewerRef, MessageKeys.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)); + PowerManager.FactionPowerStats powerStats = powerManager.getFactionPowerStats(targetFaction.id()); // Power 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 61f7bbeb..77270444 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/MainMenuPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/MainMenuPage.java @@ -56,7 +56,7 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.MAIN_MENU); // Set title - cmd.set("#MenuTitle.Text", "HyperFactions"); + cmd.set("#MenuTitle.Text", HFMessages.get(playerRef, MessageKeys.MainMenu.TITLE)); // Section: My Faction if (faction != null) { 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 30e9c989..835be09f 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java @@ -112,6 +112,10 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the template cmd.append(UIPaths.PLAYER_SETTINGS); + // Page title + cmd.set("#PageTitle.Text", + HFMessages.get(playerRef, MessageKeys.PlayerSettings.TITLE)); + // Setup nav bar based on faction status if (faction != null) { NavBarHelper.setupBar(playerRef, faction, PAGE_ID, cmd, events); @@ -128,6 +132,8 @@ public void build(Ref ref, UICommandBuilder cmd, HFMessages.get(playerRef, MessageKeys.PlayerSettings.LANGUAGE_LABEL)); // Auto-detect checkbox + cmd.set("#AutoDetectLabel.Text", + HFMessages.get(playerRef, MessageKeys.PlayerSettings.AUTO_DETECT)); boolean autoDetect = (languagePreference == null); cmd.set("#AutoDetectCB #CheckBox.Value", autoDetect); @@ -170,18 +176,24 @@ public void build(Ref ref, UICommandBuilder cmd, HFMessages.get(playerRef, MessageKeys.PlayerSettings.NOTIFICATIONS_SECTION)); // Territory Alerts + cmd.set("#TerritoryAlertsLabel.Text", + HFMessages.get(playerRef, MessageKeys.PlayerSettings.TERRITORY_ALERTS)); buildNotificationToggle(cmd, events, "#TerritoryAlertsCB", MessageKeys.PlayerSettings.TERRITORY_ALERTS, MessageKeys.PlayerSettings.TERRITORY_ALERTS_DESC, "#TerritoryAlertsDesc", territoryAlerts, "ToggleTerritoryAlerts"); // Death Announcements + cmd.set("#DeathAnnounceLabel.Text", + HFMessages.get(playerRef, MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS)); buildNotificationToggle(cmd, events, "#DeathAnnounceCB", MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS, MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS_DESC, "#DeathAnnounceDesc", deathAnnouncements, "ToggleDeathAnnouncements"); // Power Notifications + cmd.set("#PowerNotifLabel.Text", + HFMessages.get(playerRef, MessageKeys.PlayerSettings.POWER_NOTIFICATIONS)); buildNotificationToggle(cmd, events, "#PowerNotifCB", MessageKeys.PlayerSettings.POWER_NOTIFICATIONS, MessageKeys.PlayerSettings.POWER_NOTIFICATIONS_DESC, 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 efd40df2..e0ba2076 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/RenameModalPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/RenameModalPage.java @@ -82,6 +82,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the modal template 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)); + // Show current name cmd.set("#CurrentName.Text", faction.name()); 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 18d6083e..067d8ccb 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/TagModalPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/TagModalPage.java @@ -85,6 +85,14 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the modal template 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)); + // Show current tag String currentTag = faction.tag(); if (currentTag == null || currentTag.isEmpty()) { diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 169d73a1..f4807177 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -56,6 +56,11 @@ public static final class Common { 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"; private Common() {} } @@ -682,6 +687,7 @@ 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"; @@ -694,18 +700,41 @@ 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"; @@ -719,6 +748,9 @@ 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"; @@ -729,6 +761,10 @@ 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"; @@ -744,12 +780,34 @@ 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"; @@ -782,12 +840,21 @@ public static final class GuiCommon { 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"; 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"; @@ -807,6 +874,11 @@ 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"; @@ -815,6 +887,14 @@ 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"; @@ -824,6 +904,21 @@ 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"; @@ -852,7 +947,7 @@ public static final class FactionMainGui { private FactionMainGui() {} } - /** Help GUI category display names. */ + /** 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"; @@ -861,6 +956,32 @@ public static final class HelpGui { 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"; + // 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() {} } @@ -895,6 +1016,12 @@ 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"; @@ -926,6 +1053,59 @@ 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"; @@ -947,6 +1127,10 @@ 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"; @@ -968,6 +1152,34 @@ 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"; @@ -1041,12 +1253,41 @@ public static final class TreasuryGui { 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"; 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"; @@ -1076,6 +1317,12 @@ private ConfirmGui() {} 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"; @@ -1085,6 +1332,10 @@ 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"; @@ -1099,6 +1350,11 @@ 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"; @@ -1125,6 +1381,16 @@ 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"; @@ -1179,12 +1445,39 @@ public static final class CreateGui { 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"; @@ -1390,6 +1683,17 @@ public static final class AdminGui { 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"; + // 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"; @@ -1416,6 +1720,22 @@ public static final class AdminGui { 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"; + // 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"; @@ -1453,6 +1773,301 @@ public static final class AdminGui { 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"; + + // ========== 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"; + + // 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"; + + // 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"; + + // 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"; + private AdminGui() {} } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_actions.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_actions.ui index 1bce59eb..e55f7d1d 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_actions.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_actions.ui @@ -28,13 +28,13 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Bottom: 12); - Label { + Label #CombatStatsLabel { Text: "Combat Statistics"; Style: (FontSize: 14, TextColor: #FFFFFF, RenderBold: true); Anchor: (Height: 22, Bottom: 8); } - Label { + Label #CombatDescLabel { Text: "Reset kills and deaths for ALL players on the server. This action cannot be undone."; Style: (FontSize: 11, TextColor: #888888); Anchor: (Height: 32, Bottom: 10); @@ -55,13 +55,13 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Bottom: 12); - Label { + Label #EconomyLabel { Text: "Economy"; Style: (FontSize: 14, TextColor: #FFFFFF, RenderBold: true); Anchor: (Height: 22, Bottom: 8); } - Label { + Label #EconomyDescLabel { Text: "Add or remove money from ALL faction treasuries at once."; Style: (FontSize: 11, TextColor: #888888); Anchor: (Height: 18, Bottom: 10); @@ -82,13 +82,13 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Bottom: 12); - Label { + Label #UpkeepLabel { Text: "Upkeep Collection"; Style: (FontSize: 14, TextColor: #FFFFFF, RenderBold: true); Anchor: (Height: 22, Bottom: 8); } - Label { + Label #UpkeepDescLabel { Text: "Manually trigger upkeep collection for all factions right now, regardless of the scheduled timer."; Style: (FontSize: 11, TextColor: #888888); Anchor: (Height: 32, Bottom: 10); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_activity_log.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_activity_log.ui index 1751cc65..56133fce 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_activity_log.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_activity_log.ui @@ -26,7 +26,7 @@ $C.@PageOverlay { Anchor: (Height: 38, Bottom: 8); LayoutMode: Left; - Label { + Label #TypeLabel { Text: "Type:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 35); @@ -38,7 +38,7 @@ $C.@PageOverlay { Label { Anchor: (Width: 12); } - Label { + Label #TimeLabel { Text: "Time:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 35); @@ -50,7 +50,7 @@ $C.@PageOverlay { Label { Anchor: (Width: 12); } - Label { + Label #PlayerLabel { Text: "Player:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 45); @@ -79,22 +79,22 @@ $C.@PageOverlay { LayoutMode: Left; Padding: (Left: 12, Right: 12); - Label { + Label #ColTime { Text: "Time"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 80); } - Label { + Label #ColType { Text: "Type"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 65); } - Label { + Label #ColFaction { Text: "Faction"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 120); } - Label { + Label #ColMessage { Text: "Message"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); FlexWeight: 1; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_bulk_economy.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_bulk_economy.ui index ca73500d..bd0d4146 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_bulk_economy.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_bulk_economy.ui @@ -23,7 +23,7 @@ $C.@PageOverlay { Padding: (Left: 25, Right: 25, Top: 12, Bottom: 12); // Section header - Label { + Label #SectionHeader { Text: "Adjust All Faction Treasuries"; Style: (FontSize: 14, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 28, Bottom: 8); @@ -40,7 +40,7 @@ $C.@PageOverlay { Anchor: (Height: 20); LayoutMode: Left; - Label { + Label #FactionsInfoLabel { Text: "Factions:"; Style: (FontSize: 12, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 120); @@ -55,7 +55,7 @@ $C.@PageOverlay { Anchor: (Height: 20); LayoutMode: Left; - Label { + Label #TotalBalanceInfoLabel { Text: "Total Balance:"; Style: (FontSize: 12, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 120); @@ -70,7 +70,7 @@ $C.@PageOverlay { // Amount input Group { Anchor: (Height: 20, Bottom: 4); - Label { + Label #AmountLabel { Text: "Amount (positive to add, negative to remove):"; Style: (FontSize: 11, TextColor: #AAAAAA); } @@ -82,7 +82,7 @@ $C.@PageOverlay { } // Hint text - Label { + Label #HintLabel { Text: "This will apply to every faction with a treasury"; Style: (FontSize: 10, TextColor: #555555); Anchor: (Height: 16, Bottom: 10); @@ -94,7 +94,7 @@ $C.@PageOverlay { Background: (Color: #3a2a1a); Padding: (Left: 10, Right: 10, Top: 6, Bottom: 6); - Label { + Label #WarningLabel { Text: "Warning: This action affects ALL factions and cannot be undone."; Style: (FontSize: 10, TextColor: #FFAA00); } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_dashboard.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_dashboard.ui index c46d4f42..2e1b078f 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_dashboard.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_dashboard.ui @@ -23,7 +23,7 @@ $C.@PageOverlay { Anchor: (Height: 25, Bottom: 15); LayoutMode: Left; - Label { + Label #ServerStatsLabel { Text: "Server Statistics"; Style: (FontSize: 14, TextColor: #00FFFF, RenderBold: true, VerticalAlignment: Center); } @@ -42,7 +42,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 5); - Label { + Label #FactionsLabel { Text: "Factions"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -62,7 +62,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5, Right: 5); - Label { + Label #TotalMembersLabel { Text: "Total Members"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -82,7 +82,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5); - Label { + Label #TotalClaimsLabel { Text: "Total Claims"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -108,7 +108,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 5); - Label { + Label #ZonesLabel { Text: "Zones"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -133,7 +133,7 @@ $C.@PageOverlay { FlexWeight: 1; } } - Label { + Label #SafeWarLabel { Text: "safe / war"; Style: (FontSize: 9, TextColor: #444444, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -148,7 +148,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5, Right: 5); - Label { + Label #TotalPowerLabel { Text: "Total Power"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -168,7 +168,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5); - Label { + Label #AvgPowerLabel { Text: "Avg Power/Faction"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -195,7 +195,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 5); - Label { + Label #TotalEconomyLabel { Text: "Total Economy"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -215,7 +215,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5, Right: 5); - Label { + Label #WealthiestLabel { Text: "Wealthiest"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -235,7 +235,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5); - Label { + Label #AvgBalanceLabel { Text: "Avg Balance"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -255,7 +255,7 @@ $C.@PageOverlay { Padding: (Left: 20, Right: 20, Top: 10, Bottom: 10); LayoutMode: Left; - Label { + Label #BypassLabel { Text: "Protection Bypass:"; Style: (FontSize: 13, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 130); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_economy.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_economy.ui index f84853c4..c6e25e7c 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_economy.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_economy.ui @@ -34,7 +34,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 4); - Label { + Label #TotalBalanceLabel { Text: "Total Balance"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 14); @@ -54,7 +54,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4, Right: 4); - Label { + Label #FactionsLabel { Text: "Factions"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 14); @@ -74,7 +74,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4); - Label { + Label #AvgBalanceLabel { Text: "Avg Balance"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 14); @@ -105,7 +105,7 @@ $C.@PageOverlay { Style: (FontSize: 18, TextColor: #55FF55, RenderBold: true); Anchor: (Height: 22); } - Label { + Label #InGraceLabel { Text: "In Grace"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 12); @@ -126,7 +126,7 @@ $C.@PageOverlay { Style: (FontSize: 18, TextColor: #FFD700, RenderBold: true); Anchor: (Height: 22); } - Label { + Label #CollectedLabel { Text: "Collected (24h)"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 12); @@ -147,7 +147,7 @@ $C.@PageOverlay { Style: (FontSize: 18, TextColor: #AAAAAA, RenderBold: true); Anchor: (Height: 22); } - Label { + Label #NextCollectionLabel { Text: "Next Collection"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 12); @@ -160,7 +160,7 @@ $C.@PageOverlay { Anchor: (Height: 38, Bottom: 8); LayoutMode: Left; - Label { + Label #SearchLabel { Text: "Search:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 55); @@ -184,7 +184,7 @@ $C.@PageOverlay { Group { FlexWeight: 1; } - Label { + Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 35); @@ -207,23 +207,23 @@ $C.@PageOverlay { LayoutMode: Left; Padding: (Left: 12, Right: 12); - Label { + Label #ColFaction { Text: "Faction"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 160); } - Label { + Label #ColBalance { Text: "Balance"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 120); } - Label { + Label #ColMembers { Text: "Members"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 80); } Label { FlexWeight: 1; } - Label { + Label #ColActions { Text: "Actions"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 135); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_economy_adjust.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_economy_adjust.ui index 56ce09c1..371e91de 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_economy_adjust.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_economy_adjust.ui @@ -23,7 +23,7 @@ $C.@PageOverlay { Padding: (Left: 25, Right: 25, Top: 12, Bottom: 12); // Section header - Label { + Label #SectionHeader { Text: "Adjust Treasury Balance"; Style: (FontSize: 14, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 28, Bottom: 8); @@ -40,7 +40,7 @@ $C.@PageOverlay { Anchor: (Height: 20); LayoutMode: Left; - Label { + Label #FactionLabel { Text: "Faction:"; Style: (FontSize: 12, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 100); @@ -55,7 +55,7 @@ $C.@PageOverlay { Anchor: (Height: 20); LayoutMode: Left; - Label { + Label #CurrentBalanceLabel { Text: "Current Balance:"; Style: (FontSize: 12, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 100); @@ -70,7 +70,7 @@ $C.@PageOverlay { // Amount input Group { Anchor: (Height: 20, Bottom: 4); - Label { + Label #AmountLabel { Text: "Amount (positive to add, negative to deduct):"; Style: (FontSize: 11, TextColor: #AAAAAA); } @@ -100,7 +100,7 @@ $C.@PageOverlay { Anchor: (Height: 20); LayoutMode: Left; - Label { + Label #AdjustmentLabel { Text: "Adjustment:"; Style: (FontSize: 12, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 100); @@ -115,7 +115,7 @@ $C.@PageOverlay { Anchor: (Height: 20); LayoutMode: Left; - Label { + Label #NewBalanceLabel { Text: "New Balance:"; Style: (FontSize: 12, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 100); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_info.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_info.ui index 40f7002b..fb5b71e6 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_info.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_info.ui @@ -72,7 +72,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 4); - Label { + Label #PowerCardLabel { Text: "Power"; Style: (FontSize: 9, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -82,7 +82,7 @@ $C.@PageOverlay { Style: (FontSize: 18, TextColor: #44CC44, RenderBold: true, HorizontalAlignment: Center, VerticalAlignment: Center); FlexWeight: 1; } - Label { + Label #PowerSubLabel { Text: "current / max"; Style: (FontSize: 9, TextColor: #444444, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -97,7 +97,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4, Right: 4); - Label { + Label #ClaimsCardLabel { Text: "Claims"; Style: (FontSize: 9, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -107,7 +107,7 @@ $C.@PageOverlay { Style: (FontSize: 18, TextColor: #FFAA00, RenderBold: true, HorizontalAlignment: Center, VerticalAlignment: Center); FlexWeight: 1; } - Label { + Label #ClaimsSubLabel { Text: "claimed / max"; Style: (FontSize: 9, TextColor: #444444, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -122,7 +122,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4); - Label { + Label #MembersCardLabel { Text: "Members"; Style: (FontSize: 9, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -153,7 +153,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 4); - Label { + Label #RelationsCardLabel { Text: "Relations"; Style: (FontSize: 9, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -178,7 +178,7 @@ $C.@PageOverlay { FlexWeight: 1; } } - Label { + Label #RelationsSubLabel { Text: "ally / enemy"; Style: (FontSize: 9, TextColor: #444444, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -193,7 +193,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4, Right: 4); - Label { + Label #StatusCardLabel { Text: "Status"; Style: (FontSize: 9, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -218,7 +218,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4); - Label { + Label #InfoCardLabel { Text: "Info"; Style: (FontSize: 9, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -235,7 +235,7 @@ $C.@PageOverlay { Style: (FontSize: 18, TextColor: #FFD700, RenderBold: true, HorizontalAlignment: Center, VerticalAlignment: Center); FlexWeight: 1; } - Label { + Label #TreasurySubLabel { Text: "treasury balance"; Style: (FontSize: 9, TextColor: #444444, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -268,7 +268,7 @@ $C.@PageOverlay { Padding: (Left: 12, Right: 12, Top: 10, Bottom: 10); LayoutMode: Top; - Label { + Label #LeadershipHeader { Text: "Leadership"; Style: (FontSize: 11, TextColor: #666666, RenderBold: true); Anchor: (Height: 16, Bottom: 6); @@ -278,7 +278,7 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 22, Bottom: 4); - Label { + Label #LeaderLabel { Text: "Leader:"; Style: (FontSize: 12, TextColor: #FFD700, RenderBold: true, VerticalAlignment: Center); Anchor: (Width: 60); @@ -293,7 +293,7 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 22); - Label { + Label #OfficersLabel { Text: "Officers:"; Style: (FontSize: 12, TextColor: #87CEEB, RenderBold: true, VerticalAlignment: Center); Anchor: (Width: 60); @@ -319,7 +319,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Bottom: 6); - Label { + Label #PowerMgmtHeader { Text: "Power Management"; Style: (FontSize: 11, TextColor: #666666, RenderBold: true); Anchor: (Height: 16, Bottom: 6); @@ -374,7 +374,7 @@ $C.@PageOverlay { Visible: false; Anchor: (Bottom: 6); - Label { + Label #EconMgmtHeader { Text: "Economy Management"; Style: (FontSize: 11, TextColor: #666666, RenderBold: true); Anchor: (Height: 16, Bottom: 6); @@ -404,7 +404,7 @@ $C.@PageOverlay { Padding: (Left: 12, Right: 12, Top: 10, Bottom: 10); LayoutMode: Top; - Label { + Label #DangerZoneHeader { Text: "Danger Zone"; Style: (FontSize: 11, TextColor: #FF5555, RenderBold: true); Anchor: (Height: 16, Bottom: 6); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members.ui index 91fa550a..209d84fe 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members.ui @@ -41,7 +41,7 @@ $C.@PageOverlay { Anchor: (Height: 38, Bottom: 8); LayoutMode: Left; - Label { + Label #SearchLabel { Text: "Search:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 55); @@ -66,7 +66,7 @@ $C.@PageOverlay { Group { FlexWeight: 1; } - Label { + Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 35); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_relations.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_relations.ui index daafdab1..dc871e6c 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_relations.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_relations.ui @@ -40,7 +40,7 @@ $C.@PageOverlay { Anchor: (Height: 30, Bottom: 8); LayoutMode: Left; - Label { + Label #SubtitleLabel { Text: "Manage faction relations (bypasses approval)"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); } @@ -107,7 +107,7 @@ $C.@PageOverlay { Anchor: (Height: 22, Bottom: 6); LayoutMode: Left; - Label { + Label #SetNewRelationLabel { Text: "Set New Relation"; Style: (FontSize: 12, TextColor: #888888, RenderBold: true, VerticalAlignment: Center); } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_settings.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_settings.ui index fbb0330a..4f61ed5e 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_settings.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_settings.ui @@ -30,7 +30,7 @@ $C.@PageOverlay { Anchor: (Height: 32, Bottom: 8); LayoutMode: Left; - Label { + Label #EditingLabel { Text: "Editing:"; Style: (FontSize: 13, TextColor: #AAAAAA, VerticalAlignment: Center); } @@ -44,7 +44,7 @@ $C.@PageOverlay { Label { FlexWeight: 1; } - Label { + Label #AdminOverrideLabel { Text: "[Admin Override]"; Style: (FontSize: 10, TextColor: #FFAA00, VerticalAlignment: Center); } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_factions.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_factions.ui index 60b8ecf9..ac491ca5 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_factions.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_factions.ui @@ -23,7 +23,7 @@ $C.@PageOverlay { Anchor: (Height: 38, Bottom: 8); LayoutMode: Left; - Label { + Label #SearchLabel { Text: "Search:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 55); @@ -47,7 +47,7 @@ $C.@PageOverlay { Group { FlexWeight: 1; } - Label { + Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 35); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_info.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_info.ui index 6198cd47..6ced3b95 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_info.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_info.ui @@ -56,7 +56,7 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 16); - Label { + Label #FirstJoinedLabel { Text: "First joined:"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 68); @@ -67,7 +67,7 @@ $C.@PageOverlay { Anchor: (Width: 120); } - Label { + Label #LastOnlineLabel { Text: "Last online:"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 64); @@ -80,7 +80,7 @@ $C.@PageOverlay { Label { FlexWeight: 1; } - Label { + Label #UuidLabel { Text: "UUID:"; Style: (FontSize: 8, TextColor: #444444, VerticalAlignment: Center); Anchor: (Width: 28); @@ -111,7 +111,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 3); - Label { + Label #PowerLabel { Text: "Power"; Style: (FontSize: 8, TextColor: #666666); Anchor: (Height: 12); @@ -137,7 +137,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 3, Right: 3); - Label { + Label #CombatLabel { Text: "Combat"; Style: (FontSize: 8, TextColor: #666666); Anchor: (Height: 12); @@ -160,7 +160,7 @@ $C.@PageOverlay { Style: (FontSize: 13, TextColor: #FF5555, RenderBold: true, VerticalAlignment: Center); } } - Label { + Label #KDLabel { Text: "K / D"; Style: (FontSize: 8, TextColor: #444444); Anchor: (Height: 10); @@ -175,7 +175,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 3, Right: 3); - Label { + Label #KDRLabel { Text: "K/D Ratio"; Style: (FontSize: 8, TextColor: #666666); Anchor: (Height: 12); @@ -200,7 +200,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 3); - Label { + Label #FactionLabel { Text: "Faction"; Style: (FontSize: 8, TextColor: #666666); Anchor: (Height: 12); @@ -258,7 +258,7 @@ $C.@PageOverlay { Anchor: (Height: 16, Bottom: 3); LayoutMode: Left; - Label { + Label #HistoryHeader { Text: "Membership History"; Style: (FontSize: 10, TextColor: #666666, RenderBold: true, VerticalAlignment: Center); } @@ -284,7 +284,7 @@ $C.@PageOverlay { Padding: (Left: 8); // Admin Controls header (aligns with Membership History header) - Label { + Label #AdminControlsHeader { Text: "Admin Controls"; Style: (FontSize: 10, TextColor: #666666, RenderBold: true, VerticalAlignment: Center); Anchor: (Height: 16, Bottom: 3); @@ -302,7 +302,7 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 18, Bottom: 3); - Label { + Label #PowerMgmtHeader { Text: "Power Management"; Style: (FontSize: 10, TextColor: #666666, RenderBold: true, VerticalAlignment: Center); } @@ -359,7 +359,7 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 26); - Label { + Label #MaxLabel { Text: "Max:"; Style: (FontSize: 11, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 33); @@ -392,7 +392,7 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 26); - Label { + Label #CombatSectionHeader { Text: "Combat"; Style: (FontSize: 10, TextColor: #666666, RenderBold: true, VerticalAlignment: Center); } @@ -411,7 +411,7 @@ $C.@PageOverlay { Padding: (Left: 12, Right: 12, Top: 8, Bottom: 8); LayoutMode: Top; - Label { + Label #BypassHeader { Text: "Power Bypass Toggles"; Style: (FontSize: 10, TextColor: #666666, RenderBold: true); Anchor: (Height: 16, Bottom: 3); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_players.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_players.ui index ade05d69..8847051d 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_players.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_players.ui @@ -27,7 +27,7 @@ $C.@PageOverlay { Anchor: (Height: 38, Bottom: 8); LayoutMode: Left; - Label { + Label #SearchLabel { Text: "Search:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 55); @@ -52,7 +52,7 @@ $C.@PageOverlay { Group { FlexWeight: 1; } - Label { + Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 35); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_version.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_version.ui index 5484382c..2fafd968 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_version.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_version.ui @@ -31,7 +31,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 5); - Label { + Label #VersionLabelFactions { Text: "HyperFactions"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -51,7 +51,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5, Right: 5); - Label { + Label #VersionLabelServer { Text: "Hytale Server"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -71,7 +71,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5); - Label { + Label #VersionLabelJava { Text: "Java"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -96,7 +96,7 @@ $C.@PageOverlay { Anchor: (Right: 6); // PERMISSIONS Section - Label { + Label #SectionPermissions { Text: "PERMISSIONS"; Style: (FontSize: 11, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 22, Bottom: 4); @@ -135,7 +135,7 @@ $C.@PageOverlay { } // PLACEHOLDERS Section - Label { + Label #SectionPlaceholders { Text: "PLACEHOLDERS"; Style: (FontSize: 11, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 22, Bottom: 4); @@ -158,7 +158,7 @@ $C.@PageOverlay { } // ECONOMY Section - Label { + Label #SectionEconomy { Text: "ECONOMY"; Style: (FontSize: 11, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 22, Top: 10, Bottom: 4); @@ -180,7 +180,7 @@ $C.@PageOverlay { Anchor: (Left: 6); // PROTECTION Section - Label { + Label #SectionProtection { Text: "PROTECTION"; Style: (FontSize: 11, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 22, Bottom: 4); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_integration_flags.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_integration_flags.ui index a8105d2b..11b53616 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_integration_flags.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_integration_flags.ui @@ -62,7 +62,7 @@ $C.@PageOverlay { Group { Anchor: (Height: 18, Bottom: 4); - Label { + Label #CatGravestones { Text: "Gravestones"; Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); } @@ -93,7 +93,7 @@ $C.@PageOverlay { Group { Anchor: (Height: 16); Padding: (Left: 4, Right: 0, Top: 0, Bottom: 0); - Label { + Label #GravestonesDesc { Text: "When ON, non-owners can loot graves. Owners always can."; Style: (FontSize: 9, TextColor: #666666); } @@ -109,7 +109,7 @@ $C.@PageOverlay { Group { Anchor: (Height: 18, Bottom: 4); - Label { + Label #CatWorldMap { Text: "World Map"; Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); } @@ -162,7 +162,7 @@ $C.@PageOverlay { Group { Anchor: (Height: 24); Padding: (Left: 4, Right: 0, Top: 2, Bottom: 0); - Label { + Label #WorldMapDesc { Text: "Override map hiding for players in this zone. When enabled, select who can see players in this zone."; Style: (FontSize: 9, TextColor: #666666); } @@ -178,7 +178,7 @@ $C.@PageOverlay { Group { Anchor: (Height: 18, Bottom: 4); - Label { + Label #CatEssentials { Text: "HyperEssentials"; Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_map.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_map.ui index f23cb663..2276a793 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_map.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_map.ui @@ -55,7 +55,7 @@ $C.@Container { // Action hints Label #ActionHint { - Text: "Left-click: Claim for zone | Right-click: Unclaim from zone"; + Text: "Left-click: Claim for zone | Right-click: Unclaim from zone"; Style: (FontSize: 11, TextColor: #888888, HorizontalAlignment: Center); Anchor: (Height: 18, Top: 8, Bottom: 5); } @@ -80,13 +80,13 @@ $C.@Container { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #14b8a6); } - Label { Text: " This Zone (Safe)"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendZoneSafe { Text: " This Zone (Safe)"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #a855f7); } - Label { Text: " This Zone (War)"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendZoneWar { Text: " This Zone (War)"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } } @@ -99,13 +99,13 @@ $C.@Container { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #2dd4bf80); } - Label { Text: " Other SafeZone"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendOtherSafe { Text: " Other SafeZone"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #c084fc80); } - Label { Text: " Other WarZone"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendOtherWar { Text: " Other WarZone"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } } @@ -118,13 +118,13 @@ $C.@Container { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #6b7280); } - Label { Text: " Faction Claim"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendFactionClaim { Text: " Faction Claim"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #1e293b); } - Label { Text: " Unclaimed"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendUnclaimed { Text: " Unclaimed"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } } @@ -137,7 +137,7 @@ $C.@Container { LayoutMode: Left; Anchor: (Height: 16); Label { Text: " + "; Style: (FontSize: 10, TextColor: #ffffff, RenderBold: true, VerticalAlignment: Center); Anchor: (Width: 16); } - Label { Text: "You are here"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendYouAreHere { Text: "You are here"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_map_terrain.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_map_terrain.ui index 3ed4fc3a..7ce785a9 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_map_terrain.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_map_terrain.ui @@ -89,25 +89,25 @@ $C.@Container { LayoutMode: Left; Anchor: (Width: 120); Group { Anchor: (Width: 10, Height: 10); Background: (Color: #14b8a6); } - Label { Text: " This Zone (Safe)"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendZoneSafe { Text: " This Zone (Safe)"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Width: 120); Group { Anchor: (Width: 10, Height: 10); Background: (Color: #c084fc); } - Label { Text: " This Zone (War)"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendZoneWar { Text: " This Zone (War)"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Width: 110); Group { Anchor: (Width: 10, Height: 10); Background: (Color: #2dd4bf80); } - Label { Text: " Other SafeZone"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendOtherSafe { Text: " Other SafeZone"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Width: 110); Group { Anchor: (Width: 10, Height: 10); Background: (Color: #c084fc80); } - Label { Text: " Other WarZone"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendOtherWar { Text: " Other WarZone"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } } @@ -120,19 +120,19 @@ $C.@Container { LayoutMode: Left; Anchor: (Width: 120); Group { Anchor: (Width: 10, Height: 10); Background: (Color: #6b7280); } - Label { Text: " Faction Claim"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendFactionClaim { Text: " Faction Claim"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Width: 120); Group { Anchor: (Width: 10, Height: 10); Background: (Color: #00000000); } - Label { Text: " Unclaimed"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendUnclaimed { Text: " Unclaimed"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Width: 110); Label { Text: " + "; Style: (FontSize: 9, TextColor: #ffffff, RenderBold: true, VerticalAlignment: Center); Anchor: (Width: 14); } - Label { Text: "You are here"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendYouAreHere { Text: "You are here"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_properties.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_properties.ui index c804668a..fcb71241 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_properties.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_properties.ui @@ -62,14 +62,14 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Bottom: 12); - Label { + Label #GeneralHeader { Text: "General"; Style: (FontSize: 13, TextColor: #00AAAA, RenderBold: true); Anchor: (Height: 20, Bottom: 4); } // Name subsection - Label { + Label #ZoneNameLabel { Text: "Zone Name"; Style: (FontSize: 11, TextColor: #888888); Anchor: (Height: 16, Bottom: 2); @@ -102,7 +102,7 @@ $C.@PageOverlay { } // Type subsection - Label { + Label #ZoneTypeLabel { Text: "Zone Type"; Style: (FontSize: 11, TextColor: #888888); Anchor: (Height: 16, Bottom: 2); @@ -132,7 +132,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Bottom: 12); - Label { + Label #NotificationsHeader { Text: "Notifications"; Style: (FontSize: 13, TextColor: #00AAAA, RenderBold: true); Anchor: (Height: 20, Bottom: 4); @@ -152,7 +152,7 @@ $C.@PageOverlay { } // Upper title - Label { + Label #UpperTitleLabel { Text: "Upper Title (small text above zone name)"; Style: (FontSize: 11, TextColor: #888888); Anchor: (Height: 16); @@ -191,7 +191,7 @@ $C.@PageOverlay { } // Lower title - Label { + Label #LowerTitleLabel { Text: "Lower Title (large zone name text)"; Style: (FontSize: 11, TextColor: #888888); Anchor: (Height: 16); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_settings.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_settings.ui index 7d74117c..45da9210 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_settings.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_settings.ui @@ -77,14 +77,14 @@ $C.@PageOverlay { Group { Anchor: (Height: 18, Bottom: 0); - Label { + Label #CatCombat { Text: "Combat"; Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); } } Group { Anchor: (Height: 12, Bottom: 4); - Label { + Label #CatCombatSub { Text: "(children only apply when parent ON)"; Style: (FontSize: 8, TextColor: #666666); } @@ -250,7 +250,7 @@ $C.@PageOverlay { Group { Anchor: (Height: 18, Bottom: 4); - Label { + Label #CatDamage { Text: "Damage"; Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); } @@ -350,7 +350,7 @@ $C.@PageOverlay { Group { Anchor: (Height: 18, Bottom: 4); - Label { + Label #CatDeath { Text: "Death"; Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); } @@ -415,14 +415,14 @@ $C.@PageOverlay { Group { Anchor: (Height: 18, Bottom: 0); - Label { + Label #CatBuilding { Text: "Building"; Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); } } Group { Anchor: (Height: 12, Bottom: 4); - Label { + Label #CatBuildingSub { Text: "(children only apply when parent ON)"; Style: (FontSize: 8, TextColor: #666666); } @@ -525,14 +525,14 @@ $C.@PageOverlay { Group { Anchor: (Height: 18, Bottom: 0); - Label { + Label #CatInteraction { Text: "Interaction"; Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); } } Group { Anchor: (Height: 12, Bottom: 4); - Label { + Label #CatInteractionSub { Text: "(children only apply when parent ON)"; Style: (FontSize: 8, TextColor: #666666); } @@ -837,7 +837,7 @@ $C.@PageOverlay { Group { Anchor: (Height: 18, Bottom: 4); - Label { + Label #CatTransport { Text: "Transport"; Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); } @@ -916,7 +916,7 @@ $C.@PageOverlay { Group { Anchor: (Height: 18, Bottom: 4); - Label { + Label #CatItems { Text: "Items"; Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); } @@ -1016,14 +1016,14 @@ $C.@PageOverlay { Group { Anchor: (Height: 18, Bottom: 0); - Label { + Label #CatSpawning { Text: "Mob Spawning"; Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); } } Group { Anchor: (Height: 12, Bottom: 4); - Label { + Label #CatSpawningSub { Text: "(children only apply when parent ON)"; Style: (FontSize: 8, TextColor: #666666); } @@ -1148,14 +1148,14 @@ $C.@PageOverlay { Group { Anchor: (Height: 18, Bottom: 0); - Label { + Label #CatMobClear { Text: "Mob Clearing"; Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); } } Group { Anchor: (Height: 12, Bottom: 4); - Label { + Label #CatMobClearSub { Text: "(children only apply when parent ON)"; Style: (FontSize: 8, TextColor: #666666); } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zones.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zones.ui index bd3323fe..7baadaf5 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zones.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zones.ui @@ -71,7 +71,7 @@ $C.@PageOverlay { Group { FlexWeight: 1; } - Label { + Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 35); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/unclaim_all_confirm.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/unclaim_all_confirm.ui index 2f79e2d2..1bfb3f8f 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/unclaim_all_confirm.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/unclaim_all_confirm.ui @@ -20,7 +20,7 @@ $C.@PageOverlay { LayoutMode: Top; Padding: (Left: 20, Right: 20, Top: 15, Bottom: 15); - Label { + Label #ConfirmMsg1 { Text: "Are you sure you want to unclaim all"; Style: (FontSize: 13, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 22); @@ -32,7 +32,7 @@ $C.@PageOverlay { Anchor: (Height: 22); } - Label { + Label #ConfirmMsg2 { Text: "from"; Style: (FontSize: 13, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 18); @@ -44,7 +44,7 @@ $C.@PageOverlay { Anchor: (Height: 24, Bottom: 8); } - Label { + Label #WarningLabel { Text: "This action cannot be undone!"; Style: (FontSize: 12, TextColor: #AA5555, HorizontalAlignment: Center); Anchor: (Height: 20, Bottom: 15); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/zone_change_type_modal.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/zone_change_type_modal.ui index c6b1bf43..7cf16129 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/zone_change_type_modal.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/zone_change_type_modal.ui @@ -26,7 +26,7 @@ $C.@PageOverlay { Anchor: (Height: 26, Bottom: 6); LayoutMode: Left; - Label { + Label #ZoneLabel { Text: "Zone:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 55); @@ -44,7 +44,7 @@ $C.@PageOverlay { Anchor: (Height: 26, Bottom: 4); LayoutMode: Left; - Label { + Label #CurrentLabel { Text: "Current:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 55); @@ -63,7 +63,7 @@ $C.@PageOverlay { } // Arrow indicator - Label { + Label #WillBecomeLabel { Text: "will become"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center); Anchor: (Height: 18); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/zone_rename_modal.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/zone_rename_modal.ui index 07b37ef9..73a41cf7 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/zone_rename_modal.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/zone_rename_modal.ui @@ -25,7 +25,7 @@ $C.@PageOverlay { Anchor: (Height: 24, Bottom: 10); LayoutMode: Left; - Label { + Label #CurrentLabel { Text: "Current:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 70); @@ -39,7 +39,7 @@ $C.@PageOverlay { } // New name input - Label { + Label #NewNameLabel { Text: "New Name:"; Style: (FontSize: 12, TextColor: #888888); Anchor: (Height: 24, Bottom: 4); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/chunk_map.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/chunk_map.ui index 2693598f..97fe7baa 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/chunk_map.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/chunk_map.ui @@ -14,7 +14,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #MapTitle { @Text = "Territory Map"; } } @@ -66,19 +66,19 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #4ade80); } - Label { Text: " Your Territory"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendYourLabel { Text: " Your Territory"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #60a5fa); } - Label { Text: " Ally Territory"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendAllyLabel { Text: " Ally Territory"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #f87171); } - Label { Text: " Enemy Territory"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendEnemyLabel { Text: " Enemy Territory"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } } @@ -91,13 +91,13 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #fbbf24); } - Label { Text: " Other Faction"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendOtherLabel { Text: " Other Faction"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #1e293b); } - Label { Text: " Wilderness"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendWildernessLabel { Text: " Wilderness"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } } @@ -110,13 +110,13 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #2dd4bf); } - Label { Text: " Safe Zone"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendSafeLabel { Text: " Safe Zone"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Height: 16); Group { Anchor: (Width: 12, Height: 12); Background: (Color: #c084fc); } - Label { Text: " War Zone"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendWarLabel { Text: " War Zone"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } } @@ -129,7 +129,7 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 16); Label { Text: " + "; Style: (FontSize: 10, TextColor: #ffffff, RenderBold: true, VerticalAlignment: Center); Anchor: (Width: 16); } - Label { Text: "You are here"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendYouLabel { Text: "You are here"; Style: (FontSize: 10, TextColor: #cccccc, VerticalAlignment: Center); } } } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/chunk_map_terrain.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/chunk_map_terrain.ui index b1f60bae..25b074a9 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/chunk_map_terrain.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/chunk_map_terrain.ui @@ -14,7 +14,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #MapTitle { @Text = "Territory Map"; } } @@ -75,25 +75,25 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Width: 110); Group { Anchor: (Width: 10, Height: 10); Background: (Color: #4ade80); } - Label { Text: " Your Territory"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendYourLabel { Text: " Your Territory"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Width: 100); Group { Anchor: (Width: 10, Height: 10); Background: (Color: #60a5fa); } - Label { Text: " Ally Territory"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendAllyLabel { Text: " Ally Territory"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Width: 110); Group { Anchor: (Width: 10, Height: 10); Background: (Color: #f87171); } - Label { Text: " Enemy Territory"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendEnemyLabel { Text: " Enemy Territory"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Width: 100); Group { Anchor: (Width: 10, Height: 10); Background: (Color: #fbbf24); } - Label { Text: " Other Faction"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendOtherLabel { Text: " Other Faction"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } } @@ -106,19 +106,19 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Width: 110); Group { Anchor: (Width: 10, Height: 10); Background: (Color: #2dd4bf); } - Label { Text: " Safe Zone"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendSafeLabel { Text: " Safe Zone"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Width: 100); Group { Anchor: (Width: 10, Height: 10); Background: (Color: #c084fc); } - Label { Text: " War Zone"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendWarLabel { Text: " War Zone"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } Group { LayoutMode: Left; Anchor: (Width: 110); Label { Text: " + "; Style: (FontSize: 9, TextColor: #ffffff, RenderBold: true, VerticalAlignment: Center); Anchor: (Width: 14); } - Label { Text: "You are here"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } + Label #LegendYouLabel { Text: "You are here"; Style: (FontSize: 9, TextColor: #cccccc, VerticalAlignment: Center); } } } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_browser.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_browser.ui index 40f034b9..b4a543d1 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_browser.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_browser.ui @@ -13,7 +13,7 @@ $C.@PageOverlay { Anchor: (Width: 700, Height: 500); #Title { - $C.@Title { + $C.@Title #BrowserTitle { @Text = "Browse Factions"; } } @@ -27,7 +27,7 @@ $C.@PageOverlay { Anchor: (Height: 38, Bottom: 8); LayoutMode: Left; - Label { + Label #SearchLabel { Text: "Search:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 55); @@ -52,7 +52,7 @@ $C.@PageOverlay { Group { FlexWeight: 1; } - Label { + Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 35); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_chat.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_chat.ui index 7133ea54..4324a158 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_chat.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_chat.ui @@ -12,7 +12,7 @@ $C.@PageOverlay { Anchor: (Width: 550, Height: 500); #Title { - $C.@Title { + $C.@Title #ChatTitle { @Text = "Faction Chat"; } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_dashboard.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_dashboard.ui index 711e76f1..272502b7 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_dashboard.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_dashboard.ui @@ -13,7 +13,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #DashboardTitle { @Text = "Faction Dashboard"; } } @@ -64,7 +64,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 5); - Label { + Label #PowerLabel { Text: "Power"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -89,7 +89,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5, Right: 5); - Label { + Label #ClaimsLabel { Text: "Claims"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -114,7 +114,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5); - Label { + Label #MembersLabel { Text: "Members"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -145,7 +145,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 5); - Label { + Label #RelationsLabel { Text: "Relations"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -170,7 +170,7 @@ $C.@PageOverlay { FlexWeight: 1; } } - Label { + Label #AllyEnemyLabel { Text: "ally / enemy"; Style: (FontSize: 9, TextColor: #444444, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -185,7 +185,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5, Right: 5); - Label { + Label #StatusLabel { Text: "Status"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -210,7 +210,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5); - Label { + Label #InvitesLabel { Text: "Invites"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -235,7 +235,7 @@ $C.@PageOverlay { FlexWeight: 1; } } - Label { + Label #SentRequestsLabel { Text: "sent / requests"; Style: (FontSize: 9, TextColor: #444444, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -257,7 +257,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 5); - Label { + Label #TreasuryLabel { Text: "Treasury"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -283,7 +283,7 @@ $C.@PageOverlay { Anchor: (Left: 5, Right: 5); Visible: false; - Label { + Label #UpkeepLabel { Text: "Upkeep"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -293,7 +293,7 @@ $C.@PageOverlay { Style: (FontSize: 22, TextColor: #FF5555, RenderBold: true, HorizontalAlignment: Center, VerticalAlignment: Center); FlexWeight: 1; } - Label #UpkeepSubtext { + Label #PerCycleLabel { Text: "per cycle"; Style: (FontSize: 9, TextColor: #888888, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -308,7 +308,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5); - Label { + Label #YourWalletLabel { Text: "Your Wallet"; Style: (FontSize: 10, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 16); @@ -318,7 +318,7 @@ $C.@PageOverlay { Style: (FontSize: 22, TextColor: #AAAAAA, RenderBold: true, HorizontalAlignment: Center, VerticalAlignment: Center); FlexWeight: 1; } - Label { + Label #PersonalBalanceLabel { Text: "personal balance"; Style: (FontSize: 9, TextColor: #444444, HorizontalAlignment: Center, VerticalAlignment: Center); Anchor: (Height: 14); @@ -330,7 +330,7 @@ $C.@PageOverlay { Group { Anchor: (Height: 25, Bottom: 8); - Label { + Label #QuickActionsLabel { Text: "Quick Actions"; Style: (FontSize: 11, TextColor: #666666, RenderBold: true); } @@ -347,7 +347,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 4); - Label { + Label #TeleportLabel { Text: "Teleport"; Style: (FontSize: 9, TextColor: #555555); Anchor: (Height: 14, Bottom: 4); @@ -361,7 +361,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4, Right: 4); - Label { + Label #TerritoryLabel { Text: "Territory"; Style: (FontSize: 9, TextColor: #555555); Anchor: (Height: 14, Bottom: 4); @@ -375,7 +375,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4, Right: 4); - Label { + Label #ChannelLabel { Text: "Channel"; Style: (FontSize: 9, TextColor: #555555); Anchor: (Height: 14, Bottom: 4); @@ -389,7 +389,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4); - Label { + Label #MembershipLabel { Text: "Membership"; Style: (FontSize: 9, TextColor: #555555); Anchor: (Height: 14, Bottom: 4); @@ -408,7 +408,7 @@ $C.@PageOverlay { Anchor: (Height: 25, Bottom: 5); LayoutMode: Left; - Label { + Label #RecentActivityLabel { Text: "Recent Activity"; Style: (FontSize: 11, TextColor: #666666, RenderBold: true); } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_invites.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_invites.ui index a1812230..9f94ccf3 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_invites.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_invites.ui @@ -13,7 +13,7 @@ $C.@PageOverlay { Anchor: (Width: 550, Height: 450); #Title { - $C.@Title { + $C.@Title #InvitesTitle { @Text = "Invites"; } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_leaderboard.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_leaderboard.ui index 906c6ad5..54a07763 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_leaderboard.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_leaderboard.ui @@ -12,7 +12,7 @@ $C.@PageOverlay { Anchor: (Width: 700, Height: 500); #Title { - $C.@Title { + $C.@Title #LeaderboardTitle { @Text = "Faction Leaderboard"; } } @@ -34,7 +34,7 @@ $C.@PageOverlay { Group { FlexWeight: 1; } - Label { + Label #RankByLabel { Text: "Rank by:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 55); @@ -51,12 +51,12 @@ $C.@PageOverlay { LayoutMode: Left; Padding: (Left: 12, Right: 12); - Label { + Label #ColRankLabel { Text: "#"; Style: (FontSize: 10, TextColor: #666666, RenderBold: true, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Width: 35); } - Label { + Label #ColFactionLabel { Text: "Faction"; Style: (FontSize: 10, TextColor: #666666, RenderBold: true, VerticalAlignment: Center); Anchor: (Width: 200); @@ -66,12 +66,12 @@ $C.@PageOverlay { Style: (FontSize: 10, TextColor: #666666, RenderBold: true, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Width: 100); } - Label { + Label #ColClaimsLabel { Text: "Claims"; Style: (FontSize: 10, TextColor: #666666, RenderBold: true, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Width: 70); } - Label { + Label #ColMembersLabel { Text: "Members"; Style: (FontSize: 10, TextColor: #666666, RenderBold: true, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Width: 70); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_members.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_members.ui index 6dc0e610..f6d0339b 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_members.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_members.ui @@ -13,7 +13,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #MembersTitle { @Text = "Members"; } } @@ -28,7 +28,7 @@ $C.@PageOverlay { Anchor: (Height: 38, Bottom: 8); LayoutMode: Left; - Label { + Label #SearchLabel { Text: "Search:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 55); @@ -53,7 +53,7 @@ $C.@PageOverlay { Group { FlexWeight: 1; } - Label { + Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 35); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_modules.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_modules.ui index 81f677ee..d831121c 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_modules.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_modules.ui @@ -13,7 +13,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #ModulesTitle { @Text = "Faction Modules"; } } @@ -27,7 +27,7 @@ $C.@PageOverlay { Group { Anchor: (Height: 35, Bottom: 10); - Label { + Label #ModulesDescription { Text: "Optional features to enhance your faction"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_relations.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_relations.ui index c864760a..7a793b49 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_relations.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_relations.ui @@ -13,7 +13,7 @@ $C.@PageOverlay { Anchor: (Width: 550, Height: 500); #Title { - $C.@Title { + $C.@Title #RelationsTitle { @Text = "Relations"; } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_settings.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_settings.ui index d5f603d5..c99392c0 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_settings.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_settings.ui @@ -15,7 +15,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #SettingsTitle { @Text = "Faction Settings"; } } @@ -38,7 +38,7 @@ $C.@PageOverlay { Padding: (Left: 0, Right: 8, Top: 0, Bottom: 0); // --- General --- - Label { + Label #GeneralHeader { Text: "General"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -59,7 +59,7 @@ $C.@PageOverlay { Anchor: (Height: 32, Bottom: 4); LayoutMode: Left; - Label { + Label #NameLabel { Text: "Name:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 60); @@ -81,7 +81,7 @@ $C.@PageOverlay { Anchor: (Height: 32, Bottom: 4); LayoutMode: Left; - Label { + Label #TagLabel { Text: "Tag:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 60); @@ -103,7 +103,7 @@ $C.@PageOverlay { Anchor: (Height: 32); LayoutMode: Left; - Label { + Label #DescLabel { Text: "Desc:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 60); @@ -122,7 +122,7 @@ $C.@PageOverlay { } // --- Recruitment --- - Label { + Label #RecruitmentHeader { Text: "Recruitment"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -142,7 +142,7 @@ $C.@PageOverlay { Anchor: (Height: 32); LayoutMode: Left; - Label { + Label #StatusLabel { Text: "Status:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 60); @@ -156,7 +156,7 @@ $C.@PageOverlay { } // --- Home Location --- - Label { + Label #HomeLocationHeader { Text: "Home Location"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -176,7 +176,7 @@ $C.@PageOverlay { Anchor: (Height: 28, Bottom: 4); LayoutMode: Left; - Label { + Label #LocationLabel { Text: "Location:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 60); @@ -217,7 +217,7 @@ $C.@PageOverlay { } // --- Optional Features --- - Label { + Label #OptionalFeaturesHeader { Text: "Optional Features"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -237,7 +237,7 @@ $C.@PageOverlay { Anchor: (Height: 32); LayoutMode: Left; - Label { + Label #ModulesDescLabel { Text: "Configure optional modules."; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); FlexWeight: 1; @@ -257,7 +257,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Bottom: 8); - Label { + Label #DangerZoneHeader { Text: "Danger Zone"; Style: (FontSize: 11, TextColor: #FF5555, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -272,7 +272,7 @@ $C.@PageOverlay { Padding: (Left: 12, Right: 12, Top: 8, Bottom: 8); LayoutMode: Top; - Label { + Label #IrreversibleLabel { Text: "This action is irreversible."; Style: (FontSize: 10, TextColor: #AA5555); Anchor: (Height: 18, Bottom: 4); @@ -307,7 +307,7 @@ $C.@PageOverlay { Padding: (Left: 8, Right: 8, Top: 0, Bottom: 0); LayoutMode: Left; - Label { + Label #LockHintLabel { Text: "Some options may be locked by the server and won't accept changes."; Style: (FontSize: 9, TextColor: #555577, VerticalAlignment: Center); FlexWeight: 1; @@ -315,7 +315,7 @@ $C.@PageOverlay { } // ---- TERRITORY PERMISSIONS ---- - Label { + Label #TerritoryPermissionsHeader { Text: "Territory Permissions"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -338,22 +338,22 @@ $C.@PageOverlay { Padding: (Left: 6, Right: 6); Label { Anchor: (Width: 122); } - Label { + Label #ColOutLabel { Text: "Out"; Style: (FontSize: 9, TextColor: #AAAAAA, RenderBold: true); Anchor: (Width: 52); } - Label { + Label #ColAllyLabel { Text: "Ally"; Style: (FontSize: 9, TextColor: #55FF55, RenderBold: true); Anchor: (Width: 52); } - Label { + Label #ColMemLabel { Text: "Mem"; Style: (FontSize: 9, TextColor: #00FFFF, RenderBold: true); Anchor: (Width: 52); } - Label { + Label #ColOffLabel { Text: "Off"; Style: (FontSize: 9, TextColor: #FFD700, RenderBold: true); Anchor: (Width: 52); @@ -361,7 +361,7 @@ $C.@PageOverlay { } // ---- BUILDING category ---- - Label { + Label #BuildingCatLabel { Text: "BUILDING"; Style: (FontSize: 9, TextColor: #666688, RenderBold: true); Anchor: (Height: 16, Bottom: 2); @@ -374,7 +374,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #BreakPermLabel { Text: "Break"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 114); @@ -392,7 +392,7 @@ $C.@PageOverlay { Background: (Color: #111a28); Padding: (Left: 6, Right: 6); - Label { + Label #PlacePermLabel { Text: "Place"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 114); @@ -404,12 +404,12 @@ $C.@PageOverlay { } // ---- INTERACTION category ---- - Label { + Label #InteractionCatLabel { Text: "INTERACTION"; Style: (FontSize: 9, TextColor: #666688, RenderBold: true); Anchor: (Height: 16, Bottom: 2); } - Label { + Label #InteractionHintLabel { Text: "(children disabled when All is off)"; Style: (FontSize: 8, TextColor: #555566); Anchor: (Height: 12, Bottom: 2); @@ -422,7 +422,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #AllPermLabel { Text: "All"; Style: (FontSize: 11, TextColor: #CCCCCC, RenderBold: true, VerticalAlignment: Center); Anchor: (Width: 114); @@ -440,7 +440,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #DoorPermLabel { Text: "Door"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 102); @@ -458,7 +458,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #ChestPermLabel { Text: "Chest"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 102); @@ -476,7 +476,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #BenchPermLabel { Text: "Bench"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 102); @@ -494,7 +494,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #ProcessingPermLabel { Text: "Processing"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 102); @@ -512,7 +512,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #SeatPermLabel { Text: "Seat"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 102); @@ -530,7 +530,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #TransportPermLabel { Text: "Transport"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 102); @@ -542,7 +542,7 @@ $C.@PageOverlay { } // ---- OTHER PERMISSIONS category ---- - Label { + Label #OtherCatLabel { Text: "OTHER"; Style: (FontSize: 9, TextColor: #666688, RenderBold: true); Anchor: (Height: 16, Bottom: 2, Top: 6); @@ -555,7 +555,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #CrateUsePermLabel { Text: "Crate Use"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 114); @@ -573,7 +573,7 @@ $C.@PageOverlay { Background: (Color: #111a28); Padding: (Left: 6, Right: 6); - Label { + Label #NpcTamePermLabel { Text: "NPC Tame"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 114); @@ -591,7 +591,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #PveDamagePermLabel { Text: "PvE Damage"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 114); @@ -617,7 +617,7 @@ $C.@PageOverlay { Padding: (Left: 8, Right: 0, Top: 0, Bottom: 0); // --- Appearance --- - Label { + Label #AppearanceHeader { Text: "Appearance"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -638,7 +638,7 @@ $C.@PageOverlay { Anchor: (Height: 28, Bottom: 4); LayoutMode: Left; - Label { + Label #ColorLabel { Text: "Color:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 42); @@ -671,12 +671,12 @@ $C.@PageOverlay { } // --- Mob Spawning --- - Label { + Label #MobSpawningHeader { Text: "Mob Spawning"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 2); } - Label { + Label #MobSpawningHintLabel { Text: "(children disabled when master is off)"; Style: (FontSize: 8, TextColor: #666666); Anchor: (Height: 12, Bottom: 4); @@ -699,7 +699,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #MobSpawningMasterLabel { Text: "Mob Spawning"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 120); @@ -718,7 +718,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #HostileMobsLabel { Text: "Hostile Mobs"; Style: (FontSize: 10, TextColor: #FF5555, VerticalAlignment: Center); Anchor: (Width: 108); @@ -737,7 +737,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #PassiveMobsLabel { Text: "Passive Mobs"; Style: (FontSize: 10, TextColor: #55FF55, VerticalAlignment: Center); Anchor: (Width: 108); @@ -756,7 +756,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #NeutralMobsLabel { Text: "Neutral Mobs"; Style: (FontSize: 10, TextColor: #FFFF55, VerticalAlignment: Center); Anchor: (Width: 108); @@ -770,7 +770,7 @@ $C.@PageOverlay { } // --- Faction Settings --- - Label { + Label #FactionSettingsHeader { Text: "Faction Settings"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -793,7 +793,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #PvpLabel { Text: "PvP in Territory"; Style: (FontSize: 11, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 120); @@ -817,7 +817,7 @@ $C.@PageOverlay { Background: (Color: #111a28); Padding: (Left: 6, Right: 6); - Label { + Label #OfficersCanEditLabel { Text: "Officers can edit"; Style: (FontSize: 11, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 120); @@ -826,7 +826,7 @@ $C.@PageOverlay { @Text = ""; @Checked = false; Anchor: (Height: 24, Width: 40); } - Label { + Label #LeaderOnlyLabel { Text: "Leader only"; Style: (FontSize: 9, TextColor: #FFD700, VerticalAlignment: Center); FlexWeight: 1; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_treasury.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_treasury.ui index e1bc89ce..3709479e 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_treasury.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_treasury.ui @@ -13,7 +13,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #TreasuryTitle { @Text = "Faction Treasury"; } } @@ -36,7 +36,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 5); - Label { + Label #BalanceLabel { Text: "Balance"; Style: (FontSize: 10, TextColor: #666666); Anchor: (Height: 16); @@ -61,7 +61,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5, Right: 5); - Label { + Label #IncomeLabel { Text: "Income (24h)"; Style: (FontSize: 10, TextColor: #666666); Anchor: (Height: 16); @@ -71,7 +71,7 @@ $C.@PageOverlay { Style: (FontSize: 22, TextColor: #44CC44, RenderBold: true); FlexWeight: 1; } - Label { + Label #IncomeDescLabel { Text: "deposits, transfers in"; Style: (FontSize: 10, TextColor: #888888); Anchor: (Height: 14); @@ -86,7 +86,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 5); - Label { + Label #ExpensesLabel { Text: "Expenses (24h)"; Style: (FontSize: 10, TextColor: #666666); Anchor: (Height: 16); @@ -96,7 +96,7 @@ $C.@PageOverlay { Style: (FontSize: 22, TextColor: #FF5555, RenderBold: true); FlexWeight: 1; } - Label { + Label #ExpensesDescLabel { Text: "withdrawals, transfers out"; Style: (FontSize: 10, TextColor: #888888); Anchor: (Height: 14); @@ -117,7 +117,7 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 18); - Label { + Label #MaintenanceLabel { Text: "MAINTENANCE"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); } @@ -177,7 +177,7 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 16, Bottom: 4); - Label { + Label #RunwayLabel { Text: "Runway:"; Style: (FontSize: 10, TextColor: #888888); Anchor: (Width: 55); @@ -281,7 +281,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 4); - Label { + Label #AddFundsLabel { Text: "Add funds"; Style: (FontSize: 9, TextColor: #555555); Anchor: (Height: 14, Bottom: 4); @@ -300,7 +300,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4, Right: 4); - Label { + Label #TakeFundsLabel { Text: "Take funds"; Style: (FontSize: 9, TextColor: #555555); Anchor: (Height: 14, Bottom: 4); @@ -319,7 +319,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4, Right: 4); - Label { + Label #SendToFactionLabel { Text: "Send to faction"; Style: (FontSize: 9, TextColor: #555555); Anchor: (Height: 14, Bottom: 4); @@ -340,7 +340,7 @@ $C.@PageOverlay { Anchor: (Left: 4); Visible: false; - Label { + Label #TreasuryConfigLabel { Text: "Treasury config"; Style: (FontSize: 9, TextColor: #555555); Anchor: (Height: 14, Bottom: 4); @@ -364,7 +364,7 @@ $C.@PageOverlay { Anchor: (Height: 22); LayoutMode: Left; - Label { + Label #RecentTransactionsLabel { Text: "Recent Transactions"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); FlexWeight: 1; @@ -382,27 +382,27 @@ $C.@PageOverlay { Anchor: (Height: 20); LayoutMode: Left; - Label { + Label #ColDateLabel { Text: "Date"; Style: (FontSize: 10, TextColor: #555555); Anchor: (Width: 100); } - Label { + Label #ColTypeLabel { Text: "Type"; Style: (FontSize: 10, TextColor: #555555); Anchor: (Width: 100); } - Label { + Label #ColByLabel { Text: "By"; Style: (FontSize: 10, TextColor: #555555); Anchor: (Width: 90); } - Label { + Label #ColAmountLabel { Text: "Amount"; Style: (FontSize: 10, TextColor: #555555); Anchor: (Width: 100); } - Label { + Label #ColDetailsLabel { Text: "Details"; Style: (FontSize: 10, TextColor: #555555); FlexWeight: 1; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/logs_viewer.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/logs_viewer.ui index a42d7673..57c9c2a5 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/logs_viewer.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/logs_viewer.ui @@ -34,7 +34,7 @@ $C.@PageOverlay { Group { FlexWeight: 1; } - Label { + Label #FilterLabel { Text: "Filter:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 40); @@ -51,17 +51,17 @@ $C.@PageOverlay { LayoutMode: Left; Padding: (Left: 12, Right: 12); - Label { + Label #ColTimeLabel { Text: "Time"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 90); } - Label { + Label #ColTypeLabel { Text: "Type"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 75); } - Label { + Label #ColMessageLabel { Text: "Message"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); FlexWeight: 1; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/player_info.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/player_info.ui index d099267b..01c05df2 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/player_info.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/player_info.ui @@ -10,7 +10,7 @@ $C.@PageOverlay { Anchor: (Width: 560, Height: 580); #Title { - $C.@Title { + $C.@Title #PageTitle { @Text = "Player Info"; } } @@ -47,7 +47,7 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 18); - Label { + Label #FirstJoinedLabel { Text: "First joined:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 75); @@ -58,7 +58,7 @@ $C.@PageOverlay { Anchor: (Width: 130); } - Label { + Label #LastOnlineLabel { Text: "Last online:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 70); @@ -82,7 +82,7 @@ $C.@PageOverlay { Anchor: (Height: 22); LayoutMode: Left; - Label { + Label #FactionLabel { Text: "Faction:"; Style: (FontSize: 12, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 60); @@ -99,7 +99,7 @@ $C.@PageOverlay { Anchor: (Height: 22); LayoutMode: Left; - Label { + Label #RoleLabel { Text: "Role:"; Style: (FontSize: 12, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 60); @@ -116,7 +116,7 @@ $C.@PageOverlay { Anchor: (Height: 26); LayoutMode: Left; - Label { + Label #JoinedLabel { Text: "Joined:"; Style: (FontSize: 12, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 60); @@ -158,7 +158,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 4); - Label { + Label #PowerHeader { Text: "Power"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 14); @@ -168,7 +168,7 @@ $C.@PageOverlay { Style: (FontSize: 20, TextColor: #FFFFFF, RenderBold: true); FlexWeight: 1; } - Label { + Label #PowerSubtitle { Text: "current / max"; Style: (FontSize: 9, TextColor: #444444); Anchor: (Height: 14); @@ -183,7 +183,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4, Right: 4); - Label { + Label #CombatHeader { Text: "Combat"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 14); @@ -208,7 +208,7 @@ $C.@PageOverlay { FlexWeight: 1; } } - Label { + Label #CombatSubtitle { Text: "kills / deaths"; Style: (FontSize: 9, TextColor: #444444); Anchor: (Height: 14); @@ -223,7 +223,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4); - Label { + Label #KDRHeader { Text: "K/D Ratio"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 14); @@ -259,7 +259,7 @@ $C.@PageOverlay { Anchor: (Height: 20, Bottom: 4); LayoutMode: Left; - Label { + Label #MembershipHistoryLabel { Text: "Membership History"; Style: (FontSize: 11, TextColor: #666666, RenderBold: true); } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/transfer_confirm.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/transfer_confirm.ui index 49874f64..e5c3ec18 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/transfer_confirm.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/transfer_confirm.ui @@ -10,7 +10,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #PageTitle { @Text = "Transfer Leadership"; } } @@ -20,7 +20,7 @@ $C.@PageOverlay { LayoutMode: Top; Padding: (Left: 20, Right: 20, Top: 15, Bottom: 15); - Label { + Label #ConfirmText { Text: "Are you sure you want to transfer leadership to"; Style: (FontSize: 13, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 22); @@ -32,7 +32,7 @@ $C.@PageOverlay { Anchor: (Height: 24, Bottom: 8); } - Label { + Label #WarningText { Text: "You will become an Officer."; Style: (FontSize: 12, TextColor: #FFAA00, HorizontalAlignment: Center); Anchor: (Height: 20, Bottom: 15); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/treasury_settings.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/treasury_settings.ui index 7ea8b772..aafa5b54 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/treasury_settings.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/treasury_settings.ui @@ -10,7 +10,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #TreasurySettingsTitle { @Text = "Treasury Settings"; } } @@ -21,7 +21,7 @@ $C.@PageOverlay { Padding: (Left: 20, Right: 20, Top: 10, Bottom: 10); // === Officer Permissions Section === - Label { + Label #OfficerPermissionsHeader { Text: "OFFICER PERMISSIONS"; Style: (FontSize: 10, TextColor: #00AAAA, RenderBold: true, RenderUppercase: true); Anchor: (Height: 18, Bottom: 4); @@ -61,7 +61,7 @@ $C.@PageOverlay { } // === Limits Section === - Label { + Label #LimitsHeader { Text: "WITHDRAWAL AND TRANSFER LIMITS"; Style: (FontSize: 10, TextColor: #00AAAA, RenderBold: true, RenderUppercase: true); Anchor: (Height: 18, Bottom: 4); @@ -76,7 +76,7 @@ $C.@PageOverlay { Group { LayoutMode: Left; Anchor: (Height: 28, Bottom: 4); - Label { + Label #MaxWithdrawLabel { Text: "Max per withdrawal:"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 200); @@ -90,7 +90,7 @@ $C.@PageOverlay { Group { LayoutMode: Left; Anchor: (Height: 28, Bottom: 4); - Label { + Label #MaxWithdrawPeriodLabel { Text: "Max withdrawals per period:"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 200); @@ -104,7 +104,7 @@ $C.@PageOverlay { Group { LayoutMode: Left; Anchor: (Height: 28, Bottom: 4); - Label { + Label #MaxTransferLabel { Text: "Max per transfer:"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 200); @@ -118,7 +118,7 @@ $C.@PageOverlay { Group { LayoutMode: Left; Anchor: (Height: 28, Bottom: 4); - Label { + Label #MaxTransferPeriodLabel { Text: "Max transfers per period:"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 200); @@ -132,7 +132,7 @@ $C.@PageOverlay { Group { LayoutMode: Left; Anchor: (Height: 28); - Label { + Label #PeriodHoursLabel { Text: "Limit period (hours):"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 200); @@ -144,7 +144,7 @@ $C.@PageOverlay { } } - Label { + Label #NoLimitHintLabel { Text: "Set to 0 for no limit"; Style: (FontSize: 9, TextColor: #555555); Anchor: (Height: 14, Bottom: 10); @@ -156,7 +156,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Bottom: 10); - Label { + Label #UpkeepSettingsHeader { Text: "UPKEEP SETTINGS"; Style: (FontSize: 10, TextColor: #00AAAA, RenderBold: true, RenderUppercase: true); Anchor: (Height: 18, Bottom: 4); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_main.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_main.ui index ecfc68cf..9fc3bd6f 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_main.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_main.ui @@ -119,7 +119,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #PageTitle { @Text = "Help Center"; } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/browse.ui b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/browse.ui index c5fc23b1..6ea3632c 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/browse.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/browse.ui @@ -13,7 +13,7 @@ $C.@PageOverlay { Anchor: (Width: 700, Height: 500); #Title { - $C.@Title { + $C.@Title #PageTitle { @Text = "Browse Factions"; } } @@ -47,7 +47,7 @@ $C.@PageOverlay { Anchor: (Height: 38, Bottom: 8); LayoutMode: Left; - Label { + Label #SearchLabel { Text: "Search:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 55); @@ -66,7 +66,7 @@ $C.@PageOverlay { Group { FlexWeight: 1; } - Label { + Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 35); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/create_faction.ui b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/create_faction.ui index 56083a1b..1c8b528e 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/create_faction.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/create_faction.ui @@ -14,7 +14,7 @@ $C.@PageOverlay { Anchor: (Width: 1000, Height: 700); #Title { - $C.@Title { + $C.@Title #PageTitle { @Text = "Create Your Faction"; } } @@ -35,7 +35,7 @@ $C.@PageOverlay { Padding: (Left: 0, Right: 8, Top: 0, Bottom: 0); // --- PREVIEW --- - Label { + Label #SectionPreview { Text: "Preview"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -55,7 +55,7 @@ $C.@PageOverlay { LayoutMode: Left; Anchor: (Height: 20); - Label { + Label #NamePrefix { Text: "Name: "; Style: (FontSize: 13, TextColor: #AAAAAA); } @@ -73,7 +73,7 @@ $C.@PageOverlay { } // --- BASIC INFO --- - Label { + Label #SectionBasicInfo { Text: "Basic Info"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -89,7 +89,7 @@ $C.@PageOverlay { Anchor: (Height: 130, Bottom: 12); LayoutMode: Top; - Label { + Label #FactionNameLabel { Text: "Faction Name *"; Style: (FontSize: 11, TextColor: #AAAAAA); Anchor: (Height: 16); @@ -98,7 +98,7 @@ $C.@PageOverlay { Anchor: (Height: 32, Bottom: 6); } - Label { + Label #TagLabel { Text: "TAG (2-4 chars, auto if empty)"; Style: (FontSize: 11, TextColor: #AAAAAA); Anchor: (Height: 16); @@ -114,7 +114,7 @@ $C.@PageOverlay { } // --- DETAILS --- - Label { + Label #SectionDetails { Text: "Details"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -129,7 +129,7 @@ $C.@PageOverlay { Padding: (Left: 12, Right: 12, Top: 10, Bottom: 10); LayoutMode: Top; - Label { + Label #DescLabel { Text: "Description (Optional)"; Style: (FontSize: 11, TextColor: #AAAAAA); Anchor: (Height: 16); @@ -138,7 +138,7 @@ $C.@PageOverlay { Anchor: (Height: 50, Bottom: 6); } - Label { + Label #RecruitmentLabel { Text: "Recruitment"; Style: (FontSize: 11, TextColor: #AAAAAA); Anchor: (Height: 16, Bottom: 4); @@ -175,7 +175,7 @@ $C.@PageOverlay { Padding: (Left: 8, Right: 8, Top: 0, Bottom: 0); LayoutMode: Left; - Label { + Label #LockHint { Text: "Some options may be locked by the server and won't accept changes."; Style: (FontSize: 9, TextColor: #555577, VerticalAlignment: Center); FlexWeight: 1; @@ -183,7 +183,7 @@ $C.@PageOverlay { } // ---- TERRITORY PERMISSIONS ---- - Label { + Label #TerritoryPermissionsLabel { Text: "Territory Permissions"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -205,22 +205,22 @@ $C.@PageOverlay { Padding: (Left: 6, Right: 6); Label { Anchor: (Width: 122); } - Label { + Label #ColOut { Text: "Out"; Style: (FontSize: 9, TextColor: #AAAAAA, RenderBold: true); Anchor: (Width: 52); } - Label { + Label #ColAlly { Text: "Ally"; Style: (FontSize: 9, TextColor: #55FF55, RenderBold: true); Anchor: (Width: 52); } - Label { + Label #ColMem { Text: "Mem"; Style: (FontSize: 9, TextColor: #00FFFF, RenderBold: true); Anchor: (Width: 52); } - Label { + Label #ColOff { Text: "Off"; Style: (FontSize: 9, TextColor: #FFD700, RenderBold: true); Anchor: (Width: 52); @@ -228,7 +228,7 @@ $C.@PageOverlay { } // ---- BUILDING category ---- - Label { + Label #CatBuilding { Text: "BUILDING"; Style: (FontSize: 9, TextColor: #666688, RenderBold: true); Anchor: (Height: 16, Bottom: 2); @@ -241,7 +241,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #PermBreak { Text: "Break"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 114); @@ -259,7 +259,7 @@ $C.@PageOverlay { Background: (Color: #111a28); Padding: (Left: 6, Right: 6); - Label { + Label #PermPlace { Text: "Place"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 114); @@ -271,12 +271,12 @@ $C.@PageOverlay { } // ---- INTERACTION category ---- - Label { + Label #CatInteraction { Text: "INTERACTION"; Style: (FontSize: 9, TextColor: #666688, RenderBold: true); Anchor: (Height: 16, Bottom: 2); } - Label { + Label #InteractionHint { Text: "(children disabled when All is off)"; Style: (FontSize: 8, TextColor: #555566); Anchor: (Height: 12, Bottom: 2); @@ -289,7 +289,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #PermAll { Text: "All"; Style: (FontSize: 11, TextColor: #CCCCCC, RenderBold: true, VerticalAlignment: Center); Anchor: (Width: 114); @@ -307,7 +307,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #PermDoor { Text: "Door"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 102); @@ -325,7 +325,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #PermChest { Text: "Chest"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 102); @@ -343,7 +343,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #PermBench { Text: "Bench"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 102); @@ -361,7 +361,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #PermProcessing { Text: "Processing"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 102); @@ -379,7 +379,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #PermSeat { Text: "Seat"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 102); @@ -397,7 +397,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #PermTransport { Text: "Transport"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 102); @@ -409,7 +409,7 @@ $C.@PageOverlay { } // ---- OTHER PERMISSIONS category ---- - Label { + Label #CatOther { Text: "OTHER"; Style: (FontSize: 9, TextColor: #666688, RenderBold: true); Anchor: (Height: 16, Bottom: 2, Top: 6); @@ -422,7 +422,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #PermCrate { Text: "Crate Use"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 114); @@ -440,7 +440,7 @@ $C.@PageOverlay { Background: (Color: #111a28); Padding: (Left: 6, Right: 6); - Label { + Label #PermNpcTame { Text: "NPC Tame"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 114); @@ -458,7 +458,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #PermPve { Text: "PvE Damage"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 114); @@ -484,7 +484,7 @@ $C.@PageOverlay { Padding: (Left: 8, Right: 0, Top: 0, Bottom: 0); // --- FACTION COLOR --- - Label { + Label #SectionFactionColor { Text: "Faction Color"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -506,12 +506,12 @@ $C.@PageOverlay { } // --- MOB SPAWNING --- - Label { + Label #SectionMobSpawning { Text: "Mob Spawning"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 2); } - Label { + Label #MobSpawningHint { Text: "(children disabled when master is off)"; Style: (FontSize: 8, TextColor: #666666); Anchor: (Height: 12, Bottom: 4); @@ -534,7 +534,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #MobSpawningLabel { Text: "Mob Spawning"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 120); @@ -553,7 +553,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #HostileMobsLabel { Text: "Hostile Mobs"; Style: (FontSize: 10, TextColor: #FF5555, VerticalAlignment: Center); Anchor: (Width: 108); @@ -572,7 +572,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #PassiveMobsLabel { Text: "Passive Mobs"; Style: (FontSize: 10, TextColor: #55FF55, VerticalAlignment: Center); Anchor: (Width: 108); @@ -591,7 +591,7 @@ $C.@PageOverlay { Background: (Color: #0a1018); Padding: (Left: 18, Right: 6); - Label { + Label #NeutralMobsLabel { Text: "Neutral Mobs"; Style: (FontSize: 10, TextColor: #FFFF55, VerticalAlignment: Center); Anchor: (Width: 108); @@ -605,7 +605,7 @@ $C.@PageOverlay { } // --- COMBAT --- - Label { + Label #SectionCombat { Text: "Combat"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); Anchor: (Height: 18, Bottom: 4); @@ -627,7 +627,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #PvPLabel { Text: "PvP in Territory"; Style: (FontSize: 11, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 120); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/help.ui b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/help.ui index 5c3290ad..76450572 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/help.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/help.ui @@ -13,7 +13,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #PageTitle { @Text = "Getting Started"; } } @@ -29,37 +29,37 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Height: 120, Bottom: 20); - Label { + Label #WhatTitle { Text: "What Are Factions?"; Style: (FontSize: 13, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 22); } - Label { + Label #WhatDesc1 { Text: "Factions are player-created groups that work together"; Style: (FontSize: 12, TextColor: #CCCCCC); Anchor: (Height: 18); } - Label { + Label #WhatDesc2 { Text: "to claim territory, build bases, and compete."; Style: (FontSize: 12, TextColor: #CCCCCC); Anchor: (Height: 18); } - Label { + Label #WhatBullet1 { Text: "- Protected territory for building"; Style: (FontSize: 11, TextColor: #AAAAAA); Anchor: (Height: 16); } - Label { + Label #WhatBullet2 { Text: "- Teammates to play with"; Style: (FontSize: 11, TextColor: #AAAAAA); Anchor: (Height: 16); } - Label { + Label #WhatBullet3 { Text: "- Access to faction chat and features"; Style: (FontSize: 11, TextColor: #AAAAAA); Anchor: (Height: 16); @@ -71,31 +71,31 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Height: 95, Bottom: 20); - Label { + Label #JoinTitle { Text: "Joining a Faction"; Style: (FontSize: 13, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 22); } - Label { + Label #JoinDesc { Text: "There are several ways to join a faction:"; Style: (FontSize: 12, TextColor: #CCCCCC); Anchor: (Height: 20); } - Label { + Label #JoinBullet1 { Text: "- Browse - Find open factions and click JOIN"; Style: (FontSize: 11, TextColor: #AAAAAA); Anchor: (Height: 16); } - Label { + Label #JoinBullet2 { Text: "- Invites - Accept invitations from officers"; Style: (FontSize: 11, TextColor: #AAAAAA); Anchor: (Height: 16); } - Label { + Label #JoinBullet3 { Text: "- Request - Ask to join invite-only factions"; Style: (FontSize: 11, TextColor: #AAAAAA); Anchor: (Height: 16); @@ -107,25 +107,25 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Height: 80, Bottom: 20); - Label { + Label #CreateTitle { Text: "Creating a Faction"; Style: (FontSize: 13, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 22); } - Label { + Label #CreateDesc { Text: "Go to the Create tab to start your own faction."; Style: (FontSize: 12, TextColor: #CCCCCC); Anchor: (Height: 20); } - Label { + Label #CreateBullet1 { Text: "- Invite and manage members"; Style: (FontSize: 11, TextColor: #AAAAAA); Anchor: (Height: 16); } - Label { + Label #CreateBullet2 { Text: "- Claim and protect territory"; Style: (FontSize: 11, TextColor: #AAAAAA); Anchor: (Height: 16); @@ -137,37 +137,37 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Height: 130, Bottom: 10); - Label { + Label #CmdTitle { Text: "Quick Commands"; Style: (FontSize: 13, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 22); } - Label { + Label #CmdF { Text: "/f - Open faction menu"; Style: (FontSize: 11, TextColor: #FFFF55); Anchor: (Height: 16); } - Label { + Label #CmdFList { Text: "/f list - List all factions"; Style: (FontSize: 11, TextColor: #FFFF55); Anchor: (Height: 16); } - Label { + Label #CmdFJoin { Text: "/f join - Join an open faction"; Style: (FontSize: 11, TextColor: #FFFF55); Anchor: (Height: 16); } - Label { + Label #CmdFCreate { Text: "/f create - Create a new faction"; Style: (FontSize: 11, TextColor: #FFFF55); Anchor: (Height: 16); } - Label { + Label #CmdFHelp { Text: "/f help - Full command list"; Style: (FontSize: 11, TextColor: #FFFF55); Anchor: (Height: 16); @@ -180,7 +180,7 @@ $C.@PageOverlay { Background: (Color: #1a2a3a); Padding: (Left: 10, Right: 10, Top: 10, Bottom: 10); - Label { + Label #TipText { Text: "Tip: Browse factions to find a group that matches you!"; Style: (FontSize: 12, TextColor: #55FF55); } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/invites.ui b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/invites.ui index a5c99b3a..4677a707 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/invites.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/invites.ui @@ -15,7 +15,7 @@ $C.@PageOverlay { Group { LayoutMode: Left; - $C.@Title { + $C.@Title #PageTitle { @Text = "Invites & Requests"; } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/map_readonly.ui b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/map_readonly.ui index 0fe9f2a5..c581c9aa 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/map_readonly.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/map_readonly.ui @@ -15,7 +15,7 @@ $C.@PageOverlay { Group { LayoutMode: Left; - $C.@Title { + $C.@Title #PageTitle { @Text = "Territory Map"; } @@ -58,7 +58,7 @@ $C.@PageOverlay { Anchor: (Height: 60, Top: 10); LayoutMode: Top; - Label { + Label #LegendTitle { Text: "Legend:"; Style: (FontSize: 11, TextColor: #888888); Anchor: (Height: 18); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/shared/description_modal.ui b/src/main/resources/Common/UI/Custom/HyperFactions/shared/description_modal.ui index 965e6e64..61256f9b 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/shared/description_modal.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/shared/description_modal.ui @@ -9,7 +9,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #PageTitle { @Text = "Edit Description"; } } @@ -24,7 +24,7 @@ $C.@PageOverlay { Anchor: (Height: 36, Bottom: 10); LayoutMode: Left; - Label { + Label #CurrentLabel { Text: "Current:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 70); @@ -38,7 +38,7 @@ $C.@PageOverlay { } // New description input - Label { + Label #NewDescLabel { Text: "New Description:"; Style: (FontSize: 12, TextColor: #888888); Anchor: (Height: 24, Bottom: 4); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/shared/disband_confirm.ui b/src/main/resources/Common/UI/Custom/HyperFactions/shared/disband_confirm.ui index 4335c62f..8e44cf30 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/shared/disband_confirm.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/shared/disband_confirm.ui @@ -10,7 +10,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #PageTitle { @Text = "Disband Faction"; } } @@ -20,7 +20,7 @@ $C.@PageOverlay { LayoutMode: Top; Padding: (Left: 20, Right: 20, Top: 15, Bottom: 15); - Label { + Label #ConfirmText { Text: "Are you sure you want to disband"; Style: (FontSize: 13, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 22); @@ -32,7 +32,7 @@ $C.@PageOverlay { Anchor: (Height: 24, Bottom: 8); } - Label { + Label #WarningText { Text: "This action cannot be undone!"; Style: (FontSize: 12, TextColor: #AA5555, HorizontalAlignment: Center); Anchor: (Height: 20, Bottom: 15); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/shared/error_page.ui b/src/main/resources/Common/UI/Custom/HyperFactions/shared/error_page.ui index aca968f8..b7946574 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/shared/error_page.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/shared/error_page.ui @@ -10,7 +10,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #PageTitle { @Text = "Error"; } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/shared/faction_info.ui b/src/main/resources/Common/UI/Custom/HyperFactions/shared/faction_info.ui index 35386344..6d83227c 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/shared/faction_info.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/shared/faction_info.ui @@ -10,7 +10,7 @@ $C.@PageOverlay { Anchor: (Width: 560, Height: 520); #Title { - $C.@Title { + $C.@Title #PageTitle { @Text = "Faction Info"; } } @@ -69,7 +69,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 4); - Label { + Label #PowerHeader { Text: "Power"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 14); @@ -79,7 +79,7 @@ $C.@PageOverlay { Style: (FontSize: 20, TextColor: #44CC44, RenderBold: true); FlexWeight: 1; } - Label { + Label #PowerSubtitle { Text: "current / max"; Style: (FontSize: 9, TextColor: #444444); Anchor: (Height: 14); @@ -94,7 +94,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4, Right: 4); - Label { + Label #ClaimsHeader { Text: "Claims"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 14); @@ -104,7 +104,7 @@ $C.@PageOverlay { Style: (FontSize: 20, TextColor: #FFAA00, RenderBold: true); FlexWeight: 1; } - Label { + Label #ClaimsSubtitle { Text: "claimed / max"; Style: (FontSize: 9, TextColor: #444444); Anchor: (Height: 14); @@ -119,7 +119,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4); - Label { + Label #MembersHeader { Text: "Members"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 14); @@ -150,7 +150,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Right: 4); - Label { + Label #RelationsHeader { Text: "Relations"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 14); @@ -175,7 +175,7 @@ $C.@PageOverlay { FlexWeight: 1; } } - Label { + Label #RelationsSubtitle { Text: "ally / enemy"; Style: (FontSize: 9, TextColor: #444444); Anchor: (Height: 14); @@ -190,7 +190,7 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Left: 4, Right: 4); - Label { + Label #StatusHeader { Text: "Status"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 14); @@ -216,7 +216,7 @@ $C.@PageOverlay { Anchor: (Left: 4); Visible: false; - Label { + Label #TreasuryHeader { Text: "Treasury"; Style: (FontSize: 9, TextColor: #666666); Anchor: (Height: 14); @@ -226,7 +226,7 @@ $C.@PageOverlay { Style: (FontSize: 18, TextColor: #FFD700, RenderBold: true); FlexWeight: 1; } - Label { + Label #TreasurySubtitle { Text: "faction balance"; Style: (FontSize: 9, TextColor: #444444); Anchor: (Height: 14); @@ -247,7 +247,7 @@ $C.@PageOverlay { Padding: (Left: 12, Right: 12, Top: 8, Bottom: 8); LayoutMode: Left; - Label { + Label #LeaderLabel { Text: "Leader:"; Style: (FontSize: 12, TextColor: #FFD700, RenderBold: true, VerticalAlignment: Center); Anchor: (Width: 65); @@ -260,7 +260,7 @@ $C.@PageOverlay { Label { Anchor: (Width: 30); } - Label { + Label #OfficersLabel { Text: "Officers:"; Style: (FontSize: 12, TextColor: #87CEEB, RenderBold: true, VerticalAlignment: Center); Anchor: (Width: 70); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/shared/leader_leave_confirm.ui b/src/main/resources/Common/UI/Custom/HyperFactions/shared/leader_leave_confirm.ui index 60958272..65ef7ba1 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/shared/leader_leave_confirm.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/shared/leader_leave_confirm.ui @@ -10,7 +10,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #PageTitle { @Text = "Leave as Leader"; } } @@ -20,7 +20,7 @@ $C.@PageOverlay { LayoutMode: Top; Padding: (Left: 20, Right: 20, Top: 15, Bottom: 15); - Label { + Label #ConfirmText { Text: "You are leaving"; Style: (FontSize: 13, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 22); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/shared/leave_confirm.ui b/src/main/resources/Common/UI/Custom/HyperFactions/shared/leave_confirm.ui index c3581561..ea731b13 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/shared/leave_confirm.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/shared/leave_confirm.ui @@ -10,7 +10,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #PageTitle { @Text = "Leave Faction"; } } @@ -20,7 +20,7 @@ $C.@PageOverlay { LayoutMode: Top; Padding: (Left: 20, Right: 20, Top: 15, Bottom: 15); - Label { + Label #ConfirmText { Text: "Are you sure you want to leave"; Style: (FontSize: 13, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 22); @@ -32,7 +32,7 @@ $C.@PageOverlay { Anchor: (Height: 24, Bottom: 8); } - Label { + Label #WarningText { Text: "You will lose access to faction territory."; Style: (FontSize: 12, TextColor: #888888, HorizontalAlignment: Center); Anchor: (Height: 20, Bottom: 15); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/shared/player_settings.ui b/src/main/resources/Common/UI/Custom/HyperFactions/shared/player_settings.ui index c9792e7d..233972d8 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/shared/player_settings.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/shared/player_settings.ui @@ -12,7 +12,7 @@ $C.@PageOverlay { Anchor: (Width: 550, Height: 480); #Title { - $C.@Title { + $C.@Title #PageTitle { @Text = "Player Settings"; } } @@ -38,11 +38,20 @@ $C.@PageOverlay { LayoutMode: Top; Anchor: (Bottom: 12); - // Auto-detect checkbox - $C.@CheckBoxWithLabel #AutoDetectCB { - @Text = "Auto-detect from client"; - @Checked = true; + // Auto-detect checkbox + label + Group { + LayoutMode: Left; Anchor: (Height: 28, Bottom: 2); + + $C.@CheckBoxWithLabel #AutoDetectCB { + @Text = ""; + @Checked = true; + Anchor: (Height: 28, Width: 30); + } + Label #AutoDetectLabel { + Text: "Auto-detect from client"; + Style: (FontSize: 12, TextColor: #CCCCCC, VerticalAlignment: Center); + } } Label #AutoDetectDesc { @@ -92,7 +101,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #TerritoryAlertsLabel { Text: "Territory Alerts"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 160); @@ -117,7 +126,7 @@ $C.@PageOverlay { Background: (Color: #111a28); Padding: (Left: 6, Right: 6); - Label { + Label #DeathAnnounceLabel { Text: "Death Broadcasts"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 160); @@ -142,7 +151,7 @@ $C.@PageOverlay { Background: (Color: #0d1520); Padding: (Left: 6, Right: 6); - Label { + Label #PowerNotifLabel { Text: "Power Changes"; Style: (FontSize: 11, TextColor: #CCCCCC, VerticalAlignment: Center); Anchor: (Width: 160); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/shared/rename_modal.ui b/src/main/resources/Common/UI/Custom/HyperFactions/shared/rename_modal.ui index 31923e3e..29cde4e8 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/shared/rename_modal.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/shared/rename_modal.ui @@ -10,7 +10,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #PageTitle { @Text = "Rename Faction"; } } @@ -25,7 +25,7 @@ $C.@PageOverlay { Anchor: (Height: 24, Bottom: 10); LayoutMode: Left; - Label { + Label #CurrentLabel { Text: "Current:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 70); @@ -39,7 +39,7 @@ $C.@PageOverlay { } // New name input - Label { + Label #NewNameLabel { Text: "New Name:"; Style: (FontSize: 12, TextColor: #888888); Anchor: (Height: 24, Bottom: 4); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/shared/tag_modal.ui b/src/main/resources/Common/UI/Custom/HyperFactions/shared/tag_modal.ui index 422454b6..3b051562 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/shared/tag_modal.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/shared/tag_modal.ui @@ -10,7 +10,7 @@ $C.@PageOverlay { #Title { Group { - $C.@Title { + $C.@Title #PageTitle { @Text = "Edit Tag"; } } @@ -25,7 +25,7 @@ $C.@PageOverlay { Anchor: (Height: 28, Bottom: 10); LayoutMode: Left; - Label { + Label #CurrentLabel { Text: "Current:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 70); @@ -39,7 +39,7 @@ $C.@PageOverlay { } // Instructions - Label { + Label #TagInstructions { Text: "Tag (1-5 chars, letters and numbers only):"; Style: (FontSize: 12, TextColor: #888888); Anchor: (Height: 24, Bottom: 4); @@ -51,7 +51,7 @@ $C.@PageOverlay { } // Help text - Label { + Label #TagHelpText { Text: "Tags appear in chat and on the map"; Style: (FontSize: 10, TextColor: #555555, HorizontalAlignment: Center); Anchor: (Height: 16, Bottom: 10); diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions.lang b/src/main/resources/Server/Languages/en-US/hyperfactions.lang index bea46e75..c9c9ab92 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions.lang @@ -17,6 +17,11 @@ common.cancel = Cancel common.confirm = Confirm common.save = Save common.close = Close +common.clear = Clear +common.back = Back +common.leave = Leave +common.transfer = Transfer +common.disband = Disband common.yes = Yes common.no = No common.loading = Loading... diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang index 0e2ccdc9..bf24a7bb 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang @@ -191,6 +191,16 @@ zone_int.no_plugin = (no plugin) zone_int.default = (default) zone_int.custom = (custom) +# Integration flags UI labels +gui.zint_cat_gravestones = Gravestones +gui.zint_gravestones_desc = When ON, non-owners can loot graves. Owners always can. +gui.zint_cat_world_map = World Map +gui.zint_world_map_desc = Override map hiding for players in this zone. When enabled, select who can see players in this zone. +gui.zint_visibility_label = Visibility Level: +gui.zint_cat_essentials = HyperEssentials +gui.zint_reset_defaults = Reset to Defaults +gui.zint_back_to_flags = Back to Flags + # ========== Activity Log ========== log.all_types = All Types log.no_logs = No activity logs matching filters. @@ -220,6 +230,21 @@ zflags.reset_all = Reset all flags to defaults. zflags.reset_failed = Failed to reset flags: {0} zflags.back_to_settings = Back to Settings +# Zone settings UI labels +gui.zset_cat_combat = Combat +gui.zset_cat_damage = Damage +gui.zset_cat_death = Death +gui.zset_cat_building = Building +gui.zset_cat_interaction = Interaction +gui.zset_cat_transport = Transport +gui.zset_cat_items = Items +gui.zset_cat_spawning = Mob Spawning +gui.zset_cat_mob_clear = Mob Clearing +gui.zset_children_hint = (children only apply when parent ON) +gui.zset_reset_defaults = Reset to Defaults +gui.zset_integration_flags = Integration Flags +gui.zset_back_to_zones = Back to Zones + # ========== Zone Properties ========== zprop.current_custom = Current: "{0}" (custom) zprop.current_default = Current: "{0}" (default) @@ -261,3 +286,297 @@ map.unclaim_failed = Failed to unclaim chunk: {0} map.chunk_belongs = This chunk belongs to {0}. map.chunk_faction = This chunk is claimed by a faction. map.chunk_protected = This chunk is in a protected region. + +# ========== GUI Label Keys (for .ui hardcoded text localization) ========== + +# Page Titles +gui.title_dashboard = Admin Dashboard +gui.title_main = Factions Admin +gui.title_actions = Admin: Server Actions +gui.title_factions = Faction Management +gui.title_players = Player Management +gui.title_economy = Admin: Server Economy +gui.title_zones = Zone Management +gui.title_backups = Backups +gui.title_config = Configuration +gui.title_help = Admin Help +gui.title_updates = Updates +gui.title_version = Version and Integrations +gui.title_activity_log = Admin: Activity Log +gui.title_player_info = Admin: Player Info +gui.title_faction_info = Admin: Faction Info +gui.title_faction_settings = Admin: Faction Settings +gui.title_faction_members = Admin: Members +gui.title_faction_relations = Admin: Relations +gui.title_zone_map = Zone Map Editor +gui.title_zone_settings = Admin: Zone Settings +gui.title_zone_properties = Admin: Zone Properties +gui.title_bulk_economy = Bulk Treasury Adjust +gui.title_economy_adjust = Admin: Economy + +# Dashboard labels +gui.dash_server_stats = Server Statistics +gui.dash_factions = Factions +gui.dash_total_members = Total Members +gui.dash_total_claims = Total Claims +gui.dash_zones = Zones +gui.dash_safe_war = safe / war +gui.dash_total_power = Total Power +gui.dash_avg_power = Avg Power/Faction +gui.dash_total_economy = Total Economy +gui.dash_wealthiest = Wealthiest +gui.dash_avg_balance = Avg Balance +gui.dash_protection_bypass = Protection Bypass: + +# Common buttons and labels +gui.search = Search: +gui.sort = Sort: +gui.prev = < Prev +gui.next = Next > +gui.back = Back +gui.done = Done +gui.cancel = Cancel +gui.apply = Apply +gui.set = Set +gui.reset = Reset +gui.coming_soon = Coming Soon +gui.zones_btn = Zones +gui.reload_btn = Reload +gui.all = All +gui.safe = Safe +gui.war = War +gui.create_zone = + Create + +# Actions page labels +gui.act_combat_stats = Combat Statistics +gui.act_combat_desc = Reset kills and deaths for ALL players on the server. This action cannot be undone. +gui.act_reset_kd = Reset All K/D +gui.act_economy = Economy +gui.act_economy_desc = Add or remove money from ALL faction treasuries at once. +gui.act_bulk_adjust = Bulk Add/Remove +gui.act_upkeep_collection = Upkeep Collection +gui.act_upkeep_desc = Manually trigger upkeep collection for all factions right now, regardless of the scheduled timer. +gui.act_trigger_upkeep = Trigger Upkeep + +# Placeholder page labels +gui.backup_heading = Backup Management +gui.backup_desc1 = Create, restore, and manage faction data backups. +gui.backup_desc2 = Automatic backups are saved to the data/backups folder. +gui.config_heading = Configuration Editor +gui.config_desc1 = Configure HyperFactions settings directly from the GUI. +gui.config_desc2 = For now, use /f reload to reload configuration changes. +gui.help_heading = Admin Documentation +gui.help_desc1 = View admin documentation and command reference. +gui.help_desc2 = For help, visit the HyperFactions wiki. +gui.updates_heading = Update Center +gui.updates_desc1 = Check for new versions and view changelogs. +gui.updates_desc2 = Visit the HyperFactions page for the latest updates. + +# Version page labels +gui.ver_hyperfactions = HyperFactions +gui.ver_hytale_server = Hytale Server +gui.ver_java = Java +gui.ver_permissions = PERMISSIONS +gui.ver_placeholders = PLACEHOLDERS +gui.ver_economy_section = ECONOMY +gui.ver_protection = PROTECTION +gui.ver_disabled = Disabled + +# Column headers (shared across pages) +gui.col_faction = Faction +gui.col_balance = Balance +gui.col_members = Members +gui.col_actions = Actions +gui.col_time = Time +gui.col_type = Type +gui.col_message = Message + +# Economy page labels +gui.econ_total_balance = Total Balance +gui.econ_factions = Factions +gui.econ_avg_balance = Avg Balance +gui.econ_in_grace = In Grace +gui.econ_collected = Collected (24h) +gui.econ_next_collection = Next Collection +gui.econ_no_data = No factions with economy data. + +# Activity log labels +gui.log_type = Type: +gui.log_time = Time: +gui.log_player = Player: +gui.log_no_logs = No activity logs matching filters. + +# Player info labels +gui.plr_first_joined = First joined: +gui.plr_last_online = Last online: +gui.plr_uuid = UUID: +gui.plr_faction = Faction: +gui.plr_role = Role: +gui.plr_view_faction = View Faction +gui.plr_power = Power +gui.plr_max_power = Max Power +gui.plr_set_power = Set +gui.plr_reset_power = Reset +gui.plr_set_max = Set +gui.plr_reset_max = Reset +gui.plr_no_power_loss = No Power Loss +gui.plr_no_claim_decay = No Claim Decay +gui.plr_kills = Kills +gui.plr_deaths = Deaths +gui.plr_kdr = K/D Ratio +gui.plr_reset_kd = Reset K/D +gui.plr_kick = Kick +gui.plr_membership_history = Membership History +gui.plr_no_faction_label = Not in a faction +gui.plr_power_management = Power Management +gui.plr_combat_stats = Combat Stats +gui.plr_bypass_flags = Bypass Flags +gui.plr_admin_controls = Admin Controls +gui.plr_kd_subtitle = K / D +gui.plr_max_prefix = Max: +gui.plr_view = View +gui.plr_kick_from_faction = Kick from Faction +gui.plr_set_max_btn = Set Max +gui.plr_combat = Combat + +# Faction info labels +gui.fac_description = Description +gui.fac_power = Power +gui.fac_claims = Claims +gui.fac_members = Members +gui.fac_recruitment = Recruitment +gui.fac_founded = Founded +gui.fac_allies = Allies +gui.fac_enemies = Enemies +gui.fac_raidable = Raidable Status +gui.fac_treasury = Treasury +gui.fac_leader = Leader +gui.fac_officers = Officers +gui.fac_view_members = View Members +gui.fac_view_relations = View Relations +gui.fac_view_settings = Settings +gui.fac_disband = Disband Faction +gui.fac_power_management = Power Management +gui.fac_reset_all_power = Reset All Power +gui.fac_econ_adjust = Adjust Balance +gui.fac_econ_view_log = View Transaction Log +gui.fac_current_max = current / max +gui.fac_claimed_max = claimed / max +gui.fac_relations = Relations +gui.fac_ally_enemy = ally / enemy +gui.fac_status = Status +gui.fac_info = Info +gui.fac_treasury_balance = treasury balance +gui.fac_leadership = Leadership +gui.fac_leader_label = Leader: +gui.fac_officers_label = Officers: +gui.fac_econ_mgmt = Economy Management +gui.fac_danger_zone = Danger Zone +gui.fac_view_treasury = View Treasury + +# Faction settings labels +gui.set_editing = Editing: +gui.set_general = General Settings +gui.set_name = Name +gui.set_tag = Tag +gui.set_description = Description +gui.set_recruitment = Recruitment +gui.set_home = Home Location +gui.set_clear_home = Clear Home +gui.set_disband_faction = Disband Faction +gui.set_faction_color = Faction Color +gui.set_admin_override = [Admin Override] +gui.set_territory_perms = Territory Permissions +gui.set_mob_spawning = Mob Spawning +gui.set_faction_settings = Faction Settings + +# Faction relations labels +gui.rel_subtitle = Manage faction relations (bypasses approval) +gui.rel_set_new = Set New Relation + +# Zone page labels +gui.zone_sort_name = Name +gui.zone_sort_type = Type +gui.zone_sort_chunks = Chunks +gui.zone_sort_world = World +gui.zone_count_format = {0} {1}zones ({2} chunks) + +# Zone map labels +gui.map_zone_chunk = Zone Chunk +gui.map_empty = Empty +gui.map_other_zone = Other Zone +gui.map_faction_claim = Faction Claim +gui.map_protected = Protected +gui.map_your_pos = Your Position +gui.map_click_hint = Click to claim/unclaim chunks +gui.map_legend_zone_safe = This Zone (Safe) +gui.map_legend_zone_war = This Zone (War) +gui.map_legend_other_safe = Other SafeZone +gui.map_legend_other_war = Other WarZone +gui.map_legend_faction = Faction Claim +gui.map_legend_unclaimed = Unclaimed +gui.map_legend_you_here = You are here +gui.map_action_hint = Left-click: Claim for zone | Right-click: Unclaim from zone +gui.map_done = Done + +# Zone properties labels +gui.zprop_general = General +gui.zprop_zone_name = Zone Name +gui.zprop_zone_type = Zone Type +gui.zprop_change_type = Change Type +gui.zprop_notifications = Notifications +gui.zprop_show_entry = Show Entry Notification +gui.zprop_upper_title = Upper Title +gui.zprop_upper_desc = Upper Title (small text above zone name) +gui.zprop_lower_title = Lower Title +gui.zprop_lower_desc = Lower Title (large zone name text) +gui.zprop_edit_flags = Edit Flags +gui.zprop_back_to_zones = Back to Zones +gui.save = Save +gui.clear = Clear + +# Bulk economy labels +gui.bulk_header = Adjust All Faction Treasuries +gui.bulk_factions_label = Factions: +gui.bulk_total_label = Total Balance: +gui.bulk_amount_hint = Amount (positive to add, negative to remove): +gui.bulk_hint = This will apply to every faction with a treasury +gui.bulk_warning_msg = Warning: This action affects ALL factions and cannot be undone. +gui.bulk_apply_all = Apply to All +gui.bulk_operation = Operation +gui.bulk_add = Add +gui.bulk_remove = Remove +gui.bulk_amount = Amount +gui.bulk_warning = This will affect ALL faction treasuries. +gui.bulk_preview = Preview + +# Economy adjust labels +gui.ecadj_header = Adjust Treasury Balance +gui.ecadj_faction_label = Faction: +gui.ecadj_current_balance = Current Balance: +gui.ecadj_amount_hint = Amount (positive to add, negative to deduct): +gui.ecadj_preview_hint = Enter a number to preview the change +gui.ecadj_adjustment = Adjustment: +gui.ecadj_set_balance = Set Balance +gui.ecadj_confirm = Confirm +/- +gui.ecadj_operation = Operation +gui.ecadj_add = Add +gui.ecadj_remove = Remove +gui.ecadj_set_to = Set To +gui.ecadj_amount = Amount +gui.ecadj_new_balance = New Balance: + +# Version page integration labels +gui.ver_hyperperms = HyperPerms +gui.ver_luckperms = LuckPerms +gui.ver_vault = VaultUnlocked +gui.ver_native = Hytale Native +gui.ver_hyperprotect = HyperProtect +gui.ver_orbisguard_mixins = OrbisGuard Mixins +gui.ver_orbisguard_api = OrbisGuard API +gui.ver_mixin_hooks = Mixin Hooks +gui.ver_gravestones = Gravestones +gui.ver_kyuubisoft = KyuubiSoft +gui.ver_placeholder_api = PlaceholderAPI +gui.ver_wiflow_papi = WiFlow PAPI +gui.ver_treasury = Treasury diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index 3229e562..66a595c6 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -28,6 +28,7 @@ help.category.economy = Economy help.category.quick_ref = Quick Reference # ========== Main Menu ========== +main_menu.title = HyperFactions main_menu.section_my_faction = My Faction main_menu.section_get_started = Get Started main_menu.section_territory = Territory @@ -36,14 +37,33 @@ main_menu.section_admin = Admin main_menu.claim_hint = Use /f claim to claim territory. # ========== Faction Info Page ========== +faction_info.title = Faction Info faction_info.no_description = No description set. faction_info.status_open = Open faction_info.status_invite_only = Invite Only faction_info.status_raidable = Raidable faction_info.status_protected = Protected faction_info.officers_more = +{0} more +faction_info.power_header = Power +faction_info.claims_header = Claims +faction_info.members_header = Members +faction_info.relations_header = Relations +faction_info.status_header = Status +faction_info.treasury_header = Treasury +faction_info.current_max = current / max +faction_info.claimed_max = claimed / max +faction_info.ally_enemy = ally / enemy +faction_info.faction_balance = faction balance +faction_info.leader_label = Leader: +faction_info.officers_label = Officers: +faction_info.view_members_btn = View Members +faction_info.relations_btn = Relations +faction_info.back_btn = Back # ========== Rename Modal ========== +rename.title = Rename Faction +rename.current_label = Current: +rename.new_name_label = New Name: rename.no_permission = You don't have permission to rename the faction. rename.enter_name = Please enter a faction name. rename.too_short = Faction name must be at least {0} characters. @@ -53,12 +73,19 @@ rename.name_taken = A faction with that name already exists. rename.success = Faction renamed from {0} to {1}! # ========== Description Modal ========== +desc.title = Edit Description +desc.current_label = Current: +desc.new_desc_label = New Description: desc.no_permission = You don't have permission to edit the description. desc.display_none = (None) desc.cleared = Faction description cleared. desc.updated = Faction description updated! # ========== Tag Modal ========== +tag.title = Edit Tag +tag.current_label = Current: +tag.instructions = Tag (1-5 chars, letters and numbers only): +tag.help_text = Tags appear in chat and on the map tag.no_permission = You don't have permission to edit the tag. tag.display_none = (None) tag.cleared = Faction tag cleared. @@ -70,6 +97,34 @@ tag.tag_taken = A faction with that tag already exists. tag.success = Faction tag set to [{0}]! # ========== Dashboard Page ========== +dashboard.title = Faction Dashboard +dashboard.power_label = Power +dashboard.land_label = Claims +dashboard.members_label = Members +dashboard.online_label = Online +dashboard.allies_label = Allies +dashboard.enemies_label = Enemies +dashboard.relations_label = Relations +dashboard.ally_enemy_label = ally / enemy +dashboard.status_label = Status +dashboard.invites_label = Invites +dashboard.sent_requests_label = sent / requests +dashboard.treasury_label = Treasury +dashboard.upkeep_label = Upkeep +dashboard.per_cycle = per cycle +dashboard.your_wallet = Your Wallet +dashboard.personal_balance = personal balance +dashboard.quick_actions = Quick Actions +dashboard.teleport_label = Teleport +dashboard.territory_label = Territory +dashboard.channel_label = Channel +dashboard.membership_label = Membership +dashboard.recent_activity = Recent Activity +dashboard.view_all = View All +dashboard.income_24h = Income (24h) +dashboard.deposits_transfers_in = deposits, transfers in +dashboard.expenses_24h = Expenses (24h) +dashboard.withdrawals_transfers_out = withdrawals, transfers out dashboard.faction_gone = Your faction no longer exists. dashboard.available = {0} available dashboard.at_risk = At Risk! @@ -107,8 +162,17 @@ common.sort_power = Power common.sort_members = Members common.page_format = {0}/{1} common.own_faction = (You) +common.search = Search: +common.sort = Sort: +common.prev = < Prev +common.next = Next > # ========== Members Page ========== +members.title = Members +members.search_label = Search: +members.sort_label = Sort: +members.prev_btn = < Prev +members.next_btn = Next > members.count = {0} members members.sort_role = Role members.sort_last_online = Last Online @@ -124,15 +188,43 @@ members.kicked = Kicked {0} from the faction. members.kick_failed = Failed to kick: {0} # ========== Browser Page ========== +browser.title = Browse Factions +browser.search_label = Search: +browser.sort_label = Sort: +browser.prev_btn = < Prev +browser.next_btn = Next > browser.sort_name = Name browser.invalid_faction = Invalid faction. # ========== Leaderboard Page ========== +leaderboard.title = Faction Leaderboard +leaderboard.rank_by = Rank by: +leaderboard.col_rank = # +leaderboard.col_faction = Faction +leaderboard.col_claims = Claims +leaderboard.col_members = Members +leaderboard.prev_btn = < Prev +leaderboard.next_btn = Next > leaderboard.sort_kd = K/D leaderboard.sort_territory = Territory leaderboard.sort_balance = Balance # ========== Player Info Page ========== +playerinfo.title = Player Info +playerinfo.first_joined_label = First joined: +playerinfo.last_online_label = Last online: +playerinfo.faction_label = Faction: +playerinfo.role_label = Role: +playerinfo.joined_label_static = Joined: +playerinfo.not_in_faction = Not in a faction +playerinfo.power_header = Power +playerinfo.current_max = current / max +playerinfo.combat_header = Combat +playerinfo.kills_deaths = kills / deaths +playerinfo.kdr_header = K/D Ratio +playerinfo.membership_history = Membership History +playerinfo.view_faction_btn = View Faction +playerinfo.back_btn = Back playerinfo.now = Now playerinfo.history_count = {0} records playerinfo.joined_label = Joined: {0} @@ -146,6 +238,12 @@ playerinfo.reason_kicked = KICKED playerinfo.reason_disbanded = DISBANDED # ========== Relations Page ========== +relations.title = Relations +relations.tab_relations = Relations +relations.tab_pending = Pending +relations.set_relation_btn = + Set Relation +relations.prev_btn = < Prev +relations.next_btn = Next > relations.relation_count = {0} relations relations.request_count = {0} requests relations.type_ally = Ally @@ -173,6 +271,59 @@ relations.power_display = {0} power relations.member_count = {0} members # ========== Settings Page ========== +settings.title = Faction Settings +settings.general = General +settings.name_label = Name: +settings.tag_label = Tag: +settings.desc_label = Desc: +settings.edit_btn = Edit +settings.recruitment = Recruitment +settings.status_label = Status: +settings.home_location = Home Location +settings.location_label = Location: +settings.set_home_btn = Set Home +settings.teleport_btn = Teleport +settings.delete_btn = Delete +settings.optional_features = Optional Features +settings.configure_modules = Configure optional modules. +settings.modules_btn = Modules +settings.danger_zone = Danger Zone +settings.irreversible = This action is irreversible. +settings.disband_btn = Disband Faction +settings.lock_hint = Some options may be locked by the server and won't accept changes. +settings.territory_permissions = Territory Permissions +settings.col_out = Out +settings.col_ally = Ally +settings.col_mem = Mem +settings.col_off = Off +settings.cat_building = BUILDING +settings.perm_break = Break +settings.perm_place = Place +settings.cat_interaction = INTERACTION +settings.interaction_hint = (children disabled when All is off) +settings.perm_all = All +settings.perm_door = Door +settings.perm_chest = Chest +settings.perm_bench = Bench +settings.perm_processing = Processing +settings.perm_seat = Seat +settings.perm_transport = Transport +settings.cat_other = OTHER +settings.perm_crate = Crate Use +settings.perm_npc_tame = NPC Tame +settings.perm_pve = PvE Damage +settings.appearance = Appearance +settings.color_label = Color: +settings.mob_spawning = Mob Spawning +settings.mob_spawning_hint = (children disabled when master is off) +settings.mob_spawning_label = Mob Spawning +settings.hostile_mobs = Hostile Mobs +settings.passive_mobs = Passive Mobs +settings.neutral_mobs = Neutral Mobs +settings.faction_settings = Faction Settings +settings.pvp_in_territory = PvP in Territory +settings.officers_can_edit = Officers can edit +settings.leader_only = Leader only settings.officers_only = Only officers and leaders can change faction settings. settings.display_none = (None) settings.home_not_set = Not set @@ -190,6 +341,10 @@ settings.home_no_set = Your faction does not have a home set. settings.home_deleted = Faction home deleted! # ========== Modules Page ========== +modules.title = Faction Modules +modules.description = Optional features to enhance your faction +modules.configure_btn = Configure +modules.back_btn = < Back to Settings modules.treasury_name = Treasury modules.treasury_desc = Faction bank & economy system modules.raids_name = Raids @@ -207,6 +362,47 @@ modules.disabled = Disabled modules.economy_not_available = Economy features are not available on this server # ========== Treasury Page ========== +treasury.title = Faction Treasury +treasury.balance_label = Balance +treasury.income_24h = Income (24h) +treasury.deposits_transfers_in = deposits, transfers in +treasury.expenses_24h = Expenses (24h) +treasury.withdrawals_transfers_out = withdrawals, transfers out +treasury.maintenance = MAINTENANCE +treasury.runway_label = Runway: +treasury.add_funds = Add funds +treasury.deposit_btn = Deposit +treasury.take_funds = Take funds +treasury.withdraw_btn = Withdraw +treasury.send_to_faction = Send to faction +treasury.transfer_btn = Transfer +treasury.treasury_config = Treasury config +treasury.settings_btn = Settings +treasury.recent_transactions = Recent Transactions +treasury.no_transactions = No transactions yet +treasury.col_date = Date +treasury.col_type = Type +treasury.col_by = By +treasury.col_amount = Amount +treasury.col_details = Details +treasury.pay_now_btn = Pay Now +treasury.cost_7d = 7d: +treasury.cost_14d = 14d: +treasury.cost_30d = 30d: +treasury.settings_title = Treasury Settings +treasury.officer_permissions = OFFICER PERMISSIONS +treasury.allow_withdraw = Allow Officers to Withdraw +treasury.allow_transfer = Allow Officers to Transfer +treasury.limits_section = WITHDRAWAL AND TRANSFER LIMITS +treasury.max_per_withdrawal = Max per withdrawal: +treasury.max_withdrawals_per = Max withdrawals per period: +treasury.max_per_transfer = Max per transfer: +treasury.max_transfers_per = Max transfers per period: +treasury.limit_period = Limit period (hours): +treasury.no_limit_hint = Set to 0 for no limit +treasury.upkeep_settings = UPKEEP SETTINGS +treasury.auto_pay_upkeep = Auto-pay upkeep from treasury +treasury.back_btn = Back treasury.wallet_label = Your wallet: {0} treasury.treasury_label = Treasury balance: {0} treasury.chunks_detail = {0} free + {1} billable chunks @@ -276,6 +472,17 @@ treasury.leader_only_upkeep = Only the leader can change upkeep settings. treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. # ========== Confirmation Pages ========== +confirm.disband_title = Disband Faction +confirm.disband_prompt = Are you sure you want to disband +confirm.disband_warning = This action cannot be undone! +confirm.leave_title = Leave Faction +confirm.leave_prompt = Are you sure you want to leave +confirm.leave_warning = You will lose access to faction territory. +confirm.leader_leave_title = Leave as Leader +confirm.leader_leave_prompt = You are leaving +confirm.transfer_title = Transfer Leadership +confirm.transfer_prompt = Are you sure you want to transfer leadership to +confirm.transfer_warning = You will become an Officer. confirm.disband_not_leader = Only the leader can disband the faction. confirm.disbanded = Faction '{0}' has been disbanded. confirm.disband_failed = Failed to disband faction. @@ -297,11 +504,21 @@ confirm.leadership_transferred = Leadership transferred to {0}. # ========== Logs Viewer Page ========== logs.title = {0} - Activity Logs logs.entry_count = {0} entries +logs.filter_label = Filter: +logs.col_time = Time +logs.col_type = Type +logs.col_message = Message +logs.prev_btn = < Prev +logs.next_btn = Next > logs.all_types = All Types logs.no_logs_type = No logs of this type. logs.no_logs = No activity logs yet. # ========== Chat Page ========== +chat.title = Faction Chat +chat.tab_faction = Faction +chat.tab_ally = Ally +chat.send_btn = Send chat.placeholder = Type a message... chat.no_messages = No messages yet. chat.no_ally_permission = You don't have permission for ally chat. @@ -312,6 +529,11 @@ chat.time_minutes = {0}m chat.time_hours = {0}h # ========== Invites Page ========== +invites.title = Invites +invites.tab_outgoing = Outgoing +invites.tab_requests = Requests +invites.prev_btn = < Prev +invites.next_btn = Next > invites.invite_count = {0} invites invites.request_count = {0} requests invites.invited_by = Invited by: {0} @@ -334,6 +556,16 @@ invites.time_minutes = {0}m invites.time_hours = {0}h # ========== Map Page ========== +map.title = Territory Map +map.action_hint = Left-click: Claim | Right-click: Unclaim +map.legend_your = Your Territory +map.legend_ally = Ally Territory +map.legend_enemy = Enemy Territory +map.legend_other = Other Faction +map.legend_wilderness = Wilderness +map.legend_safe = Safe Zone +map.legend_war = War Zone +map.legend_you = You are here map.position = Your Position: Chunk ({0}, {1}) map.legend_protected = Protected map.claim_stats = Claims: {0}/{1} ({2} Available) @@ -366,6 +598,18 @@ map.overclaim_has_power = This faction has enough power to defend their territor map.overclaim_max = You have reached your maximum claim limit. map.overclaim_failed = Failed to overclaim chunk. # ========== Create Faction Page ========== +create.title = Create Your Faction +create.section_preview = Preview +create.section_basic_info = Basic Info +create.section_details = Details +create.name_prefix = Name: +create.faction_name_label = Faction Name * +create.tag_label = TAG (2-4 chars, auto if empty) +create.desc_label = Description (Optional) +create.recruitment_label = Recruitment +create.section_faction_color = Faction Color +create.section_combat = Combat +create.create_btn = Create Faction create.preview_name = Your Faction Name create.leader_prefix = Leader: {0} create.enter_name = Please enter a faction name. @@ -381,6 +625,19 @@ create.invalid_name = Invalid faction name. create.create_failed = Could not create faction. # ========== New Player Pages ========== +newplayer.browse_title = Browse Factions +newplayer.invites_title = Invites & Requests +newplayer.map_title = Territory Map +newplayer.view_only_badge = View Only Mode +newplayer.legend_label = Legend: +newplayer.legend_safezone = SafeZone +newplayer.legend_warzone = WarZone +newplayer.legend_faction = Faction +newplayer.legend_wilderness = Wilderness +newplayer.search_label = Search: +newplayer.sort_label = Sort: +newplayer.prev_btn = < Prev +newplayer.next_btn = Next > newplayer.pending_count = {0} pending newplayer.received_header = RECEIVED INVITES ({0}) newplayer.requests_header = YOUR REQUESTS ({0}) @@ -439,3 +696,29 @@ player_settings.power_notifications_desc = Show messages when your power changes player_settings.language_changed = Language changed to {0} player_settings.pref_enabled = {0} enabled player_settings.pref_disabled = {0} disabled + +# ========== Help Pages ========== +help.center_title = Help Center +help.getting_started_title = Getting Started +help.what_are_factions_title = What Are Factions? +help.what_are_factions_1 = Factions are player-created groups that work together +help.what_are_factions_2 = to claim territory, build bases, and compete. +help.what_are_factions_bullet_1 = - Protected territory for building +help.what_are_factions_bullet_2 = - Teammates to play with +help.what_are_factions_bullet_3 = - Access to faction chat and features +help.joining_title = Joining a Faction +help.joining_desc = There are several ways to join a faction: +help.joining_bullet_1 = - Browse - Find open factions and click JOIN +help.joining_bullet_2 = - Invites - Accept invitations from officers +help.joining_bullet_3 = - Request - Ask to join invite-only factions +help.creating_title = Creating a Faction +help.creating_desc = Go to the Create tab to start your own faction. +help.creating_bullet_1 = - Invite and manage members +help.creating_bullet_2 = - Claim and protect territory +help.commands_title = Quick Commands +help.cmd_f = /f - Open faction menu +help.cmd_f_list = /f list - List all factions +help.cmd_f_join = /f join - Join an open faction +help.cmd_f_create = /f create - Create a new faction +help.cmd_f_help = /f help - Full command list +help.tip = Tip: Browse factions to find a group that matches you! diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions.lang index abccd262..8f7d943b 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions.lang @@ -17,6 +17,11 @@ common.cancel = Cancelar common.confirm = Confirmar common.save = Guardar common.close = Cerrar +common.clear = Limpiar +common.back = Volver +common.leave = Salir +common.transfer = Transferir +common.disband = Disolver common.yes = Si common.no = No common.loading = Cargando... diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang index 80931a67..b62770d9 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang @@ -191,6 +191,16 @@ zone_int.no_plugin = (sin plugin) zone_int.default = (por defecto) zone_int.custom = (personalizado) +# Etiquetas de interfaz de flags de integracion +gui.zint_cat_gravestones = Tumbas +gui.zint_gravestones_desc = Cuando esta EN, otros jugadores pueden saquear tumbas. Los duenos siempre pueden. +gui.zint_cat_world_map = Mapa del Mundo +gui.zint_world_map_desc = Sobrescribir ocultamiento en mapa para jugadores en esta zona. Cuando esta habilitado, selecciona quien puede ver jugadores en esta zona. +gui.zint_visibility_label = Nivel de Visibilidad: +gui.zint_cat_essentials = HyperEssentials +gui.zint_reset_defaults = Restablecer Valores +gui.zint_back_to_flags = Volver a Flags + # ========== Registro de Actividad ========== log.all_types = Todos los Tipos log.no_logs = No hay registros de actividad que coincidan con los filtros. @@ -220,6 +230,21 @@ zflags.reset_all = Todos los flags reiniciados a valores por defecto. zflags.reset_failed = No se pudieron reiniciar los flags: {0} zflags.back_to_settings = Volver a Ajustes +# Etiquetas de interfaz de ajustes de zona +gui.zset_cat_combat = Combate +gui.zset_cat_damage = Dano +gui.zset_cat_death = Muerte +gui.zset_cat_building = Construccion +gui.zset_cat_interaction = Interaccion +gui.zset_cat_transport = Transporte +gui.zset_cat_items = Objetos +gui.zset_cat_spawning = Aparicion de Mobs +gui.zset_cat_mob_clear = Limpieza de Mobs +gui.zset_children_hint = (hijos solo aplican cuando el padre esta EN) +gui.zset_reset_defaults = Restablecer Valores +gui.zset_integration_flags = Flags de Integracion +gui.zset_back_to_zones = Volver a Zonas + # ========== Propiedades de Zona ========== zprop.current_custom = Actual: "{0}" (personalizado) zprop.current_default = Actual: "{0}" (por defecto) @@ -261,3 +286,297 @@ map.unclaim_failed = No se pudo desreclamar el chunk: {0} map.chunk_belongs = Este chunk pertenece a {0}. map.chunk_faction = Este chunk esta reclamado por una faccion. map.chunk_protected = Este chunk esta en una region protegida. + +# ========== Claves de Etiquetas GUI (localizacion de texto en .ui) ========== + +# Titulos de Pagina +gui.title_dashboard = Panel de Admin +gui.title_main = Admin de Facciones +gui.title_actions = Admin: Acciones del Servidor +gui.title_factions = Gestion de Facciones +gui.title_players = Gestion de Jugadores +gui.title_economy = Admin: Economia del Servidor +gui.title_zones = Gestion de Zonas +gui.title_backups = Respaldos +gui.title_config = Configuracion +gui.title_help = Ayuda de Admin +gui.title_updates = Actualizaciones +gui.title_version = Version e Integraciones +gui.title_activity_log = Admin: Registro de Actividad +gui.title_player_info = Admin: Info del Jugador +gui.title_faction_info = Admin: Info de Faccion +gui.title_faction_settings = Admin: Ajustes de Faccion +gui.title_faction_members = Admin: Miembros +gui.title_faction_relations = Admin: Relaciones +gui.title_zone_map = Editor de Mapa de Zona +gui.title_zone_settings = Admin: Ajustes de Zona +gui.title_zone_properties = Admin: Propiedades de Zona +gui.title_bulk_economy = Ajuste Masivo de Tesoreria +gui.title_economy_adjust = Admin: Economia + +# Etiquetas del Panel +gui.dash_server_stats = Estadisticas del Servidor +gui.dash_factions = Facciones +gui.dash_total_members = Total Miembros +gui.dash_total_claims = Total Reclamos +gui.dash_zones = Zonas +gui.dash_safe_war = segura / guerra +gui.dash_total_power = Poder Total +gui.dash_avg_power = Poder Prom/Faccion +gui.dash_total_economy = Economia Total +gui.dash_wealthiest = Mas Rica +gui.dash_avg_balance = Saldo Promedio +gui.dash_protection_bypass = Bypass de Proteccion: + +# Botones y etiquetas comunes +gui.search = Buscar: +gui.sort = Ordenar: +gui.prev = < Anterior +gui.next = Siguiente > +gui.back = Volver +gui.done = Listo +gui.cancel = Cancelar +gui.apply = Aplicar +gui.set = Establecer +gui.reset = Reiniciar +gui.coming_soon = Proximamente +gui.zones_btn = Zonas +gui.reload_btn = Recargar +gui.all = Todas +gui.safe = Segura +gui.war = Guerra +gui.create_zone = + Crear + +# Etiquetas de pagina de acciones +gui.act_combat_stats = Estadisticas de Combate +gui.act_combat_desc = Reiniciar muertes y asesinatos para TODOS los jugadores del servidor. Esta accion no se puede deshacer. +gui.act_reset_kd = Reiniciar Todos K/D +gui.act_economy = Economia +gui.act_economy_desc = Agregar o quitar dinero de TODAS las tesorerias de facciones a la vez. +gui.act_bulk_adjust = Agregar/Quitar Masivo +gui.act_upkeep_collection = Cobro de Mantenimiento +gui.act_upkeep_desc = Ejecutar manualmente el cobro de mantenimiento para todas las facciones ahora, sin importar el temporizador programado. +gui.act_trigger_upkeep = Ejecutar Mantenimiento + +# Etiquetas de paginas placeholder +gui.backup_heading = Gestion de Respaldos +gui.backup_desc1 = Crear, restaurar y gestionar respaldos de datos de facciones. +gui.backup_desc2 = Los respaldos automaticos se guardan en la carpeta data/backups. +gui.config_heading = Editor de Configuracion +gui.config_desc1 = Configurar los ajustes de HyperFactions directamente desde la GUI. +gui.config_desc2 = Por ahora, usa /f reload para recargar los cambios de configuracion. +gui.help_heading = Documentacion de Admin +gui.help_desc1 = Ver documentacion de admin y referencia de comandos. +gui.help_desc2 = Para ayuda, visita la wiki de HyperFactions. +gui.updates_heading = Centro de Actualizaciones +gui.updates_desc1 = Buscar nuevas versiones y ver changelogs. +gui.updates_desc2 = Visita la pagina de HyperFactions para las ultimas actualizaciones. + +# Etiquetas de pagina de version +gui.ver_hyperfactions = HyperFactions +gui.ver_hytale_server = Servidor Hytale +gui.ver_java = Java +gui.ver_permissions = PERMISOS +gui.ver_placeholders = PLACEHOLDERS +gui.ver_economy_section = ECONOMIA +gui.ver_protection = PROTECCION +gui.ver_disabled = Desactivado + +# Encabezados de columna (compartidos entre paginas) +gui.col_faction = Faccion +gui.col_balance = Saldo +gui.col_members = Miembros +gui.col_actions = Acciones +gui.col_time = Hora +gui.col_type = Tipo +gui.col_message = Mensaje + +# Etiquetas de pagina de economia +gui.econ_total_balance = Saldo Total +gui.econ_factions = Facciones +gui.econ_avg_balance = Saldo Promedio +gui.econ_in_grace = En Gracia +gui.econ_collected = Cobrado (24h) +gui.econ_next_collection = Proximo Cobro +gui.econ_no_data = No hay facciones con datos economicos. + +# Etiquetas de registro de actividad +gui.log_type = Tipo: +gui.log_time = Hora: +gui.log_player = Jugador: +gui.log_no_logs = No hay registros de actividad que coincidan con los filtros. + +# Etiquetas de info de jugador +gui.plr_first_joined = Primera conexion: +gui.plr_last_online = Ultima conexion: +gui.plr_uuid = UUID: +gui.plr_faction = Faccion: +gui.plr_role = Rol: +gui.plr_view_faction = Ver Faccion +gui.plr_power = Poder +gui.plr_max_power = Poder Maximo +gui.plr_set_power = Establecer +gui.plr_reset_power = Reiniciar +gui.plr_set_max = Establecer +gui.plr_reset_max = Reiniciar +gui.plr_no_power_loss = Sin Perdida de Poder +gui.plr_no_claim_decay = Sin Decaimiento de Reclamos +gui.plr_kills = Asesinatos +gui.plr_deaths = Muertes +gui.plr_kdr = Ratio K/D +gui.plr_reset_kd = Reiniciar K/D +gui.plr_kick = Expulsar +gui.plr_membership_history = Historial de Membresia +gui.plr_no_faction_label = No esta en una faccion +gui.plr_power_management = Gestion de Poder +gui.plr_combat_stats = Estadisticas de Combate +gui.plr_bypass_flags = Flags de Bypass +gui.plr_admin_controls = Controles de Admin +gui.plr_kd_subtitle = K / D +gui.plr_max_prefix = Max: +gui.plr_view = Ver +gui.plr_kick_from_faction = Expulsar de Faccion +gui.plr_set_max_btn = Establecer Max +gui.plr_combat = Combate + +# Etiquetas de info de faccion +gui.fac_description = Descripcion +gui.fac_power = Poder +gui.fac_claims = Reclamos +gui.fac_members = Miembros +gui.fac_recruitment = Reclutamiento +gui.fac_founded = Fundada +gui.fac_allies = Aliados +gui.fac_enemies = Enemigos +gui.fac_raidable = Estado de Vulnerabilidad +gui.fac_treasury = Tesoreria +gui.fac_leader = Lider +gui.fac_officers = Oficiales +gui.fac_view_members = Ver Miembros +gui.fac_view_relations = Ver Relaciones +gui.fac_view_settings = Ajustes +gui.fac_disband = Disolver Faccion +gui.fac_power_management = Gestion de Poder +gui.fac_reset_all_power = Reiniciar Todo el Poder +gui.fac_econ_adjust = Ajustar Saldo +gui.fac_econ_view_log = Ver Registro de Transacciones +gui.fac_current_max = actual / max +gui.fac_claimed_max = reclamado / max +gui.fac_relations = Relaciones +gui.fac_ally_enemy = aliado / enemigo +gui.fac_status = Estado +gui.fac_info = Info +gui.fac_treasury_balance = saldo de tesoreria +gui.fac_leadership = Liderazgo +gui.fac_leader_label = Lider: +gui.fac_officers_label = Oficiales: +gui.fac_econ_mgmt = Gestion de Economia +gui.fac_danger_zone = Zona de Peligro +gui.fac_view_treasury = Ver Tesoreria + +# Etiquetas de ajustes de faccion +gui.set_editing = Editando: +gui.set_general = Ajustes Generales +gui.set_name = Nombre +gui.set_tag = Etiqueta +gui.set_description = Descripcion +gui.set_recruitment = Reclutamiento +gui.set_home = Ubicacion del Hogar +gui.set_clear_home = Limpiar Hogar +gui.set_disband_faction = Disolver Faccion +gui.set_faction_color = Color de Faccion +gui.set_admin_override = [Override de Admin] +gui.set_territory_perms = Permisos de Territorio +gui.set_mob_spawning = Generacion de Mobs +gui.set_faction_settings = Ajustes de Faccion + +# Etiquetas de relaciones de faccion +gui.rel_subtitle = Gestionar relaciones de faccion (sin aprobacion) +gui.rel_set_new = Establecer Nueva Relacion + +# Etiquetas de pagina de zonas +gui.zone_sort_name = Nombre +gui.zone_sort_type = Tipo +gui.zone_sort_chunks = Chunks +gui.zone_sort_world = Mundo +gui.zone_count_format = {0} {1}zonas ({2} chunks) + +# Etiquetas de mapa de zona +gui.map_zone_chunk = Chunk de Zona +gui.map_empty = Vacio +gui.map_other_zone = Otra Zona +gui.map_faction_claim = Reclamo de Faccion +gui.map_protected = Protegido +gui.map_your_pos = Tu Posicion +gui.map_click_hint = Clic para reclamar/desreclamar chunks +gui.map_legend_zone_safe = Esta Zona (Segura) +gui.map_legend_zone_war = Esta Zona (Guerra) +gui.map_legend_other_safe = Otra Zona Segura +gui.map_legend_other_war = Otra Zona de Guerra +gui.map_legend_faction = Reclamo de Faccion +gui.map_legend_unclaimed = Sin Reclamar +gui.map_legend_you_here = Estas aqui +gui.map_action_hint = Clic izq: Reclamar para zona | Clic der: Desreclamar de zona +gui.map_done = Listo + +# Etiquetas de propiedades de zona +gui.zprop_general = General +gui.zprop_zone_name = Nombre de Zona +gui.zprop_zone_type = Tipo de Zona +gui.zprop_change_type = Cambiar Tipo +gui.zprop_notifications = Notificaciones +gui.zprop_show_entry = Mostrar Notificacion de Entrada +gui.zprop_upper_title = Titulo Superior +gui.zprop_upper_desc = Titulo Superior (texto pequeno sobre nombre de zona) +gui.zprop_lower_title = Titulo Inferior +gui.zprop_lower_desc = Titulo Inferior (texto grande del nombre de zona) +gui.zprop_edit_flags = Editar Flags +gui.zprop_back_to_zones = Volver a Zonas +gui.save = Guardar +gui.clear = Limpiar + +# Etiquetas de economia masiva +gui.bulk_header = Ajustar Todas las Tesorerias +gui.bulk_factions_label = Facciones: +gui.bulk_total_label = Saldo Total: +gui.bulk_amount_hint = Cantidad (positivo para agregar, negativo para quitar): +gui.bulk_hint = Esto se aplicara a cada faccion con tesoreria +gui.bulk_warning_msg = Advertencia: Esta accion afecta TODAS las facciones y no se puede deshacer. +gui.bulk_apply_all = Aplicar a Todas +gui.bulk_operation = Operacion +gui.bulk_add = Agregar +gui.bulk_remove = Quitar +gui.bulk_amount = Cantidad +gui.bulk_warning = Esto afectara TODAS las tesorerias de facciones. +gui.bulk_preview = Vista Previa + +# Etiquetas de ajuste de economia +gui.ecadj_header = Ajustar Saldo de Tesoreria +gui.ecadj_faction_label = Faccion: +gui.ecadj_current_balance = Saldo Actual: +gui.ecadj_amount_hint = Cantidad (positivo para agregar, negativo para deducir): +gui.ecadj_preview_hint = Ingresa un numero para previsualizar el cambio +gui.ecadj_adjustment = Ajuste: +gui.ecadj_set_balance = Establecer Saldo +gui.ecadj_confirm = Confirmar +/- +gui.ecadj_operation = Operacion +gui.ecadj_add = Agregar +gui.ecadj_remove = Quitar +gui.ecadj_set_to = Establecer En +gui.ecadj_amount = Cantidad +gui.ecadj_new_balance = Nuevo Saldo: + +# Etiquetas de integraciones en pagina de version +gui.ver_hyperperms = HyperPerms +gui.ver_luckperms = LuckPerms +gui.ver_vault = VaultUnlocked +gui.ver_native = Hytale Nativo +gui.ver_hyperprotect = HyperProtect +gui.ver_orbisguard_mixins = OrbisGuard Mixins +gui.ver_orbisguard_api = OrbisGuard API +gui.ver_mixin_hooks = Mixin Hooks +gui.ver_gravestones = Gravestones +gui.ver_kyuubisoft = KyuubiSoft +gui.ver_placeholder_api = PlaceholderAPI +gui.ver_wiflow_papi = WiFlow PAPI +gui.ver_treasury = Tesoreria diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang index 2fa3285c..86283a10 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang @@ -28,6 +28,7 @@ help.category.economy = Economia help.category.quick_ref = Referencia Rapida # ========== Menu Principal ========== +main_menu.title = HyperFactions main_menu.section_my_faction = Mi Faccion main_menu.section_get_started = Comenzar main_menu.section_territory = Territorio @@ -36,14 +37,33 @@ main_menu.section_admin = Admin main_menu.claim_hint = Usa /f claim para reclamar territorio. # ========== Pagina de Info de Faccion ========== +faction_info.title = Info de Faccion faction_info.no_description = Sin descripcion. faction_info.status_open = Abierta faction_info.status_invite_only = Solo Invitacion faction_info.status_raidable = Vulnerable faction_info.status_protected = Protegida faction_info.officers_more = +{0} mas +faction_info.power_header = Poder +faction_info.claims_header = Reclamos +faction_info.members_header = Miembros +faction_info.relations_header = Relaciones +faction_info.status_header = Estado +faction_info.treasury_header = Tesoreria +faction_info.current_max = actual / max +faction_info.claimed_max = reclamados / max +faction_info.ally_enemy = aliado / enemigo +faction_info.faction_balance = saldo de faccion +faction_info.leader_label = Lider: +faction_info.officers_label = Oficiales: +faction_info.view_members_btn = Ver Miembros +faction_info.relations_btn = Relaciones +faction_info.back_btn = Volver # ========== Modal de Renombrar ========== +rename.title = Renombrar Faccion +rename.current_label = Actual: +rename.new_name_label = Nuevo Nombre: rename.no_permission = No tienes permiso para renombrar la faccion. rename.enter_name = Ingresa un nombre para la faccion. rename.too_short = El nombre de faccion debe tener al menos {0} caracteres. @@ -53,12 +73,19 @@ rename.name_taken = Ya existe una faccion con ese nombre. rename.success = Faccion renombrada de {0} a {1}! # ========== Modal de Descripcion ========== +desc.title = Editar Descripcion +desc.current_label = Actual: +desc.new_desc_label = Nueva Descripcion: desc.no_permission = No tienes permiso para editar la descripcion. desc.display_none = (Ninguna) desc.cleared = Descripcion de la faccion borrada. desc.updated = Descripcion de la faccion actualizada! # ========== Modal de Etiqueta ========== +tag.title = Editar Etiqueta +tag.current_label = Actual: +tag.instructions = Etiqueta (1-5 caracteres, solo letras y numeros): +tag.help_text = Las etiquetas aparecen en el chat y en el mapa tag.no_permission = No tienes permiso para editar la etiqueta. tag.display_none = (Ninguna) tag.cleared = Etiqueta de la faccion borrada. @@ -70,6 +97,34 @@ tag.tag_taken = Ya existe una faccion con esa etiqueta. tag.success = Etiqueta de faccion establecida a [{0}]! # ========== Pagina del Panel ========== +dashboard.title = Panel de Faccion +dashboard.power_label = Poder +dashboard.land_label = Reclamos +dashboard.members_label = Miembros +dashboard.online_label = Conectados +dashboard.allies_label = Aliados +dashboard.enemies_label = Enemigos +dashboard.relations_label = Relaciones +dashboard.ally_enemy_label = aliado / enemigo +dashboard.status_label = Estado +dashboard.invites_label = Invitaciones +dashboard.sent_requests_label = enviadas / solicitudes +dashboard.treasury_label = Tesoreria +dashboard.upkeep_label = Mantenimiento +dashboard.per_cycle = por ciclo +dashboard.your_wallet = Tu Billetera +dashboard.personal_balance = saldo personal +dashboard.quick_actions = Acciones Rapidas +dashboard.teleport_label = Teletransporte +dashboard.territory_label = Territorio +dashboard.channel_label = Canal +dashboard.membership_label = Membresia +dashboard.recent_activity = Actividad Reciente +dashboard.view_all = Ver Todo +dashboard.income_24h = Ingresos (24h) +dashboard.deposits_transfers_in = depositos, transferencias entrantes +dashboard.expenses_24h = Gastos (24h) +dashboard.withdrawals_transfers_out = retiros, transferencias salientes dashboard.faction_gone = Tu faccion ya no existe. dashboard.available = {0} disponibles dashboard.at_risk = En riesgo! @@ -107,8 +162,17 @@ common.sort_power = Poder common.sort_members = Miembros common.page_format = {0}/{1} common.own_faction = (Tu) +common.search = Buscar: +common.sort = Ordenar: +common.prev = < Anterior +common.next = Siguiente > # ========== Pagina de Miembros ========== +members.title = Miembros +members.search_label = Buscar: +members.sort_label = Ordenar: +members.prev_btn = < Anterior +members.next_btn = Siguiente > members.count = {0} miembros members.sort_role = Rol members.sort_last_online = Ultima Conexion @@ -124,15 +188,43 @@ members.kicked = {0} expulsado de la faccion. members.kick_failed = No se pudo expulsar: {0} # ========== Pagina del Explorador ========== +browser.title = Explorar Facciones +browser.search_label = Buscar: +browser.sort_label = Ordenar: +browser.prev_btn = < Anterior +browser.next_btn = Siguiente > browser.sort_name = Nombre browser.invalid_faction = Faccion invalida. # ========== Pagina de Clasificacion ========== +leaderboard.title = Clasificacion de Facciones +leaderboard.rank_by = Clasificar por: +leaderboard.col_rank = # +leaderboard.col_faction = Faccion +leaderboard.col_claims = Reclamos +leaderboard.col_members = Miembros +leaderboard.prev_btn = < Anterior +leaderboard.next_btn = Siguiente > leaderboard.sort_kd = K/D leaderboard.sort_territory = Territorio leaderboard.sort_balance = Saldo # ========== Pagina de Info de Jugador ========== +playerinfo.title = Info de Jugador +playerinfo.first_joined_label = Primera conexion: +playerinfo.last_online_label = Ultima conexion: +playerinfo.faction_label = Faccion: +playerinfo.role_label = Rol: +playerinfo.joined_label_static = Ingreso: +playerinfo.not_in_faction = No esta en una faccion +playerinfo.power_header = Poder +playerinfo.current_max = actual / max +playerinfo.combat_header = Combate +playerinfo.kills_deaths = muertes / asesinatos +playerinfo.kdr_header = Ratio K/D +playerinfo.membership_history = Historial de Membresia +playerinfo.view_faction_btn = Ver Faccion +playerinfo.back_btn = Volver playerinfo.now = Ahora playerinfo.history_count = {0} registros playerinfo.joined_label = Ingreso: {0} @@ -146,6 +238,12 @@ playerinfo.reason_kicked = EXPULSADO playerinfo.reason_disbanded = DISUELTA # ========== Pagina de Relaciones ========== +relations.title = Relaciones +relations.tab_relations = Relaciones +relations.tab_pending = Pendientes +relations.set_relation_btn = + Establecer Relacion +relations.prev_btn = < Anterior +relations.next_btn = Siguiente > relations.relation_count = {0} relaciones relations.request_count = {0} solicitudes relations.type_ally = Aliado @@ -173,6 +271,59 @@ relations.power_display = {0} poder relations.member_count = {0} miembros # ========== Pagina de Ajustes ========== +settings.title = Ajustes de Faccion +settings.general = General +settings.name_label = Nombre: +settings.tag_label = Etiqueta: +settings.desc_label = Desc: +settings.edit_btn = Editar +settings.recruitment = Reclutamiento +settings.status_label = Estado: +settings.home_location = Ubicacion del Hogar +settings.location_label = Ubicacion: +settings.set_home_btn = Fijar Hogar +settings.teleport_btn = Teletransportar +settings.delete_btn = Eliminar +settings.optional_features = Funciones Opcionales +settings.configure_modules = Configurar modulos opcionales. +settings.modules_btn = Modulos +settings.danger_zone = Zona de Peligro +settings.irreversible = Esta accion es irreversible. +settings.disband_btn = Disolver Faccion +settings.lock_hint = Algunas opciones pueden estar bloqueadas por el servidor y no aceptaran cambios. +settings.territory_permissions = Permisos de Territorio +settings.col_out = Ext +settings.col_ally = Ali +settings.col_mem = Mie +settings.col_off = Ofi +settings.cat_building = CONSTRUCCION +settings.perm_break = Romper +settings.perm_place = Colocar +settings.cat_interaction = INTERACCION +settings.interaction_hint = (hijos desactivados cuando Todo esta apagado) +settings.perm_all = Todo +settings.perm_door = Puerta +settings.perm_chest = Cofre +settings.perm_bench = Banco +settings.perm_processing = Procesamiento +settings.perm_seat = Asiento +settings.perm_transport = Transporte +settings.cat_other = OTROS +settings.perm_crate = Uso de Caja +settings.perm_npc_tame = Domar NPC +settings.perm_pve = Dano PvE +settings.appearance = Apariencia +settings.color_label = Color: +settings.mob_spawning = Generacion de Mobs +settings.mob_spawning_hint = (hijos desactivados cuando el maestro esta apagado) +settings.mob_spawning_label = Generacion de Mobs +settings.hostile_mobs = Mobs Hostiles +settings.passive_mobs = Mobs Pasivos +settings.neutral_mobs = Mobs Neutrales +settings.faction_settings = Ajustes de Faccion +settings.pvp_in_territory = PvP en Territorio +settings.officers_can_edit = Oficiales pueden editar +settings.leader_only = Solo lider settings.officers_only = Solo oficiales y lideres pueden cambiar los ajustes de la faccion. settings.display_none = (Ninguna) settings.home_not_set = Sin establecer @@ -190,6 +341,10 @@ settings.home_no_set = Tu faccion no tiene un hogar establecido. settings.home_deleted = Hogar de la faccion eliminado! # ========== Pagina de Modulos ========== +modules.title = Modulos de Faccion +modules.description = Funciones opcionales para mejorar tu faccion +modules.configure_btn = Configurar +modules.back_btn = < Volver a Ajustes modules.treasury_name = Tesoreria modules.treasury_desc = Banco y sistema economico de la faccion modules.raids_name = Raids @@ -207,6 +362,47 @@ modules.disabled = Desactivado modules.economy_not_available = Las funciones de economia no estan disponibles en este servidor # ========== Pagina de Tesoreria ========== +treasury.title = Tesoreria de Faccion +treasury.balance_label = Saldo +treasury.income_24h = Ingresos (24h) +treasury.deposits_transfers_in = depositos, transferencias entrantes +treasury.expenses_24h = Gastos (24h) +treasury.withdrawals_transfers_out = retiros, transferencias salientes +treasury.maintenance = MANTENIMIENTO +treasury.runway_label = Duracion: +treasury.add_funds = Agregar fondos +treasury.deposit_btn = Depositar +treasury.take_funds = Retirar fondos +treasury.withdraw_btn = Retirar +treasury.send_to_faction = Enviar a faccion +treasury.transfer_btn = Transferir +treasury.treasury_config = Config. tesoreria +treasury.settings_btn = Ajustes +treasury.recent_transactions = Transacciones Recientes +treasury.no_transactions = Sin transacciones aun +treasury.col_date = Fecha +treasury.col_type = Tipo +treasury.col_by = Por +treasury.col_amount = Monto +treasury.col_details = Detalles +treasury.pay_now_btn = Pagar Ahora +treasury.cost_7d = 7d: +treasury.cost_14d = 14d: +treasury.cost_30d = 30d: +treasury.settings_title = Ajustes de Tesoreria +treasury.officer_permissions = PERMISOS DE OFICIALES +treasury.allow_withdraw = Permitir a Oficiales Retirar +treasury.allow_transfer = Permitir a Oficiales Transferir +treasury.limits_section = LIMITES DE RETIRO Y TRANSFERENCIA +treasury.max_per_withdrawal = Max por retiro: +treasury.max_withdrawals_per = Max retiros por periodo: +treasury.max_per_transfer = Max por transferencia: +treasury.max_transfers_per = Max transferencias por periodo: +treasury.limit_period = Periodo de limite (horas): +treasury.no_limit_hint = Usar 0 para sin limite +treasury.upkeep_settings = AJUSTES DE MANTENIMIENTO +treasury.auto_pay_upkeep = Pago automatico de mantenimiento desde tesoreria +treasury.back_btn = Volver treasury.wallet_label = Tu billetera: {0} treasury.treasury_label = Saldo de tesoreria: {0} treasury.chunks_detail = {0} gratis + {1} chunks facturables @@ -276,6 +472,17 @@ treasury.leader_only_upkeep = Solo el lider puede cambiar los ajustes de manteni treasury.invalid_limit = Numero invalido en los campos de limite. Usa 0 para ilimitado. # ========== Paginas de Confirmacion ========== +confirm.disband_title = Disolver Faccion +confirm.disband_prompt = Estas seguro de que quieres disolver +confirm.disband_warning = Esta accion no se puede deshacer! +confirm.leave_title = Salir de la Faccion +confirm.leave_prompt = Estas seguro de que quieres salir de +confirm.leave_warning = Perderas acceso al territorio de la faccion. +confirm.leader_leave_title = Salir como Lider +confirm.leader_leave_prompt = Estas saliendo de +confirm.transfer_title = Transferir Liderazgo +confirm.transfer_prompt = Estas seguro de que quieres transferir el liderazgo a +confirm.transfer_warning = Te convertiras en Oficial. confirm.disband_not_leader = Solo el lider puede disolver la faccion. confirm.disbanded = La faccion '{0}' ha sido disuelta. confirm.disband_failed = No se pudo disolver la faccion. @@ -302,6 +509,10 @@ logs.no_logs_type = No hay registros de este tipo. logs.no_logs = No hay registros de actividad aun. # ========== Pagina de Chat ========== +chat.title = Chat de Faccion +chat.tab_faction = Faccion +chat.tab_ally = Aliado +chat.send_btn = Enviar chat.placeholder = Escribe un mensaje... chat.no_messages = No hay mensajes aun. chat.no_ally_permission = No tienes permiso para el chat de aliados. @@ -312,6 +523,11 @@ chat.time_minutes = {0}m chat.time_hours = {0}h # ========== Pagina de Invitaciones ========== +invites.title = Invitaciones +invites.tab_outgoing = Salientes +invites.tab_requests = Solicitudes +invites.prev_btn = < Anterior +invites.next_btn = Siguiente > invites.invite_count = {0} invitaciones invites.request_count = {0} solicitudes invites.invited_by = Invitado por: {0} @@ -334,6 +550,16 @@ invites.time_minutes = {0}m invites.time_hours = {0}h # ========== Pagina del Mapa ========== +map.title = Mapa de Territorio +map.action_hint = Clic izquierdo: Reclamar | Clic derecho: Desreclamar +map.legend_your = Tu Territorio +map.legend_ally = Territorio Aliado +map.legend_enemy = Territorio Enemigo +map.legend_other = Otra Faccion +map.legend_wilderness = Naturaleza +map.legend_safe = Zona Segura +map.legend_war = Zona de Guerra +map.legend_you = Estas aqui map.position = Tu Posicion: Chunk ({0}, {1}) map.legend_protected = Protegido map.claim_stats = Reclamos: {0}/{1} ({2} Disponibles) @@ -366,6 +592,18 @@ map.overclaim_has_power = Esta faccion tiene suficiente poder para defender su t map.overclaim_max = Has alcanzado tu limite maximo de reclamos. map.overclaim_failed = No se pudo sobrereclamar el chunk. # ========== Pagina de Crear Faccion ========== +create.title = Crea Tu Faccion +create.section_preview = Vista Previa +create.section_basic_info = Info Basica +create.section_details = Detalles +create.name_prefix = Nombre: +create.faction_name_label = Nombre de Faccion * +create.tag_label = ETIQUETA (2-4 caracteres, automatica si vacia) +create.desc_label = Descripcion (Opcional) +create.recruitment_label = Reclutamiento +create.section_faction_color = Color de Faccion +create.section_combat = Combate +create.create_btn = Crear Faccion create.preview_name = Nombre de Tu Faccion create.leader_prefix = Lider: {0} create.enter_name = Ingresa un nombre para la faccion. @@ -381,6 +619,19 @@ create.invalid_name = Nombre de faccion invalido. create.create_failed = No se pudo crear la faccion. # ========== Paginas de Nuevo Jugador ========== +newplayer.browse_title = Explorar Facciones +newplayer.invites_title = Invitaciones y Solicitudes +newplayer.map_title = Mapa de Territorio +newplayer.view_only_badge = Solo Vista +newplayer.legend_label = Leyenda: +newplayer.legend_safezone = Zona Segura +newplayer.legend_warzone = Zona de Guerra +newplayer.legend_faction = Faccion +newplayer.legend_wilderness = Naturaleza +newplayer.search_label = Buscar: +newplayer.sort_label = Ordenar: +newplayer.prev_btn = < Anterior +newplayer.next_btn = Siguiente > newplayer.pending_count = {0} pendientes newplayer.received_header = INVITACIONES RECIBIDAS ({0}) newplayer.requests_header = TUS SOLICITUDES ({0}) @@ -439,3 +690,29 @@ player_settings.power_notifications_desc = Mostrar mensajes cuando tu poder camb player_settings.language_changed = Idioma cambiado a {0} player_settings.pref_enabled = {0} activado player_settings.pref_disabled = {0} desactivado + +# ========== Paginas de Ayuda ========== +help.center_title = Centro de Ayuda +help.getting_started_title = Primeros Pasos +help.what_are_factions_title = Que son las Facciones? +help.what_are_factions_1 = Las facciones son grupos creados por jugadores que trabajan juntos +help.what_are_factions_2 = para reclamar territorio, construir bases y competir. +help.what_are_factions_bullet_1 = - Territorio protegido para construir +help.what_are_factions_bullet_2 = - Companeros de equipo para jugar +help.what_are_factions_bullet_3 = - Acceso al chat y funciones de faccion +help.joining_title = Unirse a una Faccion +help.joining_desc = Hay varias formas de unirse a una faccion: +help.joining_bullet_1 = - Explorar - Encuentra facciones abiertas y haz clic en UNIRSE +help.joining_bullet_2 = - Invitaciones - Acepta invitaciones de oficiales +help.joining_bullet_3 = - Solicitar - Pide unirte a facciones de solo invitacion +help.creating_title = Crear una Faccion +help.creating_desc = Ve a la pestana Crear para iniciar tu propia faccion. +help.creating_bullet_1 = - Invita y administra miembros +help.creating_bullet_2 = - Reclama y protege territorio +help.commands_title = Comandos Rapidos +help.cmd_f = /f - Abrir menu de faccion +help.cmd_f_list = /f list - Listar todas las facciones +help.cmd_f_join = /f join - Unirse a una faccion abierta +help.cmd_f_create = /f create - Crear una nueva faccion +help.cmd_f_help = /f help - Lista completa de comandos +help.tip = Consejo: Explora facciones para encontrar un grupo que se adapte a ti! From 9bc2c0f9b0d4fc3f9fea3af744844d8c188ca62a Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 20:22:01 -0700 Subject: [PATCH 23/55] feat: localize admin zone wizard, unclaim confirm, and type modal pages Add i18n support for remaining admin pages: zone creation wizard, zone type change modal, and unclaim-all confirmation page. Fix duplicate GUI_CANCEL constant in MessageKeys. --- .../page/AdminUnclaimAllConfirmPage.java | 8 +++ .../com/hyperfactions/util/MessageKeys.java | 53 ++++++++++++++++++ .../HyperFactions/admin/create_zone_wizard.ui | 32 +++++------ .../admin/zone_change_type_modal.ui | 10 ++-- .../Languages/en-US/hyperfactions_admin.lang | 56 +++++++++++++++++++ .../Languages/es-ES/hyperfactions_admin.lang | 56 +++++++++++++++++++ 6 files changed, 194 insertions(+), 21 deletions(-) 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 a9a70e39..6c5d1fa6 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminUnclaimAllConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminUnclaimAllConfirmPage.java @@ -63,6 +63,14 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.UNCLAIM_ALL_CONFIRM); + // Localize labels + cmd.set("#Title.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)); + // Set faction info cmd.set("#FactionName.Text", factionName); cmd.set("#ClaimCount.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.CHUNKS_SUFFIX, claimCount)); diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index f4807177..4e1046b4 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -2068,6 +2068,59 @@ public static final class AdminGui { 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"; + private AdminGui() {} } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/create_zone_wizard.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/create_zone_wizard.ui index 8a334a82..cda68e4d 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/create_zone_wizard.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/create_zone_wizard.ui @@ -61,7 +61,7 @@ $C.@Container { Background: (Color: #1a2a3a); Padding: (Left: 12, Right: 12, Top: 10, Bottom: 10); - Label { + Label #ZoneTypeHeader { Text: "Zone Type"; Style: (FontSize: 11, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 14, Bottom: 8); @@ -76,7 +76,7 @@ $C.@Container { LayoutMode: Top; FlexWeight: 1; - Label { + Label #SafeZoneDesc { Text: "Protected, no PvP"; Style: (FontSize: 10, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 16, Bottom: 4); @@ -95,7 +95,7 @@ $C.@Container { LayoutMode: Top; FlexWeight: 1; - Label { + Label #WarZoneDesc { Text: "Combat, PvP enabled"; Style: (FontSize: 10, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 16, Bottom: 4); @@ -119,13 +119,13 @@ $C.@Container { Background: (Color: #1a2a3a); Padding: (Left: 12, Right: 12, Top: 10, Bottom: 10); - Label { + Label #ZoneNameHeader { Text: "Zone Name"; Style: (FontSize: 11, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 14, Bottom: 6); } - Label { + Label #ZoneNameDesc { Text: "Enter a unique name for the zone"; Style: (FontSize: 10, TextColor: #AAAAAA); Anchor: (Height: 16, Bottom: 6); @@ -151,7 +151,7 @@ $C.@Container { Background: (Color: #1a2a3a); Padding: (Left: 12, Right: 12, Top: 10, Bottom: 10); - Label { + Label #ClaimMethodHeader { Text: "Claiming Method"; Style: (FontSize: 11, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 14, Bottom: 8); @@ -166,7 +166,7 @@ $C.@Container { LayoutMode: Top; FlexWeight: 1; - Label { + Label #MethodNoneDesc { Text: "Create empty zone"; Style: (FontSize: 9, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 14, Bottom: 2); @@ -184,7 +184,7 @@ $C.@Container { LayoutMode: Top; FlexWeight: 1; - Label { + Label #MethodSingleDesc { Text: "Your current chunk"; Style: (FontSize: 9, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 14, Bottom: 2); @@ -206,7 +206,7 @@ $C.@Container { LayoutMode: Top; FlexWeight: 1; - Label { + Label #MethodCircleDesc { Text: "Circular area"; Style: (FontSize: 9, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 14, Bottom: 2); @@ -224,7 +224,7 @@ $C.@Container { LayoutMode: Top; FlexWeight: 1; - Label { + Label #MethodSquareDesc { Text: "Square area"; Style: (FontSize: 9, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 14, Bottom: 2); @@ -242,7 +242,7 @@ $C.@Container { LayoutMode: Top; Anchor: (Height: 44); - Label { + Label #MethodMapDesc { Text: "Interactive chunk editor"; Style: (FontSize: 9, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 14, Bottom: 2); @@ -273,7 +273,7 @@ $C.@Container { LayoutMode: Left; Anchor: (Height: 14, Bottom: 8); - Label { + Label #RadiusHeader { Text: "Radius"; Style: (FontSize: 11, TextColor: #00FFFF, RenderBold: true); } @@ -325,7 +325,7 @@ $C.@Container { LayoutMode: Left; Anchor: (Height: 28); - Label { + Label #CustomRadiusLabel { Text: "Custom (1-50):"; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); Anchor: (Width: 85); @@ -349,7 +349,7 @@ $C.@Container { Background: (Color: #1a2a3a); Padding: (Left: 12, Right: 12, Top: 10, Bottom: 10); - Label { + Label #FlagsHeader { Text: "Flags"; Style: (FontSize: 11, TextColor: #00FFFF, RenderBold: true); Anchor: (Height: 14, Bottom: 8); @@ -363,7 +363,7 @@ $C.@Container { LayoutMode: Top; FlexWeight: 1; - Label { + Label #FlagsDefaultsDesc { Text: "Based on zone type"; Style: (FontSize: 9, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 14, Bottom: 2); @@ -381,7 +381,7 @@ $C.@Container { LayoutMode: Top; FlexWeight: 1; - Label { + Label #FlagsCustomizeDesc { Text: "Open settings after"; Style: (FontSize: 9, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 14, Bottom: 2); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/zone_change_type_modal.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/zone_change_type_modal.ui index 7cf16129..b4927a13 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/zone_change_type_modal.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/zone_change_type_modal.ui @@ -74,7 +74,7 @@ $C.@PageOverlay { Anchor: (Height: 26, Bottom: 8); LayoutMode: Left; - Label { + Label #NewLabel { Text: "New:"; Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center); Anchor: (Width: 55); @@ -99,12 +99,12 @@ $C.@PageOverlay { Padding: (Left: 10, Right: 10, Top: 6, Bottom: 6); LayoutMode: Top; - Label { + Label #WarningLine1 { Text: "Different zone types have different default flag values."; Style: (FontSize: 10, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 12); } - Label { + Label #WarningLine2 { Text: "Choose how to handle existing flag settings:"; Style: (FontSize: 10, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 12); @@ -123,7 +123,7 @@ $C.@PageOverlay { LayoutMode: Top; FlexWeight: 1; - Label { + Label #KeepFlagsDesc { Text: "Keep custom overrides"; Style: (FontSize: 10, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 16, Bottom: 4); @@ -143,7 +143,7 @@ $C.@PageOverlay { LayoutMode: Top; FlexWeight: 1; - Label { + Label #ResetFlagsDesc { Text: "Use new type defaults"; Style: (FontSize: 10, TextColor: #AAAAAA, HorizontalAlignment: Center); Anchor: (Height: 16, Bottom: 4); diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang index bf24a7bb..c2f94217 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang @@ -580,3 +580,59 @@ gui.ver_kyuubisoft = KyuubiSoft gui.ver_placeholder_api = PlaceholderAPI gui.ver_wiflow_papi = WiFlow PAPI gui.ver_treasury = Treasury + +# Unclaim all confirm modal labels +gui.unclaim_title = Unclaim All Territory +gui.unclaim_confirm_msg1 = Are you sure you want to unclaim all +gui.unclaim_confirm_msg2 = from +gui.unclaim_warning = This action cannot be undone! +gui.unclaim_all = Unclaim All + +# Zone rename modal labels +gui.zren_title = Rename Zone +gui.zren_current = Current: +gui.zren_new_name = New Name: + +# Zone change type modal labels +gui.ztype_title = Change Zone Type +gui.ztype_zone_label = Zone: +gui.ztype_current = Current: +gui.ztype_will_become = will become +gui.ztype_new = New: +gui.ztype_warning1 = Different zone types have different default flag values. +gui.ztype_warning2 = Choose how to handle existing flag settings: +gui.ztype_keep_desc = Keep custom overrides +gui.ztype_keep_flags = Keep Flags +gui.ztype_reset_desc = Use new type defaults +gui.ztype_reset_flags = Reset Flags + +# Create zone wizard labels +gui.czw_title = Create Zone +gui.czw_back = < Back +gui.czw_create = Create Zone +gui.czw_zone_type = Zone Type +gui.czw_safe_desc = Protected, no PvP +gui.czw_war_desc = Combat, PvP enabled +gui.czw_zone_name = Zone Name +gui.czw_name_desc = Enter a unique name for the zone +gui.czw_claim_method = Claiming Method +gui.czw_method_none_desc = Create empty zone +gui.czw_method_none = No claims +gui.czw_method_single_desc = Your current chunk +gui.czw_method_single = Single chunk +gui.czw_method_circle_desc = Circular area +gui.czw_method_circle = Circle radius +gui.czw_method_square_desc = Square area +gui.czw_method_square = Square radius +gui.czw_method_map_desc = Interactive chunk editor +gui.czw_method_map = Use claim map +gui.czw_radius = Radius +gui.czw_custom_radius = Custom (1-50): +gui.czw_flags = Flags +gui.czw_flags_defaults_desc = Based on zone type +gui.czw_flags_defaults = Use defaults +gui.czw_flags_customize_desc = Open settings after +gui.czw_flags_customize = Customize + +# Common button labels +gui.cancel = Cancel diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang index b62770d9..fb4d82df 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang @@ -580,3 +580,59 @@ gui.ver_kyuubisoft = KyuubiSoft gui.ver_placeholder_api = PlaceholderAPI gui.ver_wiflow_papi = WiFlow PAPI gui.ver_treasury = Tesoreria + +# Etiquetas de modal de desreclamar todo +gui.unclaim_title = Desreclamar Todo el Territorio +gui.unclaim_confirm_msg1 = Estas seguro de que deseas desreclamar todos los +gui.unclaim_confirm_msg2 = de +gui.unclaim_warning = Esta accion no se puede deshacer! +gui.unclaim_all = Desreclamar Todo + +# Etiquetas de modal de renombrar zona +gui.zren_title = Renombrar Zona +gui.zren_current = Actual: +gui.zren_new_name = Nuevo Nombre: + +# Etiquetas de modal de cambiar tipo de zona +gui.ztype_title = Cambiar Tipo de Zona +gui.ztype_zone_label = Zona: +gui.ztype_current = Actual: +gui.ztype_will_become = se convertira en +gui.ztype_new = Nuevo: +gui.ztype_warning1 = Diferentes tipos de zona tienen diferentes valores de flags por defecto. +gui.ztype_warning2 = Elige como manejar los ajustes de flags existentes: +gui.ztype_keep_desc = Mantener anulaciones personalizadas +gui.ztype_keep_flags = Mantener Flags +gui.ztype_reset_desc = Usar valores por defecto del nuevo tipo +gui.ztype_reset_flags = Restablecer Flags + +# Etiquetas de asistente de creacion de zona +gui.czw_title = Crear Zona +gui.czw_back = < Volver +gui.czw_create = Crear Zona +gui.czw_zone_type = Tipo de Zona +gui.czw_safe_desc = Protegido, sin PvP +gui.czw_war_desc = Combate, PvP habilitado +gui.czw_zone_name = Nombre de Zona +gui.czw_name_desc = Ingresa un nombre unico para la zona +gui.czw_claim_method = Metodo de Reclamo +gui.czw_method_none_desc = Crear zona vacia +gui.czw_method_none = Sin reclamos +gui.czw_method_single_desc = Tu chunk actual +gui.czw_method_single = Chunk unico +gui.czw_method_circle_desc = Area circular +gui.czw_method_circle = Radio circular +gui.czw_method_square_desc = Area cuadrada +gui.czw_method_square = Radio cuadrado +gui.czw_method_map_desc = Editor de chunks interactivo +gui.czw_method_map = Usar mapa de reclamos +gui.czw_radius = Radio +gui.czw_custom_radius = Personalizado (1-50): +gui.czw_flags = Flags +gui.czw_flags_defaults_desc = Basado en tipo de zona +gui.czw_flags_defaults = Usar por defecto +gui.czw_flags_customize_desc = Abrir ajustes despues +gui.czw_flags_customize = Personalizar + +# Etiquetas comunes de botones +gui.cancel = Cancelar From 27346d8c8d670e00a49d357db10ec772f69be7ff Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 20:42:21 -0700 Subject: [PATCH 24/55] fix: admin GUI crash, help i18n resolution, and dropdown display names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix crash: #Title.Text selector on admin pages — add #PageTitle ID to all 29 admin .ui templates and update 28 Java files to use #PageTitle - Fix help content showing English for non-English players — thread PlayerRef through HelpTopic.title(), HelpEntry.text(), and HelpMainPage.buildTopicCards() so help resolves per-player locale - Fix category title using server default — use displayName(playerRef) - Fix language dropdown truncation — use compact display names (English (US) instead of English (United States)) and widen to 220px --- .../gui/admin/page/AdminActionsPage.java | 2 +- .../gui/admin/page/AdminActivityLogPage.java | 2 +- .../gui/admin/page/AdminBackupsPage.java | 2 +- .../gui/admin/page/AdminBulkEconomyPage.java | 2 +- .../gui/admin/page/AdminConfigPage.java | 2 +- .../gui/admin/page/AdminDashboardPage.java | 2 +- .../admin/page/AdminDisbandConfirmPage.java | 7 ++ .../admin/page/AdminEconomyAdjustPage.java | 2 +- .../gui/admin/page/AdminEconomyPage.java | 2 +- .../gui/admin/page/AdminFactionInfoPage.java | 2 +- .../admin/page/AdminFactionMembersPage.java | 2 +- .../admin/page/AdminFactionRelationsPage.java | 2 +- .../admin/page/AdminFactionSettingsPage.java | 59 ++++++++++++- .../gui/admin/page/AdminFactionsPage.java | 2 +- .../gui/admin/page/AdminHelpPage.java | 2 +- .../gui/admin/page/AdminMainPage.java | 2 +- .../gui/admin/page/AdminPlayerInfoPage.java | 2 +- .../gui/admin/page/AdminPlayersPage.java | 2 +- .../page/AdminUnclaimAllConfirmPage.java | 2 +- .../gui/admin/page/AdminUpdatesPage.java | 2 +- .../gui/admin/page/AdminVersionPage.java | 2 +- .../page/AdminZoneIntegrationFlagsPage.java | 2 +- .../gui/admin/page/AdminZoneMapPage.java | 2 +- .../gui/admin/page/AdminZonePage.java | 2 +- .../admin/page/AdminZonePropertiesPage.java | 2 +- .../gui/admin/page/AdminZoneSettingsPage.java | 2 +- .../gui/admin/page/CreateZoneWizardPage.java | 29 ++++++ .../admin/page/ZoneChangeTypeModalPage.java | 14 +++ .../gui/admin/page/ZoneRenameModalPage.java | 7 ++ .../com/hyperfactions/gui/help/HelpEntry.java | 12 ++- .../com/hyperfactions/gui/help/HelpTopic.java | 12 ++- .../gui/help/page/HelpMainPage.java | 6 +- .../gui/shared/page/PlayerSettingsPage.java | 13 +-- .../com/hyperfactions/util/MessageKeys.java | 39 ++++++++ .../HyperFactions/admin/admin_actions.ui | 2 +- .../HyperFactions/admin/admin_activity_log.ui | 2 +- .../HyperFactions/admin/admin_backups.ui | 2 +- .../HyperFactions/admin/admin_bulk_economy.ui | 2 +- .../HyperFactions/admin/admin_config.ui | 2 +- .../HyperFactions/admin/admin_dashboard.ui | 2 +- .../HyperFactions/admin/admin_economy.ui | 2 +- .../admin/admin_economy_adjust.ui | 2 +- .../HyperFactions/admin/admin_faction_info.ui | 2 +- .../admin/admin_faction_members.ui | 2 +- .../admin/admin_faction_relations.ui | 2 +- .../admin/admin_faction_settings.ui | 88 +++++++++---------- .../HyperFactions/admin/admin_factions.ui | 2 +- .../Custom/HyperFactions/admin/admin_help.ui | 2 +- .../Custom/HyperFactions/admin/admin_main.ui | 2 +- .../HyperFactions/admin/admin_player_info.ui | 2 +- .../HyperFactions/admin/admin_players.ui | 2 +- .../HyperFactions/admin/admin_updates.ui | 2 +- .../HyperFactions/admin/admin_version.ui | 2 +- .../admin/admin_zone_integration_flags.ui | 2 +- .../HyperFactions/admin/admin_zone_map.ui | 2 +- .../admin/admin_zone_map_terrain.ui | 2 +- .../admin/admin_zone_properties.ui | 2 +- .../admin/admin_zone_settings.ui | 2 +- .../Custom/HyperFactions/admin/admin_zones.ui | 2 +- .../HyperFactions/admin/create_zone_wizard.ui | 2 +- .../admin/unclaim_all_confirm.ui | 2 +- .../admin/zone_change_type_modal.ui | 2 +- .../HyperFactions/admin/zone_rename_modal.ui | 2 +- .../HyperFactions/shared/player_settings.ui | 2 +- .../Languages/en-US/hyperfactions_admin.lang | 39 ++++++++ .../Languages/es-ES/hyperfactions_admin.lang | 39 ++++++++ 66 files changed, 360 insertions(+), 110 deletions(-) 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 caec4d5e..bac0528e 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminActionsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminActionsPage.java @@ -70,7 +70,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "actions", cmd, events); // Localize page title and labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ACTIONS)); + 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)); 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 dda724c0..c2284a90 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java @@ -99,7 +99,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "log", cmd, events); // Localize page title - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ACTIVITY_LOG)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ACTIVITY_LOG)); // Localize filter labels cmd.set("#TypeLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_LOG_TYPE)); 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 48fcc22b..f0f02a28 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminBackupsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminBackupsPage.java @@ -43,7 +43,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "backups", cmd, events); // Localize page title and labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_BACKUPS)); + 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)); 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 f6240104..851097a3 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminBulkEconomyPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminBulkEconomyPage.java @@ -65,7 +65,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "actions", cmd, events); // Localize labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_BULK_ECONOMY)); + 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)); 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 0a1c7179..76d45751 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminConfigPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminConfigPage.java @@ -43,7 +43,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "config", cmd, events); // Localize page title and labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_CONFIG)); + 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)); 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 7ddb3f9d..e83721ca 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminDashboardPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminDashboardPage.java @@ -71,7 +71,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "dashboard", cmd, events); // Localize page title and stat labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_DASHBOARD)); + 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)); 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 4a7f2d3a..6c657f11 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminDisbandConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminDisbandConfirmPage.java @@ -59,6 +59,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Reuse the shared disband confirmation template 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)); + // Set faction name in the modal cmd.set("#FactionName.Text", factionName); 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 ff907247..afe099b6 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyAdjustPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyAdjustPage.java @@ -70,7 +70,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "economy", cmd, events); // Localize labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ECONOMY_ADJUST)); + 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)); 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 8acad8fe..32da0bbb 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java @@ -81,7 +81,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "economy", cmd, events); // Localize page title - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ECONOMY)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ECONOMY)); // Localize stat card labels cmd.set("#TotalBalanceLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ECON_TOTAL_BALANCE)); 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 83e7fe7e..8c39071e 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java @@ -83,7 +83,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); // Localize page title - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_FACTION_INFO)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_FACTION_INFO)); // Localize stat card labels cmd.set("#PowerCardLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_FAC_POWER)); 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 a7d01afb..86384171 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java @@ -80,7 +80,7 @@ public void build(Ref ref, UICommandBuilder cmd, UIEventBuilder eve AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); // Localize page title and labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_FACTION_MEMBERS)); + 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)); 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 39860604..ba8add17 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java @@ -60,7 +60,7 @@ public void build(Ref ref, UICommandBuilder cmd, UIEventBuilder eve AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); // Localize page title and labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_FACTION_RELATIONS)); + 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)); 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 3f96b51e..b6dd8d19 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionSettingsPage.java @@ -67,10 +67,65 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); // Localize page title and labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_FACTION_SETTINGS)); + 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_BACK)); + cmd.set("#BackBtn.Text", HFMessages.get(playerRef, MessageKeys.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("#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)); + + // 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)); + + // 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)); // Get the faction Faction faction = factionManager.getFaction(factionId); diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionsPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionsPage.java index 89a539cd..05815fd6 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionsPage.java @@ -92,7 +92,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); // Localize page title and common labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_FACTIONS)); + 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)); 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 3549b99c..e111e173 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminHelpPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminHelpPage.java @@ -43,7 +43,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "help", cmd, events); // Localize page title and labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_HELP)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_HELP)); cmd.set("#ComingSoon.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_HELP_HEADING)); cmd.set("#ComingSoonSub.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COMING_SOON)); cmd.set("#Description.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_HELP_DESC1)); 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 ee395cce..9612d2b6 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminMainPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminMainPage.java @@ -67,7 +67,7 @@ public void build(Ref ref, UICommandBuilder cmd, // Localize page title and buttons - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_MAIN)); + 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)); 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 634912ca..bdd562ef 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java @@ -96,7 +96,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "factions", cmd, events); // Localize page title - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_PLAYER_INFO)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_PLAYER_INFO)); // Localize header labels cmd.set("#FirstJoinedLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_FIRST_JOINED)); 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 93538650..8010e7fb 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java @@ -116,7 +116,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "players", cmd, events); // Localize page title and common labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_PLAYERS)); + 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)); 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 6c5d1fa6..f954d897 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminUnclaimAllConfirmPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminUnclaimAllConfirmPage.java @@ -64,7 +64,7 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.append(UIPaths.UNCLAIM_ALL_CONFIRM); // Localize labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_UNCLAIM_TITLE)); + 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)); 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 6b2dc6e2..2c2a68f1 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminUpdatesPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminUpdatesPage.java @@ -43,7 +43,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "updates", cmd, events); // Localize page title and labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_UPDATES)); + 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)); 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 1d8d74ad..c2074ea7 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminVersionPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminVersionPage.java @@ -63,7 +63,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "version", cmd, events); // Localize page title - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_VERSION)); + cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_VERSION)); // Localize version card labels cmd.set("#VersionLabelFactions.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_VER_HYPERFACTIONS)); 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 56f5a8d0..f1b97185 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneIntegrationFlagsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneIntegrationFlagsPage.java @@ -69,7 +69,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "zones", cmd, events); // Localize labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ZONE_SETTINGS)); + 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)); 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 d7c5bfb5..21425b8c 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneMapPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneMapPage.java @@ -143,7 +143,7 @@ public void build(Ref ref, UICommandBuilder cmd, } // Localize labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ZONE_MAP)); + 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)); 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 094de186..b5aa0a57 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePage.java @@ -93,7 +93,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "zones", cmd, events); // Localize page title and common labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ZONES)); + 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)); 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 e79c40b6..20581392 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePropertiesPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePropertiesPage.java @@ -75,7 +75,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "zones", cmd, events); // Localize labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ZONE_PROPERTIES)); + 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)); 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 a59a3fdd..d86e601c 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneSettingsPage.java @@ -100,7 +100,7 @@ public void build(Ref ref, UICommandBuilder cmd, AdminNavBarHelper.setupBar(playerRef, "zones", cmd, events); // Localize labels - cmd.set("#Title.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_ZONE_SETTINGS)); + 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)); 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 054797ba..314910ad 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/CreateZoneWizardPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/CreateZoneWizardPage.java @@ -133,6 +133,35 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the template 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)); + // Restore preserved input value if (!preservedName.isEmpty()) { cmd.set("#NameInput.Value", preservedName); 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 91e4fe20..b021ab8f 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/ZoneChangeTypeModalPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/ZoneChangeTypeModalPage.java @@ -84,6 +84,20 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the modal template 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)); + // Zone name cmd.set("#ZoneName.Text", zone.name()); diff --git a/src/main/java/com/hyperfactions/gui/admin/page/ZoneRenameModalPage.java b/src/main/java/com/hyperfactions/gui/admin/page/ZoneRenameModalPage.java index 113112f0..5e77a7ed 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/ZoneRenameModalPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/ZoneRenameModalPage.java @@ -73,6 +73,13 @@ public void build(Ref ref, UICommandBuilder cmd, // Load the modal template 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)); + // Show current name cmd.set("#CurrentName.Text", zone.name()); diff --git a/src/main/java/com/hyperfactions/gui/help/HelpEntry.java b/src/main/java/com/hyperfactions/gui/help/HelpEntry.java index 86a215fc..0df48b59 100644 --- a/src/main/java/com/hyperfactions/gui/help/HelpEntry.java +++ b/src/main/java/com/hyperfactions/gui/help/HelpEntry.java @@ -1,6 +1,8 @@ package com.hyperfactions.gui.help; +import com.hypixel.hytale.server.core.universe.PlayerRef; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * A typed content entry within a help topic. @@ -29,7 +31,7 @@ public enum EntryType { } /** - * Gets the resolved display text for this entry. + * Gets the resolved display text for this entry (server default language). * * @return The localized text, or empty string for spacers */ @@ -38,6 +40,14 @@ public String text() { return type == EntryType.SPACER ? "" : HelpMessages.get(messageKey); } + /** + * Gets the resolved display text for a specific player's language. + */ + @NotNull + public String text(@Nullable PlayerRef playerRef) { + return type == EntryType.SPACER ? "" : HelpMessages.get(playerRef, messageKey); + } + /** Creates a TEXT entry. */ public static HelpEntry text(@NotNull String messageKey) { return new HelpEntry(EntryType.TEXT, messageKey); diff --git a/src/main/java/com/hyperfactions/gui/help/HelpTopic.java b/src/main/java/com/hyperfactions/gui/help/HelpTopic.java index de257a8b..7227bafb 100644 --- a/src/main/java/com/hyperfactions/gui/help/HelpTopic.java +++ b/src/main/java/com/hyperfactions/gui/help/HelpTopic.java @@ -1,7 +1,9 @@ package com.hyperfactions.gui.help; +import com.hypixel.hytale.server.core.universe.PlayerRef; import java.util.List; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * Represents an individual help topic within a category. @@ -20,13 +22,21 @@ public record HelpTopic( @NotNull HelpCategory category ) { /** - * Gets the resolved display title. + * Gets the resolved display title (server default language). */ @NotNull public String title() { return HelpMessages.get(titleKey); } + /** + * Gets the resolved display title for a specific player's language. + */ + @NotNull + public String title(@Nullable PlayerRef playerRef) { + return HelpMessages.get(playerRef, titleKey); + } + /** * Creates a topic with entries but no associated commands. */ 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 56092ca4..b6deddd3 100644 --- a/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java +++ b/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java @@ -108,7 +108,7 @@ public void build(Ref ref, UICommandBuilder cmd, setupCategoryButtons(cmd, events); // Set the category title header text and color - cmd.set("#CategoryTitle.Text", selectedCategory.displayName().toUpperCase()); + cmd.set("#CategoryTitle.Text", selectedCategory.displayName(playerRef).toUpperCase()); cmd.set("#CategoryTitle.Style.TextColor", selectedCategory.color()); // Build topic cards for selected category @@ -153,7 +153,7 @@ private void buildTopicCards(UICommandBuilder cmd) { String cardPrefix = "#ContentList[" + cardIndex + "]"; // Set card title - cmd.set(cardPrefix + " #Title.Text", topic.title()); + cmd.set(cardPrefix + " #Title.Text", topic.title(playerRef)); // Append lines into card's #Lines container int lineIndex = 0; @@ -163,7 +163,7 @@ private void buildTopicCards(UICommandBuilder cmd) { cmd.append(linesContainer, template); if (entry.type() != HelpEntry.EntryType.SPACER) { - String text = entry.text(); + String text = entry.text(playerRef); // Prefix tips with >> for visual distinction if (entry.type() == HelpEntry.EntryType.TIP) { text = ">> " + text; 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 835be09f..e54254a8 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java @@ -45,17 +45,18 @@ public class PlayerSettingsPage extends InteractiveCustomUIPage Date: Mon, 9 Mar 2026 20:48:51 -0700 Subject: [PATCH 25/55] fix: persist player preferences to JSON storage The custom serializePlayerData/deserializePlayerData methods in JsonPlayerStorage did not include the i18n preference fields added to PlayerData. Settings were saved in memory but lost on restart. Also includes compact locale display names and help i18n threading from earlier fixes that were committed separately. --- .../storage/json/JsonPlayerStorage.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/main/java/com/hyperfactions/storage/json/JsonPlayerStorage.java b/src/main/java/com/hyperfactions/storage/json/JsonPlayerStorage.java index 74c585ab..846fd65a 100644 --- a/src/main/java/com/hyperfactions/storage/json/JsonPlayerStorage.java +++ b/src/main/java/com/hyperfactions/storage/json/JsonPlayerStorage.java @@ -323,6 +323,20 @@ private JsonObject serializePlayerData(PlayerData data) { obj.addProperty("adminBypassEnabled", true); } + // Player preferences (i18n + notifications) + if (data.getLanguagePreference() != null) { + obj.addProperty("languagePreference", data.getLanguagePreference()); + } + if (!data.isTerritoryAlertsEnabled()) { + obj.addProperty("territoryAlertsEnabled", false); + } + if (!data.isDeathAnnouncementsEnabled()) { + obj.addProperty("deathAnnouncementsEnabled", false); + } + if (!data.isPowerNotificationsEnabled()) { + obj.addProperty("powerNotificationsEnabled", false); + } + // Membership history if (!data.getMembershipHistory().isEmpty()) { JsonArray historyArr = new JsonArray(); @@ -385,6 +399,20 @@ private PlayerData deserializePlayerData(JsonObject obj) { data.setAdminBypassEnabled(obj.get("adminBypassEnabled").getAsBoolean()); } + // Player preferences (i18n + notifications) + if (obj.has("languagePreference") && !obj.get("languagePreference").isJsonNull()) { + data.setLanguagePreference(obj.get("languagePreference").getAsString()); + } + if (obj.has("territoryAlertsEnabled")) { + data.setTerritoryAlertsEnabled(obj.get("territoryAlertsEnabled").getAsBoolean()); + } + if (obj.has("deathAnnouncementsEnabled")) { + data.setDeathAnnouncementsEnabled(obj.get("deathAnnouncementsEnabled").getAsBoolean()); + } + if (obj.has("powerNotificationsEnabled")) { + data.setPowerNotificationsEnabled(obj.get("powerNotificationsEnabled").getAsBoolean()); + } + // Membership history if (obj.has("membershipHistory") && obj.get("membershipHistory").isJsonArray()) { JsonArray historyArr = obj.getAsJsonArray("membershipHistory"); From c14c7c020adfb3534bdad470b36441eef9c995ae Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 20:51:09 -0700 Subject: [PATCH 26/55] fix: disable Power Notifications toggle (not yet wired up) The checkbox is shown but disabled since no power change notifications are currently sent to players. --- .../gui/shared/page/PlayerSettingsPage.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 e54254a8..cc50794f 100644 --- a/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/shared/page/PlayerSettingsPage.java @@ -192,13 +192,14 @@ public void build(Ref ref, UICommandBuilder cmd, MessageKeys.PlayerSettings.DEATH_ANNOUNCEMENTS_DESC, "#DeathAnnounceDesc", deathAnnouncements, "ToggleDeathAnnouncements"); - // Power Notifications + // 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)); - buildNotificationToggle(cmd, events, "#PowerNotifCB", - MessageKeys.PlayerSettings.POWER_NOTIFICATIONS, - MessageKeys.PlayerSettings.POWER_NOTIFICATIONS_DESC, - "#PowerNotifDesc", powerNotifications, "TogglePowerNotifications"); + cmd.set("#PowerNotifDesc.Text", + HFMessages.get(playerRef, MessageKeys.PlayerSettings.POWER_NOTIFICATIONS_DESC)); + cmd.set("#PowerNotifCB #CheckBox.Value", powerNotifications); + cmd.set("#PowerNotifCB #CheckBox.Disabled", true); } private void buildNotificationToggle(UICommandBuilder cmd, UIEventBuilder events, From 3bcafdf0afe0c7e019356363b8a71f92129f042c Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 21:44:04 -0700 Subject: [PATCH 27/55] refactor: relocate help markdown to Server/Languages and remove stale config.json Move help source files from src/main/help/{locale}/ to src/main/resources/Server/Languages/{locale}/help/ so the build-time HelpLangGenerator reads from the same directory structure as the runtime language loader. Update translation scripts and build.gradle to match the new path. Remove unused config.json (replaced by per-feature config files in config/). --- TRANSLATION_GUIDE.md | 4 +- build.gradle | 4 +- scripts/new-translation.bat | 8 +-- scripts/new-translation.sh | 8 +-- .../Languages/en-US/help}/combat/death.md | 0 .../en-US/help}/combat/protection.md | 0 .../Languages/en-US/help}/combat/tagging.md | 0 .../Languages/en-US/help}/combat/zones.md | 0 .../en-US/help}/diplomacy/alliances.md | 0 .../en-US/help}/diplomacy/enemies.md | 0 .../en-US/help}/diplomacy/relations.md | 0 .../Languages/en-US/help}/economy/commands.md | 0 .../Languages/en-US/help}/economy/funds.md | 0 .../Languages/en-US/help}/economy/treasury.md | 0 .../en-US/help}/power_land/claiming.md | 0 .../help}/power_land/losing_territory.md | 0 .../en-US/help}/power_land/territory_map.md | 0 .../help}/power_land/understanding_power.md | 0 .../en-US/help}/quick_ref/all_commands.md | 0 .../en-US/help}/welcome/getting_started.md | 0 .../en-US/help}/welcome/quick_tips.md | 0 .../en-US/help}/welcome/what_are_factions.md | 0 .../en-US/help}/your_faction/creating.md | 0 .../en-US/help}/your_faction/joining.md | 0 .../en-US/help}/your_faction/managing.md | 0 .../en-US/help}/your_faction/roles.md | 0 .../Languages/es-ES/help}/combat/death.md | 0 .../es-ES/help}/combat/protection.md | 0 .../Languages/es-ES/help}/combat/tagging.md | 0 .../Languages/es-ES/help}/combat/zones.md | 0 .../es-ES/help}/diplomacy/alliances.md | 0 .../es-ES/help}/diplomacy/enemies.md | 0 .../es-ES/help}/diplomacy/relations.md | 0 .../Languages/es-ES/help}/economy/commands.md | 0 .../Languages/es-ES/help}/economy/funds.md | 0 .../Languages/es-ES/help}/economy/treasury.md | 0 .../es-ES/help}/power_land/claiming.md | 0 .../help}/power_land/losing_territory.md | 0 .../es-ES/help}/power_land/territory_map.md | 0 .../help}/power_land/understanding_power.md | 0 .../es-ES/help}/quick_ref/all_commands.md | 0 .../es-ES/help}/welcome/getting_started.md | 0 .../es-ES/help}/welcome/quick_tips.md | 0 .../es-ES/help}/welcome/what_are_factions.md | 0 .../es-ES/help}/your_faction/creating.md | 0 .../es-ES/help}/your_faction/joining.md | 0 .../es-ES/help}/your_faction/managing.md | 0 .../es-ES/help}/your_faction/roles.md | 0 src/main/resources/config.json | 53 ------------------- 49 files changed, 12 insertions(+), 65 deletions(-) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/combat/death.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/combat/protection.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/combat/tagging.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/combat/zones.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/diplomacy/alliances.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/diplomacy/enemies.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/diplomacy/relations.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/economy/commands.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/economy/funds.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/economy/treasury.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/power_land/claiming.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/power_land/losing_territory.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/power_land/territory_map.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/power_land/understanding_power.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/quick_ref/all_commands.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/welcome/getting_started.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/welcome/quick_tips.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/welcome/what_are_factions.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/your_faction/creating.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/your_faction/joining.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/your_faction/managing.md (100%) rename src/main/{help/en-US => resources/Server/Languages/en-US/help}/your_faction/roles.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/combat/death.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/combat/protection.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/combat/tagging.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/combat/zones.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/diplomacy/alliances.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/diplomacy/enemies.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/diplomacy/relations.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/economy/commands.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/economy/funds.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/economy/treasury.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/power_land/claiming.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/power_land/losing_territory.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/power_land/territory_map.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/power_land/understanding_power.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/quick_ref/all_commands.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/welcome/getting_started.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/welcome/quick_tips.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/welcome/what_are_factions.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/your_faction/creating.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/your_faction/joining.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/your_faction/managing.md (100%) rename src/main/{help/es-ES => resources/Server/Languages/es-ES/help}/your_faction/roles.md (100%) delete mode 100644 src/main/resources/config.json diff --git a/TRANSLATION_GUIDE.md b/TRANSLATION_GUIDE.md index 08192681..df727691 100644 --- a/TRANSLATION_GUIDE.md +++ b/TRANSLATION_GUIDE.md @@ -11,7 +11,7 @@ This guide explains how to contribute translations for HyperFactions. ``` 2. Edit the `.lang` files in `src/main/resources/Server/Languages//` -3. Edit the help markdown files in `src/main/help//` +3. Edit the help markdown files in `src/main/resources/Server/Languages//help/` 4. Build to verify: `./gradlew :HyperFactions:shadowJar` 5. Submit a pull request @@ -59,7 +59,7 @@ key.with.placeholder = Hello {0}, you have {1} power ### Help Markdown Files -Located at `src/main/help///.md`. +Located at `src/main/resources/Server/Languages//help//.md`. Each file has YAML frontmatter and markdown content: diff --git a/build.gradle b/build.gradle index e82c06e2..d2508d54 100644 --- a/build.gradle +++ b/build.gradle @@ -136,10 +136,10 @@ tasks.register('generateHelpLang', JavaExec) { classpath = sourceSets.main.compileClasspath + files(sourceSets.main.java.classesDirectory) mainClass = 'com.hyperfactions.build.HelpLangGenerator' args = [ - file('src/main/help').absolutePath, + file('src/main/resources/Server/Languages').absolutePath, layout.buildDirectory.dir('generated/resources').get().asFile.absolutePath ] - inputs.dir(file('src/main/help')) + inputs.dir(file('src/main/resources/Server/Languages')) outputs.dir(layout.buildDirectory.dir('generated/resources')) } diff --git a/scripts/new-translation.bat b/scripts/new-translation.bat index 15fe2462..e1d31dc0 100644 --- a/scripts/new-translation.bat +++ b/scripts/new-translation.bat @@ -22,8 +22,8 @@ popd set "LANG_SRC=%PROJECT_ROOT%\src\main\resources\Server\Languages\en-US" set "LANG_DST=%PROJECT_ROOT%\src\main\resources\Server\Languages\%LOCALE%" -set "HELP_SRC=%PROJECT_ROOT%\src\main\help\en-US" -set "HELP_DST=%PROJECT_ROOT%\src\main\help\%LOCALE%" +set "HELP_SRC=%PROJECT_ROOT%\src\main\resources\Server\Languages\en-US\help" +set "HELP_DST=%PROJECT_ROOT%\src\main\resources\Server\Languages\%LOCALE%\help" REM --- Validate source exists --- if not exist "%LANG_SRC%\" ( @@ -66,10 +66,10 @@ echo. echo === Scaffold Summary === echo Locale: %LOCALE% echo Lang files: %LANG_COUNT% copied to src\main\resources\Server\Languages\%LOCALE%\ -echo Help files: %HELP_COUNT% copied to src\main\help\%LOCALE%\ +echo Help files: %HELP_COUNT% copied to src\main\resources\Server\Languages\%LOCALE%\help\ echo. echo Next steps: echo 1. Add a header comment to each .lang file indicating the language and status echo 2. Translate the values (keep keys and {0} placeholders unchanged) -echo 3. Translate the help markdown files +echo 3. Translate the help markdown files in Server\Languages\%LOCALE%\help\ echo 4. Test in-game with /f settings to switch language diff --git a/scripts/new-translation.sh b/scripts/new-translation.sh index f6a29e0a..4674d972 100755 --- a/scripts/new-translation.sh +++ b/scripts/new-translation.sh @@ -21,8 +21,8 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" LANG_SRC="$PROJECT_ROOT/src/main/resources/Server/Languages/en-US" LANG_DST="$PROJECT_ROOT/src/main/resources/Server/Languages/$LOCALE" -HELP_SRC="$PROJECT_ROOT/src/main/help/en-US" -HELP_DST="$PROJECT_ROOT/src/main/help/$LOCALE" +HELP_SRC="$PROJECT_ROOT/src/main/resources/Server/Languages/en-US/help" +HELP_DST="$PROJECT_ROOT/src/main/resources/Server/Languages/$LOCALE/help" # --- Validate inputs --- if [[ ! "$LOCALE" =~ ^[a-z]{2}-[A-Z]{2}$ ]]; then @@ -71,10 +71,10 @@ echo "" echo "=== Scaffold Summary ===" echo "Locale: $LOCALE" echo "Lang files: $LANG_COUNT copied to src/main/resources/Server/Languages/$LOCALE/" -echo "Help files: $HELP_COUNT copied to src/main/help/$LOCALE/" +echo "Help files: $HELP_COUNT copied to src/main/resources/Server/Languages/$LOCALE/help/" echo "" echo "Next steps:" echo " 1. Add a header comment to each .lang file indicating the language and status" echo " 2. Translate the values (keep keys and {0} placeholders unchanged)" -echo " 3. Translate the help markdown files" +echo " 3. Translate the help markdown files in Server/Languages/$LOCALE/help/" echo " 4. Test in-game with /f settings to switch language" diff --git a/src/main/help/en-US/combat/death.md b/src/main/resources/Server/Languages/en-US/help/combat/death.md similarity index 100% rename from src/main/help/en-US/combat/death.md rename to src/main/resources/Server/Languages/en-US/help/combat/death.md diff --git a/src/main/help/en-US/combat/protection.md b/src/main/resources/Server/Languages/en-US/help/combat/protection.md similarity index 100% rename from src/main/help/en-US/combat/protection.md rename to src/main/resources/Server/Languages/en-US/help/combat/protection.md diff --git a/src/main/help/en-US/combat/tagging.md b/src/main/resources/Server/Languages/en-US/help/combat/tagging.md similarity index 100% rename from src/main/help/en-US/combat/tagging.md rename to src/main/resources/Server/Languages/en-US/help/combat/tagging.md diff --git a/src/main/help/en-US/combat/zones.md b/src/main/resources/Server/Languages/en-US/help/combat/zones.md similarity index 100% rename from src/main/help/en-US/combat/zones.md rename to src/main/resources/Server/Languages/en-US/help/combat/zones.md diff --git a/src/main/help/en-US/diplomacy/alliances.md b/src/main/resources/Server/Languages/en-US/help/diplomacy/alliances.md similarity index 100% rename from src/main/help/en-US/diplomacy/alliances.md rename to src/main/resources/Server/Languages/en-US/help/diplomacy/alliances.md diff --git a/src/main/help/en-US/diplomacy/enemies.md b/src/main/resources/Server/Languages/en-US/help/diplomacy/enemies.md similarity index 100% rename from src/main/help/en-US/diplomacy/enemies.md rename to src/main/resources/Server/Languages/en-US/help/diplomacy/enemies.md diff --git a/src/main/help/en-US/diplomacy/relations.md b/src/main/resources/Server/Languages/en-US/help/diplomacy/relations.md similarity index 100% rename from src/main/help/en-US/diplomacy/relations.md rename to src/main/resources/Server/Languages/en-US/help/diplomacy/relations.md diff --git a/src/main/help/en-US/economy/commands.md b/src/main/resources/Server/Languages/en-US/help/economy/commands.md similarity index 100% rename from src/main/help/en-US/economy/commands.md rename to src/main/resources/Server/Languages/en-US/help/economy/commands.md diff --git a/src/main/help/en-US/economy/funds.md b/src/main/resources/Server/Languages/en-US/help/economy/funds.md similarity index 100% rename from src/main/help/en-US/economy/funds.md rename to src/main/resources/Server/Languages/en-US/help/economy/funds.md diff --git a/src/main/help/en-US/economy/treasury.md b/src/main/resources/Server/Languages/en-US/help/economy/treasury.md similarity index 100% rename from src/main/help/en-US/economy/treasury.md rename to src/main/resources/Server/Languages/en-US/help/economy/treasury.md diff --git a/src/main/help/en-US/power_land/claiming.md b/src/main/resources/Server/Languages/en-US/help/power_land/claiming.md similarity index 100% rename from src/main/help/en-US/power_land/claiming.md rename to src/main/resources/Server/Languages/en-US/help/power_land/claiming.md diff --git a/src/main/help/en-US/power_land/losing_territory.md b/src/main/resources/Server/Languages/en-US/help/power_land/losing_territory.md similarity index 100% rename from src/main/help/en-US/power_land/losing_territory.md rename to src/main/resources/Server/Languages/en-US/help/power_land/losing_territory.md diff --git a/src/main/help/en-US/power_land/territory_map.md b/src/main/resources/Server/Languages/en-US/help/power_land/territory_map.md similarity index 100% rename from src/main/help/en-US/power_land/territory_map.md rename to src/main/resources/Server/Languages/en-US/help/power_land/territory_map.md diff --git a/src/main/help/en-US/power_land/understanding_power.md b/src/main/resources/Server/Languages/en-US/help/power_land/understanding_power.md similarity index 100% rename from src/main/help/en-US/power_land/understanding_power.md rename to src/main/resources/Server/Languages/en-US/help/power_land/understanding_power.md diff --git a/src/main/help/en-US/quick_ref/all_commands.md b/src/main/resources/Server/Languages/en-US/help/quick_ref/all_commands.md similarity index 100% rename from src/main/help/en-US/quick_ref/all_commands.md rename to src/main/resources/Server/Languages/en-US/help/quick_ref/all_commands.md diff --git a/src/main/help/en-US/welcome/getting_started.md b/src/main/resources/Server/Languages/en-US/help/welcome/getting_started.md similarity index 100% rename from src/main/help/en-US/welcome/getting_started.md rename to src/main/resources/Server/Languages/en-US/help/welcome/getting_started.md diff --git a/src/main/help/en-US/welcome/quick_tips.md b/src/main/resources/Server/Languages/en-US/help/welcome/quick_tips.md similarity index 100% rename from src/main/help/en-US/welcome/quick_tips.md rename to src/main/resources/Server/Languages/en-US/help/welcome/quick_tips.md diff --git a/src/main/help/en-US/welcome/what_are_factions.md b/src/main/resources/Server/Languages/en-US/help/welcome/what_are_factions.md similarity index 100% rename from src/main/help/en-US/welcome/what_are_factions.md rename to src/main/resources/Server/Languages/en-US/help/welcome/what_are_factions.md diff --git a/src/main/help/en-US/your_faction/creating.md b/src/main/resources/Server/Languages/en-US/help/your_faction/creating.md similarity index 100% rename from src/main/help/en-US/your_faction/creating.md rename to src/main/resources/Server/Languages/en-US/help/your_faction/creating.md diff --git a/src/main/help/en-US/your_faction/joining.md b/src/main/resources/Server/Languages/en-US/help/your_faction/joining.md similarity index 100% rename from src/main/help/en-US/your_faction/joining.md rename to src/main/resources/Server/Languages/en-US/help/your_faction/joining.md diff --git a/src/main/help/en-US/your_faction/managing.md b/src/main/resources/Server/Languages/en-US/help/your_faction/managing.md similarity index 100% rename from src/main/help/en-US/your_faction/managing.md rename to src/main/resources/Server/Languages/en-US/help/your_faction/managing.md diff --git a/src/main/help/en-US/your_faction/roles.md b/src/main/resources/Server/Languages/en-US/help/your_faction/roles.md similarity index 100% rename from src/main/help/en-US/your_faction/roles.md rename to src/main/resources/Server/Languages/en-US/help/your_faction/roles.md diff --git a/src/main/help/es-ES/combat/death.md b/src/main/resources/Server/Languages/es-ES/help/combat/death.md similarity index 100% rename from src/main/help/es-ES/combat/death.md rename to src/main/resources/Server/Languages/es-ES/help/combat/death.md diff --git a/src/main/help/es-ES/combat/protection.md b/src/main/resources/Server/Languages/es-ES/help/combat/protection.md similarity index 100% rename from src/main/help/es-ES/combat/protection.md rename to src/main/resources/Server/Languages/es-ES/help/combat/protection.md diff --git a/src/main/help/es-ES/combat/tagging.md b/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md similarity index 100% rename from src/main/help/es-ES/combat/tagging.md rename to src/main/resources/Server/Languages/es-ES/help/combat/tagging.md diff --git a/src/main/help/es-ES/combat/zones.md b/src/main/resources/Server/Languages/es-ES/help/combat/zones.md similarity index 100% rename from src/main/help/es-ES/combat/zones.md rename to src/main/resources/Server/Languages/es-ES/help/combat/zones.md diff --git a/src/main/help/es-ES/diplomacy/alliances.md b/src/main/resources/Server/Languages/es-ES/help/diplomacy/alliances.md similarity index 100% rename from src/main/help/es-ES/diplomacy/alliances.md rename to src/main/resources/Server/Languages/es-ES/help/diplomacy/alliances.md diff --git a/src/main/help/es-ES/diplomacy/enemies.md b/src/main/resources/Server/Languages/es-ES/help/diplomacy/enemies.md similarity index 100% rename from src/main/help/es-ES/diplomacy/enemies.md rename to src/main/resources/Server/Languages/es-ES/help/diplomacy/enemies.md diff --git a/src/main/help/es-ES/diplomacy/relations.md b/src/main/resources/Server/Languages/es-ES/help/diplomacy/relations.md similarity index 100% rename from src/main/help/es-ES/diplomacy/relations.md rename to src/main/resources/Server/Languages/es-ES/help/diplomacy/relations.md diff --git a/src/main/help/es-ES/economy/commands.md b/src/main/resources/Server/Languages/es-ES/help/economy/commands.md similarity index 100% rename from src/main/help/es-ES/economy/commands.md rename to src/main/resources/Server/Languages/es-ES/help/economy/commands.md diff --git a/src/main/help/es-ES/economy/funds.md b/src/main/resources/Server/Languages/es-ES/help/economy/funds.md similarity index 100% rename from src/main/help/es-ES/economy/funds.md rename to src/main/resources/Server/Languages/es-ES/help/economy/funds.md diff --git a/src/main/help/es-ES/economy/treasury.md b/src/main/resources/Server/Languages/es-ES/help/economy/treasury.md similarity index 100% rename from src/main/help/es-ES/economy/treasury.md rename to src/main/resources/Server/Languages/es-ES/help/economy/treasury.md diff --git a/src/main/help/es-ES/power_land/claiming.md b/src/main/resources/Server/Languages/es-ES/help/power_land/claiming.md similarity index 100% rename from src/main/help/es-ES/power_land/claiming.md rename to src/main/resources/Server/Languages/es-ES/help/power_land/claiming.md diff --git a/src/main/help/es-ES/power_land/losing_territory.md b/src/main/resources/Server/Languages/es-ES/help/power_land/losing_territory.md similarity index 100% rename from src/main/help/es-ES/power_land/losing_territory.md rename to src/main/resources/Server/Languages/es-ES/help/power_land/losing_territory.md diff --git a/src/main/help/es-ES/power_land/territory_map.md b/src/main/resources/Server/Languages/es-ES/help/power_land/territory_map.md similarity index 100% rename from src/main/help/es-ES/power_land/territory_map.md rename to src/main/resources/Server/Languages/es-ES/help/power_land/territory_map.md diff --git a/src/main/help/es-ES/power_land/understanding_power.md b/src/main/resources/Server/Languages/es-ES/help/power_land/understanding_power.md similarity index 100% rename from src/main/help/es-ES/power_land/understanding_power.md rename to src/main/resources/Server/Languages/es-ES/help/power_land/understanding_power.md diff --git a/src/main/help/es-ES/quick_ref/all_commands.md b/src/main/resources/Server/Languages/es-ES/help/quick_ref/all_commands.md similarity index 100% rename from src/main/help/es-ES/quick_ref/all_commands.md rename to src/main/resources/Server/Languages/es-ES/help/quick_ref/all_commands.md diff --git a/src/main/help/es-ES/welcome/getting_started.md b/src/main/resources/Server/Languages/es-ES/help/welcome/getting_started.md similarity index 100% rename from src/main/help/es-ES/welcome/getting_started.md rename to src/main/resources/Server/Languages/es-ES/help/welcome/getting_started.md diff --git a/src/main/help/es-ES/welcome/quick_tips.md b/src/main/resources/Server/Languages/es-ES/help/welcome/quick_tips.md similarity index 100% rename from src/main/help/es-ES/welcome/quick_tips.md rename to src/main/resources/Server/Languages/es-ES/help/welcome/quick_tips.md diff --git a/src/main/help/es-ES/welcome/what_are_factions.md b/src/main/resources/Server/Languages/es-ES/help/welcome/what_are_factions.md similarity index 100% rename from src/main/help/es-ES/welcome/what_are_factions.md rename to src/main/resources/Server/Languages/es-ES/help/welcome/what_are_factions.md diff --git a/src/main/help/es-ES/your_faction/creating.md b/src/main/resources/Server/Languages/es-ES/help/your_faction/creating.md similarity index 100% rename from src/main/help/es-ES/your_faction/creating.md rename to src/main/resources/Server/Languages/es-ES/help/your_faction/creating.md diff --git a/src/main/help/es-ES/your_faction/joining.md b/src/main/resources/Server/Languages/es-ES/help/your_faction/joining.md similarity index 100% rename from src/main/help/es-ES/your_faction/joining.md rename to src/main/resources/Server/Languages/es-ES/help/your_faction/joining.md diff --git a/src/main/help/es-ES/your_faction/managing.md b/src/main/resources/Server/Languages/es-ES/help/your_faction/managing.md similarity index 100% rename from src/main/help/es-ES/your_faction/managing.md rename to src/main/resources/Server/Languages/es-ES/help/your_faction/managing.md diff --git a/src/main/help/es-ES/your_faction/roles.md b/src/main/resources/Server/Languages/es-ES/help/your_faction/roles.md similarity index 100% rename from src/main/help/es-ES/your_faction/roles.md rename to src/main/resources/Server/Languages/es-ES/help/your_faction/roles.md diff --git a/src/main/resources/config.json b/src/main/resources/config.json deleted file mode 100644 index 7d86bcad..00000000 --- a/src/main/resources/config.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "faction": { - "maxMembers": 50, - "maxNameLength": 24, - "minNameLength": 3, - "allowColors": true - }, - "power": { - "maxPlayerPower": 20, - "startingPower": 10, - "powerPerClaim": 2, - "deathPenalty": 1, - "killRewardRequiresFaction": true, - "powerLossOnMobDeath": true, - "powerLossOnEnvironmentalDeath": true, - "regenPerMinute": 0.1, - "regenWhenOffline": false - }, - "claims": { - "maxClaims": 100, - "onlyAdjacent": false, - "decayEnabled": true, - "decayDaysInactive": 30, - "worldWhitelist": [], - "worldBlacklist": [] - }, - "combat": { - "tagDurationSeconds": 15, - "allyDamage": false, - "factionDamage": false, - "taggedLogoutPenalty": true, - "logoutPowerLoss": 1.0 - }, - "teleport": { - "warmupSeconds": 5, - "cooldownSeconds": 300, - "cancelOnMove": true, - "cancelOnDamage": true - }, - "updates": { - "enabled": true, - "url": "https://api.github.com/repos/HyperSystems-Development/HyperFactions/releases/latest", - "hyperProtect": { - "autoDownload": false, - "autoUpdate": true, - "url": "https://api.github.com/repos/HyperSystems-Development/HyperProtect-Mixin/releases/latest" - } - }, - "messages": { - "prefix": "\u00A7b[HyperFactions]\u00A7r ", - "primaryColor": "#00FFFF" - } -} From f6b5bc52292fae5ea5c373fb063ba779e7b89926 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 21:44:24 -0700 Subject: [PATCH 28/55] feat: restructure admin test commands and extend help markdown syntax Restructure /f admin testgui and sentrytest under /f admin test via new AdminTestHandler, adding /f admin test md for a future markdown visual test page. Extend the help system with 9 new markdown entry types: bold, italic, list (bullet + numbered), separator, callout boxes (with colored accent bars), inline hex colors ([#RRGGBB]), named color shortcuts (!warning, !success, !note, !muted), and typed callouts (>[!WARNING], >[!INFO], >[!NOTE], >[!SUCCESS], >[!TIP]). HelpEntry gains a color field for dynamic color overrides. The build-time HelpLangGenerator parses all new syntax and emits color metadata in help-manifest.json. HelpRegistry and HelpMainPage handle the new types at runtime, applying colors to text and callout accent bars. Five new .ui templates support the visual rendering. TIP entries are unified into CALLOUT (backward-compatible: old TIP manifests render as green callouts). --- .../build/HelpLangGenerator.java | 211 +++++++++++++++--- .../command/admin/AdminSubCommand.java | 34 +-- .../admin/handler/AdminTestHandler.java | 114 ++++++++++ .../java/com/hyperfactions/gui/UIPaths.java | 12 + .../com/hyperfactions/gui/help/HelpEntry.java | 68 ++++-- .../hyperfactions/gui/help/HelpRegistry.java | 10 +- .../gui/help/page/HelpMainPage.java | 42 +++- .../HyperFactions/help/help_line_bold.ui | 11 + .../HyperFactions/help/help_line_callout.ui | 18 ++ .../HyperFactions/help/help_line_italic.ui | 11 + .../HyperFactions/help/help_line_list.ui | 12 + .../HyperFactions/help/help_separator.ui | 10 + .../HyperFactions/test/markdown_test.ui | 32 +++ 13 files changed, 507 insertions(+), 78 deletions(-) create mode 100644 src/main/java/com/hyperfactions/command/admin/handler/AdminTestHandler.java create mode 100644 src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_bold.ui create mode 100644 src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_callout.ui create mode 100644 src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_italic.ui create mode 100644 src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_list.ui create mode 100644 src/main/resources/Common/UI/Custom/HyperFactions/help/help_separator.ui create mode 100644 src/main/resources/Common/UI/Custom/HyperFactions/test/markdown_test.ui diff --git a/src/main/java/com/hyperfactions/build/HelpLangGenerator.java b/src/main/java/com/hyperfactions/build/HelpLangGenerator.java index ab8d2b99..1a5bd136 100644 --- a/src/main/java/com/hyperfactions/build/HelpLangGenerator.java +++ b/src/main/java/com/hyperfactions/build/HelpLangGenerator.java @@ -6,19 +6,45 @@ import java.io.IOException; import java.nio.file.*; import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Stream; /** * Build-time tool that converts help markdown files into .lang translation files * and a help-manifest.json for the HyperFactions help system. * - *

Usage: {@code java HelpLangGenerator } + *

Usage: {@code java HelpLangGenerator } * - *

Reads {@code src/main/help/{locale}/{category}/{topic}.md} and produces: + *

Reads {@code Server/Languages/{locale}/help/{category}/{topic}.md} and produces: *

    *
  • {@code {outputDir}/Server/Languages/{locale}/hyperfactions_help.lang}
  • *
  • {@code {outputDir}/help-manifest.json} (generated from en-US only)
  • *
+ * + *

Supported Markdown Syntax

+ *
+ * Plain text              → TEXT
+ * ## Heading              → HEADING
+ * `command`               → COMMAND
+ * **bold text**           → BOLD
+ * *italic text*           → ITALIC
+ * - list item             → LIST
+ * 1. numbered item        → LIST
+ * ---                     → SEPARATOR
+ * [#RRGGBB] text          → TEXT + color
+ * !warning text           → TEXT + #FF5555
+ * !success text           → TEXT + #55FF55
+ * !note text              → TEXT + #55AAFF
+ * !muted text             → TEXT + #888888
+ * > tip text              → CALLOUT + #55FF55
+ * >[!TIP] text            → CALLOUT + #55FF55
+ * >[!WARNING] text        → CALLOUT + #FF5555
+ * >[!INFO] text           → CALLOUT + #55AAFF
+ * >[!NOTE] text           → CALLOUT + #FFAA55
+ * >[!SUCCESS] text        → CALLOUT + #55FF55
+ * blank line              → SPACER
+ * 
*/ public class HelpLangGenerator { @@ -27,10 +53,43 @@ public class HelpLangGenerator { "welcome", "your_faction", "power_land", "diplomacy", "combat", "economy", "quick_ref" ); + /** Pattern for inline hex color: [#RRGGBB] text */ + private static final Pattern HEX_COLOR_PATTERN = Pattern.compile("^\\[#([0-9A-Fa-f]{6})]\\s*(.+)$"); + + /** Pattern for callout with type: >[!TYPE] text */ + private static final Pattern CALLOUT_TYPE_PATTERN = Pattern.compile("^>\\[!([A-Z]+)]\\s*(.+)$"); + + /** Pattern for numbered list: 1. text, 2. text, etc. */ + private static final Pattern NUMBERED_LIST_PATTERN = Pattern.compile("^\\d+\\.\\s+(.+)$"); + + /** Pattern for horizontal rule: 3+ dashes on a line */ + private static final Pattern HR_PATTERN = Pattern.compile("^-{3,}$"); + + /** Named color shortcuts */ + private static final Map NAMED_COLORS = Map.of( + "warning", "#FF5555", + "success", "#55FF55", + "note", "#55AAFF", + "muted", "#888888" + ); + + /** Callout type colors */ + private static final Map CALLOUT_COLORS = Map.of( + "TIP", "#55FF55", + "WARNING", "#FF5555", + "INFO", "#55AAFF", + "NOTE", "#FFAA55", + "SUCCESS", "#55FF55" + ); + // ── Data structures ────────────────────────────────────────────────── /** A single parsed entry from a markdown topic file. */ - record Entry(String type, String key) {} + record Entry(String type, String key, String color) { + Entry(String type, String key) { + this(type, key, null); + } + } /** A fully parsed topic ready for manifest / lang output. */ record Topic( @@ -48,30 +107,33 @@ record Topic( public static void main(String[] args) { if (args.length < 2) { - System.err.println("Usage: HelpLangGenerator "); + System.err.println("Usage: HelpLangGenerator "); System.exit(1); } - Path helpDir = Paths.get(args[0]); + Path langDir = Paths.get(args[0]); Path outputDir = Paths.get(args[1]); - if (!Files.isDirectory(helpDir)) { - System.err.println("Help directory not found: " + helpDir); + if (!Files.isDirectory(langDir)) { + System.err.println("Languages directory not found: " + langDir); System.exit(1); } try { - List locales = listSortedDirectories(helpDir); + // Find locales that have a help/ subdirectory + List locales = listSortedDirectories(langDir).stream() + .filter(d -> Files.isDirectory(langDir.resolve(d).resolve("help"))) + .toList(); if (locales.isEmpty()) { - System.err.println("No locale directories found under " + helpDir); + System.err.println("No locale directories with help/ found under " + langDir); System.exit(1); } - System.out.println("Found locales: " + locales); + System.out.println("Found locales with help content: " + locales); for (String locale : locales) { - Path localeDir = helpDir.resolve(locale); - List topics = parseLocale(localeDir); + Path helpDir = langDir.resolve(locale).resolve("help"); + List topics = parseLocale(helpDir); writeLangFile(outputDir, locale, topics); if ("en-US".equals(locale)) { @@ -124,12 +186,15 @@ private static Topic parseTopic(String category, Path mdFile) throws IOException String id = null; List commands = new ArrayList<>(); int contentStart = 0; + boolean inFrontmatter = false; if (!lines.isEmpty() && "---".equals(lines.get(0).trim())) { + inFrontmatter = true; for (int i = 1; i < lines.size(); i++) { String line = lines.get(i).trim(); if ("---".equals(line)) { contentStart = i + 1; + inFrontmatter = false; break; } if (line.startsWith("id:")) { @@ -187,37 +252,130 @@ private static Topic parseTopic(String category, Path mdFile) throws IOException foundFirstContent = true; - if (trimmed.startsWith("## ")) { - // H2 → HEADING + // ── Order matters: check specific patterns before plain text ── + + // 1. Horizontal rule: --- (3+ dashes, not in frontmatter context) + if (HR_PATTERN.matcher(trimmed).matches()) { + entries.add(new Entry("SEPARATOR", null)); + entryTexts.add(null); + continue; + } + + // 2. Callout with explicit type: >[!WARNING] text, >[!TIP] text, etc. + Matcher calloutMatcher = CALLOUT_TYPE_PATTERN.matcher(trimmed); + if (calloutMatcher.matches()) { + String calloutType = calloutMatcher.group(1); + String text = calloutMatcher.group(2).trim(); + String color = CALLOUT_COLORS.getOrDefault(calloutType, "#55FF55"); lineCounter++; String key = keyPrefix + ".line." + lineCounter; - String text = trimmed.substring(3).trim(); - entries.add(new Entry("HEADING", key)); + entries.add(new Entry("CALLOUT", key, color)); entryTexts.add(text); continue; } - if (trimmed.startsWith("`") && trimmed.endsWith("`") && trimmed.length() > 2) { - // Command line (backtick-wrapped) + // 3. Simple blockquote → CALLOUT (tip shorthand, green) + if (trimmed.startsWith("> ")) { + lineCounter++; + String key = keyPrefix + ".line." + lineCounter; + String text = trimmed.substring(2).trim(); + entries.add(new Entry("CALLOUT", key, "#55FF55")); + entryTexts.add(text); + continue; + } + + // 4. Inline hex color: [#RRGGBB] text + Matcher hexMatcher = HEX_COLOR_PATTERN.matcher(trimmed); + if (hexMatcher.matches()) { + String color = "#" + hexMatcher.group(1); + String text = hexMatcher.group(2).trim(); + lineCounter++; + String key = keyPrefix + ".line." + lineCounter; + entries.add(new Entry("TEXT", key, color)); + entryTexts.add(text); + continue; + } + + // 5. Named color shortcuts: !warning, !success, !note, !muted + if (trimmed.startsWith("!")) { + String rest = trimmed.substring(1); + int spaceIdx = rest.indexOf(' '); + if (spaceIdx > 0) { + String colorName = rest.substring(0, spaceIdx).toLowerCase(); + String color = NAMED_COLORS.get(colorName); + if (color != null) { + String text = rest.substring(spaceIdx + 1).trim(); + lineCounter++; + String key = keyPrefix + ".line." + lineCounter; + entries.add(new Entry("TEXT", key, color)); + entryTexts.add(text); + continue; + } + } + } + + // 6. Bold: **text** (whole line wrapped) + if (trimmed.startsWith("**") && trimmed.endsWith("**") && trimmed.length() > 4) { + lineCounter++; + String key = keyPrefix + ".line." + lineCounter; + String text = trimmed.substring(2, trimmed.length() - 2); + entries.add(new Entry("BOLD", key)); + entryTexts.add(text); + continue; + } + + // 7. Italic: *text* (whole line wrapped, but not bold **) + if (trimmed.startsWith("*") && trimmed.endsWith("*") && !trimmed.startsWith("**") && trimmed.length() > 2) { lineCounter++; String key = keyPrefix + ".line." + lineCounter; String text = trimmed.substring(1, trimmed.length() - 1); - entries.add(new Entry("COMMAND", key)); + entries.add(new Entry("ITALIC", key)); entryTexts.add(text); continue; } - if (trimmed.startsWith("> ")) { - // Blockquote → TIP + // 8. Bullet list: - text + if (trimmed.startsWith("- ")) { lineCounter++; String key = keyPrefix + ".line." + lineCounter; String text = trimmed.substring(2).trim(); - entries.add(new Entry("TIP", key)); + entries.add(new Entry("LIST", key)); entryTexts.add(text); continue; } - // Plain text → TEXT + // 9. Numbered list: 1. text, 2. text, etc. + Matcher numberedMatcher = NUMBERED_LIST_PATTERN.matcher(trimmed); + if (numberedMatcher.matches()) { + lineCounter++; + String key = keyPrefix + ".line." + lineCounter; + // Preserve the number prefix as part of the text + entries.add(new Entry("LIST", key)); + entryTexts.add(trimmed); + continue; + } + + // 10. H2 → HEADING + if (trimmed.startsWith("## ")) { + lineCounter++; + String key = keyPrefix + ".line." + lineCounter; + String text = trimmed.substring(3).trim(); + entries.add(new Entry("HEADING", key)); + entryTexts.add(text); + continue; + } + + // 11. Command line (backtick-wrapped) + if (trimmed.startsWith("`") && trimmed.endsWith("`") && trimmed.length() > 2) { + lineCounter++; + String key = keyPrefix + ".line." + lineCounter; + String text = trimmed.substring(1, trimmed.length() - 1); + entries.add(new Entry("COMMAND", key)); + entryTexts.add(text); + continue; + } + + // 12. Plain text → TEXT lineCounter++; String key = keyPrefix + ".line." + lineCounter; entries.add(new Entry("TEXT", key)); @@ -243,8 +401,8 @@ private static void writeLangFile(Path outputDir, String locale, List top sb.append("# AUTO-GENERATED by HelpLangGenerator — do not edit manually\n\n"); for (Topic topic : topics) { - sb.append("# AUTO-GENERATED from src/main/help/") - .append(locale).append("/") + sb.append("# AUTO-GENERATED from Server/Languages/") + .append(locale).append("/help/") .append(topic.category()).append("/") .append(topic.topic()).append(".md\n"); @@ -287,6 +445,9 @@ private static void writeManifest(Path outputDir, List topics) throws IOE if (entry.key() != null) { entryMap.put("key", "hyperfactions_help." + entry.key()); } + if (entry.color() != null) { + entryMap.put("color", entry.color()); + } entryList.add(entryMap); } topicMap.put("entries", entryList); diff --git a/src/main/java/com/hyperfactions/command/admin/AdminSubCommand.java b/src/main/java/com/hyperfactions/command/admin/AdminSubCommand.java index 42517592..050f4c20 100644 --- a/src/main/java/com/hyperfactions/command/admin/AdminSubCommand.java +++ b/src/main/java/com/hyperfactions/command/admin/AdminSubCommand.java @@ -11,6 +11,7 @@ import com.hyperfactions.command.admin.handler.AdminIntegrationHandler; import com.hyperfactions.command.admin.handler.AdminMapDecayHandler; import com.hyperfactions.command.admin.handler.AdminPowerHandler; +import com.hyperfactions.command.admin.handler.AdminTestHandler; import com.hyperfactions.command.admin.handler.AdminUpdateHandler; import com.hyperfactions.command.admin.handler.AdminWorldHandler; import com.hyperfactions.command.admin.handler.AdminZoneHandler; @@ -73,6 +74,8 @@ public class AdminSubCommand extends AbstractAsyncCommand { private final AdminMapDecayHandler mapDecayHandler; + private final AdminTestHandler testHandler; + private final AdminWorldHandler worldHandler; /** Creates a new AdminSubCommand. */ @@ -92,6 +95,7 @@ public AdminSubCommand(@NotNull HyperFactions hyperFactions, @NotNull HyperFacti this.powerHandler = new AdminPowerHandler(hyperFactions, plugin); this.economyHandler = new AdminEconomyHandler(hyperFactions); this.mapDecayHandler = new AdminMapDecayHandler(hyperFactions); + this.testHandler = new AdminTestHandler(hyperFactions); this.worldHandler = new AdminWorldHandler(hyperFactions); } @@ -268,15 +272,7 @@ private void dispatchCommand(@NotNull CommandContext ctx, @Nullable Store { - if (!requirePlayer(ctx, isPlayer)) { - break; - } - Player playerEntity = store.getComponent(ref, Player.getComponentType()); - if (playerEntity != null) { - hyperFactions.getGuiManager().openButtonTestPage(playerEntity, ref, store, player); - } - } + case "test" -> testHandler.handleTest(ctx, store, ref, player, subArgs, isPlayer); case "safezone" -> { if (requirePlayer(ctx, isPlayer)) zoneHandler.handleSafezone(ctx, player, currentWorld, chunkX, chunkZ, args); } case "warzone" -> { if (requirePlayer(ctx, isPlayer)) zoneHandler.handleWarzone(ctx, player, currentWorld, chunkX, chunkZ, args); } case "removezone" -> { if (requirePlayer(ctx, isPlayer)) zoneHandler.handleRemovezone(ctx, currentWorld, chunkX, chunkZ); } @@ -287,7 +283,6 @@ private void dispatchCommand(@NotNull CommandContext ctx, @Nullable Store worldHandler.handleAdminWorld(ctx, player, subArgs); case "version" -> handleVersion(ctx, store, ref, player, isPlayer); case "sentry" -> handleSentry(ctx, subArgs); - case "sentrytest" -> handleSentryTest(ctx); case "log", "logs", "activitylog" -> { if (!requirePlayer(ctx, isPlayer)) { break; @@ -383,7 +378,9 @@ private void showAdminHelp(CommandContext ctx) { 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 sentrytest", "Send a test error to Sentry")); + 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)); } @@ -457,21 +454,6 @@ private void handleSentry(CommandContext ctx, String[] args) { } } - // === Sentry Test === - private void handleSentryTest(CommandContext ctx) { - if (!SentryIntegration.isInitialized()) { - ctx.sendMessage(prefix().insert(msg("Sentry is not initialized. Check config/debug.json", 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))); - } else { - ctx.sendMessage(prefix().insert(msg("Failed to send test event.", COLOR_RED))); - } - } - // === Reload === private void handleReload(CommandContext ctx, PlayerRef player) { if (!hasPermission(player, Permissions.ADMIN)) { diff --git a/src/main/java/com/hyperfactions/command/admin/handler/AdminTestHandler.java b/src/main/java/com/hyperfactions/command/admin/handler/AdminTestHandler.java new file mode 100644 index 00000000..18462b93 --- /dev/null +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminTestHandler.java @@ -0,0 +1,114 @@ +package com.hyperfactions.command.admin.handler; + +import com.hyperfactions.HyperFactions; +import com.hyperfactions.command.util.CommandUtil; +import com.hyperfactions.integration.SentryIntegration; +import com.hyperfactions.util.CommandHelp; +import com.hyperfactions.util.HelpFormatter; +import com.hypixel.hytale.component.Ref; +import com.hypixel.hytale.component.Store; +import com.hypixel.hytale.server.core.Message; +import com.hypixel.hytale.server.core.command.system.CommandContext; +import com.hypixel.hytale.server.core.entity.entities.Player; +import com.hypixel.hytale.server.core.universe.PlayerRef; +import com.hypixel.hytale.server.core.universe.world.storage.EntityStore; +import java.util.ArrayList; +import java.util.List; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Handles /f admin test subcommands: gui, sentry, md. + */ +public class AdminTestHandler { + + private final HyperFactions hyperFactions; + + private static final String COLOR_CYAN = CommandUtil.COLOR_CYAN; + + private static final String COLOR_GREEN = CommandUtil.COLOR_GREEN; + + private static final String COLOR_RED = CommandUtil.COLOR_RED; + + private static final String COLOR_YELLOW = CommandUtil.COLOR_YELLOW; + + private static final String COLOR_GRAY = CommandUtil.COLOR_GRAY; + + private static Message prefix() { + return CommandUtil.prefix(); + } + + private static Message msg(String text, String color) { + return CommandUtil.msg(text, color); + } + + /** Creates a new AdminTestHandler. */ + public AdminTestHandler(@NotNull HyperFactions hyperFactions) { + this.hyperFactions = hyperFactions; + } + + /** + * Dispatches /f admin test subcommands. + */ + public void handleTest(@NotNull CommandContext ctx, @Nullable Store store, + @Nullable Ref ref, @Nullable PlayerRef player, + @NotNull String[] subArgs, boolean isPlayer) { + if (subArgs.length == 0) { + showTestHelp(ctx); + return; + } + + switch (subArgs[0].toLowerCase()) { + case "gui" -> handleTestGui(ctx, store, ref, player, isPlayer); + case "sentry" -> handleSentryTest(ctx); + case "md", "markdown" -> handleMarkdownTest(ctx, store, ref, player, isPlayer); + default -> showTestHelp(ctx); + } + } + + 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))); + return; + } + Player playerEntity = store.getComponent(ref, Player.getComponentType()); + if (playerEntity != null) { + hyperFactions.getGuiManager().openButtonTestPage(playerEntity, ref, store, player); + } + } + + private void handleSentryTest(CommandContext ctx) { + if (!SentryIntegration.isInitialized()) { + ctx.sendMessage(prefix().insert(msg("Sentry is not initialized. Check config/debug.json", 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))); + } else { + ctx.sendMessage(prefix().insert(msg("Failed to send test event.", 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))); + return; + } + Player playerEntity = store.getComponent(ref, Player.getComponentType()); + if (playerEntity != null) { + hyperFactions.getGuiManager().openMarkdownTestPage(playerEntity, ref, store, player); + } + } + + private void showTestHelp(CommandContext ctx) { + 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)); + } +} diff --git a/src/main/java/com/hyperfactions/gui/UIPaths.java b/src/main/java/com/hyperfactions/gui/UIPaths.java index f55799dd..81feb523 100644 --- a/src/main/java/com/hyperfactions/gui/UIPaths.java +++ b/src/main/java/com/hyperfactions/gui/UIPaths.java @@ -174,6 +174,16 @@ private UIPaths() {} public static final String HELP_SPACER = BASE + "help/help_spacer.ui"; + public static final String HELP_LINE_BOLD = BASE + "help/help_line_bold.ui"; + + public static final String HELP_LINE_ITALIC = BASE + "help/help_line_italic.ui"; + + public static final String HELP_LINE_LIST = BASE + "help/help_line_list.ui"; + + public static final String HELP_SEPARATOR = BASE + "help/help_separator.ui"; + + public static final String HELP_LINE_CALLOUT = BASE + "help/help_line_callout.ui"; + // ── Admin pages ───────────────────────────────────────────────────────── public static final String ADMIN_MAIN = BASE + "admin/admin_main.ui"; @@ -255,4 +265,6 @@ private UIPaths() {} // ── Test ──────────────────────────────────────────────────────────────── public static final String BUTTON_TEST = BASE + "test/button_test.ui"; + + public static final String MARKDOWN_TEST = BASE + "test/markdown_test.ui"; } diff --git a/src/main/java/com/hyperfactions/gui/help/HelpEntry.java b/src/main/java/com/hyperfactions/gui/help/HelpEntry.java index 0df48b59..7ea6e53a 100644 --- a/src/main/java/com/hyperfactions/gui/help/HelpEntry.java +++ b/src/main/java/com/hyperfactions/gui/help/HelpEntry.java @@ -10,9 +10,10 @@ * doesn't rely on fragile string-prefix detection. * * @param type The visual type of this entry - * @param messageKey The HelpMessages key for this entry's text (ignored for SPACER) + * @param messageKey The HelpMessages key for this entry's text (ignored for SPACER/SEPARATOR) + * @param color Optional color override (hex string like "#FF5555"), null for default */ -public record HelpEntry(@NotNull EntryType type, @NotNull String messageKey) { +public record HelpEntry(@NotNull EntryType type, @NotNull String messageKey, @Nullable String color) { /** * Visual types for help content lines. @@ -22,22 +23,30 @@ public enum EntryType { TEXT, /** Command callout (#FFFF55, bold). */ COMMAND, - /** Green tip/advice text (#55FF55). */ - TIP, /** Bold sub-heading within a card (#00AAAA). */ HEADING, /** Visual separator (no text). */ - SPACER + SPACER, + /** Bold text (#CCCCCC, bold). */ + BOLD, + /** Italic text (#CCCCCC, italic). */ + ITALIC, + /** List item with indent (#CCCCCC). */ + LIST, + /** Horizontal rule separator (no text). */ + SEPARATOR, + /** Boxed callout with colored accent bar. */ + CALLOUT } /** * Gets the resolved display text for this entry (server default language). * - * @return The localized text, or empty string for spacers + * @return The localized text, or empty string for spacers/separators */ @NotNull public String text() { - return type == EntryType.SPACER ? "" : HelpMessages.get(messageKey); + return type == EntryType.SPACER || type == EntryType.SEPARATOR ? "" : HelpMessages.get(messageKey); } /** @@ -45,31 +54,56 @@ public String text() { */ @NotNull public String text(@Nullable PlayerRef playerRef) { - return type == EntryType.SPACER ? "" : HelpMessages.get(playerRef, messageKey); + return type == EntryType.SPACER || type == EntryType.SEPARATOR ? "" : HelpMessages.get(playerRef, messageKey); } /** Creates a TEXT entry. */ public static HelpEntry text(@NotNull String messageKey) { - return new HelpEntry(EntryType.TEXT, messageKey); + return new HelpEntry(EntryType.TEXT, messageKey, null); } /** Creates a COMMAND entry. */ public static HelpEntry command(@NotNull String messageKey) { - return new HelpEntry(EntryType.COMMAND, messageKey); - } - - /** Creates a TIP entry. */ - public static HelpEntry tip(@NotNull String messageKey) { - return new HelpEntry(EntryType.TIP, messageKey); + return new HelpEntry(EntryType.COMMAND, messageKey, null); } /** Creates a HEADING entry. */ public static HelpEntry heading(@NotNull String messageKey) { - return new HelpEntry(EntryType.HEADING, messageKey); + return new HelpEntry(EntryType.HEADING, messageKey, null); } /** Creates a SPACER entry. */ public static HelpEntry spacer() { - return new HelpEntry(EntryType.SPACER, ""); + return new HelpEntry(EntryType.SPACER, "", null); + } + + /** Creates a BOLD entry. */ + public static HelpEntry bold(@NotNull String messageKey) { + return new HelpEntry(EntryType.BOLD, messageKey, null); + } + + /** Creates an ITALIC entry. */ + public static HelpEntry italic(@NotNull String messageKey) { + return new HelpEntry(EntryType.ITALIC, messageKey, null); + } + + /** Creates a LIST entry. */ + public static HelpEntry list(@NotNull String messageKey) { + return new HelpEntry(EntryType.LIST, messageKey, null); + } + + /** Creates a SEPARATOR entry. */ + public static HelpEntry separator() { + return new HelpEntry(EntryType.SEPARATOR, "", null); + } + + /** Creates a CALLOUT entry with a color. */ + public static HelpEntry callout(@NotNull String messageKey, @Nullable String color) { + return new HelpEntry(EntryType.CALLOUT, messageKey, color); + } + + /** Creates a TEXT entry with a custom color. */ + public static HelpEntry colored(@NotNull String messageKey, @NotNull String color) { + return new HelpEntry(EntryType.TEXT, messageKey, color); } } diff --git a/src/main/java/com/hyperfactions/gui/help/HelpRegistry.java b/src/main/java/com/hyperfactions/gui/help/HelpRegistry.java index c9f7b425..e849c71b 100644 --- a/src/main/java/com/hyperfactions/gui/help/HelpRegistry.java +++ b/src/main/java/com/hyperfactions/gui/help/HelpRegistry.java @@ -138,13 +138,19 @@ private HelpTopic parseTopic(@NotNull JsonObject topicObj) { JsonObject entryObj = entryElement.getAsJsonObject(); String type = entryObj.get("type").getAsString(); String key = entryObj.has("key") ? entryObj.get("key").getAsString() : ""; + String color = entryObj.has("color") ? entryObj.get("color").getAsString() : null; HelpEntry entry = switch (type) { - case "TEXT" -> HelpEntry.text(key); + case "TEXT" -> color != null ? HelpEntry.colored(key, color) : HelpEntry.text(key); case "COMMAND" -> HelpEntry.command(key); - case "TIP" -> HelpEntry.tip(key); + case "TIP" -> HelpEntry.callout(key, "#55FF55"); // backward compat case "HEADING" -> HelpEntry.heading(key); case "SPACER" -> HelpEntry.spacer(); + case "BOLD" -> HelpEntry.bold(key); + case "ITALIC" -> HelpEntry.italic(key); + case "LIST" -> HelpEntry.list(key); + case "SEPARATOR" -> HelpEntry.separator(); + case "CALLOUT" -> HelpEntry.callout(key, color); default -> null; }; if (entry != null) { 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 b6deddd3..a36a806d 100644 --- a/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java +++ b/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java @@ -39,12 +39,20 @@ public class HelpMainPage extends InteractiveCustomUIPage { private static final String TPL_LINE_COMMAND = UIPaths.HELP_LINE_COMMAND; - private static final String TPL_LINE_TIP = UIPaths.HELP_LINE_TIP; - private static final String TPL_LINE_HEADING = UIPaths.HELP_LINE_HEADING; private static final String TPL_SPACER = UIPaths.HELP_SPACER; + private static final String TPL_LINE_BOLD = UIPaths.HELP_LINE_BOLD; + + private static final String TPL_LINE_ITALIC = UIPaths.HELP_LINE_ITALIC; + + private static final String TPL_LINE_LIST = UIPaths.HELP_LINE_LIST; + + private static final String TPL_SEPARATOR = UIPaths.HELP_SEPARATOR; + + private static final String TPL_LINE_CALLOUT = UIPaths.HELP_LINE_CALLOUT; + private final PlayerRef playerRef; private final GuiManager guiManager; @@ -162,13 +170,27 @@ private void buildTopicCards(UICommandBuilder cmd) { String template = getTemplateForType(entry.type()); cmd.append(linesContainer, template); - if (entry.type() != HelpEntry.EntryType.SPACER) { + String selector = linesContainer + "[" + lineIndex + "]"; + + if (entry.type() != HelpEntry.EntryType.SPACER && entry.type() != HelpEntry.EntryType.SEPARATOR) { String text = entry.text(playerRef); - // Prefix tips with >> for visual distinction - if (entry.type() == HelpEntry.EntryType.TIP) { - text = ">> " + text; + + // Add bullet prefix for unordered list items + if (entry.type() == HelpEntry.EntryType.LIST && !text.matches("^\\d+\\.\\s.*")) { + text = "\u2022 " + text; + } + + cmd.set(selector + " #Text.Text", text); + + // Apply color override if present + if (entry.color() != null) { + cmd.set(selector + " #Text.Style.TextColor", entry.color()); + + // For callouts, also color the accent bar + if (entry.type() == HelpEntry.EntryType.CALLOUT) { + cmd.set(selector + " #AccentBar.Background.Color", entry.color()); + } } - cmd.set(linesContainer + "[" + lineIndex + "] #Text.Text", text); } lineIndex++; } @@ -183,9 +205,13 @@ private String getTemplateForType(HelpEntry.EntryType type) { return switch (type) { case TEXT -> TPL_LINE_TEXT; case COMMAND -> TPL_LINE_COMMAND; - case TIP -> TPL_LINE_TIP; case HEADING -> TPL_LINE_HEADING; case SPACER -> TPL_SPACER; + case BOLD -> TPL_LINE_BOLD; + case ITALIC -> TPL_LINE_ITALIC; + case LIST -> TPL_LINE_LIST; + case SEPARATOR -> TPL_SEPARATOR; + case CALLOUT -> TPL_LINE_CALLOUT; }; } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_bold.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_bold.ui new file mode 100644 index 00000000..a797018d --- /dev/null +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_bold.ui @@ -0,0 +1,11 @@ +// Help content line - bold text (gray, bold) + +Group { + Anchor: (Height: 16); + + Label #Text { + Text: ""; + Style: (FontSize: 11, TextColor: #CCCCCC, RenderBold: true); + Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + } +} diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_callout.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_callout.ui new file mode 100644 index 00000000..68b07331 --- /dev/null +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_callout.ui @@ -0,0 +1,18 @@ +// Help content line - callout box with colored left accent bar + +Group { + Anchor: (Height: 22, Top: 2, Bottom: 2); + Padding: (Left: 12); + Background: (Color: #1a2a1a); + + Group #AccentBar { + Anchor: (Width: 3, Top: 0, Bottom: 0, Left: 0); + Background: (Color: #55FF55); + } + + Label #Text { + Text: ""; + Style: (FontSize: 11, TextColor: #55FF55); + Anchor: (Left: 10, Right: 4, Top: 0, Bottom: 0); + } +} diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_italic.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_italic.ui new file mode 100644 index 00000000..144846d0 --- /dev/null +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_italic.ui @@ -0,0 +1,11 @@ +// Help content line - italic text (gray, italic) + +Group { + Anchor: (Height: 16); + + Label #Text { + Text: ""; + Style: (FontSize: 11, TextColor: #CCCCCC, RenderItalics: true); + Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + } +} diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_list.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_list.ui new file mode 100644 index 00000000..81982732 --- /dev/null +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_list.ui @@ -0,0 +1,12 @@ +// Help content line - list item with left indent + +Group { + Anchor: (Height: 16); + Padding: (Left: 12); + + Label #Text { + Text: ""; + Style: (FontSize: 11, TextColor: #CCCCCC); + Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + } +} diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_separator.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_separator.ui new file mode 100644 index 00000000..85f6ca9a --- /dev/null +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_separator.ui @@ -0,0 +1,10 @@ +// Help separator - visible horizontal rule + +Group { + Anchor: (Height: 10); + + Group { + Anchor: (Height: 1, Left: 4, Right: 4, Top: 4); + Background: (Color: #2a3a4a); + } +} diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/test/markdown_test.ui b/src/main/resources/Common/UI/Custom/HyperFactions/test/markdown_test.ui new file mode 100644 index 00000000..1796fe9c --- /dev/null +++ b/src/main/resources/Common/UI/Custom/HyperFactions/test/markdown_test.ui @@ -0,0 +1,32 @@ +// Markdown rendering test page — /f admin test md +$C = "../../Common.ui"; + +Group { + Anchor: (Width: 700, Height: 650); + Background: (Color: #0d1117); + + // Title bar + Group { + Anchor: (Height: 40); + Background: (Color: #161b22); + + Label #PageTitle { + Text: "Markdown Test Page"; + Style: (FontSize: 14, TextColor: #00AAAA, RenderBold: true, HorizontalAlignment: Center, VerticalAlignment: Center); + Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + } + } + + // Scrollable content area + Group { + Anchor: (Top: 44, Left: 12, Right: 12, Bottom: 12); + LayoutMode: TopScrolling; + ScrollbarStyle: $C.@DefaultScrollbarStyle; + + // Content entries appended here by Java + Group #ContentList { + LayoutMode: Top; + Anchor: (Left: 0, Right: 0); + } + } +} From b31839e9681398925ed64ae971a894fe55918585 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 21:46:06 -0700 Subject: [PATCH 29/55] feat: add markdown rendering test page (/f admin test md) Visual test page that renders every supported help markdown entry type using the real .ui templates. Shows syntax labels alongside rendered output for verification: text, heading, command, bold, italic, bullet/numbered lists, separators, hex colors, named color shortcuts, and all callout box types. Includes edge cases for text wrapping and mixed content flow. --- .../hyperfactions/gui/FactionPageOpener.java | 17 +- .../com/hyperfactions/gui/GuiManager.java | 8 +- .../gui/test/MarkdownTestPage.java | 311 ++++++++++++++++++ 3 files changed, 334 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/hyperfactions/gui/test/MarkdownTestPage.java diff --git a/src/main/java/com/hyperfactions/gui/FactionPageOpener.java b/src/main/java/com/hyperfactions/gui/FactionPageOpener.java index 0d06e1cb..03a6fe95 100644 --- a/src/main/java/com/hyperfactions/gui/FactionPageOpener.java +++ b/src/main/java/com/hyperfactions/gui/FactionPageOpener.java @@ -13,6 +13,7 @@ import com.hyperfactions.gui.newplayer.page.*; import com.hyperfactions.gui.shared.page.*; import com.hyperfactions.gui.test.ButtonTestPage; +import com.hyperfactions.gui.test.MarkdownTestPage; import com.hyperfactions.manager.*; import com.hyperfactions.storage.PlayerStorage; import com.hyperfactions.util.ErrorHandler; @@ -1012,7 +1013,6 @@ public void openPlayerInfo(Player player, Ref ref, /** * Opens the button style test page. - * Temporary — DELETE after testing is complete. */ public void openButtonTestPage(Player player, Ref ref, Store store, PlayerRef playerRef) { @@ -1026,4 +1026,19 @@ public void openButtonTestPage(Player player, Ref ref, } } + /** + * Opens the markdown rendering test page. + */ + public void openMarkdownTestPage(Player player, Ref ref, + Store store, PlayerRef playerRef) { + Logger.info("[GUI] Opening MarkdownTestPage for %s", playerRef.getUsername()); + try { + PageManager pageManager = player.getPageManager(); + MarkdownTestPage page = new MarkdownTestPage(playerRef); + pageManager.openCustomPage(ref, store, page); + } catch (Exception e) { + ErrorHandler.report("[GUI] Failed to open MarkdownTestPage", e); + } + } + } diff --git a/src/main/java/com/hyperfactions/gui/GuiManager.java b/src/main/java/com/hyperfactions/gui/GuiManager.java index df7a2703..af6ed713 100644 --- a/src/main/java/com/hyperfactions/gui/GuiManager.java +++ b/src/main/java/com/hyperfactions/gui/GuiManager.java @@ -1128,12 +1128,18 @@ public void openHelp(Player player, Ref ref, newPlayerPageOpener.openHelp(player, ref, store, playerRef, category); } - /** Opens the button test page page. */ + /** Opens the button test page. */ public void openButtonTestPage(Player player, Ref ref, Store store, PlayerRef playerRef) { factionPageOpener.openButtonTestPage(player, ref, store, playerRef); } + /** Opens the markdown rendering test page. */ + public void openMarkdownTestPage(Player player, Ref ref, + Store store, PlayerRef playerRef) { + factionPageOpener.openMarkdownTestPage(player, ref, store, playerRef); + } + /** * Closes the current page. * diff --git a/src/main/java/com/hyperfactions/gui/test/MarkdownTestPage.java b/src/main/java/com/hyperfactions/gui/test/MarkdownTestPage.java new file mode 100644 index 00000000..68442263 --- /dev/null +++ b/src/main/java/com/hyperfactions/gui/test/MarkdownTestPage.java @@ -0,0 +1,311 @@ +package com.hyperfactions.gui.test; + +import com.hyperfactions.gui.UIPaths; +import com.hyperfactions.gui.help.HelpEntry; +import com.hyperfactions.gui.help.HelpEntry.EntryType; +import com.hyperfactions.gui.shared.data.PlaceholderData; +import com.hypixel.hytale.component.Ref; +import com.hypixel.hytale.component.Store; +import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; +import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; +import com.hypixel.hytale.server.core.ui.builder.UICommandBuilder; +import com.hypixel.hytale.server.core.ui.builder.UIEventBuilder; +import com.hypixel.hytale.server.core.universe.PlayerRef; +import com.hypixel.hytale.server.core.universe.world.storage.EntityStore; +import java.util.ArrayList; +import java.util.List; + +/** + * Visual test page that renders every supported markdown entry type + * using the real help templates. Serves as both a verification tool + * and documentation for markdown authors. + * + *

Open via: /f admin test md + */ +public class MarkdownTestPage extends InteractiveCustomUIPage { + + // Template paths + private static final String TPL_LINE_TEXT = UIPaths.HELP_LINE_TEXT; + private static final String TPL_LINE_COMMAND = UIPaths.HELP_LINE_COMMAND; + private static final String TPL_LINE_HEADING = UIPaths.HELP_LINE_HEADING; + private static final String TPL_SPACER = UIPaths.HELP_SPACER; + private static final String TPL_LINE_BOLD = UIPaths.HELP_LINE_BOLD; + private static final String TPL_LINE_ITALIC = UIPaths.HELP_LINE_ITALIC; + private static final String TPL_LINE_LIST = UIPaths.HELP_LINE_LIST; + private static final String TPL_SEPARATOR = UIPaths.HELP_SEPARATOR; + private static final String TPL_LINE_CALLOUT = UIPaths.HELP_LINE_CALLOUT; + + /** Creates a new MarkdownTestPage. */ + public MarkdownTestPage(PlayerRef playerRef) { + super(playerRef, CustomPageLifetime.CanDismiss, PlaceholderData.CODEC); + } + + @Override + public void build(Ref ref, UICommandBuilder cmd, + UIEventBuilder events, Store store) { + cmd.append(UIPaths.MARKDOWN_TEST); + + List entries = buildTestEntries(); + int index = 0; + + for (TestEntry entry : entries) { + if (entry.isSyntaxLabel) { + // Syntax label — rendered as muted gray text + cmd.append("#ContentList", TPL_LINE_TEXT); + String selector = "#ContentList[" + index + "]"; + cmd.set(selector + " #Text.Text", entry.text); + cmd.set(selector + " #Text.Style.TextColor", "#666666"); + cmd.set(selector + " #Text.Style.FontSize", 10); + index++; + continue; + } + + // Real rendered entry using the appropriate template + String template = getTemplateForType(entry.type); + cmd.append("#ContentList", template); + String selector = "#ContentList[" + index + "]"; + + if (entry.type != EntryType.SPACER && entry.type != EntryType.SEPARATOR) { + String text = entry.text; + + // Add bullet prefix for unordered list items + if (entry.type == EntryType.LIST && !text.matches("^\\d+\\.\\s.*")) { + text = "\u2022 " + text; + } + + cmd.set(selector + " #Text.Text", text); + + // Apply color override + if (entry.color != null) { + cmd.set(selector + " #Text.Style.TextColor", entry.color); + + if (entry.type == EntryType.CALLOUT) { + cmd.set(selector + " #AccentBar.Background.Color", entry.color); + } + } + } + index++; + } + } + + @Override + public void handleDataEvent(Ref ref, Store store, + PlaceholderData data) { + sendUpdate(); + } + + private String getTemplateForType(EntryType type) { + return switch (type) { + case TEXT -> TPL_LINE_TEXT; + case COMMAND -> TPL_LINE_COMMAND; + case HEADING -> TPL_LINE_HEADING; + case SPACER -> TPL_SPACER; + case BOLD -> TPL_LINE_BOLD; + case ITALIC -> TPL_LINE_ITALIC; + case LIST -> TPL_LINE_LIST; + case SEPARATOR -> TPL_SEPARATOR; + case CALLOUT -> TPL_LINE_CALLOUT; + }; + } + + /** + * Builds the comprehensive list of test entries. + * Each section: gray syntax label, then the rendered result. + */ + private List buildTestEntries() { + List entries = new ArrayList<>(); + + // ── Section: Basic Entry Types ── + section(entries, "BASIC ENTRY TYPES"); + + syntax(entries, "Plain text"); + entry(entries, EntryType.TEXT, "This is a plain text line."); + + syntax(entries, "Plain text (second line)"); + entry(entries, EntryType.TEXT, "Another text line to verify stacking."); + + syntax(entries, "(blank line)"); + entry(entries, EntryType.SPACER, ""); + + syntax(entries, "## Sub-Heading"); + entry(entries, EntryType.HEADING, "Sub-Heading"); + + syntax(entries, "`/f create `"); + entry(entries, EntryType.COMMAND, "/f create "); + + syntax(entries, "`/f claim`"); + entry(entries, EntryType.COMMAND, "/f claim"); + + entry(entries, EntryType.SPACER, ""); + + // ── Section: Text Formatting ── + section(entries, "TEXT FORMATTING"); + + syntax(entries, "**This text is bold**"); + entry(entries, EntryType.BOLD, "This text is bold"); + + syntax(entries, "*This text is italicized*"); + entry(entries, EntryType.ITALIC, "This text is italicized"); + + entry(entries, EntryType.SPACER, ""); + + // ── Section: Lists ── + section(entries, "LISTS"); + + syntax(entries, "- First bullet item"); + entry(entries, EntryType.LIST, "First bullet item"); + + syntax(entries, "- Second bullet item"); + entry(entries, EntryType.LIST, "Second bullet item"); + + syntax(entries, "- Third bullet item"); + entry(entries, EntryType.LIST, "Third bullet item"); + + entry(entries, EntryType.SPACER, ""); + + syntax(entries, "1. First numbered item"); + entry(entries, EntryType.LIST, "1. First numbered item"); + + syntax(entries, "2. Second numbered item"); + entry(entries, EntryType.LIST, "2. Second numbered item"); + + syntax(entries, "3. Third numbered item"); + entry(entries, EntryType.LIST, "3. Third numbered item"); + + entry(entries, EntryType.SPACER, ""); + + // ── Section: Separators ── + section(entries, "SEPARATORS"); + + syntax(entries, "---"); + entry(entries, EntryType.SEPARATOR, ""); + + syntax(entries, "Text after separator"); + entry(entries, EntryType.TEXT, "Content continues after the horizontal rule."); + + entry(entries, EntryType.SPACER, ""); + + // ── Section: Inline Hex Colors ── + section(entries, "INLINE HEX COLORS"); + + syntax(entries, "[#FF5555] Red text"); + colored(entries, "Red colored text", "#FF5555"); + + syntax(entries, "[#55AAFF] Blue text"); + colored(entries, "Blue colored text", "#55AAFF"); + + syntax(entries, "[#FFAA55] Orange text"); + colored(entries, "Orange colored text", "#FFAA55"); + + syntax(entries, "[#AA55FF] Purple text"); + colored(entries, "Purple colored text", "#AA55FF"); + + entry(entries, EntryType.SPACER, ""); + + // ── Section: Named Color Shortcuts ── + section(entries, "NAMED COLOR SHORTCUTS"); + + syntax(entries, "!warning This is a warning"); + colored(entries, "This is a warning", "#FF5555"); + + syntax(entries, "!success This is a success message"); + colored(entries, "This is a success message", "#55FF55"); + + syntax(entries, "!note This is a note"); + colored(entries, "This is a note", "#55AAFF"); + + syntax(entries, "!muted This is muted/dimmed text"); + colored(entries, "This is muted/dimmed text", "#888888"); + + entry(entries, EntryType.SPACER, ""); + + // ── Section: Callout Boxes ── + section(entries, "CALLOUT BOXES"); + + syntax(entries, "> This is a tip (shorthand)"); + callout(entries, "This is a tip", "#55FF55"); + + syntax(entries, ">[!TIP] This is an explicit tip"); + callout(entries, "This is an explicit tip", "#55FF55"); + + syntax(entries, ">[!WARNING] Don't log out while combat tagged!"); + callout(entries, "Don't log out while combat tagged!", "#FF5555"); + + syntax(entries, ">[!INFO] Allies can access your chests"); + callout(entries, "Allies can access your chests", "#55AAFF"); + + syntax(entries, ">[!NOTE] Officers can invite new members"); + callout(entries, "Officers can invite new members", "#FFAA55"); + + syntax(entries, ">[!SUCCESS] Territory claimed successfully"); + callout(entries, "Territory claimed successfully", "#55FF55"); + + entry(entries, EntryType.SPACER, ""); + + // ── Section: Edge Cases ── + section(entries, "EDGE CASES"); + + syntax(entries, "Long text line (wrapping test)"); + entry(entries, EntryType.TEXT, + "This is a very long text line intended to test whether the help system properly handles text that extends beyond the visible width of the content container, requiring wrapping or truncation."); + + syntax(entries, "Long command (wrapping test)"); + entry(entries, EntryType.COMMAND, + "/f admin economy set --confirm --force --reason \"testing\""); + + syntax(entries, "Long list item (wrapping test)"); + entry(entries, EntryType.LIST, + "This is a long bullet point that tests how list items with significant amounts of text wrap within the indented list template."); + + syntax(entries, "Long callout (wrapping test)"); + callout(entries, "This is a very long callout box to verify that the text inside properly wraps within the callout container with its accent bar and padding.", "#55AAFF"); + + entry(entries, EntryType.SPACER, ""); + + // ── Section: Mixed Content Flow ── + section(entries, "MIXED CONTENT FLOW"); + + entry(entries, EntryType.TEXT, "Create a faction to get started with territory control."); + entry(entries, EntryType.COMMAND, "/f create "); + entry(entries, EntryType.TEXT, "Then claim your first chunk of land:"); + callout(entries, "Stand in the chunk you want to claim before running the command.", "#55FF55"); + + entry(entries, EntryType.SPACER, ""); + entry(entries, EntryType.SPACER, ""); + + syntax(entries, "Double spacer above, then heading after separator:"); + entry(entries, EntryType.SEPARATOR, ""); + entry(entries, EntryType.HEADING, "New Section After Rule"); + entry(entries, EntryType.TEXT, "Content in the new section."); + + return entries; + } + + // ── Helper methods ── + + private void section(List entries, String title) { + entries.add(new TestEntry(EntryType.HEADING, title, null, false)); + entries.add(new TestEntry(EntryType.SEPARATOR, "", null, false)); + } + + private void syntax(List entries, String markdown) { + entries.add(new TestEntry(null, markdown, null, true)); + } + + private void entry(List entries, EntryType type, String text) { + entries.add(new TestEntry(type, text, null, false)); + } + + private void colored(List entries, String text, String color) { + entries.add(new TestEntry(EntryType.TEXT, text, color, false)); + } + + private void callout(List entries, String text, String color) { + entries.add(new TestEntry(EntryType.CALLOUT, text, color, false)); + } + + /** + * A test entry that can either be a syntax label or a real rendered entry. + */ + private record TestEntry(EntryType type, String text, String color, boolean isSyntaxLabel) {} +} From e58857a4e1fed94c654c8ca2efd5e545e1504588 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 21:48:18 -0700 Subject: [PATCH 30/55] docs: add help markdown style guide and move translation guide to docs/ Add docs/help-markdown.md covering the full help markdown syntax (bold, italic, lists, separators, colors, callouts) with examples. Move TRANSLATION_GUIDE.md to docs/translation-guide.md and update it with the new syntax types and clear guidance on what to translate vs. what to keep (color codes, callout type tags, named shortcuts stay in English across all locales). --- docs/help-markdown.md | 160 ++++++++++++++++++ .../translation-guide.md | 84 +++++---- 2 files changed, 212 insertions(+), 32 deletions(-) create mode 100644 docs/help-markdown.md rename TRANSLATION_GUIDE.md => docs/translation-guide.md (69%) diff --git a/docs/help-markdown.md b/docs/help-markdown.md new file mode 100644 index 00000000..f16da193 --- /dev/null +++ b/docs/help-markdown.md @@ -0,0 +1,160 @@ +# Help Markdown Style Guide + +Reference for content authors writing HyperFactions help topics. + +Help files are located at `src/main/resources/Server/Languages/{locale}/help/{category}/{topic}.md` and compiled into `.lang` files and `help-manifest.json` at build time by `HelpLangGenerator`. + +## Frontmatter + +Every topic file starts with YAML frontmatter: + +```markdown +--- +id: welcome_started +commands: gui, menu, create +--- +``` + +- `id` — Unique topic identifier (optional, defaults to `{category}_{filename}`) +- `commands` — Comma-separated list of command names that deep-link to this topic + +## Syntax Reference + +### Basic Entry Types + +| Syntax | Type | Default Color | Style | +|---|---|---|---| +| Plain text | TEXT | #CCCCCC | normal | +| `## Heading` | HEADING | #00AAAA | bold | +| `` `command` `` | COMMAND | #FFFF55 | bold | +| Blank line | SPACER | — | — | + +### Text Formatting + +| Syntax | Type | Style | +|---|---|---| +| `**bold text**` | BOLD | #CCCCCC, bold | +| `*italic text*` | ITALIC | #CCCCCC, italic | + +Bold and italic are **whole-line only**. You cannot mix bold/italic within a line (`some **bold** here` does NOT work — the entire line must be wrapped). + +### Lists + +| Syntax | Rendering | +|---|---| +| `- item text` | Bullet list item (indented, with bullet prefix) | +| `1. item text` | Numbered list item (indented, number preserved in text) | + +List items are indented 12px from normal text. Bullet items get a `•` prefix automatically. Numbered items keep the `1.` prefix as written. + +### Separators + +```markdown +--- +``` + +Three or more dashes on a line (outside frontmatter) render as a visible horizontal rule — a thin line at `#2a3a4a`. + +### Inline Colors + +#### Hex Colors + +```markdown +[#FF5555] This text appears in red +[#55AAFF] This text appears in blue +``` + +Any `[#RRGGBB]` prefix sets the text color. Uses the TEXT template. + +#### Named Shortcuts + +| Syntax | Color | Use Case | +|---|---|---| +| `!warning text` | #FF5555 (red) | Warnings, errors | +| `!success text` | #55FF55 (green) | Success messages | +| `!note text` | #55AAFF (blue) | Informational notes | +| `!muted text` | #888888 (gray) | De-emphasized text | + +Named shortcuts are syntactic sugar for `[#hex]` colors. Uses the TEXT template. + +### Callout Boxes + +Callouts render as boxed text with a colored left accent bar and tinted background. + +#### Simple Callout (Tip) + +```markdown +> This renders as a green tip callout +``` + +`>` (blockquote) is shorthand for `>[!TIP]`. + +#### Typed Callouts + +| Syntax | Color | Use Case | +|---|---|---| +| `>[!TIP] text` | #55FF55 (green) | Tips and advice | +| `>[!WARNING] text` | #FF5555 (red) | Dangers, cautions | +| `>[!INFO] text` | #55AAFF (blue) | Supplementary info | +| `>[!NOTE] text` | #FFAA55 (orange) | Important notes | +| `>[!SUCCESS] text` | #55FF55 (green) | Confirmation messages | + +The type tag (`[!WARNING]`, etc.) controls the accent bar and text color. + +## Example Topic + +```markdown +--- +id: power_claiming +commands: claim, unclaim, autoclaim +--- +# Claiming Territory + +## How Claims Work + +Each chunk you claim costs 1 power. Your faction can claim +as many chunks as it has power. + +`/f claim` +`/f unclaim` + +- Stand in the chunk you want to claim +- Your faction must have enough power +- You cannot claim next to enemy territory + +## Auto-Claim Mode + +**Auto-claim claims every chunk you walk into.** + +`/f autoclaim` + +> Toggle auto-claim off when you're done! + +>[!WARNING] Don't wander into enemy territory with auto-claim on! + +--- + +## Losing Claims + +!warning Territory can be overclaimed if your power drops below your claim count. + +*Keep your power above your claim count to stay safe.* +``` + +## Formatting Limitations + +1. **Whole-line only** — Bold, italic, commands, callouts, and colors apply to entire lines. No inline mixing (e.g., `some **bold** here` won't work). +2. **No underline** — Hytale Labels have no underline property. +3. **No nested formatting** — Cannot combine bold + color on the same line through markdown syntax. Colors override the template default; bold/italic are separate templates. +4. **Single-level lists** — No nested/indented sub-lists. + +## Line Length + +The help content area is approximately 450px wide. Text that exceeds this width wraps naturally. For readability: +- Keep text lines under ~70 characters +- Long commands may wrap — test visually +- Callout boxes have slightly less width (padding + accent bar) + +## Testing + +Use `/f admin test md` in-game to open the markdown rendering test page, which shows every supported entry type rendered with the real templates. diff --git a/TRANSLATION_GUIDE.md b/docs/translation-guide.md similarity index 69% rename from TRANSLATION_GUIDE.md rename to docs/translation-guide.md index df727691..877b33be 100644 --- a/TRANSLATION_GUIDE.md +++ b/docs/translation-guide.md @@ -61,42 +61,62 @@ key.with.placeholder = Hello {0}, you have {1} power Located at `src/main/resources/Server/Languages//help//.md`. -Each file has YAML frontmatter and markdown content: +Each file has YAML frontmatter and markdown content. See [docs/help-markdown.md](help-markdown.md) for the full syntax reference. + +## What to Translate vs. What to Keep + +### Markdown Syntax → Entry Type Mapping + +| Markdown Syntax | Entry Type | Translate? | +|---|---|---| +| `# Heading` | Topic title | Yes | +| `## Subheading` | HEADING | Yes | +| Plain text line | TEXT | Yes | +| Blank line | SPACER | Keep as-is | +| `` `command text` `` | COMMAND | **No** — command syntax stays in English | +| `**bold text**` | BOLD | Yes | +| `*italic text*` | ITALIC | Yes | +| `- list item` | LIST | Yes | +| `1. numbered item` | LIST | Yes (translate text, keep number) | +| `---` | SEPARATOR | Keep as-is | +| `> tip text` | CALLOUT | Yes | +| `>[!TYPE] text` | CALLOUT | Yes (translate text only) | +| `[#RRGGBB] text` | TEXT (colored) | Yes (translate text only) | +| `!warning text` | TEXT (colored) | Yes (translate text only) | + +### Do NOT Translate + +These are syntax markers or identifiers — keep them exactly as written: + +- **Frontmatter**: `id:` and `commands:` values +- **Command syntax**: `/f create `, `/f claim`, etc. +- **Color codes**: `[#FF5555]`, `[#55AAFF]`, etc. +- **Named color keywords**: `!warning`, `!success`, `!note`, `!muted` +- **Callout type tags**: `>[!WARNING]`, `>[!TIP]`, `>[!INFO]`, `>[!NOTE]`, `>[!SUCCESS]` +- **Separator syntax**: `---` + +### Do Translate + +- Topic titles (`# Getting Started`) +- Heading text after `## ` +- Plain text lines +- Text content in bold (`**text here**`) and italic (`*text here*`) +- List item text (after `- ` or `1. `) +- Callout text (after `> ` or `>[!TYPE] `) +- Colored text (after `[#RRGGBB] ` or `!warning `) + +**Example:** ```markdown ---- -id: welcome_started -commands: gui, menu ---- -# Getting Started - -Ready to dive in? Here's how: - -`/f` -Opens the faction menu. - -> Tip: Once in, explore territory and start claiming! +# Getting Started ← Translate: "Primeros Pasos" +## How Claims Work ← Translate: "Como Funcionan los Reclamos" +`/f claim` ← Do NOT translate +- Stand in the chunk ← Translate: "- Parate en el chunk" +>[!WARNING] Don't wander off! ← Translate: ">[!WARNING] No te alejes!" +!note Power regenerates ← Translate: "!note El poder se regenera" +[#FF5555] Important info ← Translate: "[#FF5555] Informacion importante" ``` -**Rules:** -- **YAML frontmatter** (`---` block): Do NOT translate `id` or `commands` — these are identifiers -- **`# Title`**: Translate the heading text -- **Plain text**: Translate normally -- **`` `command` ``** (backtick lines): Do NOT translate command syntax (e.g., `/f create `) -- **`> Tip text`** (blockquotes): Translate the tip content -- **Blank lines**: Keep as-is (they create spacing in the help viewer) - -### Markdown → Entry Type Mapping - -| Markdown Syntax | Help Entry Type | Translate? | -|----------------------------|-----------------|------------| -| `# Heading` | Topic title | Yes | -| `## Subheading` | HEADING entry | Yes | -| Plain text line | TEXT entry | Yes | -| Blank line | SPACER entry | Keep as-is | -| `` `command text` `` | COMMAND entry | No | -| `> Tip text` | TIP entry | Yes | - ## Translation Tips ### Character Limits From 4e8f0d00a32d52af751643c5d2e0227cd4f30298 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 21:50:21 -0700 Subject: [PATCH 31/55] feat: add new UI Gallery elements to button test page Add elements discovered from 2026.02.17 UI Gallery to the element test page: TabNavigation with HeaderTabsStyle, MultilineTextField, tooltip demo (TooltipText + DefaultTextTooltipStyle), ContentSeparator and PanelSeparatorFancy, ProgressBar template, HeaderSearch, Panel and SimpleContainer variants. Update command reference to /f admin test gui. --- .../Custom/HyperFactions/test/button_test.ui | 108 +++++++++++++++++- 1 file changed, 106 insertions(+), 2 deletions(-) diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/test/button_test.ui b/src/main/resources/Common/UI/Custom/HyperFactions/test/button_test.ui index 4f2cd1d2..c3499cb6 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/test/button_test.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/test/button_test.ui @@ -1,5 +1,5 @@ // Element & Style Test Page — Permanent debug/research page -// Open via: /f admin testgui +// Open via: /f admin test gui $C = "../../Common.ui"; $S = "../shared/styles.ui"; @@ -249,7 +249,38 @@ $C.@PageOverlay { ColorPicker #TestColorPicker { DisplayTextField: true; Style: $C.@DefaultColorPickerStyle; - Anchor: (Height: 180, Bottom: 4); + Anchor: (Height: 180, Bottom: 8); + } + + Label { + Text: "TAB NAVIGATION"; + Style: (FontSize: 11, TextColor: #888888, RenderBold: true); + Anchor: (Height: 20, Bottom: 4); + } + + TabNavigation #TestTabNav { + Style: $C.@HeaderTabsStyle; + Anchor: (Height: 34, Bottom: 8); + } + + Label { + Text: "HEADER SEARCH"; + Style: (FontSize: 11, TextColor: #888888, RenderBold: true); + Anchor: (Height: 20, Bottom: 4); + } + + $C.@HeaderSearch #TestHeaderSearch { + Anchor: (Height: 36, Bottom: 8); + } + + Label { + Text: "PROGRESS BAR TEMPLATE"; + Style: (FontSize: 11, TextColor: #888888, RenderBold: true); + Anchor: (Height: 20, Bottom: 4); + } + + $C.@ProgressBar #TestProgressBarTpl { + Anchor: (Height: 16, Bottom: 8); } } @@ -368,6 +399,79 @@ $C.@PageOverlay { } } + Label { + Text: "TOOLTIP DEMO"; + Style: (FontSize: 11, TextColor: #888888, RenderBold: true); + Anchor: (Height: 20, Bottom: 4); + } + + TextButton #TestTooltipBtn { + Text: "HOVER FOR TOOLTIP"; + Anchor: (Height: 36, Bottom: 8); + Style: $C.@DefaultTextButtonStyle; + TooltipText: "This is a tooltip! Tooltips can show contextual information."; + TextTooltipStyle: $C.@DefaultTextTooltipStyle; + } + + Label { + Text: "CONTENT SEPARATOR"; + Style: (FontSize: 11, TextColor: #888888, RenderBold: true); + Anchor: (Height: 20, Bottom: 4); + } + + $C.@ContentSeparator { + Anchor: (Bottom: 4); + } + + $C.@PanelSeparatorFancy { + Anchor: (Bottom: 8); + } + + Label { + Text: "MULTILINE TEXT FIELD"; + Style: (FontSize: 11, TextColor: #888888, RenderBold: true); + Anchor: (Height: 20, Bottom: 4); + } + + $C.@MultilineTextField #TestMultilineField { + Anchor: (Height: 80, Bottom: 8); + } + + Label { + Text: "PANEL / SIMPLE CONTAINER"; + Style: (FontSize: 11, TextColor: #888888, RenderBold: true); + Anchor: (Height: 20, Bottom: 4); + } + + $C.@SimpleContainer #TestSimpleContainer { + Anchor: (Height: 60, Bottom: 4); + #Content { + LayoutMode: Top; + Label { + Text: "Inside SimpleContainer"; + Style: (FontSize: 11, TextColor: #aaaaaa); + Anchor: (Height: 18); + } + } + } + + $C.@Panel #TestPanel { + Anchor: (Height: 80, Bottom: 8); + #Title { + $C.@PanelTitle { + @Text = "Panel Title"; + } + } + #Content { + LayoutMode: Top; + Label { + Text: "Content inside Panel template"; + Style: (FontSize: 11, TextColor: #aaaaaa); + Anchor: (Height: 18); + } + } + } + Label { Text: "JAVA-APPENDED (Value.ref)"; Style: (FontSize: 11, TextColor: #888888, RenderBold: true); From 5d878ae789268c39d3de4858476a43d5c613cab1 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 21:51:44 -0700 Subject: [PATCH 32/55] fix: pin markdown test page title bar to top of container --- .../Common/UI/Custom/HyperFactions/test/markdown_test.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/test/markdown_test.ui b/src/main/resources/Common/UI/Custom/HyperFactions/test/markdown_test.ui index 1796fe9c..3d841044 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/test/markdown_test.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/test/markdown_test.ui @@ -7,7 +7,7 @@ Group { // Title bar Group { - Anchor: (Height: 40); + Anchor: (Height: 40, Top: 0, Left: 0, Right: 0); Background: (Color: #161b22); Label #PageTitle { From e3b26aab414888cfbb9ebd603f126d128fcd8963 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 21:53:54 -0700 Subject: [PATCH 33/55] fix: remove invalid #Title/#Content slots from Panel and SimpleContainer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These templates are flat containers — content goes directly inside with no insertion point wrappers. Only @Container/@DecoratedContainer have #Title/#Content slots. --- .../Custom/HyperFactions/test/button_test.ui | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/test/button_test.ui b/src/main/resources/Common/UI/Custom/HyperFactions/test/button_test.ui index c3499cb6..f57097ae 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/test/button_test.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/test/button_test.ui @@ -445,30 +445,26 @@ $C.@PageOverlay { $C.@SimpleContainer #TestSimpleContainer { Anchor: (Height: 60, Bottom: 4); - #Content { - LayoutMode: Top; - Label { - Text: "Inside SimpleContainer"; - Style: (FontSize: 11, TextColor: #aaaaaa); - Anchor: (Height: 18); - } + Padding: (Full: 10); + LayoutMode: Top; + Label { + Text: "Inside SimpleContainer"; + Style: (FontSize: 11, TextColor: #aaaaaa); + Anchor: (Height: 18); } } $C.@Panel #TestPanel { Anchor: (Height: 80, Bottom: 8); - #Title { - $C.@PanelTitle { - @Text = "Panel Title"; - } + Padding: (Full: 10); + LayoutMode: Top; + $C.@PanelTitle { + @Text = "Panel Title"; } - #Content { - LayoutMode: Top; - Label { - Text: "Content inside Panel template"; - Style: (FontSize: 11, TextColor: #aaaaaa); - Anchor: (Height: 18); - } + Label { + Text: "Content inside Panel template"; + Style: (FontSize: 11, TextColor: #aaaaaa); + Anchor: (Height: 18); } } From 0d8c8e71d1df2faa29a3d3411c3776b958ff4ab3 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 22:01:48 -0700 Subject: [PATCH 34/55] fix: enable text wrapping and vertical centering in help templates Replace fixed Height with auto-sizing (remove Anchor Height, use Padding for spacing). Add Wrap: true to all Label styles so long text wraps instead of truncating with ellipsis. Add VerticalAlignment: Center for proper vertical text positioning. Applies to all 8 help line templates: text, command, heading, bold, italic, list, tip, and callout. --- .../UI/Custom/HyperFactions/help/help_line_bold.ui | 8 ++++---- .../UI/Custom/HyperFactions/help/help_line_callout.ui | 9 ++++----- .../UI/Custom/HyperFactions/help/help_line_command.ui | 9 ++++----- .../UI/Custom/HyperFactions/help/help_line_heading.ui | 6 +++--- .../UI/Custom/HyperFactions/help/help_line_italic.ui | 8 ++++---- .../UI/Custom/HyperFactions/help/help_line_list.ui | 9 ++++----- .../UI/Custom/HyperFactions/help/help_line_text.ui | 8 ++++---- .../Common/UI/Custom/HyperFactions/help/help_line_tip.ui | 8 ++++---- 8 files changed, 31 insertions(+), 34 deletions(-) diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_bold.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_bold.ui index a797018d..3d36f0f3 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_bold.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_bold.ui @@ -1,11 +1,11 @@ -// Help content line - bold text (gray, bold) +// Help content line - bold text (gray, bold, wrapping) Group { - Anchor: (Height: 16); + Padding: (Top: 1, Bottom: 1); Label #Text { Text: ""; - Style: (FontSize: 11, TextColor: #CCCCCC, RenderBold: true); - Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + Style: (FontSize: 11, TextColor: #CCCCCC, RenderBold: true, Wrap: true, VerticalAlignment: Center); + Anchor: (Left: 0, Right: 0); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_callout.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_callout.ui index 68b07331..e55387fa 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_callout.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_callout.ui @@ -1,8 +1,7 @@ -// Help content line - callout box with colored left accent bar +// Help content line - callout box with colored left accent bar (wrapping) Group { - Anchor: (Height: 22, Top: 2, Bottom: 2); - Padding: (Left: 12); + Padding: (Left: 12, Top: 3, Bottom: 3); Background: (Color: #1a2a1a); Group #AccentBar { @@ -12,7 +11,7 @@ Group { Label #Text { Text: ""; - Style: (FontSize: 11, TextColor: #55FF55); - Anchor: (Left: 10, Right: 4, Top: 0, Bottom: 0); + Style: (FontSize: 11, TextColor: #55FF55, Wrap: true, VerticalAlignment: Center); + Anchor: (Left: 10, Right: 4); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_command.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_command.ui index 7d3734d5..ba654b4c 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_command.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_command.ui @@ -1,12 +1,11 @@ -// Help content line - command callout (yellow bold, slight indent) +// Help content line - command callout (yellow bold, slight indent, wrapping) Group { - Anchor: (Height: 16); - Padding: (Left: 8); + Padding: (Left: 8, Top: 1, Bottom: 1); Label #Text { Text: ""; - Style: (FontSize: 11, TextColor: #FFFF55, RenderBold: true); - Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + Style: (FontSize: 11, TextColor: #FFFF55, RenderBold: true, Wrap: true, VerticalAlignment: Center); + Anchor: (Left: 0, Right: 0); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_heading.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_heading.ui index 820b020e..a7014f50 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_heading.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_heading.ui @@ -1,11 +1,11 @@ // Help content line - sub-heading (teal bold, top margin) Group { - Anchor: (Height: 20, Top: 4); + Padding: (Top: 4, Bottom: 1); Label #Text { Text: ""; - Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true); - Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + Style: (FontSize: 11, TextColor: #00AAAA, RenderBold: true, VerticalAlignment: Center); + Anchor: (Left: 0, Right: 0); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_italic.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_italic.ui index 144846d0..ce345851 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_italic.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_italic.ui @@ -1,11 +1,11 @@ -// Help content line - italic text (gray, italic) +// Help content line - italic text (gray, italic, wrapping) Group { - Anchor: (Height: 16); + Padding: (Top: 1, Bottom: 1); Label #Text { Text: ""; - Style: (FontSize: 11, TextColor: #CCCCCC, RenderItalics: true); - Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + Style: (FontSize: 11, TextColor: #CCCCCC, RenderItalics: true, Wrap: true, VerticalAlignment: Center); + Anchor: (Left: 0, Right: 0); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_list.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_list.ui index 81982732..4ae34e43 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_list.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_list.ui @@ -1,12 +1,11 @@ -// Help content line - list item with left indent +// Help content line - list item with left indent (wrapping) Group { - Anchor: (Height: 16); - Padding: (Left: 12); + Padding: (Left: 12, Top: 1, Bottom: 1); Label #Text { Text: ""; - Style: (FontSize: 11, TextColor: #CCCCCC); - Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + Style: (FontSize: 11, TextColor: #CCCCCC, Wrap: true, VerticalAlignment: Center); + Anchor: (Left: 0, Right: 0); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_text.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_text.ui index 8b91353b..2734b68b 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_text.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_text.ui @@ -1,11 +1,11 @@ -// Help content line - body text (gray) +// Help content line - body text (gray, wrapping) Group { - Anchor: (Height: 16); + Padding: (Top: 1, Bottom: 1); Label #Text { Text: ""; - Style: (FontSize: 11, TextColor: #CCCCCC); - Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + Style: (FontSize: 11, TextColor: #CCCCCC, Wrap: true, VerticalAlignment: Center); + Anchor: (Left: 0, Right: 0); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_tip.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_tip.ui index 6cb40070..3c5a011b 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_tip.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_line_tip.ui @@ -1,11 +1,11 @@ -// Help content line - tip callout (green) +// Help content line - tip callout (green, wrapping) Group { - Anchor: (Height: 16); + Padding: (Top: 1, Bottom: 1); Label #Text { Text: ""; - Style: (FontSize: 11, TextColor: #55FF55); - Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + Style: (FontSize: 11, TextColor: #55FF55, Wrap: true, VerticalAlignment: Center); + Anchor: (Left: 0, Right: 0); } } From 43188f5f709b0c1ac090be1d407ff7cfd57c2bdc Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 22:21:13 -0700 Subject: [PATCH 35/55] feat: add table support to help markdown system Tables use standard markdown pipe syntax (| col | col |) with separator rows for headers. Supports per-cell inline formatting (**bold**, *italic*, `command`, [#hex] colors) and row-level color overrides. Includes 4 new .ui templates, parser/registry/ renderer updates, and visual test entries. --- docs/help-markdown.md | 28 ++++ docs/translation-guide.md | 6 + .../build/HelpLangGenerator.java | 67 ++++++++- .../java/com/hyperfactions/gui/UIPaths.java | 8 ++ .../com/hyperfactions/gui/help/HelpEntry.java | 38 ++++- .../hyperfactions/gui/help/HelpRegistry.java | 15 ++ .../gui/help/page/HelpMainPage.java | 87 ++++++++++++ .../gui/test/MarkdownTestPage.java | 132 ++++++++++++++++++ .../HyperFactions/help/help_table_cell.ui | 10 ++ .../HyperFactions/help/help_table_header.ui | 11 ++ .../help/help_table_header_cell.ui | 10 ++ .../HyperFactions/help/help_table_row.ui | 10 ++ 12 files changed, 412 insertions(+), 10 deletions(-) create mode 100644 src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_cell.ui create mode 100644 src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header.ui create mode 100644 src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header_cell.ui create mode 100644 src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_row.ui diff --git a/docs/help-markdown.md b/docs/help-markdown.md index f16da193..b9cb177c 100644 --- a/docs/help-markdown.md +++ b/docs/help-markdown.md @@ -101,6 +101,26 @@ Callouts render as boxed text with a colored left accent bar and tinted backgrou The type tag (`[!WARNING]`, etc.) controls the accent bar and text color. +### Tables + +Tables use standard markdown pipe syntax: + +```markdown +| Level | Members | Daily Upkeep | +|-------|---------|--------------| +| 1 | 1-5 | 0 | +| 2 | 6-10 | 5 | +| 3 | 11-20 | 15 | +``` + +- The first row is the **header** (bold, teal `#00AAAA`) — it must be followed by a separator row (`|---|---|---|`) +- The separator row is consumed by the parser and not rendered +- Subsequent `|` rows are **data rows** (normal text, `#CCCCCC`) +- Columns are laid out horizontally using `LayoutMode: Left` +- Each cell is individually localized (e.g., `line.5.col.0`, `line.5.col.1`) + +Tables are ideal for reference data like upkeep scales, permission lists, or config examples. + ## Example Topic ```markdown @@ -134,6 +154,14 @@ as many chunks as it has power. --- +## Power Costs + +| Chunks | Power Cost | +|--------|------------| +| 1-10 | 1 per chunk | +| 11-25 | 2 per chunk | +| 26+ | 3 per chunk | + ## Losing Claims !warning Territory can be overclaimed if your power drops below your claim count. diff --git a/docs/translation-guide.md b/docs/translation-guide.md index 877b33be..9697ae96 100644 --- a/docs/translation-guide.md +++ b/docs/translation-guide.md @@ -83,6 +83,9 @@ Each file has YAML frontmatter and markdown content. See [docs/help-markdown.md] | `>[!TYPE] text` | CALLOUT | Yes (translate text only) | | `[#RRGGBB] text` | TEXT (colored) | Yes (translate text only) | | `!warning text` | TEXT (colored) | Yes (translate text only) | +| `\| col \| col \|` header row | TABLE_HEADER | Yes (translate column labels) | +| `\| val \| val \|` data row | TABLE_ROW | Yes (translate cell values) | +| `\|---\|---\|` separator | — (consumed) | Keep as-is | ### Do NOT Translate @@ -94,6 +97,8 @@ These are syntax markers or identifiers — keep them exactly as written: - **Named color keywords**: `!warning`, `!success`, `!note`, `!muted` - **Callout type tags**: `>[!WARNING]`, `>[!TIP]`, `>[!INFO]`, `>[!NOTE]`, `>[!SUCCESS]` - **Separator syntax**: `---` +- **Table separators**: `|---|---|---|` (the row between header and data) +- **Table pipe syntax**: `|` characters (keep the pipe structure intact) ### Do Translate @@ -104,6 +109,7 @@ These are syntax markers or identifiers — keep them exactly as written: - List item text (after `- ` or `1. `) - Callout text (after `> ` or `>[!TYPE] `) - Colored text (after `[#RRGGBB] ` or `!warning `) +- Table header labels and data cell values (between `|` pipes) **Example:** diff --git a/src/main/java/com/hyperfactions/build/HelpLangGenerator.java b/src/main/java/com/hyperfactions/build/HelpLangGenerator.java index 1a5bd136..300c6c96 100644 --- a/src/main/java/com/hyperfactions/build/HelpLangGenerator.java +++ b/src/main/java/com/hyperfactions/build/HelpLangGenerator.java @@ -43,6 +43,8 @@ * >[!INFO] text → CALLOUT + #55AAFF * >[!NOTE] text → CALLOUT + #FFAA55 * >[!SUCCESS] text → CALLOUT + #55FF55 + * | col | col | → TABLE_HEADER (if followed by separator) + * | val | val | → TABLE_ROW * blank line → SPACER *

*/ @@ -65,6 +67,9 @@ public class HelpLangGenerator { /** Pattern for horizontal rule: 3+ dashes on a line */ private static final Pattern HR_PATTERN = Pattern.compile("^-{3,}$"); + /** Pattern for table separator row: |---|---|---| (with optional colons for alignment) */ + private static final Pattern TABLE_SEPARATOR_PATTERN = Pattern.compile("^\\|[-:| ]+\\|$"); + /** Named color shortcuts */ private static final Map NAMED_COLORS = Map.of( "warning", "#FF5555", @@ -84,10 +89,17 @@ public class HelpLangGenerator { // ── Data structures ────────────────────────────────────────────────── + /** A column within a table entry. */ + record ColumnEntry(String key, String text) {} + /** A single parsed entry from a markdown topic file. */ - record Entry(String type, String key, String color) { + record Entry(String type, String key, String color, List columns) { Entry(String type, String key) { - this(type, key, null); + this(type, key, null, null); + } + + Entry(String type, String key, String color) { + this(type, key, color, null); } } @@ -355,6 +367,38 @@ private static Topic parseTopic(String category, Path mdFile) throws IOException continue; } + // 9.5. Table row: | col1 | col2 | col3 | + if (trimmed.startsWith("|") && trimmed.endsWith("|") && trimmed.length() > 2) { + // Parse cells + String inner = trimmed.substring(1, trimmed.length() - 1); + String[] rawCells = inner.split("\\|"); + List cellTexts = new ArrayList<>(); + for (String cell : rawCells) { + cellTexts.add(cell.trim()); + } + + // Check if next line is a table separator (indicates this is a header row) + boolean isHeader = false; + if (i + 1 < lines.size()) { + String nextLine = lines.get(i + 1).trim(); + if (TABLE_SEPARATOR_PATTERN.matcher(nextLine).matches()) { + isHeader = true; + i++; // skip separator line + } + } + + lineCounter++; + String type = isHeader ? "TABLE_HEADER" : "TABLE_ROW"; + List columns = new ArrayList<>(); + for (int col = 0; col < cellTexts.size(); col++) { + String colKey = keyPrefix + ".line." + lineCounter + ".col." + col; + columns.add(new ColumnEntry(colKey, cellTexts.get(col))); + } + entries.add(new Entry(type, null, null, columns)); + entryTexts.add(null); + continue; + } + // 10. H2 → HEADING if (trimmed.startsWith("## ")) { lineCounter++; @@ -411,7 +455,12 @@ private static void writeLangFile(Path outputDir, String locale, List top for (int i = 0; i < topic.entries().size(); i++) { Entry entry = topic.entries().get(i); - if (entry.key() != null) { + if (entry.columns() != null) { + // Table entry — write each column as a separate lang key + for (ColumnEntry col : entry.columns()) { + sb.append(col.key()).append(" = ").append(col.text()).append("\n"); + } + } else if (entry.key() != null) { String text = topic.entryTexts().get(i); sb.append(entry.key()).append(" = ").append(text).append("\n"); } @@ -437,12 +486,18 @@ private static void writeManifest(Path outputDir, List topics) throws IOE topicMap.put("titleKey", "hyperfactions_help." + topic.titleKey()); topicMap.put("commands", topic.commands()); - List> entryList = new ArrayList<>(); + List> entryList = new ArrayList<>(); for (int i = 0; i < topic.entries().size(); i++) { Entry entry = topic.entries().get(i); - Map entryMap = new LinkedHashMap<>(); + Map entryMap = new LinkedHashMap<>(); entryMap.put("type", entry.type()); - if (entry.key() != null) { + if (entry.columns() != null) { + // Table entry — store column keys as JSON array + List colKeys = entry.columns().stream() + .map(c -> "hyperfactions_help." + c.key()) + .toList(); + entryMap.put("columns", colKeys); + } else if (entry.key() != null) { entryMap.put("key", "hyperfactions_help." + entry.key()); } if (entry.color() != null) { diff --git a/src/main/java/com/hyperfactions/gui/UIPaths.java b/src/main/java/com/hyperfactions/gui/UIPaths.java index 81feb523..9457da63 100644 --- a/src/main/java/com/hyperfactions/gui/UIPaths.java +++ b/src/main/java/com/hyperfactions/gui/UIPaths.java @@ -184,6 +184,14 @@ private UIPaths() {} public static final String HELP_LINE_CALLOUT = BASE + "help/help_line_callout.ui"; + public static final String HELP_TABLE_HEADER = BASE + "help/help_table_header.ui"; + + public static final String HELP_TABLE_ROW = BASE + "help/help_table_row.ui"; + + public static final String HELP_TABLE_CELL = BASE + "help/help_table_cell.ui"; + + public static final String HELP_TABLE_HEADER_CELL = BASE + "help/help_table_header_cell.ui"; + // ── Admin pages ───────────────────────────────────────────────────────── public static final String ADMIN_MAIN = BASE + "admin/admin_main.ui"; diff --git a/src/main/java/com/hyperfactions/gui/help/HelpEntry.java b/src/main/java/com/hyperfactions/gui/help/HelpEntry.java index 7ea6e53a..2af582a9 100644 --- a/src/main/java/com/hyperfactions/gui/help/HelpEntry.java +++ b/src/main/java/com/hyperfactions/gui/help/HelpEntry.java @@ -36,17 +36,24 @@ public enum EntryType { /** Horizontal rule separator (no text). */ SEPARATOR, /** Boxed callout with colored accent bar. */ - CALLOUT + CALLOUT, + /** Table header row (bold column labels). Column keys pipe-separated in messageKey. */ + TABLE_HEADER, + /** Table data row. Column keys pipe-separated in messageKey. */ + TABLE_ROW } /** * Gets the resolved display text for this entry (server default language). * - * @return The localized text, or empty string for spacers/separators + * @return The localized text, or empty string for spacers/separators/tables */ @NotNull public String text() { - return type == EntryType.SPACER || type == EntryType.SEPARATOR ? "" : HelpMessages.get(messageKey); + return switch (type) { + case SPACER, SEPARATOR, TABLE_HEADER, TABLE_ROW -> ""; + default -> HelpMessages.get(messageKey); + }; } /** @@ -54,7 +61,20 @@ public String text() { */ @NotNull public String text(@Nullable PlayerRef playerRef) { - return type == EntryType.SPACER || type == EntryType.SEPARATOR ? "" : HelpMessages.get(playerRef, messageKey); + return switch (type) { + case SPACER, SEPARATOR, TABLE_HEADER, TABLE_ROW -> ""; + default -> HelpMessages.get(playerRef, messageKey); + }; + } + + /** + * Gets the individual column keys for table entries. + * For non-table entries, returns an empty array. + */ + @NotNull + public String[] columnKeys() { + return type == EntryType.TABLE_HEADER || type == EntryType.TABLE_ROW + ? messageKey.split("\\|") : new String[0]; } /** Creates a TEXT entry. */ @@ -106,4 +126,14 @@ public static HelpEntry callout(@NotNull String messageKey, @Nullable String col public static HelpEntry colored(@NotNull String messageKey, @NotNull String color) { return new HelpEntry(EntryType.TEXT, messageKey, color); } + + /** Creates a TABLE_HEADER entry with pipe-separated column keys. */ + public static HelpEntry tableHeader(@NotNull String columnKeys) { + return new HelpEntry(EntryType.TABLE_HEADER, columnKeys, null); + } + + /** Creates a TABLE_ROW entry with pipe-separated column keys. */ + public static HelpEntry tableRow(@NotNull String columnKeys) { + return new HelpEntry(EntryType.TABLE_ROW, columnKeys, null); + } } diff --git a/src/main/java/com/hyperfactions/gui/help/HelpRegistry.java b/src/main/java/com/hyperfactions/gui/help/HelpRegistry.java index e849c71b..d8697468 100644 --- a/src/main/java/com/hyperfactions/gui/help/HelpRegistry.java +++ b/src/main/java/com/hyperfactions/gui/help/HelpRegistry.java @@ -9,6 +9,7 @@ import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.*; +import java.util.StringJoiner; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -151,6 +152,20 @@ private HelpTopic parseTopic(@NotNull JsonObject topicObj) { case "LIST" -> HelpEntry.list(key); case "SEPARATOR" -> HelpEntry.separator(); case "CALLOUT" -> HelpEntry.callout(key, color); + case "TABLE_HEADER", "TABLE_ROW" -> { + // Table entries store column keys as a JSON array + JsonArray cols = entryObj.has("columns") ? entryObj.getAsJsonArray("columns") : null; + if (cols != null && !cols.isEmpty()) { + StringJoiner joiner = new StringJoiner("|"); + for (JsonElement col : cols) { + joiner.add(col.getAsString()); + } + yield "TABLE_HEADER".equals(type) + ? HelpEntry.tableHeader(joiner.toString()) + : HelpEntry.tableRow(joiner.toString()); + } + yield null; + } default -> null; }; if (entry != null) { 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 a36a806d..bba3bee5 100644 --- a/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java +++ b/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java @@ -22,7 +22,10 @@ import com.hypixel.hytale.server.core.universe.PlayerRef; import com.hypixel.hytale.server.core.universe.world.storage.EntityStore; import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * Main Help page with colored sidebar navigation and card-based content area. @@ -53,6 +56,14 @@ public class HelpMainPage extends InteractiveCustomUIPage { private static final String TPL_LINE_CALLOUT = UIPaths.HELP_LINE_CALLOUT; + private static final String TPL_TABLE_HEADER = UIPaths.HELP_TABLE_HEADER; + + private static final String TPL_TABLE_ROW = UIPaths.HELP_TABLE_ROW; + + private static final String TPL_TABLE_HEADER_CELL = UIPaths.HELP_TABLE_HEADER_CELL; + + private static final String TPL_TABLE_CELL = UIPaths.HELP_TABLE_CELL; + private final PlayerRef playerRef; private final GuiManager guiManager; @@ -167,6 +178,29 @@ private void buildTopicCards(UICommandBuilder cmd) { int lineIndex = 0; for (HelpEntry entry : topic.entries()) { String linesContainer = cardPrefix + " #Lines"; + + // Table entries need special rendering + if (entry.type() == HelpEntry.EntryType.TABLE_HEADER || entry.type() == HelpEntry.EntryType.TABLE_ROW) { + boolean isHeader = entry.type() == HelpEntry.EntryType.TABLE_HEADER; + String rowTemplate = isHeader ? TPL_TABLE_HEADER : TPL_TABLE_ROW; + String cellTemplate = isHeader ? TPL_TABLE_HEADER_CELL : TPL_TABLE_CELL; + + cmd.append(linesContainer, rowTemplate); + String rowSelector = linesContainer + "[" + lineIndex + "]"; + String colsContainer = rowSelector + " #Cols"; + + String[] columnKeys = entry.columnKeys(); + for (int col = 0; col < columnKeys.length; col++) { + cmd.append(colsContainer, cellTemplate); + String cellSelector = colsContainer + "[" + col + "]"; + String cellText = HelpMessages.get(playerRef, columnKeys[col]); + applyCellFormatting(cmd, cellSelector, cellText, entry.color()); + } + + lineIndex++; + continue; + } + String template = getTemplateForType(entry.type()); cmd.append(linesContainer, template); @@ -201,6 +235,57 @@ private void buildTopicCards(UICommandBuilder cmd) { /** * Returns the appropriate template path for an entry type. */ + private static final Pattern CELL_HEX_COLOR = Pattern.compile("^\\[#([0-9A-Fa-f]{6})]\\s*(.+)$"); + + /** + * Applies inline formatting to a table cell. + * Supports: **bold**, *italic*, `command`, [#RRGGBB] color prefix. + */ + private void applyCellFormatting(UICommandBuilder cmd, String cellSelector, + String text, @Nullable String rowColor) { + String displayText = text; + String cellColor = rowColor; + boolean bold = false; + boolean italic = false; + + // Check for inline hex color: [#RRGGBB] text + Matcher hexMatcher = CELL_HEX_COLOR.matcher(displayText); + if (hexMatcher.matches()) { + cellColor = "#" + hexMatcher.group(1); + displayText = hexMatcher.group(2); + } + + // Check for bold: **text** + if (displayText.startsWith("**") && displayText.endsWith("**") && displayText.length() > 4) { + displayText = displayText.substring(2, displayText.length() - 2); + bold = true; + } + // Check for command: `text` + else if (displayText.startsWith("`") && displayText.endsWith("`") && displayText.length() > 2) { + displayText = displayText.substring(1, displayText.length() - 1); + bold = true; + if (cellColor == null) { + cellColor = "#FFFF55"; + } + } + // Check for italic: *text* + else if (displayText.startsWith("*") && displayText.endsWith("*") && displayText.length() > 2) { + displayText = displayText.substring(1, displayText.length() - 1); + italic = true; + } + + cmd.set(cellSelector + " #CellText.Text", displayText); + if (bold) { + cmd.set(cellSelector + " #CellText.Style.RenderBold", true); + } + if (italic) { + cmd.set(cellSelector + " #CellText.Style.RenderItalics", true); + } + if (cellColor != null) { + cmd.set(cellSelector + " #CellText.Style.TextColor", cellColor); + } + } + private String getTemplateForType(HelpEntry.EntryType type) { return switch (type) { case TEXT -> TPL_LINE_TEXT; @@ -212,6 +297,8 @@ private String getTemplateForType(HelpEntry.EntryType type) { case LIST -> TPL_LINE_LIST; case SEPARATOR -> TPL_SEPARATOR; case CALLOUT -> TPL_LINE_CALLOUT; + case TABLE_HEADER -> TPL_TABLE_HEADER; + case TABLE_ROW -> TPL_TABLE_ROW; }; } diff --git a/src/main/java/com/hyperfactions/gui/test/MarkdownTestPage.java b/src/main/java/com/hyperfactions/gui/test/MarkdownTestPage.java index 68442263..aa4d1416 100644 --- a/src/main/java/com/hyperfactions/gui/test/MarkdownTestPage.java +++ b/src/main/java/com/hyperfactions/gui/test/MarkdownTestPage.java @@ -14,6 +14,8 @@ import com.hypixel.hytale.server.core.universe.world.storage.EntityStore; import java.util.ArrayList; import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * Visual test page that renders every supported markdown entry type @@ -34,6 +36,10 @@ public class MarkdownTestPage extends InteractiveCustomUIPage { private static final String TPL_LINE_LIST = UIPaths.HELP_LINE_LIST; private static final String TPL_SEPARATOR = UIPaths.HELP_SEPARATOR; private static final String TPL_LINE_CALLOUT = UIPaths.HELP_LINE_CALLOUT; + private static final String TPL_TABLE_HEADER = UIPaths.HELP_TABLE_HEADER; + private static final String TPL_TABLE_ROW = UIPaths.HELP_TABLE_ROW; + private static final String TPL_TABLE_HEADER_CELL = UIPaths.HELP_TABLE_HEADER_CELL; + private static final String TPL_TABLE_CELL = UIPaths.HELP_TABLE_CELL; /** Creates a new MarkdownTestPage. */ public MarkdownTestPage(PlayerRef playerRef) { @@ -60,6 +66,28 @@ public void build(Ref ref, UICommandBuilder cmd, continue; } + // Table entries need special rendering + if (entry.type == EntryType.TABLE_HEADER || entry.type == EntryType.TABLE_ROW) { + boolean isHeader = entry.type == EntryType.TABLE_HEADER; + String rowTemplate = isHeader ? TPL_TABLE_HEADER : TPL_TABLE_ROW; + String cellTemplate = isHeader ? TPL_TABLE_HEADER_CELL : TPL_TABLE_CELL; + + cmd.append("#ContentList", rowTemplate); + String rowSelector = "#ContentList[" + index + "]"; + String colsContainer = rowSelector + " #Cols"; + + // Table text stores pipe-separated column values + String[] columns = entry.text.split("\\|"); + for (int col = 0; col < columns.length; col++) { + cmd.append(colsContainer, cellTemplate); + String cellSelector = colsContainer + "[" + col + "]"; + applyCellFormatting(cmd, cellSelector, columns[col].trim(), entry.color); + } + + index++; + continue; + } + // Real rendered entry using the appropriate template String template = getTemplateForType(entry.type); cmd.append("#ContentList", template); @@ -105,6 +133,8 @@ private String getTemplateForType(EntryType type) { case LIST -> TPL_LINE_LIST; case SEPARATOR -> TPL_SEPARATOR; case CALLOUT -> TPL_LINE_CALLOUT; + case TABLE_HEADER -> TPL_TABLE_HEADER; + case TABLE_ROW -> TPL_TABLE_ROW; }; } @@ -242,6 +272,54 @@ private List buildTestEntries() { entry(entries, EntryType.SPACER, ""); + // ── Section: Tables ── + section(entries, "TABLES"); + + syntax(entries, "| Level | Members | Daily Upkeep |"); + syntax(entries, "|-------|---------|--------------|"); + syntax(entries, "| 1 | 1-5 | 0 |"); + syntax(entries, "| 2 | 6-10 | 5 |"); + syntax(entries, "| 3 | 11-20 | 15 |"); + + // Render the actual table + table(entries, true, "Level", "Members", "Daily Upkeep"); + table(entries, false, "1", "1-5", "0"); + table(entries, false, "2", "6-10", "5"); + table(entries, false, "3", "11-20", "15"); + + entry(entries, EntryType.SPACER, ""); + + syntax(entries, "Two-column table:"); + table(entries, true, "Command", "Description"); + table(entries, false, "/f create ", "Create a new faction"); + table(entries, false, "/f claim", "Claim the chunk you're in"); + table(entries, false, "/f invite ", "Invite a player to your faction"); + table(entries, false, "/f home", "Teleport to faction home"); + + entry(entries, EntryType.SPACER, ""); + + // ── Section: Formatted Tables ── + section(entries, "FORMATTED TABLE CELLS"); + + syntax(entries, "Cells with inline formatting:"); + table(entries, true, "Syntax", "Result", "Description"); + table(entries, false, "**bold cell**", "Normal", "Bold via ** markers"); + table(entries, false, "*italic cell*", "Normal", "Italic via * markers"); + table(entries, false, "`command`", "Normal", "Command style (yellow bold)"); + table(entries, false, "[#FF5555] red text", "Normal", "Hex color prefix"); + table(entries, false, "[#55FF55] green text", "[#55AAFF] blue text", "Per-cell colors"); + + entry(entries, EntryType.SPACER, ""); + + syntax(entries, "Row-level color override (all cells colored):"); + table(entries, true, "Status", "Zone", "Note"); + table(entries, false, "Active", "Spawn", "Normal row"); + tableColored(entries, "#FF5555", "Danger", "Warzone", "Red row"); + tableColored(entries, "#55FF55", "Safe", "Safezone", "Green row"); + tableColored(entries, "#55AAFF", "Info", "Claimed", "Blue row"); + + entry(entries, EntryType.SPACER, ""); + // ── Section: Edge Cases ── section(entries, "EDGE CASES"); @@ -304,6 +382,60 @@ private void callout(List entries, String text, String color) { entries.add(new TestEntry(EntryType.CALLOUT, text, color, false)); } + private void table(List entries, boolean header, String... columns) { + EntryType type = header ? EntryType.TABLE_HEADER : EntryType.TABLE_ROW; + entries.add(new TestEntry(type, String.join("|", columns), null, false)); + } + + private void tableColored(List entries, String color, String... columns) { + entries.add(new TestEntry(EntryType.TABLE_ROW, String.join("|", columns), color, false)); + } + + private static final Pattern CELL_HEX_COLOR = Pattern.compile("^\\[#([0-9A-Fa-f]{6})]\\s*(.+)$"); + + /** + * Applies inline formatting to a table cell. + * Supports: **bold**, *italic*, `command`, [#RRGGBB] color prefix. + */ + private void applyCellFormatting(UICommandBuilder cmd, String cellSelector, + String text, String rowColor) { + String displayText = text; + String cellColor = rowColor; + boolean bold = false; + boolean italic = false; + + Matcher hexMatcher = CELL_HEX_COLOR.matcher(displayText); + if (hexMatcher.matches()) { + cellColor = "#" + hexMatcher.group(1); + displayText = hexMatcher.group(2); + } + + if (displayText.startsWith("**") && displayText.endsWith("**") && displayText.length() > 4) { + displayText = displayText.substring(2, displayText.length() - 2); + bold = true; + } else if (displayText.startsWith("`") && displayText.endsWith("`") && displayText.length() > 2) { + displayText = displayText.substring(1, displayText.length() - 1); + bold = true; + if (cellColor == null) { + cellColor = "#FFFF55"; + } + } else if (displayText.startsWith("*") && displayText.endsWith("*") && displayText.length() > 2) { + displayText = displayText.substring(1, displayText.length() - 1); + italic = true; + } + + cmd.set(cellSelector + " #CellText.Text", displayText); + if (bold) { + cmd.set(cellSelector + " #CellText.Style.RenderBold", true); + } + if (italic) { + cmd.set(cellSelector + " #CellText.Style.RenderItalics", true); + } + if (cellColor != null) { + cmd.set(cellSelector + " #CellText.Style.TextColor", cellColor); + } + } + /** * A test entry that can either be a syntax label or a real rendered entry. */ diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_cell.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_cell.ui new file mode 100644 index 00000000..90e29d0e --- /dev/null +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_cell.ui @@ -0,0 +1,10 @@ +// Help table cell - single column value + +Group { + Label #CellText { + Text: ""; + Style: (FontSize: 10, TextColor: #CCCCCC, Wrap: true); + Padding: (Left: 4, Right: 4); + Anchor: (Left: 0, Right: 0); + } +} diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header.ui new file mode 100644 index 00000000..4f205373 --- /dev/null +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header.ui @@ -0,0 +1,11 @@ +// Help table header row - bold column labels on dark background + +Group { + Padding: (Top: 1, Bottom: 1); + Background: (Color: #1a2a3a); + + Group #Cols { + LayoutMode: Left; + Anchor: (Left: 0, Right: 0); + } +} diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header_cell.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header_cell.ui new file mode 100644 index 00000000..64fb9c02 --- /dev/null +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header_cell.ui @@ -0,0 +1,10 @@ +// Help table header cell - bold column label + +Group { + Label #CellText { + Text: ""; + Style: (FontSize: 10, TextColor: #00AAAA, RenderBold: true, Wrap: true); + Padding: (Left: 4, Right: 4); + Anchor: (Left: 0, Right: 0); + } +} diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_row.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_row.ui new file mode 100644 index 00000000..8480e23a --- /dev/null +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_row.ui @@ -0,0 +1,10 @@ +// Help table data row - normal column values + +Group { + Padding: (Top: 1, Bottom: 1); + + Group #Cols { + LayoutMode: Left; + Anchor: (Left: 0, Right: 0); + } +} From f818927eb032de1663a9ed444f785b319886d09b Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Mon, 9 Mar 2026 22:30:58 -0700 Subject: [PATCH 36/55] fix: improve table visual styling with GitHub-style grid borders Redesign table templates with proper grid lines: left border on each cell for column separators, top/bottom borders on rows, header row background, 200px cell width with generous padding. Add per-cell inline formatting support (bold, italic, command, hex colors). --- .../HyperFactions/help/help_table_cell.ui | 16 +++++++++++---- .../HyperFactions/help/help_table_header.ui | 20 +++++++++++++++---- .../help/help_table_header_cell.ui | 16 +++++++++++---- .../HyperFactions/help/help_table_row.ui | 12 ++++++++--- 4 files changed, 49 insertions(+), 15 deletions(-) diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_cell.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_cell.ui index 90e29d0e..2528283d 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_cell.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_cell.ui @@ -1,10 +1,18 @@ -// Help table cell - single column value +// Help table cell - column value with left border separator Group { + Anchor: (Width: 200); + + // Left border (acts as column separator + table left border on first cell) + Group { + Anchor: (Width: 1, Left: 0, Top: 0, Bottom: 0); + Background: (Color: #2a3a4a); + } + Label #CellText { Text: ""; - Style: (FontSize: 10, TextColor: #CCCCCC, Wrap: true); - Padding: (Left: 4, Right: 4); - Anchor: (Left: 0, Right: 0); + Style: (FontSize: 10, TextColor: #CCCCCC, Wrap: true, VerticalAlignment: Center); + Padding: (Left: 10, Right: 8); + Anchor: (Left: 1, Right: 0, Top: 0, Bottom: 0); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header.ui index 4f205373..a13a2380 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header.ui @@ -1,11 +1,23 @@ -// Help table header row - bold column labels on dark background +// Help table header row - GitHub-style with top/bottom border and background Group { - Padding: (Top: 1, Bottom: 1); - Background: (Color: #1a2a3a); + Padding: (Top: 4, Bottom: 4); + Background: (Color: #161b26); + + // Top border + Group { + Anchor: (Height: 1, Top: 0, Left: 0, Right: 0); + Background: (Color: #2a3a4a); + } + + // Bottom border + Group { + Anchor: (Height: 1, Bottom: 0, Left: 0, Right: 0); + Background: (Color: #2a3a4a); + } Group #Cols { LayoutMode: Left; - Anchor: (Left: 0, Right: 0); + Anchor: (Left: 0, Top: 1, Bottom: 1); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header_cell.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header_cell.ui index 64fb9c02..302ba49e 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header_cell.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header_cell.ui @@ -1,10 +1,18 @@ -// Help table header cell - bold column label +// Help table header cell - bold label with left border separator Group { + Anchor: (Width: 200); + + // Left border (acts as column separator + table left border on first cell) + Group { + Anchor: (Width: 1, Left: 0, Top: 0, Bottom: 0); + Background: (Color: #2a3a4a); + } + Label #CellText { Text: ""; - Style: (FontSize: 10, TextColor: #00AAAA, RenderBold: true, Wrap: true); - Padding: (Left: 4, Right: 4); - Anchor: (Left: 0, Right: 0); + Style: (FontSize: 10, TextColor: #CCCCCC, RenderBold: true, Wrap: true, VerticalAlignment: Center); + Padding: (Left: 10, Right: 8); + Anchor: (Left: 1, Right: 0, Top: 0, Bottom: 0); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_row.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_row.ui index 8480e23a..2608050b 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_row.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_row.ui @@ -1,10 +1,16 @@ -// Help table data row - normal column values +// Help table data row - GitHub-style with bottom border Group { - Padding: (Top: 1, Bottom: 1); + Padding: (Top: 4, Bottom: 4); + + // Bottom border + Group { + Anchor: (Height: 1, Bottom: 0, Left: 0, Right: 0); + Background: (Color: #2a3a4a); + } Group #Cols { LayoutMode: Left; - Anchor: (Left: 0, Right: 0); + Anchor: (Left: 0, Top: 0, Bottom: 1); } } From c106a591db3f156d4e293281a37e170cdf1fd9f5 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Tue, 10 Mar 2026 14:53:56 -0700 Subject: [PATCH 37/55] feat: add admin help infrastructure with category filtering Add 8 admin help categories (ADMIN_OVERVIEW through ADMIN_REFERENCE) to HelpCategory enum with isAdmin() filter. Rewrite AdminHelpPage from placeholder to full sidebar+content rendering. Filter admin categories from player HelpMainPage. Add admin directory scanning to HelpLangGenerator build pipeline. --- .../build/HelpLangGenerator.java | 30 ++- .../gui/admin/data/AdminHelpData.java | 10 +- .../gui/admin/page/AdminHelpPage.java | 203 +++++++++++++++-- .../hyperfactions/gui/help/HelpCategory.java | 19 +- .../gui/help/page/HelpMainPage.java | 12 +- .../com/hyperfactions/util/MessageKeys.java | 9 + .../Custom/HyperFactions/admin/admin_help.ui | 213 +++++++++++++++--- .../Languages/en-US/hyperfactions_gui.lang | 10 + .../Languages/es-ES/hyperfactions_gui.lang | 10 + 9 files changed, 463 insertions(+), 53 deletions(-) diff --git a/src/main/java/com/hyperfactions/build/HelpLangGenerator.java b/src/main/java/com/hyperfactions/build/HelpLangGenerator.java index 300c6c96..213648a0 100644 --- a/src/main/java/com/hyperfactions/build/HelpLangGenerator.java +++ b/src/main/java/com/hyperfactions/build/HelpLangGenerator.java @@ -50,11 +50,17 @@ */ public class HelpLangGenerator { - /** Fixed category processing order. */ + /** Fixed category processing order (player help). */ private static final List CATEGORY_ORDER = List.of( "welcome", "your_faction", "power_land", "diplomacy", "combat", "economy", "quick_ref" ); + /** Fixed category processing order (admin help). */ + private static final List ADMIN_CATEGORY_ORDER = List.of( + "admin_overview", "admin_factions", "admin_zones", "admin_power", + "admin_economy", "admin_config", "admin_maintenance", "admin_reference" + ); + /** Pattern for inline hex color: [#RRGGBB] text */ private static final Pattern HEX_COLOR_PATTERN = Pattern.compile("^\\[#([0-9A-Fa-f]{6})]\\s*(.+)$"); @@ -166,7 +172,7 @@ public static void main(String[] args) { private static List parseLocale(Path localeDir) throws IOException { List topics = new ArrayList<>(); - // Process categories in defined order, skip any that don't exist + // Process player categories in defined order for (String category : CATEGORY_ORDER) { Path categoryDir = localeDir.resolve(category); if (!Files.isDirectory(categoryDir)) { @@ -183,6 +189,26 @@ private static List parseLocale(Path localeDir) throws IOException { } } + // Process admin categories from help/admin/ subdirectory + Path adminDir = localeDir.resolve("admin"); + if (Files.isDirectory(adminDir)) { + for (String category : ADMIN_CATEGORY_ORDER) { + Path categoryDir = adminDir.resolve(category); + if (!Files.isDirectory(categoryDir)) { + continue; + } + + List mdFiles = listMarkdownFiles(categoryDir); + for (Path mdFile : mdFiles) { + Topic topic = parseTopic(category, mdFile); + if (topic != null) { + topics.add(topic); + System.out.println(" Parsed: admin/" + category + "/" + mdFile.getFileName()); + } + } + } + } + return topics; } diff --git a/src/main/java/com/hyperfactions/gui/admin/data/AdminHelpData.java b/src/main/java/com/hyperfactions/gui/admin/data/AdminHelpData.java index ae29fd7b..caa4cb18 100644 --- a/src/main/java/com/hyperfactions/gui/admin/data/AdminHelpData.java +++ b/src/main/java/com/hyperfactions/gui/admin/data/AdminHelpData.java @@ -6,7 +6,7 @@ import org.jetbrains.annotations.Nullable; /** - * Event data for the Admin Help page (placeholder). + * Event data for the Admin Help page. */ public class AdminHelpData implements AdminNavAwareData { @@ -16,6 +16,9 @@ public class AdminHelpData implements AdminNavAwareData { /** Admin nav bar target (for navigation). */ public String adminNavBar; + /** Selected category ID (for category switching). */ + public String category; + /** Codec for serialization/deserialization. */ public static final BuilderCodec CODEC = BuilderCodec .builder(AdminHelpData.class, AdminHelpData::new) @@ -29,6 +32,11 @@ public class AdminHelpData implements AdminNavAwareData { (data, value) -> data.adminNavBar = value, data -> data.adminNavBar ) + .addField( + new KeyedCodec<>("Category", Codec.STRING), + (data, value) -> data.category = value, + data -> data.category + ) .build(); /** Creates a new AdminHelpData. */ 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 e111e173..7bfb80d7 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminHelpPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminHelpPage.java @@ -4,53 +4,213 @@ import com.hyperfactions.gui.UIPaths; import com.hyperfactions.gui.admin.AdminNavBarHelper; import com.hyperfactions.gui.admin.data.AdminHelpData; +import com.hyperfactions.gui.help.*; import com.hyperfactions.util.HFMessages; import com.hyperfactions.util.MessageKeys; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Store; import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime; +import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType; import com.hypixel.hytale.server.core.entity.entities.Player; import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage; +import com.hypixel.hytale.server.core.ui.builder.EventData; import com.hypixel.hytale.server.core.ui.builder.UICommandBuilder; import com.hypixel.hytale.server.core.ui.builder.UIEventBuilder; import com.hypixel.hytale.server.core.universe.PlayerRef; import com.hypixel.hytale.server.core.universe.world.storage.EntityStore; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** - * Admin Help page - placeholder for admin help/documentation. + * Admin Help page with sidebar navigation and card-based content area. + * Mirrors the player help layout but shows only admin categories. */ public class AdminHelpPage extends InteractiveCustomUIPage { + private static final Pattern CELL_HEX_COLOR = Pattern.compile("^\\[#([0-9A-Fa-f]{6})]\\s*(.+)$"); + private final PlayerRef playerRef; private final GuiManager guiManager; - /** Creates a new AdminHelpPage. */ + private final HelpCategory selectedCategory; + + /** Creates a new AdminHelpPage with default category. */ public AdminHelpPage(PlayerRef playerRef, GuiManager guiManager) { + this(playerRef, guiManager, HelpCategory.ADMIN_OVERVIEW); + } + + /** Creates a new AdminHelpPage with a specific category. */ + public AdminHelpPage(PlayerRef playerRef, GuiManager guiManager, + @NotNull HelpCategory initialCategory) { super(playerRef, CustomPageLifetime.CanDismiss, AdminHelpData.CODEC); this.playerRef = playerRef; this.guiManager = guiManager; + this.selectedCategory = initialCategory.isAdmin() ? initialCategory : HelpCategory.ADMIN_OVERVIEW; } - /** Builds . */ @Override public void build(Ref ref, UICommandBuilder cmd, UIEventBuilder events, Store store) { - // Load the placeholder template first (nav bar elements must exist before setupBar) cmd.append(UIPaths.ADMIN_HELP); - // Setup admin nav bar (must be after template load) + // Setup admin nav bar AdminNavBarHelper.setupBar(playerRef, "help", cmd, events); - // Localize page title and labels + // Page title cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_TITLE_HELP)); - cmd.set("#ComingSoon.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_HELP_HEADING)); - cmd.set("#ComingSoonSub.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_COMING_SOON)); - cmd.set("#Description.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_HELP_DESC1)); - cmd.set("#Description2.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_HELP_DESC2)); + + // Set localized sidebar button labels (admin categories only) + int catIdx = 0; + for (HelpCategory category : HelpCategory.values()) { + if (!category.isAdmin()) continue; + cmd.set("#Cat" + catIdx + ".Text", " " + category.displayName(playerRef)); + catIdx++; + } + + // Setup category buttons + setupCategoryButtons(cmd, events); + + // Set the category title header text and color + cmd.set("#CategoryTitle.Text", selectedCategory.displayName(playerRef).toUpperCase()); + cmd.set("#CategoryTitle.Style.TextColor", selectedCategory.color()); + + // Build topic cards + buildTopicCards(cmd); + } + + private void setupCategoryButtons(UICommandBuilder cmd, UIEventBuilder events) { + int idx = 0; + for (HelpCategory category : HelpCategory.values()) { + if (!category.isAdmin()) continue; + String buttonId = "#Cat" + idx; + boolean isSelected = category == selectedCategory; + + if (isSelected) { + cmd.set(buttonId + ".Disabled", true); + } else { + events.addEventBinding( + CustomUIEventBindingType.Activating, + buttonId, + EventData.of("Button", "SelectCategory") + .append("Category", category.id()) + ); + } + idx++; + } + } + + private void buildTopicCards(UICommandBuilder cmd) { + List topics = HelpRegistry.getInstance().getTopics(selectedCategory); + int cardIndex = 0; + + for (HelpTopic topic : topics) { + cmd.append("#ContentList", UIPaths.HELP_TOPIC_CARD); + String cardPrefix = "#ContentList[" + cardIndex + "]"; + + cmd.set(cardPrefix + " #Title.Text", topic.title(playerRef)); + + int lineIndex = 0; + for (HelpEntry entry : topic.entries()) { + String linesContainer = cardPrefix + " #Lines"; + + if (entry.type() == HelpEntry.EntryType.TABLE_HEADER || entry.type() == HelpEntry.EntryType.TABLE_ROW) { + boolean isHeader = entry.type() == HelpEntry.EntryType.TABLE_HEADER; + String rowTemplate = isHeader ? UIPaths.HELP_TABLE_HEADER : UIPaths.HELP_TABLE_ROW; + String cellTemplate = isHeader ? UIPaths.HELP_TABLE_HEADER_CELL : UIPaths.HELP_TABLE_CELL; + + cmd.append(linesContainer, rowTemplate); + String rowSelector = linesContainer + "[" + lineIndex + "]"; + String colsContainer = rowSelector + " #Cols"; + + String[] columnKeys = entry.columnKeys(); + for (int col = 0; col < columnKeys.length; col++) { + cmd.append(colsContainer, cellTemplate); + String cellSelector = colsContainer + "[" + col + "]"; + String cellText = HelpMessages.get(playerRef, columnKeys[col]); + applyCellFormatting(cmd, cellSelector, cellText, entry.color()); + } + + lineIndex++; + continue; + } + + String template = getTemplateForType(entry.type()); + cmd.append(linesContainer, template); + String selector = linesContainer + "[" + lineIndex + "]"; + + if (entry.type() != HelpEntry.EntryType.SPACER && entry.type() != HelpEntry.EntryType.SEPARATOR) { + String text = entry.text(playerRef); + + if (entry.type() == HelpEntry.EntryType.LIST && !text.matches("^\\d+\\.\\s.*")) { + text = "\u2022 " + text; + } + + cmd.set(selector + " #Text.Text", text); + + if (entry.color() != null) { + cmd.set(selector + " #Text.Style.TextColor", entry.color()); + if (entry.type() == HelpEntry.EntryType.CALLOUT) { + cmd.set(selector + " #AccentBar.Background.Color", entry.color()); + } + } + } + lineIndex++; + } + cardIndex++; + } + } + + private void applyCellFormatting(UICommandBuilder cmd, String cellSelector, + String text, @Nullable String rowColor) { + String displayText = text; + String cellColor = rowColor; + boolean bold = false; + boolean italic = false; + + Matcher hexMatcher = CELL_HEX_COLOR.matcher(displayText); + if (hexMatcher.matches()) { + cellColor = "#" + hexMatcher.group(1); + displayText = hexMatcher.group(2); + } + + if (displayText.startsWith("**") && displayText.endsWith("**") && displayText.length() > 4) { + displayText = displayText.substring(2, displayText.length() - 2); + bold = true; + } else if (displayText.startsWith("`") && displayText.endsWith("`") && displayText.length() > 2) { + displayText = displayText.substring(1, displayText.length() - 1); + bold = true; + if (cellColor == null) cellColor = "#FFFF55"; + } else if (displayText.startsWith("*") && displayText.endsWith("*") && displayText.length() > 2) { + displayText = displayText.substring(1, displayText.length() - 1); + italic = true; + } + + cmd.set(cellSelector + " #CellText.Text", displayText); + if (bold) cmd.set(cellSelector + " #CellText.Style.RenderBold", true); + if (italic) cmd.set(cellSelector + " #CellText.Style.RenderItalics", true); + if (cellColor != null) cmd.set(cellSelector + " #CellText.Style.TextColor", cellColor); + } + + private String getTemplateForType(HelpEntry.EntryType type) { + return switch (type) { + case TEXT -> UIPaths.HELP_LINE_TEXT; + case COMMAND -> UIPaths.HELP_LINE_COMMAND; + case HEADING -> UIPaths.HELP_LINE_HEADING; + case SPACER -> UIPaths.HELP_SPACER; + case BOLD -> UIPaths.HELP_LINE_BOLD; + case ITALIC -> UIPaths.HELP_LINE_ITALIC; + case LIST -> UIPaths.HELP_LINE_LIST; + case SEPARATOR -> UIPaths.HELP_SEPARATOR; + case CALLOUT -> UIPaths.HELP_LINE_CALLOUT; + case TABLE_HEADER -> UIPaths.HELP_TABLE_HEADER; + case TABLE_ROW -> UIPaths.HELP_TABLE_ROW; + }; } - /** Handles data event. */ @Override public void handleDataEvent(Ref ref, Store store, AdminHelpData data) { @@ -60,6 +220,7 @@ public void handleDataEvent(Ref ref, Store store, PlayerRef playerRef = store.getComponent(ref, PlayerRef.getComponentType()); if (player == null || playerRef == null) { + sendUpdate(); return; } @@ -68,12 +229,20 @@ public void handleDataEvent(Ref ref, Store store, return; } - // Handle other button events (placeholder for future implementation) - if (data.button != null) { - switch (data.button) { - case "Back" -> guiManager.closePage(player, ref, store); - default -> throw new IllegalStateException("Unexpected value"); - } + // Handle category selection + if ("SelectCategory".equals(data.button) && data.category != null) { + HelpCategory newCategory = HelpCategory.fromId(data.category); + AdminHelpPage newPage = new AdminHelpPage(playerRef, guiManager, newCategory); + player.getPageManager().openCustomPage(ref, store, newPage); + return; } + + // Handle back button + if (data.button != null && "Back".equals(data.button)) { + guiManager.closePage(player, ref, store); + return; + } + + sendUpdate(); } } diff --git a/src/main/java/com/hyperfactions/gui/help/HelpCategory.java b/src/main/java/com/hyperfactions/gui/help/HelpCategory.java index 03561abc..db24bf27 100644 --- a/src/main/java/com/hyperfactions/gui/help/HelpCategory.java +++ b/src/main/java/com/hyperfactions/gui/help/HelpCategory.java @@ -15,7 +15,17 @@ public enum HelpCategory { DIPLOMACY("diplomacy", "hyperfactions_gui.help.category.diplomacy", "#55AAFF", 3), COMBAT("combat", "hyperfactions_gui.help.category.combat", "#FF5555", 4), ECONOMY("economy", "hyperfactions_gui.help.category.economy", "#FFAA00", 5), - QUICK_REFERENCE("quick_ref", "hyperfactions_gui.help.category.quick_ref", "#888888", 6); + QUICK_REFERENCE("quick_ref", "hyperfactions_gui.help.category.quick_ref", "#888888", 6), + + // Admin categories (order 100+, filtered from player help) + ADMIN_OVERVIEW("admin_overview", "hyperfactions_gui.help.category.admin_overview", "#00FFFF", 100), + ADMIN_FACTIONS("admin_factions", "hyperfactions_gui.help.category.admin_factions", "#44CC44", 101), + ADMIN_ZONES("admin_zones", "hyperfactions_gui.help.category.admin_zones", "#FFAA00", 102), + ADMIN_POWER("admin_power", "hyperfactions_gui.help.category.admin_power", "#FFD700", 103), + ADMIN_ECONOMY("admin_economy", "hyperfactions_gui.help.category.admin_economy", "#55FF55", 104), + ADMIN_CONFIG("admin_config", "hyperfactions_gui.help.category.admin_config", "#55AAFF", 105), + ADMIN_MAINTENANCE("admin_maintenance", "hyperfactions_gui.help.category.admin_maintenance", "#FF5555", 106), + ADMIN_REFERENCE("admin_reference", "hyperfactions_gui.help.category.admin_reference", "#888888", 107); private final String id; @@ -72,6 +82,13 @@ public int order() { return order; } + /** + * Returns true if this is an admin-only category (order >= 100). + */ + public boolean isAdmin() { + return order >= 100; + } + /** * Finds a category by its ID. * 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 bba3bee5..5580e9e8 100644 --- a/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java +++ b/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java @@ -117,10 +117,12 @@ public void build(Ref ref, UICommandBuilder cmd, // Page title cmd.set("#PageTitle.Text", HFMessages.get(playerRef, MessageKeys.HelpGui.HELP_CENTER_TITLE)); - // Set localized sidebar button labels + // Set localized sidebar button labels (player categories only) + int catIdx = 0; for (HelpCategory category : HelpCategory.values()) { - int idx = category.ordinal(); - cmd.set("#Cat" + idx + ".Text", " " + category.displayName(playerRef)); + if (category.isAdmin()) continue; + cmd.set("#Cat" + catIdx + ".Text", " " + category.displayName(playerRef)); + catIdx++; } // Setup category buttons (disable selected, bind events to others) @@ -139,8 +141,9 @@ public void build(Ref ref, UICommandBuilder cmd, * and binding click events to the others. */ private void setupCategoryButtons(UICommandBuilder cmd, UIEventBuilder events) { + int idx = 0; for (HelpCategory category : HelpCategory.values()) { - int idx = category.ordinal(); + if (category.isAdmin()) continue; String buttonId = "#Cat" + idx; boolean isSelected = category == selectedCategory; @@ -156,6 +159,7 @@ private void setupCategoryButtons(UICommandBuilder cmd, UIEventBuilder events) { .append("Category", category.id()) ); } + idx++; } } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 66433f87..4a4a316d 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -956,6 +956,15 @@ public static final class HelpGui { 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 diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_help.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_help.ui index 4a3cff24..4d777e61 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_help.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_help.ui @@ -1,57 +1,214 @@ +// Admin Help - Sidebar layout with 8 admin categories +// Mirrors help_main.ui but for admin documentation $C = "../../Common.ui"; $S = "../shared/styles.ui"; $Nav = "admin_nav_bar.ui"; +// === Sidebar button styles per admin category === + +@SidebarLabel = LabelStyle( + FontSize: 11, + TextColor: #bfcdd5, + RenderBold: true +); + +// Admin Overview (#00FFFF) +@SidebarLabelCyan = LabelStyle(FontSize: 11, TextColor: #00FFFF, RenderBold: true); +@CatStyleCyan = TextButtonStyle( + Default: (Background: $C.@DefaultSquareButtonDefaultBackground, LabelStyle: @SidebarLabel), + Hovered: (Background: $C.@DefaultSquareButtonHoveredBackground, LabelStyle: @SidebarLabel), + Pressed: (Background: $C.@DefaultSquareButtonPressedBackground, LabelStyle: @SidebarLabel), + Disabled: (Background: $C.@DefaultSquareButtonDisabledBackground, LabelStyle: @SidebarLabelCyan), + Sounds: $C.@ButtonSounds +); + +// Admin Factions (#44CC44) +@SidebarLabelGreen = LabelStyle(FontSize: 11, TextColor: #44CC44, RenderBold: true); +@CatStyleGreen = TextButtonStyle( + Default: (Background: $C.@DefaultSquareButtonDefaultBackground, LabelStyle: @SidebarLabel), + Hovered: (Background: $C.@DefaultSquareButtonHoveredBackground, LabelStyle: @SidebarLabel), + Pressed: (Background: $C.@DefaultSquareButtonPressedBackground, LabelStyle: @SidebarLabel), + Disabled: (Background: $C.@DefaultSquareButtonDisabledBackground, LabelStyle: @SidebarLabelGreen), + Sounds: $C.@ButtonSounds +); + +// Admin Zones (#FFAA00) +@SidebarLabelOrange = LabelStyle(FontSize: 11, TextColor: #FFAA00, RenderBold: true); +@CatStyleOrange = TextButtonStyle( + Default: (Background: $C.@DefaultSquareButtonDefaultBackground, LabelStyle: @SidebarLabel), + Hovered: (Background: $C.@DefaultSquareButtonHoveredBackground, LabelStyle: @SidebarLabel), + Pressed: (Background: $C.@DefaultSquareButtonPressedBackground, LabelStyle: @SidebarLabel), + Disabled: (Background: $C.@DefaultSquareButtonDisabledBackground, LabelStyle: @SidebarLabelOrange), + Sounds: $C.@ButtonSounds +); + +// Admin Power (#FFD700) +@SidebarLabelGold = LabelStyle(FontSize: 11, TextColor: #FFD700, RenderBold: true); +@CatStyleGold = TextButtonStyle( + Default: (Background: $C.@DefaultSquareButtonDefaultBackground, LabelStyle: @SidebarLabel), + Hovered: (Background: $C.@DefaultSquareButtonHoveredBackground, LabelStyle: @SidebarLabel), + Pressed: (Background: $C.@DefaultSquareButtonPressedBackground, LabelStyle: @SidebarLabel), + Disabled: (Background: $C.@DefaultSquareButtonDisabledBackground, LabelStyle: @SidebarLabelGold), + Sounds: $C.@ButtonSounds +); + +// Admin Economy (#55FF55) +@SidebarLabelBrightGreen = LabelStyle(FontSize: 11, TextColor: #55FF55, RenderBold: true); +@CatStyleBrightGreen = TextButtonStyle( + Default: (Background: $C.@DefaultSquareButtonDefaultBackground, LabelStyle: @SidebarLabel), + Hovered: (Background: $C.@DefaultSquareButtonHoveredBackground, LabelStyle: @SidebarLabel), + Pressed: (Background: $C.@DefaultSquareButtonPressedBackground, LabelStyle: @SidebarLabel), + Disabled: (Background: $C.@DefaultSquareButtonDisabledBackground, LabelStyle: @SidebarLabelBrightGreen), + Sounds: $C.@ButtonSounds +); + +// Admin Config (#55AAFF) +@SidebarLabelBlue = LabelStyle(FontSize: 11, TextColor: #55AAFF, RenderBold: true); +@CatStyleBlue = TextButtonStyle( + Default: (Background: $C.@DefaultSquareButtonDefaultBackground, LabelStyle: @SidebarLabel), + Hovered: (Background: $C.@DefaultSquareButtonHoveredBackground, LabelStyle: @SidebarLabel), + Pressed: (Background: $C.@DefaultSquareButtonPressedBackground, LabelStyle: @SidebarLabel), + Disabled: (Background: $C.@DefaultSquareButtonDisabledBackground, LabelStyle: @SidebarLabelBlue), + Sounds: $C.@ButtonSounds +); + +// Admin Maintenance (#FF5555) +@SidebarLabelRed = LabelStyle(FontSize: 11, TextColor: #FF5555, RenderBold: true); +@CatStyleRed = TextButtonStyle( + Default: (Background: $C.@DefaultSquareButtonDefaultBackground, LabelStyle: @SidebarLabel), + Hovered: (Background: $C.@DefaultSquareButtonHoveredBackground, LabelStyle: @SidebarLabel), + Pressed: (Background: $C.@DefaultSquareButtonPressedBackground, LabelStyle: @SidebarLabel), + Disabled: (Background: $C.@DefaultSquareButtonDisabledBackground, LabelStyle: @SidebarLabelRed), + Sounds: $C.@ButtonSounds +); + +// Admin Reference (#888888) +@SidebarLabelGray = LabelStyle(FontSize: 11, TextColor: #888888, RenderBold: true); +@CatStyleGray = TextButtonStyle( + Default: (Background: $C.@DefaultSquareButtonDefaultBackground, LabelStyle: @SidebarLabel), + Hovered: (Background: $C.@DefaultSquareButtonHoveredBackground, LabelStyle: @SidebarLabel), + Pressed: (Background: $C.@DefaultSquareButtonPressedBackground, LabelStyle: @SidebarLabel), + Disabled: (Background: $C.@DefaultSquareButtonDisabledBackground, LabelStyle: @SidebarLabelGray), + Sounds: $C.@ButtonSounds +); + $C.@PageOverlay { $Nav.@HyperFactionsAdminNavBar #HyperFactionsAdminNavBar {} - $C.@Container { - Anchor: (Width: 600, Height: 470); + $C.@DecoratedContainer { + Anchor: (Width: 750, Height: 650); #Title { - $C.@Title #PageTitle { - @Text = "Admin Help"; + Group { + $C.@Title #PageTitle { + @Text = "Admin Help"; + } } } #Content { - LayoutMode: Top; - Padding: (Left: 15, Right: 15, Top: 10, Bottom: 10); + LayoutMode: Left; + Padding: (Left: 10, Right: 10, Top: 10, Bottom: 10); - Group #PlaceholderContent { - FlexWeight: 1; + // Left column - Admin category sidebar (180px) + Group #CategoryMenu { + Anchor: (Width: 180); LayoutMode: Top; + Padding: (Left: 0, Right: 8, Top: 0, Bottom: 0); + + // Category 0: Admin Overview (cyan) + Group { + Anchor: (Height: 34, Bottom: 2); + LayoutMode: Left; + Group { Anchor: (Width: 3); Background: (Color: #00FFFF); } + TextButton #Cat0 { Text: " Overview"; FlexWeight: 1; Anchor: (Height: 34); Style: @CatStyleCyan; } + } - Label { - Anchor: (Height: 100); + // Category 1: Admin Factions (green) + Group { + Anchor: (Height: 34, Bottom: 2); + LayoutMode: Left; + Group { Anchor: (Width: 3); Background: (Color: #44CC44); } + TextButton #Cat1 { Text: " Factions"; FlexWeight: 1; Anchor: (Height: 34); Style: @CatStyleGreen; } } - Label #ComingSoon { - Text: "Admin Documentation"; - Style: (FontSize: 24, TextColor: #00FFFF, HorizontalAlignment: Center, VerticalAlignment: Center, RenderBold: true); - Anchor: (Height: 40); + // Category 2: Admin Zones (orange) + Group { + Anchor: (Height: 34, Bottom: 2); + LayoutMode: Left; + Group { Anchor: (Width: 3); Background: (Color: #FFAA00); } + TextButton #Cat2 { Text: " Zones"; FlexWeight: 1; Anchor: (Height: 34); Style: @CatStyleOrange; } } - Label #ComingSoonSub { - Text: "Coming Soon"; - Style: (FontSize: 16, TextColor: #888888, HorizontalAlignment: Center, VerticalAlignment: Center); - Anchor: (Height: 30); + // Category 3: Admin Power (gold) + Group { + Anchor: (Height: 34, Bottom: 2); + LayoutMode: Left; + Group { Anchor: (Width: 3); Background: (Color: #FFD700); } + TextButton #Cat3 { Text: " Power"; FlexWeight: 1; Anchor: (Height: 34); Style: @CatStyleGold; } } - Label { - Anchor: (Height: 20); + // Category 4: Admin Economy (bright green) + Group { + Anchor: (Height: 34, Bottom: 2); + LayoutMode: Left; + Group { Anchor: (Width: 3); Background: (Color: #55FF55); } + TextButton #Cat4 { Text: " Economy"; FlexWeight: 1; Anchor: (Height: 34); Style: @CatStyleBrightGreen; } + } + + // Category 5: Admin Config (blue) + Group { + Anchor: (Height: 34, Bottom: 2); + LayoutMode: Left; + Group { Anchor: (Width: 3); Background: (Color: #55AAFF); } + TextButton #Cat5 { Text: " Config"; FlexWeight: 1; Anchor: (Height: 34); Style: @CatStyleBlue; } + } + + // Category 6: Admin Maintenance (red) + Group { + Anchor: (Height: 34, Bottom: 2); + LayoutMode: Left; + Group { Anchor: (Width: 3); Background: (Color: #FF5555); } + TextButton #Cat6 { Text: " Maintenance"; FlexWeight: 1; Anchor: (Height: 34); Style: @CatStyleRed; } + } + + // Category 7: Admin Reference (gray) + Group { + Anchor: (Height: 34, Bottom: 2); + LayoutMode: Left; + Group { Anchor: (Width: 3); Background: (Color: #888888); } + TextButton #Cat7 { Text: " Reference"; FlexWeight: 1; Anchor: (Height: 34); Style: @CatStyleGray; } + } + } + + // Divider line + Group { + Anchor: (Width: 1); + Background: (Color: #2a3a4a); + } + + // Right column - Scrollable content area + Group #ContentArea { + FlexWeight: 1; + LayoutMode: TopScrolling; + ScrollbarStyle: $C.@DefaultScrollbarStyle; + Padding: (Left: 15, Right: 10, Top: 0, Bottom: 10); + + // Category title header + Label #CategoryTitle { + Text: ""; + Style: (FontSize: 14, TextColor: #00FFFF, RenderBold: true); + Anchor: (Height: 28, Left: 0, Right: 0); } - Label #Description { - Text: "Admin commands, permissions, and configuration guide."; - Style: (FontSize: 12, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); - Anchor: (Height: 25); + // Spacer after title + Group { + Anchor: (Height: 6); } - Label #Description2 { - Text: "Use /f help admin for command documentation."; - Style: (FontSize: 12, TextColor: #666666, HorizontalAlignment: Center, VerticalAlignment: Center); - Anchor: (Height: 25); + // Dynamic content container for topic cards + Group #ContentList { + LayoutMode: Top; } } } diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index 66a595c6..2e38f503 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -27,6 +27,16 @@ help.category.combat = Combat & Safety help.category.economy = Economy help.category.quick_ref = Quick Reference +# ========== Admin Help Category Names ========== +help.category.admin_overview = Overview +help.category.admin_factions = Factions +help.category.admin_zones = Zones +help.category.admin_power = Power +help.category.admin_economy = Economy +help.category.admin_config = Configuration +help.category.admin_maintenance = Maintenance +help.category.admin_reference = Reference + # ========== Main Menu ========== main_menu.title = HyperFactions main_menu.section_my_faction = My Faction diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang index 86283a10..475d5229 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang @@ -27,6 +27,16 @@ help.category.combat = Combate y Seguridad help.category.economy = Economia help.category.quick_ref = Referencia Rapida +# ========== Nombres de Categorias de Ayuda Admin ========== +help.category.admin_overview = General +help.category.admin_factions = Facciones +help.category.admin_zones = Zonas +help.category.admin_power = Poder +help.category.admin_economy = Economia +help.category.admin_config = Configuracion +help.category.admin_maintenance = Mantenimiento +help.category.admin_reference = Referencia + # ========== Menu Principal ========== main_menu.title = HyperFactions main_menu.section_my_faction = Mi Faccion From 65d5e1d31712013f75171f2fef35d1a485a6b79c Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Tue, 10 Mar 2026 14:54:11 -0700 Subject: [PATCH 38/55] feat: rewrite player help categories 1-4 (en-US) with enhanced formatting Comprehensive rewrite of welcome, your_faction, power_land, and diplomacy help using tables, callouts, bold formatting, and accurate default config values. 14 topics expanded with detailed mechanics. --- .../en-US/help/diplomacy/alliances.md | 41 +++++++++++++++-- .../Languages/en-US/help/diplomacy/enemies.md | 42 ++++++++++++++--- .../en-US/help/diplomacy/relations.md | 34 +++++++++++--- .../en-US/help/power_land/claiming.md | 42 +++++++++++++++-- .../en-US/help/power_land/losing_territory.md | 44 ++++++++++++++++-- .../en-US/help/power_land/territory_map.md | 39 ++++++++++++++-- .../help/power_land/understanding_power.md | 39 ++++++++++++++-- .../en-US/help/welcome/getting_started.md | 36 ++++++++++++--- .../en-US/help/welcome/quick_tips.md | 46 +++++++++++++++---- .../en-US/help/welcome/what_are_factions.md | 37 ++++++++++++--- .../en-US/help/your_faction/creating.md | 33 +++++++++++-- .../en-US/help/your_faction/joining.md | 35 ++++++++++---- .../en-US/help/your_faction/managing.md | 42 +++++++++++++---- .../en-US/help/your_faction/roles.md | 46 +++++++++++++++---- 14 files changed, 464 insertions(+), 92 deletions(-) diff --git a/src/main/resources/Server/Languages/en-US/help/diplomacy/alliances.md b/src/main/resources/Server/Languages/en-US/help/diplomacy/alliances.md index b0694d30..57a13187 100644 --- a/src/main/resources/Server/Languages/en-US/help/diplomacy/alliances.md +++ b/src/main/resources/Server/Languages/en-US/help/diplomacy/alliances.md @@ -4,11 +4,42 @@ commands: ally --- # Forming Alliances -Alliances protect both factions from friendly -fire and territorial disputes. +Alliances are **mutual agreements** between two factions that provide protection and cooperation benefits. + +--- + +## How to Form an Alliance `/f ally ` -Sends an alliance request. Both sides must agree. -Benefits: no friendly fire, shared map visibility. -> There may be a limit on alliance count. +Sends an alliance request to the target faction. The alliance only takes effect once **both sides agree**. An Officer or Leader from the other faction must also run `/f ally ` to confirm. + +## How to Break an Alliance + +`/f neutral ` + +Either side can unilaterally end an alliance by resetting the relation to neutral. + +--- + +## Alliance Benefits + +| Benefit | Details | +|---------|---------| +| **No friendly fire** | Allied players cannot damage each other (when allyDamage is disabled) | +| **Shared map visibility** | Allied territory shows in [#5555FF] blue on the territory map | +| **Territory interaction** | Allies can use doors, seats, and transport in your territory by default | +| **Ally chat** | Use `/f c` to cycle to ally chat mode for cross-faction communication | +| **Overclaim protection** | Allies cannot overclaim each other's territory | + +>[!NOTE] Your faction can have up to **10 alliances** at a time. Choose your allies wisely. + +--- + +## Alliance Etiquette + +>[!TIP] Communication is key. Before sending an alliance request, consider reaching out to the other faction's leader to discuss terms. A strong alliance is built on mutual benefit, not just convenience. + +- Alliances work both ways -- if you benefit from protection, your allies expect the same +- Breaking an alliance during wartime may damage your faction's reputation +- Allied factions can coordinate territory claims to create defensible borders diff --git a/src/main/resources/Server/Languages/en-US/help/diplomacy/enemies.md b/src/main/resources/Server/Languages/en-US/help/diplomacy/enemies.md index 180bc869..74c9ca45 100644 --- a/src/main/resources/Server/Languages/en-US/help/diplomacy/enemies.md +++ b/src/main/resources/Server/Languages/en-US/help/diplomacy/enemies.md @@ -4,14 +4,44 @@ commands: enemy, neutral --- # Enemy Factions -Declaring an enemy enables PvP and territorial -aggression against them. One-way action. +Declaring an enemy is a **one-way action** that immediately enables PvP and territorial aggression against the target faction. No agreement is required. + +--- + +## Declaring an Enemy `/f enemy ` -Declares enemy immediately. No agreement needed. -PvP enabled in each other's territory. Overclaim -possible if they become weakened. +Instantly marks the target faction as your enemy. This takes effect immediately -- no confirmation from the other side is needed. Requires Officer rank or higher. + +## Resetting to Neutral `/f neutral ` -Resets relation to neutral, ending enemy status. + +Ends the enemy status and resets the relation to neutral. This also requires Officer+ and takes effect immediately. + +--- + +## What Enemy Status Enables + +| Effect | Details | +|--------|---------| +| **PvP in territory** | Full PvP is enabled in both factions' territory | +| **Overclaiming** | You can `/f overclaim` their chunks if they are in a power deficit | +| **Map marking** | Enemy territory shows in [#FF5555] red on the territory map | +| **No protection** | Standard territory protection does not prevent enemy PvP | + +>[!WARNING] Declaring an enemy is a serious decision. Their members can also fight you in your own territory once you declare. + +--- + +## Strategic Considerations + +- Enemy declarations are **one-way** -- you can declare without their consent, but they also see you as hostile +- Before declaring, check the target's power with `/f info `. If they are strong, you may lose territory instead +- Weaken enemies through repeated combat to drain their power, then overclaim their land +- There is **no limit** to how many enemies you can have, but fighting on multiple fronts is risky + +>[!TIP] Use `/f neutral ` to de-escalate conflicts. Sometimes a strategic peace is more valuable than continued war. + +>[!NOTE] If you are allied with a faction and declare them as an enemy, the alliance is broken first. diff --git a/src/main/resources/Server/Languages/en-US/help/diplomacy/relations.md b/src/main/resources/Server/Languages/en-US/help/diplomacy/relations.md index 208db5e7..9ec717c5 100644 --- a/src/main/resources/Server/Languages/en-US/help/diplomacy/relations.md +++ b/src/main/resources/Server/Languages/en-US/help/diplomacy/relations.md @@ -4,15 +4,35 @@ commands: relations --- # Faction Relations -Every faction pair has a diplomatic relation: +Every pair of factions has a diplomatic relation that determines how they interact. There are three states: **Ally**, **Enemy**, and **Neutral**. -Ally — No friendly fire, protected from each -other's claims. Requires mutual agreement. +--- + +## Relation Comparison -Enemy — PvP enabled in each other's territory. -Overclaiming possible if target is weakened. +| Effect | Ally | Neutral | Enemy | +|--------|------|---------|-------| +| **PvP in territory** | Disabled | Standard rules | Enabled | +| **Territory protection** | Mutual protection | Standard protection | Can overclaim if weakened | +| **Friendly fire** | Disabled | N/A | Enabled everywhere | +| **Map color** | [#5555FF] Blue | [#AAAAAA] Gray | [#FF5555] Red | +| **How to set** | Mutual agreement | Default state | One-way declaration | +| **Chat access** | Ally chat channel | None | None | -Neutral — Default state. Standard rules apply. +--- + +## Viewing Relations `/f relations` -View all alliances, enemies, and pending requests. + +Shows all your current alliances, enemies, and any pending alliance requests. + +## How Relations Work + +- **Neutral** is the default state between all factions. Standard server rules apply. +- **Alliance** requires both factions to agree. Either side can break it unilaterally. +- **Enemy** is declared one-way. No agreement needed -- the other faction is immediately marked as your enemy. + +>[!INFO] Relations are managed by Officers and Leaders. Members can view relations but cannot change them. + +>[!TIP] Use `/f relations` regularly to keep track of the diplomatic landscape. Knowing who your enemies are helps you prepare for territorial conflicts. diff --git a/src/main/resources/Server/Languages/en-US/help/power_land/claiming.md b/src/main/resources/Server/Languages/en-US/help/power_land/claiming.md index f308f9e2..83212207 100644 --- a/src/main/resources/Server/Languages/en-US/help/power_land/claiming.md +++ b/src/main/resources/Server/Languages/en-US/help/power_land/claiming.md @@ -4,13 +4,45 @@ commands: claim, unclaim --- # Claiming Territory -Claiming a chunk protects it. Only members can -build, break, or access containers inside. +Claiming a chunk protects it under your faction's control. Only faction members can build, break, or access containers inside claimed territory. + +--- + +## How to Claim `/f claim` -Claims the chunk you're standing in. (Officer+) + +Stand in the chunk you want to claim and run this command. The chunk is immediately protected. Requires **Officer** rank or higher. + +## How to Unclaim `/f unclaim` -Releases a claim back to wilderness. (Officer+) -> Each claim costs one power. Don't over-expand! +Releases the chunk you are standing in back to wilderness. Also requires Officer+. + +--- + +## Claim Rules + +| Rule | Default | +|------|---------| +| **Power cost per claim** | 2.0 power | +| **Maximum claims** | 100 per faction | +| **Adjacent only** | No (you can claim anywhere) | + +>[!INFO] Each claim costs 2.0 power to maintain. A faction with 50 total power can hold up to 25 claims safely. + +--- + +## What Protection Provides + +Inside claimed territory, the following is enforced by default: + +- **Outsiders** cannot break, place, or interact with blocks +- **Allies** can use doors, seats, and transport but cannot break or place blocks +- **Members and Officers** have full access to build, break, and use everything +- Container access (chests, crates) is restricted to members only + +>[!TIP] You can also claim directly from the territory map. Open `/f map` and click on unclaimed chunks to claim them. + +>[!WARNING] Do not over-expand. If your faction loses power through deaths, claims beyond your power budget become vulnerable to overclaiming. diff --git a/src/main/resources/Server/Languages/en-US/help/power_land/losing_territory.md b/src/main/resources/Server/Languages/en-US/help/power_land/losing_territory.md index 6c6ab858..36b7a915 100644 --- a/src/main/resources/Server/Languages/en-US/help/power_land/losing_territory.md +++ b/src/main/resources/Server/Languages/en-US/help/power_land/losing_territory.md @@ -4,11 +4,45 @@ commands: overclaim --- # Losing Territory -If total power drops below claim count, you're -raidable. Enemies can overclaim your chunks. +When a faction's total power drops below the cost of its claims, it becomes **raidable**. Enemies can overclaim chunks right out from under you. + +--- + +## How Overclaiming Works `/f overclaim` -Takes a chunk from a weakened faction. (Officer+) -Stay safe: stay active, avoid deaths, don't -over-expand beyond what your power supports. +An Officer or Leader from an **enemy** faction stands in your claimed chunk and runs this command. If your faction is in a power deficit, the chunk transfers to their faction. + +## The Math + +Each claim costs **2.0 power** to maintain. If your total power falls below that threshold, the deficit chunks are vulnerable. + +>[!WARNING] Overclaiming is permanent. Once an enemy takes a chunk, you must reclaim it (or overclaim it back if they weaken). + +--- + +## Example Scenario + +| Factor | Value | +|--------|-------| +| Members | 5 players | +| Power per member | 10 each (starting) | +| **Total power** | **50** | +| Claims | 30 chunks | +| Power needed (30 x 2.0) | **60** | +| **Deficit** | **10 power short** | + +In this example, the faction is already raidable from the start. Enemies could overclaim up to **5 chunks** (10 deficit / 2.0 per claim) before the faction reaches equilibrium. + +--- + +## How to Prevent Overclaiming + +- **Do not over-expand** -- always keep total power above your claim cost with a buffer +- **Stay active** -- power only regenerates while online (+0.1/min) +- **Avoid unnecessary deaths** -- each death costs 1.0 power +- **Recruit more members** -- more players means more total power +- **Unclaim unused chunks** -- free up power with `/f unclaim` + +>[!TIP] Check your power status regularly with `/f power`. If your total power is close to your claim cost, consider unclaiming less important chunks before a war. diff --git a/src/main/resources/Server/Languages/en-US/help/power_land/territory_map.md b/src/main/resources/Server/Languages/en-US/help/power_land/territory_map.md index aa31f43d..3b1e3293 100644 --- a/src/main/resources/Server/Languages/en-US/help/power_land/territory_map.md +++ b/src/main/resources/Server/Languages/en-US/help/power_land/territory_map.md @@ -4,10 +4,41 @@ commands: map --- # The Territory Map -A bird's-eye view of claimed chunks near you. +The territory map gives you a bird's-eye view of claimed chunks in your area, showing which factions control the land around you. + +--- + +## Opening the Map `/f map` -Opens the territory map. Click chunks to claim. -Your faction shows in your color. Allies in blue, -enemies in red, neutrals in gray, wilderness dark. +Opens the territory map GUI centered on your current location. + +--- + +## Color Legend + +| Color | Meaning | +|-------|---------| +| [#55FF55] **Your faction's color** | Territory claimed by your faction | +| [#5555FF] **Blue** | Allied faction territory | +| [#FF5555] **Red** | Enemy faction territory | +| [#AAAAAA] **Gray** | Neutral faction territory | +| [#333333] **Dark** | Wilderness (unclaimed land) | +| [#FFAA00] **Gold** | Special zones (safezone, warzone) | + +>[!INFO] Your faction's color on the map matches the color you set with the faction color setting. Allies and enemies use fixed colors for easy identification. + +--- + +## Click to Claim + +The map is not just for viewing -- you can interact with it directly. + +- **Click an unclaimed chunk** to claim it (requires Officer+ rank and sufficient power) +- **Click a claimed chunk** to see which faction owns it +- Scroll or pan to explore the area around you + +>[!TIP] The map is the easiest way to plan your territory expansion. Look for unclaimed areas near your base and claim strategically to create a contiguous border. + +>[!NOTE] The map shows a fixed area around your position. Move to a different location and reopen it to see other parts of the world. diff --git a/src/main/resources/Server/Languages/en-US/help/power_land/understanding_power.md b/src/main/resources/Server/Languages/en-US/help/power_land/understanding_power.md index d18b9bcb..f46586dc 100644 --- a/src/main/resources/Server/Languages/en-US/help/power_land/understanding_power.md +++ b/src/main/resources/Server/Languages/en-US/help/power_land/understanding_power.md @@ -4,11 +4,40 @@ commands: power --- # Understanding Power -Power lets your faction hold territory. Every -player has personal power that adds to the total. +Power is the core resource that determines how much territory your faction can hold. Every player has personal power that contributes to the faction total. + +--- + +## Default Power Values + +| Setting | Value | +|---------|-------| +| **Maximum power per player** | 20 | +| **Starting power** | 10 | +| **Death penalty** | -1.0 per death | +| **Kill reward** | 0.0 | +| **Regen rate** | +0.1 per minute (while online) | +| **Power cost per claim** | 2.0 | +| **Logout while tagged** | -1.0 additional | + +## How It Works + +Your faction's **total power** is the sum of every member's personal power. Your **required power** is the number of claims multiplied by 2.0. As long as total power stays above required power, your territory is safe. + +>[!INFO] Power regenerates passively at 0.1 per minute while you are online. At that rate, recovering 1.0 power takes about 10 minutes. + +--- + +## Checking Your Power `/f power` -Check your power and your faction's total. -Power regenerates online, decreases on death. -> If claims exceed power, you're vulnerable! +Shows your personal power, your faction's total power, and how much is needed to maintain current claims. + +## The Danger Zone + +If total power falls **below** the required amount for your claims, your faction becomes vulnerable. Enemies can use `/f overclaim` to steal your chunks. + +>[!WARNING] Multiple deaths in a short period can cascade quickly. If you have 5 members each at 10 power (50 total) and 20 claims (40 needed), just 5 deaths across your team drops you to 45 -- still safe. But 11 deaths puts you at 39, below the 40 threshold. + +>[!TIP] Keep a power buffer. Do not claim every chunk you can afford -- leave room for a few deaths without becoming raidable. diff --git a/src/main/resources/Server/Languages/en-US/help/welcome/getting_started.md b/src/main/resources/Server/Languages/en-US/help/welcome/getting_started.md index 8c50830c..a63c39a6 100644 --- a/src/main/resources/Server/Languages/en-US/help/welcome/getting_started.md +++ b/src/main/resources/Server/Languages/en-US/help/welcome/getting_started.md @@ -4,13 +4,35 @@ commands: gui, menu --- # Getting Started -Ready to dive in? Here's how: +Welcome to HyperFactions! Here is how to get up and running in just a few steps. -`/f` -Opens the faction menu. Browse factions, create -your own, or check invitations. +--- + +## Step 1: Open the Faction Menu + +Type `/f` to open the main faction GUI. This is your hub for everything -- browsing factions, creating your own, and managing invitations. + +## Step 2: Choose Your Path + +| Option | How | +|--------|-----| +| **Browse open factions** | Click *Browse* in the menu and hit *Join* on any open faction. | +| **Accept an invitation** | Check the *Invites* tab. If someone invited you, click *Accept*. | +| **Create your own** | Click *Create Faction*, pick a name, and you are the Leader. | + +## Step 3: Explore Your Faction + +Once you are in a faction, you will see the **Faction Dashboard** with your roster, territory map, relations, and settings. + +>[!TIP] If you are brand new, try joining an existing faction first. You will learn the ropes faster with experienced members around you. + +--- + +## Essential First Commands -If invited, check the Invites tab and accept. -Otherwise, browse open factions or start fresh. +- `/f` -- Opens the faction GUI +- `/f home` -- Teleport to your faction's home base +- `/f c` -- Cycle chat mode between Normal, Faction, and Ally +- `/f map` -- View the territory map around you -> Once in, explore territory and start claiming! +>[!TIP] You can also type `/f help` in chat for a quick command reference anytime. diff --git a/src/main/resources/Server/Languages/en-US/help/welcome/quick_tips.md b/src/main/resources/Server/Languages/en-US/help/welcome/quick_tips.md index bc664023..dcd1df1a 100644 --- a/src/main/resources/Server/Languages/en-US/help/welcome/quick_tips.md +++ b/src/main/resources/Server/Languages/en-US/help/welcome/quick_tips.md @@ -3,16 +3,42 @@ id: welcome_tips --- # Quick Tips -## Claiming Land -`/f claim` -Protects the chunk you're standing in. +Handy advice organized by category to help you thrive. -## Faction Home -`/f home` -Teleports to your faction home. Set with /f sethome. +--- + +## Territory + +- Claim land around your base early with `/f claim` -- unclaimed builds have **no protection** +- Each claim costs **2.0 power** to maintain, so do not over-expand beyond what your members can support +- Use `/f map` to scout nearby claims and find safe spots to build +- Unclaim chunks you no longer need with `/f unclaim` to free up power + +## Combat + +- Dying costs **1.0 power** -- avoid unnecessary fights when your faction is near its claim limit +- You have **5 seconds of spawn protection** after respawning +- Combat tagging lasts **15 seconds** -- logging out while tagged costs extra power +- Friendly fire is **disabled** between faction members and allies by default + +>[!WARNING] Logging out while combat tagged causes additional power loss (1.0 per logout). Stay and fight or escape first. + +## Social + +- Use `/f c` to cycle through chat modes so faction talk stays private +- Invite trusted players with `/f invite ` -- invitations expire after **5 minutes** +- Form alliances with `/f ally ` for mutual protection and shared map visibility +- Check `/f relations` to see your full diplomatic status + +## Economy + +>[!TIP] If the server has economy enabled, your faction can accumulate a treasury. Members can deposit, but only Officers and Leaders can withdraw or transfer funds. + +- Deposit funds with the treasury GUI to strengthen your faction +- A wealthier faction can afford more claims and recover from setbacks faster -## Faction Chat -`/f c` -Cycles chat mode: Normal > Faction > Ally. +## General -> Dying costs power, weakening your territory hold! +- Type `/f` anytime to open your faction dashboard -- everything is accessible from there +- Promote active members to Officer so they can help claim and manage territory +- Keep your faction active -- power only regenerates while players are **online** diff --git a/src/main/resources/Server/Languages/en-US/help/welcome/what_are_factions.md b/src/main/resources/Server/Languages/en-US/help/welcome/what_are_factions.md index 17f7d901..f1641b50 100644 --- a/src/main/resources/Server/Languages/en-US/help/welcome/what_are_factions.md +++ b/src/main/resources/Server/Languages/en-US/help/welcome/what_are_factions.md @@ -3,12 +3,35 @@ id: welcome_what --- # What Are Factions? -Factions are player teams that claim territory, -build bases, and grow stronger together. +Factions are **player-run teams** that claim territory, build bases, and compete for dominance. When you join or create a faction, you gain access to protected land, a shared home, private chat, and diplomatic tools. -As a member you get protected land, a faction -home, private chat, and diplomatic relations. +>[!TIP] Factions is all about teamwork. The more active members you have, the stronger your faction becomes. -Strength is measured by power. Active members -generate power; dying costs it. If power drops -below your claim count, enemies can steal land. +--- + +## Core Mechanics + +| Mechanic | What It Does | +|----------|-------------| +| **Power** | Each player generates power over time (max 20). Your faction's total power determines how much land you can hold. | +| **Claims** | Claimed chunks are protected -- only members can build, break, or open containers inside them. Each claim costs 2.0 power to maintain. | +| **Relations** | Factions can form **alliances** for mutual protection or declare **enemies** to enable PvP and territorial aggression. | +| **Roles** | Three ranks -- Leader, Officer, Member -- each with different capabilities. | + +--- + +## How Strength Works + +Your faction's strength comes from its members. Every player starts with **10 power** and regenerates up to **20** while online. Dying costs power. If your total faction power drops below the cost of your claims, enemies can **overclaim** your territory. + +>[!WARNING] A single death costs 1.0 power. Multiple deaths in a short time can leave your faction vulnerable to overclaiming. + +--- + +## Diplomacy at a Glance + +- **Allies** -- Mutual agreements that prevent friendly fire and protect each other's territory +- **Enemies** -- One-way declarations that enable PvP in each other's land and allow overclaiming +- **Neutral** -- The default state between all factions with standard rules + +>[!INFO] You can manage all of this through the in-game GUI by typing `/f` or through chat commands. diff --git a/src/main/resources/Server/Languages/en-US/help/your_faction/creating.md b/src/main/resources/Server/Languages/en-US/help/your_faction/creating.md index d06b9f12..716341dc 100644 --- a/src/main/resources/Server/Languages/en-US/help/your_faction/creating.md +++ b/src/main/resources/Server/Languages/en-US/help/your_faction/creating.md @@ -4,10 +4,35 @@ commands: create --- # Creating a Faction -Starting a faction makes you the Leader with -full control over settings, members, and land. +Starting your own faction makes you the **Leader** with full control over settings, members, and territory. + +--- + +## How to Create `/f create ` -Creates a faction and opens your dashboard. -> Invite friends, claim land, and start building! +This creates your faction and immediately opens the **Faction Dashboard** where you can begin inviting members, claiming land, and configuring settings. + +## Name Rules + +| Rule | Requirement | +|------|------------| +| **Length** | Between **3** and **24** characters | +| **Characters** | Letters, numbers, and spaces only (alphanumeric) | +| **Uniqueness** | No two factions can share the same name | + +>[!WARNING] Choose your name carefully. Renaming later requires Leader permissions and may have a cooldown. + +--- + +## What Happens on Creation + +- You become the **Leader** (highest rank) +- Your faction starts with **0 claims** and your personal power (10 by default) +- The faction dashboard opens automatically +- You can immediately invite players, claim territory, and set a faction home + +>[!INFO] If the server has economy integration enabled, creating a faction may cost money. The creation cost is set by the server administrator. + +>[!TIP] After creating, your first priorities should be: invite friends with `/f invite `, find a base location, and claim it with `/f claim`. diff --git a/src/main/resources/Server/Languages/en-US/help/your_faction/joining.md b/src/main/resources/Server/Languages/en-US/help/your_faction/joining.md index 6f7282e5..5bd2f83e 100644 --- a/src/main/resources/Server/Languages/en-US/help/your_faction/joining.md +++ b/src/main/resources/Server/Languages/en-US/help/your_faction/joining.md @@ -4,14 +4,33 @@ commands: accept, join, request --- # Joining a Faction -Three ways to join an existing faction: +There are three ways to join an existing faction, depending on how the faction is configured. -## Browse Open Factions -Open /f and click Browse. Click Join on any open faction. +--- + +## Methods Compared + +| Method | How It Works | Requires | +|--------|-------------|----------| +| **Browse and Join** | Open `/f`, click *Browse*, and hit *Join* on an open faction | Faction must be set to **open** | +| **Accept Invite** | A faction Officer or Leader sends you an invite; accept it from the *Invites* tab in `/f` | An active invitation | +| **Request to Join** | Send a join request to a closed faction with `/f request ` | An Officer or Leader to approve | + +--- + +## Invite Details + +- Invitations are sent by Officers or Leaders using `/f invite ` +- Invitations expire after **5 minutes** -- accept promptly +- View your pending invites in the *Invites* tab of the faction menu (`/f`) +- Accept with the GUI or `/f accept ` + +## Join Requests + +- Use `/f request ` to request membership in a closed faction +- Requests expire after **24 hours** if not acted on +- Officers and Leaders can approve or deny requests from the faction dashboard -## Accept an Invitation -Check the Invites tab and click Accept. +>[!TIP] Not sure which faction to join? Use the Browse tab in `/f` to see faction descriptions, member counts, and whether they are open or invite-only. -## Request to Join -`/f request ` -Send a request to an invite-only faction. +>[!NOTE] Each faction can hold up to **50 members** by default. If a faction is full, you will need to wait for a spot to open up. diff --git a/src/main/resources/Server/Languages/en-US/help/your_faction/managing.md b/src/main/resources/Server/Languages/en-US/help/your_faction/managing.md index 53560468..3219cffb 100644 --- a/src/main/resources/Server/Languages/en-US/help/your_faction/managing.md +++ b/src/main/resources/Server/Languages/en-US/help/your_faction/managing.md @@ -4,19 +4,41 @@ commands: invite, kick, promote, demote, transfer --- # Managing Members -Officers and Leaders manage the roster: +Officers and Leaders share responsibility for managing the faction roster. Here are the key commands and who can use them. -`/f invite ` -Sends an invitation. (Officer+) +--- + +## Commands + +| Command | What It Does | Required Role | +|---------|-------------|---------------| +| `/f invite ` | Sends a join invitation (expires in 5 min) | Officer+ | +| `/f kick ` | Removes a member from the faction | Officer+ (see note) | +| `/f promote ` | Promotes a Member to Officer | Leader only | +| `/f demote ` | Demotes an Officer to Member | Leader only | +| `/f transfer ` | Transfers faction ownership | Leader only | + +>[!NOTE] Officers can only kick **Members**. To remove another Officer, the Leader must either demote them first or kick them directly. + +--- + +## Invitations + +- Invitations expire after **5 minutes** if not accepted +- The invited player sees it in their Invites tab when they open `/f` +- There is no limit to how many invitations you can send at once +- Your faction can hold up to **50 members** total -`/f kick ` -Removes a member. Officers kick Members; Leaders all. +## Promotions and Demotions -`/f promote ` -Promotes a Member to Officer. (Leader only) +- Only the **Leader** can promote or demote +- `/f promote ` raises a Member to Officer +- `/f demote ` lowers an Officer back to Member -`/f demote ` -Demotes an Officer to Member. (Leader only) +## Transferring Leadership + +>[!WARNING] Transferring leadership is **irreversible**. You will be demoted to Officer and the target player becomes the new Leader. Make sure you trust them completely. `/f transfer ` -> Transfers leadership. You become Officer. Cannot undo! + +The target must be a current member of your faction. diff --git a/src/main/resources/Server/Languages/en-US/help/your_faction/roles.md b/src/main/resources/Server/Languages/en-US/help/your_faction/roles.md index 0dcc2349..049076de 100644 --- a/src/main/resources/Server/Languages/en-US/help/your_faction/roles.md +++ b/src/main/resources/Server/Languages/en-US/help/your_faction/roles.md @@ -1,16 +1,44 @@ --- id: faction_roles --- -# Roles & Ranks +# Roles and Ranks -Three ranks with different capabilities: +Every faction has three roles in a strict hierarchy. Higher roles inherit all capabilities of the roles below them. -## Leader (1 per faction) -Full control: disband, transfer ownership, -promote/demote, plus all Officer permissions. +--- + +## Permission Breakdown + +| Action | Leader | Officer | Member | +|--------|--------|---------|--------| +| Build in territory | Y | Y | Y | +| Use faction home | Y | Y | Y | +| Faction and ally chat | Y | Y | Y | +| Invite players | Y | Y | N | +| Kick members | Y | Y (Members only) | N | +| Claim / unclaim land | Y | Y | N | +| Overclaim enemy territory | Y | Y | N | +| Set faction home | Y | Y | N | +| Delete faction home | Y | Y | N | +| Manage relations (ally/enemy) | Y | Y | N | +| View faction logs | Y | Y | N | +| Promote to Officer | Y | N | N | +| Demote from Officer | Y | N | N | +| Rename faction | Y | N | N | +| Set description / tag / color | Y | N | N | +| Open / close faction | Y | N | N | +| Access faction settings | Y | N | N | +| Transfer leadership | Y | N | N | +| Disband faction | Y | N | N | + +>[!NOTE] Officers can kick **Members** but cannot kick other Officers. Only the Leader can remove Officers. + +--- + +## Role Details -## Officer -Invite/kick, claim/unclaim, set home, relations. +- **Leader** -- One per faction. Has full control over all settings, members, and territory. Can transfer ownership to another member. +- **Officer** -- Trusted members who help manage the faction. Can invite, kick members, claim land, and handle diplomacy. +- **Member** -- The default role when joining. Can build in territory, use the faction home, and participate in faction chat. -## Member -Use faction home, chat, build in territory. +>[!TIP] Promote your most active and trusted members to Officer so they can help manage territory and recruit new players. From 82fe5f8d81fb565355211f8dabd6530254e7b1c5 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Tue, 10 Mar 2026 14:54:28 -0700 Subject: [PATCH 39/55] feat: rewrite player help categories 5-7 (en-US), add spawn protection/upkeep/permissions topics Rewrite combat, economy, and quick_ref help with enhanced formatting. Add 3 new topics: spawn_protection (combat mechanics), upkeep (territory maintenance costs), and permissions (key permission nodes reference). --- .../Languages/en-US/help/combat/death.md | 43 +++++- .../Languages/en-US/help/combat/protection.md | 30 +++- .../en-US/help/combat/spawn_protection.md | 30 ++++ .../Languages/en-US/help/combat/tagging.md | 29 +++- .../Languages/en-US/help/combat/zones.md | 28 +++- .../Languages/en-US/help/economy/commands.md | 30 ++-- .../Languages/en-US/help/economy/funds.md | 38 ++++- .../Languages/en-US/help/economy/treasury.md | 25 +++- .../Languages/en-US/help/economy/upkeep.md | 42 ++++++ .../en-US/help/quick_ref/all_commands.md | 130 ++++++++++-------- .../en-US/help/quick_ref/permissions.md | 70 ++++++++++ 11 files changed, 396 insertions(+), 99 deletions(-) create mode 100644 src/main/resources/Server/Languages/en-US/help/combat/spawn_protection.md create mode 100644 src/main/resources/Server/Languages/en-US/help/economy/upkeep.md create mode 100644 src/main/resources/Server/Languages/en-US/help/quick_ref/permissions.md diff --git a/src/main/resources/Server/Languages/en-US/help/combat/death.md b/src/main/resources/Server/Languages/en-US/help/combat/death.md index a123776f..306b8dda 100644 --- a/src/main/resources/Server/Languages/en-US/help/combat/death.md +++ b/src/main/resources/Server/Languages/en-US/help/combat/death.md @@ -2,14 +2,43 @@ id: combat_death commands: home, sethome, stuck --- -# Death & Recovery +# Death and Recovery -Death has real consequences: +Death carries real consequences in factions. Every +death costs you personal power, weakening your +faction's ability to hold territory. -You lose personal power, lowering faction total. -If claims exceed power, enemies can overclaim. +## Power Loss -Power regenerates while online. Multiple deaths -can leave your faction dangerously vulnerable. +Each death costs **-1.0 power** from your personal +total. This lowers the faction's combined power. -> Pick your battles carefully! +| Event | Power Change | +|-------|-------------| +| Death (any cause) | -1.0 | +| Online regen | +0.1 per minute | +| Combat logout | -1.0 (killed) | + +## Example Scenarios + +*5 members at 10.0 power each = 50 total, 20 claims.* +*One member dies twice: 8.0 power, faction total 48.* +*Three members die once each: total drops to 47.* + +>[!WARNING] If your faction power drops below your claim count, enemies can overclaim your territory. + +## Recovery + +Power regenerates at 0.1 per minute while online. +Recovering 1.0 lost power takes about 10 minutes. +Multiple deaths stack, so avoid repeated fights. + +--- + +## All Death Types + +Power loss applies to all deaths: PvP, mob kills, +fall damage, drowning, and any other cause. +There is no safe way to die. + +>[!TIP] Set a faction home with /f sethome so members can regroup quickly after dying. diff --git a/src/main/resources/Server/Languages/en-US/help/combat/protection.md b/src/main/resources/Server/Languages/en-US/help/combat/protection.md index 5f5ce945..b80ed995 100644 --- a/src/main/resources/Server/Languages/en-US/help/combat/protection.md +++ b/src/main/resources/Server/Languages/en-US/help/combat/protection.md @@ -3,15 +3,35 @@ id: combat_protection --- # Territory Protection -Claimed territory has several protections: +Claimed territory provides several layers of defense +for your faction's builds and resources. ## Block Protection -Only members can place or break blocks. + +Only faction members can place or break blocks in +your territory. Enemies and neutrals are blocked +from modifying anything. ## Container Protection -Chests, barrels, etc. are secured to members. + +Chests, barrels, and other containers are secured. +Only your faction members can open or interact with +storage in claimed chunks. ## Entry Alerts -You're notified when non-members enter claims. -> Territory protects blocks, not players! +When a non-member enters your claimed territory, +online faction members receive a notification with +the intruder's name and location. + +--- + +## Ally Access + +Allies cannot build or break blocks in your territory +by default. Ally damage is also disabled, so allied +players cannot harm each other. + +>[!INFO] Territory protects blocks, not players. PvP in your own territory depends on the attacker's relation to your faction. + +>[!TIP] Keep your claims connected and avoid isolated chunks that are harder to defend. diff --git a/src/main/resources/Server/Languages/en-US/help/combat/spawn_protection.md b/src/main/resources/Server/Languages/en-US/help/combat/spawn_protection.md new file mode 100644 index 00000000..0281243a --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/combat/spawn_protection.md @@ -0,0 +1,30 @@ +--- +id: combat_spawn_protection +--- +# Spawn Protection + +After respawning from death, you receive temporary +protection to prevent spawn camping. + +## How It Works + +- Protection lasts **5 seconds** after respawn +- You cannot take damage during this period +- A visual indicator shows your protected status + +## Protection Breaks + +Spawn protection ends early if you: + +- **Attack** another player or entity +- **Move** from your spawn position + +This prevents abuse. You cannot attack others while +invulnerable. Once you take any action, protection +drops and normal combat rules apply. + +--- + +>[!NOTE] Spawn protection duration and break conditions are configurable by the server. Your server may use different settings. + +>[!TIP] Use your protection time to assess the situation before moving. diff --git a/src/main/resources/Server/Languages/en-US/help/combat/tagging.md b/src/main/resources/Server/Languages/en-US/help/combat/tagging.md index 664c6b72..a886430d 100644 --- a/src/main/resources/Server/Languages/en-US/help/combat/tagging.md +++ b/src/main/resources/Server/Languages/en-US/help/combat/tagging.md @@ -3,10 +3,29 @@ id: combat_tagging --- # Combat Tagging -Attacking or being attacked combat tags you. -A timer shows the remaining tag duration. +When you attack or are attacked by another player, +you become **combat tagged** for 15 seconds. -While tagged: no /f home, /f stuck, or teleports. -The tag resets with each new combat action. +## While Tagged -> Logging out while tagged is risky. Stay and fight! +- No `/f home` or `/f stuck` teleports +- No server teleport commands +- Tag resets with each new combat action +- A timer displays your remaining tag duration + +--- + +## Logout Penalty + +>[!WARNING] Logging out while combat tagged kills your character and you lose 1.0 power. + +Your items drop where you disconnected and enemies +can loot them. Always wait for the tag to expire. + +## How the Timer Works + +The combat tag timer appears on screen when you +enter combat. Every new hit resets it to 15 seconds. +Once it reaches zero, all restrictions are lifted. + +>[!TIP] Disengage and wait out the timer if you need to teleport. diff --git a/src/main/resources/Server/Languages/en-US/help/combat/zones.md b/src/main/resources/Server/Languages/en-US/help/combat/zones.md index f11cb46b..33dab4b9 100644 --- a/src/main/resources/Server/Languages/en-US/help/combat/zones.md +++ b/src/main/resources/Server/Languages/en-US/help/combat/zones.md @@ -3,12 +3,32 @@ id: combat_zones --- # Special Zones -Admins can create zones with special rules: +Admins can designate areas with special rules that +override normal faction territory protection. ## SafeZone -No PvP, no block breaking. For spawn/trading. + +No PvP damage, no block breaking by non-admins. +Ideal for spawn areas, trading hubs, and event +staging areas. Players cannot be harmed here. ## WarZone -PvP always enabled, no protection. Battle areas. -> Zone rules always override faction territory. +PvP is always enabled. No block protection applies. +Open battle areas where anything goes. You receive +no territory protection benefits in a WarZone. + +--- + +## Zone Comparison + +| Feature | SafeZone | WarZone | Faction Land | +|---------|----------|---------|--------------| +| PvP | Disabled | Always On | Relation-based | +| Block Break | Disabled | Allowed | Members Only | +| Containers | Protected | Open | Members Only | +| Best For | Spawn/Trade | Arenas | Bases | + +>[!NOTE] Zone rules always override faction territory rules. A claimed chunk inside a WarZone follows WarZone rules. + +>[!TIP] Check your territory map with /f map to see zone boundaries. diff --git a/src/main/resources/Server/Languages/en-US/help/economy/commands.md b/src/main/resources/Server/Languages/en-US/help/economy/commands.md index 3720eaff..8a8f8b34 100644 --- a/src/main/resources/Server/Languages/en-US/help/economy/commands.md +++ b/src/main/resources/Server/Languages/en-US/help/economy/commands.md @@ -3,19 +3,27 @@ id: economy_commands --- # Economy Commands -Quick reference for economy commands: +Quick reference for all faction economy commands. -`/f balance` -View treasury balance. +| Command | Description | Role | +|---------|-------------|------| +| /f balance | View treasury balance | Any | +| /f deposit (amount) | Deposit into treasury | Any | +| /f withdraw (amount) | Withdraw from treasury | Officer+ | +| /f money transfer (faction) (amount) | Transfer to another faction | Officer+ | +| /f money log [page] | View transaction history | Officer+ | -`/f deposit ` -Deposit funds. +--- + +## Command Aliases + +- `/f balance` can also be used as `/f bal` +- `/f deposit` and `/f withdraw` accept decimal amounts -`/f withdraw ` -Withdraw funds. (Officer+) +## Permissions -`/f money transfer ` -Transfer to another faction. +All economy commands require `hyperfactions.economy.*` +permission nodes. Withdraw and transfer are further +restricted by faction role (Officer or higher). -`/f money log [page]` -View transaction history. +>[!TIP] Use /f money log to review recent deposits, withdrawals, and transfers with timestamps. diff --git a/src/main/resources/Server/Languages/en-US/help/economy/funds.md b/src/main/resources/Server/Languages/en-US/help/economy/funds.md index 3b7a6da6..99e99bec 100644 --- a/src/main/resources/Server/Languages/en-US/help/economy/funds.md +++ b/src/main/resources/Server/Languages/en-US/help/economy/funds.md @@ -4,15 +4,43 @@ commands: deposit, withdraw --- # Managing Funds -Members deposit; Officers can withdraw/transfer. +Faction members work together to keep the treasury +funded through deposits, withdrawals, and transfers. + +## Depositing + +Any member can deposit personal funds into the +faction treasury. `/f deposit ` -Deposit from your balance into the treasury. +Deposit from your personal balance into the treasury. + +## Withdrawing + +Officers and the Leader can withdraw funds back to +their personal balance. `/f withdraw ` -Withdraw from treasury. (Officer+) +Withdraw from the treasury to your balance. (Officer+) + +## Transferring + +Officers can transfer funds directly between faction +treasuries for trade deals or diplomacy. `/f money transfer ` -Transfer funds to another faction's treasury. +Send funds to another faction's treasury. (Officer+) + +--- + +## Fees + +| Transaction | Fee | +|------------|-----| +| Deposit | 0% | +| Withdraw | 0% | +| Transfer | 0% | + +>[!INFO] Fee rates are configurable by the server and may differ from defaults shown above. -> All transactions are logged for review. +>[!TIP] All transactions are logged. Use /f money log to review recent activity. diff --git a/src/main/resources/Server/Languages/en-US/help/economy/treasury.md b/src/main/resources/Server/Languages/en-US/help/economy/treasury.md index 6a148e82..a451af2e 100644 --- a/src/main/resources/Server/Languages/en-US/help/economy/treasury.md +++ b/src/main/resources/Server/Languages/en-US/help/economy/treasury.md @@ -4,10 +4,27 @@ commands: balance --- # Faction Treasury -Every faction has a shared treasury. Managed -by Officers and the Leader. +Every faction has a shared treasury that serves as +the faction's bank. Funds are used for upkeep costs, +territory maintenance, and faction operations. + +## Starting Balance + +New factions start with **0** in their treasury. +Members must deposit funds to build up reserves. + +## Who Can Manage + +- **Any member** can deposit funds +- **Officers and Leader** can withdraw and transfer +- **Leader** has full treasury control + +--- `/f balance` -Check your faction's treasury balance. (Alias: bal) +Check your faction's current treasury balance. +Also available as `/f bal`. + +>[!TIP] Contribute regularly to keep your faction funded. Territory upkeep costs can drain an empty treasury quickly. -> Contribute regularly to keep your faction funded! +>[!INFO] All treasury transactions are logged and can be reviewed by officers. diff --git a/src/main/resources/Server/Languages/en-US/help/economy/upkeep.md b/src/main/resources/Server/Languages/en-US/help/economy/upkeep.md new file mode 100644 index 00000000..38eca444 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/economy/upkeep.md @@ -0,0 +1,42 @@ +--- +id: economy_upkeep +--- +# Territory Upkeep + +Factions must pay ongoing upkeep to maintain their +claimed territory. This prevents land hoarding and +keeps the map dynamic. + +## Upkeep Costs + +| Setting | Default | +|---------|---------| +| Cost per chunk | 2.0 per cycle | +| Payment interval | Every 24 hours | +| Free chunks | 3 (no cost) | +| Scaling mode | Flat rate | + +Your first **3 chunks are free**. Beyond that, each +additional claimed chunk costs 2.0 per payment cycle. + +## Auto-Pay + +Auto-pay is **enabled by default**. The system +automatically deducts upkeep from your treasury at +each interval. No manual action needed. + +--- + +## Grace Period + +If your treasury cannot cover upkeep, a **48-hour +grace period** begins. A warning is sent 6 hours +before claims start being lost. + +>[!WARNING] If upkeep remains unpaid after the grace period, your faction loses 1 claim per cycle until costs are covered or all extra claims are gone. + +## Example + +*A faction with 8 claims pays for 5 chunks (8 minus 3 free). At 2.0 per chunk, that is 10.0 per cycle.* + +>[!TIP] Keep your treasury funded above your upkeep cost. Use /f balance to check your reserves. diff --git a/src/main/resources/Server/Languages/en-US/help/quick_ref/all_commands.md b/src/main/resources/Server/Languages/en-US/help/quick_ref/all_commands.md index 0097e8b8..0540d550 100644 --- a/src/main/resources/Server/Languages/en-US/help/quick_ref/all_commands.md +++ b/src/main/resources/Server/Languages/en-US/help/quick_ref/all_commands.md @@ -4,77 +4,91 @@ id: quickref_commands # All Commands ## Core -`/f — Open faction menu (alias: gui, menu)` -`/f help — Open this help center` -`/f create — Create a faction` -`/f disband — Delete your faction (Leader)` -`/f leave — Leave your faction` + +| Command | Description | Role | +|---------|-------------|------| +| /f | Open faction menu | Any | +| /f help | Open help center | Any | +| /f create (name) | Create a faction | Any | +| /f disband | Delete your faction | Leader | +| /f leave | Leave your faction | Any | ## Membership -`/f invite — Invite player (Officer+)` -`/f accept [faction] — Accept invite (alias: join)` -`/f request — Request to join` -`/f kick — Remove member (Officer+)` -`/f promote — Promote to Officer (Leader)` -`/f demote — Demote to Member (Leader)` -`/f transfer — Transfer leadership` + +| Command | Description | Role | +|---------|-------------|------| +| /f invite (player) | Invite a player | Officer+ | +| /f accept [faction] | Accept an invite | Any | +| /f request (faction) | Request to join | Any | +| /f kick (player) | Remove a member | Officer+ | +| /f promote (player) | Promote to Officer | Leader | +| /f demote (player) | Demote to Member | Leader | +| /f transfer (player) | Transfer leadership | Leader | ## Territory -`/f claim — Claim current chunk (Officer+)` -`/f unclaim — Release current chunk (Officer+)` -`/f overclaim — Take weakened faction's chunk` -`/f map — Open territory map` + +| Command | Description | Role | +|---------|-------------|------| +| /f claim | Claim current chunk | Officer+ | +| /f unclaim | Release current chunk | Officer+ | +| /f overclaim | Take weakened chunk | Officer+ | +| /f map | Open territory map | Any | ## Teleport -`/f home — Teleport to faction home` -`/f sethome — Set faction home (Officer+)` -`/f delhome — Delete faction home (Officer+)` -`/f stuck — Escape enemy territory` + +| Command | Description | Role | +|---------|-------------|------| +| /f home | Teleport to faction home | Any | +| /f sethome | Set faction home | Officer+ | +| /f delhome | Delete faction home | Officer+ | +| /f stuck | Escape enemy territory | Any | ## Information -`/f info [faction] — View faction details` -`/f list — Browse all factions` -`/f members — View roster` -`/f who [player] — View player info` -`/f power [player] — Check power levels` -`/f invites — Manage invites/requests` -`/f relations — View diplomatic relations` + +| Command | Description | Role | +|---------|-------------|------| +| /f info [faction] | View faction details | Any | +| /f list | Browse all factions | Any | +| /f members | View roster | Any | +| /f who [player] | View player info | Any | +| /f power [player] | Check power levels | Any | +| /f invites | Manage invites/requests | Any | +| /f relations | View diplomatic relations | Any | ## Diplomacy -`/f ally — Request alliance (Officer+)` -`/f enemy — Declare enemy (Officer+)` -`/f neutral — Reset to neutral` + +| Command | Description | Role | +|---------|-------------|------| +| /f ally (faction) | Request alliance | Officer+ | +| /f enemy (faction) | Declare enemy | Officer+ | +| /f neutral (faction) | Reset to neutral | Officer+ | ## Settings -`/f settings — Open settings GUI (Officer+)` -`/f rename — Rename faction (Leader)` -`/f desc [text] — Set description (Officer+)` -`/f color — Set faction color (Officer+)` -`/f open — Allow anyone to join (Leader)` -`/f close — Require invitation (Leader)` + +| Command | Description | Role | +|---------|-------------|------| +| /f settings | Open settings GUI | Officer+ | +| /f rename (name) | Rename faction | Leader | +| /f desc [text] | Set description | Officer+ | +| /f color (code) | Set faction color | Officer+ | +| /f open | Allow anyone to join | Leader | +| /f close | Require invitation | Leader | ## Economy -`/f balance — View treasury` -`/f deposit — Deposit funds` -`/f withdraw — Withdraw (Officer+)` -`/f money transfer — Transfer` -`/f money log [page] — Transaction history` + +| Command | Description | Role | +|---------|-------------|------| +| /f balance | View treasury | Any | +| /f deposit (amount) | Deposit funds | Any | +| /f withdraw (amount) | Withdraw funds | Officer+ | +| /f money transfer (faction) (amt) | Transfer funds | Officer+ | +| /f money log [page] | Transaction history | Officer+ | ## Chat -`/f c — Cycle: Normal > Faction > Ally` -`/f c f — Set faction chat` -`/f c a — Set ally chat` -`/f c off — Set public chat` - -## Admin (requires hyperfactions.admin) -`/f admin — Open admin dashboard` -`/f admin reload — Reload configuration` -`/f admin sync — Sync faction data` -`/f admin factions — Faction management` -`/f admin config — Configuration editor` -`/f admin zones — Zone management` -`/f admin backup create — Create backup` -`/f admin backup restore — Restore backup` -`/f admin safezone — Create SafeZone` -`/f admin warzone — Create WarZone` -`/f admin debug toggle — Debug logging` + +| Command | Description | Role | +|---------|-------------|------| +| /f c | Cycle chat mode | Any | +| /f c f | Set faction chat | Any | +| /f c a | Set ally chat | Any | +| /f c off | Set public chat | Any | diff --git a/src/main/resources/Server/Languages/en-US/help/quick_ref/permissions.md b/src/main/resources/Server/Languages/en-US/help/quick_ref/permissions.md new file mode 100644 index 00000000..16df0ec0 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/quick_ref/permissions.md @@ -0,0 +1,70 @@ +--- +id: quickref_permissions +--- +# Permissions + +Key permission nodes for HyperFactions. All nodes +fall under the **hyperfactions** root namespace. + +## Core Permissions + +| Permission | Description | +|-----------|-------------| +| hyperfactions.use | Access to basic faction commands | +| hyperfactions.faction.create | Create a new faction | +| hyperfactions.faction.disband | Disband your faction | + +## Membership + +| Permission | Description | +|-----------|-------------| +| hyperfactions.member.invite | Invite players | +| hyperfactions.member.kick | Kick members | +| hyperfactions.member.promote | Promote members | + +## Territory + +| Permission | Description | +|-----------|-------------| +| hyperfactions.territory.claim | Claim chunks | +| hyperfactions.territory.unclaim | Release chunks | +| hyperfactions.territory.overclaim | Overclaim weakened land | + +## Teleport + +| Permission | Description | +|-----------|-------------| +| hyperfactions.teleport.home | Use faction home | +| hyperfactions.teleport.sethome | Set faction home | +| hyperfactions.teleport.stuck | Use stuck teleport | + +## Diplomacy and Chat + +| Permission | Description | +|-----------|-------------| +| hyperfactions.relation.ally | Manage alliances | +| hyperfactions.relation.enemy | Declare enemies | +| hyperfactions.chat.faction | Use faction chat | +| hyperfactions.chat.ally | Use ally chat | + +## Information and Economy + +| Permission | Description | +|-----------|-------------| +| hyperfactions.info.show | View faction info | +| hyperfactions.info.list | Browse factions | +| hyperfactions.economy.deposit | Deposit to treasury | +| hyperfactions.economy.withdraw | Withdraw from treasury | + +## Bypass Permissions + +| Permission | Description | +|-----------|-------------| +| hyperfactions.bypass.* | Bypass all restrictions | +| hyperfactions.bypass.combat | Bypass combat tag | +| hyperfactions.bypass.power | Bypass power limits | +| hyperfactions.bypass.territory | Bypass land protection | + +>[!INFO] Server admins can grant hyperfactions.* to give access to all permissions at once. + +>[!NOTE] Some permissions are restricted by faction role regardless of permission nodes. For example, only Officers can claim even with the permission. From 112120f78b0b7963947ed278492f5843897c2ee4 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Tue, 10 Mar 2026 14:54:41 -0700 Subject: [PATCH 40/55] =?UTF-8?q?feat:=20add=20comprehensive=20admin=20hel?= =?UTF-8?q?p=20content=20(en-US)=20=E2=80=94=2018=20topics=20across=208=20?= =?UTF-8?q?categories?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Complete admin help documentation covering overview, faction management, zones, power manipulation, economy, configuration, maintenance (backups, updates, imports), and admin command reference. All values sourced from actual config defaults and handler implementations. --- .../help/admin/admin_config/configuration.md | 42 ++++++++++++ .../help/admin/admin_config/world_settings.md | 47 +++++++++++++ .../admin_economy/treasury_management.md | 40 +++++++++++ .../admin/admin_economy/upkeep_management.md | 46 +++++++++++++ .../help/admin/admin_factions/disbanding.md | 39 +++++++++++ .../admin/admin_factions/managing_factions.md | 41 ++++++++++++ .../help/admin/admin_maintenance/backups.md | 49 ++++++++++++++ .../help/admin/admin_maintenance/imports.md | 49 ++++++++++++++ .../help/admin/admin_maintenance/updates.md | 48 ++++++++++++++ .../admin/admin_overview/getting_started.md | 43 ++++++++++++ .../help/admin/admin_overview/permissions.md | 41 ++++++++++++ .../help/admin/admin_power/power_commands.md | 41 ++++++++++++ .../help/admin/admin_power/power_overrides.md | 58 ++++++++++++++++ .../admin/admin_reference/all_commands.md | 66 +++++++++++++++++++ .../admin/admin_reference/integrations.md | 46 +++++++++++++ .../help/admin/admin_zones/zone_basics.md | 46 +++++++++++++ .../help/admin/admin_zones/zone_commands.md | 44 +++++++++++++ .../help/admin/admin_zones/zone_flags.md | 44 +++++++++++++ 18 files changed, 830 insertions(+) create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_config/configuration.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_config/world_settings.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_economy/treasury_management.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_economy/upkeep_management.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_factions/disbanding.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_factions/managing_factions.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/backups.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/imports.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/updates.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_overview/getting_started.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_overview/permissions.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_commands.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_overrides.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_reference/all_commands.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_reference/integrations.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_basics.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_commands.md create mode 100644 src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_flags.md diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_config/configuration.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_config/configuration.md new file mode 100644 index 00000000..c2351704 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_config/configuration.md @@ -0,0 +1,42 @@ +--- +id: admin_configuration +--- +# Configuration System + +HyperFactions uses a modular JSON config system with +11 configuration files. + +## Admin Config Commands + +| Command | Description | +|---------|-------------| +| `/f admin config` | Open the visual config editor GUI | +| `/f admin reload` | Reload all config files from disk | +| `/f admin sync` | Synchronize faction data to storage | + +## Configuration Files + +| File | Contents | +|------|----------| +| `factions.json` | Roles, power, claims, combat, relations | +| `server.json` | Teleport, auto-save, messages, GUI, permissions | +| `economy.json` | Treasury, upkeep, transaction settings | +| `backup.json` | Backup rotation and retention settings | +| `chat.json` | Faction and ally chat formatting | +| `debug.json` | Debug logging categories | +| `faction-permissions.json` | Per-role permission defaults | +| `announcements.json` | Event broadcast and territory notifications | +| `gravestones.json` | Gravestone integration settings | +| `worldmap.json` | World map refresh modes | +| `worlds.json` | Per-world behavior overrides | + +>[!TIP] The config GUI provides a visual editor with descriptions for every setting. Changes are saved immediately but some require `/f admin reload` to take full effect. + +## Config Location + +All files are stored in: +`mods/com.hyperfactions_HyperFactions/config/` + +>[!WARNING] Manual JSON edits require `/f admin reload` to apply. Invalid JSON will cause the file to be skipped with a warning in the server log. + +>[!NOTE] Config version is tracked in `server.json`. The plugin auto-migrates older configs on startup. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_config/world_settings.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_config/world_settings.md new file mode 100644 index 00000000..2d63b0fb --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_config/world_settings.md @@ -0,0 +1,47 @@ +--- +id: admin_world_settings +--- +# Per-World Settings + +HyperFactions supports per-world configuration for +claiming, PvP, and protection behavior. + +## World Commands + +| Command | Description | +|---------|-------------| +| `/f admin world list` | List all world overrides | +| `/f admin world info ` | Show settings for a world | +| `/f admin world set ` | Set a setting | +| `/f admin world reset ` | Reset world to defaults | + +## Available Settings + +| Setting | Type | Description | +|---------|------|-------------| +| claiming_enabled | boolean | Allow faction claims in this world | +| pvp_enabled | boolean | Allow PvP combat in this world | +| power_loss | boolean | Apply power loss on death | +| build_protection | boolean | Enforce claim build protection | +| explosion_protection | boolean | Protect claims from explosions | + +## World Whitelist / Blacklist + +Control which worlds allow faction features through +the `worlds.json` config file: + +- **Whitelist mode**: Only listed worlds allow claiming +- **Blacklist mode**: All worlds allow claiming except listed + +>[!INFO] World settings are stored in `worlds.json` and override the global defaults from `factions.json`. + +## Examples + +- `/f admin world set survival claiming_enabled true` +- `/f admin world set creative claiming_enabled false` +- `/f admin world set pvp_arena pvp_enabled true` +- `/f admin world reset lobby` -- restore all defaults + +>[!TIP] Disable claiming in creative or lobby worlds to keep the faction system focused on survival gameplay. + +>[!NOTE] Per-world settings take priority over global config but are overridden by zone flags within that world. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/treasury_management.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/treasury_management.md new file mode 100644 index 00000000..dcd28b60 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/treasury_management.md @@ -0,0 +1,40 @@ +--- +id: admin_treasury_management +--- +# Treasury Management + +Admin commands for managing faction treasuries. +Requires `hyperfactions.admin.economy` permission. + +## Treasury Commands + +| Command | Description | +|---------|-------------| +| `/f admin economy balance ` | View faction treasury balance | +| `/f admin economy set ` | Set exact balance | +| `/f admin economy add ` | Add funds to treasury | +| `/f admin economy take ` | Remove funds from treasury | +| `/f admin economy reset ` | Reset treasury to zero | + +## Examples + +- `/f admin economy balance Vikings` -- check balance +- `/f admin economy set Vikings 5000` -- set to 5000 +- `/f admin economy add Vikings 1000` -- deposit 1000 +- `/f admin economy take Vikings 500` -- withdraw 500 +- `/f admin economy reset Vikings` -- zero out balance + +>[!TIP] Use `/f admin info ` to see the full economy overview including transaction history alongside the treasury balance. + +## Use Cases + +| Scenario | Command | +|----------|---------| +| Event prize distribution | `economy add ` | +| Penalty for rule violation | `economy take ` | +| Economy reset after wipe | `economy reset ` | +| Compensation for bugs | `economy add ` | + +>[!WARNING] Treasury changes are logged in the faction's transaction history. Admin modifications are recorded with the admin's name for accountability. + +>[!NOTE] All economy admin commands work even when the economy module is disabled in config. The data is stored regardless of module status. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/upkeep_management.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/upkeep_management.md new file mode 100644 index 00000000..9aa2a80e --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/upkeep_management.md @@ -0,0 +1,46 @@ +--- +id: admin_upkeep_management +--- +# Upkeep Management + +Faction upkeep charges factions periodically based on +their territory and member count. + +## Admin Controls + +Upkeep settings are managed through the economy config +file or the admin config GUI. + +`/f admin config` +Open the config editor and navigate to economy +settings to adjust upkeep values. + +## Default Upkeep Settings + +| Setting | Default | Description | +|---------|---------|-------------| +| Upkeep enabled | false | Master toggle for the system | +| Upkeep interval | 24h | How often upkeep is charged | +| Per-claim cost | 5.0 | Cost per claimed chunk per cycle | +| Per-member cost | 0.0 | Cost per member per cycle | +| Grace period | 72h | New factions are exempt | +| Disband on bankrupt | false | Auto-disband if cannot pay | + +## Monitoring Upkeep + +Use `/f admin info ` to see: +- Current treasury balance +- Estimated upkeep cost per cycle +- Time until next upkeep charge +- Whether the faction can afford upkeep + +>[!TIP] Review economy statistics across all factions from the admin dashboard to identify factions at risk of bankruptcy before upkeep triggers. + +>[!INFO] Upkeep configuration is stored in `economy.json`. Changes made via the config GUI take effect after reload with `/f admin reload`. + +## Upkeep Formula + +**Total upkeep** = (claimed chunks x per-claim cost) + +(member count x per-member cost) + +>[!WARNING] Enabling upkeep on a server with existing factions may cause unexpected bankruptcies. Consider setting a grace period or announcing the change in advance. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/disbanding.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/disbanding.md new file mode 100644 index 00000000..3392afc8 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/disbanding.md @@ -0,0 +1,39 @@ +--- +id: admin_disbanding +--- +# Force Disbanding + +Admins can forcefully disband any faction, regardless +of the leader's wishes. + +## Command + +`/f admin disband ` +Force-disband the named faction. A confirmation +prompt will appear before the action is executed. + +**Permission**: `hyperfactions.admin.disband` + +>[!WARNING] Disbanding a faction is **irreversible**. All claims are released, all members are removed, and the faction ceases to exist. Create a backup first. + +## Consequences + +When a faction is disbanded: + +| Effect | Description | +|--------|-------------| +| **Claims** | All territory is released immediately | +| **Members** | All players are removed from the roster | +| **Relations** | All alliances and enemies are cleared | +| **Treasury** | Handled per economy config settings | +| **Home** | Faction home is deleted | +| **Chat** | Faction chat history is removed | + +## Best Practices + +1. Always run `/f admin backup create` before disbanding +2. Notify faction members when possible +3. Document the reason for server records +4. Check `/f admin info ` to review before acting + +>[!TIP] If the issue is with a specific member, consider using `/f admin modify` to transfer leadership rather than disbanding the entire faction. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/managing_factions.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/managing_factions.md new file mode 100644 index 00000000..ed8fe072 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/managing_factions.md @@ -0,0 +1,41 @@ +--- +id: admin_managing_factions +--- +# Managing Factions + +Admins can inspect and modify any faction on the +server through the dashboard or commands. + +## Browsing Factions + +`/f admin factions` +Opens the admin faction browser. View all factions +with member counts, power levels, and territory. + +`/f admin info ` +Opens the admin info panel for a specific faction +with full details and management options. + +## Modifying Faction Settings + +With `hyperfactions.admin.modify` permission, you can: + +- **Rename** a faction to resolve conflicts +- **Set color** to fix display issues +- **Toggle open/close** to override join policy +- **Edit description** for moderation purposes + +>[!TIP] Use `/f admin who ` to look up which faction a specific player belongs to and view their details. + +## Viewing Members and Relations + +The admin info panel shows: + +| Section | Details | +|---------|---------| +| **Members** | Full roster with roles and last seen | +| **Relations** | All ally, enemy, and neutral standings | +| **Territory** | Claimed chunks and power balance | +| **Economy** | Treasury balance and transaction log | + +>[!NOTE] Admin inspection commands do not notify the faction being viewed. Only modifications trigger alerts. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/backups.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/backups.md new file mode 100644 index 00000000..5ba2fe64 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/backups.md @@ -0,0 +1,49 @@ +--- +id: admin_backups +--- +# Backup System + +HyperFactions includes automatic and manual backups +with GFS (Grandfather-Father-Son) rotation. + +## Backup Commands + +| Command | Description | +|---------|-------------| +| `/f admin backup create` | Create a manual backup now | +| `/f admin backup list` | List all available backups | +| `/f admin backup restore ` | Restore from a backup | +| `/f admin backup delete ` | Delete a specific backup | + +**Permission**: `hyperfactions.admin.backup` + +## GFS Rotation Defaults + +| Type | Retention | Description | +|------|-----------|-------------| +| Hourly | 24 | Last 24 hourly snapshots | +| Daily | 7 | Last 7 daily snapshots | +| Weekly | 4 | Last 4 weekly snapshots | +| Manual | 10 | Manually created backups | +| Shutdown | 5 | Created on server stop | + +>[!INFO] Shutdown backups are enabled by default (`onShutdown=true`). They capture the latest state before the server stops. + +## Backup Contents + +Each backup ZIP archive contains: +- All faction data files +- Player power data +- Zone definitions +- Chat history and economy data +- Invite and join request data +- Configuration files + +>[!WARNING] **Restoring a backup is destructive.** It replaces all current data with the backup's contents. Any changes made after the backup was created will be lost. Always create a fresh backup before restoring. + +## Best Practices + +1. Create a manual backup before major admin actions +2. Review backup retention in `backup.json` +3. Test restore on a staging server first +4. Keep shutdown backups enabled for crash recovery diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/imports.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/imports.md new file mode 100644 index 00000000..7fd86390 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/imports.md @@ -0,0 +1,49 @@ +--- +id: admin_imports +--- +# Data Import + +Import faction data from other plugins to migrate +your server to HyperFactions. + +## Import Command + +`/f admin import [path] [flags]` + +**Permission**: `hyperfactions.admin.use` + +## Supported Sources + +| Source | Description | +|--------|-------------| +| `elbaphfactions` | Import from ElbaphFactions data | +| `hyfactions` | Import from HyFactions v1 data | + +## Import Flags + +| Flag | Description | +|------|-------------| +| `--dry-run` | Validate data without importing anything | +| `--overwrite` | Overwrite existing factions with same name | +| `--no-zones` | Skip zone data during import | +| `--no-power` | Skip power data during import | + +>[!TIP] Always run with `--dry-run` first to preview what will be imported and catch any data issues before committing changes. + +## Import Process + +1. A pre-import backup is created automatically +2. Player name mappings are loaded +3. Factions, claims, and zones are converted +4. Data is validated and saved + +## Examples + +- `/f admin import elbaphfactions --dry-run` +- `/f admin import elbaphfactions --overwrite` +- `/f admin import hyfactions --no-zones --no-power` +- `/f admin import elbaphfactions /custom/path` + +>[!WARNING] Using `--overwrite` will **replace** any existing faction that shares a name with an imported faction. Member data and claims will be overwritten. Run with `--dry-run` first to identify conflicts. + +>[!NOTE] Some source-specific data (e.g., worker plots, farm plots) has no equivalent in HyperFactions and will be logged as warnings during import. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/updates.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/updates.md new file mode 100644 index 00000000..84ddcff1 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/updates.md @@ -0,0 +1,48 @@ +--- +id: admin_updates +--- +# Update Checking + +HyperFactions can check for new versions and manage +the HyperProtect-Mixin dependency. + +## Update Commands + +| Command | Description | +|---------|-------------| +| `/f admin update` | Check for HyperFactions updates | +| `/f admin update mixin` | Check/download HyperProtect-Mixin | +| `/f admin update toggle-mixin-download` | Toggle auto-download | +| `/f admin version` | Show current version and build info | + +## Release Channels + +| Channel | Description | +|---------|-------------| +| **Stable** | Recommended for production servers | +| **Pre-release** | Early access to upcoming features | + +>[!INFO] The update checker only notifies about new versions. It does **not** automatically install updates to HyperFactions itself. + +## HyperProtect-Mixin + +HyperProtect-Mixin is the recommended protection +mixin that enables advanced zone flags (explosions, +fire spread, keep inventory, etc.). + +- `/f admin update mixin` checks for the latest version + and downloads it if a newer version is available +- Auto-download can be toggled on or off per server + +>[!TIP] After downloading a new mixin version, a server restart is required for the changes to take effect. + +## Rollback Procedure + +If an update causes issues: + +1. Stop the server +2. Replace the plugin JAR with the previous version +3. Start the server +4. Verify functionality with `/f admin version` + +>[!WARNING] Downgrading may require a config migration reset. Always keep backups before updating. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/getting_started.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/getting_started.md new file mode 100644 index 00000000..4577524f --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/getting_started.md @@ -0,0 +1,43 @@ +--- +id: admin_getting_started +--- +# Getting Started as Admin + +Welcome to HyperFactions administration. This guide +covers your first steps after installing the plugin. + +## Opening the Admin Dashboard + +`/f admin` +Opens the admin dashboard GUI with access to all +management tools, zone editors, and server settings. + +>[!INFO] You need **hyperfactions.admin.use** permission or OP status to access admin commands. + +## Requirements + +- **With a permission plugin**: Grant `hyperfactions.admin.use` +- **Without a permission plugin**: The player must be a + server operator (`adminRequiresOp=true` by default) + +## First Steps After Install + +1. Run `/f admin` to verify your access +2. Open **Config** to review default faction settings +3. Create a **SafeZone** at spawn with `/f admin safezone Spawn` +4. Optionally create **WarZones** for PvP arenas +5. Review **Backup** settings to ensure data safety + +## Admin Capabilities + +| Area | What You Can Do | +|------|----------------| +| Factions | Inspect, modify, or force-disband any faction | +| Zones | Create SafeZones and WarZones with custom flags | +| Power | Override player/faction power values | +| Economy | Manage faction treasuries and upkeep | +| Config | Edit settings live via GUI or reload from disk | +| Backups | Create, restore, and manage data backups | +| Imports | Migrate data from other faction plugins | + +>[!TIP] Use `/f admin --text` to get chat-based output instead of the GUI, useful for console or automation. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/permissions.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/permissions.md new file mode 100644 index 00000000..9765ddb8 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/permissions.md @@ -0,0 +1,41 @@ +--- +id: admin_permissions +--- +# Admin Permissions + +All admin features are gated behind permission nodes +in the `hyperfactions.admin` namespace. + +## Permission Nodes + +| Permission | Description | +|-----------|-------------| +| `hyperfactions.admin.*` | Grants **all** admin permissions | +| `hyperfactions.admin.use` | Access `/f admin` dashboard | +| `hyperfactions.admin.reload` | Reload configuration files | +| `hyperfactions.admin.debug` | Toggle debug logging categories | +| `hyperfactions.admin.zones` | Create, edit, and delete zones | +| `hyperfactions.admin.disband` | Force-disband any faction | +| `hyperfactions.admin.modify` | Modify any faction's settings | +| `hyperfactions.admin.bypass.limits` | Bypass claim and power limits | +| `hyperfactions.admin.backup` | Create and restore backups | +| `hyperfactions.admin.power` | Override player power values | +| `hyperfactions.admin.economy` | Manage faction treasuries | + +## Fallback Behavior + +When **no permission plugin** is installed, admin +permissions fall back to server operator (OP) status. +This is controlled by `adminRequiresOp` in the server +config (default: `true`). + +>[!NOTE] The `hyperfactions.admin.*` wildcard grants every admin permission. Use individual nodes for granular control over your staff team. + +## Permission Resolution Order + +1. **VaultUnlocked** provider (if available) +2. **HyperPerms** provider (if available) +3. **LuckPerms** provider (if available) +4. **OP check** for admin nodes (fallback) + +>[!WARNING] Without a permission plugin and with `adminRequiresOp` disabled, admin commands are **open to all players**. Always use a permission plugin in production. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_commands.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_commands.md new file mode 100644 index 00000000..cb3a1cc6 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_commands.md @@ -0,0 +1,41 @@ +--- +id: admin_power_commands +--- +# Power Admin Commands + +Override player and faction power values. All commands +require `hyperfactions.admin.power` permission. + +## Player Power Commands + +| Command | Description | +|---------|-------------| +| `/f admin power set ` | Set exact power value | +| `/f admin power add ` | Add power to player | +| `/f admin power remove ` | Remove power from player | +| `/f admin power reset ` | Reset to default starting power | +| `/f admin power info ` | View detailed power breakdown | + +## How Power Affects Factions + +A faction's total power is the sum of all its members' +individual power. Territory claims require sufficient +total power to maintain. + +| Scenario | Effect | +|----------|--------| +| Power set higher | Faction can claim more territory | +| Power set lower | Faction may become vulnerable to overclaim | +| Power reset | Returns player to default starting value | + +>[!WARNING] Lowering a player's power may cause their faction to lose territory if total power drops below the number of claimed chunks. + +## Examples + +- `/f admin power set Steve 50` -- set to exactly 50 +- `/f admin power add Steve 10` -- increase by 10 +- `/f admin power remove Steve 5` -- decrease by 5 +- `/f admin power reset Steve` -- back to default +- `/f admin power info Steve` -- show full breakdown + +>[!TIP] Use `/f admin power info ` to see current power, max power, and any active overrides before making changes. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_overrides.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_overrides.md new file mode 100644 index 00000000..0834b1d6 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_overrides.md @@ -0,0 +1,58 @@ +--- +id: admin_power_overrides +--- +# Power Overrides + +Special power commands that change how power behaves +for specific players or factions. + +## Override Commands + +| Command | Description | +|---------|-------------| +| `/f admin power setmax ` | Set custom max power cap | +| `/f admin power noloss ` | Toggle death power penalty immunity | +| `/f admin power nodecay ` | Toggle offline power decay immunity | +| `/f admin power info ` | View all overrides and power details | + +## Custom Max Power + +`/f admin power setmax ` +Sets a personal maximum power cap for the player, +overriding the server default. + +>[!INFO] Setting a custom max does **not** change current power. It only changes the ceiling. The player must still earn power up to the new limit. + +## No-Loss Mode + +`/f admin power noloss ` +Toggles death power loss immunity. When enabled, the +player will **not** lose power on death. + +Useful for: +- New player protection periods +- Event participants +- Staff members + +## No-Decay Mode + +`/f admin power nodecay ` +Toggles offline power decay immunity. When enabled, +the player's power will **not** decrease while offline. + +Useful for: +- Players on extended leave +- VIP members +- Seasonal protection + +## Power Info + +`/f admin power info ` +Shows a complete breakdown: + +- Current power and max power +- Active overrides (noloss, nodecay, custom max) +- Last death time and power lost +- Faction contribution percentage + +>[!TIP] All power overrides persist across server restarts and are stored in the player's data file. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/all_commands.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/all_commands.md new file mode 100644 index 00000000..b77ccd0b --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/all_commands.md @@ -0,0 +1,66 @@ +--- +id: admin_quickref_commands +--- +# Admin Command Reference + +Complete list of all `/f admin` subcommands with +syntax and required permissions. + +## Dashboard and General + +| Command | Permission | +|---------|-----------| +| `/f admin` | admin.use | +| `/f admin version` | admin.use | +| `/f admin reload` | admin.reload | +| `/f admin sync` | admin.use | +| `/f admin bypass` | admin.bypass.limits | + +## Faction Management + +| Command | Permission | +|---------|-----------| +| `/f admin factions` | admin.use | +| `/f admin info ` | admin.use | +| `/f admin who ` | admin.use | +| `/f admin disband ` | admin.disband | +| `/f admin log` | admin.use | + +## Zone Management + +| Command | Permission | +|---------|-----------| +| `/f admin safezone ` | admin.zones | +| `/f admin warzone ` | admin.zones | +| `/f admin removezone ` | admin.zones | +| `/f admin zone create/delete/claim/unclaim` | admin.zones | +| `/f admin zone radius ` | admin.zones | +| `/f admin zone list` | admin.zones | +| `/f admin zone notify ` | admin.zones | +| `/f admin zone title upper/lower ` | admin.zones | +| `/f admin zone properties ` | admin.zones | +| `/f admin zoneflag ` | admin.zones | + +## Power and Economy + +| Command | Permission | +|---------|-----------| +| `/f admin power set/add/remove/reset [amt]` | admin.power | +| `/f admin power setmax/noloss/nodecay [amt]` | admin.power | +| `/f admin power info ` | admin.power | +| `/f admin economy balance/set/add/take/reset [amt]` | admin.economy | + +## Maintenance + +| Command | Permission | +|---------|-----------| +| `/f admin backup create/list/restore/delete` | admin.backup | +| `/f admin import [flags]` | admin.use | +| `/f admin update` | admin.use | +| `/f admin update mixin` | admin.use | +| `/f admin config` | admin.use | +| `/f admin world list/info/set/reset` | admin.use | +| `/f admin debug toggle ` | admin.debug | +| `/f admin integration` | admin.use | + +>[!NOTE] All permission nodes are prefixed with `hyperfactions.` (e.g., `hyperfactions.admin.use`). diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/integrations.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/integrations.md new file mode 100644 index 00000000..8578ea92 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/integrations.md @@ -0,0 +1,46 @@ +--- +id: admin_integrations +--- +# Plugin Integrations + +HyperFactions integrates with several external plugins +through soft dependencies. All integrations are +optional and fail gracefully if unavailable. + +## Checking Integration Status + +`/f admin version` +Shows current version and detected integrations. + +`/f admin integration` +Opens the integration management panel with detailed +status for each detected plugin. + +## Integration Table + +| Plugin | Type | Description | +|--------|------|-------------| +| **HyperPerms** | Permissions | Full permission system with groups, inheritance, and context | +| **LuckPerms** | Permissions | Alternative permission provider | +| **VaultUnlocked** | Permissions/Economy | Permission and economy bridge | +| **HyperProtect-Mixin** | Protection | Enables advanced zone flags (explosions, fire, keep inventory) | +| **OrbisGuard-Mixins** | Protection | Alternative mixin for zone flag enforcement | +| **PlaceholderAPI** | Placeholders | 49 faction placeholders for other plugins | +| **WiFlow PlaceholderAPI** | Placeholders | Alternative placeholder provider | +| **GravestonePlugin** | Death | Gravestone access control in zones | +| **HyperEssentials** | Features | Zone flags for homes, warps, and kits | +| **KyuubiSoft Core** | Framework | Core library integration | +| **Sentry** | Monitoring | Error tracking and diagnostics | + +## Permission Provider Priority + +1. **VaultUnlocked** (highest priority) +2. **HyperPerms** +3. **LuckPerms** +4. **OP fallback** (if no provider found) + +>[!INFO] Integrations are detected once at startup using reflection. Results are cached for the session. A server restart is required after adding or removing an integrated plugin. + +>[!TIP] Use `/f admin debug toggle integration` to enable detailed integration logging for troubleshooting. + +>[!NOTE] HyperProtect-Mixin is the **recommended** protection mixin. Without it, 15 zone flags will have no effect. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_basics.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_basics.md new file mode 100644 index 00000000..44a13c4d --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_basics.md @@ -0,0 +1,46 @@ +--- +id: admin_zone_basics +--- +# Zone Basics + +Zones are admin-controlled territories with custom +rules that override normal faction protection. + +## Zone Types + +- **SafeZone** -- No PvP, no building, no damage. + Ideal for spawn areas and trading hubs. +- **WarZone** -- PvP always enabled, no building. + Ideal for arenas and contested battle areas. + +## Creating Zones + +`/f admin safezone ` +Creates a SafeZone and claims your current chunk. + +`/f admin warzone ` +Creates a WarZone and claims your current chunk. + +After creation, stand in additional chunks and use +`/f admin zone claim ` to expand the zone. + +## Managing Zone Chunks + +`/f admin zone claim ` +Add the current chunk to the named zone. + +`/f admin zone unclaim ` +Remove the current chunk from the named zone. + +`/f admin zone radius ` +Claim a square of chunks around your position. + +## Deleting Zones + +`/f admin removezone ` +Permanently deletes the zone and releases all its +claimed chunks. + +>[!WARNING] Deleting a zone releases all its chunks instantly. This cannot be undone without a backup restore. + +>[!INFO] Zone rules **always override** faction territory rules. A SafeZone inside enemy land is still safe. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_commands.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_commands.md new file mode 100644 index 00000000..737ac1a3 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_commands.md @@ -0,0 +1,44 @@ +--- +id: admin_zone_commands +--- +# Zone Command Reference + +Complete reference for all zone management commands. +All require `hyperfactions.admin.zones` permission. + +## Quick Creation + +| Command | Description | +|---------|-------------| +| `/f admin safezone ` | Create a SafeZone at current chunk | +| `/f admin warzone ` | Create a WarZone at current chunk | +| `/f admin removezone ` | Delete a zone and release chunks | + +## Zone Management + +| Command | Description | +|---------|-------------| +| `/f admin zone create ` | Create a zone (safezone/warzone) | +| `/f admin zone delete ` | Delete a zone | +| `/f admin zone claim ` | Add current chunk to zone | +| `/f admin zone unclaim ` | Remove current chunk from zone | +| `/f admin zone radius ` | Claim square radius of chunks | +| `/f admin zone list` | List all zones with chunk counts | +| `/f admin zone notify ` | Toggle entry/leave messages | +| `/f admin zone title upper/lower ` | Set zone title text | +| `/f admin zone properties ` | Open zone properties GUI | + +## Flag Management + +| Command | Description | +|---------|-------------| +| `/f admin zoneflag ` | Set a specific flag | + +>[!TIP] Use the zone **properties GUI** for a visual editor with toggles for every flag, organized by category. + +## Examples + +- `/f admin safezone Spawn` -- create spawn protection +- `/f admin zone radius Spawn 3` -- expand to 7x7 chunks +- `/f admin zoneflag Spawn door_use true` -- allow doors +- `/f admin zone notify Spawn true` -- show entry messages diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_flags.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_flags.md new file mode 100644 index 00000000..033605e6 --- /dev/null +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_flags.md @@ -0,0 +1,44 @@ +--- +id: admin_zone_flags +--- +# Zone Flags + +Zones support **47 boolean flags** across 10 categories. +Each flag controls a specific behavior within the zone. + +## Flag Categories Overview + +| Category | Count | Key Flags | +|----------|-------|-----------| +| Combat | 7 | pvp_enabled, friendly_fire, mob_damage, pve_damage | +| Damage | 4 | fall_damage, explosion_damage, fire_spread | +| Death | 2 | keep_inventory, power_loss | +| Building | 4 | build_allowed, block_place, hammer_use | +| Interaction | 13 | door_use, container_use, bench_use, npc_tame | +| Transport | 3 | teleporter_use, portal_use, mount_entry | +| Items | 4 | item_drop, item_pickup, invincible_items | +| Mob Spawning | 5 | mob_spawning, hostile/passive/neutral | +| Mob Clearing | 4 | mob_clear, hostile/passive/neutral clear | +| Integration | 5 | gravestone_access, show_on_map, essentials_homes | + +## Default Values (SafeZone vs WarZone) + +| Flag | SafeZone | WarZone | +|------|----------|---------| +| pvp_enabled | false | **true** | +| build_allowed | false | false | +| fall_damage | false | **true** | +| keep_inventory | **true** | false | +| power_loss | false | **true** | +| mob_spawning | false | **true** | +| item_drop | false | **true** | +| door_use | **true** | **true** | +| container_use | false | **true** | + +>[!NOTE] Some flags require **HyperProtect-Mixin** to function (e.g., keep_inventory, explosion_damage, fire_spread, block_place, npc_tame). Without the mixin, these flags have no effect even when enabled. + +## Setting Flags + +`/f admin zoneflag ` + +>[!TIP] Use `/f admin zone properties ` for a visual toggle editor grouped by category. From a0d2000cded737ab5d4a9b6b6a4204c5187cd8a8 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Tue, 10 Mar 2026 14:54:53 -0700 Subject: [PATCH 41/55] =?UTF-8?q?feat:=20rewrite=20Spanish=20player=20help?= =?UTF-8?q?=20translations=20(es-ES)=20=E2=80=94=2025=20topics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Full rewrite of all es-ES player help to match updated en-US content. Preserves command syntax, markdown formatting, and frontmatter IDs. Includes 3 new topics: spawn_protection, upkeep, permissions. --- .../Languages/es-ES/help/combat/death.md | 41 +++++- .../Languages/es-ES/help/combat/protection.md | 31 +++- .../es-ES/help/combat/spawn_protection.md | 30 ++++ .../Languages/es-ES/help/combat/tagging.md | 30 +++- .../Languages/es-ES/help/combat/zones.md | 32 +++- .../es-ES/help/diplomacy/alliances.md | 43 +++++- .../Languages/es-ES/help/diplomacy/enemies.md | 46 +++++- .../es-ES/help/diplomacy/relations.md | 34 ++++- .../Languages/es-ES/help/economy/commands.md | 30 ++-- .../Languages/es-ES/help/economy/funds.md | 44 +++++- .../Languages/es-ES/help/economy/treasury.md | 25 +++- .../Languages/es-ES/help/economy/upkeep.md | 45 ++++++ .../es-ES/help/power_land/claiming.md | 42 +++++- .../es-ES/help/power_land/losing_territory.md | 44 +++++- .../es-ES/help/power_land/territory_map.md | 39 ++++- .../help/power_land/understanding_power.md | 39 ++++- .../es-ES/help/quick_ref/all_commands.md | 138 ++++++++++-------- .../es-ES/help/quick_ref/permissions.md | 71 +++++++++ .../es-ES/help/welcome/getting_started.md | 37 ++++- .../es-ES/help/welcome/quick_tips.md | 46 ++++-- .../es-ES/help/welcome/what_are_factions.md | 40 +++-- .../es-ES/help/your_faction/creating.md | 35 ++++- .../es-ES/help/your_faction/joining.md | 35 ++++- .../es-ES/help/your_faction/managing.md | 44 ++++-- .../es-ES/help/your_faction/roles.md | 44 +++++- 25 files changed, 879 insertions(+), 206 deletions(-) create mode 100644 src/main/resources/Server/Languages/es-ES/help/combat/spawn_protection.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/economy/upkeep.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/quick_ref/permissions.md diff --git a/src/main/resources/Server/Languages/es-ES/help/combat/death.md b/src/main/resources/Server/Languages/es-ES/help/combat/death.md index ba32eb8f..905820dd 100644 --- a/src/main/resources/Server/Languages/es-ES/help/combat/death.md +++ b/src/main/resources/Server/Languages/es-ES/help/combat/death.md @@ -4,12 +4,41 @@ commands: home, sethome, stuck --- # Muerte y Recuperacion -Morir tiene consecuencias reales: +La muerte tiene consecuencias reales en facciones. Cada +muerte te cuesta poder personal, debilitando la capacidad +de tu faccion para mantener territorio. -Pierdes poder personal, reduciendo el total de la faccion. -Si los reclamos superan el poder, los enemigos pueden reclamar. +## Perdida de Poder -El poder se regenera estando conectado. Varias muertes -pueden dejar a tu faccion peligrosamente vulnerable. +Cada muerte cuesta **-1.0 de poder** de tu total personal. +Esto reduce el poder combinado de la faccion. -> Elige tus batallas con cuidado! +| Evento | Cambio de Poder | +|--------|-----------------| +| Muerte (cualquier causa) | -1.0 | +| Regeneracion en linea | +0.1 por minuto | +| Desconexion en combate | -1.0 (muerto) | + +## Escenarios de Ejemplo + +*5 miembros a 10.0 de poder cada uno = 50 total, 20 reclamos.* +*Un miembro muere dos veces: 8.0 de poder, total de faccion 48.* +*Tres miembros mueren una vez cada uno: el total baja a 47.* + +>[!WARNING] Si el poder de tu faccion cae por debajo de tu cantidad de reclamos, los enemigos pueden sobrereclamar tu territorio. + +## Recuperacion + +El poder se regenera a 0.1 por minuto mientras estas en linea. +Recuperar 1.0 de poder perdido toma aproximadamente 10 minutos. +Las muertes multiples se acumulan, asi que evita peleas repetidas. + +--- + +## Todos los Tipos de Muerte + +La perdida de poder aplica a todas las muertes: PvP, muertes +por mobs, dano por caida, ahogamiento y cualquier otra causa. +No hay forma segura de morir. + +>[!TIP] Establece un hogar de faccion con /f sethome para que los miembros puedan reagruparse rapidamente despues de morir. diff --git a/src/main/resources/Server/Languages/es-ES/help/combat/protection.md b/src/main/resources/Server/Languages/es-ES/help/combat/protection.md index 43b9e2a9..fb54af24 100644 --- a/src/main/resources/Server/Languages/es-ES/help/combat/protection.md +++ b/src/main/resources/Server/Languages/es-ES/help/combat/protection.md @@ -3,15 +3,36 @@ id: combat_protection --- # Proteccion de Territorio -El territorio reclamado tiene varias protecciones: +El territorio reclamado proporciona varias capas de defensa +para las construcciones y recursos de tu faccion. ## Proteccion de Bloques -Solo los miembros pueden colocar o romper bloques. + +Solo los miembros de la faccion pueden colocar o destruir +bloques en tu territorio. Los enemigos y neutrales no pueden +modificar nada. ## Proteccion de Contenedores -Cofres, barriles, etc. estan asegurados para los miembros. + +Los cofres, barriles y otros contenedores estan asegurados. +Solo los miembros de tu faccion pueden abrir o interactuar +con el almacenamiento en chunks reclamados. ## Alertas de Entrada -Recibes notificaciones cuando no-miembros entran en tus reclamos. -> El territorio protege los bloques, no a los jugadores! +Cuando un no miembro entra en tu territorio reclamado, +los miembros de la faccion en linea reciben una notificacion +con el nombre y ubicacion del intruso. + +--- + +## Acceso de Aliados + +Los aliados no pueden construir ni destruir bloques en tu +territorio por defecto. El dano entre aliados tambien esta +desactivado, por lo que los jugadores aliados no pueden +danarse entre si. + +>[!INFO] El territorio protege bloques, no jugadores. El PvP en tu propio territorio depende de la relacion del atacante con tu faccion. + +>[!TIP] Manten tus reclamos conectados y evita chunks aislados que son mas dificiles de defender. diff --git a/src/main/resources/Server/Languages/es-ES/help/combat/spawn_protection.md b/src/main/resources/Server/Languages/es-ES/help/combat/spawn_protection.md new file mode 100644 index 00000000..3eec9c11 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/combat/spawn_protection.md @@ -0,0 +1,30 @@ +--- +id: combat_spawn_protection +--- +# Proteccion de Aparicion + +Despues de reaparecer tras la muerte, recibes proteccion +temporal para prevenir el campeo de aparicion. + +## Como Funciona + +- La proteccion dura **5 segundos** despues de reaparecer +- No puedes recibir dano durante este periodo +- Un indicador visual muestra tu estado de proteccion + +## La Proteccion se Rompe + +La proteccion de aparicion termina antes si: + +- **Atacas** a otro jugador o entidad +- **Te mueves** de tu posicion de aparicion + +Esto previene el abuso. No puedes atacar a otros mientras +eres invulnerable. Una vez que realizas cualquier accion, +la proteccion cae y las reglas normales de combate aplican. + +--- + +>[!NOTE] La duracion de la proteccion de aparicion y las condiciones de ruptura son configurables por el servidor. Tu servidor puede usar configuraciones diferentes. + +>[!TIP] Usa tu tiempo de proteccion para evaluar la situacion antes de moverte. diff --git a/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md b/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md index cd292f7a..d414d649 100644 --- a/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md +++ b/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md @@ -3,10 +3,30 @@ id: combat_tagging --- # Etiqueta de Combate -Atacar o ser atacado te marca en combate. -Un temporizador muestra la duracion restante. +Cuando atacas o eres atacado por otro jugador, +te conviertes en **etiquetado de combate** por 15 segundos. -Mientras estas marcado: sin /f home, /f stuck ni teletransportes. -La marca se reinicia con cada nueva accion de combate. +## Mientras Estas Etiquetado -> Desconectarte mientras estas marcado es arriesgado. Quedate y pelea! +- No puedes usar `/f home` ni `/f stuck` para teletransportarte +- No puedes usar comandos de teletransporte del servidor +- La etiqueta se reinicia con cada nueva accion de combate +- Un temporizador muestra la duracion restante de tu etiqueta + +--- + +## Penalidad por Desconexion + +>[!WARNING] Desconectarte mientras estas etiquetado en combate mata a tu personaje y pierdes 1.0 de poder. + +Tus objetos caen donde te desconectaste y los enemigos +pueden saquearlos. Siempre espera a que la etiqueta expire. + +## Como Funciona el Temporizador + +El temporizador de etiqueta de combate aparece en pantalla +cuando entras en combate. Cada nuevo golpe lo reinicia a +15 segundos. Una vez que llega a cero, todas las restricciones +se levantan. + +>[!TIP] Desvincularte y espera a que el temporizador termine si necesitas teletransportarte. diff --git a/src/main/resources/Server/Languages/es-ES/help/combat/zones.md b/src/main/resources/Server/Languages/es-ES/help/combat/zones.md index ec748ecf..e19b5449 100644 --- a/src/main/resources/Server/Languages/es-ES/help/combat/zones.md +++ b/src/main/resources/Server/Languages/es-ES/help/combat/zones.md @@ -3,12 +3,32 @@ id: combat_zones --- # Zonas Especiales -Los administradores pueden crear zonas con reglas especiales: +Los administradores pueden designar areas con reglas especiales +que anulan la proteccion normal de territorio de faccion. -## SafeZone -Sin PvP, sin romper bloques. Para spawn/comercio. +## Zona Segura -## WarZone -PvP siempre habilitado, sin proteccion. Areas de batalla. +Sin dano PvP, sin destruccion de bloques por no administradores. +Ideal para areas de aparicion, centros de comercio y areas de +preparacion de eventos. Los jugadores no pueden ser danados aqui. -> Las reglas de zona siempre anulan las del territorio de faccion. +## Zona de Guerra + +PvP siempre habilitado. No aplica proteccion de bloques. +Areas de batalla abierta donde todo vale. No recibes +beneficios de proteccion de territorio en una Zona de Guerra. + +--- + +## Comparacion de Zonas + +| Caracteristica | Zona Segura | Zona de Guerra | Tierra de Faccion | +|----------------|-------------|----------------|-------------------| +| PvP | Desactivado | Siempre Activo | Basado en relacion | +| Destruccion de Bloques | Desactivada | Permitida | Solo Miembros | +| Contenedores | Protegidos | Abiertos | Solo Miembros | +| Mejor Para | Aparicion/Comercio | Arenas | Bases | + +>[!NOTE] Las reglas de zona siempre anulan las reglas de territorio de faccion. Un chunk reclamado dentro de una Zona de Guerra sigue las reglas de Zona de Guerra. + +>[!TIP] Revisa tu mapa de territorio con /f map para ver los limites de las zonas. diff --git a/src/main/resources/Server/Languages/es-ES/help/diplomacy/alliances.md b/src/main/resources/Server/Languages/es-ES/help/diplomacy/alliances.md index 44863aeb..a9dfac40 100644 --- a/src/main/resources/Server/Languages/es-ES/help/diplomacy/alliances.md +++ b/src/main/resources/Server/Languages/es-ES/help/diplomacy/alliances.md @@ -4,11 +4,42 @@ commands: ally --- # Formar Alianzas -Las alianzas protegen a ambas facciones del fuego -amigo y disputas territoriales. +Las alianzas son **acuerdos mutuos** entre dos facciones que proporcionan beneficios de proteccion y cooperacion. -`/f ally ` -Envia una solicitud de alianza. Ambos lados deben aceptar. +--- + +## Como Formar una Alianza + +`/f ally ` + +Envia una solicitud de alianza a la faccion objetivo. La alianza solo entra en efecto una vez que **ambos lados acepten**. Un Oficial o Lider de la otra faccion tambien debe ejecutar `/f ally ` para confirmar. + +## Como Romper una Alianza + +`/f neutral ` + +Cualquier lado puede terminar unilateralmente una alianza restableciendo la relacion a neutral. + +--- + +## Beneficios de Alianza + +| Beneficio | Detalles | +|-----------|----------| +| **Sin fuego amigo** | Los jugadores aliados no pueden danarse entre si (cuando el dano entre aliados esta desactivado) | +| **Visibilidad compartida en mapa** | El territorio aliado se muestra en [#5555FF] azul en el mapa de territorio | +| **Interaccion con territorio** | Los aliados pueden usar puertas, asientos y transporte en tu territorio por defecto | +| **Chat de aliados** | Usa `/f c` para cambiar al modo de chat de aliados para comunicacion entre facciones | +| **Proteccion contra sobrereclamacion** | Los aliados no pueden sobrereclamar el territorio del otro | + +>[!NOTE] Tu faccion puede tener hasta **10 alianzas** a la vez. Elige a tus aliados sabiamente. + +--- + +## Etiqueta de Alianza + +>[!TIP] La comunicacion es clave. Antes de enviar una solicitud de alianza, considera contactar al lider de la otra faccion para discutir terminos. Una alianza fuerte se construye sobre beneficio mutuo, no solo conveniencia. -Beneficios: sin fuego amigo, visibilidad compartida en el mapa. -> Puede haber un limite en la cantidad de alianzas. +- Las alianzas funcionan en ambas direcciones -- si te beneficias de la proteccion, tus aliados esperan lo mismo +- Romper una alianza durante tiempo de guerra puede danar la reputacion de tu faccion +- Las facciones aliadas pueden coordinar reclamos de territorio para crear fronteras defendibles diff --git a/src/main/resources/Server/Languages/es-ES/help/diplomacy/enemies.md b/src/main/resources/Server/Languages/es-ES/help/diplomacy/enemies.md index 7458a504..cb8719ad 100644 --- a/src/main/resources/Server/Languages/es-ES/help/diplomacy/enemies.md +++ b/src/main/resources/Server/Languages/es-ES/help/diplomacy/enemies.md @@ -4,14 +4,44 @@ commands: enemy, neutral --- # Facciones Enemigas -Declarar un enemigo habilita el PvP y la agresion -territorial contra ellos. Accion unilateral. +Declarar un enemigo es una **accion unilateral** que inmediatamente habilita PvP y agresion territorial contra la faccion objetivo. No se requiere acuerdo. -`/f enemy ` -Declara enemigo inmediatamente. No requiere acuerdo. +--- + +## Declarar un Enemigo + +`/f enemy ` + +Marca instantaneamente a la faccion objetivo como tu enemigo. Esto entra en efecto inmediatamente -- no se necesita confirmacion del otro lado. Requiere rango de Oficial o superior. + +## Restablecer a Neutral + +`/f neutral ` + +Termina el estado de enemigo y restablece la relacion a neutral. Esto tambien requiere Oficial+ y entra en efecto inmediatamente. + +--- + +## Que Habilita el Estado de Enemigo + +| Efecto | Detalles | +|--------|----------| +| **PvP en territorio** | PvP completo habilitado en el territorio de ambas facciones | +| **Sobrereclamar** | Puedes usar `/f overclaim` en sus chunks si estan en deficit de poder | +| **Marcacion en mapa** | El territorio enemigo se muestra en [#FF5555] rojo en el mapa de territorio | +| **Sin proteccion** | La proteccion de territorio estandar no previene PvP enemigo | + +>[!WARNING] Declarar un enemigo es una decision seria. Sus miembros tambien pueden pelear contigo en tu propio territorio una vez que declares. + +--- + +## Consideraciones Estrategicas + +- Las declaraciones de enemigo son **unilaterales** -- puedes declarar sin su consentimiento, pero ellos tambien te ven como hostil +- Antes de declarar, revisa el poder del objetivo con `/f info `. Si son fuertes, puedes perder territorio en su lugar +- Debilita a los enemigos a traves de combate repetido para drenar su poder, luego sobreclama su tierra +- **No hay limite** de cuantos enemigos puedes tener, pero pelear en multiples frentes es arriesgado -PvP habilitado en el territorio del otro. Se puede -reclamar territorio si se debilitan. +>[!TIP] Usa `/f neutral ` para desescalar conflictos. A veces una paz estrategica es mas valiosa que una guerra continua. -`/f neutral ` -Restablece la relacion a neutral, finalizando la enemistad. +>[!NOTE] Si estas aliado con una faccion y la declaras como enemiga, la alianza se rompe primero. diff --git a/src/main/resources/Server/Languages/es-ES/help/diplomacy/relations.md b/src/main/resources/Server/Languages/es-ES/help/diplomacy/relations.md index 264c169d..ab2bf378 100644 --- a/src/main/resources/Server/Languages/es-ES/help/diplomacy/relations.md +++ b/src/main/resources/Server/Languages/es-ES/help/diplomacy/relations.md @@ -4,15 +4,35 @@ commands: relations --- # Relaciones entre Facciones -Cada par de facciones tiene una relacion diplomatica: +Cada par de facciones tiene una relacion diplomatica que determina como interactuan. Hay tres estados: **Aliado**, **Enemigo** y **Neutral**. -Aliado — Sin fuego amigo, protegidos de los reclamos -del otro. Requiere acuerdo mutuo. +--- + +## Comparacion de Relaciones -Enemigo — PvP habilitado en el territorio del otro. -Se puede reclamar territorio si el objetivo esta debilitado. +| Efecto | Aliado | Neutral | Enemigo | +|--------|--------|---------|---------| +| **PvP en territorio** | Desactivado | Reglas estandar | Activado | +| **Proteccion de territorio** | Proteccion mutua | Proteccion estandar | Puede sobrereclamar si esta debilitado | +| **Fuego amigo** | Desactivado | N/A | Activado en todas partes | +| **Color en mapa** | [#5555FF] Azul | [#AAAAAA] Gris | [#FF5555] Rojo | +| **Como establecer** | Acuerdo mutuo | Estado predeterminado | Declaracion unilateral | +| **Acceso a chat** | Canal de chat aliado | Ninguno | Ninguno | -Neutral — Estado por defecto. Se aplican reglas estandar. +--- + +## Ver Relaciones `/f relations` -Consulta todas las alianzas, enemigos y solicitudes pendientes. + +Muestra todas tus alianzas actuales, enemigos y cualquier solicitud de alianza pendiente. + +## Como Funcionan las Relaciones + +- **Neutral** es el estado predeterminado entre todas las facciones. Se aplican las reglas estandar del servidor. +- **Alianza** requiere que ambas facciones esten de acuerdo. Cualquier lado puede romperla unilateralmente. +- **Enemigo** se declara de forma unilateral. No se necesita acuerdo -- la otra faccion queda marcada inmediatamente como tu enemigo. + +>[!INFO] Las relaciones son gestionadas por Oficiales y Lideres. Los Miembros pueden ver relaciones pero no pueden cambiarlas. + +>[!TIP] Usa `/f relations` regularmente para mantenerte al tanto del panorama diplomatico. Saber quienes son tus enemigos te ayuda a prepararte para conflictos territoriales. diff --git a/src/main/resources/Server/Languages/es-ES/help/economy/commands.md b/src/main/resources/Server/Languages/es-ES/help/economy/commands.md index e923c336..034b72de 100644 --- a/src/main/resources/Server/Languages/es-ES/help/economy/commands.md +++ b/src/main/resources/Server/Languages/es-ES/help/economy/commands.md @@ -3,19 +3,27 @@ id: economy_commands --- # Comandos de Economia -Referencia rapida de comandos de economia: +Referencia rapida para todos los comandos de economia de faccion. -`/f balance` -Ver saldo de la tesoreria. +| Comando | Descripcion | Rol | +|---------|-------------|-----| +| /f balance | Ver saldo de tesoreria | Cualquiera | +| /f deposit (amount) | Depositar en la tesoreria | Cualquiera | +| /f withdraw (amount) | Retirar de la tesoreria | Oficial+ | +| /f money transfer (faction) (amount) | Transferir a otra faccion | Oficial+ | +| /f money log [page] | Ver historial de transacciones | Oficial+ | -`/f deposit ` -Depositar fondos. +--- + +## Alias de Comandos + +- `/f balance` tambien puede usarse como `/f bal` +- `/f deposit` y `/f withdraw` aceptan cantidades decimales -`/f withdraw ` -Retirar fondos. (Oficial+) +## Permisos -`/f money transfer ` -Transferir a otra faccion. +Todos los comandos de economia requieren nodos de permiso +`hyperfactions.economy.*`. Retirar y transferir estan +adicionalmente restringidos por rol de faccion (Oficial o superior). -`/f money log [pagina]` -Ver historial de transacciones. +>[!TIP] Usa /f money log para revisar depositos, retiros y transferencias recientes con marcas de tiempo. diff --git a/src/main/resources/Server/Languages/es-ES/help/economy/funds.md b/src/main/resources/Server/Languages/es-ES/help/economy/funds.md index 2b315846..e6b09d86 100644 --- a/src/main/resources/Server/Languages/es-ES/help/economy/funds.md +++ b/src/main/resources/Server/Languages/es-ES/help/economy/funds.md @@ -4,15 +4,43 @@ commands: deposit, withdraw --- # Gestionar Fondos -Los Miembros depositan; los Oficiales pueden retirar/transferir. +Los miembros de la faccion trabajan juntos para mantener la +tesoreria financiada a traves de depositos, retiros y transferencias. -`/f deposit ` -Deposita de tu saldo a la tesoreria. +## Depositar -`/f withdraw ` -Retira de la tesoreria. (Oficial+) +Cualquier miembro puede depositar fondos personales en la +tesoreria de la faccion. -`/f money transfer ` -Transfiere fondos a la tesoreria de otra faccion. +`/f deposit ` +Deposita de tu saldo personal a la tesoreria. -> Todas las transacciones quedan registradas para revision. +## Retirar + +Los Oficiales y el Lider pueden retirar fondos de vuelta a +su saldo personal. + +`/f withdraw ` +Retira de la tesoreria a tu saldo. (Oficial+) + +## Transferir + +Los Oficiales pueden transferir fondos directamente entre +tesorerias de facciones para acuerdos comerciales o diplomacia. + +`/f money transfer ` +Envia fondos a la tesoreria de otra faccion. (Oficial+) + +--- + +## Comisiones + +| Transaccion | Comision | +|-------------|----------| +| Deposito | 0% | +| Retiro | 0% | +| Transferencia | 0% | + +>[!INFO] Las tasas de comision son configurables por el servidor y pueden diferir de los valores predeterminados mostrados arriba. + +>[!TIP] Todas las transacciones se registran. Usa /f money log para revisar la actividad reciente. diff --git a/src/main/resources/Server/Languages/es-ES/help/economy/treasury.md b/src/main/resources/Server/Languages/es-ES/help/economy/treasury.md index b7c1d313..e8970219 100644 --- a/src/main/resources/Server/Languages/es-ES/help/economy/treasury.md +++ b/src/main/resources/Server/Languages/es-ES/help/economy/treasury.md @@ -4,10 +4,27 @@ commands: balance --- # Tesoreria de Faccion -Cada faccion tiene una tesoreria compartida. -Gestionada por los Oficiales y el Lider. +Cada faccion tiene una tesoreria compartida que sirve como +el banco de la faccion. Los fondos se usan para costos de +mantenimiento, mantenimiento de territorio y operaciones de faccion. + +## Saldo Inicial + +Las facciones nuevas comienzan con **0** en su tesoreria. +Los miembros deben depositar fondos para acumular reservas. + +## Quien Puede Gestionar + +- **Cualquier miembro** puede depositar fondos +- **Oficiales y Lider** pueden retirar y transferir +- **Lider** tiene control total de la tesoreria + +--- `/f balance` -Consulta el saldo de la tesoreria de tu faccion. (Alias: bal) +Consulta el saldo actual de la tesoreria de tu faccion. +Tambien disponible como `/f bal`. + +>[!TIP] Contribuye regularmente para mantener tu faccion financiada. Los costos de mantenimiento de territorio pueden vaciar una tesoreria rapidamente. -> Contribuye regularmente para mantener tu faccion financiada! +>[!INFO] Todas las transacciones de tesoreria se registran y pueden ser revisadas por los oficiales. diff --git a/src/main/resources/Server/Languages/es-ES/help/economy/upkeep.md b/src/main/resources/Server/Languages/es-ES/help/economy/upkeep.md new file mode 100644 index 00000000..baef7122 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/economy/upkeep.md @@ -0,0 +1,45 @@ +--- +id: economy_upkeep +--- +# Mantenimiento de Territorio + +Las facciones deben pagar un mantenimiento continuo +para conservar su territorio reclamado. Esto evita +el acaparamiento de tierras y mantiene el mapa activo. + +## Costos de Mantenimiento + +| Configuracion | Valor por defecto | +|---------------|-------------------| +| Costo por chunk | 2.0 por ciclo | +| Intervalo de pago | Cada 24 horas | +| Chunks gratis | 3 (sin costo) | +| Modo de escalado | Tarifa plana | + +Tus primeros **3 chunks son gratis**. Mas alla de +eso, cada chunk adicional reclamado cuesta 2.0 por +ciclo de pago. + +## Pago Automatico + +El pago automatico esta **habilitado por defecto**. +El sistema deduce automaticamente el mantenimiento de +tu tesoreria en cada intervalo. No requiere accion +manual. + +--- + +## Periodo de Gracia + +Si tu tesoreria no puede cubrir el mantenimiento, +comienza un **periodo de gracia de 48 horas**. Se +envia una advertencia 6 horas antes de que se +empiecen a perder reclamos. + +>[!WARNING] Si el mantenimiento sigue sin pagarse despues del periodo de gracia, tu faccion pierde 1 reclamo por ciclo hasta que los costos se cubran o todos los reclamos extra desaparezcan. + +## Ejemplo + +*Una faccion con 8 reclamos paga por 5 chunks (8 menos 3 gratis). A 2.0 por chunk, eso es 10.0 por ciclo.* + +>[!TIP] Manten tu tesoreria por encima del costo de mantenimiento. Usa /f balance para revisar tus reservas. diff --git a/src/main/resources/Server/Languages/es-ES/help/power_land/claiming.md b/src/main/resources/Server/Languages/es-ES/help/power_land/claiming.md index 7d2547fb..7715e5c4 100644 --- a/src/main/resources/Server/Languages/es-ES/help/power_land/claiming.md +++ b/src/main/resources/Server/Languages/es-ES/help/power_land/claiming.md @@ -4,13 +4,45 @@ commands: claim, unclaim --- # Reclamar Territorio -Reclamar un chunk lo protege. Solo los miembros -pueden construir, destruir o acceder a contenedores. +Reclamar un chunk lo protege bajo el control de tu faccion. Solo los miembros de la faccion pueden construir, destruir o acceder a contenedores dentro del territorio reclamado. + +--- + +## Como Reclamar `/f claim` -Reclama el chunk en el que te encuentras. (Oficial+) + +Parate en el chunk que quieres reclamar y ejecuta este comando. El chunk queda protegido inmediatamente. Requiere rango de **Oficial** o superior. + +## Como Desreclamar `/f unclaim` -Libera un reclamo y lo devuelve a tierra salvaje. (Oficial+) -> Cada reclamo cuesta un punto de poder. No te expandes de mas! +Libera el chunk donde estas parado de vuelta a terreno salvaje. Tambien requiere Oficial+. + +--- + +## Reglas de Reclamo + +| Regla | Predeterminado | +|-------|----------------| +| **Costo de poder por reclamo** | 2.0 de poder | +| **Reclamos maximos** | 100 por faccion | +| **Solo adyacentes** | No (puedes reclamar en cualquier lugar) | + +>[!INFO] Cada reclamo cuesta 2.0 de poder para mantener. Una faccion con 50 de poder total puede mantener hasta 25 reclamos de forma segura. + +--- + +## Que Proporciona la Proteccion + +Dentro del territorio reclamado, lo siguiente se aplica por defecto: + +- **Los foraneos** no pueden destruir, colocar o interactuar con bloques +- **Los aliados** pueden usar puertas, asientos y transporte pero no pueden destruir o colocar bloques +- **Los Miembros y Oficiales** tienen acceso completo para construir, destruir y usar todo +- El acceso a contenedores (cofres, cajas) esta restringido solo a miembros + +>[!TIP] Tambien puedes reclamar directamente desde el mapa de territorio. Abre `/f map` y haz clic en chunks sin reclamar para reclamarlos. + +>[!WARNING] No te expandas demasiado. Si tu faccion pierde poder por muertes, los reclamos que excedan tu presupuesto de poder se vuelven vulnerables a sobrereclamaciones. diff --git a/src/main/resources/Server/Languages/es-ES/help/power_land/losing_territory.md b/src/main/resources/Server/Languages/es-ES/help/power_land/losing_territory.md index acfb2339..53c152ac 100644 --- a/src/main/resources/Server/Languages/es-ES/help/power_land/losing_territory.md +++ b/src/main/resources/Server/Languages/es-ES/help/power_land/losing_territory.md @@ -4,11 +4,45 @@ commands: overclaim --- # Perder Territorio -Si el poder total cae por debajo de los reclamos, -eres vulnerable. Los enemigos pueden robar tus chunks. +Cuando el poder total de una faccion cae por debajo del costo de sus reclamos, se vuelve **vulnerable**. Los enemigos pueden sobrereclamar chunks directamente. + +--- + +## Como Funciona Sobrereclamar `/f overclaim` -Toma un chunk de una faccion debilitada. (Oficial+) -Mantente a salvo: permanece activo, evita morir y -no te expandes mas de lo que tu poder soporta. +Un Oficial o Lider de una faccion **enemiga** se para en tu chunk reclamado y ejecuta este comando. Si tu faccion esta en deficit de poder, el chunk se transfiere a su faccion. + +## Las Matematicas + +Cada reclamo cuesta **2.0 de poder** para mantener. Si tu poder total cae por debajo de ese umbral, los chunks en deficit son vulnerables. + +>[!WARNING] Sobrereclamar es permanente. Una vez que un enemigo toma un chunk, debes reclamarlo de nuevo (o sobrereclamarlo de vuelta si se debilitan). + +--- + +## Escenario de Ejemplo + +| Factor | Valor | +|--------|-------| +| Miembros | 5 jugadores | +| Poder por miembro | 10 cada uno (inicial) | +| **Poder total** | **50** | +| Reclamos | 30 chunks | +| Poder necesario (30 x 2.0) | **60** | +| **Deficit** | **10 de poder faltante** | + +En este ejemplo, la faccion ya es vulnerable desde el inicio. Los enemigos podrian sobrereclamar hasta **5 chunks** (10 de deficit / 2.0 por reclamo) antes de que la faccion alcance el equilibrio. + +--- + +## Como Prevenir Sobrereclamaciones + +- **No te expandas demasiado** -- siempre manten el poder total por encima del costo de tus reclamos con un margen +- **Mantente activo** -- el poder solo se regenera mientras estas en linea (+0.1/min) +- **Evita muertes innecesarias** -- cada muerte cuesta 1.0 de poder +- **Recluta mas miembros** -- mas jugadores significa mas poder total +- **Desreclama chunks sin usar** -- libera poder con `/f unclaim` + +>[!TIP] Revisa tu estado de poder regularmente con `/f power`. Si tu poder total esta cerca del costo de tus reclamos, considera desreclamar chunks menos importantes antes de una guerra. diff --git a/src/main/resources/Server/Languages/es-ES/help/power_land/territory_map.md b/src/main/resources/Server/Languages/es-ES/help/power_land/territory_map.md index 9617b3fc..21a1cf65 100644 --- a/src/main/resources/Server/Languages/es-ES/help/power_land/territory_map.md +++ b/src/main/resources/Server/Languages/es-ES/help/power_land/territory_map.md @@ -4,10 +4,41 @@ commands: map --- # El Mapa de Territorio -Una vista aerea de los chunks reclamados cerca de ti. +El mapa de territorio te da una vista aerea de los chunks reclamados en tu area, mostrando que facciones controlan la tierra a tu alrededor. + +--- + +## Abrir el Mapa `/f map` -Abre el mapa de territorio. Haz clic en chunks para reclamar. -Tu faccion aparece en tu color. Aliados en azul, -enemigos en rojo, neutrales en gris, tierra salvaje oscura. +Abre la interfaz del mapa de territorio centrada en tu ubicacion actual. + +--- + +## Leyenda de Colores + +| Color | Significado | +|-------|-------------| +| [#55FF55] **El color de tu faccion** | Territorio reclamado por tu faccion | +| [#5555FF] **Azul** | Territorio de faccion aliada | +| [#FF5555] **Rojo** | Territorio de faccion enemiga | +| [#AAAAAA] **Gris** | Territorio de faccion neutral | +| [#333333] **Oscuro** | Terreno salvaje (tierra sin reclamar) | +| [#FFAA00] **Dorado** | Zonas especiales (zona segura, zona de guerra) | + +>[!INFO] El color de tu faccion en el mapa coincide con el color que estableciste en la configuracion de color de faccion. Los aliados y enemigos usan colores fijos para facil identificacion. + +--- + +## Clic para Reclamar + +El mapa no es solo para ver -- puedes interactuar con el directamente. + +- **Haz clic en un chunk sin reclamar** para reclamarlo (requiere rango Oficial+ y poder suficiente) +- **Haz clic en un chunk reclamado** para ver que faccion lo posee +- Desplazate o mueve el mapa para explorar el area a tu alrededor + +>[!TIP] El mapa es la forma mas facil de planear la expansion de tu territorio. Busca areas sin reclamar cerca de tu base y reclama estrategicamente para crear un borde contiguo. + +>[!NOTE] El mapa muestra un area fija alrededor de tu posicion. Muevete a otra ubicacion y vuelve a abrirlo para ver otras partes del mundo. diff --git a/src/main/resources/Server/Languages/es-ES/help/power_land/understanding_power.md b/src/main/resources/Server/Languages/es-ES/help/power_land/understanding_power.md index 4cb7f4fd..a73464cc 100644 --- a/src/main/resources/Server/Languages/es-ES/help/power_land/understanding_power.md +++ b/src/main/resources/Server/Languages/es-ES/help/power_land/understanding_power.md @@ -4,11 +4,40 @@ commands: power --- # Entender el Poder -El poder permite a tu faccion mantener territorio. -Cada jugador tiene poder personal que se suma al total. +El poder es el recurso principal que determina cuanto territorio puede mantener tu faccion. Cada jugador tiene poder personal que contribuye al total de la faccion. + +--- + +## Valores de Poder Predeterminados + +| Configuracion | Valor | +|---------------|-------| +| **Poder maximo por jugador** | 20 | +| **Poder inicial** | 10 | +| **Penalidad por muerte** | -1.0 por muerte | +| **Recompensa por matar** | 0.0 | +| **Tasa de regeneracion** | +0.1 por minuto (mientras esta en linea) | +| **Costo de poder por reclamo** | 2.0 | +| **Desconexion mientras etiquetado** | -1.0 adicional | + +## Como Funciona + +El **poder total** de tu faccion es la suma del poder personal de cada miembro. Tu **poder requerido** es el numero de reclamos multiplicado por 2.0. Mientras el poder total se mantenga por encima del poder requerido, tu territorio esta seguro. + +>[!INFO] El poder se regenera pasivamente a 0.1 por minuto mientras estas en linea. A esa tasa, recuperar 1.0 de poder toma aproximadamente 10 minutos. + +--- + +## Consultar Tu Poder `/f power` -Consulta tu poder y el total de tu faccion. -El poder se regenera estando conectado y disminuye al morir. -> Si los reclamos superan el poder, eres vulnerable! +Muestra tu poder personal, el poder total de tu faccion y cuanto se necesita para mantener los reclamos actuales. + +## La Zona de Peligro + +Si el poder total cae **por debajo** de la cantidad requerida para tus reclamos, tu faccion se vuelve vulnerable. Los enemigos pueden usar `/f overclaim` para robar tus chunks. + +>[!WARNING] Multiples muertes en un corto periodo pueden escalar rapidamente. Si tienes 5 miembros cada uno con 10 de poder (50 total) y 20 reclamos (40 necesarios), solo 5 muertes en tu equipo te bajan a 45 -- aun seguro. Pero 11 muertes te ponen en 39, por debajo del umbral de 40. + +>[!TIP] Manten un margen de poder. No reclames cada chunk que puedas costear -- deja espacio para algunas muertes sin volverte vulnerable. diff --git a/src/main/resources/Server/Languages/es-ES/help/quick_ref/all_commands.md b/src/main/resources/Server/Languages/es-ES/help/quick_ref/all_commands.md index 458823f4..a6af93f5 100644 --- a/src/main/resources/Server/Languages/es-ES/help/quick_ref/all_commands.md +++ b/src/main/resources/Server/Languages/es-ES/help/quick_ref/all_commands.md @@ -4,77 +4,91 @@ id: quickref_commands # Todos los Comandos ## Principal -`/f — Abrir menu de faccion (alias: gui, menu)` -`/f help — Abrir este centro de ayuda` -`/f create — Crear una faccion` -`/f disband — Disolver tu faccion (Lider)` -`/f leave — Abandonar tu faccion` - -## Miembros -`/f invite — Invitar jugador (Oficial+)` -`/f accept [faccion] — Aceptar invitacion (alias: join)` -`/f request — Solicitar unirse` -`/f kick — Expulsar miembro (Oficial+)` -`/f promote — Promover a Oficial (Lider)` -`/f demote — Degradar a Miembro (Lider)` -`/f transfer — Transferir liderazgo` + +| Comando | Descripcion | Rol | +|---------|-------------|-----| +| /f | Abrir menu de faccion | Cualquiera | +| /f help | Abrir centro de ayuda | Cualquiera | +| /f create (name) | Crear una faccion | Cualquiera | +| /f disband | Eliminar tu faccion | Lider | +| /f leave | Abandonar tu faccion | Cualquiera | + +## Membresia + +| Comando | Descripcion | Rol | +|---------|-------------|-----| +| /f invite (player) | Invitar a un jugador | Oficial+ | +| /f accept [faction] | Aceptar una invitacion | Cualquiera | +| /f request (faction) | Solicitar unirse | Cualquiera | +| /f kick (player) | Remover a un miembro | Oficial+ | +| /f promote (player) | Promover a Oficial | Lider | +| /f demote (player) | Degradar a Miembro | Lider | +| /f transfer (player) | Transferir liderazgo | Lider | ## Territorio -`/f claim — Reclamar chunk actual (Oficial+)` -`/f unclaim — Liberar chunk actual (Oficial+)` -`/f overclaim — Tomar chunk de faccion debilitada` -`/f map — Abrir mapa de territorio` + +| Comando | Descripcion | Rol | +|---------|-------------|-----| +| /f claim | Reclamar chunk actual | Oficial+ | +| /f unclaim | Liberar chunk actual | Oficial+ | +| /f overclaim | Tomar chunk debilitado | Oficial+ | +| /f map | Abrir mapa de territorio | Cualquiera | ## Teletransporte -`/f home — Teletransportarse al hogar de faccion` -`/f sethome — Establecer hogar de faccion (Oficial+)` -`/f delhome — Eliminar hogar de faccion (Oficial+)` -`/f stuck — Escapar de territorio enemigo` + +| Comando | Descripcion | Rol | +|---------|-------------|-----| +| /f home | Teletransportarse al hogar de faccion | Cualquiera | +| /f sethome | Establecer hogar de faccion | Oficial+ | +| /f delhome | Eliminar hogar de faccion | Oficial+ | +| /f stuck | Escapar de territorio enemigo | Cualquiera | ## Informacion -`/f info [faccion] — Ver detalles de faccion` -`/f list — Explorar todas las facciones` -`/f members — Ver lista de miembros` -`/f who [jugador] — Ver info de jugador` -`/f power [jugador] — Consultar niveles de poder` -`/f invites — Gestionar invitaciones/solicitudes` -`/f relations — Ver relaciones diplomaticas` + +| Comando | Descripcion | Rol | +|---------|-------------|-----| +| /f info [faction] | Ver detalles de faccion | Cualquiera | +| /f list | Explorar todas las facciones | Cualquiera | +| /f members | Ver lista de miembros | Cualquiera | +| /f who [player] | Ver info de jugador | Cualquiera | +| /f power [player] | Consultar niveles de poder | Cualquiera | +| /f invites | Gestionar invitaciones/solicitudes | Cualquiera | +| /f relations | Ver relaciones diplomaticas | Cualquiera | ## Diplomacia -`/f ally — Solicitar alianza (Oficial+)` -`/f enemy — Declarar enemigo (Oficial+)` -`/f neutral — Restablecer a neutral` - -## Ajustes -`/f settings — Abrir GUI de ajustes (Oficial+)` -`/f rename — Renombrar faccion (Lider)` -`/f desc [texto] — Establecer descripcion (Oficial+)` -`/f color — Establecer color de faccion (Oficial+)` -`/f open — Permitir que cualquiera se una (Lider)` -`/f close — Requerir invitacion (Lider)` + +| Comando | Descripcion | Rol | +|---------|-------------|-----| +| /f ally (faction) | Solicitar alianza | Oficial+ | +| /f enemy (faction) | Declarar enemigo | Oficial+ | +| /f neutral (faction) | Restablecer a neutral | Oficial+ | + +## Configuracion + +| Comando | Descripcion | Rol | +|---------|-------------|-----| +| /f settings | Abrir interfaz de configuracion | Oficial+ | +| /f rename (name) | Renombrar faccion | Lider | +| /f desc [text] | Establecer descripcion | Oficial+ | +| /f color (code) | Establecer color de faccion | Oficial+ | +| /f open | Permitir que cualquiera se una | Lider | +| /f close | Requerir invitacion | Lider | ## Economia -`/f balance — Ver tesoreria` -`/f deposit — Depositar fondos` -`/f withdraw — Retirar (Oficial+)` -`/f money transfer — Transferir` -`/f money log [pagina] — Historial de transacciones` + +| Comando | Descripcion | Rol | +|---------|-------------|-----| +| /f balance | Ver tesoreria | Cualquiera | +| /f deposit (amount) | Depositar fondos | Cualquiera | +| /f withdraw (amount) | Retirar fondos | Oficial+ | +| /f money transfer (faction) (amt) | Transferir fondos | Oficial+ | +| /f money log [page] | Historial de transacciones | Oficial+ | ## Chat -`/f c — Ciclo: Normal > Faccion > Aliado` -`/f c f — Chat de faccion` -`/f c a — Chat de aliados` -`/f c off — Chat publico` - -## Admin (requiere hyperfactions.admin) -`/f admin — Abrir panel de administracion` -`/f admin reload — Recargar configuracion` -`/f admin sync — Sincronizar datos de faccion` -`/f admin factions — Gestion de facciones` -`/f admin config — Editor de configuracion` -`/f admin zones — Gestion de zonas` -`/f admin backup create — Crear respaldo` -`/f admin backup restore — Restaurar respaldo` -`/f admin safezone — Crear SafeZone` -`/f admin warzone — Crear WarZone` -`/f admin debug toggle — Registro de depuracion` + +| Comando | Descripcion | Rol | +|---------|-------------|-----| +| /f c | Cambiar modo de chat | Cualquiera | +| /f c f | Establecer chat de faccion | Cualquiera | +| /f c a | Establecer chat de aliados | Cualquiera | +| /f c off | Establecer chat publico | Cualquiera | diff --git a/src/main/resources/Server/Languages/es-ES/help/quick_ref/permissions.md b/src/main/resources/Server/Languages/es-ES/help/quick_ref/permissions.md new file mode 100644 index 00000000..af11139c --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/quick_ref/permissions.md @@ -0,0 +1,71 @@ +--- +id: quickref_permissions +--- +# Permisos + +Nodos de permisos clave para HyperFactions. Todos +los nodos estan bajo el espacio de nombres raiz +**hyperfactions**. + +## Permisos Principales + +| Permiso | Descripcion | +|---------|-------------| +| hyperfactions.use | Acceso a comandos basicos de faccion | +| hyperfactions.faction.create | Crear una nueva faccion | +| hyperfactions.faction.disband | Disolver tu faccion | + +## Membresia + +| Permiso | Descripcion | +|---------|-------------| +| hyperfactions.member.invite | Invitar jugadores | +| hyperfactions.member.kick | Expulsar miembros | +| hyperfactions.member.promote | Promover miembros | + +## Territorio + +| Permiso | Descripcion | +|---------|-------------| +| hyperfactions.territory.claim | Reclamar chunks | +| hyperfactions.territory.unclaim | Liberar chunks | +| hyperfactions.territory.overclaim | Sobrereclamar territorio debilitado | + +## Teletransporte + +| Permiso | Descripcion | +|---------|-------------| +| hyperfactions.teleport.home | Usar hogar de faccion | +| hyperfactions.teleport.sethome | Establecer hogar de faccion | +| hyperfactions.teleport.stuck | Usar teletransporte de emergencia | + +## Diplomacia y Chat + +| Permiso | Descripcion | +|---------|-------------| +| hyperfactions.relation.ally | Gestionar alianzas | +| hyperfactions.relation.enemy | Declarar enemigos | +| hyperfactions.chat.faction | Usar chat de faccion | +| hyperfactions.chat.ally | Usar chat de aliados | + +## Informacion y Economia + +| Permiso | Descripcion | +|---------|-------------| +| hyperfactions.info.show | Ver informacion de faccion | +| hyperfactions.info.list | Explorar facciones | +| hyperfactions.economy.deposit | Depositar en tesoreria | +| hyperfactions.economy.withdraw | Retirar de tesoreria | + +## Permisos de Bypass + +| Permiso | Descripcion | +|---------|-------------| +| hyperfactions.bypass.* | Saltar todas las restricciones | +| hyperfactions.bypass.combat | Saltar etiqueta de combate | +| hyperfactions.bypass.power | Saltar limites de poder | +| hyperfactions.bypass.territory | Saltar proteccion de territorio | + +>[!INFO] Los administradores pueden otorgar hyperfactions.* para dar acceso a todos los permisos de una vez. + +>[!NOTE] Algunos permisos estan restringidos por el rol de faccion independientemente de los nodos de permiso. Por ejemplo, solo los Oficiales pueden reclamar incluso teniendo el permiso. diff --git a/src/main/resources/Server/Languages/es-ES/help/welcome/getting_started.md b/src/main/resources/Server/Languages/es-ES/help/welcome/getting_started.md index d905ff5d..31958ee8 100644 --- a/src/main/resources/Server/Languages/es-ES/help/welcome/getting_started.md +++ b/src/main/resources/Server/Languages/es-ES/help/welcome/getting_started.md @@ -4,14 +4,35 @@ commands: gui, menu --- # Primeros Pasos -Listo para empezar? Asi se hace: +Bienvenido a HyperFactions! Aqui te explicamos como empezar en unos pocos pasos. -`/f` -Abre el menu de faccion. Explora facciones, crea -la tuya o revisa invitaciones. +--- + +## Paso 1: Abre el Menu de Faccion + +Escribe `/f` para abrir la interfaz principal de facciones. Este es tu centro para todo -- explorar facciones, crear la tuya y gestionar invitaciones. + +## Paso 2: Elige Tu Camino + +| Opcion | Como | +|--------|------| +| **Explorar facciones abiertas** | Haz clic en *Explorar* en el menu y presiona *Unirse* en cualquier faccion abierta. | +| **Aceptar una invitacion** | Revisa la pestana *Invitaciones*. Si alguien te invito, haz clic en *Aceptar*. | +| **Crear la tuya** | Haz clic en *Crear Faccion*, elige un nombre, y seras el Lider. | + +## Paso 3: Explora Tu Faccion + +Una vez que estes en una faccion, veras el **Panel de Faccion** con tu lista de miembros, mapa de territorio, relaciones y configuraciones. + +>[!TIP] Si eres nuevo, intenta unirte a una faccion existente primero. Aprenderas mas rapido con miembros experimentados a tu alrededor. + +--- + +## Primeros Comandos Esenciales -Si te invitaron, revisa la pestana de Invitaciones -y acepta. Si no, busca facciones abiertas o crea -una nueva. +- `/f` -- Abre la interfaz de facciones +- `/f home` -- Teletransportate al hogar de tu faccion +- `/f c` -- Cambia el modo de chat entre Normal, Faccion y Aliado +- `/f map` -- Ver el mapa de territorio a tu alrededor -> Una vez dentro, explora el territorio y empieza a reclamar! +>[!TIP] Tambien puedes escribir `/f help` en el chat para una referencia rapida de comandos en cualquier momento. diff --git a/src/main/resources/Server/Languages/es-ES/help/welcome/quick_tips.md b/src/main/resources/Server/Languages/es-ES/help/welcome/quick_tips.md index da32d018..8a81ad9e 100644 --- a/src/main/resources/Server/Languages/es-ES/help/welcome/quick_tips.md +++ b/src/main/resources/Server/Languages/es-ES/help/welcome/quick_tips.md @@ -3,16 +3,42 @@ id: welcome_tips --- # Consejos Rapidos -## Reclamar Tierra -`/f claim` -Protege el chunk en el que te encuentras. +Consejos utiles organizados por categoria para ayudarte a prosperar. -## Hogar de Faccion -`/f home` -Teletransportate al hogar de faccion. Establece con /f sethome. +--- + +## Territorio + +- Reclama tierra alrededor de tu base temprano con `/f claim` -- las construcciones sin reclamar no tienen **ninguna proteccion** +- Cada reclamo cuesta **2.0 de poder** para mantener, asi que no te expandas mas alla de lo que tus miembros pueden soportar +- Usa `/f map` para explorar reclamos cercanos y encontrar lugares seguros para construir +- Desreclama chunks que ya no necesites con `/f unclaim` para liberar poder + +## Combate + +- Morir cuesta **1.0 de poder** -- evita peleas innecesarias cuando tu faccion esta cerca de su limite de reclamos +- Tienes **5 segundos de proteccion de aparicion** despues de reaparecer +- La etiqueta de combate dura **15 segundos** -- desconectarte mientras estas etiquetado cuesta poder extra +- El fuego amigo esta **desactivado** entre miembros de faccion y aliados por defecto + +>[!WARNING] Desconectarte mientras estas etiquetado en combate causa perdida de poder adicional (1.0 por desconexion). Quedate y pelea o escapa primero. + +## Social + +- Usa `/f c` para cambiar entre modos de chat para que la conversacion de faccion sea privada +- Invita a jugadores de confianza con `/f invite ` -- las invitaciones expiran despues de **5 minutos** +- Forma alianzas con `/f ally ` para proteccion mutua y visibilidad compartida en el mapa +- Revisa `/f relations` para ver tu estado diplomatico completo + +## Economia + +>[!TIP] Si el servidor tiene economia habilitada, tu faccion puede acumular una tesoreria. Los miembros pueden depositar, pero solo los Oficiales y Lideres pueden retirar o transferir fondos. + +- Deposita fondos con la interfaz de tesoreria para fortalecer tu faccion +- Una faccion mas rica puede costear mas reclamos y recuperarse de contratiempos mas rapido -## Chat de Faccion -`/f c` -Cambia el modo de chat: Normal > Faccion > Aliado. +## General -> Morir cuesta poder, debilitando tu control territorial! +- Escribe `/f` en cualquier momento para abrir tu panel de faccion -- todo es accesible desde ahi +- Promueve a miembros activos a Oficial para que puedan ayudar a reclamar y gestionar territorio +- Manten tu faccion activa -- el poder solo se regenera mientras los jugadores estan **en linea** diff --git a/src/main/resources/Server/Languages/es-ES/help/welcome/what_are_factions.md b/src/main/resources/Server/Languages/es-ES/help/welcome/what_are_factions.md index d31c5ee9..30d16b6a 100644 --- a/src/main/resources/Server/Languages/es-ES/help/welcome/what_are_factions.md +++ b/src/main/resources/Server/Languages/es-ES/help/welcome/what_are_factions.md @@ -1,15 +1,37 @@ --- id: welcome_what --- -# Que son las Facciones? +# Que Son las Facciones? -Las facciones son equipos de jugadores que reclaman -territorio, construyen bases y crecen juntos. +Las facciones son **equipos dirigidos por jugadores** que reclaman territorio, construyen bases y compiten por el dominio. Cuando te unes o creas una faccion, obtienes acceso a tierras protegidas, un hogar compartido, chat privado y herramientas diplomaticas. -Como miembro obtienes tierra protegida, un hogar de -faccion, chat privado y relaciones diplomaticas. +>[!TIP] Las facciones se tratan de trabajo en equipo. Cuantos mas miembros activos tengas, mas fuerte sera tu faccion. -La fuerza se mide por poder. Los miembros activos -generan poder; morir lo reduce. Si el poder cae -por debajo de tus reclamos, los enemigos pueden -robar territorio. +--- + +## Mecanicas Principales + +| Mecanica | Que Hace | +|----------|----------| +| **Poder** | Cada jugador genera poder con el tiempo (max 20). El poder total de tu faccion determina cuanta tierra puedes mantener. | +| **Reclamos** | Los chunks reclamados estan protegidos -- solo los miembros pueden construir, destruir o abrir contenedores dentro de ellos. Cada reclamo cuesta 2.0 de poder para mantener. | +| **Relaciones** | Las facciones pueden formar **alianzas** para proteccion mutua o declarar **enemigos** para habilitar PvP y agresion territorial. | +| **Roles** | Tres rangos -- Lider, Oficial, Miembro -- cada uno con diferentes capacidades. | + +--- + +## Como Funciona la Fuerza + +La fuerza de tu faccion proviene de sus miembros. Cada jugador comienza con **10 de poder** y regenera hasta **20** mientras esta en linea. Morir cuesta poder. Si el poder total de tu faccion cae por debajo del costo de tus reclamos, los enemigos pueden **sobrereclamar** tu territorio. + +>[!WARNING] Una sola muerte cuesta 1.0 de poder. Multiples muertes en poco tiempo pueden dejar a tu faccion vulnerable a sobrereclamaciones. + +--- + +## Diplomacia en Resumen + +- **Aliados** -- Acuerdos mutuos que previenen el fuego amigo y protegen el territorio del otro +- **Enemigos** -- Declaraciones unilaterales que habilitan PvP en las tierras del otro y permiten sobrereclamar +- **Neutral** -- El estado predeterminado entre todas las facciones con reglas estandar + +>[!INFO] Puedes gestionar todo esto a traves de la interfaz del juego escribiendo `/f` o mediante comandos de chat. diff --git a/src/main/resources/Server/Languages/es-ES/help/your_faction/creating.md b/src/main/resources/Server/Languages/es-ES/help/your_faction/creating.md index bf723183..b6e7c940 100644 --- a/src/main/resources/Server/Languages/es-ES/help/your_faction/creating.md +++ b/src/main/resources/Server/Languages/es-ES/help/your_faction/creating.md @@ -4,10 +4,35 @@ commands: create --- # Crear una Faccion -Crear una faccion te convierte en Lider con -control total sobre ajustes, miembros y tierra. +Iniciar tu propia faccion te convierte en el **Lider** con control total sobre configuraciones, miembros y territorio. -`/f create ` -Crea una faccion y abre tu panel de control. +--- + +## Como Crear + +`/f create ` + +Esto crea tu faccion e inmediatamente abre el **Panel de Faccion** donde puedes comenzar a invitar miembros, reclamar tierra y configurar ajustes. + +## Reglas de Nombre + +| Regla | Requisito | +|-------|-----------| +| **Longitud** | Entre **3** y **24** caracteres | +| **Caracteres** | Solo letras, numeros y espacios (alfanumerico) | +| **Unicidad** | Dos facciones no pueden compartir el mismo nombre | + +>[!WARNING] Elige tu nombre con cuidado. Renombrar despues requiere permisos de Lider y puede tener un tiempo de espera. + +--- + +## Que Ocurre al Crear + +- Te conviertes en el **Lider** (rango mas alto) +- Tu faccion comienza con **0 reclamos** y tu poder personal (10 por defecto) +- El panel de faccion se abre automaticamente +- Puedes inmediatamente invitar jugadores, reclamar territorio y establecer un hogar de faccion + +>[!INFO] Si el servidor tiene integracion de economia habilitada, crear una faccion puede costar dinero. El costo de creacion lo establece el administrador del servidor. -> Invita amigos, reclama tierra y empieza a construir! +>[!TIP] Despues de crear, tus primeras prioridades deben ser: invitar amigos con `/f invite `, encontrar una ubicacion para la base, y reclamarla con `/f claim`. diff --git a/src/main/resources/Server/Languages/es-ES/help/your_faction/joining.md b/src/main/resources/Server/Languages/es-ES/help/your_faction/joining.md index fb3865d9..018d8c33 100644 --- a/src/main/resources/Server/Languages/es-ES/help/your_faction/joining.md +++ b/src/main/resources/Server/Languages/es-ES/help/your_faction/joining.md @@ -4,14 +4,33 @@ commands: accept, join, request --- # Unirse a una Faccion -Tres formas de unirse a una faccion existente: +Hay tres formas de unirse a una faccion existente, dependiendo de como esta configurada la faccion. -## Explorar Facciones Abiertas -Abre /f y haz clic en Explorar. Haz clic en Unirse en cualquier faccion abierta. +--- + +## Metodos Comparados + +| Metodo | Como Funciona | Requiere | +|--------|---------------|----------| +| **Explorar y Unirse** | Abre `/f`, haz clic en *Explorar*, y presiona *Unirse* en una faccion abierta | La faccion debe estar en modo **abierto** | +| **Aceptar Invitacion** | Un Oficial o Lider de la faccion te envia una invitacion; aceptala desde la pestana *Invitaciones* en `/f` | Una invitacion activa | +| **Solicitar Unirse** | Envia una solicitud a una faccion cerrada con `/f request ` | Un Oficial o Lider para aprobar | + +--- + +## Detalles de Invitacion + +- Las invitaciones son enviadas por Oficiales o Lideres usando `/f invite ` +- Las invitaciones expiran despues de **5 minutos** -- acepta pronto +- Ve tus invitaciones pendientes en la pestana *Invitaciones* del menu de faccion (`/f`) +- Acepta con la interfaz o `/f accept ` + +## Solicitudes de Union + +- Usa `/f request ` para solicitar membresia en una faccion cerrada +- Las solicitudes expiran despues de **24 horas** si no se actua sobre ellas +- Los Oficiales y Lideres pueden aprobar o rechazar solicitudes desde el panel de faccion -## Aceptar una Invitacion -Revisa la pestana de Invitaciones y haz clic en Aceptar. +>[!TIP] No sabes a que faccion unirte? Usa la pestana Explorar en `/f` para ver descripciones de facciones, cantidad de miembros y si son abiertas o solo por invitacion. -## Solicitar Unirse -`/f request ` -Envia una solicitud a una faccion solo por invitacion. +>[!NOTE] Cada faccion puede tener hasta **50 miembros** por defecto. Si una faccion esta llena, tendras que esperar a que se abra un lugar. diff --git a/src/main/resources/Server/Languages/es-ES/help/your_faction/managing.md b/src/main/resources/Server/Languages/es-ES/help/your_faction/managing.md index a21c51e8..74838462 100644 --- a/src/main/resources/Server/Languages/es-ES/help/your_faction/managing.md +++ b/src/main/resources/Server/Languages/es-ES/help/your_faction/managing.md @@ -4,19 +4,41 @@ commands: invite, kick, promote, demote, transfer --- # Gestionar Miembros -Los Oficiales y Lideres gestionan la lista: +Los Oficiales y Lideres comparten la responsabilidad de gestionar la lista de miembros de la faccion. Aqui estan los comandos clave y quien puede usarlos. -`/f invite ` -Envia una invitacion. (Oficial+) +--- + +## Comandos + +| Comando | Que Hace | Rol Requerido | +|---------|----------|---------------| +| `/f invite ` | Envia una invitacion (expira en 5 min) | Oficial+ | +| `/f kick ` | Remueve a un miembro de la faccion | Oficial+ (ver nota) | +| `/f promote ` | Promueve un Miembro a Oficial | Solo Lider | +| `/f demote ` | Degrada un Oficial a Miembro | Solo Lider | +| `/f transfer ` | Transfiere la propiedad de la faccion | Solo Lider | + +>[!NOTE] Los Oficiales solo pueden expulsar **Miembros**. Para remover a otro Oficial, el Lider debe degradarlo primero o expulsarlo directamente. + +--- + +## Invitaciones + +- Las invitaciones expiran despues de **5 minutos** si no son aceptadas +- El jugador invitado las ve en su pestana de Invitaciones cuando abre `/f` +- No hay limite de cuantas invitaciones puedes enviar a la vez +- Tu faccion puede tener hasta **50 miembros** en total + +## Promociones y Degradaciones + +- Solo el **Lider** puede promover o degradar +- `/f promote ` eleva a un Miembro a Oficial +- `/f demote ` baja a un Oficial de vuelta a Miembro -`/f kick ` -Expulsa a un miembro. Los Oficiales expulsan Miembros; los Lideres a todos. +## Transferir Liderazgo -`/f promote ` -Promueve un Miembro a Oficial. (Solo Lider) +>[!WARNING] Transferir el liderazgo es **irreversible**. Seras degradado a Oficial y el jugador objetivo se convierte en el nuevo Lider. Asegurate de confiar completamente en el. -`/f demote ` -Degrada un Oficial a Miembro. (Solo Lider) +`/f transfer ` -`/f transfer ` -> Transfiere el liderazgo. Te conviertes en Oficial. No se puede deshacer! +El objetivo debe ser un miembro actual de tu faccion. diff --git a/src/main/resources/Server/Languages/es-ES/help/your_faction/roles.md b/src/main/resources/Server/Languages/es-ES/help/your_faction/roles.md index b8b72fa3..6be4f190 100644 --- a/src/main/resources/Server/Languages/es-ES/help/your_faction/roles.md +++ b/src/main/resources/Server/Languages/es-ES/help/your_faction/roles.md @@ -3,14 +3,42 @@ id: faction_roles --- # Roles y Rangos -Tres rangos con diferentes capacidades: +Cada faccion tiene tres roles en una jerarquia estricta. Los roles superiores heredan todas las capacidades de los roles inferiores. -## Lider (1 por faccion) -Control total: disolver, transferir liderazgo, -promover/degradar, mas todos los permisos de Oficial. +--- + +## Desglose de Permisos + +| Accion | Lider | Oficial | Miembro | +|--------|-------|---------|---------| +| Construir en territorio | S | S | S | +| Usar hogar de faccion | S | S | S | +| Chat de faccion y aliados | S | S | S | +| Invitar jugadores | S | S | N | +| Expulsar miembros | S | S (Solo Miembros) | N | +| Reclamar / desreclamar tierra | S | S | N | +| Sobrereclamar territorio enemigo | S | S | N | +| Establecer hogar de faccion | S | S | N | +| Eliminar hogar de faccion | S | S | N | +| Gestionar relaciones (aliado/enemigo) | S | S | N | +| Ver registros de faccion | S | S | N | +| Promover a Oficial | S | N | N | +| Degradar de Oficial | S | N | N | +| Renombrar faccion | S | N | N | +| Establecer descripcion / etiqueta / color | S | N | N | +| Abrir / cerrar faccion | S | N | N | +| Acceder a configuracion de faccion | S | N | N | +| Transferir liderazgo | S | N | N | +| Disolver faccion | S | N | N | + +>[!NOTE] Los Oficiales pueden expulsar **Miembros** pero no pueden expulsar a otros Oficiales. Solo el Lider puede remover Oficiales. + +--- + +## Detalles de Roles -## Oficial -Invitar/expulsar, reclamar/liberar, establecer hogar, relaciones. +- **Lider** -- Uno por faccion. Tiene control total sobre todas las configuraciones, miembros y territorio. Puede transferir la propiedad a otro miembro. +- **Oficial** -- Miembros de confianza que ayudan a gestionar la faccion. Pueden invitar, expulsar miembros, reclamar tierra y manejar la diplomacia. +- **Miembro** -- El rol predeterminado al unirse. Puede construir en territorio, usar el hogar de faccion y participar en el chat de faccion. -## Miembro -Usar hogar de faccion, chat, construir en territorio. +>[!TIP] Promueve a tus miembros mas activos y confiables a Oficial para que puedan ayudar a gestionar el territorio y reclutar nuevos jugadores. From 436c1248fd6b47326724d69f35bdd91912e7d880 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Tue, 10 Mar 2026 14:55:13 -0700 Subject: [PATCH 42/55] feat: add Spanish admin help translations (es-ES), remove placeholder languages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add 18 es-ES admin help topics mirroring en-US structure. Remove de-DE, fr-FR, ja-JP, pt-BR, ru-RU, tr-TR, zh-CN placeholder translations — will be regenerated later with complete content. --- .../Server/Languages/de-DE/hyperfactions.lang | 452 ------------------ .../Languages/de-DE/hyperfactions_admin.lang | 268 ----------- .../Languages/de-DE/hyperfactions_gui.lang | 446 ----------------- .../help/admin/admin_config/configuration.md | 42 ++ .../help/admin/admin_config/world_settings.md | 47 ++ .../admin_economy/treasury_management.md | 40 ++ .../admin/admin_economy/upkeep_management.md | 48 ++ .../help/admin/admin_factions/disbanding.md | 39 ++ .../admin/admin_factions/managing_factions.md | 43 ++ .../help/admin/admin_maintenance/backups.md | 49 ++ .../help/admin/admin_maintenance/imports.md | 49 ++ .../help/admin/admin_maintenance/updates.md | 48 ++ .../admin/admin_overview/getting_started.md | 44 ++ .../help/admin/admin_overview/permissions.md | 41 ++ .../help/admin/admin_power/power_commands.md | 41 ++ .../help/admin/admin_power/power_overrides.md | 60 +++ .../admin/admin_reference/all_commands.md | 66 +++ .../admin/admin_reference/integrations.md | 47 ++ .../help/admin/admin_zones/zone_basics.md | 47 ++ .../help/admin/admin_zones/zone_commands.md | 44 ++ .../help/admin/admin_zones/zone_flags.md | 44 ++ .../Server/Languages/fr-FR/hyperfactions.lang | 452 ------------------ .../Languages/fr-FR/hyperfactions_admin.lang | 268 ----------- .../Languages/fr-FR/hyperfactions_gui.lang | 446 ----------------- .../Server/Languages/ja-JP/hyperfactions.lang | 452 ------------------ .../Languages/ja-JP/hyperfactions_admin.lang | 268 ----------- .../Languages/ja-JP/hyperfactions_gui.lang | 446 ----------------- .../Server/Languages/pt-BR/hyperfactions.lang | 452 ------------------ .../Languages/pt-BR/hyperfactions_admin.lang | 268 ----------- .../Languages/pt-BR/hyperfactions_gui.lang | 446 ----------------- .../Server/Languages/ru-RU/hyperfactions.lang | 452 ------------------ .../Languages/ru-RU/hyperfactions_admin.lang | 268 ----------- .../Languages/ru-RU/hyperfactions_gui.lang | 446 ----------------- .../Server/Languages/tr-TR/hyperfactions.lang | 452 ------------------ .../Languages/tr-TR/hyperfactions_admin.lang | 268 ----------- .../Languages/tr-TR/hyperfactions_gui.lang | 446 ----------------- .../Server/Languages/zh-CN/hyperfactions.lang | 452 ------------------ .../Languages/zh-CN/hyperfactions_admin.lang | 268 ----------- .../Languages/zh-CN/hyperfactions_gui.lang | 446 ----------------- 39 files changed, 839 insertions(+), 8162 deletions(-) delete mode 100644 src/main/resources/Server/Languages/de-DE/hyperfactions.lang delete mode 100644 src/main/resources/Server/Languages/de-DE/hyperfactions_admin.lang delete mode 100644 src/main/resources/Server/Languages/de-DE/hyperfactions_gui.lang create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_config/configuration.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_config/world_settings.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/treasury_management.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/upkeep_management.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/disbanding.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/managing_factions.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/backups.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/imports.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/updates.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/getting_started.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/permissions.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_commands.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_overrides.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/all_commands.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/integrations.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_basics.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_commands.md create mode 100644 src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_flags.md delete mode 100644 src/main/resources/Server/Languages/fr-FR/hyperfactions.lang delete mode 100644 src/main/resources/Server/Languages/fr-FR/hyperfactions_admin.lang delete mode 100644 src/main/resources/Server/Languages/fr-FR/hyperfactions_gui.lang delete mode 100644 src/main/resources/Server/Languages/ja-JP/hyperfactions.lang delete mode 100644 src/main/resources/Server/Languages/ja-JP/hyperfactions_admin.lang delete mode 100644 src/main/resources/Server/Languages/ja-JP/hyperfactions_gui.lang delete mode 100644 src/main/resources/Server/Languages/pt-BR/hyperfactions.lang delete mode 100644 src/main/resources/Server/Languages/pt-BR/hyperfactions_admin.lang delete mode 100644 src/main/resources/Server/Languages/pt-BR/hyperfactions_gui.lang delete mode 100644 src/main/resources/Server/Languages/ru-RU/hyperfactions.lang delete mode 100644 src/main/resources/Server/Languages/ru-RU/hyperfactions_admin.lang delete mode 100644 src/main/resources/Server/Languages/ru-RU/hyperfactions_gui.lang delete mode 100644 src/main/resources/Server/Languages/tr-TR/hyperfactions.lang delete mode 100644 src/main/resources/Server/Languages/tr-TR/hyperfactions_admin.lang delete mode 100644 src/main/resources/Server/Languages/tr-TR/hyperfactions_gui.lang delete mode 100644 src/main/resources/Server/Languages/zh-CN/hyperfactions.lang delete mode 100644 src/main/resources/Server/Languages/zh-CN/hyperfactions_admin.lang delete mode 100644 src/main/resources/Server/Languages/zh-CN/hyperfactions_gui.lang diff --git a/src/main/resources/Server/Languages/de-DE/hyperfactions.lang b/src/main/resources/Server/Languages/de-DE/hyperfactions.lang deleted file mode 100644 index 9177f8ff..00000000 --- a/src/main/resources/Server/Languages/de-DE/hyperfactions.lang +++ /dev/null @@ -1,452 +0,0 @@ -# Language: German (de-DE) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with German translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions - English Translations -# Format: key = value (or key = "quoted value") -# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule -# Placeholders: {0}, {1}, etc. - -# ========== Common ========== -common.no_permission = You don't have permission to do that. -common.not_in_faction = You are not in a faction. -common.already_in_faction = You are already in a faction. -common.player_not_found = Player not found. -common.faction_not_found = Faction not found. -common.player_not_online = That player is not online. -common.must_be_leader = Only the faction leader can do that. -common.must_be_officer = You must be an Officer or Leader to do that. -common.combat_tagged = You can't do that while combat tagged. -common.cancel = Cancel -common.confirm = Confirm -common.save = Save -common.close = Close -common.yes = Yes -common.no = No -common.loading = Loading... -common.online = Online -common.offline = Offline -common.enabled = Enabled -common.disabled = Disabled -common.none = None -common.page = Page {0} of {1} -common.unknown = Unknown -common.error_generic = Something went wrong. Please try again. -common.gui_fallback = Could not access GUI. Use /f help for commands. -common.admin_prefix = [Admin] -common.location_error = Could not determine your location. -common.world_error = Could not determine your world. -common.invalid_id = Invalid faction ID. -common.na = N/A - -# ========== Commands - Create ========== -cmd.create.no_permission = You don't have permission to create factions. -cmd.create.usage = Usage: /f create -cmd.create.success = Faction '{0}' created! -cmd.create.already_in_named = You are already in {0}. -cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. -cmd.create.name_taken = That faction name is already taken. -cmd.create.name_too_short = Faction name is too short. -cmd.create.name_too_long = Faction name is too long. -cmd.create.failed = Failed to create faction. - -# ========== Commands - Disband ========== -cmd.disband.no_permission = You don't have permission to disband factions. -cmd.disband.not_leader = Only the faction leader can disband. -cmd.disband.confirm_prompt = Are you sure you want to disband your faction? -cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. -cmd.disband.success = Your faction has been disbanded. -cmd.disband.failed = Failed to disband faction. -cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. - -# ========== Commands - Rename ========== -cmd.rename.no_permission = You don't have permission. -cmd.rename.not_leader = Only the leader can rename the faction. -cmd.rename.usage = Usage: /f rename -cmd.rename.too_short = Name is too short (min {0} chars). -cmd.rename.too_long = Name is too long (max {0} chars). -cmd.rename.name_taken = That name is already taken. -cmd.rename.success = Faction renamed to {0}! -cmd.rename.broadcast = {0} renamed the faction to {1} - -# ========== Commands - Description ========== -cmd.desc.no_permission = You don't have permission. -cmd.desc.not_officer = You must be an officer to set the description. -cmd.desc.set = Faction description set! -cmd.desc.cleared = Faction description cleared. - -# ========== Commands - Open / Close ========== -cmd.open.no_permission = You don't have permission. -cmd.open.not_leader = Only the leader can change this setting. -cmd.open.already_open = Your faction is already open. -cmd.open.success = Your faction is now open! Anyone can join with /f join. -cmd.open.broadcast = {0} opened the faction to public joining. -cmd.close.no_permission = You don't have permission. -cmd.close.not_leader = Only the leader can change this setting. -cmd.close.already_closed = Your faction is already closed. -cmd.close.success = Your faction is now invite-only. -cmd.close.broadcast = {0} closed the faction to invite-only. - -# ========== Commands - Color ========== -cmd.color.no_permission = You don't have permission. -cmd.color.not_officer = You must be an officer to change the color. -cmd.color.colors_disabled = Faction colors are disabled. -cmd.color.usage = Usage: /f color -cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex -cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. -cmd.color.success = Faction color updated! - -# ========== Commands - Claim ========== -cmd.claim.no_permission = You don't have permission to claim territory. -cmd.claim.already_yours = Your faction already owns this chunk. -cmd.claim.cannot_claim_ally = You cannot claim ally territory. -cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. -cmd.claim.success = Claimed chunk at {0}, {1}! -cmd.claim.not_officer = You must be an officer to claim land. -cmd.claim.already_claimed = This chunk is already claimed. -cmd.claim.max_claims = Your faction has reached max claims. Get more power! -cmd.claim.not_adjacent = You must claim adjacent to existing territory. -cmd.claim.world_not_allowed = Claiming is not allowed in this world. -cmd.claim.orbisguard = This area is protected by OrbisGuard. -cmd.claim.zone_protected = This chunk is in a safezone or warzone. -cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. -cmd.claim.failed = Failed to claim chunk. - -# ========== Commands - Invite ========== -cmd.invite.no_permission = You don't have permission to invite players. -cmd.invite.not_officer = You must be an officer to invite players. -cmd.invite.usage = Usage: /f invite -cmd.invite.player_not_found = Player '{0}' not found or offline. -cmd.invite.target_in_faction = That player is already in a faction. -cmd.invite.sent = Invited {0} to your faction. -cmd.invite.received = You have been invited to join {0}! -cmd.invite.accept_hint = Type /f accept {0} to join. - -# ========== Commands - Accept / Join ========== -cmd.join.no_permission = You don't have permission to join factions. -cmd.join.already_in_named = You are already in {0}. -cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.join.no_invites = You have no pending invites. -cmd.join.faction_not_found = Faction '{0}' not found. -cmd.join.not_invited = You have no invite from that faction. -cmd.join.faction_gone = That faction no longer exists. -cmd.join.success = You have joined {0}! -cmd.join.broadcast = {0} has joined the faction! -cmd.join.faction_full = That faction is full. -cmd.join.failed = Failed to join faction. - -# ========== Commands - Kick ========== -cmd.kick.no_permission = You don't have permission to kick members. -cmd.kick.usage = Usage: /f kick -cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. -cmd.kick.success = Kicked {0} from the faction. -cmd.kick.broadcast = {0} was kicked from the faction. -cmd.kick.kicked = You have been kicked from the faction. -cmd.kick.cannot_kick_higher = You don't have permission to kick that player. -cmd.kick.cannot_kick_leader = You cannot kick the faction leader. -cmd.kick.failed = Failed to kick player. - -# ========== Commands - Leave ========== -cmd.leave.no_permission = You don't have permission to leave factions. -cmd.leave.confirm_prompt = Are you sure you want to leave your faction? -cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. -cmd.leave.success = You have left your faction. -cmd.leave.broadcast = {0} has left the faction. -cmd.leave.failed = Failed to leave faction. -cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. - -# ========== Commands - Promote / Demote / Transfer ========== -cmd.rank.promote_no_permission = You don't have permission to promote members. -cmd.rank.promote_usage = Usage: /f promote -cmd.rank.promoted = Promoted {0} to {1}! -cmd.rank.promote_broadcast = {0} was promoted to {1}! -cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. -cmd.rank.promote_failed = Failed to promote player. -cmd.rank.demote_no_permission = You don't have permission to demote members. -cmd.rank.demote_usage = Usage: /f demote -cmd.rank.demoted = Demoted {0} to {1}. -cmd.rank.demote_broadcast = {0} was demoted to {1}. -cmd.rank.already_lowest = That player is already a Member. -cmd.rank.demote_failed = Failed to demote player. -cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. -cmd.rank.transfer_usage = Usage: /f transfer -cmd.rank.player_not_in_faction = Player not found in your faction. -cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? -cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. -cmd.rank.transferred = Transferred leadership to {0}! -cmd.rank.transfer_broadcast = {0} is now the faction leader! -cmd.rank.transfer_failed = Failed to transfer leadership. -cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. - -# ========== Commands - Unclaim ========== -cmd.unclaim.no_permission = You don't have permission to unclaim territory. -cmd.unclaim.success = Unclaimed chunk at {0}, {1}. -cmd.unclaim.not_officer = You must be an officer to unclaim land. -cmd.unclaim.chunk_not_claimed = This chunk is not claimed. -cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. -cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. -cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. -cmd.unclaim.failed = Failed to unclaim chunk. - -# ========== Commands - Overclaim ========== -cmd.overclaim.no_permission = You don't have permission to overclaim territory. -cmd.overclaim.success = Overclaimed enemy territory! -cmd.overclaim.not_officer = You must be an officer to overclaim. -cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. -cmd.overclaim.own_chunk = Your faction already owns this chunk. -cmd.overclaim.ally = You cannot overclaim ally territory. -cmd.overclaim.target_has_power = This faction still has enough power. -cmd.overclaim.failed = Failed to overclaim. - -# ========== Commands - Stuck ========== -cmd.stuck.no_permission = You don't have permission to use /f stuck. -cmd.stuck.not_stuck = You're not stuck - this is wilderness. -cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! -cmd.stuck.no_safe = Could not find a safe location. -cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! - -# ========== Commands - Home ========== -cmd.home.no_permission = You don't have permission to teleport to faction home. -cmd.home.no_home = Your faction has no home set. -cmd.home.combat_tagged = You cannot teleport while in combat! -cmd.home.teleported = Teleported to faction home! - -# ========== Commands - SetHome ========== -cmd.sethome.no_permission = You don't have permission to set faction home. -cmd.sethome.world_not_allowed = Cannot set home in this world. -cmd.sethome.not_in_territory = You can only set home in your faction's territory. -cmd.sethome.set = Faction home set! -cmd.sethome.broadcast = {0} set the faction home. -cmd.sethome.not_officer = You must be an officer to set the home. -cmd.sethome.failed = Failed to set home. - -# ========== Commands - DelHome ========== -cmd.delhome.no_permission = You don't have permission to delete faction home. -cmd.delhome.no_home = Your faction does not have a home set. -cmd.delhome.deleted = Faction home deleted! -cmd.delhome.broadcast = {0} deleted the faction home. -cmd.delhome.not_officer = You must be an officer to delete the home. -cmd.delhome.failed = Failed to delete home. - -# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== -cmd.relation.ally_no_permission = You don't have permission to manage alliances. -cmd.relation.ally_usage = Usage: /f ally -cmd.relation.ally_sent = Ally request sent to {0}! -cmd.relation.ally_formed = You are now allies with {0}! -cmd.relation.already_ally = You are already allied with that faction. -cmd.relation.ally_failed = Failed to send ally request. -cmd.relation.enemy_no_permission = You don't have permission to declare enemies. -cmd.relation.enemy_usage = Usage: /f enemy -cmd.relation.enemy_declared = {0} is now your enemy! -cmd.relation.already_enemy = You are already enemies with that faction. -cmd.relation.max_enemies = You have reached the maximum number of enemies. -cmd.relation.enemy_failed = Failed to set enemy. -cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. -cmd.relation.neutral_usage = Usage: /f neutral -cmd.relation.neutral_set = Your faction is now neutral with {0}. -cmd.relation.already_neutral = You are already neutral with that faction. -cmd.relation.neutral_failed = Failed to set neutral. -cmd.relation.cannot_self = You cannot ally with yourself. -cmd.relation.max_allies = You have reached the maximum number of allies. -cmd.relation.view_no_permission = You don't have permission to view relations. -cmd.relation.header = === Faction Relations === -cmd.relation.allies_count = Allies ({0}): -cmd.relation.enemies_count = Enemies ({0}): -cmd.relation.list_entry = - {0} - -# ========== Commands - Chat ========== -cmd.chat.usage = Usage: /f c [f|a|off] -cmd.chat.no_permission = You don't have permission for that chat mode. -cmd.chat.mode_set = Chat mode set to {0} - -# ========== Commands - Invites ========== -cmd.invites.not_officer = You must be an officer to manage invites. -cmd.invites.header = === Faction Invites === -cmd.invites.no_pending = No pending invites or requests. -cmd.invites.outgoing = Outgoing Invites: -cmd.invites.outgoing_entry = {0} (invited by {1}) -cmd.invites.requests = Join Requests: -cmd.invites.request_entry = {0}{1} -cmd.invites.your_invites_header = === Your Invites === -cmd.invites.no_invites = You have no pending invites. -cmd.invites.invite_entry = {0} - Use /f accept {1} - -# ========== Commands - Request ========== -cmd.request.no_permission = You don't have permission to request faction membership. -cmd.request.already_in_named = You are already in {0}. -cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.request.usage = Usage: /f request [message] -cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. -cmd.request.already_requested = You already have a pending request to that faction. -cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. -cmd.request.sent = Sent join request to {0}! -cmd.request.your_message = Your message: "{0}" -cmd.request.officer_review = An officer will review your request. -cmd.request.officer_notify = {0} has requested to join your faction! -cmd.request.officer_review_hint = Use /f gui > Invites to review. - -# ========== Commands - Info ========== -cmd.info.faction_header = === {0} === -cmd.info.player_header = === {0} === -cmd.info.no_permission = You don't have permission to view faction info. -cmd.info.faction_not_found = Faction '{0}' not found. -cmd.info.not_in_faction_hint = You are not in a faction. Use /f info -cmd.info.leader = Leader: {0} -cmd.info.members = Members: {0}/{1} -cmd.info.power = Power: {0} -cmd.info.claims = Claims: {0} -cmd.info.raidable = RAIDABLE! -cmd.info.allies = Allies: {0} -cmd.info.enemies = Enemies: {0} -cmd.info.they_consider = They consider you: {0} -cmd.info.you_consider = You consider them: {0} -cmd.info.members_no_permission = You don't have permission to view faction members. -cmd.info.members_header = === {0} Members ({1}) === -cmd.info.member_online = [Online] -cmd.info.list_no_permission = You don't have permission to view faction list. -cmd.info.list_empty = There are no factions. -cmd.info.list_header = === Factions ({0}) === -cmd.info.list_entry = {0} - {1} members, {2} power -cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] -cmd.info.help_no_permission = You don't have permission to view help. -cmd.info.who_no_permission = You don't have permission to view player info. -cmd.info.who_faction = Faction: {0} -cmd.info.who_role = Role: {0} -cmd.info.who_joined = Joined: {0} -cmd.info.who_faction_none = Faction: None -cmd.info.who_power = Power: {0} -cmd.info.who_status = Status: {0} -cmd.info.who_last_seen = Last seen: {0} -cmd.info.map_no_permission = You don't have permission to view the map. -cmd.info.map_header = === Territory Map === -cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild -cmd.info.map_gui_hint = Use /f gui for interactive map - -# ========== Commands - Power ========== -cmd.power.personal = Personal Power: {0}/{1} -cmd.power.faction = Faction Power: {0}/{1} -cmd.power.death_loss = Death Loss: {0} -cmd.power.regen = Regen Rate: {0}/hr -cmd.power.no_permission = You don't have permission to view power info. -cmd.power.header = {0}'s Power: -cmd.power.current = Current: {0} - -# ========== Commands - Economy ========== -cmd.economy.balance = Balance: {0} -cmd.economy.deposited = Deposited {0} into the faction treasury. -cmd.economy.withdrawn = Withdrew {0} from the faction treasury. -cmd.economy.transferred = Transferred {0} to {1}. -cmd.economy.insufficient = Insufficient funds in faction treasury. -cmd.economy.invalid_amount = Invalid amount: {0} -cmd.economy.economy_disabled = Economy is disabled. -cmd.economy.balance_no_permission = You don't have permission to view balances. -cmd.economy.treasury_unavailable = Treasury is not available. -cmd.economy.balance_display = {0}'s treasury: {1} -cmd.economy.deposit_no_permission = You don't have permission to deposit. -cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. -cmd.economy.deposit_usage = Usage: /f deposit -cmd.economy.amount_positive = Amount must be positive. -cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} -cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. -cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. -cmd.economy.withdraw_no_permission = You don't have permission to withdraw. -cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. -cmd.economy.withdraw_usage = Usage: /f withdraw -cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} -cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. -cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. -cmd.economy.withdraw_failed = Withdrawal failed: {0} -cmd.economy.transfer_no_permission = You don't have permission to transfer. -cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. -cmd.economy.transfer_usage = Usage: /f money transfer -cmd.economy.transfer_self = Cannot transfer to your own faction. -cmd.economy.transfer_limit_denied = Transfer denied: {0} -cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. -cmd.economy.transfer_failed = Transfer failed: {0} -cmd.economy.log_no_permission = You don't have permission to view the transaction log. -cmd.economy.log_header = Transaction Log (page {0}/{1}) -cmd.economy.log_empty = No transactions found. -cmd.economy.money_help_header = Treasury Commands: -cmd.economy.money_help_balance = /f money balance [faction] - View balance -cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury -cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury -cmd.economy.money_help_transfer = /f money transfer - Transfer between factions -cmd.economy.money_help_log = /f money log [page] [type] - View transaction history - -# ========== Protection - Action Phrases ========== -protection.action.generic = You can't do that -protection.action.build = You can't build or break blocks -protection.action.interact = You can't interact with that -protection.action.door = You can't use doors -protection.action.container = You can't open containers -protection.action.bench = You can't use crafting stations -protection.action.processing = You can't use processing stations -protection.action.seat = You can't use seats -protection.action.light = You can't toggle lights -protection.action.teleporter = You can't use teleporters -protection.action.crate = You can't use crates -protection.action.tame = You can't tame creatures -protection.action.npc = You can't interact with NPCs -protection.action.mount = You can't mount creatures -protection.action.pve = You can't damage creatures -protection.action.item_drop = You can't drop items -protection.action.item_pickup = You can't pick up items - -# ========== Protection - Denial Reasons ========== -protection.denied.safezone = {0} in a SafeZone. -protection.denied.warzone = {0} in a WarZone. -protection.denied.enemy_claim = {0} in enemy territory. -protection.denied.claimed = {0} in claimed territory. -protection.denied.here = {0} here. -protection.denied.zone = {0} in this zone. -protection.denied.faction_perm = {0} here. (Faction permission: {1}) -protection.denied.ally_territory = {0} here. (Ally territory) -protection.denied.error = Protection error — action blocked for safety. - -# ========== Protection - PvP ========== -protection.pvp.safezone = PvP is disabled in SafeZones. -protection.pvp.same_faction = You cannot attack faction members. -protection.pvp.ally = You cannot attack allies. -protection.pvp.spawn_protected = That player has spawn protection. -protection.pvp.territory_disabled = PvP is disabled in this territory. -protection.pvp.generic = You cannot attack this player. - -# ========== Protection - Entity Damage ========== -protection.mob_damage_disabled = Mob damage is disabled in this zone. -protection.pve_damage_disabled = PvE damage is disabled in this zone. -protection.pve_territory_denied = You cannot damage mobs in this territory. - -# ========== Protection - Combat Tag ========== -protection.combat_tag_command = You cannot use that command while combat tagged. - -# ========== Server Announcements ========== -# These are broadcast to all online players for significant faction events. -# {0}, {1} = dynamic values (faction names, player names) -server_announce.faction_created = {0} has founded the faction {1}! -server_announce.faction_disbanded = The faction {0} has been disbanded! -server_announce.leadership_transfer = {0} is now the leader of {1}! -server_announce.overclaim = {0} has overclaimed territory from {1}! -server_announce.war_declared = {0} has declared war on {1}! -server_announce.alliance_formed = {0} and {1} are now allies! -server_announce.alliance_broken = {0} and {1} are no longer allies! - -# ========== Teleport System ========== -teleport.cooldown_wait = You must wait {0} before teleporting again. -teleport.warmup_start = Teleporting to faction home in {0} seconds... -teleport.combat_cancelled = Teleportation cancelled - you are in combat! -teleport.success_default = Teleported to faction home! -teleport.no_home = Your faction has no home set. -teleport.world_not_found = World not found. -teleport.failed = Teleportation failed. -teleport.countdown = Teleporting in {0} seconds... -teleport.countdown_one = Teleporting in 1 second... -teleport.moved_cancelled = Teleportation cancelled - you moved! -teleport.damage_cancelled = Teleportation cancelled - you took damage! -teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. -teleport.mount_entry_blocked = You can't enter this zone while mounted. - -# ========== Chat Display ========== -chat.display.public = Public -chat.display.faction = Faction -chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/de-DE/hyperfactions_admin.lang b/src/main/resources/Server/Languages/de-DE/hyperfactions_admin.lang deleted file mode 100644 index 75e94c48..00000000 --- a/src/main/resources/Server/Languages/de-DE/hyperfactions_admin.lang +++ /dev/null @@ -1,268 +0,0 @@ -# Language: German (de-DE) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with German translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions Admin GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule - -# ========== Admin Navigation Bar ========== -nav.dashboard = Dashboard -nav.actions = Actions -nav.factions = Factions -nav.players = Players -nav.economy = Economy -nav.zones = Zones -nav.config = Config -nav.backups = Backups -nav.log = Log -nav.updates = Updates -nav.help = Help -nav.version = Version - -# ========== Common Admin Labels ========== -common.faction_not_found = Faction Not Found -common.no_faction = No Faction -common.not_set = Not set -common.on = On -common.off = Off -common.enable = Enable -common.disable = Disable -common.none_paren = (None) -common.invalid_faction = Invalid faction. -common.leader_prefix = Leader: {0} -common.members_suffix = {0} members -common.claims_suffix = {0} claims -common.factions_suffix = {0} factions -common.players_suffix = {0} players -common.chunks_suffix = {0} chunks -common.entries_suffix = {0} entries -common.found_suffix = {0} found -common.power_format = {0}/{1} power -common.raidable = Raidable -common.protected = Protected -common.no_description = No description set. -common.officers_more = +{0} more -common.custom_max = (custom max) -common.default_max = (default max) -common.now = Now -common.ago_suffix = {0} ago -common.just_now = just now -common.no_membership_history = No membership history - -# ========== Admin Dashboard ========== -dashboard.factions_prefix = Factions: {0} -dashboard.members_prefix = Total Members: {0} -dashboard.claims_prefix = Total Claims: {0} - -# ========== Admin Actions ========== -actions.confirm_reset = Confirm Reset? -actions.confirm_trigger = Confirm Trigger? -actions.kd_reset = Reset K/D for {0} players. -actions.kd_reset_failed = Failed to reset K/D: {0} -actions.upkeep_unavailable = Upkeep processor is not available. -actions.upkeep_triggered = Upkeep collection triggered. -actions.upkeep_failed = Upkeep failed: {0} - -# ========== Admin Disband ========== -disband.faction_gone = Faction no longer exists. -disband.success = Faction '{0}' has been disbanded. -disband.failed = Failed to disband: {0} -disband.no_leader = Faction has no leader, cannot disband. - -# ========== Admin Unclaim All ========== -unclaim.removed = [Admin] Removed {0} claims from {1}. -unclaim.no_claims = {0} had no claims to remove. - -# ========== Admin Factions List ========== -factions.home_not_set = Not set -factions.teleported = Teleported to {0}'s home. -factions.no_home = Faction has no home set. -factions.world_not_found = Target world not found. - -# ========== Admin Faction Info ========== -info.faction_gone = This faction no longer exists. - -# ========== Admin Faction Members ========== -members.sort_role = Role -members.sort_online = Online -members.sort_name = Name -members.sort_power = Power -members.promoted = [Admin] Promoted {0} to {1}. -members.demoted = [Admin] Demoted {0} to {1}. -members.kicked = [Admin] Kicked {0} from the faction. - -# ========== Admin Faction Relations ========== -relations.allies_header = ALLIES ({0}) -relations.enemies_header = ENEMIES ({0}) -relations.no_allies = No allies. -relations.no_enemies = No enemies. -relations.neutral_count = {0} neutral factions -relations.since_today = Since: today -relations.since_one_day = Since: 1 day ago -relations.since_days = Since: {0} days ago -relations.set_ally = [Admin] Set mutual ally status with {0}. -relations.set_enemy = Set mutual enemy status with {0}. -relations.set_neutral = [Admin] Set mutual neutral status with {0}. - -# ========== Admin Faction Settings ========== -settings.locked = This setting is locked by server configuration. -settings.perm_toggled = Set {0} to {1}. -settings.color_changed = Set faction color to {0}. -settings.recruitment_set = Set recruitment to {0}. -settings.no_home = [Admin] This faction has no home set. -settings.home_cleared = Cleared faction home for {0}. - -# ========== Sort Dropdown Labels ========== -sort.power = Power -sort.name = Name -sort.members = Members -sort.balance = Balance - -# ========== Admin Players ========== -players.sort_last_online = Last Online -players.sort_faction = Faction -players.sort_online = Online -players.not_online = Player is not online. -players.world_not_found = Target world not found. -players.teleported = [Admin] Teleported to {0}. - -# ========== Admin Player Info ========== -playerinfo.disband_faction = Disband Faction -playerinfo.kick_leader = Kick Leader -playerinfo.enter_valid_number = Enter a valid number. -playerinfo.enter_valid_positive = Enter a valid positive number. -playerinfo.faction_gone = Faction no longer exists. -playerinfo.kd_reset = Reset K/D for {0}. -playerinfo.kicked_success = Kicked {0} from {1}. -playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. -playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). - -# ========== Admin Economy ========== -economy.no_data = No factions with economy data. -economy.amount_zero = Amount cannot be zero. -economy.enter_amount = Please enter an amount. -economy.invalid_number = Invalid number: {0} -economy.error = An error occurred. -economy.balance_negative = Balance cannot be negative. -economy.failed = Failed: {0} -economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. -economy.bulk_failures = ({0} failed) - -# ========== Admin Zones ========== -zones.not_found = Zone not found. -zones.invalid_id = Invalid zone ID. -zones.deleted = Zone {0} deleted. -zones.delete_failed = Failed to delete zone: {0} -zones.no_chunks = No chunks -zones.chunks_suffix = {0} ({1} chunks) - -# ========== Zone Create Wizard ========== -wizard.enter_name = Please enter a zone name. -wizard.name_too_short = Zone name must be at least {0} characters. -wizard.name_too_long = Zone name cannot exceed {0} characters. -wizard.name_taken = A zone with this name already exists. -wizard.radius_range = Radius must be between 1 and {0}. -wizard.create_failed = Could not create zone: {0} -wizard.created_not_found = Zone created but could not be found. -wizard.created = Created {0} '{1}'! -wizard.chunk_claimed = Claimed chunk ({0}, {1}). -wizard.chunk_failed = Could not claim current chunk: {0} -wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. -wizard.radius_no_claims = No chunks could be claimed (area may be occupied). -wizard.no_claims = Zone created with no claims. -wizard.chunks_preview = ~{0} chunks - -# ========== Zone Rename ========== -zone_rename.zone_gone = Zone no longer exists. -zone_rename.enter_name = Please enter a zone name. -zone_rename.too_short = Zone name must be at least {0} character. -zone_rename.too_long = Zone name cannot exceed {0} characters. -zone_rename.same_name = That's already this zone's name. -zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! -zone_rename.name_taken = A zone with that name already exists. -zone_rename.invalid_name = Invalid zone name. -zone_rename.rename_failed = Failed to rename zone: {0} - -# ========== Zone Change Type ========== -zone_type.zone_gone = Zone no longer exists. -zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). -zone_type.failed = Failed to change zone type: {0} - -# ========== Zone Integration Flags ========== -zone_int.zone_not_found = Zone Not Found -zone_int.no_plugin = (no plugin) -zone_int.default = (default) -zone_int.custom = (custom) - -# ========== Activity Log ========== -log.all_types = All Types -log.no_logs = No activity logs matching filters. - -# ========== Version Page ========== -version.active = Active -version.not_found = Not Found -version.not_detected = Not Detected -version.not_installed = Not Installed -version.active_version = Active (v{0}) -version.active_compatible = Active (compatible) -version.active_claims_only = Active (claims only) -version.installed_no_perm = Installed (no perm provider) -version.active_provider = Active ({0}) - -# ========== Admin Main Page ========== -main.reload_hint = Use /f reload to reload configuration. -main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. - -# ========== Zone Flags/Settings ========== -zflags.invalid_flag = Invalid flag. -zflags.zone_not_found = Zone not found. -zflags.conflict = (conflict) -zflags.mixin = (mixin) -zflags.reset_int = Reset integration flags to defaults. -zflags.reset_all = Reset all flags to defaults. -zflags.reset_failed = Failed to reset flags: {0} -zflags.back_to_settings = Back to Settings - -# ========== Zone Properties ========== -zprop.current_custom = Current: "{0}" (custom) -zprop.current_default = Current: "{0}" (default) -zprop.pvp_disabled = PvP Disabled -zprop.pvp_enabled = PvP Enabled -zprop.name_empty = Name cannot be empty. -zprop.renamed = Zone renamed to "{0}". -zprop.name_taken = A zone with that name already exists. -zprop.name_invalid = Invalid name (max 32 characters). -zprop.rename_failed = Failed to rename: {0} -zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. -zprop.upper_set = Upper title set. -zprop.upper_reset = Upper title reset to default. -zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. -zprop.lower_set = Lower title set. -zprop.lower_reset = Lower title reset to default. - -# ========== Relations Additional ========== -relations.failed = Failed: {0} - -# ========== Members Additional ========== -members.never = Never -members.teleported = [Admin] Teleported to {0}. - -# ========== Player Info Additional ========== -playerinfo.records = {0} records -playerinfo.joined_date = Joined: {0} -playerinfo.current = Current -playerinfo.left_date = Left: {0} - -# ========== Zone Map ========== -map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' -map.position = Your Position: Chunk ({0}, {1}) -map.zone_gone = Zone no longer exists. -map.claimed = Claimed chunk ({0}, {1}) for {2}. -map.claim_failed = Failed to claim chunk: {0} -map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. -map.unclaim_failed = Failed to unclaim chunk: {0} -map.chunk_belongs = This chunk belongs to {0}. -map.chunk_faction = This chunk is claimed by a faction. -map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/de-DE/hyperfactions_gui.lang b/src/main/resources/Server/Languages/de-DE/hyperfactions_gui.lang deleted file mode 100644 index c1420d61..00000000 --- a/src/main/resources/Server/Languages/de-DE/hyperfactions_gui.lang +++ /dev/null @@ -1,446 +0,0 @@ -# Language: German (de-DE) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with German translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule - -# ========== Navigation Bar ========== -nav.dashboard = Dashboard -nav.chat = Chat -nav.members = Members -nav.invites = Invites -nav.browser = Browse -nav.map = Map -nav.leaderboard = Leaderboard -nav.relations = Relations -nav.treasury = Treasury -nav.settings = Settings -nav.logs = Logs -nav.help = Help -nav.admin = Admin -nav.create = Create - -# ========== Help Category Names ========== -help.category.welcome = Welcome -help.category.your_faction = Your Faction -help.category.power_land = Power & Land -help.category.diplomacy = Diplomacy -help.category.combat = Combat & Safety -help.category.economy = Economy -help.category.quick_ref = Quick Reference - -# ========== Main Menu ========== -main_menu.section_my_faction = My Faction -main_menu.section_get_started = Get Started -main_menu.section_territory = Territory -main_menu.section_browse = Browse -main_menu.section_admin = Admin -main_menu.claim_hint = Use /f claim to claim territory. - -# ========== Faction Info Page ========== -faction_info.no_description = No description set. -faction_info.status_open = Open -faction_info.status_invite_only = Invite Only -faction_info.status_raidable = Raidable -faction_info.status_protected = Protected -faction_info.officers_more = +{0} more - -# ========== Rename Modal ========== -rename.no_permission = You don't have permission to rename the faction. -rename.enter_name = Please enter a faction name. -rename.too_short = Faction name must be at least {0} characters. -rename.too_long = Faction name cannot exceed {0} characters. -rename.same_name = That's already your faction's name. -rename.name_taken = A faction with that name already exists. -rename.success = Faction renamed from {0} to {1}! - -# ========== Description Modal ========== -desc.no_permission = You don't have permission to edit the description. -desc.display_none = (None) -desc.cleared = Faction description cleared. -desc.updated = Faction description updated! - -# ========== Tag Modal ========== -tag.no_permission = You don't have permission to edit the tag. -tag.display_none = (None) -tag.cleared = Faction tag cleared. -tag.too_short = Tag must be at least {0} character. -tag.too_long = Tag cannot exceed {0} characters. -tag.invalid_format = Tag can only contain letters and numbers. -tag.same_tag = That's already your faction's tag. -tag.tag_taken = A faction with that tag already exists. -tag.success = Faction tag set to [{0}]! - -# ========== Dashboard Page ========== -dashboard.faction_gone = Your faction no longer exists. -dashboard.available = {0} available -dashboard.at_risk = At Risk! -dashboard.online_count = {0} online -dashboard.status_invite = Invite -dashboard.in_grace = IN GRACE -dashboard.billable_chunks = {0} billable chunks -dashboard.btn_home = Home -dashboard.btn_set_home = Set Home -dashboard.btn_claim = Claim -dashboard.chat_prefix = Chat: {0} -dashboard.btn_leave = Leave -dashboard.no_activity = No recent activity. -dashboard.time_now = now -dashboard.time_minutes = {0}m ago -dashboard.time_hours = {0}h ago -dashboard.time_days = {0}d ago -dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. -dashboard.chat_mode_set = Chat mode: {0} -dashboard.claim_success = Claimed chunk at ({0}, {1}) - -# ========== Faction Main Page ========== -main.no_faction = No Faction -main.joined = You joined the faction! -main.join_failed = Failed to join faction: {0} -main.invite_declined = Invite declined. -main.cooldown = Teleport on cooldown! {0}s remaining. -main.world_not_found = Cannot teleport - world not found. -main.leave_failed = Failed to leave: {0} - -# ========== Shared GUI Labels ========== -common.faction_count = {0} factions -common.leader_label = Leader: {0} -common.sort_power = Power -common.sort_members = Members -common.page_format = {0}/{1} -common.own_faction = (You) - -# ========== Members Page ========== -members.count = {0} members -members.sort_role = Role -members.sort_last_online = Last Online -members.just_now = just now -members.ago = {0} ago -members.never = Never -members.member_not_found = Member not found. -members.promoted = Promoted {0} to {1}. -members.promote_failed = Failed to promote: {0} -members.demoted = Demoted {0} to {1}. -members.demote_failed = Failed to demote: {0} -members.kicked = Kicked {0} from the faction. -members.kick_failed = Failed to kick: {0} - -# ========== Browser Page ========== -browser.sort_name = Name -browser.invalid_faction = Invalid faction. - -# ========== Leaderboard Page ========== -leaderboard.sort_kd = K/D -leaderboard.sort_territory = Territory -leaderboard.sort_balance = Balance - -# ========== Player Info Page ========== -playerinfo.now = Now -playerinfo.history_count = {0} records -playerinfo.joined_label = Joined: {0} -playerinfo.current = Current -playerinfo.left_label = Left: {0} -playerinfo.no_history = No membership history -playerinfo.faction_gone = Faction no longer exists. -playerinfo.reason_active = ACTIVE -playerinfo.reason_left = LEFT -playerinfo.reason_kicked = KICKED -playerinfo.reason_disbanded = DISBANDED - -# ========== Relations Page ========== -relations.relation_count = {0} relations -relations.request_count = {0} requests -relations.type_ally = Ally -relations.type_enemy = Enemy -relations.type_incoming = Incoming -relations.type_outgoing = Outgoing -relations.incoming_request = Incoming request -relations.outgoing_request = Outgoing request -relations.empty_relations = No relations yet. -relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. -relations.empty_pending = No pending ally requests. -relations.today = Today -relations.one_day_ago = 1 day ago -relations.days_ago = {0} days ago -relations.now_neutral = Now neutral with {0}. -relations.now_enemies = Now enemies with {0}! -relations.request_sent = Alliance request sent to {0}. -relations.now_allied = Now allied with {0}! -relations.request_declined = Ally request from {0} declined. -relations.request_cancelled = Ally request to {0} cancelled. -relations.failed = Failed: {0} -relations.search_hint = Search for a faction to set relation -relations.no_results = No factions found matching '{0}' -relations.power_display = {0} power -relations.member_count = {0} members - -# ========== Settings Page ========== -settings.officers_only = Only officers and leaders can change faction settings. -settings.display_none = (None) -settings.home_not_set = Not set -settings.no_permission = You don't have permission to change settings. -settings.only_leader_disband = Only the leader can disband the faction. -settings.perm_locked = This setting is locked by the server. -settings.no_perm_edit = You don't have permission to edit territory permissions. -settings.only_leader_officers = Only the leader can change officer access. -settings.pvp_enabled = Enabled -settings.pvp_disabled = Disabled -settings.not_in_territory = You must be in your faction's territory to set home. -settings.home_set = Faction home set to your current location! -settings.recruitment_set = Recruitment set to {0}. -settings.home_no_set = Your faction does not have a home set. -settings.home_deleted = Faction home deleted! - -# ========== Modules Page ========== -modules.treasury_name = Treasury -modules.treasury_desc = Faction bank & economy system -modules.raids_name = Raids -modules.raids_desc = Scheduled faction battles -modules.levels_name = Levels -modules.levels_desc = Faction progression & XP -modules.war_name = War -modules.war_desc = Formal war declarations -modules.coming_soon = Coming Soon -modules.active = Active -modules.view_treasury = View Treasury -modules.unavailable = Unavailable -modules.no_economy = No economy plugin detected -modules.disabled = Disabled -modules.economy_not_available = Economy features are not available on this server - -# ========== Treasury Page ========== -treasury.wallet_label = Your wallet: {0} -treasury.treasury_label = Treasury balance: {0} -treasury.chunks_detail = {0} free + {1} billable chunks -treasury.cost_label = Cost: {0} -treasury.pending = Pending -treasury.auto_pay_on = Auto-pay: ON -treasury.auto_pay_off = Auto-pay: OFF -treasury.runway_90_plus = 90+ days -treasury.runway_days = {0} days -treasury.runway_day = {0} day -treasury.runway_less_day = < 1 day -treasury.runway_no_funds = No funds -treasury.grace_expires = Grace expires in: {0} -treasury.missed_payments = Missed payments: {0} -treasury.pay_to_clear = Pay {0} to clear grace -treasury.system = System -treasury.type_deposit = Deposit -treasury.type_withdrawal = Withdrawal -treasury.type_transfer_in = Transfer In -treasury.type_transfer_out = Transfer Out -treasury.type_player_transfer = Player Transfer -treasury.type_upkeep = Upkeep -treasury.type_tax = Tax Collection -treasury.type_war_cost = War Cost -treasury.type_raid_cost = Raid Cost -treasury.type_spoils = Spoils -treasury.type_admin = Admin Adjustment -treasury.deposit_title = Deposit to Treasury -treasury.withdraw_title = Withdraw from Treasury -treasury.fee_label = Fee ({0}%) -treasury.confirm_deposit = Confirm Deposit -treasury.confirm_withdrawal = Confirm Withdrawal -treasury.from_wallet = {0} from wallet -treasury.to_wallet = {0} to wallet -treasury.enter_valid_amount = Enter a valid positive amount. -treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. -treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. -treasury.deposit_failed_returned = Failed to deposit. Money returned. -treasury.deposited = Deposited {0} into the treasury. -treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) -treasury.no_withdraw_permission = You don't have permission to withdraw. -treasury.withdraw_denied = Withdrawal denied: {0} -treasury.insufficient_treasury = Insufficient funds in treasury. -treasury.withdraw_limit = Withdrawal limit exceeded. -treasury.withdraw_failed = Withdrawal failed: {0} -treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. -treasury.withdrew = Withdrew {0} from the treasury. -treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) -treasury.search_hint = Search for a player or faction -treasury.no_results = No results for '{0}' -treasury.tag_player = [Player] -treasury.tag_faction = [Faction] -treasury.source_online = Online -treasury.source_offline = Offline -treasury.source_player_db = Hytale player -treasury.no_transfer_permission = You don't have permission to transfer. -treasury.transfer_denied = Transfer denied: {0} -treasury.invalid_target_faction = Invalid target faction. -treasury.target_faction_gone = Target faction no longer exists. -treasury.transfer_failed = Transfer failed: {0} -treasury.transfer_failed_returned = Transfer failed. Funds returned. -treasury.transferred = Transferred {0} to {1}. -treasury.invalid_target_player = Invalid target player. -treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. -treasury.leader_only_perms = Only the leader can change treasury permissions. -treasury.leader_only_upkeep = Only the leader can change upkeep settings. -treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. - -# ========== Confirmation Pages ========== -confirm.disband_not_leader = Only the leader can disband the faction. -confirm.disbanded = Faction '{0}' has been disbanded. -confirm.disband_failed = Failed to disband faction. -confirm.succession_title = Leadership will transfer to: -confirm.no_members_warning = WARNING: No other members! -confirm.will_disband = Leaving will disband the faction permanently. -confirm.not_in_faction = You are not in this faction. -confirm.not_leader_anymore = You are no longer the leader. -confirm.no_successor = No successor available. Use disband instead. -confirm.transfer_failed = Failed to transfer leadership: {0} -confirm.leader_left = Leadership transferred to {0}. You have left {1}. -confirm.leave_failed = Failed to leave faction: {0} -confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. -confirm.left_faction = You have left {0}. -confirm.faction_gone = Faction no longer exists. -confirm.not_leader_transfer = Only the leader can transfer leadership. -confirm.leadership_transferred = Leadership transferred to {0}. - -# ========== Logs Viewer Page ========== -logs.title = {0} - Activity Logs -logs.entry_count = {0} entries -logs.all_types = All Types -logs.no_logs_type = No logs of this type. -logs.no_logs = No activity logs yet. - -# ========== Chat Page ========== -chat.placeholder = Type a message... -chat.no_messages = No messages yet. -chat.no_ally_permission = You don't have permission for ally chat. -chat.no_permission = No permission. -chat.faction_gone = Your faction no longer exists. -chat.time_now = now -chat.time_minutes = {0}m -chat.time_hours = {0}h - -# ========== Invites Page ========== -invites.invite_count = {0} invites -invites.request_count = {0} requests -invites.invited_by = Invited by: {0} -invites.no_message = No message -invites.expires = Expires: {0} -invites.type_outgoing = Outgoing -invites.type_request = Request -invites.invited_by_label = Invited by: -invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. -invites.empty_requests = No join requests. Players can request to join with /f request. -invites.invalid_player = Invalid player. -invites.cancelled_invite = Cancelled invite to {0}. -invites.player_joined = {0} has joined the faction! -invites.faction_full = Faction is full. Cannot accept request. -invites.add_failed = Failed to add player to faction. -invites.request_expired = Request not found or expired. -invites.request_declined = Declined join request from {0}. -invites.time_seconds = {0}s -invites.time_minutes = {0}m -invites.time_hours = {0}h - -# ========== Map Page ========== -map.position = Your Position: Chunk ({0}, {1}) -map.legend_protected = Protected -map.claim_stats = Claims: {0}/{1} ({2} Available) -map.overclaimed = OVERCLAIMED by {0}! -map.power_display = Power: {0}/{1} -map.join_to_claim = Join a faction to claim -map.claim_success = Claimed chunk at ({0}, {1})! -map.claim_not_in_faction = You must be in a faction to claim territory. -map.claim_not_officer = Only officers and leaders can claim territory. -map.claim_already_yours = You already own this chunk. -map.claim_already_claimed = This chunk is already claimed by another faction. -map.claim_not_adjacent = You can only claim chunks adjacent to your territory. -map.claim_max = You have reached your maximum claim limit. -map.claim_world_not_allowed = Claiming is not allowed in this world. -map.claim_orbisguard = This area is protected by OrbisGuard. -map.claim_failed = Failed to claim chunk. -map.unclaim_success = Unclaimed chunk at ({0}, {1}). -map.unclaim_not_in_faction = You must be in a faction. -map.unclaim_not_officer = Only officers and leaders can unclaim territory. -map.unclaim_not_claimed = This chunk is not claimed. -map.unclaim_not_yours = This chunk belongs to another faction. -map.unclaim_home = Cannot unclaim the chunk containing your faction home. -map.unclaim_failed = Failed to unclaim chunk. -map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! -map.overclaim_not_in_faction = You must be in a faction. -map.overclaim_not_officer = Only officers and leaders can overclaim territory. -map.overclaim_already_yours = You already own this chunk. -map.overclaim_ally = You cannot overclaim allied territory. -map.overclaim_has_power = This faction has enough power to defend their territory. -map.overclaim_max = You have reached your maximum claim limit. -map.overclaim_failed = Failed to overclaim chunk. -# ========== Create Faction Page ========== -create.preview_name = Your Faction Name -create.leader_prefix = Leader: {0} -create.enter_name = Please enter a faction name. -create.name_too_short = Faction name must be at least {0} characters. -create.name_too_long = Faction name cannot exceed {0} characters. -create.name_taken = A faction with this name already exists. -create.tag_length = Faction tag must be {0}-{1} characters. -create.tag_format = Faction tag can only contain letters and numbers. -create.desc_too_long = Description cannot exceed {0} characters. -create.created = Faction {0} created successfully! -create.created_no_dashboard = Faction created but could not open dashboard. -create.invalid_name = Invalid faction name. -create.create_failed = Could not create faction. - -# ========== New Player Pages ========== -newplayer.pending_count = {0} pending -newplayer.received_header = RECEIVED INVITES ({0}) -newplayer.requests_header = YOUR REQUESTS ({0}) -newplayer.no_invites = No invites. Browse factions to find one! -newplayer.no_requests = No pending requests. -newplayer.invited_by = Invited by: {0} -newplayer.member_count = {0} members -newplayer.power_count = {0} power -newplayer.claim_count = {0} claims -newplayer.awaiting_review = Awaiting review -newplayer.expires_in = Expires in {0}h -newplayer.time_just_now = just now -newplayer.time_minutes = {0} min ago -newplayer.time_hours = {0}h ago -newplayer.time_days = {0}d ago -newplayer.invalid_faction = Invalid faction. -newplayer.invite_expired = This invite has expired or was revoked. -newplayer.faction_gone = Faction no longer exists. -newplayer.joined = You joined {0}! -newplayer.faction_full = This faction is full. -newplayer.join_failed = Could not join faction. -newplayer.invite_declined = Invite declined. -newplayer.request_cancelled = Cancelled request to join {0}. -newplayer.faction_count = {0} factions -newplayer.browse_subtitle = Find your new home! -newplayer.sort_power = Power -newplayer.sort_name = Name -newplayer.sort_members = Members -newplayer.btn_accept = Accept -newplayer.btn_pending = Pending -newplayer.btn_join = Join -newplayer.btn_request = Request -newplayer.invite_only_msg = This faction is invite-only. -newplayer.welcome_hint = Welcome! Use /f to open faction menu. -newplayer.faction_open_hint = This faction is open! Click JOIN instead. -newplayer.already_requested = You already have a pending request to this faction. -newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. -newplayer.request_sent = Join request sent to {0}! -newplayer.officer_review = An officer will review your request. -newplayer.map_hint = View Only - Join a faction to claim territory! - -# Player Settings -nav.player_settings = Settings -player_settings.title = Player Settings -player_settings.language_section = Language -player_settings.auto_detect = Auto-detect from client -player_settings.auto_detect_desc = Uses your game client's language setting -player_settings.language_label = Language -player_settings.notifications_section = Notifications -player_settings.territory_alerts = Territory Alerts -player_settings.territory_alerts_desc = Show notifications when entering/leaving territories -player_settings.death_announcements = Death Broadcasts -player_settings.death_announcements_desc = Receive faction member death location announcements -player_settings.power_notifications = Power Changes -player_settings.power_notifications_desc = Show messages when your power changes -player_settings.language_changed = Language changed to {0} -player_settings.pref_enabled = {0} enabled -player_settings.pref_disabled = {0} disabled diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/configuration.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/configuration.md new file mode 100644 index 00000000..1e7a6bbf --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/configuration.md @@ -0,0 +1,42 @@ +--- +id: admin_configuration +--- +# Sistema de Configuracion + +HyperFactions usa un sistema de configuracion modular +en JSON con 11 archivos de configuracion. + +## Comandos de Configuracion del Administrador + +| Comando | Descripcion | +|---------|-------------| +| `/f admin config` | Abrir la GUI del editor visual de configuracion | +| `/f admin reload` | Recargar todos los archivos de configuracion desde disco | +| `/f admin sync` | Sincronizar datos de facciones al almacenamiento | + +## Archivos de Configuracion + +| Archivo | Contenido | +|------|----------| +| `factions.json` | Roles, poder, reclamaciones, combate, relaciones | +| `server.json` | Teletransporte, auto-guardado, mensajes, GUI, permisos | +| `economy.json` | Tesoreria, mantenimiento, ajustes de transacciones | +| `backup.json` | Rotacion y retencion de copias de seguridad | +| `chat.json` | Formato de chat de faccion y aliados | +| `debug.json` | Categorias de registro de depuracion | +| `faction-permissions.json` | Permisos predeterminados por rol | +| `announcements.json` | Difusion de eventos y notificaciones de territorio | +| `gravestones.json` | Ajustes de integracion de lapidas | +| `worldmap.json` | Modos de actualizacion del mapa del mundo | +| `worlds.json` | Sobrescrituras de comportamiento por mundo | + +>[!TIP] La GUI de configuracion proporciona un editor visual con descripciones para cada ajuste. Los cambios se guardan inmediatamente pero algunos requieren `/f admin reload` para tomar efecto completo. + +## Ubicacion de Configuracion + +Todos los archivos se almacenan en: +`mods/com.hyperfactions_HyperFactions/config/` + +>[!WARNING] Las ediciones manuales de JSON requieren `/f admin reload` para aplicarse. Un JSON invalido causara que el archivo sea omitido con una advertencia en el registro del servidor. + +>[!NOTE] La version de configuracion se rastrea en `server.json`. El plugin auto-migra configuraciones anteriores al iniciar. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/world_settings.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/world_settings.md new file mode 100644 index 00000000..1e05b8bb --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/world_settings.md @@ -0,0 +1,47 @@ +--- +id: admin_world_settings +--- +# Ajustes por Mundo + +HyperFactions soporta configuracion por mundo para +reclamaciones, PvP y comportamiento de proteccion. + +## Comandos de Mundo + +| Comando | Descripcion | +|---------|-------------| +| `/f admin world list` | Listar todas las sobrescrituras de mundo | +| `/f admin world info ` | Mostrar ajustes de un mundo | +| `/f admin world set ` | Establecer un ajuste | +| `/f admin world reset ` | Restablecer mundo a valores predeterminados | + +## Ajustes Disponibles + +| Ajuste | Tipo | Descripcion | +|---------|------|-------------| +| claiming_enabled | boolean | Permitir reclamaciones de faccion en este mundo | +| pvp_enabled | boolean | Permitir combate PvP en este mundo | +| power_loss | boolean | Aplicar perdida de poder al morir | +| build_protection | boolean | Aplicar proteccion de construccion en reclamaciones | +| explosion_protection | boolean | Proteger reclamaciones de explosiones | + +## Lista Blanca / Lista Negra de Mundos + +Controla que mundos permiten funciones de facciones +a traves del archivo de configuracion `worlds.json`: + +- **Modo lista blanca**: Solo los mundos listados permiten reclamar +- **Modo lista negra**: Todos los mundos permiten reclamar excepto los listados + +>[!INFO] Los ajustes de mundo se almacenan en `worlds.json` y sobrescriben los valores globales predeterminados de `factions.json`. + +## Ejemplos + +- `/f admin world set survival claiming_enabled true` +- `/f admin world set creative claiming_enabled false` +- `/f admin world set pvp_arena pvp_enabled true` +- `/f admin world reset lobby` -- restaurar todos los valores predeterminados + +>[!TIP] Deshabilita las reclamaciones en mundos creativos o de lobby para mantener el sistema de facciones enfocado en la jugabilidad de supervivencia. + +>[!NOTE] Los ajustes por mundo tienen prioridad sobre la configuracion global pero son sobrescritos por los indicadores de zona dentro de ese mundo. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/treasury_management.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/treasury_management.md new file mode 100644 index 00000000..2d574788 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/treasury_management.md @@ -0,0 +1,40 @@ +--- +id: admin_treasury_management +--- +# Gestion de Tesoreria + +Comandos de administracion para gestionar tesorerias +de facciones. Requiere el permiso `hyperfactions.admin.economy`. + +## Comandos de Tesoreria + +| Comando | Descripcion | +|---------|-------------| +| `/f admin economy balance ` | Ver saldo de tesoreria de la faccion | +| `/f admin economy set ` | Establecer saldo exacto | +| `/f admin economy add ` | Agregar fondos a la tesoreria | +| `/f admin economy take ` | Retirar fondos de la tesoreria | +| `/f admin economy reset ` | Restablecer tesoreria a cero | + +## Ejemplos + +- `/f admin economy balance Vikings` -- consultar saldo +- `/f admin economy set Vikings 5000` -- establecer en 5000 +- `/f admin economy add Vikings 1000` -- depositar 1000 +- `/f admin economy take Vikings 500` -- retirar 500 +- `/f admin economy reset Vikings` -- poner saldo en cero + +>[!TIP] Usa `/f admin info ` para ver el panorama economico completo incluyendo historial de transacciones junto al saldo de tesoreria. + +## Casos de Uso + +| Escenario | Comando | +|----------|---------| +| Distribucion de premios de eventos | `economy add ` | +| Penalizacion por violacion de reglas | `economy take ` | +| Reinicio de economia tras limpieza | `economy reset ` | +| Compensacion por errores | `economy add ` | + +>[!WARNING] Los cambios en la tesoreria se registran en el historial de transacciones de la faccion. Las modificaciones del administrador se registran con el nombre del administrador para responsabilidad. + +>[!NOTE] Todos los comandos de economia de administracion funcionan incluso cuando el modulo de economia esta deshabilitado en la configuracion. Los datos se almacenan independientemente del estado del modulo. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/upkeep_management.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/upkeep_management.md new file mode 100644 index 00000000..b1235079 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/upkeep_management.md @@ -0,0 +1,48 @@ +--- +id: admin_upkeep_management +--- +# Gestion de Mantenimiento + +El mantenimiento de faccion cobra a las facciones +periodicamente basandose en su territorio y cantidad +de miembros. + +## Controles del Administrador + +Los ajustes de mantenimiento se gestionan a traves del +archivo de configuracion de economia o la GUI de +configuracion del administrador. + +`/f admin config` +Abre el editor de configuracion y navega a los ajustes +de economia para modificar valores de mantenimiento. + +## Ajustes Predeterminados de Mantenimiento + +| Ajuste | Predeterminado | Descripcion | +|---------|---------|-------------| +| Mantenimiento habilitado | false | Interruptor principal del sistema | +| Intervalo de mantenimiento | 24h | Frecuencia de cobro del mantenimiento | +| Costo por reclamacion | 5.0 | Costo por chunk reclamado por ciclo | +| Costo por miembro | 0.0 | Costo por miembro por ciclo | +| Periodo de gracia | 72h | Las facciones nuevas estan exentas | +| Disolver por bancarrota | false | Disolucion automatica si no puede pagar | + +## Monitorear el Mantenimiento + +Usa `/f admin info ` para ver: +- Saldo actual de tesoreria +- Costo estimado de mantenimiento por ciclo +- Tiempo hasta el proximo cobro de mantenimiento +- Si la faccion puede cubrir el mantenimiento + +>[!TIP] Revisa las estadisticas de economia de todas las facciones desde el panel de administracion para identificar facciones en riesgo de bancarrota antes de que se active el mantenimiento. + +>[!INFO] La configuracion de mantenimiento se almacena en `economy.json`. Los cambios realizados a traves de la GUI de configuracion toman efecto despues de recargar con `/f admin reload`. + +## Formula de Mantenimiento + +**Mantenimiento total** = (chunks reclamados x costo por reclamacion) + +(cantidad de miembros x costo por miembro) + +>[!WARNING] Habilitar el mantenimiento en un servidor con facciones existentes puede causar bancarrotas inesperadas. Considera establecer un periodo de gracia o anunciar el cambio con anticipacion. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/disbanding.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/disbanding.md new file mode 100644 index 00000000..84d9395a --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/disbanding.md @@ -0,0 +1,39 @@ +--- +id: admin_disbanding +--- +# Disolucion Forzada + +Los administradores pueden disolver cualquier faccion +por la fuerza, sin importar los deseos del lider. + +## Comando + +`/f admin disband ` +Disuelve la faccion indicada por la fuerza. Aparecera +un mensaje de confirmacion antes de ejecutar la accion. + +**Permiso**: `hyperfactions.admin.disband` + +>[!WARNING] Disolver una faccion es **irreversible**. Todas las reclamaciones son liberadas, todos los miembros son removidos y la faccion deja de existir. Crea una copia de seguridad primero. + +## Consecuencias + +Cuando una faccion es disuelta: + +| Efecto | Descripcion | +|--------|-------------| +| **Reclamaciones** | Todo el territorio es liberado inmediatamente | +| **Miembros** | Todos los jugadores son removidos de la lista | +| **Relaciones** | Todas las alianzas y enemistades son eliminadas | +| **Tesoreria** | Gestionada segun la configuracion de economia | +| **Hogar** | El hogar de la faccion es eliminado | +| **Chat** | El historial del chat de faccion es removido | + +## Buenas Practicas + +1. Siempre ejecuta `/f admin backup create` antes de disolver +2. Notifica a los miembros de la faccion cuando sea posible +3. Documenta la razon para los registros del servidor +4. Revisa `/f admin info ` antes de actuar + +>[!TIP] Si el problema es con un miembro especifico, considera usar `/f admin modify` para transferir el liderazgo en lugar de disolver toda la faccion. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/managing_factions.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/managing_factions.md new file mode 100644 index 00000000..1db1d254 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/managing_factions.md @@ -0,0 +1,43 @@ +--- +id: admin_managing_factions +--- +# Gestion de Facciones + +Los administradores pueden inspeccionar y modificar +cualquier faccion del servidor a traves del panel o comandos. + +## Explorar Facciones + +`/f admin factions` +Abre el explorador de facciones del administrador. Ve +todas las facciones con cantidad de miembros, niveles +de poder y territorio. + +`/f admin info ` +Abre el panel de informacion del administrador para una +faccion especifica con detalles completos y opciones +de gestion. + +## Modificar Configuracion de Facciones + +Con el permiso `hyperfactions.admin.modify`, puedes: + +- **Renombrar** una faccion para resolver conflictos +- **Cambiar color** para corregir problemas de visualizacion +- **Alternar abierta/cerrada** para sobrescribir la politica de ingreso +- **Editar descripcion** con fines de moderacion + +>[!TIP] Usa `/f admin who ` para buscar a que faccion pertenece un jugador especifico y ver sus detalles. + +## Ver Miembros y Relaciones + +El panel de informacion del administrador muestra: + +| Seccion | Detalles | +|---------|---------| +| **Miembros** | Lista completa con roles y ultima conexion | +| **Relaciones** | Todas las posiciones de aliados, enemigos y neutrales | +| **Territorio** | Chunks reclamados y balance de poder | +| **Economia** | Saldo de tesoreria y registro de transacciones | + +>[!NOTE] Los comandos de inspeccion del administrador no notifican a la faccion que esta siendo revisada. Solo las modificaciones activan alertas. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/backups.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/backups.md new file mode 100644 index 00000000..17ca3371 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/backups.md @@ -0,0 +1,49 @@ +--- +id: admin_backups +--- +# Sistema de Copias de Seguridad + +HyperFactions incluye copias de seguridad automaticas y +manuales con rotacion GFS (Abuelo-Padre-Hijo). + +## Comandos de Copias de Seguridad + +| Comando | Descripcion | +|---------|-------------| +| `/f admin backup create` | Crear una copia de seguridad manual ahora | +| `/f admin backup list` | Listar todas las copias de seguridad disponibles | +| `/f admin backup restore ` | Restaurar desde una copia de seguridad | +| `/f admin backup delete ` | Eliminar una copia de seguridad especifica | + +**Permiso**: `hyperfactions.admin.backup` + +## Valores Predeterminados de Rotacion GFS + +| Tipo | Retencion | Descripcion | +|------|-----------|-------------| +| Cada hora | 24 | Ultimas 24 capturas por hora | +| Diaria | 7 | Ultimas 7 capturas diarias | +| Semanal | 4 | Ultimas 4 capturas semanales | +| Manual | 10 | Copias creadas manualmente | +| Apagado | 5 | Creadas al detener el servidor | + +>[!INFO] Las copias de seguridad al apagar estan habilitadas por defecto (`onShutdown=true`). Capturan el estado mas reciente antes de que el servidor se detenga. + +## Contenido de las Copias de Seguridad + +Cada archivo ZIP de copia de seguridad contiene: +- Todos los archivos de datos de facciones +- Datos de poder de jugadores +- Definiciones de zonas +- Historial de chat y datos de economia +- Datos de invitaciones y solicitudes de ingreso +- Archivos de configuracion + +>[!WARNING] **Restaurar una copia de seguridad es destructivo.** Reemplaza todos los datos actuales con el contenido de la copia de seguridad. Cualquier cambio realizado despues de que la copia fue creada se perdera. Siempre crea una copia de seguridad nueva antes de restaurar. + +## Buenas Practicas + +1. Crea una copia de seguridad manual antes de acciones importantes del administrador +2. Revisa la retencion de copias de seguridad en `backup.json` +3. Prueba la restauracion en un servidor de pruebas primero +4. Mantiene habilitadas las copias al apagar para recuperacion tras fallos diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/imports.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/imports.md new file mode 100644 index 00000000..0b18b94f --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/imports.md @@ -0,0 +1,49 @@ +--- +id: admin_imports +--- +# Importacion de Datos + +Importa datos de facciones desde otros plugins para +migrar tu servidor a HyperFactions. + +## Comando de Importacion + +`/f admin import [path] [flags]` + +**Permiso**: `hyperfactions.admin.use` + +## Fuentes Soportadas + +| Fuente | Descripcion | +|--------|-------------| +| `elbaphfactions` | Importar desde datos de ElbaphFactions | +| `hyfactions` | Importar desde datos de HyFactions v1 | + +## Indicadores de Importacion + +| Indicador | Descripcion | +|------|-------------| +| `--dry-run` | Validar datos sin importar nada | +| `--overwrite` | Sobrescribir facciones existentes con el mismo nombre | +| `--no-zones` | Omitir datos de zonas durante la importacion | +| `--no-power` | Omitir datos de poder durante la importacion | + +>[!TIP] Siempre ejecuta con `--dry-run` primero para previsualizar lo que sera importado y detectar cualquier problema de datos antes de confirmar los cambios. + +## Proceso de Importacion + +1. Se crea una copia de seguridad previa automaticamente +2. Se cargan las asignaciones de nombres de jugadores +3. Se convierten facciones, reclamaciones y zonas +4. Los datos son validados y guardados + +## Ejemplos + +- `/f admin import elbaphfactions --dry-run` +- `/f admin import elbaphfactions --overwrite` +- `/f admin import hyfactions --no-zones --no-power` +- `/f admin import elbaphfactions /custom/path` + +>[!WARNING] Usar `--overwrite` **reemplazara** cualquier faccion existente que comparta nombre con una faccion importada. Los datos de miembros y reclamaciones seran sobrescritos. Ejecuta con `--dry-run` primero para identificar conflictos. + +>[!NOTE] Algunos datos especificos de la fuente (ej., parcelas de trabajadores, parcelas de granja) no tienen equivalente en HyperFactions y se registraran como advertencias durante la importacion. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/updates.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/updates.md new file mode 100644 index 00000000..e0ad055d --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/updates.md @@ -0,0 +1,48 @@ +--- +id: admin_updates +--- +# Verificacion de Actualizaciones + +HyperFactions puede verificar nuevas versiones y +gestionar la dependencia HyperProtect-Mixin. + +## Comandos de Actualizacion + +| Comando | Descripcion | +|---------|-------------| +| `/f admin update` | Verificar actualizaciones de HyperFactions | +| `/f admin update mixin` | Verificar/descargar HyperProtect-Mixin | +| `/f admin update toggle-mixin-download` | Alternar descarga automatica | +| `/f admin version` | Mostrar version actual e informacion de compilacion | + +## Canales de Lanzamiento + +| Canal | Descripcion | +|---------|-------------| +| **Estable** | Recomendado para servidores de produccion | +| **Pre-lanzamiento** | Acceso anticipado a funciones proximas | + +>[!INFO] El verificador de actualizaciones solo notifica sobre nuevas versiones. **No** instala automaticamente actualizaciones de HyperFactions. + +## HyperProtect-Mixin + +HyperProtect-Mixin es el mixin de proteccion recomendado +que habilita indicadores de zona avanzados (explosiones, +propagacion de fuego, conservar inventario, etc.). + +- `/f admin update mixin` verifica la ultima version + y la descarga si hay una version mas nueva disponible +- La descarga automatica puede alternarse por servidor + +>[!TIP] Despues de descargar una nueva version del mixin, se requiere reiniciar el servidor para que los cambios tomen efecto. + +## Procedimiento de Reversion + +Si una actualizacion causa problemas: + +1. Detiene el servidor +2. Reemplaza el JAR del plugin con la version anterior +3. Inicia el servidor +4. Verifica la funcionalidad con `/f admin version` + +>[!WARNING] Revertir a una version anterior puede requerir un reinicio de migracion de configuracion. Siempre conserva copias de seguridad antes de actualizar. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/getting_started.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/getting_started.md new file mode 100644 index 00000000..c396737e --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/getting_started.md @@ -0,0 +1,44 @@ +--- +id: admin_getting_started +--- +# Primeros Pasos como Administrador + +Bienvenido a la administracion de HyperFactions. Esta +guia cubre tus primeros pasos despues de instalar el plugin. + +## Abrir el Panel de Administracion + +`/f admin` +Abre la interfaz del panel de administracion con acceso +a todas las herramientas de gestion, editores de zonas +y configuracion del servidor. + +>[!INFO] Necesitas el permiso **hyperfactions.admin.use** o estado de OP para acceder a los comandos de administracion. + +## Requisitos + +- **Con un plugin de permisos**: Otorga `hyperfactions.admin.use` +- **Sin un plugin de permisos**: El jugador debe ser un + operador del servidor (`adminRequiresOp=true` por defecto) + +## Primeros Pasos Tras la Instalacion + +1. Ejecuta `/f admin` para verificar tu acceso +2. Abre **Configuracion** para revisar los ajustes predeterminados de facciones +3. Crea una **Zona Segura** en el spawn con `/f admin safezone Spawn` +4. Opcionalmente crea **Zonas de Guerra** para arenas PvP +5. Revisa los ajustes de **Copia de seguridad** para asegurar la proteccion de datos + +## Capacidades del Administrador + +| Area | Lo Que Puedes Hacer | +|------|----------------| +| Facciones | Inspeccionar, modificar o disolver cualquier faccion | +| Zonas | Crear Zonas Seguras y Zonas de Guerra con indicadores personalizados | +| Poder | Sobrescribir valores de poder de jugadores/facciones | +| Economia | Gestionar tesorerias de facciones y mantenimiento | +| Configuracion | Editar ajustes en vivo via GUI o recargar desde disco | +| Copias de seguridad | Crear, restaurar y gestionar copias de seguridad de datos | +| Importaciones | Migrar datos desde otros plugins de facciones | + +>[!TIP] Usa `/f admin --text` para obtener salida por chat en lugar de la GUI, util para consola o automatizacion. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/permissions.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/permissions.md new file mode 100644 index 00000000..9ee5d729 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/permissions.md @@ -0,0 +1,41 @@ +--- +id: admin_permissions +--- +# Permisos de Administracion + +Todas las funciones de administracion estan protegidas +por nodos de permisos en el espacio `hyperfactions.admin`. + +## Nodos de Permisos + +| Permiso | Descripcion | +|-----------|-------------| +| `hyperfactions.admin.*` | Otorga **todos** los permisos de administracion | +| `hyperfactions.admin.use` | Acceso al panel `/f admin` | +| `hyperfactions.admin.reload` | Recargar archivos de configuracion | +| `hyperfactions.admin.debug` | Alternar categorias de registro de depuracion | +| `hyperfactions.admin.zones` | Crear, editar y eliminar zonas | +| `hyperfactions.admin.disband` | Disolver cualquier faccion por la fuerza | +| `hyperfactions.admin.modify` | Modificar los ajustes de cualquier faccion | +| `hyperfactions.admin.bypass.limits` | Ignorar limites de reclamacion y poder | +| `hyperfactions.admin.backup` | Crear y restaurar copias de seguridad | +| `hyperfactions.admin.power` | Sobrescribir valores de poder de jugadores | +| `hyperfactions.admin.economy` | Gestionar tesorerias de facciones | + +## Comportamiento Alternativo + +Cuando **no hay un plugin de permisos** instalado, los +permisos de administracion recurren al estado de operador +del servidor (OP). Esto se controla mediante `adminRequiresOp` +en la configuracion del servidor (por defecto: `true`). + +>[!NOTE] El comodin `hyperfactions.admin.*` otorga todos los permisos de administracion. Usa nodos individuales para un control granular sobre tu equipo de staff. + +## Orden de Resolucion de Permisos + +1. Proveedor **VaultUnlocked** (si esta disponible) +2. Proveedor **HyperPerms** (si esta disponible) +3. Proveedor **LuckPerms** (si esta disponible) +4. **Verificacion de OP** para nodos de administracion (alternativa) + +>[!WARNING] Sin un plugin de permisos y con `adminRequiresOp` deshabilitado, los comandos de administracion estan **abiertos a todos los jugadores**. Siempre usa un plugin de permisos en produccion. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_commands.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_commands.md new file mode 100644 index 00000000..484379bc --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_commands.md @@ -0,0 +1,41 @@ +--- +id: admin_power_commands +--- +# Comandos de Administracion de Poder + +Sobrescribir valores de poder de jugadores y facciones. +Todos los comandos requieren el permiso `hyperfactions.admin.power`. + +## Comandos de Poder de Jugador + +| Comando | Descripcion | +|---------|-------------| +| `/f admin power set ` | Establecer valor exacto de poder | +| `/f admin power add ` | Agregar poder al jugador | +| `/f admin power remove ` | Remover poder del jugador | +| `/f admin power reset ` | Restablecer al poder inicial predeterminado | +| `/f admin power info ` | Ver desglose detallado de poder | + +## Como Afecta el Poder a las Facciones + +El poder total de una faccion es la suma del poder +individual de todos sus miembros. Las reclamaciones de +territorio requieren poder total suficiente para mantenerse. + +| Escenario | Efecto | +|----------|--------| +| Poder aumentado | La faccion puede reclamar mas territorio | +| Poder reducido | La faccion puede volverse vulnerable a sobre-reclamacion | +| Poder restablecido | Regresa al jugador al valor inicial predeterminado | + +>[!WARNING] Reducir el poder de un jugador puede causar que su faccion pierda territorio si el poder total cae por debajo del numero de chunks reclamados. + +## Ejemplos + +- `/f admin power set Steve 50` -- establecer exactamente en 50 +- `/f admin power add Steve 10` -- aumentar en 10 +- `/f admin power remove Steve 5` -- reducir en 5 +- `/f admin power reset Steve` -- volver al predeterminado +- `/f admin power info Steve` -- mostrar desglose completo + +>[!TIP] Usa `/f admin power info ` para ver el poder actual, poder maximo y cualquier sobrescritura activa antes de hacer cambios. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_overrides.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_overrides.md new file mode 100644 index 00000000..b202aec5 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_overrides.md @@ -0,0 +1,60 @@ +--- +id: admin_power_overrides +--- +# Sobrescrituras de Poder + +Comandos especiales de poder que cambian como funciona +el poder para jugadores o facciones especificos. + +## Comandos de Sobrescritura + +| Comando | Descripcion | +|---------|-------------| +| `/f admin power setmax ` | Establecer limite maximo de poder personalizado | +| `/f admin power noloss ` | Alternar inmunidad a penalizacion de poder por muerte | +| `/f admin power nodecay ` | Alternar inmunidad a deterioro de poder por desconexion | +| `/f admin power info ` | Ver todas las sobrescrituras y detalles de poder | + +## Poder Maximo Personalizado + +`/f admin power setmax ` +Establece un limite maximo de poder personal para el +jugador, sobrescribiendo el valor predeterminado del servidor. + +>[!INFO] Establecer un maximo personalizado **no** cambia el poder actual. Solo cambia el techo. El jugador aun debe ganar poder hasta el nuevo limite. + +## Modo Sin Perdida + +`/f admin power noloss ` +Alterna la inmunidad a perdida de poder por muerte. +Cuando esta habilitado, el jugador **no** perdera poder +al morir. + +Util para: +- Periodos de proteccion para nuevos jugadores +- Participantes de eventos +- Miembros del staff + +## Modo Sin Deterioro + +`/f admin power nodecay ` +Alterna la inmunidad al deterioro de poder por desconexion. +Cuando esta habilitado, el poder del jugador **no** +disminuira mientras este desconectado. + +Util para: +- Jugadores en ausencia prolongada +- Miembros VIP +- Proteccion estacional + +## Informacion de Poder + +`/f admin power info ` +Muestra un desglose completo: + +- Poder actual y poder maximo +- Sobrescrituras activas (sin perdida, sin deterioro, maximo personalizado) +- Ultima muerte y poder perdido +- Porcentaje de contribucion a la faccion + +>[!TIP] Todas las sobrescrituras de poder persisten entre reinicios del servidor y se almacenan en el archivo de datos del jugador. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/all_commands.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/all_commands.md new file mode 100644 index 00000000..5faf6d91 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/all_commands.md @@ -0,0 +1,66 @@ +--- +id: admin_quickref_commands +--- +# Referencia de Comandos de Administracion + +Lista completa de todos los subcomandos de `/f admin` +con sintaxis y permisos requeridos. + +## Panel y General + +| Comando | Permiso | +|---------|-----------| +| `/f admin` | admin.use | +| `/f admin version` | admin.use | +| `/f admin reload` | admin.reload | +| `/f admin sync` | admin.use | +| `/f admin bypass` | admin.bypass.limits | + +## Gestion de Facciones + +| Comando | Permiso | +|---------|-----------| +| `/f admin factions` | admin.use | +| `/f admin info ` | admin.use | +| `/f admin who ` | admin.use | +| `/f admin disband ` | admin.disband | +| `/f admin log` | admin.use | + +## Gestion de Zonas + +| Comando | Permiso | +|---------|-----------| +| `/f admin safezone ` | admin.zones | +| `/f admin warzone ` | admin.zones | +| `/f admin removezone ` | admin.zones | +| `/f admin zone create/delete/claim/unclaim` | admin.zones | +| `/f admin zone radius ` | admin.zones | +| `/f admin zone list` | admin.zones | +| `/f admin zone notify ` | admin.zones | +| `/f admin zone title upper/lower ` | admin.zones | +| `/f admin zone properties ` | admin.zones | +| `/f admin zoneflag ` | admin.zones | + +## Poder y Economia + +| Comando | Permiso | +|---------|-----------| +| `/f admin power set/add/remove/reset [amt]` | admin.power | +| `/f admin power setmax/noloss/nodecay [amt]` | admin.power | +| `/f admin power info ` | admin.power | +| `/f admin economy balance/set/add/take/reset [amt]` | admin.economy | + +## Mantenimiento + +| Comando | Permiso | +|---------|-----------| +| `/f admin backup create/list/restore/delete` | admin.backup | +| `/f admin import [flags]` | admin.use | +| `/f admin update` | admin.use | +| `/f admin update mixin` | admin.use | +| `/f admin config` | admin.use | +| `/f admin world list/info/set/reset` | admin.use | +| `/f admin debug toggle ` | admin.debug | +| `/f admin integration` | admin.use | + +>[!NOTE] Todos los nodos de permisos tienen el prefijo `hyperfactions.` (ej., `hyperfactions.admin.use`). diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/integrations.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/integrations.md new file mode 100644 index 00000000..f42213b3 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/integrations.md @@ -0,0 +1,47 @@ +--- +id: admin_integrations +--- +# Integraciones de Plugins + +HyperFactions se integra con varios plugins externos +a traves de dependencias suaves. Todas las integraciones +son opcionales y funcionan correctamente si no estan +disponibles. + +## Verificar Estado de Integraciones + +`/f admin version` +Muestra la version actual y las integraciones detectadas. + +`/f admin integration` +Abre el panel de gestion de integraciones con el estado +detallado de cada plugin detectado. + +## Tabla de Integraciones + +| Plugin | Tipo | Descripcion | +|--------|------|-------------| +| **HyperPerms** | Permisos | Sistema completo de permisos con grupos, herencia y contexto | +| **LuckPerms** | Permisos | Proveedor alternativo de permisos | +| **VaultUnlocked** | Permisos/Economia | Puente de permisos y economia | +| **HyperProtect-Mixin** | Proteccion | Habilita indicadores de zona avanzados (explosiones, fuego, conservar inventario) | +| **OrbisGuard-Mixins** | Proteccion | Mixin alternativo para aplicacion de indicadores de zona | +| **PlaceholderAPI** | Marcadores | 49 marcadores de faccion para otros plugins | +| **WiFlow PlaceholderAPI** | Marcadores | Proveedor alternativo de marcadores | +| **GravestonePlugin** | Muerte | Control de acceso a lapidas en zonas | +| **HyperEssentials** | Funciones | Indicadores de zona para hogares, warps y kits | +| **KyuubiSoft Core** | Framework | Integracion de libreria base | +| **Sentry** | Monitoreo | Rastreo de errores y diagnosticos | + +## Prioridad de Proveedor de Permisos + +1. **VaultUnlocked** (mayor prioridad) +2. **HyperPerms** +3. **LuckPerms** +4. **Alternativa de OP** (si no se encuentra proveedor) + +>[!INFO] Las integraciones se detectan una vez al iniciar usando reflexion. Los resultados se almacenan en cache para la sesion. Se requiere reiniciar el servidor despues de agregar o remover un plugin integrado. + +>[!TIP] Usa `/f admin debug toggle integration` para habilitar el registro detallado de integraciones para solucion de problemas. + +>[!NOTE] HyperProtect-Mixin es el mixin de proteccion **recomendado**. Sin el, 15 indicadores de zona no tendran efecto. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_basics.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_basics.md new file mode 100644 index 00000000..e62db056 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_basics.md @@ -0,0 +1,47 @@ +--- +id: admin_zone_basics +--- +# Conceptos Basicos de Zonas + +Las zonas son territorios controlados por el administrador +con reglas personalizadas que anulan la proteccion normal +de facciones. + +## Tipos de Zonas + +- **Zona Segura** -- Sin PvP, sin construccion, sin dano. + Ideal para areas de spawn y centros de comercio. +- **Zona de Guerra** -- PvP siempre habilitado, sin construccion. + Ideal para arenas y areas de batalla disputadas. + +## Crear Zonas + +`/f admin safezone ` +Crea una Zona Segura y reclama tu chunk actual. + +`/f admin warzone ` +Crea una Zona de Guerra y reclama tu chunk actual. + +Despues de la creacion, colocate en chunks adicionales +y usa `/f admin zone claim ` para expandir la zona. + +## Gestionar Chunks de Zonas + +`/f admin zone claim ` +Agrega el chunk actual a la zona indicada. + +`/f admin zone unclaim ` +Remueve el chunk actual de la zona indicada. + +`/f admin zone radius ` +Reclama un cuadrado de chunks alrededor de tu posicion. + +## Eliminar Zonas + +`/f admin removezone ` +Elimina permanentemente la zona y libera todos sus +chunks reclamados. + +>[!WARNING] Eliminar una zona libera todos sus chunks instantaneamente. Esto no se puede deshacer sin una restauracion de copia de seguridad. + +>[!INFO] Las reglas de zona **siempre anulan** las reglas de territorio de faccion. Una Zona Segura dentro de territorio enemigo sigue siendo segura. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_commands.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_commands.md new file mode 100644 index 00000000..dc93989d --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_commands.md @@ -0,0 +1,44 @@ +--- +id: admin_zone_commands +--- +# Referencia de Comandos de Zonas + +Referencia completa de todos los comandos de gestion +de zonas. Todos requieren el permiso `hyperfactions.admin.zones`. + +## Creacion Rapida + +| Comando | Descripcion | +|---------|-------------| +| `/f admin safezone ` | Crear una Zona Segura en el chunk actual | +| `/f admin warzone ` | Crear una Zona de Guerra en el chunk actual | +| `/f admin removezone ` | Eliminar una zona y liberar chunks | + +## Gestion de Zonas + +| Comando | Descripcion | +|---------|-------------| +| `/f admin zone create ` | Crear una zona (safezone/warzone) | +| `/f admin zone delete ` | Eliminar una zona | +| `/f admin zone claim ` | Agregar chunk actual a la zona | +| `/f admin zone unclaim ` | Remover chunk actual de la zona | +| `/f admin zone radius ` | Reclamar radio cuadrado de chunks | +| `/f admin zone list` | Listar todas las zonas con cantidad de chunks | +| `/f admin zone notify ` | Alternar mensajes de entrada/salida | +| `/f admin zone title upper/lower ` | Establecer texto del titulo de zona | +| `/f admin zone properties ` | Abrir la GUI de propiedades de zona | + +## Gestion de Indicadores + +| Comando | Descripcion | +|---------|-------------| +| `/f admin zoneflag ` | Establecer un indicador especifico | + +>[!TIP] Usa la **GUI de propiedades** de zona para un editor visual con interruptores para cada indicador, organizados por categoria. + +## Ejemplos + +- `/f admin safezone Spawn` -- crear proteccion de spawn +- `/f admin zone radius Spawn 3` -- expandir a 7x7 chunks +- `/f admin zoneflag Spawn door_use true` -- permitir puertas +- `/f admin zone notify Spawn true` -- mostrar mensajes de entrada diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_flags.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_flags.md new file mode 100644 index 00000000..645689b4 --- /dev/null +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_flags.md @@ -0,0 +1,44 @@ +--- +id: admin_zone_flags +--- +# Indicadores de Zona + +Las zonas soportan **47 indicadores booleanos** en 10 categorias. +Cada indicador controla un comportamiento especifico dentro de la zona. + +## Resumen de Categorias de Indicadores + +| Categoria | Cantidad | Indicadores Clave | +|----------|-------|-----------| +| Combate | 7 | pvp_enabled, friendly_fire, mob_damage, pve_damage | +| Dano | 4 | fall_damage, explosion_damage, fire_spread | +| Muerte | 2 | keep_inventory, power_loss | +| Construccion | 4 | build_allowed, block_place, hammer_use | +| Interaccion | 13 | door_use, container_use, bench_use, npc_tame | +| Transporte | 3 | teleporter_use, portal_use, mount_entry | +| Objetos | 4 | item_drop, item_pickup, invincible_items | +| Aparicion de Mobs | 5 | mob_spawning, hostile/passive/neutral | +| Limpieza de Mobs | 4 | mob_clear, hostile/passive/neutral clear | +| Integracion | 5 | gravestone_access, show_on_map, essentials_homes | + +## Valores Predeterminados (Zona Segura vs Zona de Guerra) + +| Indicador | Zona Segura | Zona de Guerra | +|------|----------|---------| +| pvp_enabled | false | **true** | +| build_allowed | false | false | +| fall_damage | false | **true** | +| keep_inventory | **true** | false | +| power_loss | false | **true** | +| mob_spawning | false | **true** | +| item_drop | false | **true** | +| door_use | **true** | **true** | +| container_use | false | **true** | + +>[!NOTE] Algunos indicadores requieren **HyperProtect-Mixin** para funcionar (ej., keep_inventory, explosion_damage, fire_spread, block_place, npc_tame). Sin el mixin, estos indicadores no tienen efecto aunque esten habilitados. + +## Establecer Indicadores + +`/f admin zoneflag ` + +>[!TIP] Usa `/f admin zone properties ` para un editor visual con interruptores agrupados por categoria. diff --git a/src/main/resources/Server/Languages/fr-FR/hyperfactions.lang b/src/main/resources/Server/Languages/fr-FR/hyperfactions.lang deleted file mode 100644 index 32931698..00000000 --- a/src/main/resources/Server/Languages/fr-FR/hyperfactions.lang +++ /dev/null @@ -1,452 +0,0 @@ -# Language: French (fr-FR) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with French translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions - English Translations -# Format: key = value (or key = "quoted value") -# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule -# Placeholders: {0}, {1}, etc. - -# ========== Common ========== -common.no_permission = You don't have permission to do that. -common.not_in_faction = You are not in a faction. -common.already_in_faction = You are already in a faction. -common.player_not_found = Player not found. -common.faction_not_found = Faction not found. -common.player_not_online = That player is not online. -common.must_be_leader = Only the faction leader can do that. -common.must_be_officer = You must be an Officer or Leader to do that. -common.combat_tagged = You can't do that while combat tagged. -common.cancel = Cancel -common.confirm = Confirm -common.save = Save -common.close = Close -common.yes = Yes -common.no = No -common.loading = Loading... -common.online = Online -common.offline = Offline -common.enabled = Enabled -common.disabled = Disabled -common.none = None -common.page = Page {0} of {1} -common.unknown = Unknown -common.error_generic = Something went wrong. Please try again. -common.gui_fallback = Could not access GUI. Use /f help for commands. -common.admin_prefix = [Admin] -common.location_error = Could not determine your location. -common.world_error = Could not determine your world. -common.invalid_id = Invalid faction ID. -common.na = N/A - -# ========== Commands - Create ========== -cmd.create.no_permission = You don't have permission to create factions. -cmd.create.usage = Usage: /f create -cmd.create.success = Faction '{0}' created! -cmd.create.already_in_named = You are already in {0}. -cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. -cmd.create.name_taken = That faction name is already taken. -cmd.create.name_too_short = Faction name is too short. -cmd.create.name_too_long = Faction name is too long. -cmd.create.failed = Failed to create faction. - -# ========== Commands - Disband ========== -cmd.disband.no_permission = You don't have permission to disband factions. -cmd.disband.not_leader = Only the faction leader can disband. -cmd.disband.confirm_prompt = Are you sure you want to disband your faction? -cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. -cmd.disband.success = Your faction has been disbanded. -cmd.disband.failed = Failed to disband faction. -cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. - -# ========== Commands - Rename ========== -cmd.rename.no_permission = You don't have permission. -cmd.rename.not_leader = Only the leader can rename the faction. -cmd.rename.usage = Usage: /f rename -cmd.rename.too_short = Name is too short (min {0} chars). -cmd.rename.too_long = Name is too long (max {0} chars). -cmd.rename.name_taken = That name is already taken. -cmd.rename.success = Faction renamed to {0}! -cmd.rename.broadcast = {0} renamed the faction to {1} - -# ========== Commands - Description ========== -cmd.desc.no_permission = You don't have permission. -cmd.desc.not_officer = You must be an officer to set the description. -cmd.desc.set = Faction description set! -cmd.desc.cleared = Faction description cleared. - -# ========== Commands - Open / Close ========== -cmd.open.no_permission = You don't have permission. -cmd.open.not_leader = Only the leader can change this setting. -cmd.open.already_open = Your faction is already open. -cmd.open.success = Your faction is now open! Anyone can join with /f join. -cmd.open.broadcast = {0} opened the faction to public joining. -cmd.close.no_permission = You don't have permission. -cmd.close.not_leader = Only the leader can change this setting. -cmd.close.already_closed = Your faction is already closed. -cmd.close.success = Your faction is now invite-only. -cmd.close.broadcast = {0} closed the faction to invite-only. - -# ========== Commands - Color ========== -cmd.color.no_permission = You don't have permission. -cmd.color.not_officer = You must be an officer to change the color. -cmd.color.colors_disabled = Faction colors are disabled. -cmd.color.usage = Usage: /f color -cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex -cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. -cmd.color.success = Faction color updated! - -# ========== Commands - Claim ========== -cmd.claim.no_permission = You don't have permission to claim territory. -cmd.claim.already_yours = Your faction already owns this chunk. -cmd.claim.cannot_claim_ally = You cannot claim ally territory. -cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. -cmd.claim.success = Claimed chunk at {0}, {1}! -cmd.claim.not_officer = You must be an officer to claim land. -cmd.claim.already_claimed = This chunk is already claimed. -cmd.claim.max_claims = Your faction has reached max claims. Get more power! -cmd.claim.not_adjacent = You must claim adjacent to existing territory. -cmd.claim.world_not_allowed = Claiming is not allowed in this world. -cmd.claim.orbisguard = This area is protected by OrbisGuard. -cmd.claim.zone_protected = This chunk is in a safezone or warzone. -cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. -cmd.claim.failed = Failed to claim chunk. - -# ========== Commands - Invite ========== -cmd.invite.no_permission = You don't have permission to invite players. -cmd.invite.not_officer = You must be an officer to invite players. -cmd.invite.usage = Usage: /f invite -cmd.invite.player_not_found = Player '{0}' not found or offline. -cmd.invite.target_in_faction = That player is already in a faction. -cmd.invite.sent = Invited {0} to your faction. -cmd.invite.received = You have been invited to join {0}! -cmd.invite.accept_hint = Type /f accept {0} to join. - -# ========== Commands - Accept / Join ========== -cmd.join.no_permission = You don't have permission to join factions. -cmd.join.already_in_named = You are already in {0}. -cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.join.no_invites = You have no pending invites. -cmd.join.faction_not_found = Faction '{0}' not found. -cmd.join.not_invited = You have no invite from that faction. -cmd.join.faction_gone = That faction no longer exists. -cmd.join.success = You have joined {0}! -cmd.join.broadcast = {0} has joined the faction! -cmd.join.faction_full = That faction is full. -cmd.join.failed = Failed to join faction. - -# ========== Commands - Kick ========== -cmd.kick.no_permission = You don't have permission to kick members. -cmd.kick.usage = Usage: /f kick -cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. -cmd.kick.success = Kicked {0} from the faction. -cmd.kick.broadcast = {0} was kicked from the faction. -cmd.kick.kicked = You have been kicked from the faction. -cmd.kick.cannot_kick_higher = You don't have permission to kick that player. -cmd.kick.cannot_kick_leader = You cannot kick the faction leader. -cmd.kick.failed = Failed to kick player. - -# ========== Commands - Leave ========== -cmd.leave.no_permission = You don't have permission to leave factions. -cmd.leave.confirm_prompt = Are you sure you want to leave your faction? -cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. -cmd.leave.success = You have left your faction. -cmd.leave.broadcast = {0} has left the faction. -cmd.leave.failed = Failed to leave faction. -cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. - -# ========== Commands - Promote / Demote / Transfer ========== -cmd.rank.promote_no_permission = You don't have permission to promote members. -cmd.rank.promote_usage = Usage: /f promote -cmd.rank.promoted = Promoted {0} to {1}! -cmd.rank.promote_broadcast = {0} was promoted to {1}! -cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. -cmd.rank.promote_failed = Failed to promote player. -cmd.rank.demote_no_permission = You don't have permission to demote members. -cmd.rank.demote_usage = Usage: /f demote -cmd.rank.demoted = Demoted {0} to {1}. -cmd.rank.demote_broadcast = {0} was demoted to {1}. -cmd.rank.already_lowest = That player is already a Member. -cmd.rank.demote_failed = Failed to demote player. -cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. -cmd.rank.transfer_usage = Usage: /f transfer -cmd.rank.player_not_in_faction = Player not found in your faction. -cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? -cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. -cmd.rank.transferred = Transferred leadership to {0}! -cmd.rank.transfer_broadcast = {0} is now the faction leader! -cmd.rank.transfer_failed = Failed to transfer leadership. -cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. - -# ========== Commands - Unclaim ========== -cmd.unclaim.no_permission = You don't have permission to unclaim territory. -cmd.unclaim.success = Unclaimed chunk at {0}, {1}. -cmd.unclaim.not_officer = You must be an officer to unclaim land. -cmd.unclaim.chunk_not_claimed = This chunk is not claimed. -cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. -cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. -cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. -cmd.unclaim.failed = Failed to unclaim chunk. - -# ========== Commands - Overclaim ========== -cmd.overclaim.no_permission = You don't have permission to overclaim territory. -cmd.overclaim.success = Overclaimed enemy territory! -cmd.overclaim.not_officer = You must be an officer to overclaim. -cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. -cmd.overclaim.own_chunk = Your faction already owns this chunk. -cmd.overclaim.ally = You cannot overclaim ally territory. -cmd.overclaim.target_has_power = This faction still has enough power. -cmd.overclaim.failed = Failed to overclaim. - -# ========== Commands - Stuck ========== -cmd.stuck.no_permission = You don't have permission to use /f stuck. -cmd.stuck.not_stuck = You're not stuck - this is wilderness. -cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! -cmd.stuck.no_safe = Could not find a safe location. -cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! - -# ========== Commands - Home ========== -cmd.home.no_permission = You don't have permission to teleport to faction home. -cmd.home.no_home = Your faction has no home set. -cmd.home.combat_tagged = You cannot teleport while in combat! -cmd.home.teleported = Teleported to faction home! - -# ========== Commands - SetHome ========== -cmd.sethome.no_permission = You don't have permission to set faction home. -cmd.sethome.world_not_allowed = Cannot set home in this world. -cmd.sethome.not_in_territory = You can only set home in your faction's territory. -cmd.sethome.set = Faction home set! -cmd.sethome.broadcast = {0} set the faction home. -cmd.sethome.not_officer = You must be an officer to set the home. -cmd.sethome.failed = Failed to set home. - -# ========== Commands - DelHome ========== -cmd.delhome.no_permission = You don't have permission to delete faction home. -cmd.delhome.no_home = Your faction does not have a home set. -cmd.delhome.deleted = Faction home deleted! -cmd.delhome.broadcast = {0} deleted the faction home. -cmd.delhome.not_officer = You must be an officer to delete the home. -cmd.delhome.failed = Failed to delete home. - -# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== -cmd.relation.ally_no_permission = You don't have permission to manage alliances. -cmd.relation.ally_usage = Usage: /f ally -cmd.relation.ally_sent = Ally request sent to {0}! -cmd.relation.ally_formed = You are now allies with {0}! -cmd.relation.already_ally = You are already allied with that faction. -cmd.relation.ally_failed = Failed to send ally request. -cmd.relation.enemy_no_permission = You don't have permission to declare enemies. -cmd.relation.enemy_usage = Usage: /f enemy -cmd.relation.enemy_declared = {0} is now your enemy! -cmd.relation.already_enemy = You are already enemies with that faction. -cmd.relation.max_enemies = You have reached the maximum number of enemies. -cmd.relation.enemy_failed = Failed to set enemy. -cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. -cmd.relation.neutral_usage = Usage: /f neutral -cmd.relation.neutral_set = Your faction is now neutral with {0}. -cmd.relation.already_neutral = You are already neutral with that faction. -cmd.relation.neutral_failed = Failed to set neutral. -cmd.relation.cannot_self = You cannot ally with yourself. -cmd.relation.max_allies = You have reached the maximum number of allies. -cmd.relation.view_no_permission = You don't have permission to view relations. -cmd.relation.header = === Faction Relations === -cmd.relation.allies_count = Allies ({0}): -cmd.relation.enemies_count = Enemies ({0}): -cmd.relation.list_entry = - {0} - -# ========== Commands - Chat ========== -cmd.chat.usage = Usage: /f c [f|a|off] -cmd.chat.no_permission = You don't have permission for that chat mode. -cmd.chat.mode_set = Chat mode set to {0} - -# ========== Commands - Invites ========== -cmd.invites.not_officer = You must be an officer to manage invites. -cmd.invites.header = === Faction Invites === -cmd.invites.no_pending = No pending invites or requests. -cmd.invites.outgoing = Outgoing Invites: -cmd.invites.outgoing_entry = {0} (invited by {1}) -cmd.invites.requests = Join Requests: -cmd.invites.request_entry = {0}{1} -cmd.invites.your_invites_header = === Your Invites === -cmd.invites.no_invites = You have no pending invites. -cmd.invites.invite_entry = {0} - Use /f accept {1} - -# ========== Commands - Request ========== -cmd.request.no_permission = You don't have permission to request faction membership. -cmd.request.already_in_named = You are already in {0}. -cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.request.usage = Usage: /f request [message] -cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. -cmd.request.already_requested = You already have a pending request to that faction. -cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. -cmd.request.sent = Sent join request to {0}! -cmd.request.your_message = Your message: "{0}" -cmd.request.officer_review = An officer will review your request. -cmd.request.officer_notify = {0} has requested to join your faction! -cmd.request.officer_review_hint = Use /f gui > Invites to review. - -# ========== Commands - Info ========== -cmd.info.faction_header = === {0} === -cmd.info.player_header = === {0} === -cmd.info.no_permission = You don't have permission to view faction info. -cmd.info.faction_not_found = Faction '{0}' not found. -cmd.info.not_in_faction_hint = You are not in a faction. Use /f info -cmd.info.leader = Leader: {0} -cmd.info.members = Members: {0}/{1} -cmd.info.power = Power: {0} -cmd.info.claims = Claims: {0} -cmd.info.raidable = RAIDABLE! -cmd.info.allies = Allies: {0} -cmd.info.enemies = Enemies: {0} -cmd.info.they_consider = They consider you: {0} -cmd.info.you_consider = You consider them: {0} -cmd.info.members_no_permission = You don't have permission to view faction members. -cmd.info.members_header = === {0} Members ({1}) === -cmd.info.member_online = [Online] -cmd.info.list_no_permission = You don't have permission to view faction list. -cmd.info.list_empty = There are no factions. -cmd.info.list_header = === Factions ({0}) === -cmd.info.list_entry = {0} - {1} members, {2} power -cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] -cmd.info.help_no_permission = You don't have permission to view help. -cmd.info.who_no_permission = You don't have permission to view player info. -cmd.info.who_faction = Faction: {0} -cmd.info.who_role = Role: {0} -cmd.info.who_joined = Joined: {0} -cmd.info.who_faction_none = Faction: None -cmd.info.who_power = Power: {0} -cmd.info.who_status = Status: {0} -cmd.info.who_last_seen = Last seen: {0} -cmd.info.map_no_permission = You don't have permission to view the map. -cmd.info.map_header = === Territory Map === -cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild -cmd.info.map_gui_hint = Use /f gui for interactive map - -# ========== Commands - Power ========== -cmd.power.personal = Personal Power: {0}/{1} -cmd.power.faction = Faction Power: {0}/{1} -cmd.power.death_loss = Death Loss: {0} -cmd.power.regen = Regen Rate: {0}/hr -cmd.power.no_permission = You don't have permission to view power info. -cmd.power.header = {0}'s Power: -cmd.power.current = Current: {0} - -# ========== Commands - Economy ========== -cmd.economy.balance = Balance: {0} -cmd.economy.deposited = Deposited {0} into the faction treasury. -cmd.economy.withdrawn = Withdrew {0} from the faction treasury. -cmd.economy.transferred = Transferred {0} to {1}. -cmd.economy.insufficient = Insufficient funds in faction treasury. -cmd.economy.invalid_amount = Invalid amount: {0} -cmd.economy.economy_disabled = Economy is disabled. -cmd.economy.balance_no_permission = You don't have permission to view balances. -cmd.economy.treasury_unavailable = Treasury is not available. -cmd.economy.balance_display = {0}'s treasury: {1} -cmd.economy.deposit_no_permission = You don't have permission to deposit. -cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. -cmd.economy.deposit_usage = Usage: /f deposit -cmd.economy.amount_positive = Amount must be positive. -cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} -cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. -cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. -cmd.economy.withdraw_no_permission = You don't have permission to withdraw. -cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. -cmd.economy.withdraw_usage = Usage: /f withdraw -cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} -cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. -cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. -cmd.economy.withdraw_failed = Withdrawal failed: {0} -cmd.economy.transfer_no_permission = You don't have permission to transfer. -cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. -cmd.economy.transfer_usage = Usage: /f money transfer -cmd.economy.transfer_self = Cannot transfer to your own faction. -cmd.economy.transfer_limit_denied = Transfer denied: {0} -cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. -cmd.economy.transfer_failed = Transfer failed: {0} -cmd.economy.log_no_permission = You don't have permission to view the transaction log. -cmd.economy.log_header = Transaction Log (page {0}/{1}) -cmd.economy.log_empty = No transactions found. -cmd.economy.money_help_header = Treasury Commands: -cmd.economy.money_help_balance = /f money balance [faction] - View balance -cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury -cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury -cmd.economy.money_help_transfer = /f money transfer - Transfer between factions -cmd.economy.money_help_log = /f money log [page] [type] - View transaction history - -# ========== Protection - Action Phrases ========== -protection.action.generic = You can't do that -protection.action.build = You can't build or break blocks -protection.action.interact = You can't interact with that -protection.action.door = You can't use doors -protection.action.container = You can't open containers -protection.action.bench = You can't use crafting stations -protection.action.processing = You can't use processing stations -protection.action.seat = You can't use seats -protection.action.light = You can't toggle lights -protection.action.teleporter = You can't use teleporters -protection.action.crate = You can't use crates -protection.action.tame = You can't tame creatures -protection.action.npc = You can't interact with NPCs -protection.action.mount = You can't mount creatures -protection.action.pve = You can't damage creatures -protection.action.item_drop = You can't drop items -protection.action.item_pickup = You can't pick up items - -# ========== Protection - Denial Reasons ========== -protection.denied.safezone = {0} in a SafeZone. -protection.denied.warzone = {0} in a WarZone. -protection.denied.enemy_claim = {0} in enemy territory. -protection.denied.claimed = {0} in claimed territory. -protection.denied.here = {0} here. -protection.denied.zone = {0} in this zone. -protection.denied.faction_perm = {0} here. (Faction permission: {1}) -protection.denied.ally_territory = {0} here. (Ally territory) -protection.denied.error = Protection error — action blocked for safety. - -# ========== Protection - PvP ========== -protection.pvp.safezone = PvP is disabled in SafeZones. -protection.pvp.same_faction = You cannot attack faction members. -protection.pvp.ally = You cannot attack allies. -protection.pvp.spawn_protected = That player has spawn protection. -protection.pvp.territory_disabled = PvP is disabled in this territory. -protection.pvp.generic = You cannot attack this player. - -# ========== Protection - Entity Damage ========== -protection.mob_damage_disabled = Mob damage is disabled in this zone. -protection.pve_damage_disabled = PvE damage is disabled in this zone. -protection.pve_territory_denied = You cannot damage mobs in this territory. - -# ========== Protection - Combat Tag ========== -protection.combat_tag_command = You cannot use that command while combat tagged. - -# ========== Server Announcements ========== -# These are broadcast to all online players for significant faction events. -# {0}, {1} = dynamic values (faction names, player names) -server_announce.faction_created = {0} has founded the faction {1}! -server_announce.faction_disbanded = The faction {0} has been disbanded! -server_announce.leadership_transfer = {0} is now the leader of {1}! -server_announce.overclaim = {0} has overclaimed territory from {1}! -server_announce.war_declared = {0} has declared war on {1}! -server_announce.alliance_formed = {0} and {1} are now allies! -server_announce.alliance_broken = {0} and {1} are no longer allies! - -# ========== Teleport System ========== -teleport.cooldown_wait = You must wait {0} before teleporting again. -teleport.warmup_start = Teleporting to faction home in {0} seconds... -teleport.combat_cancelled = Teleportation cancelled - you are in combat! -teleport.success_default = Teleported to faction home! -teleport.no_home = Your faction has no home set. -teleport.world_not_found = World not found. -teleport.failed = Teleportation failed. -teleport.countdown = Teleporting in {0} seconds... -teleport.countdown_one = Teleporting in 1 second... -teleport.moved_cancelled = Teleportation cancelled - you moved! -teleport.damage_cancelled = Teleportation cancelled - you took damage! -teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. -teleport.mount_entry_blocked = You can't enter this zone while mounted. - -# ========== Chat Display ========== -chat.display.public = Public -chat.display.faction = Faction -chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/fr-FR/hyperfactions_admin.lang b/src/main/resources/Server/Languages/fr-FR/hyperfactions_admin.lang deleted file mode 100644 index 165fd4a8..00000000 --- a/src/main/resources/Server/Languages/fr-FR/hyperfactions_admin.lang +++ /dev/null @@ -1,268 +0,0 @@ -# Language: French (fr-FR) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with French translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions Admin GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule - -# ========== Admin Navigation Bar ========== -nav.dashboard = Dashboard -nav.actions = Actions -nav.factions = Factions -nav.players = Players -nav.economy = Economy -nav.zones = Zones -nav.config = Config -nav.backups = Backups -nav.log = Log -nav.updates = Updates -nav.help = Help -nav.version = Version - -# ========== Common Admin Labels ========== -common.faction_not_found = Faction Not Found -common.no_faction = No Faction -common.not_set = Not set -common.on = On -common.off = Off -common.enable = Enable -common.disable = Disable -common.none_paren = (None) -common.invalid_faction = Invalid faction. -common.leader_prefix = Leader: {0} -common.members_suffix = {0} members -common.claims_suffix = {0} claims -common.factions_suffix = {0} factions -common.players_suffix = {0} players -common.chunks_suffix = {0} chunks -common.entries_suffix = {0} entries -common.found_suffix = {0} found -common.power_format = {0}/{1} power -common.raidable = Raidable -common.protected = Protected -common.no_description = No description set. -common.officers_more = +{0} more -common.custom_max = (custom max) -common.default_max = (default max) -common.now = Now -common.ago_suffix = {0} ago -common.just_now = just now -common.no_membership_history = No membership history - -# ========== Admin Dashboard ========== -dashboard.factions_prefix = Factions: {0} -dashboard.members_prefix = Total Members: {0} -dashboard.claims_prefix = Total Claims: {0} - -# ========== Admin Actions ========== -actions.confirm_reset = Confirm Reset? -actions.confirm_trigger = Confirm Trigger? -actions.kd_reset = Reset K/D for {0} players. -actions.kd_reset_failed = Failed to reset K/D: {0} -actions.upkeep_unavailable = Upkeep processor is not available. -actions.upkeep_triggered = Upkeep collection triggered. -actions.upkeep_failed = Upkeep failed: {0} - -# ========== Admin Disband ========== -disband.faction_gone = Faction no longer exists. -disband.success = Faction '{0}' has been disbanded. -disband.failed = Failed to disband: {0} -disband.no_leader = Faction has no leader, cannot disband. - -# ========== Admin Unclaim All ========== -unclaim.removed = [Admin] Removed {0} claims from {1}. -unclaim.no_claims = {0} had no claims to remove. - -# ========== Admin Factions List ========== -factions.home_not_set = Not set -factions.teleported = Teleported to {0}'s home. -factions.no_home = Faction has no home set. -factions.world_not_found = Target world not found. - -# ========== Admin Faction Info ========== -info.faction_gone = This faction no longer exists. - -# ========== Admin Faction Members ========== -members.sort_role = Role -members.sort_online = Online -members.sort_name = Name -members.sort_power = Power -members.promoted = [Admin] Promoted {0} to {1}. -members.demoted = [Admin] Demoted {0} to {1}. -members.kicked = [Admin] Kicked {0} from the faction. - -# ========== Admin Faction Relations ========== -relations.allies_header = ALLIES ({0}) -relations.enemies_header = ENEMIES ({0}) -relations.no_allies = No allies. -relations.no_enemies = No enemies. -relations.neutral_count = {0} neutral factions -relations.since_today = Since: today -relations.since_one_day = Since: 1 day ago -relations.since_days = Since: {0} days ago -relations.set_ally = [Admin] Set mutual ally status with {0}. -relations.set_enemy = Set mutual enemy status with {0}. -relations.set_neutral = [Admin] Set mutual neutral status with {0}. - -# ========== Admin Faction Settings ========== -settings.locked = This setting is locked by server configuration. -settings.perm_toggled = Set {0} to {1}. -settings.color_changed = Set faction color to {0}. -settings.recruitment_set = Set recruitment to {0}. -settings.no_home = [Admin] This faction has no home set. -settings.home_cleared = Cleared faction home for {0}. - -# ========== Sort Dropdown Labels ========== -sort.power = Power -sort.name = Name -sort.members = Members -sort.balance = Balance - -# ========== Admin Players ========== -players.sort_last_online = Last Online -players.sort_faction = Faction -players.sort_online = Online -players.not_online = Player is not online. -players.world_not_found = Target world not found. -players.teleported = [Admin] Teleported to {0}. - -# ========== Admin Player Info ========== -playerinfo.disband_faction = Disband Faction -playerinfo.kick_leader = Kick Leader -playerinfo.enter_valid_number = Enter a valid number. -playerinfo.enter_valid_positive = Enter a valid positive number. -playerinfo.faction_gone = Faction no longer exists. -playerinfo.kd_reset = Reset K/D for {0}. -playerinfo.kicked_success = Kicked {0} from {1}. -playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. -playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). - -# ========== Admin Economy ========== -economy.no_data = No factions with economy data. -economy.amount_zero = Amount cannot be zero. -economy.enter_amount = Please enter an amount. -economy.invalid_number = Invalid number: {0} -economy.error = An error occurred. -economy.balance_negative = Balance cannot be negative. -economy.failed = Failed: {0} -economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. -economy.bulk_failures = ({0} failed) - -# ========== Admin Zones ========== -zones.not_found = Zone not found. -zones.invalid_id = Invalid zone ID. -zones.deleted = Zone {0} deleted. -zones.delete_failed = Failed to delete zone: {0} -zones.no_chunks = No chunks -zones.chunks_suffix = {0} ({1} chunks) - -# ========== Zone Create Wizard ========== -wizard.enter_name = Please enter a zone name. -wizard.name_too_short = Zone name must be at least {0} characters. -wizard.name_too_long = Zone name cannot exceed {0} characters. -wizard.name_taken = A zone with this name already exists. -wizard.radius_range = Radius must be between 1 and {0}. -wizard.create_failed = Could not create zone: {0} -wizard.created_not_found = Zone created but could not be found. -wizard.created = Created {0} '{1}'! -wizard.chunk_claimed = Claimed chunk ({0}, {1}). -wizard.chunk_failed = Could not claim current chunk: {0} -wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. -wizard.radius_no_claims = No chunks could be claimed (area may be occupied). -wizard.no_claims = Zone created with no claims. -wizard.chunks_preview = ~{0} chunks - -# ========== Zone Rename ========== -zone_rename.zone_gone = Zone no longer exists. -zone_rename.enter_name = Please enter a zone name. -zone_rename.too_short = Zone name must be at least {0} character. -zone_rename.too_long = Zone name cannot exceed {0} characters. -zone_rename.same_name = That's already this zone's name. -zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! -zone_rename.name_taken = A zone with that name already exists. -zone_rename.invalid_name = Invalid zone name. -zone_rename.rename_failed = Failed to rename zone: {0} - -# ========== Zone Change Type ========== -zone_type.zone_gone = Zone no longer exists. -zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). -zone_type.failed = Failed to change zone type: {0} - -# ========== Zone Integration Flags ========== -zone_int.zone_not_found = Zone Not Found -zone_int.no_plugin = (no plugin) -zone_int.default = (default) -zone_int.custom = (custom) - -# ========== Activity Log ========== -log.all_types = All Types -log.no_logs = No activity logs matching filters. - -# ========== Version Page ========== -version.active = Active -version.not_found = Not Found -version.not_detected = Not Detected -version.not_installed = Not Installed -version.active_version = Active (v{0}) -version.active_compatible = Active (compatible) -version.active_claims_only = Active (claims only) -version.installed_no_perm = Installed (no perm provider) -version.active_provider = Active ({0}) - -# ========== Admin Main Page ========== -main.reload_hint = Use /f reload to reload configuration. -main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. - -# ========== Zone Flags/Settings ========== -zflags.invalid_flag = Invalid flag. -zflags.zone_not_found = Zone not found. -zflags.conflict = (conflict) -zflags.mixin = (mixin) -zflags.reset_int = Reset integration flags to defaults. -zflags.reset_all = Reset all flags to defaults. -zflags.reset_failed = Failed to reset flags: {0} -zflags.back_to_settings = Back to Settings - -# ========== Zone Properties ========== -zprop.current_custom = Current: "{0}" (custom) -zprop.current_default = Current: "{0}" (default) -zprop.pvp_disabled = PvP Disabled -zprop.pvp_enabled = PvP Enabled -zprop.name_empty = Name cannot be empty. -zprop.renamed = Zone renamed to "{0}". -zprop.name_taken = A zone with that name already exists. -zprop.name_invalid = Invalid name (max 32 characters). -zprop.rename_failed = Failed to rename: {0} -zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. -zprop.upper_set = Upper title set. -zprop.upper_reset = Upper title reset to default. -zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. -zprop.lower_set = Lower title set. -zprop.lower_reset = Lower title reset to default. - -# ========== Relations Additional ========== -relations.failed = Failed: {0} - -# ========== Members Additional ========== -members.never = Never -members.teleported = [Admin] Teleported to {0}. - -# ========== Player Info Additional ========== -playerinfo.records = {0} records -playerinfo.joined_date = Joined: {0} -playerinfo.current = Current -playerinfo.left_date = Left: {0} - -# ========== Zone Map ========== -map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' -map.position = Your Position: Chunk ({0}, {1}) -map.zone_gone = Zone no longer exists. -map.claimed = Claimed chunk ({0}, {1}) for {2}. -map.claim_failed = Failed to claim chunk: {0} -map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. -map.unclaim_failed = Failed to unclaim chunk: {0} -map.chunk_belongs = This chunk belongs to {0}. -map.chunk_faction = This chunk is claimed by a faction. -map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/fr-FR/hyperfactions_gui.lang b/src/main/resources/Server/Languages/fr-FR/hyperfactions_gui.lang deleted file mode 100644 index dd53d6a4..00000000 --- a/src/main/resources/Server/Languages/fr-FR/hyperfactions_gui.lang +++ /dev/null @@ -1,446 +0,0 @@ -# Language: French (fr-FR) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with French translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule - -# ========== Navigation Bar ========== -nav.dashboard = Dashboard -nav.chat = Chat -nav.members = Members -nav.invites = Invites -nav.browser = Browse -nav.map = Map -nav.leaderboard = Leaderboard -nav.relations = Relations -nav.treasury = Treasury -nav.settings = Settings -nav.logs = Logs -nav.help = Help -nav.admin = Admin -nav.create = Create - -# ========== Help Category Names ========== -help.category.welcome = Welcome -help.category.your_faction = Your Faction -help.category.power_land = Power & Land -help.category.diplomacy = Diplomacy -help.category.combat = Combat & Safety -help.category.economy = Economy -help.category.quick_ref = Quick Reference - -# ========== Main Menu ========== -main_menu.section_my_faction = My Faction -main_menu.section_get_started = Get Started -main_menu.section_territory = Territory -main_menu.section_browse = Browse -main_menu.section_admin = Admin -main_menu.claim_hint = Use /f claim to claim territory. - -# ========== Faction Info Page ========== -faction_info.no_description = No description set. -faction_info.status_open = Open -faction_info.status_invite_only = Invite Only -faction_info.status_raidable = Raidable -faction_info.status_protected = Protected -faction_info.officers_more = +{0} more - -# ========== Rename Modal ========== -rename.no_permission = You don't have permission to rename the faction. -rename.enter_name = Please enter a faction name. -rename.too_short = Faction name must be at least {0} characters. -rename.too_long = Faction name cannot exceed {0} characters. -rename.same_name = That's already your faction's name. -rename.name_taken = A faction with that name already exists. -rename.success = Faction renamed from {0} to {1}! - -# ========== Description Modal ========== -desc.no_permission = You don't have permission to edit the description. -desc.display_none = (None) -desc.cleared = Faction description cleared. -desc.updated = Faction description updated! - -# ========== Tag Modal ========== -tag.no_permission = You don't have permission to edit the tag. -tag.display_none = (None) -tag.cleared = Faction tag cleared. -tag.too_short = Tag must be at least {0} character. -tag.too_long = Tag cannot exceed {0} characters. -tag.invalid_format = Tag can only contain letters and numbers. -tag.same_tag = That's already your faction's tag. -tag.tag_taken = A faction with that tag already exists. -tag.success = Faction tag set to [{0}]! - -# ========== Dashboard Page ========== -dashboard.faction_gone = Your faction no longer exists. -dashboard.available = {0} available -dashboard.at_risk = At Risk! -dashboard.online_count = {0} online -dashboard.status_invite = Invite -dashboard.in_grace = IN GRACE -dashboard.billable_chunks = {0} billable chunks -dashboard.btn_home = Home -dashboard.btn_set_home = Set Home -dashboard.btn_claim = Claim -dashboard.chat_prefix = Chat: {0} -dashboard.btn_leave = Leave -dashboard.no_activity = No recent activity. -dashboard.time_now = now -dashboard.time_minutes = {0}m ago -dashboard.time_hours = {0}h ago -dashboard.time_days = {0}d ago -dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. -dashboard.chat_mode_set = Chat mode: {0} -dashboard.claim_success = Claimed chunk at ({0}, {1}) - -# ========== Faction Main Page ========== -main.no_faction = No Faction -main.joined = You joined the faction! -main.join_failed = Failed to join faction: {0} -main.invite_declined = Invite declined. -main.cooldown = Teleport on cooldown! {0}s remaining. -main.world_not_found = Cannot teleport - world not found. -main.leave_failed = Failed to leave: {0} - -# ========== Shared GUI Labels ========== -common.faction_count = {0} factions -common.leader_label = Leader: {0} -common.sort_power = Power -common.sort_members = Members -common.page_format = {0}/{1} -common.own_faction = (You) - -# ========== Members Page ========== -members.count = {0} members -members.sort_role = Role -members.sort_last_online = Last Online -members.just_now = just now -members.ago = {0} ago -members.never = Never -members.member_not_found = Member not found. -members.promoted = Promoted {0} to {1}. -members.promote_failed = Failed to promote: {0} -members.demoted = Demoted {0} to {1}. -members.demote_failed = Failed to demote: {0} -members.kicked = Kicked {0} from the faction. -members.kick_failed = Failed to kick: {0} - -# ========== Browser Page ========== -browser.sort_name = Name -browser.invalid_faction = Invalid faction. - -# ========== Leaderboard Page ========== -leaderboard.sort_kd = K/D -leaderboard.sort_territory = Territory -leaderboard.sort_balance = Balance - -# ========== Player Info Page ========== -playerinfo.now = Now -playerinfo.history_count = {0} records -playerinfo.joined_label = Joined: {0} -playerinfo.current = Current -playerinfo.left_label = Left: {0} -playerinfo.no_history = No membership history -playerinfo.faction_gone = Faction no longer exists. -playerinfo.reason_active = ACTIVE -playerinfo.reason_left = LEFT -playerinfo.reason_kicked = KICKED -playerinfo.reason_disbanded = DISBANDED - -# ========== Relations Page ========== -relations.relation_count = {0} relations -relations.request_count = {0} requests -relations.type_ally = Ally -relations.type_enemy = Enemy -relations.type_incoming = Incoming -relations.type_outgoing = Outgoing -relations.incoming_request = Incoming request -relations.outgoing_request = Outgoing request -relations.empty_relations = No relations yet. -relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. -relations.empty_pending = No pending ally requests. -relations.today = Today -relations.one_day_ago = 1 day ago -relations.days_ago = {0} days ago -relations.now_neutral = Now neutral with {0}. -relations.now_enemies = Now enemies with {0}! -relations.request_sent = Alliance request sent to {0}. -relations.now_allied = Now allied with {0}! -relations.request_declined = Ally request from {0} declined. -relations.request_cancelled = Ally request to {0} cancelled. -relations.failed = Failed: {0} -relations.search_hint = Search for a faction to set relation -relations.no_results = No factions found matching '{0}' -relations.power_display = {0} power -relations.member_count = {0} members - -# ========== Settings Page ========== -settings.officers_only = Only officers and leaders can change faction settings. -settings.display_none = (None) -settings.home_not_set = Not set -settings.no_permission = You don't have permission to change settings. -settings.only_leader_disband = Only the leader can disband the faction. -settings.perm_locked = This setting is locked by the server. -settings.no_perm_edit = You don't have permission to edit territory permissions. -settings.only_leader_officers = Only the leader can change officer access. -settings.pvp_enabled = Enabled -settings.pvp_disabled = Disabled -settings.not_in_territory = You must be in your faction's territory to set home. -settings.home_set = Faction home set to your current location! -settings.recruitment_set = Recruitment set to {0}. -settings.home_no_set = Your faction does not have a home set. -settings.home_deleted = Faction home deleted! - -# ========== Modules Page ========== -modules.treasury_name = Treasury -modules.treasury_desc = Faction bank & economy system -modules.raids_name = Raids -modules.raids_desc = Scheduled faction battles -modules.levels_name = Levels -modules.levels_desc = Faction progression & XP -modules.war_name = War -modules.war_desc = Formal war declarations -modules.coming_soon = Coming Soon -modules.active = Active -modules.view_treasury = View Treasury -modules.unavailable = Unavailable -modules.no_economy = No economy plugin detected -modules.disabled = Disabled -modules.economy_not_available = Economy features are not available on this server - -# ========== Treasury Page ========== -treasury.wallet_label = Your wallet: {0} -treasury.treasury_label = Treasury balance: {0} -treasury.chunks_detail = {0} free + {1} billable chunks -treasury.cost_label = Cost: {0} -treasury.pending = Pending -treasury.auto_pay_on = Auto-pay: ON -treasury.auto_pay_off = Auto-pay: OFF -treasury.runway_90_plus = 90+ days -treasury.runway_days = {0} days -treasury.runway_day = {0} day -treasury.runway_less_day = < 1 day -treasury.runway_no_funds = No funds -treasury.grace_expires = Grace expires in: {0} -treasury.missed_payments = Missed payments: {0} -treasury.pay_to_clear = Pay {0} to clear grace -treasury.system = System -treasury.type_deposit = Deposit -treasury.type_withdrawal = Withdrawal -treasury.type_transfer_in = Transfer In -treasury.type_transfer_out = Transfer Out -treasury.type_player_transfer = Player Transfer -treasury.type_upkeep = Upkeep -treasury.type_tax = Tax Collection -treasury.type_war_cost = War Cost -treasury.type_raid_cost = Raid Cost -treasury.type_spoils = Spoils -treasury.type_admin = Admin Adjustment -treasury.deposit_title = Deposit to Treasury -treasury.withdraw_title = Withdraw from Treasury -treasury.fee_label = Fee ({0}%) -treasury.confirm_deposit = Confirm Deposit -treasury.confirm_withdrawal = Confirm Withdrawal -treasury.from_wallet = {0} from wallet -treasury.to_wallet = {0} to wallet -treasury.enter_valid_amount = Enter a valid positive amount. -treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. -treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. -treasury.deposit_failed_returned = Failed to deposit. Money returned. -treasury.deposited = Deposited {0} into the treasury. -treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) -treasury.no_withdraw_permission = You don't have permission to withdraw. -treasury.withdraw_denied = Withdrawal denied: {0} -treasury.insufficient_treasury = Insufficient funds in treasury. -treasury.withdraw_limit = Withdrawal limit exceeded. -treasury.withdraw_failed = Withdrawal failed: {0} -treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. -treasury.withdrew = Withdrew {0} from the treasury. -treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) -treasury.search_hint = Search for a player or faction -treasury.no_results = No results for '{0}' -treasury.tag_player = [Player] -treasury.tag_faction = [Faction] -treasury.source_online = Online -treasury.source_offline = Offline -treasury.source_player_db = Hytale player -treasury.no_transfer_permission = You don't have permission to transfer. -treasury.transfer_denied = Transfer denied: {0} -treasury.invalid_target_faction = Invalid target faction. -treasury.target_faction_gone = Target faction no longer exists. -treasury.transfer_failed = Transfer failed: {0} -treasury.transfer_failed_returned = Transfer failed. Funds returned. -treasury.transferred = Transferred {0} to {1}. -treasury.invalid_target_player = Invalid target player. -treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. -treasury.leader_only_perms = Only the leader can change treasury permissions. -treasury.leader_only_upkeep = Only the leader can change upkeep settings. -treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. - -# ========== Confirmation Pages ========== -confirm.disband_not_leader = Only the leader can disband the faction. -confirm.disbanded = Faction '{0}' has been disbanded. -confirm.disband_failed = Failed to disband faction. -confirm.succession_title = Leadership will transfer to: -confirm.no_members_warning = WARNING: No other members! -confirm.will_disband = Leaving will disband the faction permanently. -confirm.not_in_faction = You are not in this faction. -confirm.not_leader_anymore = You are no longer the leader. -confirm.no_successor = No successor available. Use disband instead. -confirm.transfer_failed = Failed to transfer leadership: {0} -confirm.leader_left = Leadership transferred to {0}. You have left {1}. -confirm.leave_failed = Failed to leave faction: {0} -confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. -confirm.left_faction = You have left {0}. -confirm.faction_gone = Faction no longer exists. -confirm.not_leader_transfer = Only the leader can transfer leadership. -confirm.leadership_transferred = Leadership transferred to {0}. - -# ========== Logs Viewer Page ========== -logs.title = {0} - Activity Logs -logs.entry_count = {0} entries -logs.all_types = All Types -logs.no_logs_type = No logs of this type. -logs.no_logs = No activity logs yet. - -# ========== Chat Page ========== -chat.placeholder = Type a message... -chat.no_messages = No messages yet. -chat.no_ally_permission = You don't have permission for ally chat. -chat.no_permission = No permission. -chat.faction_gone = Your faction no longer exists. -chat.time_now = now -chat.time_minutes = {0}m -chat.time_hours = {0}h - -# ========== Invites Page ========== -invites.invite_count = {0} invites -invites.request_count = {0} requests -invites.invited_by = Invited by: {0} -invites.no_message = No message -invites.expires = Expires: {0} -invites.type_outgoing = Outgoing -invites.type_request = Request -invites.invited_by_label = Invited by: -invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. -invites.empty_requests = No join requests. Players can request to join with /f request. -invites.invalid_player = Invalid player. -invites.cancelled_invite = Cancelled invite to {0}. -invites.player_joined = {0} has joined the faction! -invites.faction_full = Faction is full. Cannot accept request. -invites.add_failed = Failed to add player to faction. -invites.request_expired = Request not found or expired. -invites.request_declined = Declined join request from {0}. -invites.time_seconds = {0}s -invites.time_minutes = {0}m -invites.time_hours = {0}h - -# ========== Map Page ========== -map.position = Your Position: Chunk ({0}, {1}) -map.legend_protected = Protected -map.claim_stats = Claims: {0}/{1} ({2} Available) -map.overclaimed = OVERCLAIMED by {0}! -map.power_display = Power: {0}/{1} -map.join_to_claim = Join a faction to claim -map.claim_success = Claimed chunk at ({0}, {1})! -map.claim_not_in_faction = You must be in a faction to claim territory. -map.claim_not_officer = Only officers and leaders can claim territory. -map.claim_already_yours = You already own this chunk. -map.claim_already_claimed = This chunk is already claimed by another faction. -map.claim_not_adjacent = You can only claim chunks adjacent to your territory. -map.claim_max = You have reached your maximum claim limit. -map.claim_world_not_allowed = Claiming is not allowed in this world. -map.claim_orbisguard = This area is protected by OrbisGuard. -map.claim_failed = Failed to claim chunk. -map.unclaim_success = Unclaimed chunk at ({0}, {1}). -map.unclaim_not_in_faction = You must be in a faction. -map.unclaim_not_officer = Only officers and leaders can unclaim territory. -map.unclaim_not_claimed = This chunk is not claimed. -map.unclaim_not_yours = This chunk belongs to another faction. -map.unclaim_home = Cannot unclaim the chunk containing your faction home. -map.unclaim_failed = Failed to unclaim chunk. -map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! -map.overclaim_not_in_faction = You must be in a faction. -map.overclaim_not_officer = Only officers and leaders can overclaim territory. -map.overclaim_already_yours = You already own this chunk. -map.overclaim_ally = You cannot overclaim allied territory. -map.overclaim_has_power = This faction has enough power to defend their territory. -map.overclaim_max = You have reached your maximum claim limit. -map.overclaim_failed = Failed to overclaim chunk. -# ========== Create Faction Page ========== -create.preview_name = Your Faction Name -create.leader_prefix = Leader: {0} -create.enter_name = Please enter a faction name. -create.name_too_short = Faction name must be at least {0} characters. -create.name_too_long = Faction name cannot exceed {0} characters. -create.name_taken = A faction with this name already exists. -create.tag_length = Faction tag must be {0}-{1} characters. -create.tag_format = Faction tag can only contain letters and numbers. -create.desc_too_long = Description cannot exceed {0} characters. -create.created = Faction {0} created successfully! -create.created_no_dashboard = Faction created but could not open dashboard. -create.invalid_name = Invalid faction name. -create.create_failed = Could not create faction. - -# ========== New Player Pages ========== -newplayer.pending_count = {0} pending -newplayer.received_header = RECEIVED INVITES ({0}) -newplayer.requests_header = YOUR REQUESTS ({0}) -newplayer.no_invites = No invites. Browse factions to find one! -newplayer.no_requests = No pending requests. -newplayer.invited_by = Invited by: {0} -newplayer.member_count = {0} members -newplayer.power_count = {0} power -newplayer.claim_count = {0} claims -newplayer.awaiting_review = Awaiting review -newplayer.expires_in = Expires in {0}h -newplayer.time_just_now = just now -newplayer.time_minutes = {0} min ago -newplayer.time_hours = {0}h ago -newplayer.time_days = {0}d ago -newplayer.invalid_faction = Invalid faction. -newplayer.invite_expired = This invite has expired or was revoked. -newplayer.faction_gone = Faction no longer exists. -newplayer.joined = You joined {0}! -newplayer.faction_full = This faction is full. -newplayer.join_failed = Could not join faction. -newplayer.invite_declined = Invite declined. -newplayer.request_cancelled = Cancelled request to join {0}. -newplayer.faction_count = {0} factions -newplayer.browse_subtitle = Find your new home! -newplayer.sort_power = Power -newplayer.sort_name = Name -newplayer.sort_members = Members -newplayer.btn_accept = Accept -newplayer.btn_pending = Pending -newplayer.btn_join = Join -newplayer.btn_request = Request -newplayer.invite_only_msg = This faction is invite-only. -newplayer.welcome_hint = Welcome! Use /f to open faction menu. -newplayer.faction_open_hint = This faction is open! Click JOIN instead. -newplayer.already_requested = You already have a pending request to this faction. -newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. -newplayer.request_sent = Join request sent to {0}! -newplayer.officer_review = An officer will review your request. -newplayer.map_hint = View Only - Join a faction to claim territory! - -# Player Settings -nav.player_settings = Settings -player_settings.title = Player Settings -player_settings.language_section = Language -player_settings.auto_detect = Auto-detect from client -player_settings.auto_detect_desc = Uses your game client's language setting -player_settings.language_label = Language -player_settings.notifications_section = Notifications -player_settings.territory_alerts = Territory Alerts -player_settings.territory_alerts_desc = Show notifications when entering/leaving territories -player_settings.death_announcements = Death Broadcasts -player_settings.death_announcements_desc = Receive faction member death location announcements -player_settings.power_notifications = Power Changes -player_settings.power_notifications_desc = Show messages when your power changes -player_settings.language_changed = Language changed to {0} -player_settings.pref_enabled = {0} enabled -player_settings.pref_disabled = {0} disabled diff --git a/src/main/resources/Server/Languages/ja-JP/hyperfactions.lang b/src/main/resources/Server/Languages/ja-JP/hyperfactions.lang deleted file mode 100644 index 69d52da6..00000000 --- a/src/main/resources/Server/Languages/ja-JP/hyperfactions.lang +++ /dev/null @@ -1,452 +0,0 @@ -# Language: Japanese (ja-JP) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Japanese translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions - English Translations -# Format: key = value (or key = "quoted value") -# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule -# Placeholders: {0}, {1}, etc. - -# ========== Common ========== -common.no_permission = You don't have permission to do that. -common.not_in_faction = You are not in a faction. -common.already_in_faction = You are already in a faction. -common.player_not_found = Player not found. -common.faction_not_found = Faction not found. -common.player_not_online = That player is not online. -common.must_be_leader = Only the faction leader can do that. -common.must_be_officer = You must be an Officer or Leader to do that. -common.combat_tagged = You can't do that while combat tagged. -common.cancel = Cancel -common.confirm = Confirm -common.save = Save -common.close = Close -common.yes = Yes -common.no = No -common.loading = Loading... -common.online = Online -common.offline = Offline -common.enabled = Enabled -common.disabled = Disabled -common.none = None -common.page = Page {0} of {1} -common.unknown = Unknown -common.error_generic = Something went wrong. Please try again. -common.gui_fallback = Could not access GUI. Use /f help for commands. -common.admin_prefix = [Admin] -common.location_error = Could not determine your location. -common.world_error = Could not determine your world. -common.invalid_id = Invalid faction ID. -common.na = N/A - -# ========== Commands - Create ========== -cmd.create.no_permission = You don't have permission to create factions. -cmd.create.usage = Usage: /f create -cmd.create.success = Faction '{0}' created! -cmd.create.already_in_named = You are already in {0}. -cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. -cmd.create.name_taken = That faction name is already taken. -cmd.create.name_too_short = Faction name is too short. -cmd.create.name_too_long = Faction name is too long. -cmd.create.failed = Failed to create faction. - -# ========== Commands - Disband ========== -cmd.disband.no_permission = You don't have permission to disband factions. -cmd.disband.not_leader = Only the faction leader can disband. -cmd.disband.confirm_prompt = Are you sure you want to disband your faction? -cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. -cmd.disband.success = Your faction has been disbanded. -cmd.disband.failed = Failed to disband faction. -cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. - -# ========== Commands - Rename ========== -cmd.rename.no_permission = You don't have permission. -cmd.rename.not_leader = Only the leader can rename the faction. -cmd.rename.usage = Usage: /f rename -cmd.rename.too_short = Name is too short (min {0} chars). -cmd.rename.too_long = Name is too long (max {0} chars). -cmd.rename.name_taken = That name is already taken. -cmd.rename.success = Faction renamed to {0}! -cmd.rename.broadcast = {0} renamed the faction to {1} - -# ========== Commands - Description ========== -cmd.desc.no_permission = You don't have permission. -cmd.desc.not_officer = You must be an officer to set the description. -cmd.desc.set = Faction description set! -cmd.desc.cleared = Faction description cleared. - -# ========== Commands - Open / Close ========== -cmd.open.no_permission = You don't have permission. -cmd.open.not_leader = Only the leader can change this setting. -cmd.open.already_open = Your faction is already open. -cmd.open.success = Your faction is now open! Anyone can join with /f join. -cmd.open.broadcast = {0} opened the faction to public joining. -cmd.close.no_permission = You don't have permission. -cmd.close.not_leader = Only the leader can change this setting. -cmd.close.already_closed = Your faction is already closed. -cmd.close.success = Your faction is now invite-only. -cmd.close.broadcast = {0} closed the faction to invite-only. - -# ========== Commands - Color ========== -cmd.color.no_permission = You don't have permission. -cmd.color.not_officer = You must be an officer to change the color. -cmd.color.colors_disabled = Faction colors are disabled. -cmd.color.usage = Usage: /f color -cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex -cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. -cmd.color.success = Faction color updated! - -# ========== Commands - Claim ========== -cmd.claim.no_permission = You don't have permission to claim territory. -cmd.claim.already_yours = Your faction already owns this chunk. -cmd.claim.cannot_claim_ally = You cannot claim ally territory. -cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. -cmd.claim.success = Claimed chunk at {0}, {1}! -cmd.claim.not_officer = You must be an officer to claim land. -cmd.claim.already_claimed = This chunk is already claimed. -cmd.claim.max_claims = Your faction has reached max claims. Get more power! -cmd.claim.not_adjacent = You must claim adjacent to existing territory. -cmd.claim.world_not_allowed = Claiming is not allowed in this world. -cmd.claim.orbisguard = This area is protected by OrbisGuard. -cmd.claim.zone_protected = This chunk is in a safezone or warzone. -cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. -cmd.claim.failed = Failed to claim chunk. - -# ========== Commands - Invite ========== -cmd.invite.no_permission = You don't have permission to invite players. -cmd.invite.not_officer = You must be an officer to invite players. -cmd.invite.usage = Usage: /f invite -cmd.invite.player_not_found = Player '{0}' not found or offline. -cmd.invite.target_in_faction = That player is already in a faction. -cmd.invite.sent = Invited {0} to your faction. -cmd.invite.received = You have been invited to join {0}! -cmd.invite.accept_hint = Type /f accept {0} to join. - -# ========== Commands - Accept / Join ========== -cmd.join.no_permission = You don't have permission to join factions. -cmd.join.already_in_named = You are already in {0}. -cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.join.no_invites = You have no pending invites. -cmd.join.faction_not_found = Faction '{0}' not found. -cmd.join.not_invited = You have no invite from that faction. -cmd.join.faction_gone = That faction no longer exists. -cmd.join.success = You have joined {0}! -cmd.join.broadcast = {0} has joined the faction! -cmd.join.faction_full = That faction is full. -cmd.join.failed = Failed to join faction. - -# ========== Commands - Kick ========== -cmd.kick.no_permission = You don't have permission to kick members. -cmd.kick.usage = Usage: /f kick -cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. -cmd.kick.success = Kicked {0} from the faction. -cmd.kick.broadcast = {0} was kicked from the faction. -cmd.kick.kicked = You have been kicked from the faction. -cmd.kick.cannot_kick_higher = You don't have permission to kick that player. -cmd.kick.cannot_kick_leader = You cannot kick the faction leader. -cmd.kick.failed = Failed to kick player. - -# ========== Commands - Leave ========== -cmd.leave.no_permission = You don't have permission to leave factions. -cmd.leave.confirm_prompt = Are you sure you want to leave your faction? -cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. -cmd.leave.success = You have left your faction. -cmd.leave.broadcast = {0} has left the faction. -cmd.leave.failed = Failed to leave faction. -cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. - -# ========== Commands - Promote / Demote / Transfer ========== -cmd.rank.promote_no_permission = You don't have permission to promote members. -cmd.rank.promote_usage = Usage: /f promote -cmd.rank.promoted = Promoted {0} to {1}! -cmd.rank.promote_broadcast = {0} was promoted to {1}! -cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. -cmd.rank.promote_failed = Failed to promote player. -cmd.rank.demote_no_permission = You don't have permission to demote members. -cmd.rank.demote_usage = Usage: /f demote -cmd.rank.demoted = Demoted {0} to {1}. -cmd.rank.demote_broadcast = {0} was demoted to {1}. -cmd.rank.already_lowest = That player is already a Member. -cmd.rank.demote_failed = Failed to demote player. -cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. -cmd.rank.transfer_usage = Usage: /f transfer -cmd.rank.player_not_in_faction = Player not found in your faction. -cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? -cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. -cmd.rank.transferred = Transferred leadership to {0}! -cmd.rank.transfer_broadcast = {0} is now the faction leader! -cmd.rank.transfer_failed = Failed to transfer leadership. -cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. - -# ========== Commands - Unclaim ========== -cmd.unclaim.no_permission = You don't have permission to unclaim territory. -cmd.unclaim.success = Unclaimed chunk at {0}, {1}. -cmd.unclaim.not_officer = You must be an officer to unclaim land. -cmd.unclaim.chunk_not_claimed = This chunk is not claimed. -cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. -cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. -cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. -cmd.unclaim.failed = Failed to unclaim chunk. - -# ========== Commands - Overclaim ========== -cmd.overclaim.no_permission = You don't have permission to overclaim territory. -cmd.overclaim.success = Overclaimed enemy territory! -cmd.overclaim.not_officer = You must be an officer to overclaim. -cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. -cmd.overclaim.own_chunk = Your faction already owns this chunk. -cmd.overclaim.ally = You cannot overclaim ally territory. -cmd.overclaim.target_has_power = This faction still has enough power. -cmd.overclaim.failed = Failed to overclaim. - -# ========== Commands - Stuck ========== -cmd.stuck.no_permission = You don't have permission to use /f stuck. -cmd.stuck.not_stuck = You're not stuck - this is wilderness. -cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! -cmd.stuck.no_safe = Could not find a safe location. -cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! - -# ========== Commands - Home ========== -cmd.home.no_permission = You don't have permission to teleport to faction home. -cmd.home.no_home = Your faction has no home set. -cmd.home.combat_tagged = You cannot teleport while in combat! -cmd.home.teleported = Teleported to faction home! - -# ========== Commands - SetHome ========== -cmd.sethome.no_permission = You don't have permission to set faction home. -cmd.sethome.world_not_allowed = Cannot set home in this world. -cmd.sethome.not_in_territory = You can only set home in your faction's territory. -cmd.sethome.set = Faction home set! -cmd.sethome.broadcast = {0} set the faction home. -cmd.sethome.not_officer = You must be an officer to set the home. -cmd.sethome.failed = Failed to set home. - -# ========== Commands - DelHome ========== -cmd.delhome.no_permission = You don't have permission to delete faction home. -cmd.delhome.no_home = Your faction does not have a home set. -cmd.delhome.deleted = Faction home deleted! -cmd.delhome.broadcast = {0} deleted the faction home. -cmd.delhome.not_officer = You must be an officer to delete the home. -cmd.delhome.failed = Failed to delete home. - -# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== -cmd.relation.ally_no_permission = You don't have permission to manage alliances. -cmd.relation.ally_usage = Usage: /f ally -cmd.relation.ally_sent = Ally request sent to {0}! -cmd.relation.ally_formed = You are now allies with {0}! -cmd.relation.already_ally = You are already allied with that faction. -cmd.relation.ally_failed = Failed to send ally request. -cmd.relation.enemy_no_permission = You don't have permission to declare enemies. -cmd.relation.enemy_usage = Usage: /f enemy -cmd.relation.enemy_declared = {0} is now your enemy! -cmd.relation.already_enemy = You are already enemies with that faction. -cmd.relation.max_enemies = You have reached the maximum number of enemies. -cmd.relation.enemy_failed = Failed to set enemy. -cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. -cmd.relation.neutral_usage = Usage: /f neutral -cmd.relation.neutral_set = Your faction is now neutral with {0}. -cmd.relation.already_neutral = You are already neutral with that faction. -cmd.relation.neutral_failed = Failed to set neutral. -cmd.relation.cannot_self = You cannot ally with yourself. -cmd.relation.max_allies = You have reached the maximum number of allies. -cmd.relation.view_no_permission = You don't have permission to view relations. -cmd.relation.header = === Faction Relations === -cmd.relation.allies_count = Allies ({0}): -cmd.relation.enemies_count = Enemies ({0}): -cmd.relation.list_entry = - {0} - -# ========== Commands - Chat ========== -cmd.chat.usage = Usage: /f c [f|a|off] -cmd.chat.no_permission = You don't have permission for that chat mode. -cmd.chat.mode_set = Chat mode set to {0} - -# ========== Commands - Invites ========== -cmd.invites.not_officer = You must be an officer to manage invites. -cmd.invites.header = === Faction Invites === -cmd.invites.no_pending = No pending invites or requests. -cmd.invites.outgoing = Outgoing Invites: -cmd.invites.outgoing_entry = {0} (invited by {1}) -cmd.invites.requests = Join Requests: -cmd.invites.request_entry = {0}{1} -cmd.invites.your_invites_header = === Your Invites === -cmd.invites.no_invites = You have no pending invites. -cmd.invites.invite_entry = {0} - Use /f accept {1} - -# ========== Commands - Request ========== -cmd.request.no_permission = You don't have permission to request faction membership. -cmd.request.already_in_named = You are already in {0}. -cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.request.usage = Usage: /f request [message] -cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. -cmd.request.already_requested = You already have a pending request to that faction. -cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. -cmd.request.sent = Sent join request to {0}! -cmd.request.your_message = Your message: "{0}" -cmd.request.officer_review = An officer will review your request. -cmd.request.officer_notify = {0} has requested to join your faction! -cmd.request.officer_review_hint = Use /f gui > Invites to review. - -# ========== Commands - Info ========== -cmd.info.faction_header = === {0} === -cmd.info.player_header = === {0} === -cmd.info.no_permission = You don't have permission to view faction info. -cmd.info.faction_not_found = Faction '{0}' not found. -cmd.info.not_in_faction_hint = You are not in a faction. Use /f info -cmd.info.leader = Leader: {0} -cmd.info.members = Members: {0}/{1} -cmd.info.power = Power: {0} -cmd.info.claims = Claims: {0} -cmd.info.raidable = RAIDABLE! -cmd.info.allies = Allies: {0} -cmd.info.enemies = Enemies: {0} -cmd.info.they_consider = They consider you: {0} -cmd.info.you_consider = You consider them: {0} -cmd.info.members_no_permission = You don't have permission to view faction members. -cmd.info.members_header = === {0} Members ({1}) === -cmd.info.member_online = [Online] -cmd.info.list_no_permission = You don't have permission to view faction list. -cmd.info.list_empty = There are no factions. -cmd.info.list_header = === Factions ({0}) === -cmd.info.list_entry = {0} - {1} members, {2} power -cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] -cmd.info.help_no_permission = You don't have permission to view help. -cmd.info.who_no_permission = You don't have permission to view player info. -cmd.info.who_faction = Faction: {0} -cmd.info.who_role = Role: {0} -cmd.info.who_joined = Joined: {0} -cmd.info.who_faction_none = Faction: None -cmd.info.who_power = Power: {0} -cmd.info.who_status = Status: {0} -cmd.info.who_last_seen = Last seen: {0} -cmd.info.map_no_permission = You don't have permission to view the map. -cmd.info.map_header = === Territory Map === -cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild -cmd.info.map_gui_hint = Use /f gui for interactive map - -# ========== Commands - Power ========== -cmd.power.personal = Personal Power: {0}/{1} -cmd.power.faction = Faction Power: {0}/{1} -cmd.power.death_loss = Death Loss: {0} -cmd.power.regen = Regen Rate: {0}/hr -cmd.power.no_permission = You don't have permission to view power info. -cmd.power.header = {0}'s Power: -cmd.power.current = Current: {0} - -# ========== Commands - Economy ========== -cmd.economy.balance = Balance: {0} -cmd.economy.deposited = Deposited {0} into the faction treasury. -cmd.economy.withdrawn = Withdrew {0} from the faction treasury. -cmd.economy.transferred = Transferred {0} to {1}. -cmd.economy.insufficient = Insufficient funds in faction treasury. -cmd.economy.invalid_amount = Invalid amount: {0} -cmd.economy.economy_disabled = Economy is disabled. -cmd.economy.balance_no_permission = You don't have permission to view balances. -cmd.economy.treasury_unavailable = Treasury is not available. -cmd.economy.balance_display = {0}'s treasury: {1} -cmd.economy.deposit_no_permission = You don't have permission to deposit. -cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. -cmd.economy.deposit_usage = Usage: /f deposit -cmd.economy.amount_positive = Amount must be positive. -cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} -cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. -cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. -cmd.economy.withdraw_no_permission = You don't have permission to withdraw. -cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. -cmd.economy.withdraw_usage = Usage: /f withdraw -cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} -cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. -cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. -cmd.economy.withdraw_failed = Withdrawal failed: {0} -cmd.economy.transfer_no_permission = You don't have permission to transfer. -cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. -cmd.economy.transfer_usage = Usage: /f money transfer -cmd.economy.transfer_self = Cannot transfer to your own faction. -cmd.economy.transfer_limit_denied = Transfer denied: {0} -cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. -cmd.economy.transfer_failed = Transfer failed: {0} -cmd.economy.log_no_permission = You don't have permission to view the transaction log. -cmd.economy.log_header = Transaction Log (page {0}/{1}) -cmd.economy.log_empty = No transactions found. -cmd.economy.money_help_header = Treasury Commands: -cmd.economy.money_help_balance = /f money balance [faction] - View balance -cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury -cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury -cmd.economy.money_help_transfer = /f money transfer - Transfer between factions -cmd.economy.money_help_log = /f money log [page] [type] - View transaction history - -# ========== Protection - Action Phrases ========== -protection.action.generic = You can't do that -protection.action.build = You can't build or break blocks -protection.action.interact = You can't interact with that -protection.action.door = You can't use doors -protection.action.container = You can't open containers -protection.action.bench = You can't use crafting stations -protection.action.processing = You can't use processing stations -protection.action.seat = You can't use seats -protection.action.light = You can't toggle lights -protection.action.teleporter = You can't use teleporters -protection.action.crate = You can't use crates -protection.action.tame = You can't tame creatures -protection.action.npc = You can't interact with NPCs -protection.action.mount = You can't mount creatures -protection.action.pve = You can't damage creatures -protection.action.item_drop = You can't drop items -protection.action.item_pickup = You can't pick up items - -# ========== Protection - Denial Reasons ========== -protection.denied.safezone = {0} in a SafeZone. -protection.denied.warzone = {0} in a WarZone. -protection.denied.enemy_claim = {0} in enemy territory. -protection.denied.claimed = {0} in claimed territory. -protection.denied.here = {0} here. -protection.denied.zone = {0} in this zone. -protection.denied.faction_perm = {0} here. (Faction permission: {1}) -protection.denied.ally_territory = {0} here. (Ally territory) -protection.denied.error = Protection error — action blocked for safety. - -# ========== Protection - PvP ========== -protection.pvp.safezone = PvP is disabled in SafeZones. -protection.pvp.same_faction = You cannot attack faction members. -protection.pvp.ally = You cannot attack allies. -protection.pvp.spawn_protected = That player has spawn protection. -protection.pvp.territory_disabled = PvP is disabled in this territory. -protection.pvp.generic = You cannot attack this player. - -# ========== Protection - Entity Damage ========== -protection.mob_damage_disabled = Mob damage is disabled in this zone. -protection.pve_damage_disabled = PvE damage is disabled in this zone. -protection.pve_territory_denied = You cannot damage mobs in this territory. - -# ========== Protection - Combat Tag ========== -protection.combat_tag_command = You cannot use that command while combat tagged. - -# ========== Server Announcements ========== -# These are broadcast to all online players for significant faction events. -# {0}, {1} = dynamic values (faction names, player names) -server_announce.faction_created = {0} has founded the faction {1}! -server_announce.faction_disbanded = The faction {0} has been disbanded! -server_announce.leadership_transfer = {0} is now the leader of {1}! -server_announce.overclaim = {0} has overclaimed territory from {1}! -server_announce.war_declared = {0} has declared war on {1}! -server_announce.alliance_formed = {0} and {1} are now allies! -server_announce.alliance_broken = {0} and {1} are no longer allies! - -# ========== Teleport System ========== -teleport.cooldown_wait = You must wait {0} before teleporting again. -teleport.warmup_start = Teleporting to faction home in {0} seconds... -teleport.combat_cancelled = Teleportation cancelled - you are in combat! -teleport.success_default = Teleported to faction home! -teleport.no_home = Your faction has no home set. -teleport.world_not_found = World not found. -teleport.failed = Teleportation failed. -teleport.countdown = Teleporting in {0} seconds... -teleport.countdown_one = Teleporting in 1 second... -teleport.moved_cancelled = Teleportation cancelled - you moved! -teleport.damage_cancelled = Teleportation cancelled - you took damage! -teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. -teleport.mount_entry_blocked = You can't enter this zone while mounted. - -# ========== Chat Display ========== -chat.display.public = Public -chat.display.faction = Faction -chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/ja-JP/hyperfactions_admin.lang b/src/main/resources/Server/Languages/ja-JP/hyperfactions_admin.lang deleted file mode 100644 index 2e8d5b94..00000000 --- a/src/main/resources/Server/Languages/ja-JP/hyperfactions_admin.lang +++ /dev/null @@ -1,268 +0,0 @@ -# Language: Japanese (ja-JP) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Japanese translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions Admin GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule - -# ========== Admin Navigation Bar ========== -nav.dashboard = Dashboard -nav.actions = Actions -nav.factions = Factions -nav.players = Players -nav.economy = Economy -nav.zones = Zones -nav.config = Config -nav.backups = Backups -nav.log = Log -nav.updates = Updates -nav.help = Help -nav.version = Version - -# ========== Common Admin Labels ========== -common.faction_not_found = Faction Not Found -common.no_faction = No Faction -common.not_set = Not set -common.on = On -common.off = Off -common.enable = Enable -common.disable = Disable -common.none_paren = (None) -common.invalid_faction = Invalid faction. -common.leader_prefix = Leader: {0} -common.members_suffix = {0} members -common.claims_suffix = {0} claims -common.factions_suffix = {0} factions -common.players_suffix = {0} players -common.chunks_suffix = {0} chunks -common.entries_suffix = {0} entries -common.found_suffix = {0} found -common.power_format = {0}/{1} power -common.raidable = Raidable -common.protected = Protected -common.no_description = No description set. -common.officers_more = +{0} more -common.custom_max = (custom max) -common.default_max = (default max) -common.now = Now -common.ago_suffix = {0} ago -common.just_now = just now -common.no_membership_history = No membership history - -# ========== Admin Dashboard ========== -dashboard.factions_prefix = Factions: {0} -dashboard.members_prefix = Total Members: {0} -dashboard.claims_prefix = Total Claims: {0} - -# ========== Admin Actions ========== -actions.confirm_reset = Confirm Reset? -actions.confirm_trigger = Confirm Trigger? -actions.kd_reset = Reset K/D for {0} players. -actions.kd_reset_failed = Failed to reset K/D: {0} -actions.upkeep_unavailable = Upkeep processor is not available. -actions.upkeep_triggered = Upkeep collection triggered. -actions.upkeep_failed = Upkeep failed: {0} - -# ========== Admin Disband ========== -disband.faction_gone = Faction no longer exists. -disband.success = Faction '{0}' has been disbanded. -disband.failed = Failed to disband: {0} -disband.no_leader = Faction has no leader, cannot disband. - -# ========== Admin Unclaim All ========== -unclaim.removed = [Admin] Removed {0} claims from {1}. -unclaim.no_claims = {0} had no claims to remove. - -# ========== Admin Factions List ========== -factions.home_not_set = Not set -factions.teleported = Teleported to {0}'s home. -factions.no_home = Faction has no home set. -factions.world_not_found = Target world not found. - -# ========== Admin Faction Info ========== -info.faction_gone = This faction no longer exists. - -# ========== Admin Faction Members ========== -members.sort_role = Role -members.sort_online = Online -members.sort_name = Name -members.sort_power = Power -members.promoted = [Admin] Promoted {0} to {1}. -members.demoted = [Admin] Demoted {0} to {1}. -members.kicked = [Admin] Kicked {0} from the faction. - -# ========== Admin Faction Relations ========== -relations.allies_header = ALLIES ({0}) -relations.enemies_header = ENEMIES ({0}) -relations.no_allies = No allies. -relations.no_enemies = No enemies. -relations.neutral_count = {0} neutral factions -relations.since_today = Since: today -relations.since_one_day = Since: 1 day ago -relations.since_days = Since: {0} days ago -relations.set_ally = [Admin] Set mutual ally status with {0}. -relations.set_enemy = Set mutual enemy status with {0}. -relations.set_neutral = [Admin] Set mutual neutral status with {0}. - -# ========== Admin Faction Settings ========== -settings.locked = This setting is locked by server configuration. -settings.perm_toggled = Set {0} to {1}. -settings.color_changed = Set faction color to {0}. -settings.recruitment_set = Set recruitment to {0}. -settings.no_home = [Admin] This faction has no home set. -settings.home_cleared = Cleared faction home for {0}. - -# ========== Sort Dropdown Labels ========== -sort.power = Power -sort.name = Name -sort.members = Members -sort.balance = Balance - -# ========== Admin Players ========== -players.sort_last_online = Last Online -players.sort_faction = Faction -players.sort_online = Online -players.not_online = Player is not online. -players.world_not_found = Target world not found. -players.teleported = [Admin] Teleported to {0}. - -# ========== Admin Player Info ========== -playerinfo.disband_faction = Disband Faction -playerinfo.kick_leader = Kick Leader -playerinfo.enter_valid_number = Enter a valid number. -playerinfo.enter_valid_positive = Enter a valid positive number. -playerinfo.faction_gone = Faction no longer exists. -playerinfo.kd_reset = Reset K/D for {0}. -playerinfo.kicked_success = Kicked {0} from {1}. -playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. -playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). - -# ========== Admin Economy ========== -economy.no_data = No factions with economy data. -economy.amount_zero = Amount cannot be zero. -economy.enter_amount = Please enter an amount. -economy.invalid_number = Invalid number: {0} -economy.error = An error occurred. -economy.balance_negative = Balance cannot be negative. -economy.failed = Failed: {0} -economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. -economy.bulk_failures = ({0} failed) - -# ========== Admin Zones ========== -zones.not_found = Zone not found. -zones.invalid_id = Invalid zone ID. -zones.deleted = Zone {0} deleted. -zones.delete_failed = Failed to delete zone: {0} -zones.no_chunks = No chunks -zones.chunks_suffix = {0} ({1} chunks) - -# ========== Zone Create Wizard ========== -wizard.enter_name = Please enter a zone name. -wizard.name_too_short = Zone name must be at least {0} characters. -wizard.name_too_long = Zone name cannot exceed {0} characters. -wizard.name_taken = A zone with this name already exists. -wizard.radius_range = Radius must be between 1 and {0}. -wizard.create_failed = Could not create zone: {0} -wizard.created_not_found = Zone created but could not be found. -wizard.created = Created {0} '{1}'! -wizard.chunk_claimed = Claimed chunk ({0}, {1}). -wizard.chunk_failed = Could not claim current chunk: {0} -wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. -wizard.radius_no_claims = No chunks could be claimed (area may be occupied). -wizard.no_claims = Zone created with no claims. -wizard.chunks_preview = ~{0} chunks - -# ========== Zone Rename ========== -zone_rename.zone_gone = Zone no longer exists. -zone_rename.enter_name = Please enter a zone name. -zone_rename.too_short = Zone name must be at least {0} character. -zone_rename.too_long = Zone name cannot exceed {0} characters. -zone_rename.same_name = That's already this zone's name. -zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! -zone_rename.name_taken = A zone with that name already exists. -zone_rename.invalid_name = Invalid zone name. -zone_rename.rename_failed = Failed to rename zone: {0} - -# ========== Zone Change Type ========== -zone_type.zone_gone = Zone no longer exists. -zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). -zone_type.failed = Failed to change zone type: {0} - -# ========== Zone Integration Flags ========== -zone_int.zone_not_found = Zone Not Found -zone_int.no_plugin = (no plugin) -zone_int.default = (default) -zone_int.custom = (custom) - -# ========== Activity Log ========== -log.all_types = All Types -log.no_logs = No activity logs matching filters. - -# ========== Version Page ========== -version.active = Active -version.not_found = Not Found -version.not_detected = Not Detected -version.not_installed = Not Installed -version.active_version = Active (v{0}) -version.active_compatible = Active (compatible) -version.active_claims_only = Active (claims only) -version.installed_no_perm = Installed (no perm provider) -version.active_provider = Active ({0}) - -# ========== Admin Main Page ========== -main.reload_hint = Use /f reload to reload configuration. -main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. - -# ========== Zone Flags/Settings ========== -zflags.invalid_flag = Invalid flag. -zflags.zone_not_found = Zone not found. -zflags.conflict = (conflict) -zflags.mixin = (mixin) -zflags.reset_int = Reset integration flags to defaults. -zflags.reset_all = Reset all flags to defaults. -zflags.reset_failed = Failed to reset flags: {0} -zflags.back_to_settings = Back to Settings - -# ========== Zone Properties ========== -zprop.current_custom = Current: "{0}" (custom) -zprop.current_default = Current: "{0}" (default) -zprop.pvp_disabled = PvP Disabled -zprop.pvp_enabled = PvP Enabled -zprop.name_empty = Name cannot be empty. -zprop.renamed = Zone renamed to "{0}". -zprop.name_taken = A zone with that name already exists. -zprop.name_invalid = Invalid name (max 32 characters). -zprop.rename_failed = Failed to rename: {0} -zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. -zprop.upper_set = Upper title set. -zprop.upper_reset = Upper title reset to default. -zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. -zprop.lower_set = Lower title set. -zprop.lower_reset = Lower title reset to default. - -# ========== Relations Additional ========== -relations.failed = Failed: {0} - -# ========== Members Additional ========== -members.never = Never -members.teleported = [Admin] Teleported to {0}. - -# ========== Player Info Additional ========== -playerinfo.records = {0} records -playerinfo.joined_date = Joined: {0} -playerinfo.current = Current -playerinfo.left_date = Left: {0} - -# ========== Zone Map ========== -map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' -map.position = Your Position: Chunk ({0}, {1}) -map.zone_gone = Zone no longer exists. -map.claimed = Claimed chunk ({0}, {1}) for {2}. -map.claim_failed = Failed to claim chunk: {0} -map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. -map.unclaim_failed = Failed to unclaim chunk: {0} -map.chunk_belongs = This chunk belongs to {0}. -map.chunk_faction = This chunk is claimed by a faction. -map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/ja-JP/hyperfactions_gui.lang b/src/main/resources/Server/Languages/ja-JP/hyperfactions_gui.lang deleted file mode 100644 index f5d674f0..00000000 --- a/src/main/resources/Server/Languages/ja-JP/hyperfactions_gui.lang +++ /dev/null @@ -1,446 +0,0 @@ -# Language: Japanese (ja-JP) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Japanese translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule - -# ========== Navigation Bar ========== -nav.dashboard = Dashboard -nav.chat = Chat -nav.members = Members -nav.invites = Invites -nav.browser = Browse -nav.map = Map -nav.leaderboard = Leaderboard -nav.relations = Relations -nav.treasury = Treasury -nav.settings = Settings -nav.logs = Logs -nav.help = Help -nav.admin = Admin -nav.create = Create - -# ========== Help Category Names ========== -help.category.welcome = Welcome -help.category.your_faction = Your Faction -help.category.power_land = Power & Land -help.category.diplomacy = Diplomacy -help.category.combat = Combat & Safety -help.category.economy = Economy -help.category.quick_ref = Quick Reference - -# ========== Main Menu ========== -main_menu.section_my_faction = My Faction -main_menu.section_get_started = Get Started -main_menu.section_territory = Territory -main_menu.section_browse = Browse -main_menu.section_admin = Admin -main_menu.claim_hint = Use /f claim to claim territory. - -# ========== Faction Info Page ========== -faction_info.no_description = No description set. -faction_info.status_open = Open -faction_info.status_invite_only = Invite Only -faction_info.status_raidable = Raidable -faction_info.status_protected = Protected -faction_info.officers_more = +{0} more - -# ========== Rename Modal ========== -rename.no_permission = You don't have permission to rename the faction. -rename.enter_name = Please enter a faction name. -rename.too_short = Faction name must be at least {0} characters. -rename.too_long = Faction name cannot exceed {0} characters. -rename.same_name = That's already your faction's name. -rename.name_taken = A faction with that name already exists. -rename.success = Faction renamed from {0} to {1}! - -# ========== Description Modal ========== -desc.no_permission = You don't have permission to edit the description. -desc.display_none = (None) -desc.cleared = Faction description cleared. -desc.updated = Faction description updated! - -# ========== Tag Modal ========== -tag.no_permission = You don't have permission to edit the tag. -tag.display_none = (None) -tag.cleared = Faction tag cleared. -tag.too_short = Tag must be at least {0} character. -tag.too_long = Tag cannot exceed {0} characters. -tag.invalid_format = Tag can only contain letters and numbers. -tag.same_tag = That's already your faction's tag. -tag.tag_taken = A faction with that tag already exists. -tag.success = Faction tag set to [{0}]! - -# ========== Dashboard Page ========== -dashboard.faction_gone = Your faction no longer exists. -dashboard.available = {0} available -dashboard.at_risk = At Risk! -dashboard.online_count = {0} online -dashboard.status_invite = Invite -dashboard.in_grace = IN GRACE -dashboard.billable_chunks = {0} billable chunks -dashboard.btn_home = Home -dashboard.btn_set_home = Set Home -dashboard.btn_claim = Claim -dashboard.chat_prefix = Chat: {0} -dashboard.btn_leave = Leave -dashboard.no_activity = No recent activity. -dashboard.time_now = now -dashboard.time_minutes = {0}m ago -dashboard.time_hours = {0}h ago -dashboard.time_days = {0}d ago -dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. -dashboard.chat_mode_set = Chat mode: {0} -dashboard.claim_success = Claimed chunk at ({0}, {1}) - -# ========== Faction Main Page ========== -main.no_faction = No Faction -main.joined = You joined the faction! -main.join_failed = Failed to join faction: {0} -main.invite_declined = Invite declined. -main.cooldown = Teleport on cooldown! {0}s remaining. -main.world_not_found = Cannot teleport - world not found. -main.leave_failed = Failed to leave: {0} - -# ========== Shared GUI Labels ========== -common.faction_count = {0} factions -common.leader_label = Leader: {0} -common.sort_power = Power -common.sort_members = Members -common.page_format = {0}/{1} -common.own_faction = (You) - -# ========== Members Page ========== -members.count = {0} members -members.sort_role = Role -members.sort_last_online = Last Online -members.just_now = just now -members.ago = {0} ago -members.never = Never -members.member_not_found = Member not found. -members.promoted = Promoted {0} to {1}. -members.promote_failed = Failed to promote: {0} -members.demoted = Demoted {0} to {1}. -members.demote_failed = Failed to demote: {0} -members.kicked = Kicked {0} from the faction. -members.kick_failed = Failed to kick: {0} - -# ========== Browser Page ========== -browser.sort_name = Name -browser.invalid_faction = Invalid faction. - -# ========== Leaderboard Page ========== -leaderboard.sort_kd = K/D -leaderboard.sort_territory = Territory -leaderboard.sort_balance = Balance - -# ========== Player Info Page ========== -playerinfo.now = Now -playerinfo.history_count = {0} records -playerinfo.joined_label = Joined: {0} -playerinfo.current = Current -playerinfo.left_label = Left: {0} -playerinfo.no_history = No membership history -playerinfo.faction_gone = Faction no longer exists. -playerinfo.reason_active = ACTIVE -playerinfo.reason_left = LEFT -playerinfo.reason_kicked = KICKED -playerinfo.reason_disbanded = DISBANDED - -# ========== Relations Page ========== -relations.relation_count = {0} relations -relations.request_count = {0} requests -relations.type_ally = Ally -relations.type_enemy = Enemy -relations.type_incoming = Incoming -relations.type_outgoing = Outgoing -relations.incoming_request = Incoming request -relations.outgoing_request = Outgoing request -relations.empty_relations = No relations yet. -relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. -relations.empty_pending = No pending ally requests. -relations.today = Today -relations.one_day_ago = 1 day ago -relations.days_ago = {0} days ago -relations.now_neutral = Now neutral with {0}. -relations.now_enemies = Now enemies with {0}! -relations.request_sent = Alliance request sent to {0}. -relations.now_allied = Now allied with {0}! -relations.request_declined = Ally request from {0} declined. -relations.request_cancelled = Ally request to {0} cancelled. -relations.failed = Failed: {0} -relations.search_hint = Search for a faction to set relation -relations.no_results = No factions found matching '{0}' -relations.power_display = {0} power -relations.member_count = {0} members - -# ========== Settings Page ========== -settings.officers_only = Only officers and leaders can change faction settings. -settings.display_none = (None) -settings.home_not_set = Not set -settings.no_permission = You don't have permission to change settings. -settings.only_leader_disband = Only the leader can disband the faction. -settings.perm_locked = This setting is locked by the server. -settings.no_perm_edit = You don't have permission to edit territory permissions. -settings.only_leader_officers = Only the leader can change officer access. -settings.pvp_enabled = Enabled -settings.pvp_disabled = Disabled -settings.not_in_territory = You must be in your faction's territory to set home. -settings.home_set = Faction home set to your current location! -settings.recruitment_set = Recruitment set to {0}. -settings.home_no_set = Your faction does not have a home set. -settings.home_deleted = Faction home deleted! - -# ========== Modules Page ========== -modules.treasury_name = Treasury -modules.treasury_desc = Faction bank & economy system -modules.raids_name = Raids -modules.raids_desc = Scheduled faction battles -modules.levels_name = Levels -modules.levels_desc = Faction progression & XP -modules.war_name = War -modules.war_desc = Formal war declarations -modules.coming_soon = Coming Soon -modules.active = Active -modules.view_treasury = View Treasury -modules.unavailable = Unavailable -modules.no_economy = No economy plugin detected -modules.disabled = Disabled -modules.economy_not_available = Economy features are not available on this server - -# ========== Treasury Page ========== -treasury.wallet_label = Your wallet: {0} -treasury.treasury_label = Treasury balance: {0} -treasury.chunks_detail = {0} free + {1} billable chunks -treasury.cost_label = Cost: {0} -treasury.pending = Pending -treasury.auto_pay_on = Auto-pay: ON -treasury.auto_pay_off = Auto-pay: OFF -treasury.runway_90_plus = 90+ days -treasury.runway_days = {0} days -treasury.runway_day = {0} day -treasury.runway_less_day = < 1 day -treasury.runway_no_funds = No funds -treasury.grace_expires = Grace expires in: {0} -treasury.missed_payments = Missed payments: {0} -treasury.pay_to_clear = Pay {0} to clear grace -treasury.system = System -treasury.type_deposit = Deposit -treasury.type_withdrawal = Withdrawal -treasury.type_transfer_in = Transfer In -treasury.type_transfer_out = Transfer Out -treasury.type_player_transfer = Player Transfer -treasury.type_upkeep = Upkeep -treasury.type_tax = Tax Collection -treasury.type_war_cost = War Cost -treasury.type_raid_cost = Raid Cost -treasury.type_spoils = Spoils -treasury.type_admin = Admin Adjustment -treasury.deposit_title = Deposit to Treasury -treasury.withdraw_title = Withdraw from Treasury -treasury.fee_label = Fee ({0}%) -treasury.confirm_deposit = Confirm Deposit -treasury.confirm_withdrawal = Confirm Withdrawal -treasury.from_wallet = {0} from wallet -treasury.to_wallet = {0} to wallet -treasury.enter_valid_amount = Enter a valid positive amount. -treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. -treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. -treasury.deposit_failed_returned = Failed to deposit. Money returned. -treasury.deposited = Deposited {0} into the treasury. -treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) -treasury.no_withdraw_permission = You don't have permission to withdraw. -treasury.withdraw_denied = Withdrawal denied: {0} -treasury.insufficient_treasury = Insufficient funds in treasury. -treasury.withdraw_limit = Withdrawal limit exceeded. -treasury.withdraw_failed = Withdrawal failed: {0} -treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. -treasury.withdrew = Withdrew {0} from the treasury. -treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) -treasury.search_hint = Search for a player or faction -treasury.no_results = No results for '{0}' -treasury.tag_player = [Player] -treasury.tag_faction = [Faction] -treasury.source_online = Online -treasury.source_offline = Offline -treasury.source_player_db = Hytale player -treasury.no_transfer_permission = You don't have permission to transfer. -treasury.transfer_denied = Transfer denied: {0} -treasury.invalid_target_faction = Invalid target faction. -treasury.target_faction_gone = Target faction no longer exists. -treasury.transfer_failed = Transfer failed: {0} -treasury.transfer_failed_returned = Transfer failed. Funds returned. -treasury.transferred = Transferred {0} to {1}. -treasury.invalid_target_player = Invalid target player. -treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. -treasury.leader_only_perms = Only the leader can change treasury permissions. -treasury.leader_only_upkeep = Only the leader can change upkeep settings. -treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. - -# ========== Confirmation Pages ========== -confirm.disband_not_leader = Only the leader can disband the faction. -confirm.disbanded = Faction '{0}' has been disbanded. -confirm.disband_failed = Failed to disband faction. -confirm.succession_title = Leadership will transfer to: -confirm.no_members_warning = WARNING: No other members! -confirm.will_disband = Leaving will disband the faction permanently. -confirm.not_in_faction = You are not in this faction. -confirm.not_leader_anymore = You are no longer the leader. -confirm.no_successor = No successor available. Use disband instead. -confirm.transfer_failed = Failed to transfer leadership: {0} -confirm.leader_left = Leadership transferred to {0}. You have left {1}. -confirm.leave_failed = Failed to leave faction: {0} -confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. -confirm.left_faction = You have left {0}. -confirm.faction_gone = Faction no longer exists. -confirm.not_leader_transfer = Only the leader can transfer leadership. -confirm.leadership_transferred = Leadership transferred to {0}. - -# ========== Logs Viewer Page ========== -logs.title = {0} - Activity Logs -logs.entry_count = {0} entries -logs.all_types = All Types -logs.no_logs_type = No logs of this type. -logs.no_logs = No activity logs yet. - -# ========== Chat Page ========== -chat.placeholder = Type a message... -chat.no_messages = No messages yet. -chat.no_ally_permission = You don't have permission for ally chat. -chat.no_permission = No permission. -chat.faction_gone = Your faction no longer exists. -chat.time_now = now -chat.time_minutes = {0}m -chat.time_hours = {0}h - -# ========== Invites Page ========== -invites.invite_count = {0} invites -invites.request_count = {0} requests -invites.invited_by = Invited by: {0} -invites.no_message = No message -invites.expires = Expires: {0} -invites.type_outgoing = Outgoing -invites.type_request = Request -invites.invited_by_label = Invited by: -invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. -invites.empty_requests = No join requests. Players can request to join with /f request. -invites.invalid_player = Invalid player. -invites.cancelled_invite = Cancelled invite to {0}. -invites.player_joined = {0} has joined the faction! -invites.faction_full = Faction is full. Cannot accept request. -invites.add_failed = Failed to add player to faction. -invites.request_expired = Request not found or expired. -invites.request_declined = Declined join request from {0}. -invites.time_seconds = {0}s -invites.time_minutes = {0}m -invites.time_hours = {0}h - -# ========== Map Page ========== -map.position = Your Position: Chunk ({0}, {1}) -map.legend_protected = Protected -map.claim_stats = Claims: {0}/{1} ({2} Available) -map.overclaimed = OVERCLAIMED by {0}! -map.power_display = Power: {0}/{1} -map.join_to_claim = Join a faction to claim -map.claim_success = Claimed chunk at ({0}, {1})! -map.claim_not_in_faction = You must be in a faction to claim territory. -map.claim_not_officer = Only officers and leaders can claim territory. -map.claim_already_yours = You already own this chunk. -map.claim_already_claimed = This chunk is already claimed by another faction. -map.claim_not_adjacent = You can only claim chunks adjacent to your territory. -map.claim_max = You have reached your maximum claim limit. -map.claim_world_not_allowed = Claiming is not allowed in this world. -map.claim_orbisguard = This area is protected by OrbisGuard. -map.claim_failed = Failed to claim chunk. -map.unclaim_success = Unclaimed chunk at ({0}, {1}). -map.unclaim_not_in_faction = You must be in a faction. -map.unclaim_not_officer = Only officers and leaders can unclaim territory. -map.unclaim_not_claimed = This chunk is not claimed. -map.unclaim_not_yours = This chunk belongs to another faction. -map.unclaim_home = Cannot unclaim the chunk containing your faction home. -map.unclaim_failed = Failed to unclaim chunk. -map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! -map.overclaim_not_in_faction = You must be in a faction. -map.overclaim_not_officer = Only officers and leaders can overclaim territory. -map.overclaim_already_yours = You already own this chunk. -map.overclaim_ally = You cannot overclaim allied territory. -map.overclaim_has_power = This faction has enough power to defend their territory. -map.overclaim_max = You have reached your maximum claim limit. -map.overclaim_failed = Failed to overclaim chunk. -# ========== Create Faction Page ========== -create.preview_name = Your Faction Name -create.leader_prefix = Leader: {0} -create.enter_name = Please enter a faction name. -create.name_too_short = Faction name must be at least {0} characters. -create.name_too_long = Faction name cannot exceed {0} characters. -create.name_taken = A faction with this name already exists. -create.tag_length = Faction tag must be {0}-{1} characters. -create.tag_format = Faction tag can only contain letters and numbers. -create.desc_too_long = Description cannot exceed {0} characters. -create.created = Faction {0} created successfully! -create.created_no_dashboard = Faction created but could not open dashboard. -create.invalid_name = Invalid faction name. -create.create_failed = Could not create faction. - -# ========== New Player Pages ========== -newplayer.pending_count = {0} pending -newplayer.received_header = RECEIVED INVITES ({0}) -newplayer.requests_header = YOUR REQUESTS ({0}) -newplayer.no_invites = No invites. Browse factions to find one! -newplayer.no_requests = No pending requests. -newplayer.invited_by = Invited by: {0} -newplayer.member_count = {0} members -newplayer.power_count = {0} power -newplayer.claim_count = {0} claims -newplayer.awaiting_review = Awaiting review -newplayer.expires_in = Expires in {0}h -newplayer.time_just_now = just now -newplayer.time_minutes = {0} min ago -newplayer.time_hours = {0}h ago -newplayer.time_days = {0}d ago -newplayer.invalid_faction = Invalid faction. -newplayer.invite_expired = This invite has expired or was revoked. -newplayer.faction_gone = Faction no longer exists. -newplayer.joined = You joined {0}! -newplayer.faction_full = This faction is full. -newplayer.join_failed = Could not join faction. -newplayer.invite_declined = Invite declined. -newplayer.request_cancelled = Cancelled request to join {0}. -newplayer.faction_count = {0} factions -newplayer.browse_subtitle = Find your new home! -newplayer.sort_power = Power -newplayer.sort_name = Name -newplayer.sort_members = Members -newplayer.btn_accept = Accept -newplayer.btn_pending = Pending -newplayer.btn_join = Join -newplayer.btn_request = Request -newplayer.invite_only_msg = This faction is invite-only. -newplayer.welcome_hint = Welcome! Use /f to open faction menu. -newplayer.faction_open_hint = This faction is open! Click JOIN instead. -newplayer.already_requested = You already have a pending request to this faction. -newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. -newplayer.request_sent = Join request sent to {0}! -newplayer.officer_review = An officer will review your request. -newplayer.map_hint = View Only - Join a faction to claim territory! - -# Player Settings -nav.player_settings = Settings -player_settings.title = Player Settings -player_settings.language_section = Language -player_settings.auto_detect = Auto-detect from client -player_settings.auto_detect_desc = Uses your game client's language setting -player_settings.language_label = Language -player_settings.notifications_section = Notifications -player_settings.territory_alerts = Territory Alerts -player_settings.territory_alerts_desc = Show notifications when entering/leaving territories -player_settings.death_announcements = Death Broadcasts -player_settings.death_announcements_desc = Receive faction member death location announcements -player_settings.power_notifications = Power Changes -player_settings.power_notifications_desc = Show messages when your power changes -player_settings.language_changed = Language changed to {0} -player_settings.pref_enabled = {0} enabled -player_settings.pref_disabled = {0} disabled diff --git a/src/main/resources/Server/Languages/pt-BR/hyperfactions.lang b/src/main/resources/Server/Languages/pt-BR/hyperfactions.lang deleted file mode 100644 index c45e3ffb..00000000 --- a/src/main/resources/Server/Languages/pt-BR/hyperfactions.lang +++ /dev/null @@ -1,452 +0,0 @@ -# Language: Brazilian Portuguese (pt-BR) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Brazilian Portuguese translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions - English Translations -# Format: key = value (or key = "quoted value") -# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule -# Placeholders: {0}, {1}, etc. - -# ========== Common ========== -common.no_permission = You don't have permission to do that. -common.not_in_faction = You are not in a faction. -common.already_in_faction = You are already in a faction. -common.player_not_found = Player not found. -common.faction_not_found = Faction not found. -common.player_not_online = That player is not online. -common.must_be_leader = Only the faction leader can do that. -common.must_be_officer = You must be an Officer or Leader to do that. -common.combat_tagged = You can't do that while combat tagged. -common.cancel = Cancel -common.confirm = Confirm -common.save = Save -common.close = Close -common.yes = Yes -common.no = No -common.loading = Loading... -common.online = Online -common.offline = Offline -common.enabled = Enabled -common.disabled = Disabled -common.none = None -common.page = Page {0} of {1} -common.unknown = Unknown -common.error_generic = Something went wrong. Please try again. -common.gui_fallback = Could not access GUI. Use /f help for commands. -common.admin_prefix = [Admin] -common.location_error = Could not determine your location. -common.world_error = Could not determine your world. -common.invalid_id = Invalid faction ID. -common.na = N/A - -# ========== Commands - Create ========== -cmd.create.no_permission = You don't have permission to create factions. -cmd.create.usage = Usage: /f create -cmd.create.success = Faction '{0}' created! -cmd.create.already_in_named = You are already in {0}. -cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. -cmd.create.name_taken = That faction name is already taken. -cmd.create.name_too_short = Faction name is too short. -cmd.create.name_too_long = Faction name is too long. -cmd.create.failed = Failed to create faction. - -# ========== Commands - Disband ========== -cmd.disband.no_permission = You don't have permission to disband factions. -cmd.disband.not_leader = Only the faction leader can disband. -cmd.disband.confirm_prompt = Are you sure you want to disband your faction? -cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. -cmd.disband.success = Your faction has been disbanded. -cmd.disband.failed = Failed to disband faction. -cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. - -# ========== Commands - Rename ========== -cmd.rename.no_permission = You don't have permission. -cmd.rename.not_leader = Only the leader can rename the faction. -cmd.rename.usage = Usage: /f rename -cmd.rename.too_short = Name is too short (min {0} chars). -cmd.rename.too_long = Name is too long (max {0} chars). -cmd.rename.name_taken = That name is already taken. -cmd.rename.success = Faction renamed to {0}! -cmd.rename.broadcast = {0} renamed the faction to {1} - -# ========== Commands - Description ========== -cmd.desc.no_permission = You don't have permission. -cmd.desc.not_officer = You must be an officer to set the description. -cmd.desc.set = Faction description set! -cmd.desc.cleared = Faction description cleared. - -# ========== Commands - Open / Close ========== -cmd.open.no_permission = You don't have permission. -cmd.open.not_leader = Only the leader can change this setting. -cmd.open.already_open = Your faction is already open. -cmd.open.success = Your faction is now open! Anyone can join with /f join. -cmd.open.broadcast = {0} opened the faction to public joining. -cmd.close.no_permission = You don't have permission. -cmd.close.not_leader = Only the leader can change this setting. -cmd.close.already_closed = Your faction is already closed. -cmd.close.success = Your faction is now invite-only. -cmd.close.broadcast = {0} closed the faction to invite-only. - -# ========== Commands - Color ========== -cmd.color.no_permission = You don't have permission. -cmd.color.not_officer = You must be an officer to change the color. -cmd.color.colors_disabled = Faction colors are disabled. -cmd.color.usage = Usage: /f color -cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex -cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. -cmd.color.success = Faction color updated! - -# ========== Commands - Claim ========== -cmd.claim.no_permission = You don't have permission to claim territory. -cmd.claim.already_yours = Your faction already owns this chunk. -cmd.claim.cannot_claim_ally = You cannot claim ally territory. -cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. -cmd.claim.success = Claimed chunk at {0}, {1}! -cmd.claim.not_officer = You must be an officer to claim land. -cmd.claim.already_claimed = This chunk is already claimed. -cmd.claim.max_claims = Your faction has reached max claims. Get more power! -cmd.claim.not_adjacent = You must claim adjacent to existing territory. -cmd.claim.world_not_allowed = Claiming is not allowed in this world. -cmd.claim.orbisguard = This area is protected by OrbisGuard. -cmd.claim.zone_protected = This chunk is in a safezone or warzone. -cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. -cmd.claim.failed = Failed to claim chunk. - -# ========== Commands - Invite ========== -cmd.invite.no_permission = You don't have permission to invite players. -cmd.invite.not_officer = You must be an officer to invite players. -cmd.invite.usage = Usage: /f invite -cmd.invite.player_not_found = Player '{0}' not found or offline. -cmd.invite.target_in_faction = That player is already in a faction. -cmd.invite.sent = Invited {0} to your faction. -cmd.invite.received = You have been invited to join {0}! -cmd.invite.accept_hint = Type /f accept {0} to join. - -# ========== Commands - Accept / Join ========== -cmd.join.no_permission = You don't have permission to join factions. -cmd.join.already_in_named = You are already in {0}. -cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.join.no_invites = You have no pending invites. -cmd.join.faction_not_found = Faction '{0}' not found. -cmd.join.not_invited = You have no invite from that faction. -cmd.join.faction_gone = That faction no longer exists. -cmd.join.success = You have joined {0}! -cmd.join.broadcast = {0} has joined the faction! -cmd.join.faction_full = That faction is full. -cmd.join.failed = Failed to join faction. - -# ========== Commands - Kick ========== -cmd.kick.no_permission = You don't have permission to kick members. -cmd.kick.usage = Usage: /f kick -cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. -cmd.kick.success = Kicked {0} from the faction. -cmd.kick.broadcast = {0} was kicked from the faction. -cmd.kick.kicked = You have been kicked from the faction. -cmd.kick.cannot_kick_higher = You don't have permission to kick that player. -cmd.kick.cannot_kick_leader = You cannot kick the faction leader. -cmd.kick.failed = Failed to kick player. - -# ========== Commands - Leave ========== -cmd.leave.no_permission = You don't have permission to leave factions. -cmd.leave.confirm_prompt = Are you sure you want to leave your faction? -cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. -cmd.leave.success = You have left your faction. -cmd.leave.broadcast = {0} has left the faction. -cmd.leave.failed = Failed to leave faction. -cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. - -# ========== Commands - Promote / Demote / Transfer ========== -cmd.rank.promote_no_permission = You don't have permission to promote members. -cmd.rank.promote_usage = Usage: /f promote -cmd.rank.promoted = Promoted {0} to {1}! -cmd.rank.promote_broadcast = {0} was promoted to {1}! -cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. -cmd.rank.promote_failed = Failed to promote player. -cmd.rank.demote_no_permission = You don't have permission to demote members. -cmd.rank.demote_usage = Usage: /f demote -cmd.rank.demoted = Demoted {0} to {1}. -cmd.rank.demote_broadcast = {0} was demoted to {1}. -cmd.rank.already_lowest = That player is already a Member. -cmd.rank.demote_failed = Failed to demote player. -cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. -cmd.rank.transfer_usage = Usage: /f transfer -cmd.rank.player_not_in_faction = Player not found in your faction. -cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? -cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. -cmd.rank.transferred = Transferred leadership to {0}! -cmd.rank.transfer_broadcast = {0} is now the faction leader! -cmd.rank.transfer_failed = Failed to transfer leadership. -cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. - -# ========== Commands - Unclaim ========== -cmd.unclaim.no_permission = You don't have permission to unclaim territory. -cmd.unclaim.success = Unclaimed chunk at {0}, {1}. -cmd.unclaim.not_officer = You must be an officer to unclaim land. -cmd.unclaim.chunk_not_claimed = This chunk is not claimed. -cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. -cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. -cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. -cmd.unclaim.failed = Failed to unclaim chunk. - -# ========== Commands - Overclaim ========== -cmd.overclaim.no_permission = You don't have permission to overclaim territory. -cmd.overclaim.success = Overclaimed enemy territory! -cmd.overclaim.not_officer = You must be an officer to overclaim. -cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. -cmd.overclaim.own_chunk = Your faction already owns this chunk. -cmd.overclaim.ally = You cannot overclaim ally territory. -cmd.overclaim.target_has_power = This faction still has enough power. -cmd.overclaim.failed = Failed to overclaim. - -# ========== Commands - Stuck ========== -cmd.stuck.no_permission = You don't have permission to use /f stuck. -cmd.stuck.not_stuck = You're not stuck - this is wilderness. -cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! -cmd.stuck.no_safe = Could not find a safe location. -cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! - -# ========== Commands - Home ========== -cmd.home.no_permission = You don't have permission to teleport to faction home. -cmd.home.no_home = Your faction has no home set. -cmd.home.combat_tagged = You cannot teleport while in combat! -cmd.home.teleported = Teleported to faction home! - -# ========== Commands - SetHome ========== -cmd.sethome.no_permission = You don't have permission to set faction home. -cmd.sethome.world_not_allowed = Cannot set home in this world. -cmd.sethome.not_in_territory = You can only set home in your faction's territory. -cmd.sethome.set = Faction home set! -cmd.sethome.broadcast = {0} set the faction home. -cmd.sethome.not_officer = You must be an officer to set the home. -cmd.sethome.failed = Failed to set home. - -# ========== Commands - DelHome ========== -cmd.delhome.no_permission = You don't have permission to delete faction home. -cmd.delhome.no_home = Your faction does not have a home set. -cmd.delhome.deleted = Faction home deleted! -cmd.delhome.broadcast = {0} deleted the faction home. -cmd.delhome.not_officer = You must be an officer to delete the home. -cmd.delhome.failed = Failed to delete home. - -# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== -cmd.relation.ally_no_permission = You don't have permission to manage alliances. -cmd.relation.ally_usage = Usage: /f ally -cmd.relation.ally_sent = Ally request sent to {0}! -cmd.relation.ally_formed = You are now allies with {0}! -cmd.relation.already_ally = You are already allied with that faction. -cmd.relation.ally_failed = Failed to send ally request. -cmd.relation.enemy_no_permission = You don't have permission to declare enemies. -cmd.relation.enemy_usage = Usage: /f enemy -cmd.relation.enemy_declared = {0} is now your enemy! -cmd.relation.already_enemy = You are already enemies with that faction. -cmd.relation.max_enemies = You have reached the maximum number of enemies. -cmd.relation.enemy_failed = Failed to set enemy. -cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. -cmd.relation.neutral_usage = Usage: /f neutral -cmd.relation.neutral_set = Your faction is now neutral with {0}. -cmd.relation.already_neutral = You are already neutral with that faction. -cmd.relation.neutral_failed = Failed to set neutral. -cmd.relation.cannot_self = You cannot ally with yourself. -cmd.relation.max_allies = You have reached the maximum number of allies. -cmd.relation.view_no_permission = You don't have permission to view relations. -cmd.relation.header = === Faction Relations === -cmd.relation.allies_count = Allies ({0}): -cmd.relation.enemies_count = Enemies ({0}): -cmd.relation.list_entry = - {0} - -# ========== Commands - Chat ========== -cmd.chat.usage = Usage: /f c [f|a|off] -cmd.chat.no_permission = You don't have permission for that chat mode. -cmd.chat.mode_set = Chat mode set to {0} - -# ========== Commands - Invites ========== -cmd.invites.not_officer = You must be an officer to manage invites. -cmd.invites.header = === Faction Invites === -cmd.invites.no_pending = No pending invites or requests. -cmd.invites.outgoing = Outgoing Invites: -cmd.invites.outgoing_entry = {0} (invited by {1}) -cmd.invites.requests = Join Requests: -cmd.invites.request_entry = {0}{1} -cmd.invites.your_invites_header = === Your Invites === -cmd.invites.no_invites = You have no pending invites. -cmd.invites.invite_entry = {0} - Use /f accept {1} - -# ========== Commands - Request ========== -cmd.request.no_permission = You don't have permission to request faction membership. -cmd.request.already_in_named = You are already in {0}. -cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.request.usage = Usage: /f request [message] -cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. -cmd.request.already_requested = You already have a pending request to that faction. -cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. -cmd.request.sent = Sent join request to {0}! -cmd.request.your_message = Your message: "{0}" -cmd.request.officer_review = An officer will review your request. -cmd.request.officer_notify = {0} has requested to join your faction! -cmd.request.officer_review_hint = Use /f gui > Invites to review. - -# ========== Commands - Info ========== -cmd.info.faction_header = === {0} === -cmd.info.player_header = === {0} === -cmd.info.no_permission = You don't have permission to view faction info. -cmd.info.faction_not_found = Faction '{0}' not found. -cmd.info.not_in_faction_hint = You are not in a faction. Use /f info -cmd.info.leader = Leader: {0} -cmd.info.members = Members: {0}/{1} -cmd.info.power = Power: {0} -cmd.info.claims = Claims: {0} -cmd.info.raidable = RAIDABLE! -cmd.info.allies = Allies: {0} -cmd.info.enemies = Enemies: {0} -cmd.info.they_consider = They consider you: {0} -cmd.info.you_consider = You consider them: {0} -cmd.info.members_no_permission = You don't have permission to view faction members. -cmd.info.members_header = === {0} Members ({1}) === -cmd.info.member_online = [Online] -cmd.info.list_no_permission = You don't have permission to view faction list. -cmd.info.list_empty = There are no factions. -cmd.info.list_header = === Factions ({0}) === -cmd.info.list_entry = {0} - {1} members, {2} power -cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] -cmd.info.help_no_permission = You don't have permission to view help. -cmd.info.who_no_permission = You don't have permission to view player info. -cmd.info.who_faction = Faction: {0} -cmd.info.who_role = Role: {0} -cmd.info.who_joined = Joined: {0} -cmd.info.who_faction_none = Faction: None -cmd.info.who_power = Power: {0} -cmd.info.who_status = Status: {0} -cmd.info.who_last_seen = Last seen: {0} -cmd.info.map_no_permission = You don't have permission to view the map. -cmd.info.map_header = === Territory Map === -cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild -cmd.info.map_gui_hint = Use /f gui for interactive map - -# ========== Commands - Power ========== -cmd.power.personal = Personal Power: {0}/{1} -cmd.power.faction = Faction Power: {0}/{1} -cmd.power.death_loss = Death Loss: {0} -cmd.power.regen = Regen Rate: {0}/hr -cmd.power.no_permission = You don't have permission to view power info. -cmd.power.header = {0}'s Power: -cmd.power.current = Current: {0} - -# ========== Commands - Economy ========== -cmd.economy.balance = Balance: {0} -cmd.economy.deposited = Deposited {0} into the faction treasury. -cmd.economy.withdrawn = Withdrew {0} from the faction treasury. -cmd.economy.transferred = Transferred {0} to {1}. -cmd.economy.insufficient = Insufficient funds in faction treasury. -cmd.economy.invalid_amount = Invalid amount: {0} -cmd.economy.economy_disabled = Economy is disabled. -cmd.economy.balance_no_permission = You don't have permission to view balances. -cmd.economy.treasury_unavailable = Treasury is not available. -cmd.economy.balance_display = {0}'s treasury: {1} -cmd.economy.deposit_no_permission = You don't have permission to deposit. -cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. -cmd.economy.deposit_usage = Usage: /f deposit -cmd.economy.amount_positive = Amount must be positive. -cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} -cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. -cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. -cmd.economy.withdraw_no_permission = You don't have permission to withdraw. -cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. -cmd.economy.withdraw_usage = Usage: /f withdraw -cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} -cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. -cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. -cmd.economy.withdraw_failed = Withdrawal failed: {0} -cmd.economy.transfer_no_permission = You don't have permission to transfer. -cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. -cmd.economy.transfer_usage = Usage: /f money transfer -cmd.economy.transfer_self = Cannot transfer to your own faction. -cmd.economy.transfer_limit_denied = Transfer denied: {0} -cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. -cmd.economy.transfer_failed = Transfer failed: {0} -cmd.economy.log_no_permission = You don't have permission to view the transaction log. -cmd.economy.log_header = Transaction Log (page {0}/{1}) -cmd.economy.log_empty = No transactions found. -cmd.economy.money_help_header = Treasury Commands: -cmd.economy.money_help_balance = /f money balance [faction] - View balance -cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury -cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury -cmd.economy.money_help_transfer = /f money transfer - Transfer between factions -cmd.economy.money_help_log = /f money log [page] [type] - View transaction history - -# ========== Protection - Action Phrases ========== -protection.action.generic = You can't do that -protection.action.build = You can't build or break blocks -protection.action.interact = You can't interact with that -protection.action.door = You can't use doors -protection.action.container = You can't open containers -protection.action.bench = You can't use crafting stations -protection.action.processing = You can't use processing stations -protection.action.seat = You can't use seats -protection.action.light = You can't toggle lights -protection.action.teleporter = You can't use teleporters -protection.action.crate = You can't use crates -protection.action.tame = You can't tame creatures -protection.action.npc = You can't interact with NPCs -protection.action.mount = You can't mount creatures -protection.action.pve = You can't damage creatures -protection.action.item_drop = You can't drop items -protection.action.item_pickup = You can't pick up items - -# ========== Protection - Denial Reasons ========== -protection.denied.safezone = {0} in a SafeZone. -protection.denied.warzone = {0} in a WarZone. -protection.denied.enemy_claim = {0} in enemy territory. -protection.denied.claimed = {0} in claimed territory. -protection.denied.here = {0} here. -protection.denied.zone = {0} in this zone. -protection.denied.faction_perm = {0} here. (Faction permission: {1}) -protection.denied.ally_territory = {0} here. (Ally territory) -protection.denied.error = Protection error — action blocked for safety. - -# ========== Protection - PvP ========== -protection.pvp.safezone = PvP is disabled in SafeZones. -protection.pvp.same_faction = You cannot attack faction members. -protection.pvp.ally = You cannot attack allies. -protection.pvp.spawn_protected = That player has spawn protection. -protection.pvp.territory_disabled = PvP is disabled in this territory. -protection.pvp.generic = You cannot attack this player. - -# ========== Protection - Entity Damage ========== -protection.mob_damage_disabled = Mob damage is disabled in this zone. -protection.pve_damage_disabled = PvE damage is disabled in this zone. -protection.pve_territory_denied = You cannot damage mobs in this territory. - -# ========== Protection - Combat Tag ========== -protection.combat_tag_command = You cannot use that command while combat tagged. - -# ========== Server Announcements ========== -# These are broadcast to all online players for significant faction events. -# {0}, {1} = dynamic values (faction names, player names) -server_announce.faction_created = {0} has founded the faction {1}! -server_announce.faction_disbanded = The faction {0} has been disbanded! -server_announce.leadership_transfer = {0} is now the leader of {1}! -server_announce.overclaim = {0} has overclaimed territory from {1}! -server_announce.war_declared = {0} has declared war on {1}! -server_announce.alliance_formed = {0} and {1} are now allies! -server_announce.alliance_broken = {0} and {1} are no longer allies! - -# ========== Teleport System ========== -teleport.cooldown_wait = You must wait {0} before teleporting again. -teleport.warmup_start = Teleporting to faction home in {0} seconds... -teleport.combat_cancelled = Teleportation cancelled - you are in combat! -teleport.success_default = Teleported to faction home! -teleport.no_home = Your faction has no home set. -teleport.world_not_found = World not found. -teleport.failed = Teleportation failed. -teleport.countdown = Teleporting in {0} seconds... -teleport.countdown_one = Teleporting in 1 second... -teleport.moved_cancelled = Teleportation cancelled - you moved! -teleport.damage_cancelled = Teleportation cancelled - you took damage! -teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. -teleport.mount_entry_blocked = You can't enter this zone while mounted. - -# ========== Chat Display ========== -chat.display.public = Public -chat.display.faction = Faction -chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/pt-BR/hyperfactions_admin.lang b/src/main/resources/Server/Languages/pt-BR/hyperfactions_admin.lang deleted file mode 100644 index fe5d73cf..00000000 --- a/src/main/resources/Server/Languages/pt-BR/hyperfactions_admin.lang +++ /dev/null @@ -1,268 +0,0 @@ -# Language: Brazilian Portuguese (pt-BR) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Brazilian Portuguese translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions Admin GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule - -# ========== Admin Navigation Bar ========== -nav.dashboard = Dashboard -nav.actions = Actions -nav.factions = Factions -nav.players = Players -nav.economy = Economy -nav.zones = Zones -nav.config = Config -nav.backups = Backups -nav.log = Log -nav.updates = Updates -nav.help = Help -nav.version = Version - -# ========== Common Admin Labels ========== -common.faction_not_found = Faction Not Found -common.no_faction = No Faction -common.not_set = Not set -common.on = On -common.off = Off -common.enable = Enable -common.disable = Disable -common.none_paren = (None) -common.invalid_faction = Invalid faction. -common.leader_prefix = Leader: {0} -common.members_suffix = {0} members -common.claims_suffix = {0} claims -common.factions_suffix = {0} factions -common.players_suffix = {0} players -common.chunks_suffix = {0} chunks -common.entries_suffix = {0} entries -common.found_suffix = {0} found -common.power_format = {0}/{1} power -common.raidable = Raidable -common.protected = Protected -common.no_description = No description set. -common.officers_more = +{0} more -common.custom_max = (custom max) -common.default_max = (default max) -common.now = Now -common.ago_suffix = {0} ago -common.just_now = just now -common.no_membership_history = No membership history - -# ========== Admin Dashboard ========== -dashboard.factions_prefix = Factions: {0} -dashboard.members_prefix = Total Members: {0} -dashboard.claims_prefix = Total Claims: {0} - -# ========== Admin Actions ========== -actions.confirm_reset = Confirm Reset? -actions.confirm_trigger = Confirm Trigger? -actions.kd_reset = Reset K/D for {0} players. -actions.kd_reset_failed = Failed to reset K/D: {0} -actions.upkeep_unavailable = Upkeep processor is not available. -actions.upkeep_triggered = Upkeep collection triggered. -actions.upkeep_failed = Upkeep failed: {0} - -# ========== Admin Disband ========== -disband.faction_gone = Faction no longer exists. -disband.success = Faction '{0}' has been disbanded. -disband.failed = Failed to disband: {0} -disband.no_leader = Faction has no leader, cannot disband. - -# ========== Admin Unclaim All ========== -unclaim.removed = [Admin] Removed {0} claims from {1}. -unclaim.no_claims = {0} had no claims to remove. - -# ========== Admin Factions List ========== -factions.home_not_set = Not set -factions.teleported = Teleported to {0}'s home. -factions.no_home = Faction has no home set. -factions.world_not_found = Target world not found. - -# ========== Admin Faction Info ========== -info.faction_gone = This faction no longer exists. - -# ========== Admin Faction Members ========== -members.sort_role = Role -members.sort_online = Online -members.sort_name = Name -members.sort_power = Power -members.promoted = [Admin] Promoted {0} to {1}. -members.demoted = [Admin] Demoted {0} to {1}. -members.kicked = [Admin] Kicked {0} from the faction. - -# ========== Admin Faction Relations ========== -relations.allies_header = ALLIES ({0}) -relations.enemies_header = ENEMIES ({0}) -relations.no_allies = No allies. -relations.no_enemies = No enemies. -relations.neutral_count = {0} neutral factions -relations.since_today = Since: today -relations.since_one_day = Since: 1 day ago -relations.since_days = Since: {0} days ago -relations.set_ally = [Admin] Set mutual ally status with {0}. -relations.set_enemy = Set mutual enemy status with {0}. -relations.set_neutral = [Admin] Set mutual neutral status with {0}. - -# ========== Admin Faction Settings ========== -settings.locked = This setting is locked by server configuration. -settings.perm_toggled = Set {0} to {1}. -settings.color_changed = Set faction color to {0}. -settings.recruitment_set = Set recruitment to {0}. -settings.no_home = [Admin] This faction has no home set. -settings.home_cleared = Cleared faction home for {0}. - -# ========== Sort Dropdown Labels ========== -sort.power = Power -sort.name = Name -sort.members = Members -sort.balance = Balance - -# ========== Admin Players ========== -players.sort_last_online = Last Online -players.sort_faction = Faction -players.sort_online = Online -players.not_online = Player is not online. -players.world_not_found = Target world not found. -players.teleported = [Admin] Teleported to {0}. - -# ========== Admin Player Info ========== -playerinfo.disband_faction = Disband Faction -playerinfo.kick_leader = Kick Leader -playerinfo.enter_valid_number = Enter a valid number. -playerinfo.enter_valid_positive = Enter a valid positive number. -playerinfo.faction_gone = Faction no longer exists. -playerinfo.kd_reset = Reset K/D for {0}. -playerinfo.kicked_success = Kicked {0} from {1}. -playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. -playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). - -# ========== Admin Economy ========== -economy.no_data = No factions with economy data. -economy.amount_zero = Amount cannot be zero. -economy.enter_amount = Please enter an amount. -economy.invalid_number = Invalid number: {0} -economy.error = An error occurred. -economy.balance_negative = Balance cannot be negative. -economy.failed = Failed: {0} -economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. -economy.bulk_failures = ({0} failed) - -# ========== Admin Zones ========== -zones.not_found = Zone not found. -zones.invalid_id = Invalid zone ID. -zones.deleted = Zone {0} deleted. -zones.delete_failed = Failed to delete zone: {0} -zones.no_chunks = No chunks -zones.chunks_suffix = {0} ({1} chunks) - -# ========== Zone Create Wizard ========== -wizard.enter_name = Please enter a zone name. -wizard.name_too_short = Zone name must be at least {0} characters. -wizard.name_too_long = Zone name cannot exceed {0} characters. -wizard.name_taken = A zone with this name already exists. -wizard.radius_range = Radius must be between 1 and {0}. -wizard.create_failed = Could not create zone: {0} -wizard.created_not_found = Zone created but could not be found. -wizard.created = Created {0} '{1}'! -wizard.chunk_claimed = Claimed chunk ({0}, {1}). -wizard.chunk_failed = Could not claim current chunk: {0} -wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. -wizard.radius_no_claims = No chunks could be claimed (area may be occupied). -wizard.no_claims = Zone created with no claims. -wizard.chunks_preview = ~{0} chunks - -# ========== Zone Rename ========== -zone_rename.zone_gone = Zone no longer exists. -zone_rename.enter_name = Please enter a zone name. -zone_rename.too_short = Zone name must be at least {0} character. -zone_rename.too_long = Zone name cannot exceed {0} characters. -zone_rename.same_name = That's already this zone's name. -zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! -zone_rename.name_taken = A zone with that name already exists. -zone_rename.invalid_name = Invalid zone name. -zone_rename.rename_failed = Failed to rename zone: {0} - -# ========== Zone Change Type ========== -zone_type.zone_gone = Zone no longer exists. -zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). -zone_type.failed = Failed to change zone type: {0} - -# ========== Zone Integration Flags ========== -zone_int.zone_not_found = Zone Not Found -zone_int.no_plugin = (no plugin) -zone_int.default = (default) -zone_int.custom = (custom) - -# ========== Activity Log ========== -log.all_types = All Types -log.no_logs = No activity logs matching filters. - -# ========== Version Page ========== -version.active = Active -version.not_found = Not Found -version.not_detected = Not Detected -version.not_installed = Not Installed -version.active_version = Active (v{0}) -version.active_compatible = Active (compatible) -version.active_claims_only = Active (claims only) -version.installed_no_perm = Installed (no perm provider) -version.active_provider = Active ({0}) - -# ========== Admin Main Page ========== -main.reload_hint = Use /f reload to reload configuration. -main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. - -# ========== Zone Flags/Settings ========== -zflags.invalid_flag = Invalid flag. -zflags.zone_not_found = Zone not found. -zflags.conflict = (conflict) -zflags.mixin = (mixin) -zflags.reset_int = Reset integration flags to defaults. -zflags.reset_all = Reset all flags to defaults. -zflags.reset_failed = Failed to reset flags: {0} -zflags.back_to_settings = Back to Settings - -# ========== Zone Properties ========== -zprop.current_custom = Current: "{0}" (custom) -zprop.current_default = Current: "{0}" (default) -zprop.pvp_disabled = PvP Disabled -zprop.pvp_enabled = PvP Enabled -zprop.name_empty = Name cannot be empty. -zprop.renamed = Zone renamed to "{0}". -zprop.name_taken = A zone with that name already exists. -zprop.name_invalid = Invalid name (max 32 characters). -zprop.rename_failed = Failed to rename: {0} -zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. -zprop.upper_set = Upper title set. -zprop.upper_reset = Upper title reset to default. -zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. -zprop.lower_set = Lower title set. -zprop.lower_reset = Lower title reset to default. - -# ========== Relations Additional ========== -relations.failed = Failed: {0} - -# ========== Members Additional ========== -members.never = Never -members.teleported = [Admin] Teleported to {0}. - -# ========== Player Info Additional ========== -playerinfo.records = {0} records -playerinfo.joined_date = Joined: {0} -playerinfo.current = Current -playerinfo.left_date = Left: {0} - -# ========== Zone Map ========== -map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' -map.position = Your Position: Chunk ({0}, {1}) -map.zone_gone = Zone no longer exists. -map.claimed = Claimed chunk ({0}, {1}) for {2}. -map.claim_failed = Failed to claim chunk: {0} -map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. -map.unclaim_failed = Failed to unclaim chunk: {0} -map.chunk_belongs = This chunk belongs to {0}. -map.chunk_faction = This chunk is claimed by a faction. -map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/pt-BR/hyperfactions_gui.lang b/src/main/resources/Server/Languages/pt-BR/hyperfactions_gui.lang deleted file mode 100644 index 45d56183..00000000 --- a/src/main/resources/Server/Languages/pt-BR/hyperfactions_gui.lang +++ /dev/null @@ -1,446 +0,0 @@ -# Language: Brazilian Portuguese (pt-BR) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Brazilian Portuguese translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule - -# ========== Navigation Bar ========== -nav.dashboard = Dashboard -nav.chat = Chat -nav.members = Members -nav.invites = Invites -nav.browser = Browse -nav.map = Map -nav.leaderboard = Leaderboard -nav.relations = Relations -nav.treasury = Treasury -nav.settings = Settings -nav.logs = Logs -nav.help = Help -nav.admin = Admin -nav.create = Create - -# ========== Help Category Names ========== -help.category.welcome = Welcome -help.category.your_faction = Your Faction -help.category.power_land = Power & Land -help.category.diplomacy = Diplomacy -help.category.combat = Combat & Safety -help.category.economy = Economy -help.category.quick_ref = Quick Reference - -# ========== Main Menu ========== -main_menu.section_my_faction = My Faction -main_menu.section_get_started = Get Started -main_menu.section_territory = Territory -main_menu.section_browse = Browse -main_menu.section_admin = Admin -main_menu.claim_hint = Use /f claim to claim territory. - -# ========== Faction Info Page ========== -faction_info.no_description = No description set. -faction_info.status_open = Open -faction_info.status_invite_only = Invite Only -faction_info.status_raidable = Raidable -faction_info.status_protected = Protected -faction_info.officers_more = +{0} more - -# ========== Rename Modal ========== -rename.no_permission = You don't have permission to rename the faction. -rename.enter_name = Please enter a faction name. -rename.too_short = Faction name must be at least {0} characters. -rename.too_long = Faction name cannot exceed {0} characters. -rename.same_name = That's already your faction's name. -rename.name_taken = A faction with that name already exists. -rename.success = Faction renamed from {0} to {1}! - -# ========== Description Modal ========== -desc.no_permission = You don't have permission to edit the description. -desc.display_none = (None) -desc.cleared = Faction description cleared. -desc.updated = Faction description updated! - -# ========== Tag Modal ========== -tag.no_permission = You don't have permission to edit the tag. -tag.display_none = (None) -tag.cleared = Faction tag cleared. -tag.too_short = Tag must be at least {0} character. -tag.too_long = Tag cannot exceed {0} characters. -tag.invalid_format = Tag can only contain letters and numbers. -tag.same_tag = That's already your faction's tag. -tag.tag_taken = A faction with that tag already exists. -tag.success = Faction tag set to [{0}]! - -# ========== Dashboard Page ========== -dashboard.faction_gone = Your faction no longer exists. -dashboard.available = {0} available -dashboard.at_risk = At Risk! -dashboard.online_count = {0} online -dashboard.status_invite = Invite -dashboard.in_grace = IN GRACE -dashboard.billable_chunks = {0} billable chunks -dashboard.btn_home = Home -dashboard.btn_set_home = Set Home -dashboard.btn_claim = Claim -dashboard.chat_prefix = Chat: {0} -dashboard.btn_leave = Leave -dashboard.no_activity = No recent activity. -dashboard.time_now = now -dashboard.time_minutes = {0}m ago -dashboard.time_hours = {0}h ago -dashboard.time_days = {0}d ago -dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. -dashboard.chat_mode_set = Chat mode: {0} -dashboard.claim_success = Claimed chunk at ({0}, {1}) - -# ========== Faction Main Page ========== -main.no_faction = No Faction -main.joined = You joined the faction! -main.join_failed = Failed to join faction: {0} -main.invite_declined = Invite declined. -main.cooldown = Teleport on cooldown! {0}s remaining. -main.world_not_found = Cannot teleport - world not found. -main.leave_failed = Failed to leave: {0} - -# ========== Shared GUI Labels ========== -common.faction_count = {0} factions -common.leader_label = Leader: {0} -common.sort_power = Power -common.sort_members = Members -common.page_format = {0}/{1} -common.own_faction = (You) - -# ========== Members Page ========== -members.count = {0} members -members.sort_role = Role -members.sort_last_online = Last Online -members.just_now = just now -members.ago = {0} ago -members.never = Never -members.member_not_found = Member not found. -members.promoted = Promoted {0} to {1}. -members.promote_failed = Failed to promote: {0} -members.demoted = Demoted {0} to {1}. -members.demote_failed = Failed to demote: {0} -members.kicked = Kicked {0} from the faction. -members.kick_failed = Failed to kick: {0} - -# ========== Browser Page ========== -browser.sort_name = Name -browser.invalid_faction = Invalid faction. - -# ========== Leaderboard Page ========== -leaderboard.sort_kd = K/D -leaderboard.sort_territory = Territory -leaderboard.sort_balance = Balance - -# ========== Player Info Page ========== -playerinfo.now = Now -playerinfo.history_count = {0} records -playerinfo.joined_label = Joined: {0} -playerinfo.current = Current -playerinfo.left_label = Left: {0} -playerinfo.no_history = No membership history -playerinfo.faction_gone = Faction no longer exists. -playerinfo.reason_active = ACTIVE -playerinfo.reason_left = LEFT -playerinfo.reason_kicked = KICKED -playerinfo.reason_disbanded = DISBANDED - -# ========== Relations Page ========== -relations.relation_count = {0} relations -relations.request_count = {0} requests -relations.type_ally = Ally -relations.type_enemy = Enemy -relations.type_incoming = Incoming -relations.type_outgoing = Outgoing -relations.incoming_request = Incoming request -relations.outgoing_request = Outgoing request -relations.empty_relations = No relations yet. -relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. -relations.empty_pending = No pending ally requests. -relations.today = Today -relations.one_day_ago = 1 day ago -relations.days_ago = {0} days ago -relations.now_neutral = Now neutral with {0}. -relations.now_enemies = Now enemies with {0}! -relations.request_sent = Alliance request sent to {0}. -relations.now_allied = Now allied with {0}! -relations.request_declined = Ally request from {0} declined. -relations.request_cancelled = Ally request to {0} cancelled. -relations.failed = Failed: {0} -relations.search_hint = Search for a faction to set relation -relations.no_results = No factions found matching '{0}' -relations.power_display = {0} power -relations.member_count = {0} members - -# ========== Settings Page ========== -settings.officers_only = Only officers and leaders can change faction settings. -settings.display_none = (None) -settings.home_not_set = Not set -settings.no_permission = You don't have permission to change settings. -settings.only_leader_disband = Only the leader can disband the faction. -settings.perm_locked = This setting is locked by the server. -settings.no_perm_edit = You don't have permission to edit territory permissions. -settings.only_leader_officers = Only the leader can change officer access. -settings.pvp_enabled = Enabled -settings.pvp_disabled = Disabled -settings.not_in_territory = You must be in your faction's territory to set home. -settings.home_set = Faction home set to your current location! -settings.recruitment_set = Recruitment set to {0}. -settings.home_no_set = Your faction does not have a home set. -settings.home_deleted = Faction home deleted! - -# ========== Modules Page ========== -modules.treasury_name = Treasury -modules.treasury_desc = Faction bank & economy system -modules.raids_name = Raids -modules.raids_desc = Scheduled faction battles -modules.levels_name = Levels -modules.levels_desc = Faction progression & XP -modules.war_name = War -modules.war_desc = Formal war declarations -modules.coming_soon = Coming Soon -modules.active = Active -modules.view_treasury = View Treasury -modules.unavailable = Unavailable -modules.no_economy = No economy plugin detected -modules.disabled = Disabled -modules.economy_not_available = Economy features are not available on this server - -# ========== Treasury Page ========== -treasury.wallet_label = Your wallet: {0} -treasury.treasury_label = Treasury balance: {0} -treasury.chunks_detail = {0} free + {1} billable chunks -treasury.cost_label = Cost: {0} -treasury.pending = Pending -treasury.auto_pay_on = Auto-pay: ON -treasury.auto_pay_off = Auto-pay: OFF -treasury.runway_90_plus = 90+ days -treasury.runway_days = {0} days -treasury.runway_day = {0} day -treasury.runway_less_day = < 1 day -treasury.runway_no_funds = No funds -treasury.grace_expires = Grace expires in: {0} -treasury.missed_payments = Missed payments: {0} -treasury.pay_to_clear = Pay {0} to clear grace -treasury.system = System -treasury.type_deposit = Deposit -treasury.type_withdrawal = Withdrawal -treasury.type_transfer_in = Transfer In -treasury.type_transfer_out = Transfer Out -treasury.type_player_transfer = Player Transfer -treasury.type_upkeep = Upkeep -treasury.type_tax = Tax Collection -treasury.type_war_cost = War Cost -treasury.type_raid_cost = Raid Cost -treasury.type_spoils = Spoils -treasury.type_admin = Admin Adjustment -treasury.deposit_title = Deposit to Treasury -treasury.withdraw_title = Withdraw from Treasury -treasury.fee_label = Fee ({0}%) -treasury.confirm_deposit = Confirm Deposit -treasury.confirm_withdrawal = Confirm Withdrawal -treasury.from_wallet = {0} from wallet -treasury.to_wallet = {0} to wallet -treasury.enter_valid_amount = Enter a valid positive amount. -treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. -treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. -treasury.deposit_failed_returned = Failed to deposit. Money returned. -treasury.deposited = Deposited {0} into the treasury. -treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) -treasury.no_withdraw_permission = You don't have permission to withdraw. -treasury.withdraw_denied = Withdrawal denied: {0} -treasury.insufficient_treasury = Insufficient funds in treasury. -treasury.withdraw_limit = Withdrawal limit exceeded. -treasury.withdraw_failed = Withdrawal failed: {0} -treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. -treasury.withdrew = Withdrew {0} from the treasury. -treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) -treasury.search_hint = Search for a player or faction -treasury.no_results = No results for '{0}' -treasury.tag_player = [Player] -treasury.tag_faction = [Faction] -treasury.source_online = Online -treasury.source_offline = Offline -treasury.source_player_db = Hytale player -treasury.no_transfer_permission = You don't have permission to transfer. -treasury.transfer_denied = Transfer denied: {0} -treasury.invalid_target_faction = Invalid target faction. -treasury.target_faction_gone = Target faction no longer exists. -treasury.transfer_failed = Transfer failed: {0} -treasury.transfer_failed_returned = Transfer failed. Funds returned. -treasury.transferred = Transferred {0} to {1}. -treasury.invalid_target_player = Invalid target player. -treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. -treasury.leader_only_perms = Only the leader can change treasury permissions. -treasury.leader_only_upkeep = Only the leader can change upkeep settings. -treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. - -# ========== Confirmation Pages ========== -confirm.disband_not_leader = Only the leader can disband the faction. -confirm.disbanded = Faction '{0}' has been disbanded. -confirm.disband_failed = Failed to disband faction. -confirm.succession_title = Leadership will transfer to: -confirm.no_members_warning = WARNING: No other members! -confirm.will_disband = Leaving will disband the faction permanently. -confirm.not_in_faction = You are not in this faction. -confirm.not_leader_anymore = You are no longer the leader. -confirm.no_successor = No successor available. Use disband instead. -confirm.transfer_failed = Failed to transfer leadership: {0} -confirm.leader_left = Leadership transferred to {0}. You have left {1}. -confirm.leave_failed = Failed to leave faction: {0} -confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. -confirm.left_faction = You have left {0}. -confirm.faction_gone = Faction no longer exists. -confirm.not_leader_transfer = Only the leader can transfer leadership. -confirm.leadership_transferred = Leadership transferred to {0}. - -# ========== Logs Viewer Page ========== -logs.title = {0} - Activity Logs -logs.entry_count = {0} entries -logs.all_types = All Types -logs.no_logs_type = No logs of this type. -logs.no_logs = No activity logs yet. - -# ========== Chat Page ========== -chat.placeholder = Type a message... -chat.no_messages = No messages yet. -chat.no_ally_permission = You don't have permission for ally chat. -chat.no_permission = No permission. -chat.faction_gone = Your faction no longer exists. -chat.time_now = now -chat.time_minutes = {0}m -chat.time_hours = {0}h - -# ========== Invites Page ========== -invites.invite_count = {0} invites -invites.request_count = {0} requests -invites.invited_by = Invited by: {0} -invites.no_message = No message -invites.expires = Expires: {0} -invites.type_outgoing = Outgoing -invites.type_request = Request -invites.invited_by_label = Invited by: -invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. -invites.empty_requests = No join requests. Players can request to join with /f request. -invites.invalid_player = Invalid player. -invites.cancelled_invite = Cancelled invite to {0}. -invites.player_joined = {0} has joined the faction! -invites.faction_full = Faction is full. Cannot accept request. -invites.add_failed = Failed to add player to faction. -invites.request_expired = Request not found or expired. -invites.request_declined = Declined join request from {0}. -invites.time_seconds = {0}s -invites.time_minutes = {0}m -invites.time_hours = {0}h - -# ========== Map Page ========== -map.position = Your Position: Chunk ({0}, {1}) -map.legend_protected = Protected -map.claim_stats = Claims: {0}/{1} ({2} Available) -map.overclaimed = OVERCLAIMED by {0}! -map.power_display = Power: {0}/{1} -map.join_to_claim = Join a faction to claim -map.claim_success = Claimed chunk at ({0}, {1})! -map.claim_not_in_faction = You must be in a faction to claim territory. -map.claim_not_officer = Only officers and leaders can claim territory. -map.claim_already_yours = You already own this chunk. -map.claim_already_claimed = This chunk is already claimed by another faction. -map.claim_not_adjacent = You can only claim chunks adjacent to your territory. -map.claim_max = You have reached your maximum claim limit. -map.claim_world_not_allowed = Claiming is not allowed in this world. -map.claim_orbisguard = This area is protected by OrbisGuard. -map.claim_failed = Failed to claim chunk. -map.unclaim_success = Unclaimed chunk at ({0}, {1}). -map.unclaim_not_in_faction = You must be in a faction. -map.unclaim_not_officer = Only officers and leaders can unclaim territory. -map.unclaim_not_claimed = This chunk is not claimed. -map.unclaim_not_yours = This chunk belongs to another faction. -map.unclaim_home = Cannot unclaim the chunk containing your faction home. -map.unclaim_failed = Failed to unclaim chunk. -map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! -map.overclaim_not_in_faction = You must be in a faction. -map.overclaim_not_officer = Only officers and leaders can overclaim territory. -map.overclaim_already_yours = You already own this chunk. -map.overclaim_ally = You cannot overclaim allied territory. -map.overclaim_has_power = This faction has enough power to defend their territory. -map.overclaim_max = You have reached your maximum claim limit. -map.overclaim_failed = Failed to overclaim chunk. -# ========== Create Faction Page ========== -create.preview_name = Your Faction Name -create.leader_prefix = Leader: {0} -create.enter_name = Please enter a faction name. -create.name_too_short = Faction name must be at least {0} characters. -create.name_too_long = Faction name cannot exceed {0} characters. -create.name_taken = A faction with this name already exists. -create.tag_length = Faction tag must be {0}-{1} characters. -create.tag_format = Faction tag can only contain letters and numbers. -create.desc_too_long = Description cannot exceed {0} characters. -create.created = Faction {0} created successfully! -create.created_no_dashboard = Faction created but could not open dashboard. -create.invalid_name = Invalid faction name. -create.create_failed = Could not create faction. - -# ========== New Player Pages ========== -newplayer.pending_count = {0} pending -newplayer.received_header = RECEIVED INVITES ({0}) -newplayer.requests_header = YOUR REQUESTS ({0}) -newplayer.no_invites = No invites. Browse factions to find one! -newplayer.no_requests = No pending requests. -newplayer.invited_by = Invited by: {0} -newplayer.member_count = {0} members -newplayer.power_count = {0} power -newplayer.claim_count = {0} claims -newplayer.awaiting_review = Awaiting review -newplayer.expires_in = Expires in {0}h -newplayer.time_just_now = just now -newplayer.time_minutes = {0} min ago -newplayer.time_hours = {0}h ago -newplayer.time_days = {0}d ago -newplayer.invalid_faction = Invalid faction. -newplayer.invite_expired = This invite has expired or was revoked. -newplayer.faction_gone = Faction no longer exists. -newplayer.joined = You joined {0}! -newplayer.faction_full = This faction is full. -newplayer.join_failed = Could not join faction. -newplayer.invite_declined = Invite declined. -newplayer.request_cancelled = Cancelled request to join {0}. -newplayer.faction_count = {0} factions -newplayer.browse_subtitle = Find your new home! -newplayer.sort_power = Power -newplayer.sort_name = Name -newplayer.sort_members = Members -newplayer.btn_accept = Accept -newplayer.btn_pending = Pending -newplayer.btn_join = Join -newplayer.btn_request = Request -newplayer.invite_only_msg = This faction is invite-only. -newplayer.welcome_hint = Welcome! Use /f to open faction menu. -newplayer.faction_open_hint = This faction is open! Click JOIN instead. -newplayer.already_requested = You already have a pending request to this faction. -newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. -newplayer.request_sent = Join request sent to {0}! -newplayer.officer_review = An officer will review your request. -newplayer.map_hint = View Only - Join a faction to claim territory! - -# Player Settings -nav.player_settings = Settings -player_settings.title = Player Settings -player_settings.language_section = Language -player_settings.auto_detect = Auto-detect from client -player_settings.auto_detect_desc = Uses your game client's language setting -player_settings.language_label = Language -player_settings.notifications_section = Notifications -player_settings.territory_alerts = Territory Alerts -player_settings.territory_alerts_desc = Show notifications when entering/leaving territories -player_settings.death_announcements = Death Broadcasts -player_settings.death_announcements_desc = Receive faction member death location announcements -player_settings.power_notifications = Power Changes -player_settings.power_notifications_desc = Show messages when your power changes -player_settings.language_changed = Language changed to {0} -player_settings.pref_enabled = {0} enabled -player_settings.pref_disabled = {0} disabled diff --git a/src/main/resources/Server/Languages/ru-RU/hyperfactions.lang b/src/main/resources/Server/Languages/ru-RU/hyperfactions.lang deleted file mode 100644 index 96655253..00000000 --- a/src/main/resources/Server/Languages/ru-RU/hyperfactions.lang +++ /dev/null @@ -1,452 +0,0 @@ -# Language: Russian (ru-RU) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Russian translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions - English Translations -# Format: key = value (or key = "quoted value") -# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule -# Placeholders: {0}, {1}, etc. - -# ========== Common ========== -common.no_permission = You don't have permission to do that. -common.not_in_faction = You are not in a faction. -common.already_in_faction = You are already in a faction. -common.player_not_found = Player not found. -common.faction_not_found = Faction not found. -common.player_not_online = That player is not online. -common.must_be_leader = Only the faction leader can do that. -common.must_be_officer = You must be an Officer or Leader to do that. -common.combat_tagged = You can't do that while combat tagged. -common.cancel = Cancel -common.confirm = Confirm -common.save = Save -common.close = Close -common.yes = Yes -common.no = No -common.loading = Loading... -common.online = Online -common.offline = Offline -common.enabled = Enabled -common.disabled = Disabled -common.none = None -common.page = Page {0} of {1} -common.unknown = Unknown -common.error_generic = Something went wrong. Please try again. -common.gui_fallback = Could not access GUI. Use /f help for commands. -common.admin_prefix = [Admin] -common.location_error = Could not determine your location. -common.world_error = Could not determine your world. -common.invalid_id = Invalid faction ID. -common.na = N/A - -# ========== Commands - Create ========== -cmd.create.no_permission = You don't have permission to create factions. -cmd.create.usage = Usage: /f create -cmd.create.success = Faction '{0}' created! -cmd.create.already_in_named = You are already in {0}. -cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. -cmd.create.name_taken = That faction name is already taken. -cmd.create.name_too_short = Faction name is too short. -cmd.create.name_too_long = Faction name is too long. -cmd.create.failed = Failed to create faction. - -# ========== Commands - Disband ========== -cmd.disband.no_permission = You don't have permission to disband factions. -cmd.disband.not_leader = Only the faction leader can disband. -cmd.disband.confirm_prompt = Are you sure you want to disband your faction? -cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. -cmd.disband.success = Your faction has been disbanded. -cmd.disband.failed = Failed to disband faction. -cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. - -# ========== Commands - Rename ========== -cmd.rename.no_permission = You don't have permission. -cmd.rename.not_leader = Only the leader can rename the faction. -cmd.rename.usage = Usage: /f rename -cmd.rename.too_short = Name is too short (min {0} chars). -cmd.rename.too_long = Name is too long (max {0} chars). -cmd.rename.name_taken = That name is already taken. -cmd.rename.success = Faction renamed to {0}! -cmd.rename.broadcast = {0} renamed the faction to {1} - -# ========== Commands - Description ========== -cmd.desc.no_permission = You don't have permission. -cmd.desc.not_officer = You must be an officer to set the description. -cmd.desc.set = Faction description set! -cmd.desc.cleared = Faction description cleared. - -# ========== Commands - Open / Close ========== -cmd.open.no_permission = You don't have permission. -cmd.open.not_leader = Only the leader can change this setting. -cmd.open.already_open = Your faction is already open. -cmd.open.success = Your faction is now open! Anyone can join with /f join. -cmd.open.broadcast = {0} opened the faction to public joining. -cmd.close.no_permission = You don't have permission. -cmd.close.not_leader = Only the leader can change this setting. -cmd.close.already_closed = Your faction is already closed. -cmd.close.success = Your faction is now invite-only. -cmd.close.broadcast = {0} closed the faction to invite-only. - -# ========== Commands - Color ========== -cmd.color.no_permission = You don't have permission. -cmd.color.not_officer = You must be an officer to change the color. -cmd.color.colors_disabled = Faction colors are disabled. -cmd.color.usage = Usage: /f color -cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex -cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. -cmd.color.success = Faction color updated! - -# ========== Commands - Claim ========== -cmd.claim.no_permission = You don't have permission to claim territory. -cmd.claim.already_yours = Your faction already owns this chunk. -cmd.claim.cannot_claim_ally = You cannot claim ally territory. -cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. -cmd.claim.success = Claimed chunk at {0}, {1}! -cmd.claim.not_officer = You must be an officer to claim land. -cmd.claim.already_claimed = This chunk is already claimed. -cmd.claim.max_claims = Your faction has reached max claims. Get more power! -cmd.claim.not_adjacent = You must claim adjacent to existing territory. -cmd.claim.world_not_allowed = Claiming is not allowed in this world. -cmd.claim.orbisguard = This area is protected by OrbisGuard. -cmd.claim.zone_protected = This chunk is in a safezone or warzone. -cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. -cmd.claim.failed = Failed to claim chunk. - -# ========== Commands - Invite ========== -cmd.invite.no_permission = You don't have permission to invite players. -cmd.invite.not_officer = You must be an officer to invite players. -cmd.invite.usage = Usage: /f invite -cmd.invite.player_not_found = Player '{0}' not found or offline. -cmd.invite.target_in_faction = That player is already in a faction. -cmd.invite.sent = Invited {0} to your faction. -cmd.invite.received = You have been invited to join {0}! -cmd.invite.accept_hint = Type /f accept {0} to join. - -# ========== Commands - Accept / Join ========== -cmd.join.no_permission = You don't have permission to join factions. -cmd.join.already_in_named = You are already in {0}. -cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.join.no_invites = You have no pending invites. -cmd.join.faction_not_found = Faction '{0}' not found. -cmd.join.not_invited = You have no invite from that faction. -cmd.join.faction_gone = That faction no longer exists. -cmd.join.success = You have joined {0}! -cmd.join.broadcast = {0} has joined the faction! -cmd.join.faction_full = That faction is full. -cmd.join.failed = Failed to join faction. - -# ========== Commands - Kick ========== -cmd.kick.no_permission = You don't have permission to kick members. -cmd.kick.usage = Usage: /f kick -cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. -cmd.kick.success = Kicked {0} from the faction. -cmd.kick.broadcast = {0} was kicked from the faction. -cmd.kick.kicked = You have been kicked from the faction. -cmd.kick.cannot_kick_higher = You don't have permission to kick that player. -cmd.kick.cannot_kick_leader = You cannot kick the faction leader. -cmd.kick.failed = Failed to kick player. - -# ========== Commands - Leave ========== -cmd.leave.no_permission = You don't have permission to leave factions. -cmd.leave.confirm_prompt = Are you sure you want to leave your faction? -cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. -cmd.leave.success = You have left your faction. -cmd.leave.broadcast = {0} has left the faction. -cmd.leave.failed = Failed to leave faction. -cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. - -# ========== Commands - Promote / Demote / Transfer ========== -cmd.rank.promote_no_permission = You don't have permission to promote members. -cmd.rank.promote_usage = Usage: /f promote -cmd.rank.promoted = Promoted {0} to {1}! -cmd.rank.promote_broadcast = {0} was promoted to {1}! -cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. -cmd.rank.promote_failed = Failed to promote player. -cmd.rank.demote_no_permission = You don't have permission to demote members. -cmd.rank.demote_usage = Usage: /f demote -cmd.rank.demoted = Demoted {0} to {1}. -cmd.rank.demote_broadcast = {0} was demoted to {1}. -cmd.rank.already_lowest = That player is already a Member. -cmd.rank.demote_failed = Failed to demote player. -cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. -cmd.rank.transfer_usage = Usage: /f transfer -cmd.rank.player_not_in_faction = Player not found in your faction. -cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? -cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. -cmd.rank.transferred = Transferred leadership to {0}! -cmd.rank.transfer_broadcast = {0} is now the faction leader! -cmd.rank.transfer_failed = Failed to transfer leadership. -cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. - -# ========== Commands - Unclaim ========== -cmd.unclaim.no_permission = You don't have permission to unclaim territory. -cmd.unclaim.success = Unclaimed chunk at {0}, {1}. -cmd.unclaim.not_officer = You must be an officer to unclaim land. -cmd.unclaim.chunk_not_claimed = This chunk is not claimed. -cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. -cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. -cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. -cmd.unclaim.failed = Failed to unclaim chunk. - -# ========== Commands - Overclaim ========== -cmd.overclaim.no_permission = You don't have permission to overclaim territory. -cmd.overclaim.success = Overclaimed enemy territory! -cmd.overclaim.not_officer = You must be an officer to overclaim. -cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. -cmd.overclaim.own_chunk = Your faction already owns this chunk. -cmd.overclaim.ally = You cannot overclaim ally territory. -cmd.overclaim.target_has_power = This faction still has enough power. -cmd.overclaim.failed = Failed to overclaim. - -# ========== Commands - Stuck ========== -cmd.stuck.no_permission = You don't have permission to use /f stuck. -cmd.stuck.not_stuck = You're not stuck - this is wilderness. -cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! -cmd.stuck.no_safe = Could not find a safe location. -cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! - -# ========== Commands - Home ========== -cmd.home.no_permission = You don't have permission to teleport to faction home. -cmd.home.no_home = Your faction has no home set. -cmd.home.combat_tagged = You cannot teleport while in combat! -cmd.home.teleported = Teleported to faction home! - -# ========== Commands - SetHome ========== -cmd.sethome.no_permission = You don't have permission to set faction home. -cmd.sethome.world_not_allowed = Cannot set home in this world. -cmd.sethome.not_in_territory = You can only set home in your faction's territory. -cmd.sethome.set = Faction home set! -cmd.sethome.broadcast = {0} set the faction home. -cmd.sethome.not_officer = You must be an officer to set the home. -cmd.sethome.failed = Failed to set home. - -# ========== Commands - DelHome ========== -cmd.delhome.no_permission = You don't have permission to delete faction home. -cmd.delhome.no_home = Your faction does not have a home set. -cmd.delhome.deleted = Faction home deleted! -cmd.delhome.broadcast = {0} deleted the faction home. -cmd.delhome.not_officer = You must be an officer to delete the home. -cmd.delhome.failed = Failed to delete home. - -# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== -cmd.relation.ally_no_permission = You don't have permission to manage alliances. -cmd.relation.ally_usage = Usage: /f ally -cmd.relation.ally_sent = Ally request sent to {0}! -cmd.relation.ally_formed = You are now allies with {0}! -cmd.relation.already_ally = You are already allied with that faction. -cmd.relation.ally_failed = Failed to send ally request. -cmd.relation.enemy_no_permission = You don't have permission to declare enemies. -cmd.relation.enemy_usage = Usage: /f enemy -cmd.relation.enemy_declared = {0} is now your enemy! -cmd.relation.already_enemy = You are already enemies with that faction. -cmd.relation.max_enemies = You have reached the maximum number of enemies. -cmd.relation.enemy_failed = Failed to set enemy. -cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. -cmd.relation.neutral_usage = Usage: /f neutral -cmd.relation.neutral_set = Your faction is now neutral with {0}. -cmd.relation.already_neutral = You are already neutral with that faction. -cmd.relation.neutral_failed = Failed to set neutral. -cmd.relation.cannot_self = You cannot ally with yourself. -cmd.relation.max_allies = You have reached the maximum number of allies. -cmd.relation.view_no_permission = You don't have permission to view relations. -cmd.relation.header = === Faction Relations === -cmd.relation.allies_count = Allies ({0}): -cmd.relation.enemies_count = Enemies ({0}): -cmd.relation.list_entry = - {0} - -# ========== Commands - Chat ========== -cmd.chat.usage = Usage: /f c [f|a|off] -cmd.chat.no_permission = You don't have permission for that chat mode. -cmd.chat.mode_set = Chat mode set to {0} - -# ========== Commands - Invites ========== -cmd.invites.not_officer = You must be an officer to manage invites. -cmd.invites.header = === Faction Invites === -cmd.invites.no_pending = No pending invites or requests. -cmd.invites.outgoing = Outgoing Invites: -cmd.invites.outgoing_entry = {0} (invited by {1}) -cmd.invites.requests = Join Requests: -cmd.invites.request_entry = {0}{1} -cmd.invites.your_invites_header = === Your Invites === -cmd.invites.no_invites = You have no pending invites. -cmd.invites.invite_entry = {0} - Use /f accept {1} - -# ========== Commands - Request ========== -cmd.request.no_permission = You don't have permission to request faction membership. -cmd.request.already_in_named = You are already in {0}. -cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.request.usage = Usage: /f request [message] -cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. -cmd.request.already_requested = You already have a pending request to that faction. -cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. -cmd.request.sent = Sent join request to {0}! -cmd.request.your_message = Your message: "{0}" -cmd.request.officer_review = An officer will review your request. -cmd.request.officer_notify = {0} has requested to join your faction! -cmd.request.officer_review_hint = Use /f gui > Invites to review. - -# ========== Commands - Info ========== -cmd.info.faction_header = === {0} === -cmd.info.player_header = === {0} === -cmd.info.no_permission = You don't have permission to view faction info. -cmd.info.faction_not_found = Faction '{0}' not found. -cmd.info.not_in_faction_hint = You are not in a faction. Use /f info -cmd.info.leader = Leader: {0} -cmd.info.members = Members: {0}/{1} -cmd.info.power = Power: {0} -cmd.info.claims = Claims: {0} -cmd.info.raidable = RAIDABLE! -cmd.info.allies = Allies: {0} -cmd.info.enemies = Enemies: {0} -cmd.info.they_consider = They consider you: {0} -cmd.info.you_consider = You consider them: {0} -cmd.info.members_no_permission = You don't have permission to view faction members. -cmd.info.members_header = === {0} Members ({1}) === -cmd.info.member_online = [Online] -cmd.info.list_no_permission = You don't have permission to view faction list. -cmd.info.list_empty = There are no factions. -cmd.info.list_header = === Factions ({0}) === -cmd.info.list_entry = {0} - {1} members, {2} power -cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] -cmd.info.help_no_permission = You don't have permission to view help. -cmd.info.who_no_permission = You don't have permission to view player info. -cmd.info.who_faction = Faction: {0} -cmd.info.who_role = Role: {0} -cmd.info.who_joined = Joined: {0} -cmd.info.who_faction_none = Faction: None -cmd.info.who_power = Power: {0} -cmd.info.who_status = Status: {0} -cmd.info.who_last_seen = Last seen: {0} -cmd.info.map_no_permission = You don't have permission to view the map. -cmd.info.map_header = === Territory Map === -cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild -cmd.info.map_gui_hint = Use /f gui for interactive map - -# ========== Commands - Power ========== -cmd.power.personal = Personal Power: {0}/{1} -cmd.power.faction = Faction Power: {0}/{1} -cmd.power.death_loss = Death Loss: {0} -cmd.power.regen = Regen Rate: {0}/hr -cmd.power.no_permission = You don't have permission to view power info. -cmd.power.header = {0}'s Power: -cmd.power.current = Current: {0} - -# ========== Commands - Economy ========== -cmd.economy.balance = Balance: {0} -cmd.economy.deposited = Deposited {0} into the faction treasury. -cmd.economy.withdrawn = Withdrew {0} from the faction treasury. -cmd.economy.transferred = Transferred {0} to {1}. -cmd.economy.insufficient = Insufficient funds in faction treasury. -cmd.economy.invalid_amount = Invalid amount: {0} -cmd.economy.economy_disabled = Economy is disabled. -cmd.economy.balance_no_permission = You don't have permission to view balances. -cmd.economy.treasury_unavailable = Treasury is not available. -cmd.economy.balance_display = {0}'s treasury: {1} -cmd.economy.deposit_no_permission = You don't have permission to deposit. -cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. -cmd.economy.deposit_usage = Usage: /f deposit -cmd.economy.amount_positive = Amount must be positive. -cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} -cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. -cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. -cmd.economy.withdraw_no_permission = You don't have permission to withdraw. -cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. -cmd.economy.withdraw_usage = Usage: /f withdraw -cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} -cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. -cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. -cmd.economy.withdraw_failed = Withdrawal failed: {0} -cmd.economy.transfer_no_permission = You don't have permission to transfer. -cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. -cmd.economy.transfer_usage = Usage: /f money transfer -cmd.economy.transfer_self = Cannot transfer to your own faction. -cmd.economy.transfer_limit_denied = Transfer denied: {0} -cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. -cmd.economy.transfer_failed = Transfer failed: {0} -cmd.economy.log_no_permission = You don't have permission to view the transaction log. -cmd.economy.log_header = Transaction Log (page {0}/{1}) -cmd.economy.log_empty = No transactions found. -cmd.economy.money_help_header = Treasury Commands: -cmd.economy.money_help_balance = /f money balance [faction] - View balance -cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury -cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury -cmd.economy.money_help_transfer = /f money transfer - Transfer between factions -cmd.economy.money_help_log = /f money log [page] [type] - View transaction history - -# ========== Protection - Action Phrases ========== -protection.action.generic = You can't do that -protection.action.build = You can't build or break blocks -protection.action.interact = You can't interact with that -protection.action.door = You can't use doors -protection.action.container = You can't open containers -protection.action.bench = You can't use crafting stations -protection.action.processing = You can't use processing stations -protection.action.seat = You can't use seats -protection.action.light = You can't toggle lights -protection.action.teleporter = You can't use teleporters -protection.action.crate = You can't use crates -protection.action.tame = You can't tame creatures -protection.action.npc = You can't interact with NPCs -protection.action.mount = You can't mount creatures -protection.action.pve = You can't damage creatures -protection.action.item_drop = You can't drop items -protection.action.item_pickup = You can't pick up items - -# ========== Protection - Denial Reasons ========== -protection.denied.safezone = {0} in a SafeZone. -protection.denied.warzone = {0} in a WarZone. -protection.denied.enemy_claim = {0} in enemy territory. -protection.denied.claimed = {0} in claimed territory. -protection.denied.here = {0} here. -protection.denied.zone = {0} in this zone. -protection.denied.faction_perm = {0} here. (Faction permission: {1}) -protection.denied.ally_territory = {0} here. (Ally territory) -protection.denied.error = Protection error — action blocked for safety. - -# ========== Protection - PvP ========== -protection.pvp.safezone = PvP is disabled in SafeZones. -protection.pvp.same_faction = You cannot attack faction members. -protection.pvp.ally = You cannot attack allies. -protection.pvp.spawn_protected = That player has spawn protection. -protection.pvp.territory_disabled = PvP is disabled in this territory. -protection.pvp.generic = You cannot attack this player. - -# ========== Protection - Entity Damage ========== -protection.mob_damage_disabled = Mob damage is disabled in this zone. -protection.pve_damage_disabled = PvE damage is disabled in this zone. -protection.pve_territory_denied = You cannot damage mobs in this territory. - -# ========== Protection - Combat Tag ========== -protection.combat_tag_command = You cannot use that command while combat tagged. - -# ========== Server Announcements ========== -# These are broadcast to all online players for significant faction events. -# {0}, {1} = dynamic values (faction names, player names) -server_announce.faction_created = {0} has founded the faction {1}! -server_announce.faction_disbanded = The faction {0} has been disbanded! -server_announce.leadership_transfer = {0} is now the leader of {1}! -server_announce.overclaim = {0} has overclaimed territory from {1}! -server_announce.war_declared = {0} has declared war on {1}! -server_announce.alliance_formed = {0} and {1} are now allies! -server_announce.alliance_broken = {0} and {1} are no longer allies! - -# ========== Teleport System ========== -teleport.cooldown_wait = You must wait {0} before teleporting again. -teleport.warmup_start = Teleporting to faction home in {0} seconds... -teleport.combat_cancelled = Teleportation cancelled - you are in combat! -teleport.success_default = Teleported to faction home! -teleport.no_home = Your faction has no home set. -teleport.world_not_found = World not found. -teleport.failed = Teleportation failed. -teleport.countdown = Teleporting in {0} seconds... -teleport.countdown_one = Teleporting in 1 second... -teleport.moved_cancelled = Teleportation cancelled - you moved! -teleport.damage_cancelled = Teleportation cancelled - you took damage! -teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. -teleport.mount_entry_blocked = You can't enter this zone while mounted. - -# ========== Chat Display ========== -chat.display.public = Public -chat.display.faction = Faction -chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/ru-RU/hyperfactions_admin.lang b/src/main/resources/Server/Languages/ru-RU/hyperfactions_admin.lang deleted file mode 100644 index c31b51a0..00000000 --- a/src/main/resources/Server/Languages/ru-RU/hyperfactions_admin.lang +++ /dev/null @@ -1,268 +0,0 @@ -# Language: Russian (ru-RU) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Russian translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions Admin GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule - -# ========== Admin Navigation Bar ========== -nav.dashboard = Dashboard -nav.actions = Actions -nav.factions = Factions -nav.players = Players -nav.economy = Economy -nav.zones = Zones -nav.config = Config -nav.backups = Backups -nav.log = Log -nav.updates = Updates -nav.help = Help -nav.version = Version - -# ========== Common Admin Labels ========== -common.faction_not_found = Faction Not Found -common.no_faction = No Faction -common.not_set = Not set -common.on = On -common.off = Off -common.enable = Enable -common.disable = Disable -common.none_paren = (None) -common.invalid_faction = Invalid faction. -common.leader_prefix = Leader: {0} -common.members_suffix = {0} members -common.claims_suffix = {0} claims -common.factions_suffix = {0} factions -common.players_suffix = {0} players -common.chunks_suffix = {0} chunks -common.entries_suffix = {0} entries -common.found_suffix = {0} found -common.power_format = {0}/{1} power -common.raidable = Raidable -common.protected = Protected -common.no_description = No description set. -common.officers_more = +{0} more -common.custom_max = (custom max) -common.default_max = (default max) -common.now = Now -common.ago_suffix = {0} ago -common.just_now = just now -common.no_membership_history = No membership history - -# ========== Admin Dashboard ========== -dashboard.factions_prefix = Factions: {0} -dashboard.members_prefix = Total Members: {0} -dashboard.claims_prefix = Total Claims: {0} - -# ========== Admin Actions ========== -actions.confirm_reset = Confirm Reset? -actions.confirm_trigger = Confirm Trigger? -actions.kd_reset = Reset K/D for {0} players. -actions.kd_reset_failed = Failed to reset K/D: {0} -actions.upkeep_unavailable = Upkeep processor is not available. -actions.upkeep_triggered = Upkeep collection triggered. -actions.upkeep_failed = Upkeep failed: {0} - -# ========== Admin Disband ========== -disband.faction_gone = Faction no longer exists. -disband.success = Faction '{0}' has been disbanded. -disband.failed = Failed to disband: {0} -disband.no_leader = Faction has no leader, cannot disband. - -# ========== Admin Unclaim All ========== -unclaim.removed = [Admin] Removed {0} claims from {1}. -unclaim.no_claims = {0} had no claims to remove. - -# ========== Admin Factions List ========== -factions.home_not_set = Not set -factions.teleported = Teleported to {0}'s home. -factions.no_home = Faction has no home set. -factions.world_not_found = Target world not found. - -# ========== Admin Faction Info ========== -info.faction_gone = This faction no longer exists. - -# ========== Admin Faction Members ========== -members.sort_role = Role -members.sort_online = Online -members.sort_name = Name -members.sort_power = Power -members.promoted = [Admin] Promoted {0} to {1}. -members.demoted = [Admin] Demoted {0} to {1}. -members.kicked = [Admin] Kicked {0} from the faction. - -# ========== Admin Faction Relations ========== -relations.allies_header = ALLIES ({0}) -relations.enemies_header = ENEMIES ({0}) -relations.no_allies = No allies. -relations.no_enemies = No enemies. -relations.neutral_count = {0} neutral factions -relations.since_today = Since: today -relations.since_one_day = Since: 1 day ago -relations.since_days = Since: {0} days ago -relations.set_ally = [Admin] Set mutual ally status with {0}. -relations.set_enemy = Set mutual enemy status with {0}. -relations.set_neutral = [Admin] Set mutual neutral status with {0}. - -# ========== Admin Faction Settings ========== -settings.locked = This setting is locked by server configuration. -settings.perm_toggled = Set {0} to {1}. -settings.color_changed = Set faction color to {0}. -settings.recruitment_set = Set recruitment to {0}. -settings.no_home = [Admin] This faction has no home set. -settings.home_cleared = Cleared faction home for {0}. - -# ========== Sort Dropdown Labels ========== -sort.power = Power -sort.name = Name -sort.members = Members -sort.balance = Balance - -# ========== Admin Players ========== -players.sort_last_online = Last Online -players.sort_faction = Faction -players.sort_online = Online -players.not_online = Player is not online. -players.world_not_found = Target world not found. -players.teleported = [Admin] Teleported to {0}. - -# ========== Admin Player Info ========== -playerinfo.disband_faction = Disband Faction -playerinfo.kick_leader = Kick Leader -playerinfo.enter_valid_number = Enter a valid number. -playerinfo.enter_valid_positive = Enter a valid positive number. -playerinfo.faction_gone = Faction no longer exists. -playerinfo.kd_reset = Reset K/D for {0}. -playerinfo.kicked_success = Kicked {0} from {1}. -playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. -playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). - -# ========== Admin Economy ========== -economy.no_data = No factions with economy data. -economy.amount_zero = Amount cannot be zero. -economy.enter_amount = Please enter an amount. -economy.invalid_number = Invalid number: {0} -economy.error = An error occurred. -economy.balance_negative = Balance cannot be negative. -economy.failed = Failed: {0} -economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. -economy.bulk_failures = ({0} failed) - -# ========== Admin Zones ========== -zones.not_found = Zone not found. -zones.invalid_id = Invalid zone ID. -zones.deleted = Zone {0} deleted. -zones.delete_failed = Failed to delete zone: {0} -zones.no_chunks = No chunks -zones.chunks_suffix = {0} ({1} chunks) - -# ========== Zone Create Wizard ========== -wizard.enter_name = Please enter a zone name. -wizard.name_too_short = Zone name must be at least {0} characters. -wizard.name_too_long = Zone name cannot exceed {0} characters. -wizard.name_taken = A zone with this name already exists. -wizard.radius_range = Radius must be between 1 and {0}. -wizard.create_failed = Could not create zone: {0} -wizard.created_not_found = Zone created but could not be found. -wizard.created = Created {0} '{1}'! -wizard.chunk_claimed = Claimed chunk ({0}, {1}). -wizard.chunk_failed = Could not claim current chunk: {0} -wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. -wizard.radius_no_claims = No chunks could be claimed (area may be occupied). -wizard.no_claims = Zone created with no claims. -wizard.chunks_preview = ~{0} chunks - -# ========== Zone Rename ========== -zone_rename.zone_gone = Zone no longer exists. -zone_rename.enter_name = Please enter a zone name. -zone_rename.too_short = Zone name must be at least {0} character. -zone_rename.too_long = Zone name cannot exceed {0} characters. -zone_rename.same_name = That's already this zone's name. -zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! -zone_rename.name_taken = A zone with that name already exists. -zone_rename.invalid_name = Invalid zone name. -zone_rename.rename_failed = Failed to rename zone: {0} - -# ========== Zone Change Type ========== -zone_type.zone_gone = Zone no longer exists. -zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). -zone_type.failed = Failed to change zone type: {0} - -# ========== Zone Integration Flags ========== -zone_int.zone_not_found = Zone Not Found -zone_int.no_plugin = (no plugin) -zone_int.default = (default) -zone_int.custom = (custom) - -# ========== Activity Log ========== -log.all_types = All Types -log.no_logs = No activity logs matching filters. - -# ========== Version Page ========== -version.active = Active -version.not_found = Not Found -version.not_detected = Not Detected -version.not_installed = Not Installed -version.active_version = Active (v{0}) -version.active_compatible = Active (compatible) -version.active_claims_only = Active (claims only) -version.installed_no_perm = Installed (no perm provider) -version.active_provider = Active ({0}) - -# ========== Admin Main Page ========== -main.reload_hint = Use /f reload to reload configuration. -main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. - -# ========== Zone Flags/Settings ========== -zflags.invalid_flag = Invalid flag. -zflags.zone_not_found = Zone not found. -zflags.conflict = (conflict) -zflags.mixin = (mixin) -zflags.reset_int = Reset integration flags to defaults. -zflags.reset_all = Reset all flags to defaults. -zflags.reset_failed = Failed to reset flags: {0} -zflags.back_to_settings = Back to Settings - -# ========== Zone Properties ========== -zprop.current_custom = Current: "{0}" (custom) -zprop.current_default = Current: "{0}" (default) -zprop.pvp_disabled = PvP Disabled -zprop.pvp_enabled = PvP Enabled -zprop.name_empty = Name cannot be empty. -zprop.renamed = Zone renamed to "{0}". -zprop.name_taken = A zone with that name already exists. -zprop.name_invalid = Invalid name (max 32 characters). -zprop.rename_failed = Failed to rename: {0} -zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. -zprop.upper_set = Upper title set. -zprop.upper_reset = Upper title reset to default. -zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. -zprop.lower_set = Lower title set. -zprop.lower_reset = Lower title reset to default. - -# ========== Relations Additional ========== -relations.failed = Failed: {0} - -# ========== Members Additional ========== -members.never = Never -members.teleported = [Admin] Teleported to {0}. - -# ========== Player Info Additional ========== -playerinfo.records = {0} records -playerinfo.joined_date = Joined: {0} -playerinfo.current = Current -playerinfo.left_date = Left: {0} - -# ========== Zone Map ========== -map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' -map.position = Your Position: Chunk ({0}, {1}) -map.zone_gone = Zone no longer exists. -map.claimed = Claimed chunk ({0}, {1}) for {2}. -map.claim_failed = Failed to claim chunk: {0} -map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. -map.unclaim_failed = Failed to unclaim chunk: {0} -map.chunk_belongs = This chunk belongs to {0}. -map.chunk_faction = This chunk is claimed by a faction. -map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/ru-RU/hyperfactions_gui.lang b/src/main/resources/Server/Languages/ru-RU/hyperfactions_gui.lang deleted file mode 100644 index bfd9aaba..00000000 --- a/src/main/resources/Server/Languages/ru-RU/hyperfactions_gui.lang +++ /dev/null @@ -1,446 +0,0 @@ -# Language: Russian (ru-RU) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Russian translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule - -# ========== Navigation Bar ========== -nav.dashboard = Dashboard -nav.chat = Chat -nav.members = Members -nav.invites = Invites -nav.browser = Browse -nav.map = Map -nav.leaderboard = Leaderboard -nav.relations = Relations -nav.treasury = Treasury -nav.settings = Settings -nav.logs = Logs -nav.help = Help -nav.admin = Admin -nav.create = Create - -# ========== Help Category Names ========== -help.category.welcome = Welcome -help.category.your_faction = Your Faction -help.category.power_land = Power & Land -help.category.diplomacy = Diplomacy -help.category.combat = Combat & Safety -help.category.economy = Economy -help.category.quick_ref = Quick Reference - -# ========== Main Menu ========== -main_menu.section_my_faction = My Faction -main_menu.section_get_started = Get Started -main_menu.section_territory = Territory -main_menu.section_browse = Browse -main_menu.section_admin = Admin -main_menu.claim_hint = Use /f claim to claim territory. - -# ========== Faction Info Page ========== -faction_info.no_description = No description set. -faction_info.status_open = Open -faction_info.status_invite_only = Invite Only -faction_info.status_raidable = Raidable -faction_info.status_protected = Protected -faction_info.officers_more = +{0} more - -# ========== Rename Modal ========== -rename.no_permission = You don't have permission to rename the faction. -rename.enter_name = Please enter a faction name. -rename.too_short = Faction name must be at least {0} characters. -rename.too_long = Faction name cannot exceed {0} characters. -rename.same_name = That's already your faction's name. -rename.name_taken = A faction with that name already exists. -rename.success = Faction renamed from {0} to {1}! - -# ========== Description Modal ========== -desc.no_permission = You don't have permission to edit the description. -desc.display_none = (None) -desc.cleared = Faction description cleared. -desc.updated = Faction description updated! - -# ========== Tag Modal ========== -tag.no_permission = You don't have permission to edit the tag. -tag.display_none = (None) -tag.cleared = Faction tag cleared. -tag.too_short = Tag must be at least {0} character. -tag.too_long = Tag cannot exceed {0} characters. -tag.invalid_format = Tag can only contain letters and numbers. -tag.same_tag = That's already your faction's tag. -tag.tag_taken = A faction with that tag already exists. -tag.success = Faction tag set to [{0}]! - -# ========== Dashboard Page ========== -dashboard.faction_gone = Your faction no longer exists. -dashboard.available = {0} available -dashboard.at_risk = At Risk! -dashboard.online_count = {0} online -dashboard.status_invite = Invite -dashboard.in_grace = IN GRACE -dashboard.billable_chunks = {0} billable chunks -dashboard.btn_home = Home -dashboard.btn_set_home = Set Home -dashboard.btn_claim = Claim -dashboard.chat_prefix = Chat: {0} -dashboard.btn_leave = Leave -dashboard.no_activity = No recent activity. -dashboard.time_now = now -dashboard.time_minutes = {0}m ago -dashboard.time_hours = {0}h ago -dashboard.time_days = {0}d ago -dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. -dashboard.chat_mode_set = Chat mode: {0} -dashboard.claim_success = Claimed chunk at ({0}, {1}) - -# ========== Faction Main Page ========== -main.no_faction = No Faction -main.joined = You joined the faction! -main.join_failed = Failed to join faction: {0} -main.invite_declined = Invite declined. -main.cooldown = Teleport on cooldown! {0}s remaining. -main.world_not_found = Cannot teleport - world not found. -main.leave_failed = Failed to leave: {0} - -# ========== Shared GUI Labels ========== -common.faction_count = {0} factions -common.leader_label = Leader: {0} -common.sort_power = Power -common.sort_members = Members -common.page_format = {0}/{1} -common.own_faction = (You) - -# ========== Members Page ========== -members.count = {0} members -members.sort_role = Role -members.sort_last_online = Last Online -members.just_now = just now -members.ago = {0} ago -members.never = Never -members.member_not_found = Member not found. -members.promoted = Promoted {0} to {1}. -members.promote_failed = Failed to promote: {0} -members.demoted = Demoted {0} to {1}. -members.demote_failed = Failed to demote: {0} -members.kicked = Kicked {0} from the faction. -members.kick_failed = Failed to kick: {0} - -# ========== Browser Page ========== -browser.sort_name = Name -browser.invalid_faction = Invalid faction. - -# ========== Leaderboard Page ========== -leaderboard.sort_kd = K/D -leaderboard.sort_territory = Territory -leaderboard.sort_balance = Balance - -# ========== Player Info Page ========== -playerinfo.now = Now -playerinfo.history_count = {0} records -playerinfo.joined_label = Joined: {0} -playerinfo.current = Current -playerinfo.left_label = Left: {0} -playerinfo.no_history = No membership history -playerinfo.faction_gone = Faction no longer exists. -playerinfo.reason_active = ACTIVE -playerinfo.reason_left = LEFT -playerinfo.reason_kicked = KICKED -playerinfo.reason_disbanded = DISBANDED - -# ========== Relations Page ========== -relations.relation_count = {0} relations -relations.request_count = {0} requests -relations.type_ally = Ally -relations.type_enemy = Enemy -relations.type_incoming = Incoming -relations.type_outgoing = Outgoing -relations.incoming_request = Incoming request -relations.outgoing_request = Outgoing request -relations.empty_relations = No relations yet. -relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. -relations.empty_pending = No pending ally requests. -relations.today = Today -relations.one_day_ago = 1 day ago -relations.days_ago = {0} days ago -relations.now_neutral = Now neutral with {0}. -relations.now_enemies = Now enemies with {0}! -relations.request_sent = Alliance request sent to {0}. -relations.now_allied = Now allied with {0}! -relations.request_declined = Ally request from {0} declined. -relations.request_cancelled = Ally request to {0} cancelled. -relations.failed = Failed: {0} -relations.search_hint = Search for a faction to set relation -relations.no_results = No factions found matching '{0}' -relations.power_display = {0} power -relations.member_count = {0} members - -# ========== Settings Page ========== -settings.officers_only = Only officers and leaders can change faction settings. -settings.display_none = (None) -settings.home_not_set = Not set -settings.no_permission = You don't have permission to change settings. -settings.only_leader_disband = Only the leader can disband the faction. -settings.perm_locked = This setting is locked by the server. -settings.no_perm_edit = You don't have permission to edit territory permissions. -settings.only_leader_officers = Only the leader can change officer access. -settings.pvp_enabled = Enabled -settings.pvp_disabled = Disabled -settings.not_in_territory = You must be in your faction's territory to set home. -settings.home_set = Faction home set to your current location! -settings.recruitment_set = Recruitment set to {0}. -settings.home_no_set = Your faction does not have a home set. -settings.home_deleted = Faction home deleted! - -# ========== Modules Page ========== -modules.treasury_name = Treasury -modules.treasury_desc = Faction bank & economy system -modules.raids_name = Raids -modules.raids_desc = Scheduled faction battles -modules.levels_name = Levels -modules.levels_desc = Faction progression & XP -modules.war_name = War -modules.war_desc = Formal war declarations -modules.coming_soon = Coming Soon -modules.active = Active -modules.view_treasury = View Treasury -modules.unavailable = Unavailable -modules.no_economy = No economy plugin detected -modules.disabled = Disabled -modules.economy_not_available = Economy features are not available on this server - -# ========== Treasury Page ========== -treasury.wallet_label = Your wallet: {0} -treasury.treasury_label = Treasury balance: {0} -treasury.chunks_detail = {0} free + {1} billable chunks -treasury.cost_label = Cost: {0} -treasury.pending = Pending -treasury.auto_pay_on = Auto-pay: ON -treasury.auto_pay_off = Auto-pay: OFF -treasury.runway_90_plus = 90+ days -treasury.runway_days = {0} days -treasury.runway_day = {0} day -treasury.runway_less_day = < 1 day -treasury.runway_no_funds = No funds -treasury.grace_expires = Grace expires in: {0} -treasury.missed_payments = Missed payments: {0} -treasury.pay_to_clear = Pay {0} to clear grace -treasury.system = System -treasury.type_deposit = Deposit -treasury.type_withdrawal = Withdrawal -treasury.type_transfer_in = Transfer In -treasury.type_transfer_out = Transfer Out -treasury.type_player_transfer = Player Transfer -treasury.type_upkeep = Upkeep -treasury.type_tax = Tax Collection -treasury.type_war_cost = War Cost -treasury.type_raid_cost = Raid Cost -treasury.type_spoils = Spoils -treasury.type_admin = Admin Adjustment -treasury.deposit_title = Deposit to Treasury -treasury.withdraw_title = Withdraw from Treasury -treasury.fee_label = Fee ({0}%) -treasury.confirm_deposit = Confirm Deposit -treasury.confirm_withdrawal = Confirm Withdrawal -treasury.from_wallet = {0} from wallet -treasury.to_wallet = {0} to wallet -treasury.enter_valid_amount = Enter a valid positive amount. -treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. -treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. -treasury.deposit_failed_returned = Failed to deposit. Money returned. -treasury.deposited = Deposited {0} into the treasury. -treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) -treasury.no_withdraw_permission = You don't have permission to withdraw. -treasury.withdraw_denied = Withdrawal denied: {0} -treasury.insufficient_treasury = Insufficient funds in treasury. -treasury.withdraw_limit = Withdrawal limit exceeded. -treasury.withdraw_failed = Withdrawal failed: {0} -treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. -treasury.withdrew = Withdrew {0} from the treasury. -treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) -treasury.search_hint = Search for a player or faction -treasury.no_results = No results for '{0}' -treasury.tag_player = [Player] -treasury.tag_faction = [Faction] -treasury.source_online = Online -treasury.source_offline = Offline -treasury.source_player_db = Hytale player -treasury.no_transfer_permission = You don't have permission to transfer. -treasury.transfer_denied = Transfer denied: {0} -treasury.invalid_target_faction = Invalid target faction. -treasury.target_faction_gone = Target faction no longer exists. -treasury.transfer_failed = Transfer failed: {0} -treasury.transfer_failed_returned = Transfer failed. Funds returned. -treasury.transferred = Transferred {0} to {1}. -treasury.invalid_target_player = Invalid target player. -treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. -treasury.leader_only_perms = Only the leader can change treasury permissions. -treasury.leader_only_upkeep = Only the leader can change upkeep settings. -treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. - -# ========== Confirmation Pages ========== -confirm.disband_not_leader = Only the leader can disband the faction. -confirm.disbanded = Faction '{0}' has been disbanded. -confirm.disband_failed = Failed to disband faction. -confirm.succession_title = Leadership will transfer to: -confirm.no_members_warning = WARNING: No other members! -confirm.will_disband = Leaving will disband the faction permanently. -confirm.not_in_faction = You are not in this faction. -confirm.not_leader_anymore = You are no longer the leader. -confirm.no_successor = No successor available. Use disband instead. -confirm.transfer_failed = Failed to transfer leadership: {0} -confirm.leader_left = Leadership transferred to {0}. You have left {1}. -confirm.leave_failed = Failed to leave faction: {0} -confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. -confirm.left_faction = You have left {0}. -confirm.faction_gone = Faction no longer exists. -confirm.not_leader_transfer = Only the leader can transfer leadership. -confirm.leadership_transferred = Leadership transferred to {0}. - -# ========== Logs Viewer Page ========== -logs.title = {0} - Activity Logs -logs.entry_count = {0} entries -logs.all_types = All Types -logs.no_logs_type = No logs of this type. -logs.no_logs = No activity logs yet. - -# ========== Chat Page ========== -chat.placeholder = Type a message... -chat.no_messages = No messages yet. -chat.no_ally_permission = You don't have permission for ally chat. -chat.no_permission = No permission. -chat.faction_gone = Your faction no longer exists. -chat.time_now = now -chat.time_minutes = {0}m -chat.time_hours = {0}h - -# ========== Invites Page ========== -invites.invite_count = {0} invites -invites.request_count = {0} requests -invites.invited_by = Invited by: {0} -invites.no_message = No message -invites.expires = Expires: {0} -invites.type_outgoing = Outgoing -invites.type_request = Request -invites.invited_by_label = Invited by: -invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. -invites.empty_requests = No join requests. Players can request to join with /f request. -invites.invalid_player = Invalid player. -invites.cancelled_invite = Cancelled invite to {0}. -invites.player_joined = {0} has joined the faction! -invites.faction_full = Faction is full. Cannot accept request. -invites.add_failed = Failed to add player to faction. -invites.request_expired = Request not found or expired. -invites.request_declined = Declined join request from {0}. -invites.time_seconds = {0}s -invites.time_minutes = {0}m -invites.time_hours = {0}h - -# ========== Map Page ========== -map.position = Your Position: Chunk ({0}, {1}) -map.legend_protected = Protected -map.claim_stats = Claims: {0}/{1} ({2} Available) -map.overclaimed = OVERCLAIMED by {0}! -map.power_display = Power: {0}/{1} -map.join_to_claim = Join a faction to claim -map.claim_success = Claimed chunk at ({0}, {1})! -map.claim_not_in_faction = You must be in a faction to claim territory. -map.claim_not_officer = Only officers and leaders can claim territory. -map.claim_already_yours = You already own this chunk. -map.claim_already_claimed = This chunk is already claimed by another faction. -map.claim_not_adjacent = You can only claim chunks adjacent to your territory. -map.claim_max = You have reached your maximum claim limit. -map.claim_world_not_allowed = Claiming is not allowed in this world. -map.claim_orbisguard = This area is protected by OrbisGuard. -map.claim_failed = Failed to claim chunk. -map.unclaim_success = Unclaimed chunk at ({0}, {1}). -map.unclaim_not_in_faction = You must be in a faction. -map.unclaim_not_officer = Only officers and leaders can unclaim territory. -map.unclaim_not_claimed = This chunk is not claimed. -map.unclaim_not_yours = This chunk belongs to another faction. -map.unclaim_home = Cannot unclaim the chunk containing your faction home. -map.unclaim_failed = Failed to unclaim chunk. -map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! -map.overclaim_not_in_faction = You must be in a faction. -map.overclaim_not_officer = Only officers and leaders can overclaim territory. -map.overclaim_already_yours = You already own this chunk. -map.overclaim_ally = You cannot overclaim allied territory. -map.overclaim_has_power = This faction has enough power to defend their territory. -map.overclaim_max = You have reached your maximum claim limit. -map.overclaim_failed = Failed to overclaim chunk. -# ========== Create Faction Page ========== -create.preview_name = Your Faction Name -create.leader_prefix = Leader: {0} -create.enter_name = Please enter a faction name. -create.name_too_short = Faction name must be at least {0} characters. -create.name_too_long = Faction name cannot exceed {0} characters. -create.name_taken = A faction with this name already exists. -create.tag_length = Faction tag must be {0}-{1} characters. -create.tag_format = Faction tag can only contain letters and numbers. -create.desc_too_long = Description cannot exceed {0} characters. -create.created = Faction {0} created successfully! -create.created_no_dashboard = Faction created but could not open dashboard. -create.invalid_name = Invalid faction name. -create.create_failed = Could not create faction. - -# ========== New Player Pages ========== -newplayer.pending_count = {0} pending -newplayer.received_header = RECEIVED INVITES ({0}) -newplayer.requests_header = YOUR REQUESTS ({0}) -newplayer.no_invites = No invites. Browse factions to find one! -newplayer.no_requests = No pending requests. -newplayer.invited_by = Invited by: {0} -newplayer.member_count = {0} members -newplayer.power_count = {0} power -newplayer.claim_count = {0} claims -newplayer.awaiting_review = Awaiting review -newplayer.expires_in = Expires in {0}h -newplayer.time_just_now = just now -newplayer.time_minutes = {0} min ago -newplayer.time_hours = {0}h ago -newplayer.time_days = {0}d ago -newplayer.invalid_faction = Invalid faction. -newplayer.invite_expired = This invite has expired or was revoked. -newplayer.faction_gone = Faction no longer exists. -newplayer.joined = You joined {0}! -newplayer.faction_full = This faction is full. -newplayer.join_failed = Could not join faction. -newplayer.invite_declined = Invite declined. -newplayer.request_cancelled = Cancelled request to join {0}. -newplayer.faction_count = {0} factions -newplayer.browse_subtitle = Find your new home! -newplayer.sort_power = Power -newplayer.sort_name = Name -newplayer.sort_members = Members -newplayer.btn_accept = Accept -newplayer.btn_pending = Pending -newplayer.btn_join = Join -newplayer.btn_request = Request -newplayer.invite_only_msg = This faction is invite-only. -newplayer.welcome_hint = Welcome! Use /f to open faction menu. -newplayer.faction_open_hint = This faction is open! Click JOIN instead. -newplayer.already_requested = You already have a pending request to this faction. -newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. -newplayer.request_sent = Join request sent to {0}! -newplayer.officer_review = An officer will review your request. -newplayer.map_hint = View Only - Join a faction to claim territory! - -# Player Settings -nav.player_settings = Settings -player_settings.title = Player Settings -player_settings.language_section = Language -player_settings.auto_detect = Auto-detect from client -player_settings.auto_detect_desc = Uses your game client's language setting -player_settings.language_label = Language -player_settings.notifications_section = Notifications -player_settings.territory_alerts = Territory Alerts -player_settings.territory_alerts_desc = Show notifications when entering/leaving territories -player_settings.death_announcements = Death Broadcasts -player_settings.death_announcements_desc = Receive faction member death location announcements -player_settings.power_notifications = Power Changes -player_settings.power_notifications_desc = Show messages when your power changes -player_settings.language_changed = Language changed to {0} -player_settings.pref_enabled = {0} enabled -player_settings.pref_disabled = {0} disabled diff --git a/src/main/resources/Server/Languages/tr-TR/hyperfactions.lang b/src/main/resources/Server/Languages/tr-TR/hyperfactions.lang deleted file mode 100644 index b88561fa..00000000 --- a/src/main/resources/Server/Languages/tr-TR/hyperfactions.lang +++ /dev/null @@ -1,452 +0,0 @@ -# Language: Turkish (tr-TR) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Turkish translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions - English Translations -# Format: key = value (or key = "quoted value") -# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule -# Placeholders: {0}, {1}, etc. - -# ========== Common ========== -common.no_permission = You don't have permission to do that. -common.not_in_faction = You are not in a faction. -common.already_in_faction = You are already in a faction. -common.player_not_found = Player not found. -common.faction_not_found = Faction not found. -common.player_not_online = That player is not online. -common.must_be_leader = Only the faction leader can do that. -common.must_be_officer = You must be an Officer or Leader to do that. -common.combat_tagged = You can't do that while combat tagged. -common.cancel = Cancel -common.confirm = Confirm -common.save = Save -common.close = Close -common.yes = Yes -common.no = No -common.loading = Loading... -common.online = Online -common.offline = Offline -common.enabled = Enabled -common.disabled = Disabled -common.none = None -common.page = Page {0} of {1} -common.unknown = Unknown -common.error_generic = Something went wrong. Please try again. -common.gui_fallback = Could not access GUI. Use /f help for commands. -common.admin_prefix = [Admin] -common.location_error = Could not determine your location. -common.world_error = Could not determine your world. -common.invalid_id = Invalid faction ID. -common.na = N/A - -# ========== Commands - Create ========== -cmd.create.no_permission = You don't have permission to create factions. -cmd.create.usage = Usage: /f create -cmd.create.success = Faction '{0}' created! -cmd.create.already_in_named = You are already in {0}. -cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. -cmd.create.name_taken = That faction name is already taken. -cmd.create.name_too_short = Faction name is too short. -cmd.create.name_too_long = Faction name is too long. -cmd.create.failed = Failed to create faction. - -# ========== Commands - Disband ========== -cmd.disband.no_permission = You don't have permission to disband factions. -cmd.disband.not_leader = Only the faction leader can disband. -cmd.disband.confirm_prompt = Are you sure you want to disband your faction? -cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. -cmd.disband.success = Your faction has been disbanded. -cmd.disband.failed = Failed to disband faction. -cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. - -# ========== Commands - Rename ========== -cmd.rename.no_permission = You don't have permission. -cmd.rename.not_leader = Only the leader can rename the faction. -cmd.rename.usage = Usage: /f rename -cmd.rename.too_short = Name is too short (min {0} chars). -cmd.rename.too_long = Name is too long (max {0} chars). -cmd.rename.name_taken = That name is already taken. -cmd.rename.success = Faction renamed to {0}! -cmd.rename.broadcast = {0} renamed the faction to {1} - -# ========== Commands - Description ========== -cmd.desc.no_permission = You don't have permission. -cmd.desc.not_officer = You must be an officer to set the description. -cmd.desc.set = Faction description set! -cmd.desc.cleared = Faction description cleared. - -# ========== Commands - Open / Close ========== -cmd.open.no_permission = You don't have permission. -cmd.open.not_leader = Only the leader can change this setting. -cmd.open.already_open = Your faction is already open. -cmd.open.success = Your faction is now open! Anyone can join with /f join. -cmd.open.broadcast = {0} opened the faction to public joining. -cmd.close.no_permission = You don't have permission. -cmd.close.not_leader = Only the leader can change this setting. -cmd.close.already_closed = Your faction is already closed. -cmd.close.success = Your faction is now invite-only. -cmd.close.broadcast = {0} closed the faction to invite-only. - -# ========== Commands - Color ========== -cmd.color.no_permission = You don't have permission. -cmd.color.not_officer = You must be an officer to change the color. -cmd.color.colors_disabled = Faction colors are disabled. -cmd.color.usage = Usage: /f color -cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex -cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. -cmd.color.success = Faction color updated! - -# ========== Commands - Claim ========== -cmd.claim.no_permission = You don't have permission to claim territory. -cmd.claim.already_yours = Your faction already owns this chunk. -cmd.claim.cannot_claim_ally = You cannot claim ally territory. -cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. -cmd.claim.success = Claimed chunk at {0}, {1}! -cmd.claim.not_officer = You must be an officer to claim land. -cmd.claim.already_claimed = This chunk is already claimed. -cmd.claim.max_claims = Your faction has reached max claims. Get more power! -cmd.claim.not_adjacent = You must claim adjacent to existing territory. -cmd.claim.world_not_allowed = Claiming is not allowed in this world. -cmd.claim.orbisguard = This area is protected by OrbisGuard. -cmd.claim.zone_protected = This chunk is in a safezone or warzone. -cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. -cmd.claim.failed = Failed to claim chunk. - -# ========== Commands - Invite ========== -cmd.invite.no_permission = You don't have permission to invite players. -cmd.invite.not_officer = You must be an officer to invite players. -cmd.invite.usage = Usage: /f invite -cmd.invite.player_not_found = Player '{0}' not found or offline. -cmd.invite.target_in_faction = That player is already in a faction. -cmd.invite.sent = Invited {0} to your faction. -cmd.invite.received = You have been invited to join {0}! -cmd.invite.accept_hint = Type /f accept {0} to join. - -# ========== Commands - Accept / Join ========== -cmd.join.no_permission = You don't have permission to join factions. -cmd.join.already_in_named = You are already in {0}. -cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.join.no_invites = You have no pending invites. -cmd.join.faction_not_found = Faction '{0}' not found. -cmd.join.not_invited = You have no invite from that faction. -cmd.join.faction_gone = That faction no longer exists. -cmd.join.success = You have joined {0}! -cmd.join.broadcast = {0} has joined the faction! -cmd.join.faction_full = That faction is full. -cmd.join.failed = Failed to join faction. - -# ========== Commands - Kick ========== -cmd.kick.no_permission = You don't have permission to kick members. -cmd.kick.usage = Usage: /f kick -cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. -cmd.kick.success = Kicked {0} from the faction. -cmd.kick.broadcast = {0} was kicked from the faction. -cmd.kick.kicked = You have been kicked from the faction. -cmd.kick.cannot_kick_higher = You don't have permission to kick that player. -cmd.kick.cannot_kick_leader = You cannot kick the faction leader. -cmd.kick.failed = Failed to kick player. - -# ========== Commands - Leave ========== -cmd.leave.no_permission = You don't have permission to leave factions. -cmd.leave.confirm_prompt = Are you sure you want to leave your faction? -cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. -cmd.leave.success = You have left your faction. -cmd.leave.broadcast = {0} has left the faction. -cmd.leave.failed = Failed to leave faction. -cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. - -# ========== Commands - Promote / Demote / Transfer ========== -cmd.rank.promote_no_permission = You don't have permission to promote members. -cmd.rank.promote_usage = Usage: /f promote -cmd.rank.promoted = Promoted {0} to {1}! -cmd.rank.promote_broadcast = {0} was promoted to {1}! -cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. -cmd.rank.promote_failed = Failed to promote player. -cmd.rank.demote_no_permission = You don't have permission to demote members. -cmd.rank.demote_usage = Usage: /f demote -cmd.rank.demoted = Demoted {0} to {1}. -cmd.rank.demote_broadcast = {0} was demoted to {1}. -cmd.rank.already_lowest = That player is already a Member. -cmd.rank.demote_failed = Failed to demote player. -cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. -cmd.rank.transfer_usage = Usage: /f transfer -cmd.rank.player_not_in_faction = Player not found in your faction. -cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? -cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. -cmd.rank.transferred = Transferred leadership to {0}! -cmd.rank.transfer_broadcast = {0} is now the faction leader! -cmd.rank.transfer_failed = Failed to transfer leadership. -cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. - -# ========== Commands - Unclaim ========== -cmd.unclaim.no_permission = You don't have permission to unclaim territory. -cmd.unclaim.success = Unclaimed chunk at {0}, {1}. -cmd.unclaim.not_officer = You must be an officer to unclaim land. -cmd.unclaim.chunk_not_claimed = This chunk is not claimed. -cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. -cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. -cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. -cmd.unclaim.failed = Failed to unclaim chunk. - -# ========== Commands - Overclaim ========== -cmd.overclaim.no_permission = You don't have permission to overclaim territory. -cmd.overclaim.success = Overclaimed enemy territory! -cmd.overclaim.not_officer = You must be an officer to overclaim. -cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. -cmd.overclaim.own_chunk = Your faction already owns this chunk. -cmd.overclaim.ally = You cannot overclaim ally territory. -cmd.overclaim.target_has_power = This faction still has enough power. -cmd.overclaim.failed = Failed to overclaim. - -# ========== Commands - Stuck ========== -cmd.stuck.no_permission = You don't have permission to use /f stuck. -cmd.stuck.not_stuck = You're not stuck - this is wilderness. -cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! -cmd.stuck.no_safe = Could not find a safe location. -cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! - -# ========== Commands - Home ========== -cmd.home.no_permission = You don't have permission to teleport to faction home. -cmd.home.no_home = Your faction has no home set. -cmd.home.combat_tagged = You cannot teleport while in combat! -cmd.home.teleported = Teleported to faction home! - -# ========== Commands - SetHome ========== -cmd.sethome.no_permission = You don't have permission to set faction home. -cmd.sethome.world_not_allowed = Cannot set home in this world. -cmd.sethome.not_in_territory = You can only set home in your faction's territory. -cmd.sethome.set = Faction home set! -cmd.sethome.broadcast = {0} set the faction home. -cmd.sethome.not_officer = You must be an officer to set the home. -cmd.sethome.failed = Failed to set home. - -# ========== Commands - DelHome ========== -cmd.delhome.no_permission = You don't have permission to delete faction home. -cmd.delhome.no_home = Your faction does not have a home set. -cmd.delhome.deleted = Faction home deleted! -cmd.delhome.broadcast = {0} deleted the faction home. -cmd.delhome.not_officer = You must be an officer to delete the home. -cmd.delhome.failed = Failed to delete home. - -# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== -cmd.relation.ally_no_permission = You don't have permission to manage alliances. -cmd.relation.ally_usage = Usage: /f ally -cmd.relation.ally_sent = Ally request sent to {0}! -cmd.relation.ally_formed = You are now allies with {0}! -cmd.relation.already_ally = You are already allied with that faction. -cmd.relation.ally_failed = Failed to send ally request. -cmd.relation.enemy_no_permission = You don't have permission to declare enemies. -cmd.relation.enemy_usage = Usage: /f enemy -cmd.relation.enemy_declared = {0} is now your enemy! -cmd.relation.already_enemy = You are already enemies with that faction. -cmd.relation.max_enemies = You have reached the maximum number of enemies. -cmd.relation.enemy_failed = Failed to set enemy. -cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. -cmd.relation.neutral_usage = Usage: /f neutral -cmd.relation.neutral_set = Your faction is now neutral with {0}. -cmd.relation.already_neutral = You are already neutral with that faction. -cmd.relation.neutral_failed = Failed to set neutral. -cmd.relation.cannot_self = You cannot ally with yourself. -cmd.relation.max_allies = You have reached the maximum number of allies. -cmd.relation.view_no_permission = You don't have permission to view relations. -cmd.relation.header = === Faction Relations === -cmd.relation.allies_count = Allies ({0}): -cmd.relation.enemies_count = Enemies ({0}): -cmd.relation.list_entry = - {0} - -# ========== Commands - Chat ========== -cmd.chat.usage = Usage: /f c [f|a|off] -cmd.chat.no_permission = You don't have permission for that chat mode. -cmd.chat.mode_set = Chat mode set to {0} - -# ========== Commands - Invites ========== -cmd.invites.not_officer = You must be an officer to manage invites. -cmd.invites.header = === Faction Invites === -cmd.invites.no_pending = No pending invites or requests. -cmd.invites.outgoing = Outgoing Invites: -cmd.invites.outgoing_entry = {0} (invited by {1}) -cmd.invites.requests = Join Requests: -cmd.invites.request_entry = {0}{1} -cmd.invites.your_invites_header = === Your Invites === -cmd.invites.no_invites = You have no pending invites. -cmd.invites.invite_entry = {0} - Use /f accept {1} - -# ========== Commands - Request ========== -cmd.request.no_permission = You don't have permission to request faction membership. -cmd.request.already_in_named = You are already in {0}. -cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.request.usage = Usage: /f request [message] -cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. -cmd.request.already_requested = You already have a pending request to that faction. -cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. -cmd.request.sent = Sent join request to {0}! -cmd.request.your_message = Your message: "{0}" -cmd.request.officer_review = An officer will review your request. -cmd.request.officer_notify = {0} has requested to join your faction! -cmd.request.officer_review_hint = Use /f gui > Invites to review. - -# ========== Commands - Info ========== -cmd.info.faction_header = === {0} === -cmd.info.player_header = === {0} === -cmd.info.no_permission = You don't have permission to view faction info. -cmd.info.faction_not_found = Faction '{0}' not found. -cmd.info.not_in_faction_hint = You are not in a faction. Use /f info -cmd.info.leader = Leader: {0} -cmd.info.members = Members: {0}/{1} -cmd.info.power = Power: {0} -cmd.info.claims = Claims: {0} -cmd.info.raidable = RAIDABLE! -cmd.info.allies = Allies: {0} -cmd.info.enemies = Enemies: {0} -cmd.info.they_consider = They consider you: {0} -cmd.info.you_consider = You consider them: {0} -cmd.info.members_no_permission = You don't have permission to view faction members. -cmd.info.members_header = === {0} Members ({1}) === -cmd.info.member_online = [Online] -cmd.info.list_no_permission = You don't have permission to view faction list. -cmd.info.list_empty = There are no factions. -cmd.info.list_header = === Factions ({0}) === -cmd.info.list_entry = {0} - {1} members, {2} power -cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] -cmd.info.help_no_permission = You don't have permission to view help. -cmd.info.who_no_permission = You don't have permission to view player info. -cmd.info.who_faction = Faction: {0} -cmd.info.who_role = Role: {0} -cmd.info.who_joined = Joined: {0} -cmd.info.who_faction_none = Faction: None -cmd.info.who_power = Power: {0} -cmd.info.who_status = Status: {0} -cmd.info.who_last_seen = Last seen: {0} -cmd.info.map_no_permission = You don't have permission to view the map. -cmd.info.map_header = === Territory Map === -cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild -cmd.info.map_gui_hint = Use /f gui for interactive map - -# ========== Commands - Power ========== -cmd.power.personal = Personal Power: {0}/{1} -cmd.power.faction = Faction Power: {0}/{1} -cmd.power.death_loss = Death Loss: {0} -cmd.power.regen = Regen Rate: {0}/hr -cmd.power.no_permission = You don't have permission to view power info. -cmd.power.header = {0}'s Power: -cmd.power.current = Current: {0} - -# ========== Commands - Economy ========== -cmd.economy.balance = Balance: {0} -cmd.economy.deposited = Deposited {0} into the faction treasury. -cmd.economy.withdrawn = Withdrew {0} from the faction treasury. -cmd.economy.transferred = Transferred {0} to {1}. -cmd.economy.insufficient = Insufficient funds in faction treasury. -cmd.economy.invalid_amount = Invalid amount: {0} -cmd.economy.economy_disabled = Economy is disabled. -cmd.economy.balance_no_permission = You don't have permission to view balances. -cmd.economy.treasury_unavailable = Treasury is not available. -cmd.economy.balance_display = {0}'s treasury: {1} -cmd.economy.deposit_no_permission = You don't have permission to deposit. -cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. -cmd.economy.deposit_usage = Usage: /f deposit -cmd.economy.amount_positive = Amount must be positive. -cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} -cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. -cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. -cmd.economy.withdraw_no_permission = You don't have permission to withdraw. -cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. -cmd.economy.withdraw_usage = Usage: /f withdraw -cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} -cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. -cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. -cmd.economy.withdraw_failed = Withdrawal failed: {0} -cmd.economy.transfer_no_permission = You don't have permission to transfer. -cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. -cmd.economy.transfer_usage = Usage: /f money transfer -cmd.economy.transfer_self = Cannot transfer to your own faction. -cmd.economy.transfer_limit_denied = Transfer denied: {0} -cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. -cmd.economy.transfer_failed = Transfer failed: {0} -cmd.economy.log_no_permission = You don't have permission to view the transaction log. -cmd.economy.log_header = Transaction Log (page {0}/{1}) -cmd.economy.log_empty = No transactions found. -cmd.economy.money_help_header = Treasury Commands: -cmd.economy.money_help_balance = /f money balance [faction] - View balance -cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury -cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury -cmd.economy.money_help_transfer = /f money transfer - Transfer between factions -cmd.economy.money_help_log = /f money log [page] [type] - View transaction history - -# ========== Protection - Action Phrases ========== -protection.action.generic = You can't do that -protection.action.build = You can't build or break blocks -protection.action.interact = You can't interact with that -protection.action.door = You can't use doors -protection.action.container = You can't open containers -protection.action.bench = You can't use crafting stations -protection.action.processing = You can't use processing stations -protection.action.seat = You can't use seats -protection.action.light = You can't toggle lights -protection.action.teleporter = You can't use teleporters -protection.action.crate = You can't use crates -protection.action.tame = You can't tame creatures -protection.action.npc = You can't interact with NPCs -protection.action.mount = You can't mount creatures -protection.action.pve = You can't damage creatures -protection.action.item_drop = You can't drop items -protection.action.item_pickup = You can't pick up items - -# ========== Protection - Denial Reasons ========== -protection.denied.safezone = {0} in a SafeZone. -protection.denied.warzone = {0} in a WarZone. -protection.denied.enemy_claim = {0} in enemy territory. -protection.denied.claimed = {0} in claimed territory. -protection.denied.here = {0} here. -protection.denied.zone = {0} in this zone. -protection.denied.faction_perm = {0} here. (Faction permission: {1}) -protection.denied.ally_territory = {0} here. (Ally territory) -protection.denied.error = Protection error — action blocked for safety. - -# ========== Protection - PvP ========== -protection.pvp.safezone = PvP is disabled in SafeZones. -protection.pvp.same_faction = You cannot attack faction members. -protection.pvp.ally = You cannot attack allies. -protection.pvp.spawn_protected = That player has spawn protection. -protection.pvp.territory_disabled = PvP is disabled in this territory. -protection.pvp.generic = You cannot attack this player. - -# ========== Protection - Entity Damage ========== -protection.mob_damage_disabled = Mob damage is disabled in this zone. -protection.pve_damage_disabled = PvE damage is disabled in this zone. -protection.pve_territory_denied = You cannot damage mobs in this territory. - -# ========== Protection - Combat Tag ========== -protection.combat_tag_command = You cannot use that command while combat tagged. - -# ========== Server Announcements ========== -# These are broadcast to all online players for significant faction events. -# {0}, {1} = dynamic values (faction names, player names) -server_announce.faction_created = {0} has founded the faction {1}! -server_announce.faction_disbanded = The faction {0} has been disbanded! -server_announce.leadership_transfer = {0} is now the leader of {1}! -server_announce.overclaim = {0} has overclaimed territory from {1}! -server_announce.war_declared = {0} has declared war on {1}! -server_announce.alliance_formed = {0} and {1} are now allies! -server_announce.alliance_broken = {0} and {1} are no longer allies! - -# ========== Teleport System ========== -teleport.cooldown_wait = You must wait {0} before teleporting again. -teleport.warmup_start = Teleporting to faction home in {0} seconds... -teleport.combat_cancelled = Teleportation cancelled - you are in combat! -teleport.success_default = Teleported to faction home! -teleport.no_home = Your faction has no home set. -teleport.world_not_found = World not found. -teleport.failed = Teleportation failed. -teleport.countdown = Teleporting in {0} seconds... -teleport.countdown_one = Teleporting in 1 second... -teleport.moved_cancelled = Teleportation cancelled - you moved! -teleport.damage_cancelled = Teleportation cancelled - you took damage! -teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. -teleport.mount_entry_blocked = You can't enter this zone while mounted. - -# ========== Chat Display ========== -chat.display.public = Public -chat.display.faction = Faction -chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/tr-TR/hyperfactions_admin.lang b/src/main/resources/Server/Languages/tr-TR/hyperfactions_admin.lang deleted file mode 100644 index 932ef287..00000000 --- a/src/main/resources/Server/Languages/tr-TR/hyperfactions_admin.lang +++ /dev/null @@ -1,268 +0,0 @@ -# Language: Turkish (tr-TR) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Turkish translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions Admin GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule - -# ========== Admin Navigation Bar ========== -nav.dashboard = Dashboard -nav.actions = Actions -nav.factions = Factions -nav.players = Players -nav.economy = Economy -nav.zones = Zones -nav.config = Config -nav.backups = Backups -nav.log = Log -nav.updates = Updates -nav.help = Help -nav.version = Version - -# ========== Common Admin Labels ========== -common.faction_not_found = Faction Not Found -common.no_faction = No Faction -common.not_set = Not set -common.on = On -common.off = Off -common.enable = Enable -common.disable = Disable -common.none_paren = (None) -common.invalid_faction = Invalid faction. -common.leader_prefix = Leader: {0} -common.members_suffix = {0} members -common.claims_suffix = {0} claims -common.factions_suffix = {0} factions -common.players_suffix = {0} players -common.chunks_suffix = {0} chunks -common.entries_suffix = {0} entries -common.found_suffix = {0} found -common.power_format = {0}/{1} power -common.raidable = Raidable -common.protected = Protected -common.no_description = No description set. -common.officers_more = +{0} more -common.custom_max = (custom max) -common.default_max = (default max) -common.now = Now -common.ago_suffix = {0} ago -common.just_now = just now -common.no_membership_history = No membership history - -# ========== Admin Dashboard ========== -dashboard.factions_prefix = Factions: {0} -dashboard.members_prefix = Total Members: {0} -dashboard.claims_prefix = Total Claims: {0} - -# ========== Admin Actions ========== -actions.confirm_reset = Confirm Reset? -actions.confirm_trigger = Confirm Trigger? -actions.kd_reset = Reset K/D for {0} players. -actions.kd_reset_failed = Failed to reset K/D: {0} -actions.upkeep_unavailable = Upkeep processor is not available. -actions.upkeep_triggered = Upkeep collection triggered. -actions.upkeep_failed = Upkeep failed: {0} - -# ========== Admin Disband ========== -disband.faction_gone = Faction no longer exists. -disband.success = Faction '{0}' has been disbanded. -disband.failed = Failed to disband: {0} -disband.no_leader = Faction has no leader, cannot disband. - -# ========== Admin Unclaim All ========== -unclaim.removed = [Admin] Removed {0} claims from {1}. -unclaim.no_claims = {0} had no claims to remove. - -# ========== Admin Factions List ========== -factions.home_not_set = Not set -factions.teleported = Teleported to {0}'s home. -factions.no_home = Faction has no home set. -factions.world_not_found = Target world not found. - -# ========== Admin Faction Info ========== -info.faction_gone = This faction no longer exists. - -# ========== Admin Faction Members ========== -members.sort_role = Role -members.sort_online = Online -members.sort_name = Name -members.sort_power = Power -members.promoted = [Admin] Promoted {0} to {1}. -members.demoted = [Admin] Demoted {0} to {1}. -members.kicked = [Admin] Kicked {0} from the faction. - -# ========== Admin Faction Relations ========== -relations.allies_header = ALLIES ({0}) -relations.enemies_header = ENEMIES ({0}) -relations.no_allies = No allies. -relations.no_enemies = No enemies. -relations.neutral_count = {0} neutral factions -relations.since_today = Since: today -relations.since_one_day = Since: 1 day ago -relations.since_days = Since: {0} days ago -relations.set_ally = [Admin] Set mutual ally status with {0}. -relations.set_enemy = Set mutual enemy status with {0}. -relations.set_neutral = [Admin] Set mutual neutral status with {0}. - -# ========== Admin Faction Settings ========== -settings.locked = This setting is locked by server configuration. -settings.perm_toggled = Set {0} to {1}. -settings.color_changed = Set faction color to {0}. -settings.recruitment_set = Set recruitment to {0}. -settings.no_home = [Admin] This faction has no home set. -settings.home_cleared = Cleared faction home for {0}. - -# ========== Sort Dropdown Labels ========== -sort.power = Power -sort.name = Name -sort.members = Members -sort.balance = Balance - -# ========== Admin Players ========== -players.sort_last_online = Last Online -players.sort_faction = Faction -players.sort_online = Online -players.not_online = Player is not online. -players.world_not_found = Target world not found. -players.teleported = [Admin] Teleported to {0}. - -# ========== Admin Player Info ========== -playerinfo.disband_faction = Disband Faction -playerinfo.kick_leader = Kick Leader -playerinfo.enter_valid_number = Enter a valid number. -playerinfo.enter_valid_positive = Enter a valid positive number. -playerinfo.faction_gone = Faction no longer exists. -playerinfo.kd_reset = Reset K/D for {0}. -playerinfo.kicked_success = Kicked {0} from {1}. -playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. -playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). - -# ========== Admin Economy ========== -economy.no_data = No factions with economy data. -economy.amount_zero = Amount cannot be zero. -economy.enter_amount = Please enter an amount. -economy.invalid_number = Invalid number: {0} -economy.error = An error occurred. -economy.balance_negative = Balance cannot be negative. -economy.failed = Failed: {0} -economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. -economy.bulk_failures = ({0} failed) - -# ========== Admin Zones ========== -zones.not_found = Zone not found. -zones.invalid_id = Invalid zone ID. -zones.deleted = Zone {0} deleted. -zones.delete_failed = Failed to delete zone: {0} -zones.no_chunks = No chunks -zones.chunks_suffix = {0} ({1} chunks) - -# ========== Zone Create Wizard ========== -wizard.enter_name = Please enter a zone name. -wizard.name_too_short = Zone name must be at least {0} characters. -wizard.name_too_long = Zone name cannot exceed {0} characters. -wizard.name_taken = A zone with this name already exists. -wizard.radius_range = Radius must be between 1 and {0}. -wizard.create_failed = Could not create zone: {0} -wizard.created_not_found = Zone created but could not be found. -wizard.created = Created {0} '{1}'! -wizard.chunk_claimed = Claimed chunk ({0}, {1}). -wizard.chunk_failed = Could not claim current chunk: {0} -wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. -wizard.radius_no_claims = No chunks could be claimed (area may be occupied). -wizard.no_claims = Zone created with no claims. -wizard.chunks_preview = ~{0} chunks - -# ========== Zone Rename ========== -zone_rename.zone_gone = Zone no longer exists. -zone_rename.enter_name = Please enter a zone name. -zone_rename.too_short = Zone name must be at least {0} character. -zone_rename.too_long = Zone name cannot exceed {0} characters. -zone_rename.same_name = That's already this zone's name. -zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! -zone_rename.name_taken = A zone with that name already exists. -zone_rename.invalid_name = Invalid zone name. -zone_rename.rename_failed = Failed to rename zone: {0} - -# ========== Zone Change Type ========== -zone_type.zone_gone = Zone no longer exists. -zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). -zone_type.failed = Failed to change zone type: {0} - -# ========== Zone Integration Flags ========== -zone_int.zone_not_found = Zone Not Found -zone_int.no_plugin = (no plugin) -zone_int.default = (default) -zone_int.custom = (custom) - -# ========== Activity Log ========== -log.all_types = All Types -log.no_logs = No activity logs matching filters. - -# ========== Version Page ========== -version.active = Active -version.not_found = Not Found -version.not_detected = Not Detected -version.not_installed = Not Installed -version.active_version = Active (v{0}) -version.active_compatible = Active (compatible) -version.active_claims_only = Active (claims only) -version.installed_no_perm = Installed (no perm provider) -version.active_provider = Active ({0}) - -# ========== Admin Main Page ========== -main.reload_hint = Use /f reload to reload configuration. -main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. - -# ========== Zone Flags/Settings ========== -zflags.invalid_flag = Invalid flag. -zflags.zone_not_found = Zone not found. -zflags.conflict = (conflict) -zflags.mixin = (mixin) -zflags.reset_int = Reset integration flags to defaults. -zflags.reset_all = Reset all flags to defaults. -zflags.reset_failed = Failed to reset flags: {0} -zflags.back_to_settings = Back to Settings - -# ========== Zone Properties ========== -zprop.current_custom = Current: "{0}" (custom) -zprop.current_default = Current: "{0}" (default) -zprop.pvp_disabled = PvP Disabled -zprop.pvp_enabled = PvP Enabled -zprop.name_empty = Name cannot be empty. -zprop.renamed = Zone renamed to "{0}". -zprop.name_taken = A zone with that name already exists. -zprop.name_invalid = Invalid name (max 32 characters). -zprop.rename_failed = Failed to rename: {0} -zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. -zprop.upper_set = Upper title set. -zprop.upper_reset = Upper title reset to default. -zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. -zprop.lower_set = Lower title set. -zprop.lower_reset = Lower title reset to default. - -# ========== Relations Additional ========== -relations.failed = Failed: {0} - -# ========== Members Additional ========== -members.never = Never -members.teleported = [Admin] Teleported to {0}. - -# ========== Player Info Additional ========== -playerinfo.records = {0} records -playerinfo.joined_date = Joined: {0} -playerinfo.current = Current -playerinfo.left_date = Left: {0} - -# ========== Zone Map ========== -map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' -map.position = Your Position: Chunk ({0}, {1}) -map.zone_gone = Zone no longer exists. -map.claimed = Claimed chunk ({0}, {1}) for {2}. -map.claim_failed = Failed to claim chunk: {0} -map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. -map.unclaim_failed = Failed to unclaim chunk: {0} -map.chunk_belongs = This chunk belongs to {0}. -map.chunk_faction = This chunk is claimed by a faction. -map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/tr-TR/hyperfactions_gui.lang b/src/main/resources/Server/Languages/tr-TR/hyperfactions_gui.lang deleted file mode 100644 index e5dcd0aa..00000000 --- a/src/main/resources/Server/Languages/tr-TR/hyperfactions_gui.lang +++ /dev/null @@ -1,446 +0,0 @@ -# Language: Turkish (tr-TR) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Turkish translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule - -# ========== Navigation Bar ========== -nav.dashboard = Dashboard -nav.chat = Chat -nav.members = Members -nav.invites = Invites -nav.browser = Browse -nav.map = Map -nav.leaderboard = Leaderboard -nav.relations = Relations -nav.treasury = Treasury -nav.settings = Settings -nav.logs = Logs -nav.help = Help -nav.admin = Admin -nav.create = Create - -# ========== Help Category Names ========== -help.category.welcome = Welcome -help.category.your_faction = Your Faction -help.category.power_land = Power & Land -help.category.diplomacy = Diplomacy -help.category.combat = Combat & Safety -help.category.economy = Economy -help.category.quick_ref = Quick Reference - -# ========== Main Menu ========== -main_menu.section_my_faction = My Faction -main_menu.section_get_started = Get Started -main_menu.section_territory = Territory -main_menu.section_browse = Browse -main_menu.section_admin = Admin -main_menu.claim_hint = Use /f claim to claim territory. - -# ========== Faction Info Page ========== -faction_info.no_description = No description set. -faction_info.status_open = Open -faction_info.status_invite_only = Invite Only -faction_info.status_raidable = Raidable -faction_info.status_protected = Protected -faction_info.officers_more = +{0} more - -# ========== Rename Modal ========== -rename.no_permission = You don't have permission to rename the faction. -rename.enter_name = Please enter a faction name. -rename.too_short = Faction name must be at least {0} characters. -rename.too_long = Faction name cannot exceed {0} characters. -rename.same_name = That's already your faction's name. -rename.name_taken = A faction with that name already exists. -rename.success = Faction renamed from {0} to {1}! - -# ========== Description Modal ========== -desc.no_permission = You don't have permission to edit the description. -desc.display_none = (None) -desc.cleared = Faction description cleared. -desc.updated = Faction description updated! - -# ========== Tag Modal ========== -tag.no_permission = You don't have permission to edit the tag. -tag.display_none = (None) -tag.cleared = Faction tag cleared. -tag.too_short = Tag must be at least {0} character. -tag.too_long = Tag cannot exceed {0} characters. -tag.invalid_format = Tag can only contain letters and numbers. -tag.same_tag = That's already your faction's tag. -tag.tag_taken = A faction with that tag already exists. -tag.success = Faction tag set to [{0}]! - -# ========== Dashboard Page ========== -dashboard.faction_gone = Your faction no longer exists. -dashboard.available = {0} available -dashboard.at_risk = At Risk! -dashboard.online_count = {0} online -dashboard.status_invite = Invite -dashboard.in_grace = IN GRACE -dashboard.billable_chunks = {0} billable chunks -dashboard.btn_home = Home -dashboard.btn_set_home = Set Home -dashboard.btn_claim = Claim -dashboard.chat_prefix = Chat: {0} -dashboard.btn_leave = Leave -dashboard.no_activity = No recent activity. -dashboard.time_now = now -dashboard.time_minutes = {0}m ago -dashboard.time_hours = {0}h ago -dashboard.time_days = {0}d ago -dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. -dashboard.chat_mode_set = Chat mode: {0} -dashboard.claim_success = Claimed chunk at ({0}, {1}) - -# ========== Faction Main Page ========== -main.no_faction = No Faction -main.joined = You joined the faction! -main.join_failed = Failed to join faction: {0} -main.invite_declined = Invite declined. -main.cooldown = Teleport on cooldown! {0}s remaining. -main.world_not_found = Cannot teleport - world not found. -main.leave_failed = Failed to leave: {0} - -# ========== Shared GUI Labels ========== -common.faction_count = {0} factions -common.leader_label = Leader: {0} -common.sort_power = Power -common.sort_members = Members -common.page_format = {0}/{1} -common.own_faction = (You) - -# ========== Members Page ========== -members.count = {0} members -members.sort_role = Role -members.sort_last_online = Last Online -members.just_now = just now -members.ago = {0} ago -members.never = Never -members.member_not_found = Member not found. -members.promoted = Promoted {0} to {1}. -members.promote_failed = Failed to promote: {0} -members.demoted = Demoted {0} to {1}. -members.demote_failed = Failed to demote: {0} -members.kicked = Kicked {0} from the faction. -members.kick_failed = Failed to kick: {0} - -# ========== Browser Page ========== -browser.sort_name = Name -browser.invalid_faction = Invalid faction. - -# ========== Leaderboard Page ========== -leaderboard.sort_kd = K/D -leaderboard.sort_territory = Territory -leaderboard.sort_balance = Balance - -# ========== Player Info Page ========== -playerinfo.now = Now -playerinfo.history_count = {0} records -playerinfo.joined_label = Joined: {0} -playerinfo.current = Current -playerinfo.left_label = Left: {0} -playerinfo.no_history = No membership history -playerinfo.faction_gone = Faction no longer exists. -playerinfo.reason_active = ACTIVE -playerinfo.reason_left = LEFT -playerinfo.reason_kicked = KICKED -playerinfo.reason_disbanded = DISBANDED - -# ========== Relations Page ========== -relations.relation_count = {0} relations -relations.request_count = {0} requests -relations.type_ally = Ally -relations.type_enemy = Enemy -relations.type_incoming = Incoming -relations.type_outgoing = Outgoing -relations.incoming_request = Incoming request -relations.outgoing_request = Outgoing request -relations.empty_relations = No relations yet. -relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. -relations.empty_pending = No pending ally requests. -relations.today = Today -relations.one_day_ago = 1 day ago -relations.days_ago = {0} days ago -relations.now_neutral = Now neutral with {0}. -relations.now_enemies = Now enemies with {0}! -relations.request_sent = Alliance request sent to {0}. -relations.now_allied = Now allied with {0}! -relations.request_declined = Ally request from {0} declined. -relations.request_cancelled = Ally request to {0} cancelled. -relations.failed = Failed: {0} -relations.search_hint = Search for a faction to set relation -relations.no_results = No factions found matching '{0}' -relations.power_display = {0} power -relations.member_count = {0} members - -# ========== Settings Page ========== -settings.officers_only = Only officers and leaders can change faction settings. -settings.display_none = (None) -settings.home_not_set = Not set -settings.no_permission = You don't have permission to change settings. -settings.only_leader_disband = Only the leader can disband the faction. -settings.perm_locked = This setting is locked by the server. -settings.no_perm_edit = You don't have permission to edit territory permissions. -settings.only_leader_officers = Only the leader can change officer access. -settings.pvp_enabled = Enabled -settings.pvp_disabled = Disabled -settings.not_in_territory = You must be in your faction's territory to set home. -settings.home_set = Faction home set to your current location! -settings.recruitment_set = Recruitment set to {0}. -settings.home_no_set = Your faction does not have a home set. -settings.home_deleted = Faction home deleted! - -# ========== Modules Page ========== -modules.treasury_name = Treasury -modules.treasury_desc = Faction bank & economy system -modules.raids_name = Raids -modules.raids_desc = Scheduled faction battles -modules.levels_name = Levels -modules.levels_desc = Faction progression & XP -modules.war_name = War -modules.war_desc = Formal war declarations -modules.coming_soon = Coming Soon -modules.active = Active -modules.view_treasury = View Treasury -modules.unavailable = Unavailable -modules.no_economy = No economy plugin detected -modules.disabled = Disabled -modules.economy_not_available = Economy features are not available on this server - -# ========== Treasury Page ========== -treasury.wallet_label = Your wallet: {0} -treasury.treasury_label = Treasury balance: {0} -treasury.chunks_detail = {0} free + {1} billable chunks -treasury.cost_label = Cost: {0} -treasury.pending = Pending -treasury.auto_pay_on = Auto-pay: ON -treasury.auto_pay_off = Auto-pay: OFF -treasury.runway_90_plus = 90+ days -treasury.runway_days = {0} days -treasury.runway_day = {0} day -treasury.runway_less_day = < 1 day -treasury.runway_no_funds = No funds -treasury.grace_expires = Grace expires in: {0} -treasury.missed_payments = Missed payments: {0} -treasury.pay_to_clear = Pay {0} to clear grace -treasury.system = System -treasury.type_deposit = Deposit -treasury.type_withdrawal = Withdrawal -treasury.type_transfer_in = Transfer In -treasury.type_transfer_out = Transfer Out -treasury.type_player_transfer = Player Transfer -treasury.type_upkeep = Upkeep -treasury.type_tax = Tax Collection -treasury.type_war_cost = War Cost -treasury.type_raid_cost = Raid Cost -treasury.type_spoils = Spoils -treasury.type_admin = Admin Adjustment -treasury.deposit_title = Deposit to Treasury -treasury.withdraw_title = Withdraw from Treasury -treasury.fee_label = Fee ({0}%) -treasury.confirm_deposit = Confirm Deposit -treasury.confirm_withdrawal = Confirm Withdrawal -treasury.from_wallet = {0} from wallet -treasury.to_wallet = {0} to wallet -treasury.enter_valid_amount = Enter a valid positive amount. -treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. -treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. -treasury.deposit_failed_returned = Failed to deposit. Money returned. -treasury.deposited = Deposited {0} into the treasury. -treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) -treasury.no_withdraw_permission = You don't have permission to withdraw. -treasury.withdraw_denied = Withdrawal denied: {0} -treasury.insufficient_treasury = Insufficient funds in treasury. -treasury.withdraw_limit = Withdrawal limit exceeded. -treasury.withdraw_failed = Withdrawal failed: {0} -treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. -treasury.withdrew = Withdrew {0} from the treasury. -treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) -treasury.search_hint = Search for a player or faction -treasury.no_results = No results for '{0}' -treasury.tag_player = [Player] -treasury.tag_faction = [Faction] -treasury.source_online = Online -treasury.source_offline = Offline -treasury.source_player_db = Hytale player -treasury.no_transfer_permission = You don't have permission to transfer. -treasury.transfer_denied = Transfer denied: {0} -treasury.invalid_target_faction = Invalid target faction. -treasury.target_faction_gone = Target faction no longer exists. -treasury.transfer_failed = Transfer failed: {0} -treasury.transfer_failed_returned = Transfer failed. Funds returned. -treasury.transferred = Transferred {0} to {1}. -treasury.invalid_target_player = Invalid target player. -treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. -treasury.leader_only_perms = Only the leader can change treasury permissions. -treasury.leader_only_upkeep = Only the leader can change upkeep settings. -treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. - -# ========== Confirmation Pages ========== -confirm.disband_not_leader = Only the leader can disband the faction. -confirm.disbanded = Faction '{0}' has been disbanded. -confirm.disband_failed = Failed to disband faction. -confirm.succession_title = Leadership will transfer to: -confirm.no_members_warning = WARNING: No other members! -confirm.will_disband = Leaving will disband the faction permanently. -confirm.not_in_faction = You are not in this faction. -confirm.not_leader_anymore = You are no longer the leader. -confirm.no_successor = No successor available. Use disband instead. -confirm.transfer_failed = Failed to transfer leadership: {0} -confirm.leader_left = Leadership transferred to {0}. You have left {1}. -confirm.leave_failed = Failed to leave faction: {0} -confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. -confirm.left_faction = You have left {0}. -confirm.faction_gone = Faction no longer exists. -confirm.not_leader_transfer = Only the leader can transfer leadership. -confirm.leadership_transferred = Leadership transferred to {0}. - -# ========== Logs Viewer Page ========== -logs.title = {0} - Activity Logs -logs.entry_count = {0} entries -logs.all_types = All Types -logs.no_logs_type = No logs of this type. -logs.no_logs = No activity logs yet. - -# ========== Chat Page ========== -chat.placeholder = Type a message... -chat.no_messages = No messages yet. -chat.no_ally_permission = You don't have permission for ally chat. -chat.no_permission = No permission. -chat.faction_gone = Your faction no longer exists. -chat.time_now = now -chat.time_minutes = {0}m -chat.time_hours = {0}h - -# ========== Invites Page ========== -invites.invite_count = {0} invites -invites.request_count = {0} requests -invites.invited_by = Invited by: {0} -invites.no_message = No message -invites.expires = Expires: {0} -invites.type_outgoing = Outgoing -invites.type_request = Request -invites.invited_by_label = Invited by: -invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. -invites.empty_requests = No join requests. Players can request to join with /f request. -invites.invalid_player = Invalid player. -invites.cancelled_invite = Cancelled invite to {0}. -invites.player_joined = {0} has joined the faction! -invites.faction_full = Faction is full. Cannot accept request. -invites.add_failed = Failed to add player to faction. -invites.request_expired = Request not found or expired. -invites.request_declined = Declined join request from {0}. -invites.time_seconds = {0}s -invites.time_minutes = {0}m -invites.time_hours = {0}h - -# ========== Map Page ========== -map.position = Your Position: Chunk ({0}, {1}) -map.legend_protected = Protected -map.claim_stats = Claims: {0}/{1} ({2} Available) -map.overclaimed = OVERCLAIMED by {0}! -map.power_display = Power: {0}/{1} -map.join_to_claim = Join a faction to claim -map.claim_success = Claimed chunk at ({0}, {1})! -map.claim_not_in_faction = You must be in a faction to claim territory. -map.claim_not_officer = Only officers and leaders can claim territory. -map.claim_already_yours = You already own this chunk. -map.claim_already_claimed = This chunk is already claimed by another faction. -map.claim_not_adjacent = You can only claim chunks adjacent to your territory. -map.claim_max = You have reached your maximum claim limit. -map.claim_world_not_allowed = Claiming is not allowed in this world. -map.claim_orbisguard = This area is protected by OrbisGuard. -map.claim_failed = Failed to claim chunk. -map.unclaim_success = Unclaimed chunk at ({0}, {1}). -map.unclaim_not_in_faction = You must be in a faction. -map.unclaim_not_officer = Only officers and leaders can unclaim territory. -map.unclaim_not_claimed = This chunk is not claimed. -map.unclaim_not_yours = This chunk belongs to another faction. -map.unclaim_home = Cannot unclaim the chunk containing your faction home. -map.unclaim_failed = Failed to unclaim chunk. -map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! -map.overclaim_not_in_faction = You must be in a faction. -map.overclaim_not_officer = Only officers and leaders can overclaim territory. -map.overclaim_already_yours = You already own this chunk. -map.overclaim_ally = You cannot overclaim allied territory. -map.overclaim_has_power = This faction has enough power to defend their territory. -map.overclaim_max = You have reached your maximum claim limit. -map.overclaim_failed = Failed to overclaim chunk. -# ========== Create Faction Page ========== -create.preview_name = Your Faction Name -create.leader_prefix = Leader: {0} -create.enter_name = Please enter a faction name. -create.name_too_short = Faction name must be at least {0} characters. -create.name_too_long = Faction name cannot exceed {0} characters. -create.name_taken = A faction with this name already exists. -create.tag_length = Faction tag must be {0}-{1} characters. -create.tag_format = Faction tag can only contain letters and numbers. -create.desc_too_long = Description cannot exceed {0} characters. -create.created = Faction {0} created successfully! -create.created_no_dashboard = Faction created but could not open dashboard. -create.invalid_name = Invalid faction name. -create.create_failed = Could not create faction. - -# ========== New Player Pages ========== -newplayer.pending_count = {0} pending -newplayer.received_header = RECEIVED INVITES ({0}) -newplayer.requests_header = YOUR REQUESTS ({0}) -newplayer.no_invites = No invites. Browse factions to find one! -newplayer.no_requests = No pending requests. -newplayer.invited_by = Invited by: {0} -newplayer.member_count = {0} members -newplayer.power_count = {0} power -newplayer.claim_count = {0} claims -newplayer.awaiting_review = Awaiting review -newplayer.expires_in = Expires in {0}h -newplayer.time_just_now = just now -newplayer.time_minutes = {0} min ago -newplayer.time_hours = {0}h ago -newplayer.time_days = {0}d ago -newplayer.invalid_faction = Invalid faction. -newplayer.invite_expired = This invite has expired or was revoked. -newplayer.faction_gone = Faction no longer exists. -newplayer.joined = You joined {0}! -newplayer.faction_full = This faction is full. -newplayer.join_failed = Could not join faction. -newplayer.invite_declined = Invite declined. -newplayer.request_cancelled = Cancelled request to join {0}. -newplayer.faction_count = {0} factions -newplayer.browse_subtitle = Find your new home! -newplayer.sort_power = Power -newplayer.sort_name = Name -newplayer.sort_members = Members -newplayer.btn_accept = Accept -newplayer.btn_pending = Pending -newplayer.btn_join = Join -newplayer.btn_request = Request -newplayer.invite_only_msg = This faction is invite-only. -newplayer.welcome_hint = Welcome! Use /f to open faction menu. -newplayer.faction_open_hint = This faction is open! Click JOIN instead. -newplayer.already_requested = You already have a pending request to this faction. -newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. -newplayer.request_sent = Join request sent to {0}! -newplayer.officer_review = An officer will review your request. -newplayer.map_hint = View Only - Join a faction to claim territory! - -# Player Settings -nav.player_settings = Settings -player_settings.title = Player Settings -player_settings.language_section = Language -player_settings.auto_detect = Auto-detect from client -player_settings.auto_detect_desc = Uses your game client's language setting -player_settings.language_label = Language -player_settings.notifications_section = Notifications -player_settings.territory_alerts = Territory Alerts -player_settings.territory_alerts_desc = Show notifications when entering/leaving territories -player_settings.death_announcements = Death Broadcasts -player_settings.death_announcements_desc = Receive faction member death location announcements -player_settings.power_notifications = Power Changes -player_settings.power_notifications_desc = Show messages when your power changes -player_settings.language_changed = Language changed to {0} -player_settings.pref_enabled = {0} enabled -player_settings.pref_disabled = {0} disabled diff --git a/src/main/resources/Server/Languages/zh-CN/hyperfactions.lang b/src/main/resources/Server/Languages/zh-CN/hyperfactions.lang deleted file mode 100644 index 66ec67dc..00000000 --- a/src/main/resources/Server/Languages/zh-CN/hyperfactions.lang +++ /dev/null @@ -1,452 +0,0 @@ -# Language: Simplified Chinese (zh-CN) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Simplified Chinese translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions - English Translations -# Format: key = value (or key = "quoted value") -# Note: Keys are auto-prefixed with "hyperfactions." by Hytale's I18nModule -# Placeholders: {0}, {1}, etc. - -# ========== Common ========== -common.no_permission = You don't have permission to do that. -common.not_in_faction = You are not in a faction. -common.already_in_faction = You are already in a faction. -common.player_not_found = Player not found. -common.faction_not_found = Faction not found. -common.player_not_online = That player is not online. -common.must_be_leader = Only the faction leader can do that. -common.must_be_officer = You must be an Officer or Leader to do that. -common.combat_tagged = You can't do that while combat tagged. -common.cancel = Cancel -common.confirm = Confirm -common.save = Save -common.close = Close -common.yes = Yes -common.no = No -common.loading = Loading... -common.online = Online -common.offline = Offline -common.enabled = Enabled -common.disabled = Disabled -common.none = None -common.page = Page {0} of {1} -common.unknown = Unknown -common.error_generic = Something went wrong. Please try again. -common.gui_fallback = Could not access GUI. Use /f help for commands. -common.admin_prefix = [Admin] -common.location_error = Could not determine your location. -common.world_error = Could not determine your world. -common.invalid_id = Invalid faction ID. -common.na = N/A - -# ========== Commands - Create ========== -cmd.create.no_permission = You don't have permission to create factions. -cmd.create.usage = Usage: /f create -cmd.create.success = Faction '{0}' created! -cmd.create.already_in_named = You are already in {0}. -cmd.create.use_leave_first = Use /f leave first if you want to create a new faction. -cmd.create.name_taken = That faction name is already taken. -cmd.create.name_too_short = Faction name is too short. -cmd.create.name_too_long = Faction name is too long. -cmd.create.failed = Failed to create faction. - -# ========== Commands - Disband ========== -cmd.disband.no_permission = You don't have permission to disband factions. -cmd.disband.not_leader = Only the faction leader can disband. -cmd.disband.confirm_prompt = Are you sure you want to disband your faction? -cmd.disband.confirm_instruction = Type /f disband --text again within {0} seconds to confirm. -cmd.disband.success = Your faction has been disbanded. -cmd.disband.failed = Failed to disband faction. -cmd.disband.cancelled = Previous confirmation cancelled. Type again to confirm disband. - -# ========== Commands - Rename ========== -cmd.rename.no_permission = You don't have permission. -cmd.rename.not_leader = Only the leader can rename the faction. -cmd.rename.usage = Usage: /f rename -cmd.rename.too_short = Name is too short (min {0} chars). -cmd.rename.too_long = Name is too long (max {0} chars). -cmd.rename.name_taken = That name is already taken. -cmd.rename.success = Faction renamed to {0}! -cmd.rename.broadcast = {0} renamed the faction to {1} - -# ========== Commands - Description ========== -cmd.desc.no_permission = You don't have permission. -cmd.desc.not_officer = You must be an officer to set the description. -cmd.desc.set = Faction description set! -cmd.desc.cleared = Faction description cleared. - -# ========== Commands - Open / Close ========== -cmd.open.no_permission = You don't have permission. -cmd.open.not_leader = Only the leader can change this setting. -cmd.open.already_open = Your faction is already open. -cmd.open.success = Your faction is now open! Anyone can join with /f join. -cmd.open.broadcast = {0} opened the faction to public joining. -cmd.close.no_permission = You don't have permission. -cmd.close.not_leader = Only the leader can change this setting. -cmd.close.already_closed = Your faction is already closed. -cmd.close.success = Your faction is now invite-only. -cmd.close.broadcast = {0} closed the faction to invite-only. - -# ========== Commands - Color ========== -cmd.color.no_permission = You don't have permission. -cmd.color.not_officer = You must be an officer to change the color. -cmd.color.colors_disabled = Faction colors are disabled. -cmd.color.usage = Usage: /f color -cmd.color.usage_hint = Valid codes: 0-9, a-f or #RRGGBB hex -cmd.color.invalid = Invalid color. Use 0-9, a-f, or #RRGGBB. -cmd.color.success = Faction color updated! - -# ========== Commands - Claim ========== -cmd.claim.no_permission = You don't have permission to claim territory. -cmd.claim.already_yours = Your faction already owns this chunk. -cmd.claim.cannot_claim_ally = You cannot claim ally territory. -cmd.claim.already_claimed_hint = This chunk is claimed. Use /f overclaim if they are raidable. -cmd.claim.success = Claimed chunk at {0}, {1}! -cmd.claim.not_officer = You must be an officer to claim land. -cmd.claim.already_claimed = This chunk is already claimed. -cmd.claim.max_claims = Your faction has reached max claims. Get more power! -cmd.claim.not_adjacent = You must claim adjacent to existing territory. -cmd.claim.world_not_allowed = Claiming is not allowed in this world. -cmd.claim.orbisguard = This area is protected by OrbisGuard. -cmd.claim.zone_protected = This chunk is in a safezone or warzone. -cmd.claim.insufficient_power = Your faction doesn't have enough power to claim more land. -cmd.claim.failed = Failed to claim chunk. - -# ========== Commands - Invite ========== -cmd.invite.no_permission = You don't have permission to invite players. -cmd.invite.not_officer = You must be an officer to invite players. -cmd.invite.usage = Usage: /f invite -cmd.invite.player_not_found = Player '{0}' not found or offline. -cmd.invite.target_in_faction = That player is already in a faction. -cmd.invite.sent = Invited {0} to your faction. -cmd.invite.received = You have been invited to join {0}! -cmd.invite.accept_hint = Type /f accept {0} to join. - -# ========== Commands - Accept / Join ========== -cmd.join.no_permission = You don't have permission to join factions. -cmd.join.already_in_named = You are already in {0}. -cmd.join.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.join.no_invites = You have no pending invites. -cmd.join.faction_not_found = Faction '{0}' not found. -cmd.join.not_invited = You have no invite from that faction. -cmd.join.faction_gone = That faction no longer exists. -cmd.join.success = You have joined {0}! -cmd.join.broadcast = {0} has joined the faction! -cmd.join.faction_full = That faction is full. -cmd.join.failed = Failed to join faction. - -# ========== Commands - Kick ========== -cmd.kick.no_permission = You don't have permission to kick members. -cmd.kick.usage = Usage: /f kick -cmd.kick.not_in_your_faction = Player '{0}' is not in your faction. -cmd.kick.success = Kicked {0} from the faction. -cmd.kick.broadcast = {0} was kicked from the faction. -cmd.kick.kicked = You have been kicked from the faction. -cmd.kick.cannot_kick_higher = You don't have permission to kick that player. -cmd.kick.cannot_kick_leader = You cannot kick the faction leader. -cmd.kick.failed = Failed to kick player. - -# ========== Commands - Leave ========== -cmd.leave.no_permission = You don't have permission to leave factions. -cmd.leave.confirm_prompt = Are you sure you want to leave your faction? -cmd.leave.confirm_instruction = Type /f leave --text again within {0} seconds to confirm. -cmd.leave.success = You have left your faction. -cmd.leave.broadcast = {0} has left the faction. -cmd.leave.failed = Failed to leave faction. -cmd.leave.cancelled = Previous confirmation cancelled. Type again to confirm leave. - -# ========== Commands - Promote / Demote / Transfer ========== -cmd.rank.promote_no_permission = You don't have permission to promote members. -cmd.rank.promote_usage = Usage: /f promote -cmd.rank.promoted = Promoted {0} to {1}! -cmd.rank.promote_broadcast = {0} was promoted to {1}! -cmd.rank.already_highest = Cannot promote further. Use /f transfer to change leader. -cmd.rank.promote_failed = Failed to promote player. -cmd.rank.demote_no_permission = You don't have permission to demote members. -cmd.rank.demote_usage = Usage: /f demote -cmd.rank.demoted = Demoted {0} to {1}. -cmd.rank.demote_broadcast = {0} was demoted to {1}. -cmd.rank.already_lowest = That player is already a Member. -cmd.rank.demote_failed = Failed to demote player. -cmd.rank.transfer_no_permission = You don't have permission to transfer leadership. -cmd.rank.transfer_usage = Usage: /f transfer -cmd.rank.player_not_in_faction = Player not found in your faction. -cmd.rank.transfer_confirm = Are you sure you want to transfer leadership to {0}? -cmd.rank.transfer_confirm_instruction = Type /f transfer {0} --text again within {1} seconds to confirm. -cmd.rank.transferred = Transferred leadership to {0}! -cmd.rank.transfer_broadcast = {0} is now the faction leader! -cmd.rank.transfer_failed = Failed to transfer leadership. -cmd.rank.transfer_cancelled = Previous confirmation cancelled. Type again to confirm transfer. - -# ========== Commands - Unclaim ========== -cmd.unclaim.no_permission = You don't have permission to unclaim territory. -cmd.unclaim.success = Unclaimed chunk at {0}, {1}. -cmd.unclaim.not_officer = You must be an officer to unclaim land. -cmd.unclaim.chunk_not_claimed = This chunk is not claimed. -cmd.unclaim.not_your_claim = Your faction doesn't own this chunk. -cmd.unclaim.cannot_unclaim_home = Cannot unclaim the chunk with faction home. -cmd.unclaim.would_disconnect = Cannot unclaim — it would disconnect your territory. -cmd.unclaim.failed = Failed to unclaim chunk. - -# ========== Commands - Overclaim ========== -cmd.overclaim.no_permission = You don't have permission to overclaim territory. -cmd.overclaim.success = Overclaimed enemy territory! -cmd.overclaim.not_officer = You must be an officer to overclaim. -cmd.overclaim.not_claimed = This chunk is not claimed. Use /f claim. -cmd.overclaim.own_chunk = Your faction already owns this chunk. -cmd.overclaim.ally = You cannot overclaim ally territory. -cmd.overclaim.target_has_power = This faction still has enough power. -cmd.overclaim.failed = Failed to overclaim. - -# ========== Commands - Stuck ========== -cmd.stuck.no_permission = You don't have permission to use /f stuck. -cmd.stuck.not_stuck = You're not stuck - this is wilderness. -cmd.stuck.combat_tagged = You cannot use /f stuck while in combat! -cmd.stuck.no_safe = Could not find a safe location. -cmd.stuck.teleporting = Teleporting to safety in {0} seconds. Don't move! - -# ========== Commands - Home ========== -cmd.home.no_permission = You don't have permission to teleport to faction home. -cmd.home.no_home = Your faction has no home set. -cmd.home.combat_tagged = You cannot teleport while in combat! -cmd.home.teleported = Teleported to faction home! - -# ========== Commands - SetHome ========== -cmd.sethome.no_permission = You don't have permission to set faction home. -cmd.sethome.world_not_allowed = Cannot set home in this world. -cmd.sethome.not_in_territory = You can only set home in your faction's territory. -cmd.sethome.set = Faction home set! -cmd.sethome.broadcast = {0} set the faction home. -cmd.sethome.not_officer = You must be an officer to set the home. -cmd.sethome.failed = Failed to set home. - -# ========== Commands - DelHome ========== -cmd.delhome.no_permission = You don't have permission to delete faction home. -cmd.delhome.no_home = Your faction does not have a home set. -cmd.delhome.deleted = Faction home deleted! -cmd.delhome.broadcast = {0} deleted the faction home. -cmd.delhome.not_officer = You must be an officer to delete the home. -cmd.delhome.failed = Failed to delete home. - -# ========== Commands - Relation (Ally/Enemy/Neutral/Relations) ========== -cmd.relation.ally_no_permission = You don't have permission to manage alliances. -cmd.relation.ally_usage = Usage: /f ally -cmd.relation.ally_sent = Ally request sent to {0}! -cmd.relation.ally_formed = You are now allies with {0}! -cmd.relation.already_ally = You are already allied with that faction. -cmd.relation.ally_failed = Failed to send ally request. -cmd.relation.enemy_no_permission = You don't have permission to declare enemies. -cmd.relation.enemy_usage = Usage: /f enemy -cmd.relation.enemy_declared = {0} is now your enemy! -cmd.relation.already_enemy = You are already enemies with that faction. -cmd.relation.max_enemies = You have reached the maximum number of enemies. -cmd.relation.enemy_failed = Failed to set enemy. -cmd.relation.neutral_no_permission = You don't have permission to set neutral relations. -cmd.relation.neutral_usage = Usage: /f neutral -cmd.relation.neutral_set = Your faction is now neutral with {0}. -cmd.relation.already_neutral = You are already neutral with that faction. -cmd.relation.neutral_failed = Failed to set neutral. -cmd.relation.cannot_self = You cannot ally with yourself. -cmd.relation.max_allies = You have reached the maximum number of allies. -cmd.relation.view_no_permission = You don't have permission to view relations. -cmd.relation.header = === Faction Relations === -cmd.relation.allies_count = Allies ({0}): -cmd.relation.enemies_count = Enemies ({0}): -cmd.relation.list_entry = - {0} - -# ========== Commands - Chat ========== -cmd.chat.usage = Usage: /f c [f|a|off] -cmd.chat.no_permission = You don't have permission for that chat mode. -cmd.chat.mode_set = Chat mode set to {0} - -# ========== Commands - Invites ========== -cmd.invites.not_officer = You must be an officer to manage invites. -cmd.invites.header = === Faction Invites === -cmd.invites.no_pending = No pending invites or requests. -cmd.invites.outgoing = Outgoing Invites: -cmd.invites.outgoing_entry = {0} (invited by {1}) -cmd.invites.requests = Join Requests: -cmd.invites.request_entry = {0}{1} -cmd.invites.your_invites_header = === Your Invites === -cmd.invites.no_invites = You have no pending invites. -cmd.invites.invite_entry = {0} - Use /f accept {1} - -# ========== Commands - Request ========== -cmd.request.no_permission = You don't have permission to request faction membership. -cmd.request.already_in_named = You are already in {0}. -cmd.request.use_leave_hint = Use /f leave first if you want to join another faction. -cmd.request.usage = Usage: /f request [message] -cmd.request.faction_open = That faction is open! Use /f accept {0} to join directly. -cmd.request.already_requested = You already have a pending request to that faction. -cmd.request.has_invite = You have been invited to that faction! Use /f accept {0} to join. -cmd.request.sent = Sent join request to {0}! -cmd.request.your_message = Your message: "{0}" -cmd.request.officer_review = An officer will review your request. -cmd.request.officer_notify = {0} has requested to join your faction! -cmd.request.officer_review_hint = Use /f gui > Invites to review. - -# ========== Commands - Info ========== -cmd.info.faction_header = === {0} === -cmd.info.player_header = === {0} === -cmd.info.no_permission = You don't have permission to view faction info. -cmd.info.faction_not_found = Faction '{0}' not found. -cmd.info.not_in_faction_hint = You are not in a faction. Use /f info -cmd.info.leader = Leader: {0} -cmd.info.members = Members: {0}/{1} -cmd.info.power = Power: {0} -cmd.info.claims = Claims: {0} -cmd.info.raidable = RAIDABLE! -cmd.info.allies = Allies: {0} -cmd.info.enemies = Enemies: {0} -cmd.info.they_consider = They consider you: {0} -cmd.info.you_consider = You consider them: {0} -cmd.info.members_no_permission = You don't have permission to view faction members. -cmd.info.members_header = === {0} Members ({1}) === -cmd.info.member_online = [Online] -cmd.info.list_no_permission = You don't have permission to view faction list. -cmd.info.list_empty = There are no factions. -cmd.info.list_header = === Factions ({0}) === -cmd.info.list_entry = {0} - {1} members, {2} power -cmd.info.list_entry_raidable = {0} - {1} members, {2} power [RAIDABLE] -cmd.info.help_no_permission = You don't have permission to view help. -cmd.info.who_no_permission = You don't have permission to view player info. -cmd.info.who_faction = Faction: {0} -cmd.info.who_role = Role: {0} -cmd.info.who_joined = Joined: {0} -cmd.info.who_faction_none = Faction: None -cmd.info.who_power = Power: {0} -cmd.info.who_status = Status: {0} -cmd.info.who_last_seen = Last seen: {0} -cmd.info.map_no_permission = You don't have permission to view the map. -cmd.info.map_header = === Territory Map === -cmd.info.map_legend = Legend: +You /Own /Ally /Enemy -Wild -cmd.info.map_gui_hint = Use /f gui for interactive map - -# ========== Commands - Power ========== -cmd.power.personal = Personal Power: {0}/{1} -cmd.power.faction = Faction Power: {0}/{1} -cmd.power.death_loss = Death Loss: {0} -cmd.power.regen = Regen Rate: {0}/hr -cmd.power.no_permission = You don't have permission to view power info. -cmd.power.header = {0}'s Power: -cmd.power.current = Current: {0} - -# ========== Commands - Economy ========== -cmd.economy.balance = Balance: {0} -cmd.economy.deposited = Deposited {0} into the faction treasury. -cmd.economy.withdrawn = Withdrew {0} from the faction treasury. -cmd.economy.transferred = Transferred {0} to {1}. -cmd.economy.insufficient = Insufficient funds in faction treasury. -cmd.economy.invalid_amount = Invalid amount: {0} -cmd.economy.economy_disabled = Economy is disabled. -cmd.economy.balance_no_permission = You don't have permission to view balances. -cmd.economy.treasury_unavailable = Treasury is not available. -cmd.economy.balance_display = {0}'s treasury: {1} -cmd.economy.deposit_no_permission = You don't have permission to deposit. -cmd.economy.deposit_faction_denied = You don't have faction permission to deposit. -cmd.economy.deposit_usage = Usage: /f deposit -cmd.economy.amount_positive = Amount must be positive. -cmd.economy.wallet_insufficient = You don't have enough money. Wallet: {0} -cmd.economy.wallet_withdraw_failed = Failed to withdraw from your wallet. -cmd.economy.deposit_failed = Failed to deposit to faction treasury. Money returned. -cmd.economy.withdraw_no_permission = You don't have permission to withdraw. -cmd.economy.withdraw_faction_denied = You don't have faction permission to withdraw. -cmd.economy.withdraw_usage = Usage: /f withdraw -cmd.economy.withdraw_limit_denied = Withdrawal denied: {0} -cmd.economy.wallet_deposit_failed = Warning: Failed to deposit to your wallet. Contact an admin. -cmd.economy.withdraw_limit_exceeded = Withdrawal denied: limit exceeded. -cmd.economy.withdraw_failed = Withdrawal failed: {0} -cmd.economy.transfer_no_permission = You don't have permission to transfer. -cmd.economy.transfer_faction_denied = You don't have faction permission to transfer. -cmd.economy.transfer_usage = Usage: /f money transfer -cmd.economy.transfer_self = Cannot transfer to your own faction. -cmd.economy.transfer_limit_denied = Transfer denied: {0} -cmd.economy.transfer_limit_exceeded = Transfer denied: limit exceeded. -cmd.economy.transfer_failed = Transfer failed: {0} -cmd.economy.log_no_permission = You don't have permission to view the transaction log. -cmd.economy.log_header = Transaction Log (page {0}/{1}) -cmd.economy.log_empty = No transactions found. -cmd.economy.money_help_header = Treasury Commands: -cmd.economy.money_help_balance = /f money balance [faction] - View balance -cmd.economy.money_help_deposit = /f money deposit - Deposit into treasury -cmd.economy.money_help_withdraw = /f money withdraw - Withdraw from treasury -cmd.economy.money_help_transfer = /f money transfer - Transfer between factions -cmd.economy.money_help_log = /f money log [page] [type] - View transaction history - -# ========== Protection - Action Phrases ========== -protection.action.generic = You can't do that -protection.action.build = You can't build or break blocks -protection.action.interact = You can't interact with that -protection.action.door = You can't use doors -protection.action.container = You can't open containers -protection.action.bench = You can't use crafting stations -protection.action.processing = You can't use processing stations -protection.action.seat = You can't use seats -protection.action.light = You can't toggle lights -protection.action.teleporter = You can't use teleporters -protection.action.crate = You can't use crates -protection.action.tame = You can't tame creatures -protection.action.npc = You can't interact with NPCs -protection.action.mount = You can't mount creatures -protection.action.pve = You can't damage creatures -protection.action.item_drop = You can't drop items -protection.action.item_pickup = You can't pick up items - -# ========== Protection - Denial Reasons ========== -protection.denied.safezone = {0} in a SafeZone. -protection.denied.warzone = {0} in a WarZone. -protection.denied.enemy_claim = {0} in enemy territory. -protection.denied.claimed = {0} in claimed territory. -protection.denied.here = {0} here. -protection.denied.zone = {0} in this zone. -protection.denied.faction_perm = {0} here. (Faction permission: {1}) -protection.denied.ally_territory = {0} here. (Ally territory) -protection.denied.error = Protection error — action blocked for safety. - -# ========== Protection - PvP ========== -protection.pvp.safezone = PvP is disabled in SafeZones. -protection.pvp.same_faction = You cannot attack faction members. -protection.pvp.ally = You cannot attack allies. -protection.pvp.spawn_protected = That player has spawn protection. -protection.pvp.territory_disabled = PvP is disabled in this territory. -protection.pvp.generic = You cannot attack this player. - -# ========== Protection - Entity Damage ========== -protection.mob_damage_disabled = Mob damage is disabled in this zone. -protection.pve_damage_disabled = PvE damage is disabled in this zone. -protection.pve_territory_denied = You cannot damage mobs in this territory. - -# ========== Protection - Combat Tag ========== -protection.combat_tag_command = You cannot use that command while combat tagged. - -# ========== Server Announcements ========== -# These are broadcast to all online players for significant faction events. -# {0}, {1} = dynamic values (faction names, player names) -server_announce.faction_created = {0} has founded the faction {1}! -server_announce.faction_disbanded = The faction {0} has been disbanded! -server_announce.leadership_transfer = {0} is now the leader of {1}! -server_announce.overclaim = {0} has overclaimed territory from {1}! -server_announce.war_declared = {0} has declared war on {1}! -server_announce.alliance_formed = {0} and {1} are now allies! -server_announce.alliance_broken = {0} and {1} are no longer allies! - -# ========== Teleport System ========== -teleport.cooldown_wait = You must wait {0} before teleporting again. -teleport.warmup_start = Teleporting to faction home in {0} seconds... -teleport.combat_cancelled = Teleportation cancelled - you are in combat! -teleport.success_default = Teleported to faction home! -teleport.no_home = Your faction has no home set. -teleport.world_not_found = World not found. -teleport.failed = Teleportation failed. -teleport.countdown = Teleporting in {0} seconds... -teleport.countdown_one = Teleporting in 1 second... -teleport.moved_cancelled = Teleportation cancelled - you moved! -teleport.damage_cancelled = Teleportation cancelled - you took damage! -teleport.mount_teleport_blocked = You can't teleport into that zone while mounted. -teleport.mount_entry_blocked = You can't enter this zone while mounted. - -# ========== Chat Display ========== -chat.display.public = Public -chat.display.faction = Faction -chat.display.ally = Ally diff --git a/src/main/resources/Server/Languages/zh-CN/hyperfactions_admin.lang b/src/main/resources/Server/Languages/zh-CN/hyperfactions_admin.lang deleted file mode 100644 index 9f59bc07..00000000 --- a/src/main/resources/Server/Languages/zh-CN/hyperfactions_admin.lang +++ /dev/null @@ -1,268 +0,0 @@ -# Language: Simplified Chinese (zh-CN) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Simplified Chinese translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions Admin GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_admin." by Hytale's I18nModule - -# ========== Admin Navigation Bar ========== -nav.dashboard = Dashboard -nav.actions = Actions -nav.factions = Factions -nav.players = Players -nav.economy = Economy -nav.zones = Zones -nav.config = Config -nav.backups = Backups -nav.log = Log -nav.updates = Updates -nav.help = Help -nav.version = Version - -# ========== Common Admin Labels ========== -common.faction_not_found = Faction Not Found -common.no_faction = No Faction -common.not_set = Not set -common.on = On -common.off = Off -common.enable = Enable -common.disable = Disable -common.none_paren = (None) -common.invalid_faction = Invalid faction. -common.leader_prefix = Leader: {0} -common.members_suffix = {0} members -common.claims_suffix = {0} claims -common.factions_suffix = {0} factions -common.players_suffix = {0} players -common.chunks_suffix = {0} chunks -common.entries_suffix = {0} entries -common.found_suffix = {0} found -common.power_format = {0}/{1} power -common.raidable = Raidable -common.protected = Protected -common.no_description = No description set. -common.officers_more = +{0} more -common.custom_max = (custom max) -common.default_max = (default max) -common.now = Now -common.ago_suffix = {0} ago -common.just_now = just now -common.no_membership_history = No membership history - -# ========== Admin Dashboard ========== -dashboard.factions_prefix = Factions: {0} -dashboard.members_prefix = Total Members: {0} -dashboard.claims_prefix = Total Claims: {0} - -# ========== Admin Actions ========== -actions.confirm_reset = Confirm Reset? -actions.confirm_trigger = Confirm Trigger? -actions.kd_reset = Reset K/D for {0} players. -actions.kd_reset_failed = Failed to reset K/D: {0} -actions.upkeep_unavailable = Upkeep processor is not available. -actions.upkeep_triggered = Upkeep collection triggered. -actions.upkeep_failed = Upkeep failed: {0} - -# ========== Admin Disband ========== -disband.faction_gone = Faction no longer exists. -disband.success = Faction '{0}' has been disbanded. -disband.failed = Failed to disband: {0} -disband.no_leader = Faction has no leader, cannot disband. - -# ========== Admin Unclaim All ========== -unclaim.removed = [Admin] Removed {0} claims from {1}. -unclaim.no_claims = {0} had no claims to remove. - -# ========== Admin Factions List ========== -factions.home_not_set = Not set -factions.teleported = Teleported to {0}'s home. -factions.no_home = Faction has no home set. -factions.world_not_found = Target world not found. - -# ========== Admin Faction Info ========== -info.faction_gone = This faction no longer exists. - -# ========== Admin Faction Members ========== -members.sort_role = Role -members.sort_online = Online -members.sort_name = Name -members.sort_power = Power -members.promoted = [Admin] Promoted {0} to {1}. -members.demoted = [Admin] Demoted {0} to {1}. -members.kicked = [Admin] Kicked {0} from the faction. - -# ========== Admin Faction Relations ========== -relations.allies_header = ALLIES ({0}) -relations.enemies_header = ENEMIES ({0}) -relations.no_allies = No allies. -relations.no_enemies = No enemies. -relations.neutral_count = {0} neutral factions -relations.since_today = Since: today -relations.since_one_day = Since: 1 day ago -relations.since_days = Since: {0} days ago -relations.set_ally = [Admin] Set mutual ally status with {0}. -relations.set_enemy = Set mutual enemy status with {0}. -relations.set_neutral = [Admin] Set mutual neutral status with {0}. - -# ========== Admin Faction Settings ========== -settings.locked = This setting is locked by server configuration. -settings.perm_toggled = Set {0} to {1}. -settings.color_changed = Set faction color to {0}. -settings.recruitment_set = Set recruitment to {0}. -settings.no_home = [Admin] This faction has no home set. -settings.home_cleared = Cleared faction home for {0}. - -# ========== Sort Dropdown Labels ========== -sort.power = Power -sort.name = Name -sort.members = Members -sort.balance = Balance - -# ========== Admin Players ========== -players.sort_last_online = Last Online -players.sort_faction = Faction -players.sort_online = Online -players.not_online = Player is not online. -players.world_not_found = Target world not found. -players.teleported = [Admin] Teleported to {0}. - -# ========== Admin Player Info ========== -playerinfo.disband_faction = Disband Faction -playerinfo.kick_leader = Kick Leader -playerinfo.enter_valid_number = Enter a valid number. -playerinfo.enter_valid_positive = Enter a valid positive number. -playerinfo.faction_gone = Faction no longer exists. -playerinfo.kd_reset = Reset K/D for {0}. -playerinfo.kicked_success = Kicked {0} from {1}. -playerinfo.kicked_leader = Kicked leader {0}. Leadership transferred to {1}. -playerinfo.disbanded_kick = [Admin] Faction '{0}' disbanded (last member kicked). - -# ========== Admin Economy ========== -economy.no_data = No factions with economy data. -economy.amount_zero = Amount cannot be zero. -economy.enter_amount = Please enter an amount. -economy.invalid_number = Invalid number: {0} -economy.error = An error occurred. -economy.balance_negative = Balance cannot be negative. -economy.failed = Failed: {0} -economy.bulk_complete = Bulk adjust complete: {0} {1} to {2} factions. -economy.bulk_failures = ({0} failed) - -# ========== Admin Zones ========== -zones.not_found = Zone not found. -zones.invalid_id = Invalid zone ID. -zones.deleted = Zone {0} deleted. -zones.delete_failed = Failed to delete zone: {0} -zones.no_chunks = No chunks -zones.chunks_suffix = {0} ({1} chunks) - -# ========== Zone Create Wizard ========== -wizard.enter_name = Please enter a zone name. -wizard.name_too_short = Zone name must be at least {0} characters. -wizard.name_too_long = Zone name cannot exceed {0} characters. -wizard.name_taken = A zone with this name already exists. -wizard.radius_range = Radius must be between 1 and {0}. -wizard.create_failed = Could not create zone: {0} -wizard.created_not_found = Zone created but could not be found. -wizard.created = Created {0} '{1}'! -wizard.chunk_claimed = Claimed chunk ({0}, {1}). -wizard.chunk_failed = Could not claim current chunk: {0} -wizard.radius_claimed = Claimed {0} chunks in a {1} radius of {2}. -wizard.radius_no_claims = No chunks could be claimed (area may be occupied). -wizard.no_claims = Zone created with no claims. -wizard.chunks_preview = ~{0} chunks - -# ========== Zone Rename ========== -zone_rename.zone_gone = Zone no longer exists. -zone_rename.enter_name = Please enter a zone name. -zone_rename.too_short = Zone name must be at least {0} character. -zone_rename.too_long = Zone name cannot exceed {0} characters. -zone_rename.same_name = That's already this zone's name. -zone_rename.renamed = [Admin] Zone renamed from {0} to {1}! -zone_rename.name_taken = A zone with that name already exists. -zone_rename.invalid_name = Invalid zone name. -zone_rename.rename_failed = Failed to rename zone: {0} - -# ========== Zone Change Type ========== -zone_type.zone_gone = Zone no longer exists. -zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). -zone_type.failed = Failed to change zone type: {0} - -# ========== Zone Integration Flags ========== -zone_int.zone_not_found = Zone Not Found -zone_int.no_plugin = (no plugin) -zone_int.default = (default) -zone_int.custom = (custom) - -# ========== Activity Log ========== -log.all_types = All Types -log.no_logs = No activity logs matching filters. - -# ========== Version Page ========== -version.active = Active -version.not_found = Not Found -version.not_detected = Not Detected -version.not_installed = Not Installed -version.active_version = Active (v{0}) -version.active_compatible = Active (compatible) -version.active_claims_only = Active (claims only) -version.installed_no_perm = Installed (no perm provider) -version.active_provider = Active ({0}) - -# ========== Admin Main Page ========== -main.reload_hint = Use /f reload to reload configuration. -main.unclaim_hint = Use /f admin unclaim {0} to unclaim all {1} chunks. - -# ========== Zone Flags/Settings ========== -zflags.invalid_flag = Invalid flag. -zflags.zone_not_found = Zone not found. -zflags.conflict = (conflict) -zflags.mixin = (mixin) -zflags.reset_int = Reset integration flags to defaults. -zflags.reset_all = Reset all flags to defaults. -zflags.reset_failed = Failed to reset flags: {0} -zflags.back_to_settings = Back to Settings - -# ========== Zone Properties ========== -zprop.current_custom = Current: "{0}" (custom) -zprop.current_default = Current: "{0}" (default) -zprop.pvp_disabled = PvP Disabled -zprop.pvp_enabled = PvP Enabled -zprop.name_empty = Name cannot be empty. -zprop.renamed = Zone renamed to "{0}". -zprop.name_taken = A zone with that name already exists. -zprop.name_invalid = Invalid name (max 32 characters). -zprop.rename_failed = Failed to rename: {0} -zprop.upper_empty = Upper title cannot be empty. Use Clear to reset. -zprop.upper_set = Upper title set. -zprop.upper_reset = Upper title reset to default. -zprop.lower_empty = Lower title cannot be empty. Use Clear to reset. -zprop.lower_set = Lower title set. -zprop.lower_reset = Lower title reset to default. - -# ========== Relations Additional ========== -relations.failed = Failed: {0} - -# ========== Members Additional ========== -members.never = Never -members.teleported = [Admin] Teleported to {0}. - -# ========== Player Info Additional ========== -playerinfo.records = {0} records -playerinfo.joined_date = Joined: {0} -playerinfo.current = Current -playerinfo.left_date = Left: {0} - -# ========== Zone Map ========== -map.world_warning = WARNING: You are in '{0}' - zone is in '{1}' -map.position = Your Position: Chunk ({0}, {1}) -map.zone_gone = Zone no longer exists. -map.claimed = Claimed chunk ({0}, {1}) for {2}. -map.claim_failed = Failed to claim chunk: {0} -map.unclaimed = Unclaimed chunk ({0}, {1}) from {2}. -map.unclaim_failed = Failed to unclaim chunk: {0} -map.chunk_belongs = This chunk belongs to {0}. -map.chunk_faction = This chunk is claimed by a faction. -map.chunk_protected = This chunk is in a protected region. diff --git a/src/main/resources/Server/Languages/zh-CN/hyperfactions_gui.lang b/src/main/resources/Server/Languages/zh-CN/hyperfactions_gui.lang deleted file mode 100644 index 4483628b..00000000 --- a/src/main/resources/Server/Languages/zh-CN/hyperfactions_gui.lang +++ /dev/null @@ -1,446 +0,0 @@ -# Language: Simplified Chinese (zh-CN) -# Status: Untranslated — English placeholder values -# To translate: Replace English values with Simplified Chinese translations -# Keep keys and {0} placeholders unchanged - -# HyperFactions GUI - English Translations -# Format: key = value -# Note: Keys are auto-prefixed with "hyperfactions_gui." by Hytale's I18nModule - -# ========== Navigation Bar ========== -nav.dashboard = Dashboard -nav.chat = Chat -nav.members = Members -nav.invites = Invites -nav.browser = Browse -nav.map = Map -nav.leaderboard = Leaderboard -nav.relations = Relations -nav.treasury = Treasury -nav.settings = Settings -nav.logs = Logs -nav.help = Help -nav.admin = Admin -nav.create = Create - -# ========== Help Category Names ========== -help.category.welcome = Welcome -help.category.your_faction = Your Faction -help.category.power_land = Power & Land -help.category.diplomacy = Diplomacy -help.category.combat = Combat & Safety -help.category.economy = Economy -help.category.quick_ref = Quick Reference - -# ========== Main Menu ========== -main_menu.section_my_faction = My Faction -main_menu.section_get_started = Get Started -main_menu.section_territory = Territory -main_menu.section_browse = Browse -main_menu.section_admin = Admin -main_menu.claim_hint = Use /f claim to claim territory. - -# ========== Faction Info Page ========== -faction_info.no_description = No description set. -faction_info.status_open = Open -faction_info.status_invite_only = Invite Only -faction_info.status_raidable = Raidable -faction_info.status_protected = Protected -faction_info.officers_more = +{0} more - -# ========== Rename Modal ========== -rename.no_permission = You don't have permission to rename the faction. -rename.enter_name = Please enter a faction name. -rename.too_short = Faction name must be at least {0} characters. -rename.too_long = Faction name cannot exceed {0} characters. -rename.same_name = That's already your faction's name. -rename.name_taken = A faction with that name already exists. -rename.success = Faction renamed from {0} to {1}! - -# ========== Description Modal ========== -desc.no_permission = You don't have permission to edit the description. -desc.display_none = (None) -desc.cleared = Faction description cleared. -desc.updated = Faction description updated! - -# ========== Tag Modal ========== -tag.no_permission = You don't have permission to edit the tag. -tag.display_none = (None) -tag.cleared = Faction tag cleared. -tag.too_short = Tag must be at least {0} character. -tag.too_long = Tag cannot exceed {0} characters. -tag.invalid_format = Tag can only contain letters and numbers. -tag.same_tag = That's already your faction's tag. -tag.tag_taken = A faction with that tag already exists. -tag.success = Faction tag set to [{0}]! - -# ========== Dashboard Page ========== -dashboard.faction_gone = Your faction no longer exists. -dashboard.available = {0} available -dashboard.at_risk = At Risk! -dashboard.online_count = {0} online -dashboard.status_invite = Invite -dashboard.in_grace = IN GRACE -dashboard.billable_chunks = {0} billable chunks -dashboard.btn_home = Home -dashboard.btn_set_home = Set Home -dashboard.btn_claim = Claim -dashboard.chat_prefix = Chat: {0} -dashboard.btn_leave = Leave -dashboard.no_activity = No recent activity. -dashboard.time_now = now -dashboard.time_minutes = {0}m ago -dashboard.time_hours = {0}h ago -dashboard.time_days = {0}d ago -dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. -dashboard.chat_mode_set = Chat mode: {0} -dashboard.claim_success = Claimed chunk at ({0}, {1}) - -# ========== Faction Main Page ========== -main.no_faction = No Faction -main.joined = You joined the faction! -main.join_failed = Failed to join faction: {0} -main.invite_declined = Invite declined. -main.cooldown = Teleport on cooldown! {0}s remaining. -main.world_not_found = Cannot teleport - world not found. -main.leave_failed = Failed to leave: {0} - -# ========== Shared GUI Labels ========== -common.faction_count = {0} factions -common.leader_label = Leader: {0} -common.sort_power = Power -common.sort_members = Members -common.page_format = {0}/{1} -common.own_faction = (You) - -# ========== Members Page ========== -members.count = {0} members -members.sort_role = Role -members.sort_last_online = Last Online -members.just_now = just now -members.ago = {0} ago -members.never = Never -members.member_not_found = Member not found. -members.promoted = Promoted {0} to {1}. -members.promote_failed = Failed to promote: {0} -members.demoted = Demoted {0} to {1}. -members.demote_failed = Failed to demote: {0} -members.kicked = Kicked {0} from the faction. -members.kick_failed = Failed to kick: {0} - -# ========== Browser Page ========== -browser.sort_name = Name -browser.invalid_faction = Invalid faction. - -# ========== Leaderboard Page ========== -leaderboard.sort_kd = K/D -leaderboard.sort_territory = Territory -leaderboard.sort_balance = Balance - -# ========== Player Info Page ========== -playerinfo.now = Now -playerinfo.history_count = {0} records -playerinfo.joined_label = Joined: {0} -playerinfo.current = Current -playerinfo.left_label = Left: {0} -playerinfo.no_history = No membership history -playerinfo.faction_gone = Faction no longer exists. -playerinfo.reason_active = ACTIVE -playerinfo.reason_left = LEFT -playerinfo.reason_kicked = KICKED -playerinfo.reason_disbanded = DISBANDED - -# ========== Relations Page ========== -relations.relation_count = {0} relations -relations.request_count = {0} requests -relations.type_ally = Ally -relations.type_enemy = Enemy -relations.type_incoming = Incoming -relations.type_outgoing = Outgoing -relations.incoming_request = Incoming request -relations.outgoing_request = Outgoing request -relations.empty_relations = No relations yet. -relations.empty_relations_hint = No relations yet. Click + SET RELATION to add allies or enemies. -relations.empty_pending = No pending ally requests. -relations.today = Today -relations.one_day_ago = 1 day ago -relations.days_ago = {0} days ago -relations.now_neutral = Now neutral with {0}. -relations.now_enemies = Now enemies with {0}! -relations.request_sent = Alliance request sent to {0}. -relations.now_allied = Now allied with {0}! -relations.request_declined = Ally request from {0} declined. -relations.request_cancelled = Ally request to {0} cancelled. -relations.failed = Failed: {0} -relations.search_hint = Search for a faction to set relation -relations.no_results = No factions found matching '{0}' -relations.power_display = {0} power -relations.member_count = {0} members - -# ========== Settings Page ========== -settings.officers_only = Only officers and leaders can change faction settings. -settings.display_none = (None) -settings.home_not_set = Not set -settings.no_permission = You don't have permission to change settings. -settings.only_leader_disband = Only the leader can disband the faction. -settings.perm_locked = This setting is locked by the server. -settings.no_perm_edit = You don't have permission to edit territory permissions. -settings.only_leader_officers = Only the leader can change officer access. -settings.pvp_enabled = Enabled -settings.pvp_disabled = Disabled -settings.not_in_territory = You must be in your faction's territory to set home. -settings.home_set = Faction home set to your current location! -settings.recruitment_set = Recruitment set to {0}. -settings.home_no_set = Your faction does not have a home set. -settings.home_deleted = Faction home deleted! - -# ========== Modules Page ========== -modules.treasury_name = Treasury -modules.treasury_desc = Faction bank & economy system -modules.raids_name = Raids -modules.raids_desc = Scheduled faction battles -modules.levels_name = Levels -modules.levels_desc = Faction progression & XP -modules.war_name = War -modules.war_desc = Formal war declarations -modules.coming_soon = Coming Soon -modules.active = Active -modules.view_treasury = View Treasury -modules.unavailable = Unavailable -modules.no_economy = No economy plugin detected -modules.disabled = Disabled -modules.economy_not_available = Economy features are not available on this server - -# ========== Treasury Page ========== -treasury.wallet_label = Your wallet: {0} -treasury.treasury_label = Treasury balance: {0} -treasury.chunks_detail = {0} free + {1} billable chunks -treasury.cost_label = Cost: {0} -treasury.pending = Pending -treasury.auto_pay_on = Auto-pay: ON -treasury.auto_pay_off = Auto-pay: OFF -treasury.runway_90_plus = 90+ days -treasury.runway_days = {0} days -treasury.runway_day = {0} day -treasury.runway_less_day = < 1 day -treasury.runway_no_funds = No funds -treasury.grace_expires = Grace expires in: {0} -treasury.missed_payments = Missed payments: {0} -treasury.pay_to_clear = Pay {0} to clear grace -treasury.system = System -treasury.type_deposit = Deposit -treasury.type_withdrawal = Withdrawal -treasury.type_transfer_in = Transfer In -treasury.type_transfer_out = Transfer Out -treasury.type_player_transfer = Player Transfer -treasury.type_upkeep = Upkeep -treasury.type_tax = Tax Collection -treasury.type_war_cost = War Cost -treasury.type_raid_cost = Raid Cost -treasury.type_spoils = Spoils -treasury.type_admin = Admin Adjustment -treasury.deposit_title = Deposit to Treasury -treasury.withdraw_title = Withdraw from Treasury -treasury.fee_label = Fee ({0}%) -treasury.confirm_deposit = Confirm Deposit -treasury.confirm_withdrawal = Confirm Withdrawal -treasury.from_wallet = {0} from wallet -treasury.to_wallet = {0} to wallet -treasury.enter_valid_amount = Enter a valid positive amount. -treasury.insufficient_wallet = Insufficient wallet funds. Need {0}, have {1}. -treasury.wallet_withdraw_failed = Failed to withdraw from your wallet. -treasury.deposit_failed_returned = Failed to deposit. Money returned. -treasury.deposited = Deposited {0} into the treasury. -treasury.deposited_fee = Deposited {0} into the treasury. (fee: {1}) -treasury.no_withdraw_permission = You don't have permission to withdraw. -treasury.withdraw_denied = Withdrawal denied: {0} -treasury.insufficient_treasury = Insufficient funds in treasury. -treasury.withdraw_limit = Withdrawal limit exceeded. -treasury.withdraw_failed = Withdrawal failed: {0} -treasury.wallet_deposit_warn = Warning: Failed to deposit to your wallet. Contact an admin. -treasury.withdrew = Withdrew {0} from the treasury. -treasury.withdrew_fee = Withdrew {0} from the treasury. (fee: {1}, received: {2}) -treasury.search_hint = Search for a player or faction -treasury.no_results = No results for '{0}' -treasury.tag_player = [Player] -treasury.tag_faction = [Faction] -treasury.source_online = Online -treasury.source_offline = Offline -treasury.source_player_db = Hytale player -treasury.no_transfer_permission = You don't have permission to transfer. -treasury.transfer_denied = Transfer denied: {0} -treasury.invalid_target_faction = Invalid target faction. -treasury.target_faction_gone = Target faction no longer exists. -treasury.transfer_failed = Transfer failed: {0} -treasury.transfer_failed_returned = Transfer failed. Funds returned. -treasury.transferred = Transferred {0} to {1}. -treasury.invalid_target_player = Invalid target player. -treasury.player_transfer_failed = Failed to deposit to player wallet. Transfer rolled back. -treasury.leader_only_perms = Only the leader can change treasury permissions. -treasury.leader_only_upkeep = Only the leader can change upkeep settings. -treasury.invalid_limit = Invalid number in limit fields. Use 0 for unlimited. - -# ========== Confirmation Pages ========== -confirm.disband_not_leader = Only the leader can disband the faction. -confirm.disbanded = Faction '{0}' has been disbanded. -confirm.disband_failed = Failed to disband faction. -confirm.succession_title = Leadership will transfer to: -confirm.no_members_warning = WARNING: No other members! -confirm.will_disband = Leaving will disband the faction permanently. -confirm.not_in_faction = You are not in this faction. -confirm.not_leader_anymore = You are no longer the leader. -confirm.no_successor = No successor available. Use disband instead. -confirm.transfer_failed = Failed to transfer leadership: {0} -confirm.leader_left = Leadership transferred to {0}. You have left {1}. -confirm.leave_failed = Failed to leave faction: {0} -confirm.leader_cannot_leave = Leaders cannot leave. Transfer leadership or disband the faction. -confirm.left_faction = You have left {0}. -confirm.faction_gone = Faction no longer exists. -confirm.not_leader_transfer = Only the leader can transfer leadership. -confirm.leadership_transferred = Leadership transferred to {0}. - -# ========== Logs Viewer Page ========== -logs.title = {0} - Activity Logs -logs.entry_count = {0} entries -logs.all_types = All Types -logs.no_logs_type = No logs of this type. -logs.no_logs = No activity logs yet. - -# ========== Chat Page ========== -chat.placeholder = Type a message... -chat.no_messages = No messages yet. -chat.no_ally_permission = You don't have permission for ally chat. -chat.no_permission = No permission. -chat.faction_gone = Your faction no longer exists. -chat.time_now = now -chat.time_minutes = {0}m -chat.time_hours = {0}h - -# ========== Invites Page ========== -invites.invite_count = {0} invites -invites.request_count = {0} requests -invites.invited_by = Invited by: {0} -invites.no_message = No message -invites.expires = Expires: {0} -invites.type_outgoing = Outgoing -invites.type_request = Request -invites.invited_by_label = Invited by: -invites.empty_outgoing = No outgoing invites. Use /f invite to invite someone. -invites.empty_requests = No join requests. Players can request to join with /f request. -invites.invalid_player = Invalid player. -invites.cancelled_invite = Cancelled invite to {0}. -invites.player_joined = {0} has joined the faction! -invites.faction_full = Faction is full. Cannot accept request. -invites.add_failed = Failed to add player to faction. -invites.request_expired = Request not found or expired. -invites.request_declined = Declined join request from {0}. -invites.time_seconds = {0}s -invites.time_minutes = {0}m -invites.time_hours = {0}h - -# ========== Map Page ========== -map.position = Your Position: Chunk ({0}, {1}) -map.legend_protected = Protected -map.claim_stats = Claims: {0}/{1} ({2} Available) -map.overclaimed = OVERCLAIMED by {0}! -map.power_display = Power: {0}/{1} -map.join_to_claim = Join a faction to claim -map.claim_success = Claimed chunk at ({0}, {1})! -map.claim_not_in_faction = You must be in a faction to claim territory. -map.claim_not_officer = Only officers and leaders can claim territory. -map.claim_already_yours = You already own this chunk. -map.claim_already_claimed = This chunk is already claimed by another faction. -map.claim_not_adjacent = You can only claim chunks adjacent to your territory. -map.claim_max = You have reached your maximum claim limit. -map.claim_world_not_allowed = Claiming is not allowed in this world. -map.claim_orbisguard = This area is protected by OrbisGuard. -map.claim_failed = Failed to claim chunk. -map.unclaim_success = Unclaimed chunk at ({0}, {1}). -map.unclaim_not_in_faction = You must be in a faction. -map.unclaim_not_officer = Only officers and leaders can unclaim territory. -map.unclaim_not_claimed = This chunk is not claimed. -map.unclaim_not_yours = This chunk belongs to another faction. -map.unclaim_home = Cannot unclaim the chunk containing your faction home. -map.unclaim_failed = Failed to unclaim chunk. -map.overclaim_success = Overclaimed enemy chunk at ({0}, {1})! -map.overclaim_not_in_faction = You must be in a faction. -map.overclaim_not_officer = Only officers and leaders can overclaim territory. -map.overclaim_already_yours = You already own this chunk. -map.overclaim_ally = You cannot overclaim allied territory. -map.overclaim_has_power = This faction has enough power to defend their territory. -map.overclaim_max = You have reached your maximum claim limit. -map.overclaim_failed = Failed to overclaim chunk. -# ========== Create Faction Page ========== -create.preview_name = Your Faction Name -create.leader_prefix = Leader: {0} -create.enter_name = Please enter a faction name. -create.name_too_short = Faction name must be at least {0} characters. -create.name_too_long = Faction name cannot exceed {0} characters. -create.name_taken = A faction with this name already exists. -create.tag_length = Faction tag must be {0}-{1} characters. -create.tag_format = Faction tag can only contain letters and numbers. -create.desc_too_long = Description cannot exceed {0} characters. -create.created = Faction {0} created successfully! -create.created_no_dashboard = Faction created but could not open dashboard. -create.invalid_name = Invalid faction name. -create.create_failed = Could not create faction. - -# ========== New Player Pages ========== -newplayer.pending_count = {0} pending -newplayer.received_header = RECEIVED INVITES ({0}) -newplayer.requests_header = YOUR REQUESTS ({0}) -newplayer.no_invites = No invites. Browse factions to find one! -newplayer.no_requests = No pending requests. -newplayer.invited_by = Invited by: {0} -newplayer.member_count = {0} members -newplayer.power_count = {0} power -newplayer.claim_count = {0} claims -newplayer.awaiting_review = Awaiting review -newplayer.expires_in = Expires in {0}h -newplayer.time_just_now = just now -newplayer.time_minutes = {0} min ago -newplayer.time_hours = {0}h ago -newplayer.time_days = {0}d ago -newplayer.invalid_faction = Invalid faction. -newplayer.invite_expired = This invite has expired or was revoked. -newplayer.faction_gone = Faction no longer exists. -newplayer.joined = You joined {0}! -newplayer.faction_full = This faction is full. -newplayer.join_failed = Could not join faction. -newplayer.invite_declined = Invite declined. -newplayer.request_cancelled = Cancelled request to join {0}. -newplayer.faction_count = {0} factions -newplayer.browse_subtitle = Find your new home! -newplayer.sort_power = Power -newplayer.sort_name = Name -newplayer.sort_members = Members -newplayer.btn_accept = Accept -newplayer.btn_pending = Pending -newplayer.btn_join = Join -newplayer.btn_request = Request -newplayer.invite_only_msg = This faction is invite-only. -newplayer.welcome_hint = Welcome! Use /f to open faction menu. -newplayer.faction_open_hint = This faction is open! Click JOIN instead. -newplayer.already_requested = You already have a pending request to this faction. -newplayer.has_invite_hint = You have an invite from this faction! Click ACCEPT instead. -newplayer.request_sent = Join request sent to {0}! -newplayer.officer_review = An officer will review your request. -newplayer.map_hint = View Only - Join a faction to claim territory! - -# Player Settings -nav.player_settings = Settings -player_settings.title = Player Settings -player_settings.language_section = Language -player_settings.auto_detect = Auto-detect from client -player_settings.auto_detect_desc = Uses your game client's language setting -player_settings.language_label = Language -player_settings.notifications_section = Notifications -player_settings.territory_alerts = Territory Alerts -player_settings.territory_alerts_desc = Show notifications when entering/leaving territories -player_settings.death_announcements = Death Broadcasts -player_settings.death_announcements_desc = Receive faction member death location announcements -player_settings.power_notifications = Power Changes -player_settings.power_notifications_desc = Show messages when your power changes -player_settings.language_changed = Language changed to {0} -player_settings.pref_enabled = {0} enabled -player_settings.pref_disabled = {0} disabled From 2e276cdea462a41553ef44906ce4c660b0e64ea7 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Tue, 10 Mar 2026 15:14:35 -0700 Subject: [PATCH 43/55] fix: strip inline markdown markers, join continuation lines, fix invalid commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add inline marker stripping to HelpLangGenerator (build-time): **bold** → bold, `code` → code, *italic* → italic, -- → em-dash - Join multi-line prose into single lines (each line = one UI entry) - Remove non-existent /f admin modify and /f admin bypass references - Fix duplicate debug toggle entry in admin command reference - Apply same fixes to both en-US and es-ES help content --- .../build/HelpLangGenerator.java | 38 ++++++++++++++++++- .../help/admin/admin_config/configuration.md | 3 +- .../help/admin/admin_config/world_settings.md | 6 +-- .../admin_economy/treasury_management.md | 3 +- .../admin/admin_economy/upkeep_management.md | 12 ++---- .../help/admin/admin_factions/disbanding.md | 8 ++-- .../admin/admin_factions/managing_factions.md | 9 ++--- .../help/admin/admin_maintenance/backups.md | 3 +- .../help/admin/admin_maintenance/imports.md | 3 +- .../help/admin/admin_maintenance/updates.md | 9 ++--- .../admin/admin_overview/getting_started.md | 8 ++-- .../help/admin/admin_overview/permissions.md | 8 +--- .../help/admin/admin_power/power_commands.md | 7 +--- .../help/admin/admin_power/power_overrides.md | 12 ++---- .../admin/admin_reference/all_commands.md | 5 +-- .../admin/admin_reference/integrations.md | 7 +--- .../help/admin/admin_zones/zone_basics.md | 13 +++---- .../help/admin/admin_zones/zone_commands.md | 3 +- .../help/admin/admin_zones/zone_flags.md | 3 +- .../Languages/en-US/help/combat/death.md | 15 ++------ .../Languages/en-US/help/combat/protection.md | 19 +++------- .../en-US/help/combat/spawn_protection.md | 7 +--- .../Languages/en-US/help/combat/tagging.md | 10 ++--- .../Languages/en-US/help/combat/zones.md | 11 ++---- .../Languages/en-US/help/economy/commands.md | 4 +- .../Languages/en-US/help/economy/funds.md | 12 ++---- .../Languages/en-US/help/economy/treasury.md | 10 ++--- .../Languages/en-US/help/economy/upkeep.md | 15 ++------ .../en-US/help/quick_ref/permissions.md | 3 +- .../help/admin/admin_config/configuration.md | 3 +- .../help/admin/admin_config/world_settings.md | 6 +-- .../admin_economy/treasury_management.md | 3 +- .../admin/admin_economy/upkeep_management.md | 14 ++----- .../help/admin/admin_factions/disbanding.md | 8 ++-- .../admin/admin_factions/managing_factions.md | 11 ++---- .../help/admin/admin_maintenance/backups.md | 3 +- .../help/admin/admin_maintenance/imports.md | 3 +- .../help/admin/admin_maintenance/updates.md | 9 ++--- .../admin/admin_overview/getting_started.md | 9 ++--- .../help/admin/admin_overview/permissions.md | 8 +--- .../help/admin/admin_power/power_commands.md | 7 +--- .../help/admin/admin_power/power_overrides.md | 14 ++----- .../admin/admin_reference/all_commands.md | 5 +-- .../admin/admin_reference/integrations.md | 8 +--- .../help/admin/admin_zones/zone_basics.md | 14 +++---- .../help/admin/admin_zones/zone_commands.md | 3 +- .../help/admin/admin_zones/zone_flags.md | 3 +- .../Languages/es-ES/help/combat/death.md | 15 ++------ .../Languages/es-ES/help/combat/protection.md | 20 +++------- .../es-ES/help/combat/spawn_protection.md | 7 +--- .../Languages/es-ES/help/combat/tagging.md | 11 ++---- .../Languages/es-ES/help/combat/zones.md | 11 ++---- .../Languages/es-ES/help/economy/commands.md | 4 +- .../Languages/es-ES/help/economy/funds.md | 12 ++---- .../Languages/es-ES/help/economy/treasury.md | 10 ++--- .../Languages/es-ES/help/economy/upkeep.md | 18 ++------- .../es-ES/help/quick_ref/permissions.md | 4 +- 57 files changed, 179 insertions(+), 330 deletions(-) diff --git a/src/main/java/com/hyperfactions/build/HelpLangGenerator.java b/src/main/java/com/hyperfactions/build/HelpLangGenerator.java index 213648a0..6b6ecd0b 100644 --- a/src/main/java/com/hyperfactions/build/HelpLangGenerator.java +++ b/src/main/java/com/hyperfactions/build/HelpLangGenerator.java @@ -61,6 +61,18 @@ public class HelpLangGenerator { "admin_economy", "admin_config", "admin_maintenance", "admin_reference" ); + /** Pattern for inline bold: **text** */ + private static final Pattern INLINE_BOLD_PATTERN = Pattern.compile("\\*\\*(.+?)\\*\\*"); + + /** Pattern for inline code: `text` */ + private static final Pattern INLINE_CODE_PATTERN = Pattern.compile("`(.+?)`"); + + /** Pattern for inline italic: *text* (not bold **) */ + private static final Pattern INLINE_ITALIC_PATTERN = Pattern.compile("(? top Entry entry = topic.entries().get(i); if (entry.columns() != null) { // Table entry — write each column as a separate lang key + // (table cell formatting is handled at render time by applyCellFormatting) for (ColumnEntry col : entry.columns()) { sb.append(col.key()).append(" = ").append(col.text()).append("\n"); } } else if (entry.key() != null) { String text = topic.entryTexts().get(i); - sb.append(entry.key()).append(" = ").append(text).append("\n"); + sb.append(entry.key()).append(" = ").append(stripInlineMarkers(text)).append("\n"); } } @@ -554,6 +567,29 @@ private static void writeManifest(Path outputDir, List topics) throws IOE System.out.println("Wrote: " + manifestFile); } + // ── Inline marker stripping ───────────────────────────────────────── + + /** + * Strips inline markdown markers from text destined for .lang files. + *

The UI Labels can't mix bold and regular text in one element, + * so we strip markers to produce clean readable text: + *

    + *
  • {@code **bold**} → {@code bold}
  • + *
  • {@code `code`} → {@code code}
  • + *
  • {@code *italic*} → {@code italic}
  • + *
  • {@code " -- "} → {@code " — "} (em-dash)
  • + *
+ */ + private static String stripInlineMarkers(String text) { + if (text == null) return null; + // Order matters: strip bold (**) before italic (*) to avoid partial matches + text = INLINE_BOLD_PATTERN.matcher(text).replaceAll("$1"); + text = INLINE_CODE_PATTERN.matcher(text).replaceAll("$1"); + text = INLINE_ITALIC_PATTERN.matcher(text).replaceAll("$1"); + text = EM_DASH_PATTERN.matcher(text).replaceAll(" \u2014 "); + return text; + } + // ── Utility ────────────────────────────────────────────────────────── private static List listSortedDirectories(Path dir) throws IOException { diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_config/configuration.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_config/configuration.md index c2351704..95b6c952 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_config/configuration.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_config/configuration.md @@ -3,8 +3,7 @@ id: admin_configuration --- # Configuration System -HyperFactions uses a modular JSON config system with -11 configuration files. +HyperFactions uses a modular JSON config system with 11 configuration files. ## Admin Config Commands diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_config/world_settings.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_config/world_settings.md index 2d63b0fb..47e8dffe 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_config/world_settings.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_config/world_settings.md @@ -3,8 +3,7 @@ id: admin_world_settings --- # Per-World Settings -HyperFactions supports per-world configuration for -claiming, PvP, and protection behavior. +HyperFactions supports per-world configuration for claiming, PvP, and protection behavior. ## World Commands @@ -27,8 +26,7 @@ claiming, PvP, and protection behavior. ## World Whitelist / Blacklist -Control which worlds allow faction features through -the `worlds.json` config file: +Control which worlds allow faction features through the `worlds.json` config file: - **Whitelist mode**: Only listed worlds allow claiming - **Blacklist mode**: All worlds allow claiming except listed diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/treasury_management.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/treasury_management.md index dcd28b60..b219d330 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/treasury_management.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/treasury_management.md @@ -3,8 +3,7 @@ id: admin_treasury_management --- # Treasury Management -Admin commands for managing faction treasuries. -Requires `hyperfactions.admin.economy` permission. +Admin commands for managing faction treasuries. Requires `hyperfactions.admin.economy` permission. ## Treasury Commands diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/upkeep_management.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/upkeep_management.md index 9aa2a80e..7df9b4c7 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/upkeep_management.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_economy/upkeep_management.md @@ -3,17 +3,14 @@ id: admin_upkeep_management --- # Upkeep Management -Faction upkeep charges factions periodically based on -their territory and member count. +Faction upkeep charges factions periodically based on their territory and member count. ## Admin Controls -Upkeep settings are managed through the economy config -file or the admin config GUI. +Upkeep settings are managed through the economy config file or the admin config GUI. `/f admin config` -Open the config editor and navigate to economy -settings to adjust upkeep values. +Open the config editor and navigate to economy settings to adjust upkeep values. ## Default Upkeep Settings @@ -40,7 +37,6 @@ Use `/f admin info ` to see: ## Upkeep Formula -**Total upkeep** = (claimed chunks x per-claim cost) + -(member count x per-member cost) +**Total upkeep** = (claimed chunks x per-claim cost) + (member count x per-member cost) >[!WARNING] Enabling upkeep on a server with existing factions may cause unexpected bankruptcies. Consider setting a grace period or announcing the change in advance. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/disbanding.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/disbanding.md index 3392afc8..253e05ab 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/disbanding.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/disbanding.md @@ -3,14 +3,12 @@ id: admin_disbanding --- # Force Disbanding -Admins can forcefully disband any faction, regardless -of the leader's wishes. +Admins can forcefully disband any faction, regardless of the leader's wishes. ## Command `/f admin disband ` -Force-disband the named faction. A confirmation -prompt will appear before the action is executed. +Force-disband the named faction. A confirmation prompt will appear before the action is executed. **Permission**: `hyperfactions.admin.disband` @@ -36,4 +34,4 @@ When a faction is disbanded: 3. Document the reason for server records 4. Check `/f admin info ` to review before acting ->[!TIP] If the issue is with a specific member, consider using `/f admin modify` to transfer leadership rather than disbanding the entire faction. +>[!TIP] If the issue is with a specific member, consider using the admin factions GUI to transfer leadership rather than disbanding the entire faction. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/managing_factions.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/managing_factions.md index ed8fe072..b00218c9 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/managing_factions.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_factions/managing_factions.md @@ -3,18 +3,15 @@ id: admin_managing_factions --- # Managing Factions -Admins can inspect and modify any faction on the -server through the dashboard or commands. +Admins can inspect and modify any faction on the server through the dashboard or commands. ## Browsing Factions `/f admin factions` -Opens the admin faction browser. View all factions -with member counts, power levels, and territory. +Opens the admin faction browser. View all factions with member counts, power levels, and territory. `/f admin info ` -Opens the admin info panel for a specific faction -with full details and management options. +Opens the admin info panel for a specific faction with full details and management options. ## Modifying Faction Settings diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/backups.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/backups.md index 5ba2fe64..84a331f7 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/backups.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/backups.md @@ -3,8 +3,7 @@ id: admin_backups --- # Backup System -HyperFactions includes automatic and manual backups -with GFS (Grandfather-Father-Son) rotation. +HyperFactions includes automatic and manual backups with GFS (Grandfather-Father-Son) rotation. ## Backup Commands diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/imports.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/imports.md index 7fd86390..e3bf7548 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/imports.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/imports.md @@ -3,8 +3,7 @@ id: admin_imports --- # Data Import -Import faction data from other plugins to migrate -your server to HyperFactions. +Import faction data from other plugins to migrate your server to HyperFactions. ## Import Command diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/updates.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/updates.md index 84ddcff1..f6dc2880 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/updates.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_maintenance/updates.md @@ -3,8 +3,7 @@ id: admin_updates --- # Update Checking -HyperFactions can check for new versions and manage -the HyperProtect-Mixin dependency. +HyperFactions can check for new versions and manage the HyperProtect-Mixin dependency. ## Update Commands @@ -26,12 +25,10 @@ the HyperProtect-Mixin dependency. ## HyperProtect-Mixin -HyperProtect-Mixin is the recommended protection -mixin that enables advanced zone flags (explosions, -fire spread, keep inventory, etc.). +HyperProtect-Mixin is the recommended protection mixin that enables advanced zone flags (explosions, fire spread, keep inventory, etc.). - `/f admin update mixin` checks for the latest version - and downloads it if a newer version is available +and downloads it if a newer version is available - Auto-download can be toggled on or off per server >[!TIP] After downloading a new mixin version, a server restart is required for the changes to take effect. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/getting_started.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/getting_started.md index 4577524f..bf30a5b4 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/getting_started.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/getting_started.md @@ -3,14 +3,12 @@ id: admin_getting_started --- # Getting Started as Admin -Welcome to HyperFactions administration. This guide -covers your first steps after installing the plugin. +Welcome to HyperFactions administration. This guide covers your first steps after installing the plugin. ## Opening the Admin Dashboard `/f admin` -Opens the admin dashboard GUI with access to all -management tools, zone editors, and server settings. +Opens the admin dashboard GUI with access to all management tools, zone editors, and server settings. >[!INFO] You need **hyperfactions.admin.use** permission or OP status to access admin commands. @@ -18,7 +16,7 @@ management tools, zone editors, and server settings. - **With a permission plugin**: Grant `hyperfactions.admin.use` - **Without a permission plugin**: The player must be a - server operator (`adminRequiresOp=true` by default) +server operator (`adminRequiresOp=true` by default) ## First Steps After Install diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/permissions.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/permissions.md index 9765ddb8..979e5543 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/permissions.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_overview/permissions.md @@ -3,8 +3,7 @@ id: admin_permissions --- # Admin Permissions -All admin features are gated behind permission nodes -in the `hyperfactions.admin` namespace. +All admin features are gated behind permission nodes in the `hyperfactions.admin` namespace. ## Permission Nodes @@ -24,10 +23,7 @@ in the `hyperfactions.admin` namespace. ## Fallback Behavior -When **no permission plugin** is installed, admin -permissions fall back to server operator (OP) status. -This is controlled by `adminRequiresOp` in the server -config (default: `true`). +When **no permission plugin** is installed, admin permissions fall back to server operator (OP) status. This is controlled by `adminRequiresOp` in the server config (default: `true`). >[!NOTE] The `hyperfactions.admin.*` wildcard grants every admin permission. Use individual nodes for granular control over your staff team. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_commands.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_commands.md index cb3a1cc6..b2c9f463 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_commands.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_commands.md @@ -3,8 +3,7 @@ id: admin_power_commands --- # Power Admin Commands -Override player and faction power values. All commands -require `hyperfactions.admin.power` permission. +Override player and faction power values. All commands require `hyperfactions.admin.power` permission. ## Player Power Commands @@ -18,9 +17,7 @@ require `hyperfactions.admin.power` permission. ## How Power Affects Factions -A faction's total power is the sum of all its members' -individual power. Territory claims require sufficient -total power to maintain. +A faction's total power is the sum of all its members' individual power. Territory claims require sufficient total power to maintain. | Scenario | Effect | |----------|--------| diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_overrides.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_overrides.md index 0834b1d6..5469f903 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_overrides.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_power/power_overrides.md @@ -3,8 +3,7 @@ id: admin_power_overrides --- # Power Overrides -Special power commands that change how power behaves -for specific players or factions. +Special power commands that change how power behaves for specific players or factions. ## Override Commands @@ -18,16 +17,14 @@ for specific players or factions. ## Custom Max Power `/f admin power setmax ` -Sets a personal maximum power cap for the player, -overriding the server default. +Sets a personal maximum power cap for the player, overriding the server default. >[!INFO] Setting a custom max does **not** change current power. It only changes the ceiling. The player must still earn power up to the new limit. ## No-Loss Mode `/f admin power noloss ` -Toggles death power loss immunity. When enabled, the -player will **not** lose power on death. +Toggles death power loss immunity. When enabled, the player will **not** lose power on death. Useful for: - New player protection periods @@ -37,8 +34,7 @@ Useful for: ## No-Decay Mode `/f admin power nodecay ` -Toggles offline power decay immunity. When enabled, -the player's power will **not** decrease while offline. +Toggles offline power decay immunity. When enabled, the player's power will **not** decrease while offline. Useful for: - Players on extended leave diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/all_commands.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/all_commands.md index b77ccd0b..bd0b0fa6 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/all_commands.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/all_commands.md @@ -3,8 +3,7 @@ id: admin_quickref_commands --- # Admin Command Reference -Complete list of all `/f admin` subcommands with -syntax and required permissions. +Complete list of all `/f admin` subcommands with syntax and required permissions. ## Dashboard and General @@ -14,7 +13,7 @@ syntax and required permissions. | `/f admin version` | admin.use | | `/f admin reload` | admin.reload | | `/f admin sync` | admin.use | -| `/f admin bypass` | admin.bypass.limits | +| `/f admin sentry` | admin.use | ## Faction Management diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/integrations.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/integrations.md index 8578ea92..c39bfb3b 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/integrations.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_reference/integrations.md @@ -3,9 +3,7 @@ id: admin_integrations --- # Plugin Integrations -HyperFactions integrates with several external plugins -through soft dependencies. All integrations are -optional and fail gracefully if unavailable. +HyperFactions integrates with several external plugins through soft dependencies. All integrations are optional and fail gracefully if unavailable. ## Checking Integration Status @@ -13,8 +11,7 @@ optional and fail gracefully if unavailable. Shows current version and detected integrations. `/f admin integration` -Opens the integration management panel with detailed -status for each detected plugin. +Opens the integration management panel with detailed status for each detected plugin. ## Integration Table diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_basics.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_basics.md index 44a13c4d..933a9b2d 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_basics.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_basics.md @@ -3,15 +3,14 @@ id: admin_zone_basics --- # Zone Basics -Zones are admin-controlled territories with custom -rules that override normal faction protection. +Zones are admin-controlled territories with custom rules that override normal faction protection. ## Zone Types - **SafeZone** -- No PvP, no building, no damage. - Ideal for spawn areas and trading hubs. +Ideal for spawn areas and trading hubs. - **WarZone** -- PvP always enabled, no building. - Ideal for arenas and contested battle areas. +Ideal for arenas and contested battle areas. ## Creating Zones @@ -21,8 +20,7 @@ Creates a SafeZone and claims your current chunk. `/f admin warzone ` Creates a WarZone and claims your current chunk. -After creation, stand in additional chunks and use -`/f admin zone claim ` to expand the zone. +After creation, stand in additional chunks and use `/f admin zone claim ` to expand the zone. ## Managing Zone Chunks @@ -38,8 +36,7 @@ Claim a square of chunks around your position. ## Deleting Zones `/f admin removezone ` -Permanently deletes the zone and releases all its -claimed chunks. +Permanently deletes the zone and releases all its claimed chunks. >[!WARNING] Deleting a zone releases all its chunks instantly. This cannot be undone without a backup restore. diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_commands.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_commands.md index 737ac1a3..403b6b63 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_commands.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_commands.md @@ -3,8 +3,7 @@ id: admin_zone_commands --- # Zone Command Reference -Complete reference for all zone management commands. -All require `hyperfactions.admin.zones` permission. +Complete reference for all zone management commands. All require `hyperfactions.admin.zones` permission. ## Quick Creation diff --git a/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_flags.md b/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_flags.md index 033605e6..368a4ec9 100644 --- a/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_flags.md +++ b/src/main/resources/Server/Languages/en-US/help/admin/admin_zones/zone_flags.md @@ -3,8 +3,7 @@ id: admin_zone_flags --- # Zone Flags -Zones support **47 boolean flags** across 10 categories. -Each flag controls a specific behavior within the zone. +Zones support **47 boolean flags** across 10 categories. Each flag controls a specific behavior within the zone. ## Flag Categories Overview diff --git a/src/main/resources/Server/Languages/en-US/help/combat/death.md b/src/main/resources/Server/Languages/en-US/help/combat/death.md index 306b8dda..dc5699a7 100644 --- a/src/main/resources/Server/Languages/en-US/help/combat/death.md +++ b/src/main/resources/Server/Languages/en-US/help/combat/death.md @@ -4,14 +4,11 @@ commands: home, sethome, stuck --- # Death and Recovery -Death carries real consequences in factions. Every -death costs you personal power, weakening your -faction's ability to hold territory. +Death carries real consequences in factions. Every death costs you personal power, weakening your faction's ability to hold territory. ## Power Loss -Each death costs **-1.0 power** from your personal -total. This lowers the faction's combined power. +Each death costs **-1.0 power** from your personal total. This lowers the faction's combined power. | Event | Power Change | |-------|-------------| @@ -29,16 +26,12 @@ total. This lowers the faction's combined power. ## Recovery -Power regenerates at 0.1 per minute while online. -Recovering 1.0 lost power takes about 10 minutes. -Multiple deaths stack, so avoid repeated fights. +Power regenerates at 0.1 per minute while online. Recovering 1.0 lost power takes about 10 minutes. Multiple deaths stack, so avoid repeated fights. --- ## All Death Types -Power loss applies to all deaths: PvP, mob kills, -fall damage, drowning, and any other cause. -There is no safe way to die. +Power loss applies to all deaths: PvP, mob kills, fall damage, drowning, and any other cause. There is no safe way to die. >[!TIP] Set a faction home with /f sethome so members can regroup quickly after dying. diff --git a/src/main/resources/Server/Languages/en-US/help/combat/protection.md b/src/main/resources/Server/Languages/en-US/help/combat/protection.md index b80ed995..e564ec2d 100644 --- a/src/main/resources/Server/Languages/en-US/help/combat/protection.md +++ b/src/main/resources/Server/Languages/en-US/help/combat/protection.md @@ -3,34 +3,25 @@ id: combat_protection --- # Territory Protection -Claimed territory provides several layers of defense -for your faction's builds and resources. +Claimed territory provides several layers of defense for your faction's builds and resources. ## Block Protection -Only faction members can place or break blocks in -your territory. Enemies and neutrals are blocked -from modifying anything. +Only faction members can place or break blocks in your territory. Enemies and neutrals are blocked from modifying anything. ## Container Protection -Chests, barrels, and other containers are secured. -Only your faction members can open or interact with -storage in claimed chunks. +Chests, barrels, and other containers are secured. Only your faction members can open or interact with storage in claimed chunks. ## Entry Alerts -When a non-member enters your claimed territory, -online faction members receive a notification with -the intruder's name and location. +When a non-member enters your claimed territory, online faction members receive a notification with the intruder's name and location. --- ## Ally Access -Allies cannot build or break blocks in your territory -by default. Ally damage is also disabled, so allied -players cannot harm each other. +Allies cannot build or break blocks in your territory by default. Ally damage is also disabled, so allied players cannot harm each other. >[!INFO] Territory protects blocks, not players. PvP in your own territory depends on the attacker's relation to your faction. diff --git a/src/main/resources/Server/Languages/en-US/help/combat/spawn_protection.md b/src/main/resources/Server/Languages/en-US/help/combat/spawn_protection.md index 0281243a..4803abf3 100644 --- a/src/main/resources/Server/Languages/en-US/help/combat/spawn_protection.md +++ b/src/main/resources/Server/Languages/en-US/help/combat/spawn_protection.md @@ -3,8 +3,7 @@ id: combat_spawn_protection --- # Spawn Protection -After respawning from death, you receive temporary -protection to prevent spawn camping. +After respawning from death, you receive temporary protection to prevent spawn camping. ## How It Works @@ -19,9 +18,7 @@ Spawn protection ends early if you: - **Attack** another player or entity - **Move** from your spawn position -This prevents abuse. You cannot attack others while -invulnerable. Once you take any action, protection -drops and normal combat rules apply. +This prevents abuse. You cannot attack others while invulnerable. Once you take any action, protection drops and normal combat rules apply. --- diff --git a/src/main/resources/Server/Languages/en-US/help/combat/tagging.md b/src/main/resources/Server/Languages/en-US/help/combat/tagging.md index a886430d..500ff734 100644 --- a/src/main/resources/Server/Languages/en-US/help/combat/tagging.md +++ b/src/main/resources/Server/Languages/en-US/help/combat/tagging.md @@ -3,8 +3,7 @@ id: combat_tagging --- # Combat Tagging -When you attack or are attacked by another player, -you become **combat tagged** for 15 seconds. +When you attack or are attacked by another player, you become **combat tagged** for 15 seconds. ## While Tagged @@ -19,13 +18,10 @@ you become **combat tagged** for 15 seconds. >[!WARNING] Logging out while combat tagged kills your character and you lose 1.0 power. -Your items drop where you disconnected and enemies -can loot them. Always wait for the tag to expire. +Your items drop where you disconnected and enemies can loot them. Always wait for the tag to expire. ## How the Timer Works -The combat tag timer appears on screen when you -enter combat. Every new hit resets it to 15 seconds. -Once it reaches zero, all restrictions are lifted. +The combat tag timer appears on screen when you enter combat. Every new hit resets it to 15 seconds. Once it reaches zero, all restrictions are lifted. >[!TIP] Disengage and wait out the timer if you need to teleport. diff --git a/src/main/resources/Server/Languages/en-US/help/combat/zones.md b/src/main/resources/Server/Languages/en-US/help/combat/zones.md index 33dab4b9..d1d957d2 100644 --- a/src/main/resources/Server/Languages/en-US/help/combat/zones.md +++ b/src/main/resources/Server/Languages/en-US/help/combat/zones.md @@ -3,20 +3,15 @@ id: combat_zones --- # Special Zones -Admins can designate areas with special rules that -override normal faction territory protection. +Admins can designate areas with special rules that override normal faction territory protection. ## SafeZone -No PvP damage, no block breaking by non-admins. -Ideal for spawn areas, trading hubs, and event -staging areas. Players cannot be harmed here. +No PvP damage, no block breaking by non-admins. Ideal for spawn areas, trading hubs, and event staging areas. Players cannot be harmed here. ## WarZone -PvP is always enabled. No block protection applies. -Open battle areas where anything goes. You receive -no territory protection benefits in a WarZone. +PvP is always enabled. No block protection applies. Open battle areas where anything goes. You receive no territory protection benefits in a WarZone. --- diff --git a/src/main/resources/Server/Languages/en-US/help/economy/commands.md b/src/main/resources/Server/Languages/en-US/help/economy/commands.md index 8a8f8b34..20751171 100644 --- a/src/main/resources/Server/Languages/en-US/help/economy/commands.md +++ b/src/main/resources/Server/Languages/en-US/help/economy/commands.md @@ -22,8 +22,6 @@ Quick reference for all faction economy commands. ## Permissions -All economy commands require `hyperfactions.economy.*` -permission nodes. Withdraw and transfer are further -restricted by faction role (Officer or higher). +All economy commands require `hyperfactions.economy.*` permission nodes. Withdraw and transfer are further restricted by faction role (Officer or higher). >[!TIP] Use /f money log to review recent deposits, withdrawals, and transfers with timestamps. diff --git a/src/main/resources/Server/Languages/en-US/help/economy/funds.md b/src/main/resources/Server/Languages/en-US/help/economy/funds.md index 99e99bec..4fe4539c 100644 --- a/src/main/resources/Server/Languages/en-US/help/economy/funds.md +++ b/src/main/resources/Server/Languages/en-US/help/economy/funds.md @@ -4,29 +4,25 @@ commands: deposit, withdraw --- # Managing Funds -Faction members work together to keep the treasury -funded through deposits, withdrawals, and transfers. +Faction members work together to keep the treasury funded through deposits, withdrawals, and transfers. ## Depositing -Any member can deposit personal funds into the -faction treasury. +Any member can deposit personal funds into the faction treasury. `/f deposit ` Deposit from your personal balance into the treasury. ## Withdrawing -Officers and the Leader can withdraw funds back to -their personal balance. +Officers and the Leader can withdraw funds back to their personal balance. `/f withdraw ` Withdraw from the treasury to your balance. (Officer+) ## Transferring -Officers can transfer funds directly between faction -treasuries for trade deals or diplomacy. +Officers can transfer funds directly between faction treasuries for trade deals or diplomacy. `/f money transfer ` Send funds to another faction's treasury. (Officer+) diff --git a/src/main/resources/Server/Languages/en-US/help/economy/treasury.md b/src/main/resources/Server/Languages/en-US/help/economy/treasury.md index a451af2e..7a73d3bf 100644 --- a/src/main/resources/Server/Languages/en-US/help/economy/treasury.md +++ b/src/main/resources/Server/Languages/en-US/help/economy/treasury.md @@ -4,14 +4,11 @@ commands: balance --- # Faction Treasury -Every faction has a shared treasury that serves as -the faction's bank. Funds are used for upkeep costs, -territory maintenance, and faction operations. +Every faction has a shared treasury that serves as the faction's bank. Funds are used for upkeep costs, territory maintenance, and faction operations. ## Starting Balance -New factions start with **0** in their treasury. -Members must deposit funds to build up reserves. +New factions start with **0** in their treasury. Members must deposit funds to build up reserves. ## Who Can Manage @@ -22,8 +19,7 @@ Members must deposit funds to build up reserves. --- `/f balance` -Check your faction's current treasury balance. -Also available as `/f bal`. +Check your faction's current treasury balance. Also available as `/f bal`. >[!TIP] Contribute regularly to keep your faction funded. Territory upkeep costs can drain an empty treasury quickly. diff --git a/src/main/resources/Server/Languages/en-US/help/economy/upkeep.md b/src/main/resources/Server/Languages/en-US/help/economy/upkeep.md index 38eca444..b31e9b06 100644 --- a/src/main/resources/Server/Languages/en-US/help/economy/upkeep.md +++ b/src/main/resources/Server/Languages/en-US/help/economy/upkeep.md @@ -3,9 +3,7 @@ id: economy_upkeep --- # Territory Upkeep -Factions must pay ongoing upkeep to maintain their -claimed territory. This prevents land hoarding and -keeps the map dynamic. +Factions must pay ongoing upkeep to maintain their claimed territory. This prevents land hoarding and keeps the map dynamic. ## Upkeep Costs @@ -16,22 +14,17 @@ keeps the map dynamic. | Free chunks | 3 (no cost) | | Scaling mode | Flat rate | -Your first **3 chunks are free**. Beyond that, each -additional claimed chunk costs 2.0 per payment cycle. +Your first 3 chunks are free. Beyond that, each additional claimed chunk costs 2.0 per payment cycle. ## Auto-Pay -Auto-pay is **enabled by default**. The system -automatically deducts upkeep from your treasury at -each interval. No manual action needed. +Auto-pay is enabled by default. The system automatically deducts upkeep from your treasury at each interval. No manual action needed. --- ## Grace Period -If your treasury cannot cover upkeep, a **48-hour -grace period** begins. A warning is sent 6 hours -before claims start being lost. +If your treasury cannot cover upkeep, a 48-hour grace period begins. A warning is sent 6 hours before claims start being lost. >[!WARNING] If upkeep remains unpaid after the grace period, your faction loses 1 claim per cycle until costs are covered or all extra claims are gone. diff --git a/src/main/resources/Server/Languages/en-US/help/quick_ref/permissions.md b/src/main/resources/Server/Languages/en-US/help/quick_ref/permissions.md index 16df0ec0..90673685 100644 --- a/src/main/resources/Server/Languages/en-US/help/quick_ref/permissions.md +++ b/src/main/resources/Server/Languages/en-US/help/quick_ref/permissions.md @@ -3,8 +3,7 @@ id: quickref_permissions --- # Permissions -Key permission nodes for HyperFactions. All nodes -fall under the **hyperfactions** root namespace. +Key permission nodes for HyperFactions. All nodes fall under the **hyperfactions** root namespace. ## Core Permissions diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/configuration.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/configuration.md index 1e7a6bbf..6935ddd6 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/configuration.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/configuration.md @@ -3,8 +3,7 @@ id: admin_configuration --- # Sistema de Configuracion -HyperFactions usa un sistema de configuracion modular -en JSON con 11 archivos de configuracion. +HyperFactions usa un sistema de configuracion modular en JSON con 11 archivos de configuracion. ## Comandos de Configuracion del Administrador diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/world_settings.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/world_settings.md index 1e05b8bb..4700a582 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/world_settings.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_config/world_settings.md @@ -3,8 +3,7 @@ id: admin_world_settings --- # Ajustes por Mundo -HyperFactions soporta configuracion por mundo para -reclamaciones, PvP y comportamiento de proteccion. +HyperFactions soporta configuracion por mundo para reclamaciones, PvP y comportamiento de proteccion. ## Comandos de Mundo @@ -27,8 +26,7 @@ reclamaciones, PvP y comportamiento de proteccion. ## Lista Blanca / Lista Negra de Mundos -Controla que mundos permiten funciones de facciones -a traves del archivo de configuracion `worlds.json`: +Controla que mundos permiten funciones de facciones a traves del archivo de configuracion `worlds.json`: - **Modo lista blanca**: Solo los mundos listados permiten reclamar - **Modo lista negra**: Todos los mundos permiten reclamar excepto los listados diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/treasury_management.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/treasury_management.md index 2d574788..7936806d 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/treasury_management.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/treasury_management.md @@ -3,8 +3,7 @@ id: admin_treasury_management --- # Gestion de Tesoreria -Comandos de administracion para gestionar tesorerias -de facciones. Requiere el permiso `hyperfactions.admin.economy`. +Comandos de administracion para gestionar tesorerias de facciones. Requiere el permiso `hyperfactions.admin.economy`. ## Comandos de Tesoreria diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/upkeep_management.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/upkeep_management.md index b1235079..4f98e40f 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/upkeep_management.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_economy/upkeep_management.md @@ -3,19 +3,14 @@ id: admin_upkeep_management --- # Gestion de Mantenimiento -El mantenimiento de faccion cobra a las facciones -periodicamente basandose en su territorio y cantidad -de miembros. +El mantenimiento de faccion cobra a las facciones periodicamente basandose en su territorio y cantidad de miembros. ## Controles del Administrador -Los ajustes de mantenimiento se gestionan a traves del -archivo de configuracion de economia o la GUI de -configuracion del administrador. +Los ajustes de mantenimiento se gestionan a traves del archivo de configuracion de economia o la GUI de configuracion del administrador. `/f admin config` -Abre el editor de configuracion y navega a los ajustes -de economia para modificar valores de mantenimiento. +Abre el editor de configuracion y navega a los ajustes de economia para modificar valores de mantenimiento. ## Ajustes Predeterminados de Mantenimiento @@ -42,7 +37,6 @@ Usa `/f admin info ` para ver: ## Formula de Mantenimiento -**Mantenimiento total** = (chunks reclamados x costo por reclamacion) + -(cantidad de miembros x costo por miembro) +**Mantenimiento total** = (chunks reclamados x costo por reclamacion) + (cantidad de miembros x costo por miembro) >[!WARNING] Habilitar el mantenimiento en un servidor con facciones existentes puede causar bancarrotas inesperadas. Considera establecer un periodo de gracia o anunciar el cambio con anticipacion. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/disbanding.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/disbanding.md index 84d9395a..cd0f473e 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/disbanding.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/disbanding.md @@ -3,14 +3,12 @@ id: admin_disbanding --- # Disolucion Forzada -Los administradores pueden disolver cualquier faccion -por la fuerza, sin importar los deseos del lider. +Los administradores pueden disolver cualquier faccion por la fuerza, sin importar los deseos del lider. ## Comando `/f admin disband ` -Disuelve la faccion indicada por la fuerza. Aparecera -un mensaje de confirmacion antes de ejecutar la accion. +Disuelve la faccion indicada por la fuerza. Aparecera un mensaje de confirmacion antes de ejecutar la accion. **Permiso**: `hyperfactions.admin.disband` @@ -36,4 +34,4 @@ Cuando una faccion es disuelta: 3. Documenta la razon para los registros del servidor 4. Revisa `/f admin info ` antes de actuar ->[!TIP] Si el problema es con un miembro especifico, considera usar `/f admin modify` para transferir el liderazgo en lugar de disolver toda la faccion. +>[!TIP] Si el problema es con un miembro especifico, considera usar el panel de administracion de facciones para transferir el liderazgo en lugar de disolver toda la faccion. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/managing_factions.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/managing_factions.md index 1db1d254..a35db23d 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/managing_factions.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_factions/managing_factions.md @@ -3,20 +3,15 @@ id: admin_managing_factions --- # Gestion de Facciones -Los administradores pueden inspeccionar y modificar -cualquier faccion del servidor a traves del panel o comandos. +Los administradores pueden inspeccionar y modificar cualquier faccion del servidor a traves del panel o comandos. ## Explorar Facciones `/f admin factions` -Abre el explorador de facciones del administrador. Ve -todas las facciones con cantidad de miembros, niveles -de poder y territorio. +Abre el explorador de facciones del administrador. Ve todas las facciones con cantidad de miembros, niveles de poder y territorio. `/f admin info ` -Abre el panel de informacion del administrador para una -faccion especifica con detalles completos y opciones -de gestion. +Abre el panel de informacion del administrador para una faccion especifica con detalles completos y opciones de gestion. ## Modificar Configuracion de Facciones diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/backups.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/backups.md index 17ca3371..c3386ad0 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/backups.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/backups.md @@ -3,8 +3,7 @@ id: admin_backups --- # Sistema de Copias de Seguridad -HyperFactions incluye copias de seguridad automaticas y -manuales con rotacion GFS (Abuelo-Padre-Hijo). +HyperFactions incluye copias de seguridad automaticas y manuales con rotacion GFS (Abuelo-Padre-Hijo). ## Comandos de Copias de Seguridad diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/imports.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/imports.md index 0b18b94f..4e3ffb27 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/imports.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/imports.md @@ -3,8 +3,7 @@ id: admin_imports --- # Importacion de Datos -Importa datos de facciones desde otros plugins para -migrar tu servidor a HyperFactions. +Importa datos de facciones desde otros plugins para migrar tu servidor a HyperFactions. ## Comando de Importacion diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/updates.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/updates.md index e0ad055d..125a10d7 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/updates.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_maintenance/updates.md @@ -3,8 +3,7 @@ id: admin_updates --- # Verificacion de Actualizaciones -HyperFactions puede verificar nuevas versiones y -gestionar la dependencia HyperProtect-Mixin. +HyperFactions puede verificar nuevas versiones y gestionar la dependencia HyperProtect-Mixin. ## Comandos de Actualizacion @@ -26,12 +25,10 @@ gestionar la dependencia HyperProtect-Mixin. ## HyperProtect-Mixin -HyperProtect-Mixin es el mixin de proteccion recomendado -que habilita indicadores de zona avanzados (explosiones, -propagacion de fuego, conservar inventario, etc.). +HyperProtect-Mixin es el mixin de proteccion recomendado que habilita indicadores de zona avanzados (explosiones, propagacion de fuego, conservar inventario, etc.). - `/f admin update mixin` verifica la ultima version - y la descarga si hay una version mas nueva disponible +y la descarga si hay una version mas nueva disponible - La descarga automatica puede alternarse por servidor >[!TIP] Despues de descargar una nueva version del mixin, se requiere reiniciar el servidor para que los cambios tomen efecto. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/getting_started.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/getting_started.md index c396737e..7b976e90 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/getting_started.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/getting_started.md @@ -3,15 +3,12 @@ id: admin_getting_started --- # Primeros Pasos como Administrador -Bienvenido a la administracion de HyperFactions. Esta -guia cubre tus primeros pasos despues de instalar el plugin. +Bienvenido a la administracion de HyperFactions. Esta guia cubre tus primeros pasos despues de instalar el plugin. ## Abrir el Panel de Administracion `/f admin` -Abre la interfaz del panel de administracion con acceso -a todas las herramientas de gestion, editores de zonas -y configuracion del servidor. +Abre la interfaz del panel de administracion con acceso a todas las herramientas de gestion, editores de zonas y configuracion del servidor. >[!INFO] Necesitas el permiso **hyperfactions.admin.use** o estado de OP para acceder a los comandos de administracion. @@ -19,7 +16,7 @@ y configuracion del servidor. - **Con un plugin de permisos**: Otorga `hyperfactions.admin.use` - **Sin un plugin de permisos**: El jugador debe ser un - operador del servidor (`adminRequiresOp=true` por defecto) +operador del servidor (`adminRequiresOp=true` por defecto) ## Primeros Pasos Tras la Instalacion diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/permissions.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/permissions.md index 9ee5d729..88e522fe 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/permissions.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_overview/permissions.md @@ -3,8 +3,7 @@ id: admin_permissions --- # Permisos de Administracion -Todas las funciones de administracion estan protegidas -por nodos de permisos en el espacio `hyperfactions.admin`. +Todas las funciones de administracion estan protegidas por nodos de permisos en el espacio `hyperfactions.admin`. ## Nodos de Permisos @@ -24,10 +23,7 @@ por nodos de permisos en el espacio `hyperfactions.admin`. ## Comportamiento Alternativo -Cuando **no hay un plugin de permisos** instalado, los -permisos de administracion recurren al estado de operador -del servidor (OP). Esto se controla mediante `adminRequiresOp` -en la configuracion del servidor (por defecto: `true`). +Cuando **no hay un plugin de permisos** instalado, los permisos de administracion recurren al estado de operador del servidor (OP). Esto se controla mediante `adminRequiresOp` en la configuracion del servidor (por defecto: `true`). >[!NOTE] El comodin `hyperfactions.admin.*` otorga todos los permisos de administracion. Usa nodos individuales para un control granular sobre tu equipo de staff. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_commands.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_commands.md index 484379bc..fa74dc41 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_commands.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_commands.md @@ -3,8 +3,7 @@ id: admin_power_commands --- # Comandos de Administracion de Poder -Sobrescribir valores de poder de jugadores y facciones. -Todos los comandos requieren el permiso `hyperfactions.admin.power`. +Sobrescribir valores de poder de jugadores y facciones. Todos los comandos requieren el permiso `hyperfactions.admin.power`. ## Comandos de Poder de Jugador @@ -18,9 +17,7 @@ Todos los comandos requieren el permiso `hyperfactions.admin.power`. ## Como Afecta el Poder a las Facciones -El poder total de una faccion es la suma del poder -individual de todos sus miembros. Las reclamaciones de -territorio requieren poder total suficiente para mantenerse. +El poder total de una faccion es la suma del poder individual de todos sus miembros. Las reclamaciones de territorio requieren poder total suficiente para mantenerse. | Escenario | Efecto | |----------|--------| diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_overrides.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_overrides.md index b202aec5..3eb9002a 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_overrides.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_power/power_overrides.md @@ -3,8 +3,7 @@ id: admin_power_overrides --- # Sobrescrituras de Poder -Comandos especiales de poder que cambian como funciona -el poder para jugadores o facciones especificos. +Comandos especiales de poder que cambian como funciona el poder para jugadores o facciones especificos. ## Comandos de Sobrescritura @@ -18,17 +17,14 @@ el poder para jugadores o facciones especificos. ## Poder Maximo Personalizado `/f admin power setmax ` -Establece un limite maximo de poder personal para el -jugador, sobrescribiendo el valor predeterminado del servidor. +Establece un limite maximo de poder personal para el jugador, sobrescribiendo el valor predeterminado del servidor. >[!INFO] Establecer un maximo personalizado **no** cambia el poder actual. Solo cambia el techo. El jugador aun debe ganar poder hasta el nuevo limite. ## Modo Sin Perdida `/f admin power noloss ` -Alterna la inmunidad a perdida de poder por muerte. -Cuando esta habilitado, el jugador **no** perdera poder -al morir. +Alterna la inmunidad a perdida de poder por muerte. Cuando esta habilitado, el jugador **no** perdera poder al morir. Util para: - Periodos de proteccion para nuevos jugadores @@ -38,9 +34,7 @@ Util para: ## Modo Sin Deterioro `/f admin power nodecay ` -Alterna la inmunidad al deterioro de poder por desconexion. -Cuando esta habilitado, el poder del jugador **no** -disminuira mientras este desconectado. +Alterna la inmunidad al deterioro de poder por desconexion. Cuando esta habilitado, el poder del jugador **no** disminuira mientras este desconectado. Util para: - Jugadores en ausencia prolongada diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/all_commands.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/all_commands.md index 5faf6d91..b76b37b4 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/all_commands.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/all_commands.md @@ -3,8 +3,7 @@ id: admin_quickref_commands --- # Referencia de Comandos de Administracion -Lista completa de todos los subcomandos de `/f admin` -con sintaxis y permisos requeridos. +Lista completa de todos los subcomandos de `/f admin` con sintaxis y permisos requeridos. ## Panel y General @@ -14,7 +13,7 @@ con sintaxis y permisos requeridos. | `/f admin version` | admin.use | | `/f admin reload` | admin.reload | | `/f admin sync` | admin.use | -| `/f admin bypass` | admin.bypass.limits | +| `/f admin sentry` | admin.use | ## Gestion de Facciones diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/integrations.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/integrations.md index f42213b3..c99db3a2 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/integrations.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_reference/integrations.md @@ -3,10 +3,7 @@ id: admin_integrations --- # Integraciones de Plugins -HyperFactions se integra con varios plugins externos -a traves de dependencias suaves. Todas las integraciones -son opcionales y funcionan correctamente si no estan -disponibles. +HyperFactions se integra con varios plugins externos a traves de dependencias suaves. Todas las integraciones son opcionales y funcionan correctamente si no estan disponibles. ## Verificar Estado de Integraciones @@ -14,8 +11,7 @@ disponibles. Muestra la version actual y las integraciones detectadas. `/f admin integration` -Abre el panel de gestion de integraciones con el estado -detallado de cada plugin detectado. +Abre el panel de gestion de integraciones con el estado detallado de cada plugin detectado. ## Tabla de Integraciones diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_basics.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_basics.md index e62db056..e83a2a6f 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_basics.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_basics.md @@ -3,16 +3,14 @@ id: admin_zone_basics --- # Conceptos Basicos de Zonas -Las zonas son territorios controlados por el administrador -con reglas personalizadas que anulan la proteccion normal -de facciones. +Las zonas son territorios controlados por el administrador con reglas personalizadas que anulan la proteccion normal de facciones. ## Tipos de Zonas - **Zona Segura** -- Sin PvP, sin construccion, sin dano. - Ideal para areas de spawn y centros de comercio. +Ideal para areas de spawn y centros de comercio. - **Zona de Guerra** -- PvP siempre habilitado, sin construccion. - Ideal para arenas y areas de batalla disputadas. +Ideal para arenas y areas de batalla disputadas. ## Crear Zonas @@ -22,8 +20,7 @@ Crea una Zona Segura y reclama tu chunk actual. `/f admin warzone ` Crea una Zona de Guerra y reclama tu chunk actual. -Despues de la creacion, colocate en chunks adicionales -y usa `/f admin zone claim ` para expandir la zona. +Despues de la creacion, colocate en chunks adicionales y usa `/f admin zone claim ` para expandir la zona. ## Gestionar Chunks de Zonas @@ -39,8 +36,7 @@ Reclama un cuadrado de chunks alrededor de tu posicion. ## Eliminar Zonas `/f admin removezone ` -Elimina permanentemente la zona y libera todos sus -chunks reclamados. +Elimina permanentemente la zona y libera todos sus chunks reclamados. >[!WARNING] Eliminar una zona libera todos sus chunks instantaneamente. Esto no se puede deshacer sin una restauracion de copia de seguridad. diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_commands.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_commands.md index dc93989d..55ad031b 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_commands.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_commands.md @@ -3,8 +3,7 @@ id: admin_zone_commands --- # Referencia de Comandos de Zonas -Referencia completa de todos los comandos de gestion -de zonas. Todos requieren el permiso `hyperfactions.admin.zones`. +Referencia completa de todos los comandos de gestion de zonas. Todos requieren el permiso `hyperfactions.admin.zones`. ## Creacion Rapida diff --git a/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_flags.md b/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_flags.md index 645689b4..c4ebc988 100644 --- a/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_flags.md +++ b/src/main/resources/Server/Languages/es-ES/help/admin/admin_zones/zone_flags.md @@ -3,8 +3,7 @@ id: admin_zone_flags --- # Indicadores de Zona -Las zonas soportan **47 indicadores booleanos** en 10 categorias. -Cada indicador controla un comportamiento especifico dentro de la zona. +Las zonas soportan **47 indicadores booleanos** en 10 categorias. Cada indicador controla un comportamiento especifico dentro de la zona. ## Resumen de Categorias de Indicadores diff --git a/src/main/resources/Server/Languages/es-ES/help/combat/death.md b/src/main/resources/Server/Languages/es-ES/help/combat/death.md index 905820dd..12c1dc1f 100644 --- a/src/main/resources/Server/Languages/es-ES/help/combat/death.md +++ b/src/main/resources/Server/Languages/es-ES/help/combat/death.md @@ -4,14 +4,11 @@ commands: home, sethome, stuck --- # Muerte y Recuperacion -La muerte tiene consecuencias reales en facciones. Cada -muerte te cuesta poder personal, debilitando la capacidad -de tu faccion para mantener territorio. +La muerte tiene consecuencias reales en facciones. Cada muerte te cuesta poder personal, debilitando la capacidad de tu faccion para mantener territorio. ## Perdida de Poder -Cada muerte cuesta **-1.0 de poder** de tu total personal. -Esto reduce el poder combinado de la faccion. +Cada muerte cuesta **-1.0 de poder** de tu total personal. Esto reduce el poder combinado de la faccion. | Evento | Cambio de Poder | |--------|-----------------| @@ -29,16 +26,12 @@ Esto reduce el poder combinado de la faccion. ## Recuperacion -El poder se regenera a 0.1 por minuto mientras estas en linea. -Recuperar 1.0 de poder perdido toma aproximadamente 10 minutos. -Las muertes multiples se acumulan, asi que evita peleas repetidas. +El poder se regenera a 0.1 por minuto mientras estas en linea. Recuperar 1.0 de poder perdido toma aproximadamente 10 minutos. Las muertes multiples se acumulan, asi que evita peleas repetidas. --- ## Todos los Tipos de Muerte -La perdida de poder aplica a todas las muertes: PvP, muertes -por mobs, dano por caida, ahogamiento y cualquier otra causa. -No hay forma segura de morir. +La perdida de poder aplica a todas las muertes: PvP, muertes por mobs, dano por caida, ahogamiento y cualquier otra causa. No hay forma segura de morir. >[!TIP] Establece un hogar de faccion con /f sethome para que los miembros puedan reagruparse rapidamente despues de morir. diff --git a/src/main/resources/Server/Languages/es-ES/help/combat/protection.md b/src/main/resources/Server/Languages/es-ES/help/combat/protection.md index fb54af24..048fb06a 100644 --- a/src/main/resources/Server/Languages/es-ES/help/combat/protection.md +++ b/src/main/resources/Server/Languages/es-ES/help/combat/protection.md @@ -3,35 +3,25 @@ id: combat_protection --- # Proteccion de Territorio -El territorio reclamado proporciona varias capas de defensa -para las construcciones y recursos de tu faccion. +El territorio reclamado proporciona varias capas de defensa para las construcciones y recursos de tu faccion. ## Proteccion de Bloques -Solo los miembros de la faccion pueden colocar o destruir -bloques en tu territorio. Los enemigos y neutrales no pueden -modificar nada. +Solo los miembros de la faccion pueden colocar o destruir bloques en tu territorio. Los enemigos y neutrales no pueden modificar nada. ## Proteccion de Contenedores -Los cofres, barriles y otros contenedores estan asegurados. -Solo los miembros de tu faccion pueden abrir o interactuar -con el almacenamiento en chunks reclamados. +Los cofres, barriles y otros contenedores estan asegurados. Solo los miembros de tu faccion pueden abrir o interactuar con el almacenamiento en chunks reclamados. ## Alertas de Entrada -Cuando un no miembro entra en tu territorio reclamado, -los miembros de la faccion en linea reciben una notificacion -con el nombre y ubicacion del intruso. +Cuando un no miembro entra en tu territorio reclamado, los miembros de la faccion en linea reciben una notificacion con el nombre y ubicacion del intruso. --- ## Acceso de Aliados -Los aliados no pueden construir ni destruir bloques en tu -territorio por defecto. El dano entre aliados tambien esta -desactivado, por lo que los jugadores aliados no pueden -danarse entre si. +Los aliados no pueden construir ni destruir bloques en tu territorio por defecto. El dano entre aliados tambien esta desactivado, por lo que los jugadores aliados no pueden danarse entre si. >[!INFO] El territorio protege bloques, no jugadores. El PvP en tu propio territorio depende de la relacion del atacante con tu faccion. diff --git a/src/main/resources/Server/Languages/es-ES/help/combat/spawn_protection.md b/src/main/resources/Server/Languages/es-ES/help/combat/spawn_protection.md index 3eec9c11..590dbde7 100644 --- a/src/main/resources/Server/Languages/es-ES/help/combat/spawn_protection.md +++ b/src/main/resources/Server/Languages/es-ES/help/combat/spawn_protection.md @@ -3,8 +3,7 @@ id: combat_spawn_protection --- # Proteccion de Aparicion -Despues de reaparecer tras la muerte, recibes proteccion -temporal para prevenir el campeo de aparicion. +Despues de reaparecer tras la muerte, recibes proteccion temporal para prevenir el campeo de aparicion. ## Como Funciona @@ -19,9 +18,7 @@ La proteccion de aparicion termina antes si: - **Atacas** a otro jugador o entidad - **Te mueves** de tu posicion de aparicion -Esto previene el abuso. No puedes atacar a otros mientras -eres invulnerable. Una vez que realizas cualquier accion, -la proteccion cae y las reglas normales de combate aplican. +Esto previene el abuso. No puedes atacar a otros mientras eres invulnerable. Una vez que realizas cualquier accion, la proteccion cae y las reglas normales de combate aplican. --- diff --git a/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md b/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md index d414d649..b9dc61e5 100644 --- a/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md +++ b/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md @@ -3,8 +3,7 @@ id: combat_tagging --- # Etiqueta de Combate -Cuando atacas o eres atacado por otro jugador, -te conviertes en **etiquetado de combate** por 15 segundos. +Cuando atacas o eres atacado por otro jugador, te conviertes en **etiquetado de combate** por 15 segundos. ## Mientras Estas Etiquetado @@ -19,14 +18,10 @@ te conviertes en **etiquetado de combate** por 15 segundos. >[!WARNING] Desconectarte mientras estas etiquetado en combate mata a tu personaje y pierdes 1.0 de poder. -Tus objetos caen donde te desconectaste y los enemigos -pueden saquearlos. Siempre espera a que la etiqueta expire. +Tus objetos caen donde te desconectaste y los enemigos pueden saquearlos. Siempre espera a que la etiqueta expire. ## Como Funciona el Temporizador -El temporizador de etiqueta de combate aparece en pantalla -cuando entras en combate. Cada nuevo golpe lo reinicia a -15 segundos. Una vez que llega a cero, todas las restricciones -se levantan. +El temporizador de etiqueta de combate aparece en pantalla cuando entras en combate. Cada nuevo golpe lo reinicia a 15 segundos. Una vez que llega a cero, todas las restricciones se levantan. >[!TIP] Desvincularte y espera a que el temporizador termine si necesitas teletransportarte. diff --git a/src/main/resources/Server/Languages/es-ES/help/combat/zones.md b/src/main/resources/Server/Languages/es-ES/help/combat/zones.md index e19b5449..251de49f 100644 --- a/src/main/resources/Server/Languages/es-ES/help/combat/zones.md +++ b/src/main/resources/Server/Languages/es-ES/help/combat/zones.md @@ -3,20 +3,15 @@ id: combat_zones --- # Zonas Especiales -Los administradores pueden designar areas con reglas especiales -que anulan la proteccion normal de territorio de faccion. +Los administradores pueden designar areas con reglas especiales que anulan la proteccion normal de territorio de faccion. ## Zona Segura -Sin dano PvP, sin destruccion de bloques por no administradores. -Ideal para areas de aparicion, centros de comercio y areas de -preparacion de eventos. Los jugadores no pueden ser danados aqui. +Sin dano PvP, sin destruccion de bloques por no administradores. Ideal para areas de aparicion, centros de comercio y areas de preparacion de eventos. Los jugadores no pueden ser danados aqui. ## Zona de Guerra -PvP siempre habilitado. No aplica proteccion de bloques. -Areas de batalla abierta donde todo vale. No recibes -beneficios de proteccion de territorio en una Zona de Guerra. +PvP siempre habilitado. No aplica proteccion de bloques. Areas de batalla abierta donde todo vale. No recibes beneficios de proteccion de territorio en una Zona de Guerra. --- diff --git a/src/main/resources/Server/Languages/es-ES/help/economy/commands.md b/src/main/resources/Server/Languages/es-ES/help/economy/commands.md index 034b72de..7427681d 100644 --- a/src/main/resources/Server/Languages/es-ES/help/economy/commands.md +++ b/src/main/resources/Server/Languages/es-ES/help/economy/commands.md @@ -22,8 +22,6 @@ Referencia rapida para todos los comandos de economia de faccion. ## Permisos -Todos los comandos de economia requieren nodos de permiso -`hyperfactions.economy.*`. Retirar y transferir estan -adicionalmente restringidos por rol de faccion (Oficial o superior). +Todos los comandos de economia requieren nodos de permiso `hyperfactions.economy.*`. Retirar y transferir estan adicionalmente restringidos por rol de faccion (Oficial o superior). >[!TIP] Usa /f money log para revisar depositos, retiros y transferencias recientes con marcas de tiempo. diff --git a/src/main/resources/Server/Languages/es-ES/help/economy/funds.md b/src/main/resources/Server/Languages/es-ES/help/economy/funds.md index e6b09d86..030a3a03 100644 --- a/src/main/resources/Server/Languages/es-ES/help/economy/funds.md +++ b/src/main/resources/Server/Languages/es-ES/help/economy/funds.md @@ -4,29 +4,25 @@ commands: deposit, withdraw --- # Gestionar Fondos -Los miembros de la faccion trabajan juntos para mantener la -tesoreria financiada a traves de depositos, retiros y transferencias. +Los miembros de la faccion trabajan juntos para mantener la tesoreria financiada a traves de depositos, retiros y transferencias. ## Depositar -Cualquier miembro puede depositar fondos personales en la -tesoreria de la faccion. +Cualquier miembro puede depositar fondos personales en la tesoreria de la faccion. `/f deposit ` Deposita de tu saldo personal a la tesoreria. ## Retirar -Los Oficiales y el Lider pueden retirar fondos de vuelta a -su saldo personal. +Los Oficiales y el Lider pueden retirar fondos de vuelta a su saldo personal. `/f withdraw ` Retira de la tesoreria a tu saldo. (Oficial+) ## Transferir -Los Oficiales pueden transferir fondos directamente entre -tesorerias de facciones para acuerdos comerciales o diplomacia. +Los Oficiales pueden transferir fondos directamente entre tesorerias de facciones para acuerdos comerciales o diplomacia. `/f money transfer ` Envia fondos a la tesoreria de otra faccion. (Oficial+) diff --git a/src/main/resources/Server/Languages/es-ES/help/economy/treasury.md b/src/main/resources/Server/Languages/es-ES/help/economy/treasury.md index e8970219..e298ec4b 100644 --- a/src/main/resources/Server/Languages/es-ES/help/economy/treasury.md +++ b/src/main/resources/Server/Languages/es-ES/help/economy/treasury.md @@ -4,14 +4,11 @@ commands: balance --- # Tesoreria de Faccion -Cada faccion tiene una tesoreria compartida que sirve como -el banco de la faccion. Los fondos se usan para costos de -mantenimiento, mantenimiento de territorio y operaciones de faccion. +Cada faccion tiene una tesoreria compartida que sirve como el banco de la faccion. Los fondos se usan para costos de mantenimiento, mantenimiento de territorio y operaciones de faccion. ## Saldo Inicial -Las facciones nuevas comienzan con **0** en su tesoreria. -Los miembros deben depositar fondos para acumular reservas. +Las facciones nuevas comienzan con **0** en su tesoreria. Los miembros deben depositar fondos para acumular reservas. ## Quien Puede Gestionar @@ -22,8 +19,7 @@ Los miembros deben depositar fondos para acumular reservas. --- `/f balance` -Consulta el saldo actual de la tesoreria de tu faccion. -Tambien disponible como `/f bal`. +Consulta el saldo actual de la tesoreria de tu faccion. Tambien disponible como `/f bal`. >[!TIP] Contribuye regularmente para mantener tu faccion financiada. Los costos de mantenimiento de territorio pueden vaciar una tesoreria rapidamente. diff --git a/src/main/resources/Server/Languages/es-ES/help/economy/upkeep.md b/src/main/resources/Server/Languages/es-ES/help/economy/upkeep.md index baef7122..efd1909f 100644 --- a/src/main/resources/Server/Languages/es-ES/help/economy/upkeep.md +++ b/src/main/resources/Server/Languages/es-ES/help/economy/upkeep.md @@ -3,9 +3,7 @@ id: economy_upkeep --- # Mantenimiento de Territorio -Las facciones deben pagar un mantenimiento continuo -para conservar su territorio reclamado. Esto evita -el acaparamiento de tierras y mantiene el mapa activo. +Las facciones deben pagar un mantenimiento continuo para conservar su territorio reclamado. Esto evita el acaparamiento de tierras y mantiene el mapa activo. ## Costos de Mantenimiento @@ -16,25 +14,17 @@ el acaparamiento de tierras y mantiene el mapa activo. | Chunks gratis | 3 (sin costo) | | Modo de escalado | Tarifa plana | -Tus primeros **3 chunks son gratis**. Mas alla de -eso, cada chunk adicional reclamado cuesta 2.0 por -ciclo de pago. +Tus primeros 3 chunks son gratis. Mas alla de eso, cada chunk adicional reclamado cuesta 2.0 por ciclo de pago. ## Pago Automatico -El pago automatico esta **habilitado por defecto**. -El sistema deduce automaticamente el mantenimiento de -tu tesoreria en cada intervalo. No requiere accion -manual. +El pago automatico esta habilitado por defecto. El sistema deduce automaticamente el mantenimiento de tu tesoreria en cada intervalo. No requiere accion manual. --- ## Periodo de Gracia -Si tu tesoreria no puede cubrir el mantenimiento, -comienza un **periodo de gracia de 48 horas**. Se -envia una advertencia 6 horas antes de que se -empiecen a perder reclamos. +Si tu tesoreria no puede cubrir el mantenimiento, comienza un periodo de gracia de 48 horas. Se envia una advertencia 6 horas antes de que se empiecen a perder reclamos. >[!WARNING] Si el mantenimiento sigue sin pagarse despues del periodo de gracia, tu faccion pierde 1 reclamo por ciclo hasta que los costos se cubran o todos los reclamos extra desaparezcan. diff --git a/src/main/resources/Server/Languages/es-ES/help/quick_ref/permissions.md b/src/main/resources/Server/Languages/es-ES/help/quick_ref/permissions.md index af11139c..220edcf7 100644 --- a/src/main/resources/Server/Languages/es-ES/help/quick_ref/permissions.md +++ b/src/main/resources/Server/Languages/es-ES/help/quick_ref/permissions.md @@ -3,9 +3,7 @@ id: quickref_permissions --- # Permisos -Nodos de permisos clave para HyperFactions. Todos -los nodos estan bajo el espacio de nombres raiz -**hyperfactions**. +Nodos de permisos clave para HyperFactions. Todos los nodos estan bajo el espacio de nombres raiz **hyperfactions**. ## Permisos Principales From 4492fba93df42719420845d028c643b74b93d28e Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Tue, 10 Mar 2026 17:25:50 -0700 Subject: [PATCH 44/55] feat: table rendering with inline rows, rich text, and help window resize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Switch table rendering from .ui templates to appendInline with explicit calculated heights (fixes content-driven height not working with TextSpans) - Support 2/3/4 column tables with dynamic width calculation and borders - Add HelpRichText parser for inline markdown (bold, italic, code, colors) - Increase help window size ~15% (750x650 → 863x748) for both player/admin - Fix Y/N → Yes/No in roles permission table - Use 2px row borders for visibility on all table rows - Remove stripped inline markers from lang generator (rich text handles them) --- .../build/HelpLangGenerator.java | 2 +- .../gui/admin/page/AdminHelpPage.java | 131 +++++++++----- .../hyperfactions/gui/help/HelpRichText.java | 114 ++++++++++++ .../gui/help/page/HelpMainPage.java | 169 ++++++++++-------- .../Custom/HyperFactions/admin/admin_help.ui | 2 +- .../UI/Custom/HyperFactions/help/help_main.ui | 4 +- .../HyperFactions/help/help_table_cell.ui | 8 +- .../HyperFactions/help/help_table_header.ui | 42 +++-- .../help/help_table_header_cell.ui | 8 +- .../HyperFactions/help/help_table_row.ui | 33 +++- .../Languages/en-US/help/combat/death.md | 4 +- .../en-US/help/combat/spawn_protection.md | 8 +- .../Languages/en-US/help/combat/tagging.md | 6 +- .../en-US/help/diplomacy/alliances.md | 16 +- .../Languages/en-US/help/diplomacy/enemies.md | 18 +- .../en-US/help/diplomacy/relations.md | 22 +-- .../Languages/en-US/help/economy/commands.md | 8 +- .../Languages/en-US/help/economy/treasury.md | 10 +- .../Languages/en-US/help/economy/upkeep.md | 2 + .../en-US/help/power_land/claiming.md | 18 +- .../en-US/help/power_land/losing_territory.md | 28 +-- .../en-US/help/power_land/territory_map.md | 16 +- .../help/power_land/understanding_power.md | 20 ++- .../en-US/help/quick_ref/permissions.md | 69 ------- .../en-US/help/welcome/getting_started.md | 20 +-- .../en-US/help/welcome/what_are_factions.md | 12 +- .../en-US/help/your_faction/creating.md | 16 +- .../en-US/help/your_faction/joining.md | 26 +-- .../en-US/help/your_faction/managing.md | 16 +- .../en-US/help/your_faction/roles.md | 48 ++--- .../es-ES/help/quick_ref/permissions.md | 69 ------- 31 files changed, 528 insertions(+), 437 deletions(-) create mode 100644 src/main/java/com/hyperfactions/gui/help/HelpRichText.java delete mode 100644 src/main/resources/Server/Languages/en-US/help/quick_ref/permissions.md delete mode 100644 src/main/resources/Server/Languages/es-ES/help/quick_ref/permissions.md diff --git a/src/main/java/com/hyperfactions/build/HelpLangGenerator.java b/src/main/java/com/hyperfactions/build/HelpLangGenerator.java index 6b6ecd0b..2c101cd4 100644 --- a/src/main/java/com/hyperfactions/build/HelpLangGenerator.java +++ b/src/main/java/com/hyperfactions/build/HelpLangGenerator.java @@ -501,7 +501,7 @@ private static void writeLangFile(Path outputDir, String locale, List top } } else if (entry.key() != null) { String text = topic.entryTexts().get(i); - sb.append(entry.key()).append(" = ").append(stripInlineMarkers(text)).append("\n"); + sb.append(entry.key()).append(" = ").append(text).append("\n"); } } 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 7bfb80d7..0ac0c061 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminHelpPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminHelpPage.java @@ -110,30 +110,30 @@ private void buildTopicCards(UICommandBuilder cmd) { for (HelpTopic topic : topics) { cmd.append("#ContentList", UIPaths.HELP_TOPIC_CARD); String cardPrefix = "#ContentList[" + cardIndex + "]"; - cmd.set(cardPrefix + " #Title.Text", topic.title(playerRef)); int lineIndex = 0; for (HelpEntry entry : topic.entries()) { String linesContainer = cardPrefix + " #Lines"; + // Table entries: inline rows with calculated height and variable columns if (entry.type() == HelpEntry.EntryType.TABLE_HEADER || entry.type() == HelpEntry.EntryType.TABLE_ROW) { boolean isHeader = entry.type() == HelpEntry.EntryType.TABLE_HEADER; - String rowTemplate = isHeader ? UIPaths.HELP_TABLE_HEADER : UIPaths.HELP_TABLE_ROW; - String cellTemplate = isHeader ? UIPaths.HELP_TABLE_HEADER_CELL : UIPaths.HELP_TABLE_CELL; + String[] columnKeys = entry.columnKeys(); + int numCols = columnKeys.length; - cmd.append(linesContainer, rowTemplate); + String[] cellTexts = new String[numCols]; + for (int col = 0; col < numCols; col++) { + cellTexts[col] = HelpMessages.get(playerRef, columnKeys[col]); + } + int rowHeight = estimateTableRowHeight(cellTexts, numCols); + + cmd.appendInline(linesContainer, buildTableRowInline(rowHeight, numCols, isHeader)); String rowSelector = linesContainer + "[" + lineIndex + "]"; - String colsContainer = rowSelector + " #Cols"; - String[] columnKeys = entry.columnKeys(); - for (int col = 0; col < columnKeys.length; col++) { - cmd.append(colsContainer, cellTemplate); - String cellSelector = colsContainer + "[" + col + "]"; - String cellText = HelpMessages.get(playerRef, columnKeys[col]); - applyCellFormatting(cmd, cellSelector, cellText, entry.color()); + for (int col = 0; col < numCols; col++) { + applyCellText(cmd, rowSelector, col, cellTexts[col], entry.color()); } - lineIndex++; continue; } @@ -149,13 +149,12 @@ private void buildTopicCards(UICommandBuilder cmd) { text = "\u2022 " + text; } - cmd.set(selector + " #Text.Text", text); + java.awt.Color baseColor = entry.color() != null + ? java.awt.Color.decode(entry.color()) : null; + cmd.set(selector + " #Text.TextSpans", HelpRichText.parse(text, baseColor)); - if (entry.color() != null) { - cmd.set(selector + " #Text.Style.TextColor", entry.color()); - if (entry.type() == HelpEntry.EntryType.CALLOUT) { - cmd.set(selector + " #AccentBar.Background.Color", entry.color()); - } + if (entry.color() != null && entry.type() == HelpEntry.EntryType.CALLOUT) { + cmd.set(selector + " #AccentBar.Background.Color", entry.color()); } } lineIndex++; @@ -164,35 +163,88 @@ private void buildTopicCards(UICommandBuilder cmd) { } } - private void applyCellFormatting(UICommandBuilder cmd, String cellSelector, - String text, @Nullable String rowColor) { + private void applyCellText(UICommandBuilder cmd, String rowSelector, + int col, String text, @Nullable String rowColor) { String displayText = text; - String cellColor = rowColor; - boolean bold = false; - boolean italic = false; + java.awt.Color cellColor = rowColor != null ? java.awt.Color.decode(rowColor) : null; Matcher hexMatcher = CELL_HEX_COLOR.matcher(displayText); if (hexMatcher.matches()) { - cellColor = "#" + hexMatcher.group(1); + cellColor = java.awt.Color.decode("#" + hexMatcher.group(1)); displayText = hexMatcher.group(2); } - if (displayText.startsWith("**") && displayText.endsWith("**") && displayText.length() > 4) { - displayText = displayText.substring(2, displayText.length() - 2); - bold = true; - } else if (displayText.startsWith("`") && displayText.endsWith("`") && displayText.length() > 2) { - displayText = displayText.substring(1, displayText.length() - 1); - bold = true; - if (cellColor == null) cellColor = "#FFFF55"; - } else if (displayText.startsWith("*") && displayText.endsWith("*") && displayText.length() > 2) { - displayText = displayText.substring(1, displayText.length() - 1); - italic = true; + cmd.set(rowSelector + " #Col" + col + ".TextSpans", HelpRichText.parse(displayText, cellColor)); + } + + private static int[] getColumnPixelWidths(int numCols) { + return switch (numCols) { + case 3 -> new int[]{170, 170, 280}; + case 4 -> new int[]{170, 85, 85, 270}; + default -> new int[]{217, 400}; + }; + } + + private static int[] getColumnFixedWidths(int numCols) { + return switch (numCols) { + case 3 -> new int[]{170, 170}; + case 4 -> new int[]{170, 85, 85}; + default -> new int[]{217}; + }; + } + + private static int estimateTableRowHeight(String[] cellTexts, int numCols) { + int[] pixelWidths = getColumnPixelWidths(numCols); + int maxLines = 1; + for (int col = 0; col < Math.min(cellTexts.length, numCols); col++) { + int charsPerLine = Math.max(6, pixelWidths[col] / 6); + int lines = Math.max(1, (int) Math.ceil((double) cellTexts[col].length() / charsPerLine)); + maxLines = Math.max(maxLines, lines); + } + return Math.max(20, 4 + (maxLines * 13)); + } + + private static String buildTableRowInline(int height, int numCols, boolean isHeader) { + String bg = isHeader ? "#141a28" : "#0f1520"; + String tc = isHeader ? "#DDDDDD" : "#CCCCCC"; + String bd = isHeader ? ", RenderBold: true" : ""; + String bh = "2"; + int[] widths = getColumnFixedWidths(numCols); + + StringBuilder sb = new StringBuilder(); + sb.append("Group { Anchor: (Height: ").append(height).append("); Background: (Color: ").append(bg).append("); "); + + int pos = 2; + for (int col = 0; col < numCols; col++) { + boolean last = (col == numCols - 1); + String style = "Style: (FontSize: 10, TextColor: " + tc + bd + ", Wrap: true, VerticalAlignment: Center)"; + + if (last) { + sb.append("Label #Col").append(col).append(" { Text: \"\"; ").append(style).append("; "); + sb.append("Padding: (Left: 10, Right: 8); "); + sb.append("Anchor: (Left: ").append(pos).append(", Right: 2, Top: 0, Bottom: 0); } "); + } else { + sb.append("Group { Anchor: (Left: ").append(pos).append(", Width: ").append(widths[col]); + sb.append(", Top: 0, Bottom: 0); "); + sb.append("Label #Col").append(col).append(" { Text: \"\"; ").append(style).append("; "); + sb.append("Padding: (Left: 10, Right: 6); "); + sb.append("Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); } } "); + + int sepPos = pos + widths[col] + 1; + sb.append("Group { Anchor: (Width: 1, Left: ").append(sepPos); + sb.append(", Top: 0, Bottom: 0); Background: (Color: #2a3a4a); } "); + pos = sepPos + 2; + } } - cmd.set(cellSelector + " #CellText.Text", displayText); - if (bold) cmd.set(cellSelector + " #CellText.Style.RenderBold", true); - if (italic) cmd.set(cellSelector + " #CellText.Style.RenderItalics", true); - if (cellColor != null) cmd.set(cellSelector + " #CellText.Style.TextColor", cellColor); + if (isHeader) { + sb.append("Group { Anchor: (Height: 1, Top: 0, Left: 0, Right: 0); Background: (Color: #2a3a4a); } "); + } + sb.append("Group { Anchor: (Height: ").append(bh).append(", Bottom: 0, Left: 0, Right: 0); Background: (Color: #2a3a4a); } "); + sb.append("Group { Anchor: (Width: 1, Left: 0, Top: 0, Bottom: 0); Background: (Color: #2a3a4a); } "); + sb.append("Group { Anchor: (Width: 1, Right: 0, Top: 0, Bottom: 0); Background: (Color: #2a3a4a); } "); + sb.append("}"); + return sb.toString(); } private String getTemplateForType(HelpEntry.EntryType type) { @@ -206,8 +258,7 @@ private String getTemplateForType(HelpEntry.EntryType type) { case LIST -> UIPaths.HELP_LINE_LIST; case SEPARATOR -> UIPaths.HELP_SEPARATOR; case CALLOUT -> UIPaths.HELP_LINE_CALLOUT; - case TABLE_HEADER -> UIPaths.HELP_TABLE_HEADER; - case TABLE_ROW -> UIPaths.HELP_TABLE_ROW; + case TABLE_HEADER, TABLE_ROW -> UIPaths.HELP_LINE_TEXT; // fallback, not reached }; } diff --git a/src/main/java/com/hyperfactions/gui/help/HelpRichText.java b/src/main/java/com/hyperfactions/gui/help/HelpRichText.java new file mode 100644 index 00000000..6d3b9fde --- /dev/null +++ b/src/main/java/com/hyperfactions/gui/help/HelpRichText.java @@ -0,0 +1,114 @@ +package com.hyperfactions.gui.help; + +import com.hypixel.hytale.server.core.Message; +import java.awt.Color; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Parses inline markdown markers within help text and builds a {@link Message} + * with proper formatting (bold, italic, colored command references). + * + *

Supported inline markers: + *

    + *
  • {@code **bold text**} → bold
  • + *
  • {@code `command`} → yellow bold (command style)
  • + *
  • {@code *italic text*} → italic
  • + *
  • {@code --} → em-dash (—)
  • + *
+ * + *

Used by both {@code HelpMainPage} and {@code AdminHelpPage} to render + * rich text within Labels via the {@code TextSpans} property. + */ +public final class HelpRichText { + + /** Command color: yellow (#FFFF55) matching the COMMAND entry style. */ + private static final Color CMD_COLOR = new Color(0xFF, 0xFF, 0x55); + + /** + * Tokenizer pattern that matches inline markers in order of priority: + *

    + *
  1. {@code **...** } bold (non-greedy)
  2. + *
  3. {@code `...`} code/command (non-greedy)
  4. + *
  5. {@code *...*} italic (not preceded/followed by *)
  6. + *
+ */ + private static final Pattern INLINE_PATTERN = Pattern.compile( + "\\*\\*(.+?)\\*\\*" // Group 1: bold + + "|`(.+?)`" // Group 2: code + + "|(? parts = new ArrayList<>(); + int lastEnd = 0; + + while (matcher.find()) { + // Add any plain text before this match + if (matcher.start() > lastEnd) { + String plain = text.substring(lastEnd, matcher.start()); + Message plainMsg = Message.raw(plain); + if (baseColor != null) plainMsg = plainMsg.color(baseColor); + parts.add(plainMsg); + } + + if (matcher.group(1) != null) { + // Bold: **text** + Message boldMsg = Message.raw(matcher.group(1)).bold(true); + if (baseColor != null) boldMsg = boldMsg.color(baseColor); + parts.add(boldMsg); + } else if (matcher.group(2) != null) { + // Code/Command: `text` → yellow bold + parts.add(Message.raw(matcher.group(2)).color(CMD_COLOR).bold(true)); + } else if (matcher.group(3) != null) { + // Italic: *text* + Message italicMsg = Message.raw(matcher.group(3)).italic(true); + if (baseColor != null) italicMsg = italicMsg.color(baseColor); + parts.add(italicMsg); + } + + lastEnd = matcher.end(); + } + + // Add remaining plain text after last match + if (lastEnd < text.length()) { + String remaining = text.substring(lastEnd); + Message remainMsg = Message.raw(remaining); + if (baseColor != null) remainMsg = remainMsg.color(baseColor); + parts.add(remainMsg); + } + + // If no matches found, return plain text + if (parts.isEmpty()) { + Message plainMsg = Message.raw(text); + if (baseColor != null) plainMsg = plainMsg.color(baseColor); + return plainMsg; + } + + return Message.join(parts.toArray(new Message[0])); + } + + /** + * Convenience overload using default label color. + */ + public static @NotNull Message parse(@NotNull String text) { + return parse(text, null); + } +} 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 5580e9e8..1364650e 100644 --- a/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java +++ b/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java @@ -56,14 +56,6 @@ public class HelpMainPage extends InteractiveCustomUIPage { private static final String TPL_LINE_CALLOUT = UIPaths.HELP_LINE_CALLOUT; - private static final String TPL_TABLE_HEADER = UIPaths.HELP_TABLE_HEADER; - - private static final String TPL_TABLE_ROW = UIPaths.HELP_TABLE_ROW; - - private static final String TPL_TABLE_HEADER_CELL = UIPaths.HELP_TABLE_HEADER_CELL; - - private static final String TPL_TABLE_CELL = UIPaths.HELP_TABLE_CELL; - private final PlayerRef playerRef; private final GuiManager guiManager; @@ -163,6 +155,8 @@ private void setupCategoryButtons(UICommandBuilder cmd, UIEventBuilder events) { } } + private static final Pattern CELL_HEX_COLOR = Pattern.compile("^\\[#([0-9A-Fa-f]{6})]\\s*(.+)$"); + /** * Builds topic cards in the content area for the selected category. */ @@ -171,63 +165,54 @@ private void buildTopicCards(UICommandBuilder cmd) { int cardIndex = 0; for (HelpTopic topic : topics) { - // Append card template cmd.append("#ContentList", TPL_TOPIC_CARD); String cardPrefix = "#ContentList[" + cardIndex + "]"; - - // Set card title cmd.set(cardPrefix + " #Title.Text", topic.title(playerRef)); - // Append lines into card's #Lines container int lineIndex = 0; for (HelpEntry entry : topic.entries()) { String linesContainer = cardPrefix + " #Lines"; - // Table entries need special rendering + // Table entries: inline rows with calculated height and variable columns if (entry.type() == HelpEntry.EntryType.TABLE_HEADER || entry.type() == HelpEntry.EntryType.TABLE_ROW) { boolean isHeader = entry.type() == HelpEntry.EntryType.TABLE_HEADER; - String rowTemplate = isHeader ? TPL_TABLE_HEADER : TPL_TABLE_ROW; - String cellTemplate = isHeader ? TPL_TABLE_HEADER_CELL : TPL_TABLE_CELL; + String[] columnKeys = entry.columnKeys(); + int numCols = columnKeys.length; - cmd.append(linesContainer, rowTemplate); + // Resolve all cell texts for height estimation + String[] cellTexts = new String[numCols]; + for (int col = 0; col < numCols; col++) { + cellTexts[col] = HelpMessages.get(playerRef, columnKeys[col]); + } + int rowHeight = estimateTableRowHeight(cellTexts, numCols); + + cmd.appendInline(linesContainer, buildTableRowInline(rowHeight, numCols, isHeader)); String rowSelector = linesContainer + "[" + lineIndex + "]"; - String colsContainer = rowSelector + " #Cols"; - String[] columnKeys = entry.columnKeys(); - for (int col = 0; col < columnKeys.length; col++) { - cmd.append(colsContainer, cellTemplate); - String cellSelector = colsContainer + "[" + col + "]"; - String cellText = HelpMessages.get(playerRef, columnKeys[col]); - applyCellFormatting(cmd, cellSelector, cellText, entry.color()); + for (int col = 0; col < numCols; col++) { + applyCellText(cmd, rowSelector, col, cellTexts[col], entry.color()); } - lineIndex++; continue; } String template = getTemplateForType(entry.type()); cmd.append(linesContainer, template); - String selector = linesContainer + "[" + lineIndex + "]"; if (entry.type() != HelpEntry.EntryType.SPACER && entry.type() != HelpEntry.EntryType.SEPARATOR) { String text = entry.text(playerRef); - // Add bullet prefix for unordered list items if (entry.type() == HelpEntry.EntryType.LIST && !text.matches("^\\d+\\.\\s.*")) { text = "\u2022 " + text; } - cmd.set(selector + " #Text.Text", text); - - // Apply color override if present - if (entry.color() != null) { - cmd.set(selector + " #Text.Style.TextColor", entry.color()); + java.awt.Color baseColor = entry.color() != null + ? java.awt.Color.decode(entry.color()) : null; + cmd.set(selector + " #Text.TextSpans", HelpRichText.parse(text, baseColor)); - // For callouts, also color the accent bar - if (entry.type() == HelpEntry.EntryType.CALLOUT) { - cmd.set(selector + " #AccentBar.Background.Color", entry.color()); - } + if (entry.color() != null && entry.type() == HelpEntry.EntryType.CALLOUT) { + cmd.set(selector + " #AccentBar.Background.Color", entry.color()); } } lineIndex++; @@ -237,57 +222,92 @@ private void buildTopicCards(UICommandBuilder cmd) { } /** - * Returns the appropriate template path for an entry type. - */ - private static final Pattern CELL_HEX_COLOR = Pattern.compile("^\\[#([0-9A-Fa-f]{6})]\\s*(.+)$"); - - /** - * Applies inline formatting to a table cell. - * Supports: **bold**, *italic*, `command`, [#RRGGBB] color prefix. + * Sets text on a table cell Label (#Col0 or #Col1), handling [#RRGGBB] color prefix. */ - private void applyCellFormatting(UICommandBuilder cmd, String cellSelector, - String text, @Nullable String rowColor) { + private void applyCellText(UICommandBuilder cmd, String rowSelector, + int col, String text, @Nullable String rowColor) { String displayText = text; - String cellColor = rowColor; - boolean bold = false; - boolean italic = false; + java.awt.Color cellColor = rowColor != null ? java.awt.Color.decode(rowColor) : null; - // Check for inline hex color: [#RRGGBB] text Matcher hexMatcher = CELL_HEX_COLOR.matcher(displayText); if (hexMatcher.matches()) { - cellColor = "#" + hexMatcher.group(1); + cellColor = java.awt.Color.decode("#" + hexMatcher.group(1)); displayText = hexMatcher.group(2); } - // Check for bold: **text** - if (displayText.startsWith("**") && displayText.endsWith("**") && displayText.length() > 4) { - displayText = displayText.substring(2, displayText.length() - 2); - bold = true; + cmd.set(rowSelector + " #Col" + col + ".TextSpans", HelpRichText.parse(displayText, cellColor)); + } + + /** Column pixel widths for height estimation (includes last column). */ + private static int[] getColumnPixelWidths(int numCols) { + return switch (numCols) { + case 3 -> new int[]{170, 170, 280}; + case 4 -> new int[]{170, 85, 85, 270}; + default -> new int[]{217, 400}; + }; + } + + /** Fixed widths for non-last columns (last column uses Right anchor). */ + private static int[] getColumnFixedWidths(int numCols) { + return switch (numCols) { + case 3 -> new int[]{170, 170}; + case 4 -> new int[]{170, 85, 85}; + default -> new int[]{217}; + }; + } + + private static int estimateTableRowHeight(String[] cellTexts, int numCols) { + int[] pixelWidths = getColumnPixelWidths(numCols); + int maxLines = 1; + for (int col = 0; col < Math.min(cellTexts.length, numCols); col++) { + int charsPerLine = Math.max(6, pixelWidths[col] / 6); + int lines = Math.max(1, (int) Math.ceil((double) cellTexts[col].length() / charsPerLine)); + maxLines = Math.max(maxLines, lines); } - // Check for command: `text` - else if (displayText.startsWith("`") && displayText.endsWith("`") && displayText.length() > 2) { - displayText = displayText.substring(1, displayText.length() - 1); - bold = true; - if (cellColor == null) { - cellColor = "#FFFF55"; + return Math.max(20, 4 + (maxLines * 13)); + } + + private static String buildTableRowInline(int height, int numCols, boolean isHeader) { + String bg = isHeader ? "#141a28" : "#0f1520"; + String tc = isHeader ? "#DDDDDD" : "#CCCCCC"; + String bd = isHeader ? ", RenderBold: true" : ""; + String bh = "2"; + int[] widths = getColumnFixedWidths(numCols); + + StringBuilder sb = new StringBuilder(); + sb.append("Group { Anchor: (Height: ").append(height).append("); Background: (Color: ").append(bg).append("); "); + + int pos = 2; + for (int col = 0; col < numCols; col++) { + boolean last = (col == numCols - 1); + String style = "Style: (FontSize: 10, TextColor: " + tc + bd + ", Wrap: true, VerticalAlignment: Center)"; + + if (last) { + sb.append("Label #Col").append(col).append(" { Text: \"\"; ").append(style).append("; "); + sb.append("Padding: (Left: 10, Right: 8); "); + sb.append("Anchor: (Left: ").append(pos).append(", Right: 2, Top: 0, Bottom: 0); } "); + } else { + sb.append("Group { Anchor: (Left: ").append(pos).append(", Width: ").append(widths[col]); + sb.append(", Top: 0, Bottom: 0); "); + sb.append("Label #Col").append(col).append(" { Text: \"\"; ").append(style).append("; "); + sb.append("Padding: (Left: 10, Right: 6); "); + sb.append("Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); } } "); + + int sepPos = pos + widths[col] + 1; + sb.append("Group { Anchor: (Width: 1, Left: ").append(sepPos); + sb.append(", Top: 0, Bottom: 0); Background: (Color: #2a3a4a); } "); + pos = sepPos + 2; } } - // Check for italic: *text* - else if (displayText.startsWith("*") && displayText.endsWith("*") && displayText.length() > 2) { - displayText = displayText.substring(1, displayText.length() - 1); - italic = true; - } - cmd.set(cellSelector + " #CellText.Text", displayText); - if (bold) { - cmd.set(cellSelector + " #CellText.Style.RenderBold", true); - } - if (italic) { - cmd.set(cellSelector + " #CellText.Style.RenderItalics", true); - } - if (cellColor != null) { - cmd.set(cellSelector + " #CellText.Style.TextColor", cellColor); + if (isHeader) { + sb.append("Group { Anchor: (Height: 1, Top: 0, Left: 0, Right: 0); Background: (Color: #2a3a4a); } "); } + sb.append("Group { Anchor: (Height: ").append(bh).append(", Bottom: 0, Left: 0, Right: 0); Background: (Color: #2a3a4a); } "); + sb.append("Group { Anchor: (Width: 1, Left: 0, Top: 0, Bottom: 0); Background: (Color: #2a3a4a); } "); + sb.append("Group { Anchor: (Width: 1, Right: 0, Top: 0, Bottom: 0); Background: (Color: #2a3a4a); } "); + sb.append("}"); + return sb.toString(); } private String getTemplateForType(HelpEntry.EntryType type) { @@ -301,8 +321,7 @@ private String getTemplateForType(HelpEntry.EntryType type) { case LIST -> TPL_LINE_LIST; case SEPARATOR -> TPL_SEPARATOR; case CALLOUT -> TPL_LINE_CALLOUT; - case TABLE_HEADER -> TPL_TABLE_HEADER; - case TABLE_ROW -> TPL_TABLE_ROW; + case TABLE_HEADER, TABLE_ROW -> TPL_LINE_TEXT; // fallback, not reached }; } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_help.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_help.ui index 4d777e61..3aaffbc0 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_help.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_help.ui @@ -96,7 +96,7 @@ $C.@PageOverlay { $Nav.@HyperFactionsAdminNavBar #HyperFactionsAdminNavBar {} $C.@DecoratedContainer { - Anchor: (Width: 750, Height: 650); + Anchor: (Width: 863, Height: 748); #Title { Group { diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_main.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_main.ui index 9fc3bd6f..ec4de588 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_main.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_main.ui @@ -1,4 +1,4 @@ -// Help Center - Wide sidebar layout (750x650) +// Help Center - Wide sidebar layout (863x748) // Left: Colored category sidebar (180px), Right: Scrollable card content $C = "../../Common.ui"; $S = "../shared/styles.ui"; @@ -115,7 +115,7 @@ $C.@PageOverlay { $Nav.@HyperFactionsNavBar #HyperFactionsNavBar {} $C.@DecoratedContainer { - Anchor: (Width: 750, Height: 650); + Anchor: (Width: 863, Height: 748); #Title { Group { diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_cell.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_cell.ui index 2528283d..55be9908 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_cell.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_cell.ui @@ -1,7 +1,7 @@ // Help table cell - column value with left border separator Group { - Anchor: (Width: 200); + FlexWeight: 1; // Left border (acts as column separator + table left border on first cell) Group { @@ -11,8 +11,8 @@ Group { Label #CellText { Text: ""; - Style: (FontSize: 10, TextColor: #CCCCCC, Wrap: true, VerticalAlignment: Center); - Padding: (Left: 10, Right: 8); - Anchor: (Left: 1, Right: 0, Top: 0, Bottom: 0); + Style: (FontSize: 10, TextColor: #CCCCCC, Wrap: true); + Padding: (Left: 10, Right: 8, Top: 4, Bottom: 4); + Anchor: (Left: 1, Right: 0); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header.ui index a13a2380..b927ca2d 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header.ui @@ -1,23 +1,37 @@ -// Help table header row - GitHub-style with top/bottom border and background +// Help table header row - Col0 in stretching Group, Col1 drives height Group { - Padding: (Top: 4, Bottom: 4); - Background: (Color: #161b26); + Padding: (Top: 5, Bottom: 5); + Background: (Color: #141a28); - // Top border + // Column 1 wrapper - Group stretches vertically Group { - Anchor: (Height: 1, Top: 0, Left: 0, Right: 0); - Background: (Color: #2a3a4a); - } + Anchor: (Left: 2, Width: 217, Top: 0, Bottom: 0); - // Bottom border - Group { - Anchor: (Height: 1, Bottom: 0, Left: 0, Right: 0); - Background: (Color: #2a3a4a); + Label #Col0 { + Text: ""; + Style: (FontSize: 10, TextColor: #DDDDDD, RenderBold: true, Wrap: true, VerticalAlignment: Center); + Padding: (Left: 12, Right: 8); + Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + } } - Group #Cols { - LayoutMode: Left; - Anchor: (Left: 0, Top: 1, Bottom: 1); + // Column 2 - DRIVES row height through content wrapping + Label #Col1 { + Text: ""; + Style: (FontSize: 10, TextColor: #DDDDDD, RenderBold: true, Wrap: true); + Padding: (Left: 12, Right: 8, Top: 2, Bottom: 2); + Anchor: (Left: 222, Right: 2); } + + // Top border + Group { Anchor: (Height: 1, Top: 0, Left: 0, Right: 0); Background: (Color: #2a3a4a); } + // Bottom border (thicker) + Group { Anchor: (Height: 2, Bottom: 0, Left: 0, Right: 0); Background: (Color: #2a3a4a); } + // Left border + Group { Anchor: (Width: 1, Left: 0, Top: 0, Bottom: 0); Background: (Color: #2a3a4a); } + // Column separator + Group { Anchor: (Width: 1, Left: 220, Top: 0, Bottom: 0); Background: (Color: #2a3a4a); } + // Right border + Group { Anchor: (Width: 1, Right: 0, Top: 0, Bottom: 0); Background: (Color: #2a3a4a); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header_cell.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header_cell.ui index 302ba49e..a05d3cfa 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header_cell.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_header_cell.ui @@ -1,7 +1,7 @@ // Help table header cell - bold label with left border separator Group { - Anchor: (Width: 200); + FlexWeight: 1; // Left border (acts as column separator + table left border on first cell) Group { @@ -11,8 +11,8 @@ Group { Label #CellText { Text: ""; - Style: (FontSize: 10, TextColor: #CCCCCC, RenderBold: true, Wrap: true, VerticalAlignment: Center); - Padding: (Left: 10, Right: 8); - Anchor: (Left: 1, Right: 0, Top: 0, Bottom: 0); + Style: (FontSize: 10, TextColor: #CCCCCC, RenderBold: true, Wrap: true); + Padding: (Left: 10, Right: 8, Top: 4, Bottom: 4); + Anchor: (Left: 1, Right: 0); } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_row.ui b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_row.ui index 2608050b..fb246896 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_row.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/help/help_table_row.ui @@ -1,16 +1,35 @@ -// Help table data row - GitHub-style with bottom border +// Help table data row - Col0 in stretching Group (like callout AccentBar), Col1 drives height Group { Padding: (Top: 4, Bottom: 4); + Background: (Color: #0f1520); - // Bottom border + // Column 1 wrapper - Group stretches vertically (like AccentBar in callout) Group { - Anchor: (Height: 1, Bottom: 0, Left: 0, Right: 0); - Background: (Color: #2a3a4a); + Anchor: (Left: 2, Width: 217, Top: 0, Bottom: 0); + + Label #Col0 { + Text: ""; + Style: (FontSize: 10, TextColor: #CCCCCC, Wrap: true, VerticalAlignment: Center); + Padding: (Left: 12, Right: 8); + Anchor: (Left: 0, Right: 0, Top: 0, Bottom: 0); + } } - Group #Cols { - LayoutMode: Left; - Anchor: (Left: 0, Top: 0, Bottom: 1); + // Column 2 - DRIVES row height through content wrapping (like Text in callout) + Label #Col1 { + Text: ""; + Style: (FontSize: 10, TextColor: #CCCCCC, Wrap: true); + Padding: (Left: 12, Right: 8, Top: 2, Bottom: 2); + Anchor: (Left: 222, Right: 2); } + + // Bottom border + Group { Anchor: (Height: 1, Bottom: 0, Left: 0, Right: 0); Background: (Color: #2a3a4a); } + // Left border + Group { Anchor: (Width: 1, Left: 0, Top: 0, Bottom: 0); Background: (Color: #2a3a4a); } + // Column separator + Group { Anchor: (Width: 1, Left: 220, Top: 0, Bottom: 0); Background: (Color: #2a3a4a); } + // Right border + Group { Anchor: (Width: 1, Right: 0, Top: 0, Bottom: 0); Background: (Color: #2a3a4a); } } diff --git a/src/main/resources/Server/Languages/en-US/help/combat/death.md b/src/main/resources/Server/Languages/en-US/help/combat/death.md index dc5699a7..8690b43a 100644 --- a/src/main/resources/Server/Languages/en-US/help/combat/death.md +++ b/src/main/resources/Server/Languages/en-US/help/combat/death.md @@ -8,7 +8,7 @@ Death carries real consequences in factions. Every death costs you personal powe ## Power Loss -Each death costs **-1.0 power** from your personal total. This lowers the faction's combined power. +Each death costs -1.0 power from your personal total. This lowers the faction's combined power. | Event | Power Change | |-------|-------------| @@ -16,6 +16,8 @@ Each death costs **-1.0 power** from your personal total. This lowers the factio | Online regen | +0.1 per minute | | Combat logout | -1.0 (killed) | +>[!NOTE] These are default values. Your server administrator may have configured different settings. + ## Example Scenarios *5 members at 10.0 power each = 50 total, 20 claims.* diff --git a/src/main/resources/Server/Languages/en-US/help/combat/spawn_protection.md b/src/main/resources/Server/Languages/en-US/help/combat/spawn_protection.md index 4803abf3..f0b2ab76 100644 --- a/src/main/resources/Server/Languages/en-US/help/combat/spawn_protection.md +++ b/src/main/resources/Server/Languages/en-US/help/combat/spawn_protection.md @@ -7,7 +7,7 @@ After respawning from death, you receive temporary protection to prevent spawn c ## How It Works -- Protection lasts **5 seconds** after respawn +- Protection lasts 5 seconds after respawn - You cannot take damage during this period - A visual indicator shows your protected status @@ -15,13 +15,13 @@ After respawning from death, you receive temporary protection to prevent spawn c Spawn protection ends early if you: -- **Attack** another player or entity -- **Move** from your spawn position +- Attack another player or entity +- Move from your spawn position This prevents abuse. You cannot attack others while invulnerable. Once you take any action, protection drops and normal combat rules apply. --- ->[!NOTE] Spawn protection duration and break conditions are configurable by the server. Your server may use different settings. +>[!NOTE] These are default values. Your server administrator may have configured different settings. >[!TIP] Use your protection time to assess the situation before moving. diff --git a/src/main/resources/Server/Languages/en-US/help/combat/tagging.md b/src/main/resources/Server/Languages/en-US/help/combat/tagging.md index 500ff734..e45cbdb3 100644 --- a/src/main/resources/Server/Languages/en-US/help/combat/tagging.md +++ b/src/main/resources/Server/Languages/en-US/help/combat/tagging.md @@ -3,11 +3,11 @@ id: combat_tagging --- # Combat Tagging -When you attack or are attacked by another player, you become **combat tagged** for 15 seconds. +When you attack or are attacked by another player, you become combat tagged for 15 seconds. ## While Tagged -- No `/f home` or `/f stuck` teleports +- No /f home or /f stuck teleports - No server teleport commands - Tag resets with each new combat action - A timer displays your remaining tag duration @@ -24,4 +24,6 @@ Your items drop where you disconnected and enemies can loot them. Always wait fo The combat tag timer appears on screen when you enter combat. Every new hit resets it to 15 seconds. Once it reaches zero, all restrictions are lifted. +>[!NOTE] These are default values. Your server administrator may have configured different settings. + >[!TIP] Disengage and wait out the timer if you need to teleport. diff --git a/src/main/resources/Server/Languages/en-US/help/diplomacy/alliances.md b/src/main/resources/Server/Languages/en-US/help/diplomacy/alliances.md index 57a13187..45da7756 100644 --- a/src/main/resources/Server/Languages/en-US/help/diplomacy/alliances.md +++ b/src/main/resources/Server/Languages/en-US/help/diplomacy/alliances.md @@ -4,7 +4,7 @@ commands: ally --- # Forming Alliances -Alliances are **mutual agreements** between two factions that provide protection and cooperation benefits. +Alliances are mutual agreements between two factions that provide protection and cooperation benefits. --- @@ -12,7 +12,7 @@ Alliances are **mutual agreements** between two factions that provide protection `/f ally ` -Sends an alliance request to the target faction. The alliance only takes effect once **both sides agree**. An Officer or Leader from the other faction must also run `/f ally ` to confirm. +Sends an alliance request to the target faction. The alliance only takes effect once both sides agree. An Officer or Leader from the other faction must also run the same command targeting your faction to confirm. ## How to Break an Alliance @@ -26,13 +26,13 @@ Either side can unilaterally end an alliance by resetting the relation to neutra | Benefit | Details | |---------|---------| -| **No friendly fire** | Allied players cannot damage each other (when allyDamage is disabled) | -| **Shared map visibility** | Allied territory shows in [#5555FF] blue on the territory map | -| **Territory interaction** | Allies can use doors, seats, and transport in your territory by default | -| **Ally chat** | Use `/f c` to cycle to ally chat mode for cross-faction communication | -| **Overclaim protection** | Allies cannot overclaim each other's territory | +| No friendly fire | Allied players cannot damage each other | +| Shared map visibility | Allied territory shows in blue on the territory map | +| Territory interaction | Allies can use doors, seats, and transport in your territory | +| Ally chat | Cycle to ally chat mode for cross-faction communication | +| Overclaim protection | Allies cannot overclaim each other's territory | ->[!NOTE] Your faction can have up to **10 alliances** at a time. Choose your allies wisely. +>[!NOTE] Your faction can have up to 10 alliances at a time. Choose your allies wisely. --- diff --git a/src/main/resources/Server/Languages/en-US/help/diplomacy/enemies.md b/src/main/resources/Server/Languages/en-US/help/diplomacy/enemies.md index 74c9ca45..70688ad4 100644 --- a/src/main/resources/Server/Languages/en-US/help/diplomacy/enemies.md +++ b/src/main/resources/Server/Languages/en-US/help/diplomacy/enemies.md @@ -4,7 +4,7 @@ commands: enemy, neutral --- # Enemy Factions -Declaring an enemy is a **one-way action** that immediately enables PvP and territorial aggression against the target faction. No agreement is required. +Declaring an enemy is a one-way action that immediately enables PvP and territorial aggression against the target faction. No agreement is required. --- @@ -26,10 +26,10 @@ Ends the enemy status and resets the relation to neutral. This also requires Off | Effect | Details | |--------|---------| -| **PvP in territory** | Full PvP is enabled in both factions' territory | -| **Overclaiming** | You can `/f overclaim` their chunks if they are in a power deficit | -| **Map marking** | Enemy territory shows in [#FF5555] red on the territory map | -| **No protection** | Standard territory protection does not prevent enemy PvP | +| PvP in territory | Full PvP is enabled in both factions' territory | +| Overclaiming | You can overclaim their chunks if they are in a power deficit | +| Map marking | Enemy territory shows in red on the territory map | +| No protection | Standard territory protection does not prevent enemy PvP | >[!WARNING] Declaring an enemy is a serious decision. Their members can also fight you in your own territory once you declare. @@ -37,11 +37,11 @@ Ends the enemy status and resets the relation to neutral. This also requires Off ## Strategic Considerations -- Enemy declarations are **one-way** -- you can declare without their consent, but they also see you as hostile -- Before declaring, check the target's power with `/f info `. If they are strong, you may lose territory instead +- Enemy declarations are one-way -- you can declare without their consent, but they also see you as hostile +- Before declaring, check the target's power with /f info. If they are strong, you may lose territory instead - Weaken enemies through repeated combat to drain their power, then overclaim their land -- There is **no limit** to how many enemies you can have, but fighting on multiple fronts is risky +- There is no limit to how many enemies you can have, but fighting on multiple fronts is risky ->[!TIP] Use `/f neutral ` to de-escalate conflicts. Sometimes a strategic peace is more valuable than continued war. +>[!TIP] Use /f neutral to de-escalate conflicts. Sometimes a strategic peace is more valuable than continued war. >[!NOTE] If you are allied with a faction and declare them as an enemy, the alliance is broken first. diff --git a/src/main/resources/Server/Languages/en-US/help/diplomacy/relations.md b/src/main/resources/Server/Languages/en-US/help/diplomacy/relations.md index 9ec717c5..89711eee 100644 --- a/src/main/resources/Server/Languages/en-US/help/diplomacy/relations.md +++ b/src/main/resources/Server/Languages/en-US/help/diplomacy/relations.md @@ -4,7 +4,7 @@ commands: relations --- # Faction Relations -Every pair of factions has a diplomatic relation that determines how they interact. There are three states: **Ally**, **Enemy**, and **Neutral**. +Every pair of factions has a diplomatic relation that determines how they interact. There are three states: Ally, Enemy, and Neutral. --- @@ -12,12 +12,12 @@ Every pair of factions has a diplomatic relation that determines how they intera | Effect | Ally | Neutral | Enemy | |--------|------|---------|-------| -| **PvP in territory** | Disabled | Standard rules | Enabled | -| **Territory protection** | Mutual protection | Standard protection | Can overclaim if weakened | -| **Friendly fire** | Disabled | N/A | Enabled everywhere | -| **Map color** | [#5555FF] Blue | [#AAAAAA] Gray | [#FF5555] Red | -| **How to set** | Mutual agreement | Default state | One-way declaration | -| **Chat access** | Ally chat channel | None | None | +| PvP in territory | Disabled | Standard rules | Enabled | +| Territory protection | Mutual protection | Standard protection | Can overclaim if weakened | +| Friendly fire | Disabled | N/A | Enabled everywhere | +| Map color | Blue | Gray | Red | +| How to set | Mutual agreement | Default state | One-way declaration | +| Chat access | Ally chat channel | None | None | --- @@ -29,10 +29,10 @@ Shows all your current alliances, enemies, and any pending alliance requests. ## How Relations Work -- **Neutral** is the default state between all factions. Standard server rules apply. -- **Alliance** requires both factions to agree. Either side can break it unilaterally. -- **Enemy** is declared one-way. No agreement needed -- the other faction is immediately marked as your enemy. +- Neutral is the default state between all factions. Standard server rules apply. +- Alliance requires both factions to agree. Either side can break it unilaterally. +- Enemy is declared one-way. No agreement needed -- the other faction is immediately marked as your enemy. >[!INFO] Relations are managed by Officers and Leaders. Members can view relations but cannot change them. ->[!TIP] Use `/f relations` regularly to keep track of the diplomatic landscape. Knowing who your enemies are helps you prepare for territorial conflicts. +>[!TIP] Use /f relations regularly to keep track of the diplomatic landscape. Knowing who your enemies are helps you prepare for territorial conflicts. diff --git a/src/main/resources/Server/Languages/en-US/help/economy/commands.md b/src/main/resources/Server/Languages/en-US/help/economy/commands.md index 20751171..020190cd 100644 --- a/src/main/resources/Server/Languages/en-US/help/economy/commands.md +++ b/src/main/resources/Server/Languages/en-US/help/economy/commands.md @@ -17,11 +17,11 @@ Quick reference for all faction economy commands. ## Command Aliases -- `/f balance` can also be used as `/f bal` -- `/f deposit` and `/f withdraw` accept decimal amounts +- /f balance can also be used as /f bal +- /f deposit and /f withdraw accept decimal amounts -## Permissions +## Role Requirements -All economy commands require `hyperfactions.economy.*` permission nodes. Withdraw and transfer are further restricted by faction role (Officer or higher). +Withdraw and transfer commands are restricted to Officers and Leaders. All other economy commands are available to any faction member. >[!TIP] Use /f money log to review recent deposits, withdrawals, and transfers with timestamps. diff --git a/src/main/resources/Server/Languages/en-US/help/economy/treasury.md b/src/main/resources/Server/Languages/en-US/help/economy/treasury.md index 7a73d3bf..e4e7307b 100644 --- a/src/main/resources/Server/Languages/en-US/help/economy/treasury.md +++ b/src/main/resources/Server/Languages/en-US/help/economy/treasury.md @@ -8,18 +8,18 @@ Every faction has a shared treasury that serves as the faction's bank. Funds are ## Starting Balance -New factions start with **0** in their treasury. Members must deposit funds to build up reserves. +New factions start with 0 in their treasury. Members must deposit funds to build up reserves. ## Who Can Manage -- **Any member** can deposit funds -- **Officers and Leader** can withdraw and transfer -- **Leader** has full treasury control +- Any member can deposit funds +- Officers and Leader can withdraw and transfer +- Leader has full treasury control --- `/f balance` -Check your faction's current treasury balance. Also available as `/f bal`. +Check your faction's current treasury balance. Also available as /f bal. >[!TIP] Contribute regularly to keep your faction funded. Territory upkeep costs can drain an empty treasury quickly. diff --git a/src/main/resources/Server/Languages/en-US/help/economy/upkeep.md b/src/main/resources/Server/Languages/en-US/help/economy/upkeep.md index b31e9b06..8a2d12e4 100644 --- a/src/main/resources/Server/Languages/en-US/help/economy/upkeep.md +++ b/src/main/resources/Server/Languages/en-US/help/economy/upkeep.md @@ -14,6 +14,8 @@ Factions must pay ongoing upkeep to maintain their claimed territory. This preve | Free chunks | 3 (no cost) | | Scaling mode | Flat rate | +>[!NOTE] These are default values. Your server administrator may have configured different settings. + Your first 3 chunks are free. Beyond that, each additional claimed chunk costs 2.0 per payment cycle. ## Auto-Pay diff --git a/src/main/resources/Server/Languages/en-US/help/power_land/claiming.md b/src/main/resources/Server/Languages/en-US/help/power_land/claiming.md index 83212207..f70427cb 100644 --- a/src/main/resources/Server/Languages/en-US/help/power_land/claiming.md +++ b/src/main/resources/Server/Languages/en-US/help/power_land/claiming.md @@ -12,7 +12,7 @@ Claiming a chunk protects it under your faction's control. Only faction members `/f claim` -Stand in the chunk you want to claim and run this command. The chunk is immediately protected. Requires **Officer** rank or higher. +Stand in the chunk you want to claim and run this command. The chunk is immediately protected. Requires Officer rank or higher. ## How to Unclaim @@ -26,9 +26,11 @@ Releases the chunk you are standing in back to wilderness. Also requires Officer | Rule | Default | |------|---------| -| **Power cost per claim** | 2.0 power | -| **Maximum claims** | 100 per faction | -| **Adjacent only** | No (you can claim anywhere) | +| Power cost per claim | 2.0 power | +| Maximum claims | 100 per faction | +| Adjacent only | No (you can claim anywhere) | + +>[!NOTE] These are default values. Your server administrator may have configured different settings. >[!INFO] Each claim costs 2.0 power to maintain. A faction with 50 total power can hold up to 25 claims safely. @@ -38,11 +40,11 @@ Releases the chunk you are standing in back to wilderness. Also requires Officer Inside claimed territory, the following is enforced by default: -- **Outsiders** cannot break, place, or interact with blocks -- **Allies** can use doors, seats, and transport but cannot break or place blocks -- **Members and Officers** have full access to build, break, and use everything +- Outsiders cannot break, place, or interact with blocks +- Allies can use doors, seats, and transport but cannot break or place blocks +- Members and Officers have full access to build, break, and use everything - Container access (chests, crates) is restricted to members only ->[!TIP] You can also claim directly from the territory map. Open `/f map` and click on unclaimed chunks to claim them. +>[!TIP] You can also claim directly from the territory map. Open /f map and click on unclaimed chunks to claim them. >[!WARNING] Do not over-expand. If your faction loses power through deaths, claims beyond your power budget become vulnerable to overclaiming. diff --git a/src/main/resources/Server/Languages/en-US/help/power_land/losing_territory.md b/src/main/resources/Server/Languages/en-US/help/power_land/losing_territory.md index 36b7a915..ea39186b 100644 --- a/src/main/resources/Server/Languages/en-US/help/power_land/losing_territory.md +++ b/src/main/resources/Server/Languages/en-US/help/power_land/losing_territory.md @@ -4,7 +4,7 @@ commands: overclaim --- # Losing Territory -When a faction's total power drops below the cost of its claims, it becomes **raidable**. Enemies can overclaim chunks right out from under you. +When a faction's total power drops below the cost of its claims, it becomes raidable. Enemies can overclaim chunks right out from under you. --- @@ -12,11 +12,13 @@ When a faction's total power drops below the cost of its claims, it becomes **ra `/f overclaim` -An Officer or Leader from an **enemy** faction stands in your claimed chunk and runs this command. If your faction is in a power deficit, the chunk transfers to their faction. +An Officer or Leader from an enemy faction stands in your claimed chunk and runs this command. If your faction is in a power deficit, the chunk transfers to their faction. ## The Math -Each claim costs **2.0 power** to maintain. If your total power falls below that threshold, the deficit chunks are vulnerable. +Each claim costs 2.0 power to maintain. If your total power falls below that threshold, the deficit chunks are vulnerable. + +>[!NOTE] These are default values. Your server administrator may have configured different settings. >[!WARNING] Overclaiming is permanent. Once an enemy takes a chunk, you must reclaim it (or overclaim it back if they weaken). @@ -28,21 +30,21 @@ Each claim costs **2.0 power** to maintain. If your total power falls below that |--------|-------| | Members | 5 players | | Power per member | 10 each (starting) | -| **Total power** | **50** | +| Total power | 50 | | Claims | 30 chunks | -| Power needed (30 x 2.0) | **60** | -| **Deficit** | **10 power short** | +| Power needed (30 x 2.0) | 60 | +| Deficit | 10 power short | -In this example, the faction is already raidable from the start. Enemies could overclaim up to **5 chunks** (10 deficit / 2.0 per claim) before the faction reaches equilibrium. +In this example, the faction is already raidable from the start. Enemies could overclaim up to 5 chunks (10 deficit / 2.0 per claim) before the faction reaches equilibrium. --- ## How to Prevent Overclaiming -- **Do not over-expand** -- always keep total power above your claim cost with a buffer -- **Stay active** -- power only regenerates while online (+0.1/min) -- **Avoid unnecessary deaths** -- each death costs 1.0 power -- **Recruit more members** -- more players means more total power -- **Unclaim unused chunks** -- free up power with `/f unclaim` +- Do not over-expand -- always keep total power above your claim cost with a buffer +- Stay active -- power only regenerates while online (+0.1/min) +- Avoid unnecessary deaths -- each death costs 1.0 power +- Recruit more members -- more players means more total power +- Unclaim unused chunks -- free up power with /f unclaim ->[!TIP] Check your power status regularly with `/f power`. If your total power is close to your claim cost, consider unclaiming less important chunks before a war. +>[!TIP] Check your power status regularly with /f power. If your total power is close to your claim cost, consider unclaiming less important chunks before a war. diff --git a/src/main/resources/Server/Languages/en-US/help/power_land/territory_map.md b/src/main/resources/Server/Languages/en-US/help/power_land/territory_map.md index 3b1e3293..207c041d 100644 --- a/src/main/resources/Server/Languages/en-US/help/power_land/territory_map.md +++ b/src/main/resources/Server/Languages/en-US/help/power_land/territory_map.md @@ -20,12 +20,12 @@ Opens the territory map GUI centered on your current location. | Color | Meaning | |-------|---------| -| [#55FF55] **Your faction's color** | Territory claimed by your faction | -| [#5555FF] **Blue** | Allied faction territory | -| [#FF5555] **Red** | Enemy faction territory | -| [#AAAAAA] **Gray** | Neutral faction territory | -| [#333333] **Dark** | Wilderness (unclaimed land) | -| [#FFAA00] **Gold** | Special zones (safezone, warzone) | +| [#55FF55] Your faction's color | Territory claimed by your faction | +| [#5555FF] Blue | Allied faction territory | +| [#FF5555] Red | Enemy faction territory | +| [#AAAAAA] Gray | Neutral faction territory | +| [#333333] Dark | Wilderness (unclaimed land) | +| [#FFAA00] Gold | Special zones (safezone, warzone) | >[!INFO] Your faction's color on the map matches the color you set with the faction color setting. Allies and enemies use fixed colors for easy identification. @@ -35,8 +35,8 @@ Opens the territory map GUI centered on your current location. The map is not just for viewing -- you can interact with it directly. -- **Click an unclaimed chunk** to claim it (requires Officer+ rank and sufficient power) -- **Click a claimed chunk** to see which faction owns it +- Click an unclaimed chunk to claim it (requires Officer+ rank and sufficient power) +- Click a claimed chunk to see which faction owns it - Scroll or pan to explore the area around you >[!TIP] The map is the easiest way to plan your territory expansion. Look for unclaimed areas near your base and claim strategically to create a contiguous border. diff --git a/src/main/resources/Server/Languages/en-US/help/power_land/understanding_power.md b/src/main/resources/Server/Languages/en-US/help/power_land/understanding_power.md index f46586dc..ae158ed5 100644 --- a/src/main/resources/Server/Languages/en-US/help/power_land/understanding_power.md +++ b/src/main/resources/Server/Languages/en-US/help/power_land/understanding_power.md @@ -12,17 +12,19 @@ Power is the core resource that determines how much territory your faction can h | Setting | Value | |---------|-------| -| **Maximum power per player** | 20 | -| **Starting power** | 10 | -| **Death penalty** | -1.0 per death | -| **Kill reward** | 0.0 | -| **Regen rate** | +0.1 per minute (while online) | -| **Power cost per claim** | 2.0 | -| **Logout while tagged** | -1.0 additional | +| Maximum power per player | 20 | +| Starting power | 10 | +| Death penalty | -1.0 per death | +| Kill reward | 0.0 | +| Regen rate | +0.1 per minute (while online) | +| Power cost per claim | 2.0 | +| Logout while tagged | -1.0 additional | + +>[!NOTE] These are default values. Your server administrator may have configured different settings. ## How It Works -Your faction's **total power** is the sum of every member's personal power. Your **required power** is the number of claims multiplied by 2.0. As long as total power stays above required power, your territory is safe. +Your faction's total power is the sum of every member's personal power. Your required power is the number of claims multiplied by 2.0. As long as total power stays above required power, your territory is safe. >[!INFO] Power regenerates passively at 0.1 per minute while you are online. At that rate, recovering 1.0 power takes about 10 minutes. @@ -36,7 +38,7 @@ Shows your personal power, your faction's total power, and how much is needed to ## The Danger Zone -If total power falls **below** the required amount for your claims, your faction becomes vulnerable. Enemies can use `/f overclaim` to steal your chunks. +If total power falls below the required amount for your claims, your faction becomes vulnerable. Enemies can overclaim your chunks. >[!WARNING] Multiple deaths in a short period can cascade quickly. If you have 5 members each at 10 power (50 total) and 20 claims (40 needed), just 5 deaths across your team drops you to 45 -- still safe. But 11 deaths puts you at 39, below the 40 threshold. diff --git a/src/main/resources/Server/Languages/en-US/help/quick_ref/permissions.md b/src/main/resources/Server/Languages/en-US/help/quick_ref/permissions.md deleted file mode 100644 index 90673685..00000000 --- a/src/main/resources/Server/Languages/en-US/help/quick_ref/permissions.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -id: quickref_permissions ---- -# Permissions - -Key permission nodes for HyperFactions. All nodes fall under the **hyperfactions** root namespace. - -## Core Permissions - -| Permission | Description | -|-----------|-------------| -| hyperfactions.use | Access to basic faction commands | -| hyperfactions.faction.create | Create a new faction | -| hyperfactions.faction.disband | Disband your faction | - -## Membership - -| Permission | Description | -|-----------|-------------| -| hyperfactions.member.invite | Invite players | -| hyperfactions.member.kick | Kick members | -| hyperfactions.member.promote | Promote members | - -## Territory - -| Permission | Description | -|-----------|-------------| -| hyperfactions.territory.claim | Claim chunks | -| hyperfactions.territory.unclaim | Release chunks | -| hyperfactions.territory.overclaim | Overclaim weakened land | - -## Teleport - -| Permission | Description | -|-----------|-------------| -| hyperfactions.teleport.home | Use faction home | -| hyperfactions.teleport.sethome | Set faction home | -| hyperfactions.teleport.stuck | Use stuck teleport | - -## Diplomacy and Chat - -| Permission | Description | -|-----------|-------------| -| hyperfactions.relation.ally | Manage alliances | -| hyperfactions.relation.enemy | Declare enemies | -| hyperfactions.chat.faction | Use faction chat | -| hyperfactions.chat.ally | Use ally chat | - -## Information and Economy - -| Permission | Description | -|-----------|-------------| -| hyperfactions.info.show | View faction info | -| hyperfactions.info.list | Browse factions | -| hyperfactions.economy.deposit | Deposit to treasury | -| hyperfactions.economy.withdraw | Withdraw from treasury | - -## Bypass Permissions - -| Permission | Description | -|-----------|-------------| -| hyperfactions.bypass.* | Bypass all restrictions | -| hyperfactions.bypass.combat | Bypass combat tag | -| hyperfactions.bypass.power | Bypass power limits | -| hyperfactions.bypass.territory | Bypass land protection | - ->[!INFO] Server admins can grant hyperfactions.* to give access to all permissions at once. - ->[!NOTE] Some permissions are restricted by faction role regardless of permission nodes. For example, only Officers can claim even with the permission. diff --git a/src/main/resources/Server/Languages/en-US/help/welcome/getting_started.md b/src/main/resources/Server/Languages/en-US/help/welcome/getting_started.md index a63c39a6..2155ff0c 100644 --- a/src/main/resources/Server/Languages/en-US/help/welcome/getting_started.md +++ b/src/main/resources/Server/Languages/en-US/help/welcome/getting_started.md @@ -10,19 +10,19 @@ Welcome to HyperFactions! Here is how to get up and running in just a few steps. ## Step 1: Open the Faction Menu -Type `/f` to open the main faction GUI. This is your hub for everything -- browsing factions, creating your own, and managing invitations. +Type /f to open the main faction GUI. This is your hub for everything -- browsing factions, creating your own, and managing invitations. ## Step 2: Choose Your Path | Option | How | |--------|-----| -| **Browse open factions** | Click *Browse* in the menu and hit *Join* on any open faction. | -| **Accept an invitation** | Check the *Invites* tab. If someone invited you, click *Accept*. | -| **Create your own** | Click *Create Faction*, pick a name, and you are the Leader. | +| Browse open factions | Click Browse in the menu and hit Join on any open faction. | +| Accept an invitation | Check the Invites tab. If someone invited you, click Accept. | +| Create your own | Click Create Faction, pick a name, and you are the Leader. | ## Step 3: Explore Your Faction -Once you are in a faction, you will see the **Faction Dashboard** with your roster, territory map, relations, and settings. +Once you are in a faction, you will see the Faction Dashboard with your roster, territory map, relations, and settings. >[!TIP] If you are brand new, try joining an existing faction first. You will learn the ropes faster with experienced members around you. @@ -30,9 +30,9 @@ Once you are in a faction, you will see the **Faction Dashboard** with your rost ## Essential First Commands -- `/f` -- Opens the faction GUI -- `/f home` -- Teleport to your faction's home base -- `/f c` -- Cycle chat mode between Normal, Faction, and Ally -- `/f map` -- View the territory map around you +- /f -- Opens the faction GUI +- /f home -- Teleport to your faction's home base +- /f c -- Cycle chat mode between Normal, Faction, and Ally +- /f map -- View the territory map around you ->[!TIP] You can also type `/f help` in chat for a quick command reference anytime. +>[!TIP] You can also type /f help in chat for a quick command reference anytime. diff --git a/src/main/resources/Server/Languages/en-US/help/welcome/what_are_factions.md b/src/main/resources/Server/Languages/en-US/help/welcome/what_are_factions.md index f1641b50..5fedf54c 100644 --- a/src/main/resources/Server/Languages/en-US/help/welcome/what_are_factions.md +++ b/src/main/resources/Server/Languages/en-US/help/welcome/what_are_factions.md @@ -3,7 +3,7 @@ id: welcome_what --- # What Are Factions? -Factions are **player-run teams** that claim territory, build bases, and compete for dominance. When you join or create a faction, you gain access to protected land, a shared home, private chat, and diplomatic tools. +Factions are player-run teams that claim territory, build bases, and compete for dominance. When you join or create a faction, you gain access to protected land, a shared home, private chat, and diplomatic tools. >[!TIP] Factions is all about teamwork. The more active members you have, the stronger your faction becomes. @@ -13,16 +13,16 @@ Factions are **player-run teams** that claim territory, build bases, and compete | Mechanic | What It Does | |----------|-------------| -| **Power** | Each player generates power over time (max 20). Your faction's total power determines how much land you can hold. | -| **Claims** | Claimed chunks are protected -- only members can build, break, or open containers inside them. Each claim costs 2.0 power to maintain. | -| **Relations** | Factions can form **alliances** for mutual protection or declare **enemies** to enable PvP and territorial aggression. | -| **Roles** | Three ranks -- Leader, Officer, Member -- each with different capabilities. | +| Power | Each player generates power over time (max 20). Your faction's total power determines how much land you can hold. | +| Claims | Claimed chunks are protected -- only members can build, break, or open containers inside them. Each claim costs 2.0 power to maintain. | +| Relations | Factions can form alliances for mutual protection or declare enemies to enable PvP and territorial aggression. | +| Roles | Three ranks -- Leader, Officer, Member -- each with different capabilities. | --- ## How Strength Works -Your faction's strength comes from its members. Every player starts with **10 power** and regenerates up to **20** while online. Dying costs power. If your total faction power drops below the cost of your claims, enemies can **overclaim** your territory. +Your faction's strength comes from its members. Every player starts with 10 power and regenerates up to 20 while online. Dying costs power. If your total faction power drops below the cost of your claims, enemies can overclaim your territory. >[!WARNING] A single death costs 1.0 power. Multiple deaths in a short time can leave your faction vulnerable to overclaiming. diff --git a/src/main/resources/Server/Languages/en-US/help/your_faction/creating.md b/src/main/resources/Server/Languages/en-US/help/your_faction/creating.md index 716341dc..e1eaa33b 100644 --- a/src/main/resources/Server/Languages/en-US/help/your_faction/creating.md +++ b/src/main/resources/Server/Languages/en-US/help/your_faction/creating.md @@ -4,7 +4,7 @@ commands: create --- # Creating a Faction -Starting your own faction makes you the **Leader** with full control over settings, members, and territory. +Starting your own faction makes you the Leader with full control over settings, members, and territory. --- @@ -12,15 +12,15 @@ Starting your own faction makes you the **Leader** with full control over settin `/f create ` -This creates your faction and immediately opens the **Faction Dashboard** where you can begin inviting members, claiming land, and configuring settings. +This creates your faction and immediately opens the Faction Dashboard where you can begin inviting members, claiming land, and configuring settings. ## Name Rules | Rule | Requirement | |------|------------| -| **Length** | Between **3** and **24** characters | -| **Characters** | Letters, numbers, and spaces only (alphanumeric) | -| **Uniqueness** | No two factions can share the same name | +| Length | Between 3 and 24 characters | +| Characters | Letters, numbers, and spaces only | +| Uniqueness | No two factions can share the same name | >[!WARNING] Choose your name carefully. Renaming later requires Leader permissions and may have a cooldown. @@ -28,11 +28,11 @@ This creates your faction and immediately opens the **Faction Dashboard** where ## What Happens on Creation -- You become the **Leader** (highest rank) -- Your faction starts with **0 claims** and your personal power (10 by default) +- You become the Leader (highest rank) +- Your faction starts with 0 claims and your personal power (10 by default) - The faction dashboard opens automatically - You can immediately invite players, claim territory, and set a faction home >[!INFO] If the server has economy integration enabled, creating a faction may cost money. The creation cost is set by the server administrator. ->[!TIP] After creating, your first priorities should be: invite friends with `/f invite `, find a base location, and claim it with `/f claim`. +>[!TIP] After creating, your first priorities should be: invite friends, find a base location, and claim it. diff --git a/src/main/resources/Server/Languages/en-US/help/your_faction/joining.md b/src/main/resources/Server/Languages/en-US/help/your_faction/joining.md index 5bd2f83e..7dbabdcd 100644 --- a/src/main/resources/Server/Languages/en-US/help/your_faction/joining.md +++ b/src/main/resources/Server/Languages/en-US/help/your_faction/joining.md @@ -10,27 +10,27 @@ There are three ways to join an existing faction, depending on how the faction i ## Methods Compared -| Method | How It Works | Requires | -|--------|-------------|----------| -| **Browse and Join** | Open `/f`, click *Browse*, and hit *Join* on an open faction | Faction must be set to **open** | -| **Accept Invite** | A faction Officer or Leader sends you an invite; accept it from the *Invites* tab in `/f` | An active invitation | -| **Request to Join** | Send a join request to a closed faction with `/f request ` | An Officer or Leader to approve | +| Method | How | Requires | +|--------|-----|----------| +| Browse and Join | Open /f, click Browse, click Join | Faction is set to open | +| Accept Invite | Check Invites tab in /f menu | Active invitation | +| Request to Join | Use /f request, wait for approval | Officer or Leader approves | --- ## Invite Details -- Invitations are sent by Officers or Leaders using `/f invite ` -- Invitations expire after **5 minutes** -- accept promptly -- View your pending invites in the *Invites* tab of the faction menu (`/f`) -- Accept with the GUI or `/f accept ` +- Invitations are sent by Officers or Leaders +- Invitations expire after 5 minutes -- accept promptly +- View your pending invites in the Invites tab of the faction menu +- Accept with the GUI or /f accept ## Join Requests -- Use `/f request ` to request membership in a closed faction -- Requests expire after **24 hours** if not acted on +- Use /f request to request membership in a closed faction +- Requests expire after 24 hours if not acted on - Officers and Leaders can approve or deny requests from the faction dashboard ->[!TIP] Not sure which faction to join? Use the Browse tab in `/f` to see faction descriptions, member counts, and whether they are open or invite-only. +>[!TIP] Not sure which faction to join? Use the Browse tab in /f to see faction descriptions, member counts, and whether they are open or invite-only. ->[!NOTE] Each faction can hold up to **50 members** by default. If a faction is full, you will need to wait for a spot to open up. +>[!NOTE] Each faction can hold up to 50 members by default. If a faction is full, you will need to wait for a spot to open up. diff --git a/src/main/resources/Server/Languages/en-US/help/your_faction/managing.md b/src/main/resources/Server/Languages/en-US/help/your_faction/managing.md index 3219cffb..870c6133 100644 --- a/src/main/resources/Server/Languages/en-US/help/your_faction/managing.md +++ b/src/main/resources/Server/Languages/en-US/help/your_faction/managing.md @@ -18,26 +18,26 @@ Officers and Leaders share responsibility for managing the faction roster. Here | `/f demote ` | Demotes an Officer to Member | Leader only | | `/f transfer ` | Transfers faction ownership | Leader only | ->[!NOTE] Officers can only kick **Members**. To remove another Officer, the Leader must either demote them first or kick them directly. +>[!NOTE] Officers can only kick Members. To remove another Officer, the Leader must either demote them first or kick them directly. --- ## Invitations -- Invitations expire after **5 minutes** if not accepted -- The invited player sees it in their Invites tab when they open `/f` +- Invitations expire after 5 minutes if not accepted +- The invited player sees it in their Invites tab when they open /f - There is no limit to how many invitations you can send at once -- Your faction can hold up to **50 members** total +- Your faction can hold up to 50 members total ## Promotions and Demotions -- Only the **Leader** can promote or demote -- `/f promote ` raises a Member to Officer -- `/f demote ` lowers an Officer back to Member +- Only the Leader can promote or demote +- /f promote raises a Member to Officer +- /f demote lowers an Officer back to Member ## Transferring Leadership ->[!WARNING] Transferring leadership is **irreversible**. You will be demoted to Officer and the target player becomes the new Leader. Make sure you trust them completely. +>[!WARNING] Transferring leadership is irreversible. You will be demoted to Officer and the target player becomes the new Leader. Make sure you trust them completely. `/f transfer ` diff --git a/src/main/resources/Server/Languages/en-US/help/your_faction/roles.md b/src/main/resources/Server/Languages/en-US/help/your_faction/roles.md index 049076de..67bb5962 100644 --- a/src/main/resources/Server/Languages/en-US/help/your_faction/roles.md +++ b/src/main/resources/Server/Languages/en-US/help/your_faction/roles.md @@ -11,34 +11,34 @@ Every faction has three roles in a strict hierarchy. Higher roles inherit all ca | Action | Leader | Officer | Member | |--------|--------|---------|--------| -| Build in territory | Y | Y | Y | -| Use faction home | Y | Y | Y | -| Faction and ally chat | Y | Y | Y | -| Invite players | Y | Y | N | -| Kick members | Y | Y (Members only) | N | -| Claim / unclaim land | Y | Y | N | -| Overclaim enemy territory | Y | Y | N | -| Set faction home | Y | Y | N | -| Delete faction home | Y | Y | N | -| Manage relations (ally/enemy) | Y | Y | N | -| View faction logs | Y | Y | N | -| Promote to Officer | Y | N | N | -| Demote from Officer | Y | N | N | -| Rename faction | Y | N | N | -| Set description / tag / color | Y | N | N | -| Open / close faction | Y | N | N | -| Access faction settings | Y | N | N | -| Transfer leadership | Y | N | N | -| Disband faction | Y | N | N | - ->[!NOTE] Officers can kick **Members** but cannot kick other Officers. Only the Leader can remove Officers. +| Build in territory | Yes | Yes | Yes | +| Use faction home | Yes | Yes | Yes | +| Faction and ally chat | Yes | Yes | Yes | +| Invite players | Yes | Yes | No | +| Kick members | Yes | Yes (Members only) | No | +| Claim / unclaim land | Yes | Yes | No | +| Overclaim enemy territory | Yes | Yes | No | +| Set faction home | Yes | Yes | No | +| Delete faction home | Yes | Yes | No | +| Manage relations (ally/enemy) | Yes | Yes | No | +| View faction logs | Yes | Yes | No | +| Promote to Officer | Yes | No | No | +| Demote from Officer | Yes | No | No | +| Rename faction | Yes | No | No | +| Set description / tag / color | Yes | No | No | +| Open / close faction | Yes | No | No | +| Access faction settings | Yes | No | No | +| Transfer leadership | Yes | No | No | +| Disband faction | Yes | No | No | + +>[!NOTE] Officers can kick Members but cannot kick other Officers. Only the Leader can remove Officers. --- ## Role Details -- **Leader** -- One per faction. Has full control over all settings, members, and territory. Can transfer ownership to another member. -- **Officer** -- Trusted members who help manage the faction. Can invite, kick members, claim land, and handle diplomacy. -- **Member** -- The default role when joining. Can build in territory, use the faction home, and participate in faction chat. +- Leader -- One per faction. Has full control over all settings, members, and territory. Can transfer ownership to another member. +- Officer -- Trusted members who help manage the faction. Can invite, kick members, claim land, and handle diplomacy. +- Member -- The default role when joining. Can build in territory, use the faction home, and participate in faction chat. >[!TIP] Promote your most active and trusted members to Officer so they can help manage territory and recruit new players. diff --git a/src/main/resources/Server/Languages/es-ES/help/quick_ref/permissions.md b/src/main/resources/Server/Languages/es-ES/help/quick_ref/permissions.md deleted file mode 100644 index 220edcf7..00000000 --- a/src/main/resources/Server/Languages/es-ES/help/quick_ref/permissions.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -id: quickref_permissions ---- -# Permisos - -Nodos de permisos clave para HyperFactions. Todos los nodos estan bajo el espacio de nombres raiz **hyperfactions**. - -## Permisos Principales - -| Permiso | Descripcion | -|---------|-------------| -| hyperfactions.use | Acceso a comandos basicos de faccion | -| hyperfactions.faction.create | Crear una nueva faccion | -| hyperfactions.faction.disband | Disolver tu faccion | - -## Membresia - -| Permiso | Descripcion | -|---------|-------------| -| hyperfactions.member.invite | Invitar jugadores | -| hyperfactions.member.kick | Expulsar miembros | -| hyperfactions.member.promote | Promover miembros | - -## Territorio - -| Permiso | Descripcion | -|---------|-------------| -| hyperfactions.territory.claim | Reclamar chunks | -| hyperfactions.territory.unclaim | Liberar chunks | -| hyperfactions.territory.overclaim | Sobrereclamar territorio debilitado | - -## Teletransporte - -| Permiso | Descripcion | -|---------|-------------| -| hyperfactions.teleport.home | Usar hogar de faccion | -| hyperfactions.teleport.sethome | Establecer hogar de faccion | -| hyperfactions.teleport.stuck | Usar teletransporte de emergencia | - -## Diplomacia y Chat - -| Permiso | Descripcion | -|---------|-------------| -| hyperfactions.relation.ally | Gestionar alianzas | -| hyperfactions.relation.enemy | Declarar enemigos | -| hyperfactions.chat.faction | Usar chat de faccion | -| hyperfactions.chat.ally | Usar chat de aliados | - -## Informacion y Economia - -| Permiso | Descripcion | -|---------|-------------| -| hyperfactions.info.show | Ver informacion de faccion | -| hyperfactions.info.list | Explorar facciones | -| hyperfactions.economy.deposit | Depositar en tesoreria | -| hyperfactions.economy.withdraw | Retirar de tesoreria | - -## Permisos de Bypass - -| Permiso | Descripcion | -|---------|-------------| -| hyperfactions.bypass.* | Saltar todas las restricciones | -| hyperfactions.bypass.combat | Saltar etiqueta de combate | -| hyperfactions.bypass.power | Saltar limites de poder | -| hyperfactions.bypass.territory | Saltar proteccion de territorio | - ->[!INFO] Los administradores pueden otorgar hyperfactions.* para dar acceso a todos los permisos de una vez. - ->[!NOTE] Algunos permisos estan restringidos por el rol de faccion independientemente de los nodos de permiso. Por ejemplo, solo los Oficiales pueden reclamar incluso teniendo el permiso. From 7847e4df39e718a56f85185bc7ec2104e5eb9d7c Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Tue, 10 Mar 2026 17:32:21 -0700 Subject: [PATCH 45/55] fix: remove duplicate gui.cancel key in admin lang files Hytale's I18nModule rejects the entire lang file when it encounters a duplicate key, causing ALL admin GUI translations to show raw keys. --- .../resources/Server/Languages/en-US/hyperfactions_admin.lang | 3 --- .../resources/Server/Languages/es-ES/hyperfactions_admin.lang | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang index 5c1d5391..c25fe32c 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang @@ -672,6 +672,3 @@ gui.czw_flags_defaults_desc = Based on zone type gui.czw_flags_defaults = Use defaults gui.czw_flags_customize_desc = Open settings after gui.czw_flags_customize = Customize - -# Common button labels -gui.cancel = Cancel diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang index 4ad1a966..24f91d3f 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang @@ -672,6 +672,3 @@ gui.czw_flags_defaults_desc = Basado en tipo de zona gui.czw_flags_defaults = Usar por defecto gui.czw_flags_customize_desc = Abrir ajustes despues gui.czw_flags_customize = Personalizar - -# Etiquetas comunes de botones -gui.cancel = Cancelar From 72819699b054ca1f62373a7e98e1fdab071290de Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Tue, 10 Mar 2026 18:01:54 -0700 Subject: [PATCH 46/55] =?UTF-8?q?feat:=20localize=20GUI=20labels=20for=20e?= =?UTF-8?q?s-ES=20=E2=80=94=20browse=20stats,=20log=20time/types,=20sort?= =?UTF-8?q?=20labels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add i18n support for previously hardcoded English text across player and admin GUI pages: browse entry stat labels (power/claims/members), activity log time formatting and type names, leaderboard/browser/members sort labels. Fix truncated Spanish button text (relations, settings, sort labels). --- .../gui/admin/page/AdminActivityLogPage.java | 34 ++++++++++-- .../gui/faction/page/FactionBrowserPage.java | 11 ++++ .../faction/page/FactionDashboardPage.java | 3 +- .../gui/faction/page/LogsViewerPage.java | 39 ++++++++++++-- .../newplayer/page/NewPlayerBrowsePage.java | 10 ++++ .../com/hyperfactions/util/MessageKeys.java | 39 ++++++++++++++ .../faction/faction_browse_entry.ui | 18 +++---- .../newplayer/newplayer_faction_entry.ui | 12 ++--- .../Languages/en-US/hyperfactions_gui.lang | 34 ++++++++++++ .../Languages/es-ES/hyperfactions_gui.lang | 54 ++++++++++++++++--- 10 files changed, 221 insertions(+), 33 deletions(-) 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 c2284a90..62790952 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java @@ -27,6 +27,7 @@ import com.hypixel.hytale.server.core.universe.PlayerRef; import com.hypixel.hytale.server.core.universe.world.storage.EntityStore; import java.util.*; +import java.util.concurrent.TimeUnit; import org.jetbrains.annotations.Nullable; /** @@ -126,7 +127,8 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { List typeOptions = new ArrayList<>(); typeOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.AdminGui.LOG_ALL_TYPES)), "ALL")); for (FactionLog.LogType type : FactionLog.LogType.values()) { - typeOptions.add(new DropdownEntryInfo(LocalizableString.fromString(type.getDisplayName()), type.name())); + typeOptions.add(new DropdownEntryInfo(LocalizableString.fromString( + HFMessages.get(playerRef, MessageKeys.LogsGui.typeKey(type.name()))), type.name())); } cmd.set("#TypeDropdown.Entries", typeOptions); cmd.set("#TypeDropdown.Value", filterType != null ? filterType.name() : "ALL"); @@ -190,11 +192,11 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { cmd.append("#LogList", UIPaths.ADMIN_ACTIVITY_LOG_ENTRY); - // Time - cmd.set(sel + " #LogTime.Text", TimeUtil.formatRelative(entry.log.timestamp())); + // Time (localized) + cmd.set(sel + " #LogTime.Text", formatRelativeTime(entry.log.timestamp())); - // Type with color - cmd.set(sel + " #LogType.Text", entry.log.type().getDisplayName()); + // Type with color (localized) + cmd.set(sel + " #LogType.Text", HFMessages.get(playerRef, MessageKeys.LogsGui.typeKey(entry.log.type().name()))); cmd.set(sel + " #LogType.Style.TextColor", GuiColors.forLogType(entry.log.type())); // Faction name with color @@ -363,6 +365,28 @@ public void handleDataEvent(Ref ref, Store store, } } + /** Returns a localized relative time string for the given timestamp. */ + private String formatRelativeTime(long timestamp) { + long diff = System.currentTimeMillis() - timestamp; + if (diff < 60_000) { + return HFMessages.get(playerRef, MessageKeys.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); + } 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); + } 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); + } 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); + } else { + return TimeUtil.formatDate(timestamp); + } + } + private void rebuildList() { UICommandBuilder cmd = new UICommandBuilder(); UIEventBuilder events = new UIEventBuilder(); 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 8de7a5f1..056d952e 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionBrowserPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionBrowserPage.java @@ -244,6 +244,11 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int cmd.set(idx + " #ClaimsDisplay.Text", String.valueOf(entry.claimCount)); 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)); + // Own faction indicator if (isOwnFaction) { cmd.set(idx + " #OwnIndicator.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.OWN_FACTION)); @@ -275,6 +280,12 @@ 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)); + // Recruitment status cmd.set(idx + " #RecruitmentStatus.Text", entry.isOpen ? HFMessages.get(playerRef, MessageKeys.FactionInfoGui.STATUS_OPEN) 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 636c81c7..978f6e48 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionDashboardPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionDashboardPage.java @@ -422,7 +422,8 @@ private void buildActivityFeed(UICommandBuilder cmd, UIEventBuilder events, Fact String idx = "#ActivityFeed[" + i + "]"; cmd.append("#ActivityFeed", UIPaths.ACTIVITY_ENTRY); - cmd.set(idx + " #ActivityType.Text", log.type().getDisplayName().toUpperCase()); + cmd.set(idx + " #ActivityType.Text", + HFMessages.get(playerRef, MessageKeys.LogsGui.typeKey(log.type().name())).toUpperCase()); cmd.set(idx + " #ActivityMessage.Text", log.message()); cmd.set(idx + " #ActivityTime.Text", formatTimeAgo(log.timestamp())); } 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 5995e499..d0160702 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/LogsViewerPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/LogsViewerPage.java @@ -28,6 +28,7 @@ import java.util.ArrayList; import java.util.Comparator; import java.util.List; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import org.jetbrains.annotations.Nullable; @@ -41,6 +42,7 @@ public class LogsViewerPage extends InteractiveCustomUIPage { private static final int LOGS_PER_PAGE = 10; + private final PlayerRef playerRef; private final FactionManager factionManager; @@ -130,7 +132,7 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { List filterOptions = new ArrayList<>(); filterOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, MessageKeys.LogsGui.ALL_TYPES)), "ALL")); for (FactionLog.LogType type : FactionLog.LogType.values()) { - filterOptions.add(new DropdownEntryInfo(LocalizableString.fromString(type.getDisplayName()), type.name())); + filterOptions.add(new DropdownEntryInfo(LocalizableString.fromString(getLocalizedTypeName(type)), type.name())); } cmd.set("#FilterDropdown.Entries", filterOptions); cmd.set("#FilterDropdown.Value", filterType != null ? filterType.name() : "ALL"); @@ -160,11 +162,11 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { cmd.append("#LogsList", UIPaths.LOG_ENTRY); - // Time - cmd.set(sel + " #LogTime.Text", TimeUtil.formatRelative(log.timestamp())); + // Time (localized) + cmd.set(sel + " #LogTime.Text", formatRelativeTime(log.timestamp())); - // Type badge with color - cmd.set(sel + " #LogType.Text", log.type().getDisplayName()); + // Type badge with color (localized) + cmd.set(sel + " #LogType.Text", getLocalizedTypeName(log.type())); cmd.set(sel + " #LogType.Style.TextColor", GuiColors.forLogType(log.type())); // Message @@ -254,6 +256,33 @@ public void handleDataEvent(Ref ref, Store store, } } + /** Returns a localized relative time string for the given timestamp. */ + private String formatRelativeTime(long timestamp) { + long diff = System.currentTimeMillis() - timestamp; + if (diff < 60_000) { + return HFMessages.get(playerRef, MessageKeys.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); + } 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); + } 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); + } 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); + } else { + return TimeUtil.formatDate(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())); + } + private void rebuildList() { UICommandBuilder cmd = new UICommandBuilder(); UIEventBuilder events = new UIEventBuilder(); diff --git a/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerBrowsePage.java b/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerBrowsePage.java index 26f20ab4..2293c969 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerBrowsePage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerBrowsePage.java @@ -283,6 +283,10 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int cmd.set(idx + " #PowerDisplay.Text", String.format("%.0f/%.0f", entry.power, entry.maxPower)); 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)); + // Expansion state cmd.set(idx + " #ExpandIcon.Visible", !isExpanded); cmd.set(idx + " #CollapseIcon.Visible", isExpanded); @@ -299,6 +303,12 @@ 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)); + // Leader and claims cmd.set(idx + " #LeaderName.Text", entry.leaderName); cmd.set(idx + " #ClaimsDisplay.Text", String.valueOf(entry.claimCount)); diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 4a4a316d..96535d9b 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -881,6 +881,14 @@ public static final class BrowserGui { 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() {} } @@ -1335,6 +1343,37 @@ public static final class LogsGui { 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(); + } private LogsGui() {} } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_browse_entry.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_browse_entry.ui index e04c92b4..20f4f8e3 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_browse_entry.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_browse_entry.ui @@ -61,7 +61,7 @@ Group { Style: (FontSize: 12, TextColor: #44CC44, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 18); } - Label { + Label #PowerLabel { Text: "power"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 14); @@ -78,7 +78,7 @@ Group { Style: (FontSize: 12, TextColor: #FFAA00, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 18); } - Label { + Label #ClaimsLabel { Text: "claims"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 14); @@ -95,7 +95,7 @@ Group { Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 18); } - Label { + Label #MemberLabel { Text: "members"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 14); @@ -136,18 +136,18 @@ Group { LayoutMode: Left; Anchor: (Height: 20, Bottom: 4); - Label { + Label #RecruitmentLabel { Text: "Recruitment:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 75); + Anchor: (Width: 85); } Label #RecruitmentStatus { Text: "Unknown"; Style: (FontSize: 10, TextColor: #888888, VerticalAlignment: Center); - Anchor: (Width: 100); + Anchor: (Width: 90); } - Label { + Label #CreatedLabel { Text: "Created:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 55); @@ -164,10 +164,10 @@ Group { LayoutMode: Left; Anchor: (Height: 18, Bottom: 6); - Label { + Label #DescriptionLabel { Text: "Description:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 75); + Anchor: (Width: 85); } Label #Description { Text: "No description set"; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/newplayer_faction_entry.ui b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/newplayer_faction_entry.ui index b5b0f46c..888e2439 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/newplayer_faction_entry.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/newplayer_faction_entry.ui @@ -45,7 +45,7 @@ Group { Style: (FontSize: 12, TextColor: #44CC44, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 18); } - Label { + Label #PowerLabel { Text: "power"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 14); @@ -62,7 +62,7 @@ Group { Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 18); } - Label { + Label #MemberLabel { Text: "members"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 14); @@ -103,7 +103,7 @@ Group { LayoutMode: Left; Anchor: (Height: 20, Bottom: 4); - Label { + Label #LeaderLabel { Text: "Leader:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 50); @@ -114,7 +114,7 @@ Group { Anchor: (Width: 120); } - Label { + Label #ClaimsLabel { Text: "Claims:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 50); @@ -131,10 +131,10 @@ Group { LayoutMode: Left; Anchor: (Height: 18, Bottom: 6); - Label { + Label #DescriptionLabel { Text: "Description:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 75); + Anchor: (Width: 85); } Label #Description { Text: "No description set"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index 2e38f503..780b01f0 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -205,6 +205,14 @@ browser.prev_btn = < Prev browser.next_btn = Next > browser.sort_name = Name browser.invalid_faction = Invalid faction. +browser.label_power = power +browser.label_claims = claims +browser.label_members = members +browser.label_recruitment = Recruitment: +browser.label_created = Created: +browser.label_description = Description: +browser.view_info_btn = View Info +browser.label_leader = Leader: # ========== Leaderboard Page ========== leaderboard.title = Faction Leaderboard @@ -523,6 +531,32 @@ logs.next_btn = Next > logs.all_types = All Types logs.no_logs_type = No logs of this type. logs.no_logs = No activity logs yet. +logs.time_just_now = just now +logs.time_minute = {0} minute ago +logs.time_minutes = {0} minutes ago +logs.time_hour = {0} hour ago +logs.time_hours = {0} hours ago +logs.time_day = {0} day ago +logs.time_days = {0} days ago +logs.time_week = {0} week ago +logs.time_weeks = {0} weeks ago +logs.type_member_join = Join +logs.type_member_leave = Leave +logs.type_member_kick = Kick +logs.type_member_promote = Promote +logs.type_member_demote = Demote +logs.type_claim = Claim +logs.type_unclaim = Unclaim +logs.type_overclaim = Overclaim +logs.type_home_set = Home Set +logs.type_relation_ally = Ally +logs.type_relation_enemy = Enemy +logs.type_relation_neutral = Neutral +logs.type_leader_transfer = Transfer +logs.type_settings_change = Settings +logs.type_power_change = Power +logs.type_economy = Economy +logs.type_admin_power = Admin Power # ========== Chat Page ========== chat.title = Faction Chat diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang index 475d5229..cd99dafd 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang @@ -173,14 +173,14 @@ common.sort_members = Miembros common.page_format = {0}/{1} common.own_faction = (Tu) common.search = Buscar: -common.sort = Ordenar: +common.sort = Orden: common.prev = < Anterior common.next = Siguiente > # ========== Pagina de Miembros ========== members.title = Miembros members.search_label = Buscar: -members.sort_label = Ordenar: +members.sort_label = Orden: members.prev_btn = < Anterior members.next_btn = Siguiente > members.count = {0} miembros @@ -200,15 +200,23 @@ members.kick_failed = No se pudo expulsar: {0} # ========== Pagina del Explorador ========== browser.title = Explorar Facciones browser.search_label = Buscar: -browser.sort_label = Ordenar: +browser.sort_label = Orden: browser.prev_btn = < Anterior browser.next_btn = Siguiente > browser.sort_name = Nombre browser.invalid_faction = Faccion invalida. +browser.label_power = poder +browser.label_claims = reclamos +browser.label_members = miembros +browser.label_recruitment = Reclutamiento: +browser.label_created = Creada: +browser.label_description = Descripcion: +browser.view_info_btn = Ver Info +browser.label_leader = Lider: # ========== Pagina de Clasificacion ========== leaderboard.title = Clasificacion de Facciones -leaderboard.rank_by = Clasificar por: +leaderboard.rank_by = Orden: leaderboard.col_rank = # leaderboard.col_faction = Faccion leaderboard.col_claims = Reclamos @@ -251,7 +259,7 @@ playerinfo.reason_disbanded = DISUELTA relations.title = Relaciones relations.tab_relations = Relaciones relations.tab_pending = Pendientes -relations.set_relation_btn = + Establecer Relacion +relations.set_relation_btn = + Nueva Relacion relations.prev_btn = < Anterior relations.next_btn = Siguiente > relations.relation_count = {0} relaciones @@ -292,7 +300,7 @@ settings.status_label = Estado: settings.home_location = Ubicacion del Hogar settings.location_label = Ubicacion: settings.set_home_btn = Fijar Hogar -settings.teleport_btn = Teletransportar +settings.teleport_btn = Teleportar settings.delete_btn = Eliminar settings.optional_features = Funciones Opcionales settings.configure_modules = Configurar modulos opcionales. @@ -514,9 +522,41 @@ confirm.leadership_transferred = Liderazgo transferido a {0}. # ========== Pagina del Visor de Registros ========== logs.title = {0} - Registros de Actividad logs.entry_count = {0} entradas +logs.filter_label = Filtrar: +logs.col_time = Hora +logs.col_type = Tipo +logs.col_message = Mensaje +logs.prev_btn = < Anterior +logs.next_btn = Siguiente > logs.all_types = Todos los Tipos logs.no_logs_type = No hay registros de este tipo. logs.no_logs = No hay registros de actividad aun. +logs.time_just_now = ahora mismo +logs.time_minute = hace {0} minuto +logs.time_minutes = hace {0} minutos +logs.time_hour = hace {0} hora +logs.time_hours = hace {0} horas +logs.time_day = hace {0} dia +logs.time_days = hace {0} dias +logs.time_week = hace {0} semana +logs.time_weeks = hace {0} semanas +logs.type_member_join = Ingreso +logs.type_member_leave = Salida +logs.type_member_kick = Expulsion +logs.type_member_promote = Ascenso +logs.type_member_demote = Descenso +logs.type_claim = Reclamo +logs.type_unclaim = Desreclamo +logs.type_overclaim = Sobrerreclamo +logs.type_home_set = Hogar +logs.type_relation_ally = Aliado +logs.type_relation_enemy = Enemigo +logs.type_relation_neutral = Neutral +logs.type_leader_transfer = Liderazgo +logs.type_settings_change = Ajustes +logs.type_power_change = Poder +logs.type_economy = Economia +logs.type_admin_power = Admin # ========== Pagina de Chat ========== chat.title = Chat de Faccion @@ -639,7 +679,7 @@ newplayer.legend_warzone = Zona de Guerra newplayer.legend_faction = Faccion newplayer.legend_wilderness = Naturaleza newplayer.search_label = Buscar: -newplayer.sort_label = Ordenar: +newplayer.sort_label = Orden: newplayer.prev_btn = < Anterior newplayer.next_btn = Siguiente > newplayer.pending_count = {0} pendientes From e7dc9448ca88422116a7add9dd2123bf62fe4b70 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Tue, 10 Mar 2026 20:15:04 -0700 Subject: [PATCH 47/55] feat(i18n): localize admin GUI pages, entry templates, and zone flag display names Localize admin dashboard stats, faction/player/zone list entries, activity log types and timestamps, economy/treasury labels, zone flags with display names, integration flags, relation buttons, action buttons, and faction log enhancements. Add ~100 new keys to both en-US and es-ES admin and GUI lang files. --- .../admin/handler/AdminPowerHandler.java | 45 +++++-- .../command/faction/CloseSubCommand.java | 3 +- .../command/faction/ColorSubCommand.java | 3 +- .../command/faction/DescSubCommand.java | 3 +- .../command/faction/OpenSubCommand.java | 3 +- .../command/faction/RenameSubCommand.java | 3 +- .../java/com/hyperfactions/data/Faction.java | 4 +- .../com/hyperfactions/data/FactionLog.java | 65 ++++++++-- .../com/hyperfactions/data/ZoneFlags.java | 12 ++ .../economy/UpkeepProcessor.java | 22 +++- .../gui/admin/page/AdminActionsPage.java | 4 + .../gui/admin/page/AdminActivityLogPage.java | 4 +- .../gui/admin/page/AdminFactionInfoPage.java | 6 +- .../admin/page/AdminFactionRelationsPage.java | 6 + .../gui/admin/page/AdminFactionsPage.java | 17 +++ .../gui/admin/page/AdminPlayerInfoPage.java | 43 +++++-- .../gui/admin/page/AdminPlayersPage.java | 18 ++- .../page/AdminZoneIntegrationFlagsPage.java | 16 ++- .../gui/admin/page/AdminZonePage.java | 15 +++ .../gui/admin/page/AdminZoneSettingsPage.java | 7 +- .../faction/page/FactionDashboardPage.java | 2 +- .../gui/faction/page/LogsViewerPage.java | 4 +- .../gui/faction/page/TreasuryPage.java | 3 +- .../importer/ElbaphFactionsImporter.java | 10 +- .../importer/HyFactionsImporter.java | 7 +- .../hyperfactions/manager/ClaimManager.java | 25 ++-- .../hyperfactions/manager/EconomyManager.java | 15 ++- .../hyperfactions/manager/FactionManager.java | 31 +++-- .../manager/RelationManager.java | 4 +- .../storage/json/JsonFactionStorage.java | 22 +++- .../com/hyperfactions/util/HFMessages.java | 18 +++ .../com/hyperfactions/util/MessageKeys.java | 117 ++++++++++++++++++ .../HyperFactions/admin/admin_dashboard.ui | 5 +- .../admin/admin_faction_entry.ui | 10 +- .../HyperFactions/admin/admin_faction_info.ui | 6 +- .../HyperFactions/admin/admin_factions.ui | 2 +- .../HyperFactions/admin/admin_player_entry.ui | 12 +- .../HyperFactions/admin/admin_zone_entry.ui | 10 +- .../HyperFactions/faction/activity_entry.ui | 40 +++--- .../Languages/en-US/hyperfactions_admin.lang | 98 +++++++++++++++ .../Languages/en-US/hyperfactions_gui.lang | 68 ++++++++++ .../Languages/es-ES/hyperfactions_admin.lang | 98 +++++++++++++++ .../Languages/es-ES/hyperfactions_gui.lang | 68 ++++++++++ 43 files changed, 840 insertions(+), 134 deletions(-) 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 a08f2af8..055af530 100644 --- a/src/main/java/com/hyperfactions/command/admin/handler/AdminPowerHandler.java +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminPowerHandler.java @@ -13,6 +13,7 @@ import com.hyperfactions.platform.HyperFactionsPlugin; import com.hyperfactions.util.CommandHelp; import com.hyperfactions.util.HelpFormatter; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.util.PlayerResolver; import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.command.system.CommandContext; @@ -132,6 +133,14 @@ private void logAdminPowerChange(UUID targetUuid, UUID adminUuid, String message } } + private void logAdminPowerChange(UUID targetUuid, UUID adminUuid, String message, String key, String... args) { + Faction faction = hyperFactions.getFactionManager().getPlayerFaction(targetUuid); + if (faction != null) { + Faction updated = faction.withLog(FactionLog.create(FactionLog.LogType.ADMIN_POWER, message, adminUuid, key, args)); + hyperFactions.getFactionManager().updateFaction(updated); + } + } + // /f admin power set /** Handles power set. */ public void handlePowerSet(CommandContext ctx, UUID senderUuid, String[] args) { @@ -155,7 +164,8 @@ public void handlePowerSet(CommandContext ctx, UUID senderUuid, String[] args) { double oldPower = hyperFactions.getPowerManager().getPlayerPower(target.uuid()).power(); 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) + ")"); + "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)); ctx.sendMessage(prefix().insert(msg("Set ", COLOR_GREEN)) .insert(msg(target.name(), COLOR_CYAN)) .insert(msg("'s power to ", COLOR_GREEN)) @@ -186,7 +196,8 @@ public void handlePowerAdd(CommandContext ctx, UUID senderUuid, String[] args) { double oldPower = hyperFactions.getPowerManager().getPlayerPower(target.uuid()).power(); 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) + ")"); + "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)); ctx.sendMessage(prefix().insert(msg("Added ", COLOR_GREEN)) .insert(msg(String.format("%.1f", amount), COLOR_WHITE)) .insert(msg(" power to ", COLOR_GREEN)) @@ -217,7 +228,8 @@ public void handlePowerRemove(CommandContext ctx, UUID senderUuid, String[] args double oldPower = hyperFactions.getPowerManager().getPlayerPower(target.uuid()).power(); 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) + ")"); + "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)); ctx.sendMessage(prefix().insert(msg("Removed ", COLOR_GREEN)) .insert(msg(String.format("%.1f", amount), COLOR_WHITE)) .insert(msg(" power from ", COLOR_GREEN)) @@ -241,7 +253,8 @@ public void handlePowerReset(CommandContext ctx, UUID senderUuid, String[] args) double oldPower = hyperFactions.getPowerManager().getPlayerPower(target.uuid()).power(); 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) + ")"); + "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)); ctx.sendMessage(prefix().insert(msg("Reset ", COLOR_GREEN)) .insert(msg(target.name(), COLOR_CYAN)) .insert(msg("'s power to ", COLOR_GREEN)) @@ -277,7 +290,8 @@ public void handlePowerSetMax(CommandContext ctx, UUID senderUuid, String[] args double oldMax = oldPower.getEffectiveMaxPower(); 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) + ")"); + "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)); ctx.sendMessage(prefix().insert(msg("Set ", COLOR_GREEN)) .insert(msg(target.name(), COLOR_CYAN)) .insert(msg("'s max power to ", COLOR_GREEN)) @@ -303,7 +317,8 @@ public void handlePowerResetMax(CommandContext ctx, UUID senderUuid, String[] ar hyperFactions.getPowerManager().resetPlayerMaxPower(target.uuid()); double globalMax = ConfigManager.get().getMaxPlayerPower(); logAdminPowerChange(target.uuid(), senderUuid, - "Admin reset " + target.name() + "'s max power to global default (" + String.format("%.1f", globalMax) + ")"); + "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)); ctx.sendMessage(prefix().insert(msg("Reset ", COLOR_GREEN)) .insert(msg(target.name(), COLOR_CYAN)) .insert(msg("'s max power to global default ", COLOR_GREEN)) @@ -328,7 +343,8 @@ public void handlePowerNoLoss(CommandContext ctx, UUID senderUuid, String[] args boolean newState = !current.powerLossDisabled(); hyperFactions.getPowerManager().setPlayerPowerLossDisabled(target.uuid(), newState); logAdminPowerChange(target.uuid(), senderUuid, - "Admin " + (newState ? "disabled" : "enabled") + " power loss for " + target.name()); + "Admin " + (newState ? "disabled" : "enabled") + " power loss for " + target.name(), + newState ? MessageKeys.LogsGui.MSG_ADMIN_POWERLOSS_DISABLED : MessageKeys.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)) @@ -352,7 +368,8 @@ public void handlePowerNoDecay(CommandContext ctx, UUID senderUuid, String[] arg boolean newState = !current.claimDecayExempt(); hyperFactions.getPowerManager().setPlayerClaimDecayExempt(target.uuid(), newState); logAdminPowerChange(target.uuid(), senderUuid, - "Admin " + (newState ? "enabled" : "disabled") + " claim decay exemption for " + target.name()); + "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()); 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)) @@ -392,7 +409,8 @@ public void handlePowerFaction(CommandContext ctx, UUID senderUuid, String[] arg hyperFactions.getFactionManager().updateFaction(faction.withLog(FactionLog.create( FactionLog.LogType.ADMIN_POWER, "Admin set all " + members.size() + " members' power to " + String.format("%.1f", amount), - senderUuid))); + senderUuid, + MessageKeys.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)) @@ -413,7 +431,8 @@ public void handlePowerFaction(CommandContext ctx, UUID senderUuid, String[] arg hyperFactions.getFactionManager().updateFaction(faction.withLog(FactionLog.create( FactionLog.LogType.ADMIN_POWER, "Admin added " + String.format("%.1f", amount) + " power to all " + members.size() + " members", - senderUuid))); + senderUuid, + MessageKeys.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)) @@ -434,7 +453,8 @@ public void handlePowerFaction(CommandContext ctx, UUID senderUuid, String[] arg hyperFactions.getFactionManager().updateFaction(faction.withLog(FactionLog.create( FactionLog.LogType.ADMIN_POWER, "Admin removed " + String.format("%.1f", amount) + " power from all " + members.size() + " members", - senderUuid))); + senderUuid, + MessageKeys.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)) @@ -447,7 +467,8 @@ public void handlePowerFaction(CommandContext ctx, UUID senderUuid, String[] arg hyperFactions.getFactionManager().updateFaction(faction.withLog(FactionLog.create( FactionLog.LogType.ADMIN_POWER, "Admin reset power for all " + members.size() + " members", - senderUuid))); + senderUuid, + MessageKeys.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)) diff --git a/src/main/java/com/hyperfactions/command/faction/CloseSubCommand.java b/src/main/java/com/hyperfactions/command/faction/CloseSubCommand.java index 20ded497..1273fccf 100644 --- a/src/main/java/com/hyperfactions/command/faction/CloseSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/CloseSubCommand.java @@ -62,7 +62,8 @@ protected void execute(@NotNull CommandContext ctx, Faction updated = faction.withOpen(false) .withLog(FactionLog.create(FactionLog.LogType.SETTINGS_CHANGE, - "Faction set to invite-only", player.getUuid())); + "Faction set to invite-only", player.getUuid(), + MessageKeys.LogsGui.MSG_SET_CLOSED)); hyperFactions.getFactionManager().updateFaction(updated); diff --git a/src/main/java/com/hyperfactions/command/faction/ColorSubCommand.java b/src/main/java/com/hyperfactions/command/faction/ColorSubCommand.java index 6d54beec..3baedd9f 100644 --- a/src/main/java/com/hyperfactions/command/faction/ColorSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/ColorSubCommand.java @@ -97,7 +97,8 @@ protected void execute(@NotNull CommandContext ctx, Faction updated = faction.withColor(hexColor) .withLog(FactionLog.create(FactionLog.LogType.SETTINGS_CHANGE, - "Color changed to '" + hexColor + "'", player.getUuid())); + "Color changed to '" + hexColor + "'", player.getUuid(), + MessageKeys.LogsGui.MSG_COLOR_CHANGED, hexColor)); hyperFactions.getFactionManager().updateFaction(updated); diff --git a/src/main/java/com/hyperfactions/command/faction/DescSubCommand.java b/src/main/java/com/hyperfactions/command/faction/DescSubCommand.java index bd9476a2..605e25e3 100644 --- a/src/main/java/com/hyperfactions/command/faction/DescSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/DescSubCommand.java @@ -73,7 +73,8 @@ 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 ? "Description set" : "Description cleared", player.getUuid(), + description != null ? MessageKeys.LogsGui.MSG_DESC_SET : MessageKeys.LogsGui.MSG_DESC_CLEARED)); hyperFactions.getFactionManager().updateFaction(updated); diff --git a/src/main/java/com/hyperfactions/command/faction/OpenSubCommand.java b/src/main/java/com/hyperfactions/command/faction/OpenSubCommand.java index 01a26041..60702100 100644 --- a/src/main/java/com/hyperfactions/command/faction/OpenSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/OpenSubCommand.java @@ -62,7 +62,8 @@ protected void execute(@NotNull CommandContext ctx, Faction updated = faction.withOpen(true) .withLog(FactionLog.create(FactionLog.LogType.SETTINGS_CHANGE, - "Faction set to open", player.getUuid())); + "Faction set to open", player.getUuid(), + MessageKeys.LogsGui.MSG_SET_OPEN)); hyperFactions.getFactionManager().updateFaction(updated); diff --git a/src/main/java/com/hyperfactions/command/faction/RenameSubCommand.java b/src/main/java/com/hyperfactions/command/faction/RenameSubCommand.java index 1a026b04..9c90fde6 100644 --- a/src/main/java/com/hyperfactions/command/faction/RenameSubCommand.java +++ b/src/main/java/com/hyperfactions/command/faction/RenameSubCommand.java @@ -93,7 +93,8 @@ protected void execute(@NotNull CommandContext ctx, String oldName = faction.name(); Faction updated = faction.withName(newName) .withLog(FactionLog.create(FactionLog.LogType.SETTINGS_CHANGE, - "Renamed from '" + oldName + "' to '" + newName + "'", player.getUuid())); + "Renamed from '" + oldName + "' to '" + newName + "'", player.getUuid(), + MessageKeys.LogsGui.MSG_RENAMED, oldName, newName)); hyperFactions.getFactionManager().updateFaction(updated); diff --git a/src/main/java/com/hyperfactions/data/Faction.java b/src/main/java/com/hyperfactions/data/Faction.java index c5ca822f..29b8a181 100644 --- a/src/main/java/com/hyperfactions/data/Faction.java +++ b/src/main/java/com/hyperfactions/data/Faction.java @@ -1,6 +1,7 @@ package com.hyperfactions.data; import com.hyperfactions.util.LegacyColorParser; +import com.hyperfactions.util.MessageKeys; import java.util.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -74,7 +75,8 @@ public static Faction create(@NotNull String name, @NotNull UUID leaderUuid, @No members.put(leaderUuid, leader); List logs = new ArrayList<>(); - logs.add(FactionLog.create(FactionLog.LogType.MEMBER_JOIN, leaderName + " created the faction", leaderUuid)); + logs.add(FactionLog.create(FactionLog.LogType.MEMBER_JOIN, leaderName + " created the faction", leaderUuid, + MessageKeys.LogsGui.MSG_FACTION_CREATED, leaderName)); return new Faction( UUID.randomUUID(), diff --git a/src/main/java/com/hyperfactions/data/FactionLog.java b/src/main/java/com/hyperfactions/data/FactionLog.java index 90ffc32c..dcaf774d 100644 --- a/src/main/java/com/hyperfactions/data/FactionLog.java +++ b/src/main/java/com/hyperfactions/data/FactionLog.java @@ -1,5 +1,6 @@ package com.hyperfactions.data; +import java.util.List; import java.util.UUID; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -7,17 +8,32 @@ /** * Represents a log entry for faction activity. * - * @param type the type of log entry - * @param message the log message - * @param timestamp when this occurred (epoch millis) - * @param actorUuid UUID of the player who performed the action (null for system) + *

Supports i18n via optional {@code messageKey} and {@code messageArgs} fields. + * When present, display code resolves the key per-locale using HFMessages. + * The {@code message} field always contains the English fallback text. + * + * @param type the type of log entry + * @param message the log message (English fallback, always populated) + * @param timestamp when this occurred (epoch millis) + * @param actorUuid UUID of the player who performed the action (null for system) + * @param messageKey i18n message key for localized display (null for legacy logs) + * @param messageArgs arguments for the message key placeholders (null if no args) */ public record FactionLog( @NotNull LogType type, @NotNull String message, long timestamp, - @Nullable UUID actorUuid + @Nullable UUID actorUuid, + @Nullable String messageKey, + @Nullable List messageArgs ) { + + /** Backward-compatible constructor for legacy logs (no i18n key). */ + public FactionLog(@NotNull LogType type, @NotNull String message, + long timestamp, @Nullable UUID actorUuid) { + this(type, message, timestamp, actorUuid, null, null); + } + /** * Types of faction log entries. */ @@ -56,23 +72,54 @@ public String getDisplayName() { * Creates a new log entry at the current time. * * @param type the log type - * @param message the message + * @param message the English fallback message * @param actorUuid the actor's UUID * @return a new FactionLog */ public static FactionLog create(@NotNull LogType type, @NotNull String message, @Nullable UUID actorUuid) { - return new FactionLog(type, message, System.currentTimeMillis(), actorUuid); + return new FactionLog(type, message, System.currentTimeMillis(), actorUuid, null, null); + } + + /** + * Creates a new log entry with i18n support. + * + * @param type the log type + * @param message the English fallback message + * @param actorUuid the actor's UUID + * @param key the i18n message key + * @param args arguments for the message key placeholders + * @return a new FactionLog with i18n data + */ + public static FactionLog create(@NotNull LogType type, @NotNull String message, + @Nullable UUID actorUuid, @NotNull String key, String... args) { + return new FactionLog(type, message, System.currentTimeMillis(), actorUuid, + key, args.length > 0 ? List.of(args) : null); } /** * Creates a system log entry (no actor). * * @param type the log type - * @param message the message + * @param message the English fallback message * @return a new FactionLog with null actor */ public static FactionLog system(@NotNull LogType type, @NotNull String message) { - return new FactionLog(type, message, System.currentTimeMillis(), null); + return new FactionLog(type, message, System.currentTimeMillis(), null, null, null); + } + + /** + * Creates a system log entry with i18n support (no actor). + * + * @param type the log type + * @param message the English fallback message + * @param key the i18n message key + * @param args arguments for the message key placeholders + * @return a new FactionLog with i18n data and null actor + */ + public static FactionLog system(@NotNull LogType type, @NotNull String message, + @NotNull String key, String... args) { + return new FactionLog(type, message, System.currentTimeMillis(), null, + key, args.length > 0 ? List.of(args) : null); } /** diff --git a/src/main/java/com/hyperfactions/data/ZoneFlags.java b/src/main/java/com/hyperfactions/data/ZoneFlags.java index 74be315e..569a2abc 100644 --- a/src/main/java/com/hyperfactions/data/ZoneFlags.java +++ b/src/main/java/com/hyperfactions/data/ZoneFlags.java @@ -759,6 +759,18 @@ public static String getDisplayName(String flagName) { }; } + /** + * Gets the i18n lang key for a flag's display name. + * Maps flag names like "pvp_enabled" to keys like "hyperfactions_admin.gui.zflag_pvp_enabled". + * + * @param flagName the flag name + * @return the lang key for the display name + */ + @NotNull + public static String getDisplayNameKey(String flagName) { + return "hyperfactions_admin.gui.zflag_" + flagName; + } + /** * Gets a short description for a flag. * diff --git a/src/main/java/com/hyperfactions/economy/UpkeepProcessor.java b/src/main/java/com/hyperfactions/economy/UpkeepProcessor.java index e0b6b9e7..3332ef09 100644 --- a/src/main/java/com/hyperfactions/economy/UpkeepProcessor.java +++ b/src/main/java/com/hyperfactions/economy/UpkeepProcessor.java @@ -12,6 +12,7 @@ import com.hyperfactions.integration.economy.VaultEconomyProvider; import com.hyperfactions.util.ErrorHandler; import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.List; @@ -150,7 +151,8 @@ public void processUpkeep() { "#55FF55"); logToFaction(faction.id(), FactionLog.LogType.ECONOMY, String.format("Upkeep paid: %s (%d billable chunks)", - economyManager.formatCurrency(cost), billableChunks)); + economyManager.formatCurrency(cost), billableChunks), + MessageKeys.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); @@ -204,7 +206,8 @@ private FactionEconomy handlePaymentFailure(@NotNull Faction faction, @NotNull F reason + " Grace period: " + config.getUpkeepGracePeriodHours() + "h", "#FFAA00"); logToFaction(faction.id(), FactionLog.LogType.ECONOMY, - "Upkeep failed: grace period started (" + config.getUpkeepGracePeriodHours() + "h)"); + "Upkeep failed: grace period started (" + config.getUpkeepGracePeriodHours() + "h)", + MessageKeys.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; @@ -225,7 +228,8 @@ private FactionEconomy handlePaymentFailure(@NotNull Faction faction, @NotNull F "Upkeep still unpaid! Grace expires in " + remaining, "#FFAA00"); logToFaction(faction.id(), FactionLog.LogType.ECONOMY, - "Upkeep missed (payment " + missed + "), grace expires in " + remaining); + "Upkeep missed (payment " + missed + "), grace expires in " + remaining, + MessageKeys.LogsGui.MSG_UPKEEP_MISSED, String.valueOf(missed), remaining); Logger.debugEconomy("Grace continues for %s: %s remaining (missed: %d)", faction.name(), remaining, missed); @@ -249,7 +253,8 @@ private FactionEconomy handlePaymentFailure(@NotNull Faction faction, @NotNull F Faction current = factionManager.getFaction(faction.id()); 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)); + 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))); factionManager.updateFaction(logged); } @@ -390,6 +395,15 @@ private void logToFaction(@NotNull UUID factionId, @NotNull FactionLog.LogType t } } + private void logToFaction(@NotNull UUID factionId, @NotNull FactionLog.LogType type, + @NotNull String message, @NotNull String key, String... args) { + Faction faction = factionManager.getFaction(factionId); + if (faction != null) { + Faction logged = faction.withLog(FactionLog.system(type, message, key, args)); + factionManager.updateFaction(logged); + } + } + private void notifyFaction(@NotNull UUID factionId, @NotNull String message, @NotNull String hexColor) { if (notificationCallback != null) { try { 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 bac0528e..525a25a3 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminActionsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminActionsPage.java @@ -86,6 +86,8 @@ 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)); + } else { + cmd.set("#ResetAllKDBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ACT_RESET_KD)); } // Bind the reset button @@ -107,6 +109,8 @@ private void buildContent(UICommandBuilder cmd, UIEventBuilder events) { if (upkeepEnabled) { if (confirmUpkeep) { cmd.set("#TriggerUpkeepBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.ACT_CONFIRM_TRIGGER)); + } else { + cmd.set("#TriggerUpkeepBtn.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ACT_TRIGGER_UPKEEP)); } events.addEventBinding(CustomUIEventBindingType.Activating, "#TriggerUpkeepBtn", EventData.of("Button", "TriggerUpkeep"), false); 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 62790952..2ae1ca72 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java @@ -207,8 +207,8 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { cmd.set(sel + " #FactionName.Text", factionDisplay); cmd.set(sel + " #FactionName.Style.TextColor", entry.factionColor); - // Message - cmd.set(sel + " #LogMessage.Text", entry.log.message()); + // Message (localized if key available, else English fallback) + cmd.set(sel + " #LogMessage.Text", HFMessages.resolveLogMessage(playerRef, entry.log())); index++; } 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 8c39071e..1a0d8c0a 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java @@ -326,7 +326,8 @@ 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())); + playerRef.getUuid(), + MessageKeys.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); @@ -342,7 +343,8 @@ 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())); + playerRef.getUuid(), + MessageKeys.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/AdminFactionRelationsPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java index ba8add17..fce9ec1e 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java @@ -99,6 +99,9 @@ private void buildRelationEntry(UICommandBuilder cmd, UIEventBuilder events, Str cmd.set(idx + " #FactionName.Text", entry.factionName); cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.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)); 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); @@ -130,6 +133,9 @@ private void buildSetRelationSection(UICommandBuilder cmd, UIEventBuilder events cmd.set(idx + " #FactionName.Text", other.name()); cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.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)); 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); } diff --git a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionsPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionsPage.java index 05815fd6..c2b2f8b2 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionsPage.java @@ -198,6 +198,11 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int cmd.set(idx + " #ClaimsDisplay.Text", String.valueOf(faction.claims().size())); 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)); + // Expansion state cmd.set(idx + " #ExpandIcon.Visible", !isExpanded); cmd.set(idx + " #CollapseIcon.Visible", isExpanded); @@ -214,6 +219,18 @@ 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)); + + // 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)); + // Created date String createdDate = DATE_FORMAT.format(Instant.ofEpochMilli(faction.createdAt())); cmd.set(idx + " #CreatedDate.Text", createdDate); 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 bdd562ef..9ccb1518 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java @@ -333,7 +333,9 @@ public void handleDataEvent(Ref ref, Store store, double newPower = powerManager.adjustPlayerPower(targetPlayerUuid, delta); logAdminPowerChange(adminUuid, "Admin adjusted " + targetPlayerName + "'s power by " + String.format("%.1f", delta) - + " (" + String.format("%.1f", oldPower) + " -> " + String.format("%.1f", newPower) + ")"); + + " (" + String.format("%.1f", oldPower) + " -> " + String.format("%.1f", newPower) + ")", + MessageKeys.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,9 @@ public void handleDataEvent(Ref ref, Store store, double newPower = powerManager.setPlayerPower(targetPlayerUuid, amount); logAdminPowerChange(adminUuid, "Admin set " + targetPlayerName + "'s power to " + String.format("%.1f", newPower) - + " (was " + String.format("%.1f", oldPower) + ")"); + + " (was " + String.format("%.1f", oldPower) + ")", + MessageKeys.LogsGui.MSG_ADMIN_POWER_SET, targetPlayerName, + String.format("%.1f", newPower), String.format("%.1f", oldPower)); reopenPage(player, ref, store, playerRef); } @@ -356,7 +360,9 @@ public void handleDataEvent(Ref ref, Store store, double newPower = powerManager.resetPlayerPower(targetPlayerUuid); logAdminPowerChange(adminUuid, "Admin reset " + targetPlayerName + "'s power to " + String.format("%.1f", newPower) - + " (was " + String.format("%.1f", oldPower) + ")"); + + " (was " + String.format("%.1f", oldPower) + ")", + MessageKeys.LogsGui.MSG_ADMIN_POWER_RESET, targetPlayerName, + String.format("%.1f", newPower), String.format("%.1f", oldPower)); reopenPage(player, ref, store, playerRef); } @@ -371,7 +377,9 @@ public void handleDataEvent(Ref ref, Store store, powerManager.setPlayerMaxPower(targetPlayerUuid, amount); logAdminPowerChange(adminUuid, "Admin set " + targetPlayerName + "'s max power to " + String.format("%.1f", amount) - + " (was " + String.format("%.1f", oldMax) + ")"); + + " (was " + String.format("%.1f", oldMax) + ")", + MessageKeys.LogsGui.MSG_ADMIN_MAXPOWER_SET, targetPlayerName, + String.format("%.1f", amount), String.format("%.1f", oldMax)); reopenPage(player, ref, store, playerRef); } @@ -380,7 +388,10 @@ public void handleDataEvent(Ref ref, Store store, double oldMax = old.getEffectiveMaxPower(); powerManager.resetPlayerMaxPower(targetPlayerUuid); logAdminPowerChange(adminUuid, - "Admin reset " + targetPlayerName + "'s max power to global default"); + "Admin reset " + targetPlayerName + "'s max power to global default (" + + String.format("%.1f", ConfigManager.get().getMaxPlayerPower()) + ")", + MessageKeys.LogsGui.MSG_ADMIN_MAXPOWER_RESET, targetPlayerName, + String.format("%.1f", ConfigManager.get().getMaxPlayerPower())); reopenPage(player, ref, store, playerRef); } @@ -390,7 +401,9 @@ public void handleDataEvent(Ref ref, Store store, boolean newState = !current.powerLossDisabled(); powerManager.setPlayerPowerLossDisabled(targetPlayerUuid, newState); logAdminPowerChange(adminUuid, - "Admin " + (newState ? "disabled" : "enabled") + " power loss for " + targetPlayerName); + "Admin " + (newState ? "disabled" : "enabled") + " power loss for " + targetPlayerName, + newState ? MessageKeys.LogsGui.MSG_ADMIN_POWERLOSS_DISABLED : MessageKeys.LogsGui.MSG_ADMIN_POWERLOSS_ENABLED, + targetPlayerName); reopenPage(player, ref, store, playerRef); } @@ -400,7 +413,9 @@ public void handleDataEvent(Ref ref, Store store, boolean newState = !current.claimDecayExempt(); powerManager.setPlayerClaimDecayExempt(targetPlayerUuid, newState); logAdminPowerChange(adminUuid, - "Admin " + (newState ? "enabled" : "disabled") + " claim decay exemption for " + targetPlayerName); + "Admin " + (newState ? "enabled" : "disabled") + " claim decay exemption for " + targetPlayerName, + newState ? MessageKeys.LogsGui.MSG_ADMIN_DECAY_ENABLED : MessageKeys.LogsGui.MSG_ADMIN_DECAY_DISABLED, + targetPlayerName); reopenPage(player, ref, store, playerRef); } @@ -412,7 +427,8 @@ public void handleDataEvent(Ref ref, Store store, Faction faction = factionManager.getPlayerFaction(targetPlayerUuid); if (faction != null) { Faction updated = faction.withLog(FactionLog.create(FactionLog.LogType.ADMIN_POWER, - "Admin reset K/D for " + targetPlayerName, adminUuid)); + "Admin reset K/D for " + targetPlayerName, adminUuid, + MessageKeys.LogsGui.MSG_ADMIN_KD_RESET, targetPlayerName)); factionManager.updateFaction(updated); } player.sendMessage(MessageUtil.adminSuccess(playerRef, MessageKeys.AdminGui.PLR_KD_RESET, targetPlayerName)); @@ -449,7 +465,8 @@ public void handleDataEvent(Ref ref, Store store, .withLog(FactionLog.create(FactionLog.LogType.LEADER_TRANSFER, "[Admin] Leadership transferred from " + targetPlayerName + " to " + successor.username() + " (admin kick)", - adminUuid)); + adminUuid, + MessageKeys.LogsGui.MSG_ADMIN_LEADER_KICK, targetPlayerName, successor.username())); factionManager.updateFaction(updated); // Now kick the demoted member @@ -505,6 +522,14 @@ private void logAdminPowerChange(UUID adminUuid, String message) { } } + private void logAdminPowerChange(UUID adminUuid, String message, String key, String... args) { + Faction faction = factionManager.getPlayerFaction(targetPlayerUuid); + if (faction != null) { + Faction updated = faction.withLog(FactionLog.create(FactionLog.LogType.ADMIN_POWER, message, adminUuid, key, args)); + factionManager.updateFaction(updated); + } + } + private PlayerData loadPlayerDataSync() { try { return guiManager.getPlugin().get().getPlayerStorage() 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 8010e7fb..c6345262 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java @@ -344,13 +344,25 @@ 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)); + + // 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)); + // Role - cmd.set(idx + " #RoleValue.Text", info.factionRole() != null ? info.factionRole() : "N/A"); + cmd.set(idx + " #RoleValue.Text", info.factionRole() != null ? info.factionRole() : HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_NA)); // First joined String joinedDate = info.firstJoined() > 0 ? DATE_FORMAT.format(Instant.ofEpochMilli(info.firstJoined())) - : "Unknown"; + : HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_UNKNOWN); cmd.set(idx + " #JoinedDate.Text", joinedDate); // Last online @@ -358,7 +370,7 @@ private void buildPlayerEntry(UICommandBuilder cmd, UIEventBuilder events, int i if (info.isOnline()) { lastOnlineText = HFMessages.get(playerRef, MessageKeys.AdminGui.NOW); } else if (info.lastOnline() > 0) { - lastOnlineText = TimeUtil.formatDuration(System.currentTimeMillis() - info.lastOnline()) + " ago"; + lastOnlineText = HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_ENTRY_AGO, TimeUtil.formatDuration(System.currentTimeMillis() - info.lastOnline())); } else { lastOnlineText = HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); } 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 f1b97185..120321e5 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneIntegrationFlagsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneIntegrationFlagsPage.java @@ -143,9 +143,8 @@ private void buildFlagToggle(UICommandBuilder cmd, UIEventBuilder events, // Check if the integration for this flag is available boolean integrationUnavailable = !isIntegrationAvailable(flagName); - // Flag name (display name from ZoneFlags) - String displayName = ZoneFlags.getDisplayName(flagName); - cmd.set(idx + "Name.Text", displayName); + // Flag name (localized display name) + cmd.set(idx + "Name.Text", HFMessages.get(playerRef, ZoneFlags.getDisplayNameKey(flagName))); // Set checkbox value via child selector // When integration is unavailable, show as unchecked @@ -185,9 +184,14 @@ private void buildMapVisibilityControl(UICommandBuilder cmd, UIEventBuilder even cmd.set("#MapVisibilityRow.Visible", showOnMapEnabled); if (showOnMapEnabled) { - // Set button text to current selection - String displayText = ZoneFlags.getSettingValueDisplay(ZoneFlags.MAP_VISIBILITY, visibility); - cmd.set("#MapVisibilityBtn.Text", displayText); + // 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; + }; + cmd.set("#MapVisibilityBtn.Text", HFMessages.get(playerRef, visKey)); // Default indicator if (isDefault) { 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 b5aa0a57..6f3caf46 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZonePage.java @@ -240,6 +240,10 @@ private void buildZoneEntry(UICommandBuilder cmd, UIEventBuilder events, int ind // Inline stats (visible in collapsed row) 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)); + // Expansion state cmd.set(idx + " #ExpandIcon.Visible", !isExpanded); cmd.set(idx + " #CollapseIcon.Visible", isExpanded); @@ -256,6 +260,17 @@ 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)); + + // 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)); + // Chunk count cmd.set(idx + " #ChunkCount.Text", String.valueOf(zone.getChunkCount())); 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 d86e601c..ac7d7d63 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneSettingsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneSettingsPage.java @@ -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", zone.getChunkCount() + " chunks"); + cmd.set("#ZoneChunks.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_ZSET_CHUNKS, zone.getChunkCount())); // Type indicator color String typeColor = zone.isSafeZone() ? "#55FF55" : "#FF5555"; @@ -228,9 +228,8 @@ private void buildFlagToggle(UICommandBuilder cmd, UIEventBuilder events, spawnConflict = true; } - // Flag name (display name from ZoneFlags) - String displayName = ZoneFlags.getDisplayName(flagName); - cmd.set(idx + "Name.Text", displayName); + // Flag name (localized display name via i18n) + cmd.set(idx + "Name.Text", HFMessages.get(playerRef, ZoneFlags.getDisplayNameKey(flagName))); // Set checkbox value via child selector // When parent is off, show children as unchecked for clearer visual state 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 978f6e48..eb5c5e3f 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionDashboardPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionDashboardPage.java @@ -424,7 +424,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()); - cmd.set(idx + " #ActivityMessage.Text", log.message()); + cmd.set(idx + " #ActivityMessage.Text", HFMessages.resolveLogMessage(playerRef, log)); cmd.set(idx + " #ActivityTime.Text", formatTimeAgo(log.timestamp())); } } 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 d0160702..13ebd458 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/LogsViewerPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/LogsViewerPage.java @@ -169,8 +169,8 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { cmd.set(sel + " #LogType.Text", getLocalizedTypeName(log.type())); cmd.set(sel + " #LogType.Style.TextColor", GuiColors.forLogType(log.type())); - // Message - cmd.set(sel + " #LogMessage.Text", log.message()); + // Message (localized if key available, else English fallback) + cmd.set(sel + " #LogMessage.Text", HFMessages.resolveLogMessage(playerRef, log)); } } 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 7e407df5..edb65563 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java @@ -456,7 +456,8 @@ private void handlePayNow(Player player, Ref ref, Faction logged = factionNow.withLog(FactionLog.create(FactionLog.LogType.ECONOMY, String.format("Upkeep paid manually: %s (%d billable chunks, grace cleared)", economyManager.formatCurrency(cost), billableChunks), - playerRef.getUuid())); + playerRef.getUuid(), + MessageKeys.LogsGui.MSG_UPKEEP_MANUAL, economyManager.formatCurrency(cost), String.valueOf(billableChunks))); factionManager.updateFaction(logged); } } diff --git a/src/main/java/com/hyperfactions/importer/ElbaphFactionsImporter.java b/src/main/java/com/hyperfactions/importer/ElbaphFactionsImporter.java index 076b1625..13c1377a 100644 --- a/src/main/java/com/hyperfactions/importer/ElbaphFactionsImporter.java +++ b/src/main/java/com/hyperfactions/importer/ElbaphFactionsImporter.java @@ -13,6 +13,7 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; import java.io.File; import java.io.FileReader; import java.lang.reflect.Type; @@ -736,7 +737,8 @@ private int handleExistingMemberships(Faction importedFaction, ImportResult.Buil .withLog(FactionLog.create( FactionLog.LogType.MEMBER_LEAVE, playerName + " left (imported to another faction)", - null + null, + MessageKeys.LogsGui.MSG_LEFT_IMPORT, playerName )); factionManager.removePlayerFromIndex(memberUuid); @@ -754,7 +756,8 @@ private int handleExistingMemberships(Faction importedFaction, ImportResult.Buil .withLog(FactionLog.create( FactionLog.LogType.LEADER_TRANSFER, promoted.username() + " became leader (previous leader imported to another faction)", - null + null, + MessageKeys.LogsGui.MSG_LEADER_IMPORT_TRANSFER, promoted.username() )); progress(" - %s promoted to leader of '%s'", promoted.username(), existingFaction.name()); @@ -871,7 +874,8 @@ private Faction convertFaction(ElbaphFaction elbaphFaction, Map logs = new ArrayList<>(); logs.add(FactionLog.system(FactionLog.LogType.MEMBER_JOIN, - "Faction imported from ElbaphFactions")); + "Faction imported from ElbaphFactions", + MessageKeys.LogsGui.MSG_IMPORTED_FROM, "ElbaphFactions")); // Warn about faction points if (elbaphFaction.factionPoints() > 0) { diff --git a/src/main/java/com/hyperfactions/importer/HyFactionsImporter.java b/src/main/java/com/hyperfactions/importer/HyFactionsImporter.java index aa02cca4..d71b869c 100644 --- a/src/main/java/com/hyperfactions/importer/HyFactionsImporter.java +++ b/src/main/java/com/hyperfactions/importer/HyFactionsImporter.java @@ -12,6 +12,7 @@ import com.hyperfactions.manager.PowerManager; import com.hyperfactions.manager.ZoneManager; import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; import java.io.File; import java.io.FileReader; import java.io.IOException; @@ -901,7 +902,8 @@ private int handleExistingMemberships(Faction importedFaction, ImportResult.Buil .withLog(FactionLog.create( FactionLog.LogType.MEMBER_LEAVE, playerName + " left (imported to another faction)", - null // System action + null, // System action + MessageKeys.LogsGui.MSG_LEFT_IMPORT, playerName )); // CRITICAL: Remove player from the player-to-faction index @@ -924,7 +926,8 @@ private int handleExistingMemberships(Faction importedFaction, ImportResult.Buil .withLog(FactionLog.create( FactionLog.LogType.LEADER_TRANSFER, promoted.username() + " became leader (previous leader imported to another faction)", - null + null, + MessageKeys.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/ClaimManager.java b/src/main/java/com/hyperfactions/manager/ClaimManager.java index 25b9be13..c9ebac75 100644 --- a/src/main/java/com/hyperfactions/manager/ClaimManager.java +++ b/src/main/java/com/hyperfactions/manager/ClaimManager.java @@ -11,6 +11,7 @@ import com.hyperfactions.integration.protection.OrbisGuardIntegration; import com.hyperfactions.util.ChunkUtil; import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.function.BiConsumer; @@ -415,7 +416,8 @@ public ClaimResult claim(@NotNull UUID playerUuid, @NotNull String world, int ch FactionClaim claim = FactionClaim.create(world, chunkX, chunkZ, playerUuid); Faction updated = faction.withClaim(claim) .withLog(FactionLog.create(FactionLog.LogType.CLAIM, - String.format("Claimed chunk at %d, %d in %s", chunkX, chunkZ, world), playerUuid)); + String.format("Claimed chunk at %d, %d in %s", chunkX, chunkZ, world), playerUuid, + MessageKeys.LogsGui.MSG_CLAIMED, String.valueOf(chunkX), String.valueOf(chunkZ), world)); // Update indices and faction claimIndex.put(key, faction.id()); @@ -493,7 +495,8 @@ public ClaimResult unclaim(@NotNull UUID playerUuid, @NotNull String world, int // Remove claim 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)); + String.format("Unclaimed chunk at %d, %d in %s", chunkX, chunkZ, world), playerUuid, + MessageKeys.LogsGui.MSG_UNCLAIMED, String.valueOf(chunkX), String.valueOf(chunkZ), world)); claimIndex.remove(key); Set factionClaims = factionClaimsIndex.get(faction.id()); @@ -576,13 +579,15 @@ public ClaimResult overclaim(@NotNull UUID playerUuid, @NotNull String world, in // Remove from defender 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)); + 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())); // 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)); + 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())); // Update indices - remove from defender Set defenderClaims = factionClaimsIndex.get(defenderId); @@ -640,7 +645,8 @@ public void unclaimAll(@NotNull UUID factionId) { if (faction != null && faction.getClaimCount() > 0) { Faction updated = faction.withoutAllClaims() .withLog(FactionLog.create(FactionLog.LogType.UNCLAIM, - "All territory unclaimed", null)); + "All territory unclaimed", null, + MessageKeys.LogsGui.MSG_ALL_UNCLAIMED)); factionManager.updateFaction(updated); Logger.debugClaim("Unclaim all: faction=%s, claims removed=%d", faction.name(), faction.getClaimCount()); } @@ -678,7 +684,8 @@ public int cleanupDisallowedWorldClaims() { if (faction != null) { 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)); + "Claim in '" + key.world() + "' removed (world disallows claiming)", null, + MessageKeys.LogsGui.MSG_CLAIM_REMOVED_WORLD, key.world())); factionManager.updateFaction(updated); } removed++; @@ -761,7 +768,8 @@ 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)); + String.format("Claimed chunk at %d, %d in %s", chunkX, chunkZ, world), playerUuid, + MessageKeys.LogsGui.MSG_CLAIMED, String.valueOf(chunkX), String.valueOf(chunkZ), world)); // Update both indices claimIndex.put(key, faction.id()); @@ -931,7 +939,8 @@ public void tickClaimDecay() { Faction current = factionManager.getFaction(factionId); 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)); + 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))); factionManager.updateFaction(logged); } diff --git a/src/main/java/com/hyperfactions/manager/EconomyManager.java b/src/main/java/com/hyperfactions/manager/EconomyManager.java index a69f66dc..cb45f685 100644 --- a/src/main/java/com/hyperfactions/manager/EconomyManager.java +++ b/src/main/java/com/hyperfactions/manager/EconomyManager.java @@ -9,6 +9,7 @@ import com.hyperfactions.integration.economy.VaultEconomyProvider; import com.hyperfactions.storage.JsonEconomyStorage; import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.*; @@ -340,7 +341,8 @@ public CompletableFuture deposit( String logMessage = String.format("Deposit: %s (+%s)", formatCurrency(newBalance), formatCurrency(amount)); Faction updatedFaction = faction.withLog( - FactionLog.create(FactionLog.LogType.ECONOMY, logMessage, actorId) + FactionLog.create(FactionLog.LogType.ECONOMY, logMessage, actorId, + MessageKeys.LogsGui.MSG_DEPOSIT, formatCurrency(newBalance), formatCurrency(amount)) ); factionManager.updateFaction(updatedFaction); @@ -417,7 +419,8 @@ public CompletableFuture withdraw( String logMessage = String.format("Withdrawal: %s (-%s)", formatCurrency(newBalance), formatCurrency(amount)); Faction updatedFaction = faction.withLog( - FactionLog.create(FactionLog.LogType.ECONOMY, logMessage, actorId) + FactionLog.create(FactionLog.LogType.ECONOMY, logMessage, actorId, + MessageKeys.LogsGui.MSG_WITHDRAWAL, formatCurrency(newBalance), formatCurrency(amount)) ); factionManager.updateFaction(updatedFaction); @@ -625,8 +628,11 @@ public CompletableFuture adminAdjust( String logMessage = String.format("Admin %s: %s (balance: %s)", 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; Faction updatedFaction = faction.withLog( - FactionLog.create(FactionLog.LogType.ECONOMY, logMessage, adminId) + FactionLog.create(FactionLog.LogType.ECONOMY, logMessage, adminId, + msgKey, formatCurrency(amount.abs()), formatCurrency(newBalance)) ); factionManager.updateFaction(updatedFaction); @@ -681,7 +687,8 @@ public CompletableFuture setBalance( String logMessage = String.format("Admin set balance to %s (was %s)", formatCurrency(newBalance), formatCurrency(oldBalance)); Faction updatedFaction = faction.withLog( - FactionLog.create(FactionLog.LogType.ECONOMY, logMessage, adminId) + FactionLog.create(FactionLog.LogType.ECONOMY, logMessage, adminId, + MessageKeys.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 f102c0b9..a25c9402 100644 --- a/src/main/java/com/hyperfactions/manager/FactionManager.java +++ b/src/main/java/com/hyperfactions/manager/FactionManager.java @@ -10,6 +10,7 @@ import com.hyperfactions.storage.FactionStorage; import com.hyperfactions.util.ErrorHandler; import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; import java.util.*; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; @@ -581,7 +582,8 @@ public FactionResult addMember(@NotNull UUID factionId, @NotNull UUID playerUuid // Add member FactionMember member = FactionMember.create(playerUuid, playerName); Faction updated = faction.withMember(member) - .withLog(FactionLog.create(FactionLog.LogType.MEMBER_JOIN, playerName + " joined the faction", playerUuid)); + .withLog(FactionLog.create(FactionLog.LogType.MEMBER_JOIN, playerName + " joined the faction", playerUuid, + MessageKeys.LogsGui.MSG_MEMBER_JOINED, playerName)); // Update caches factions.put(factionId, updated); @@ -635,7 +637,8 @@ public FactionResult removeMember(@NotNull UUID factionId, @NotNull UUID playerU .withoutMember(playerUuid) .withMember(promoted) .withLog(FactionLog.create(FactionLog.LogType.LEADER_TRANSFER, - target.username() + " left, " + promoted.username() + " is now leader", playerUuid)); + target.username() + " left, " + promoted.username() + " is now leader", playerUuid, + MessageKeys.LogsGui.MSG_LEADER_LEFT_TRANSFER, target.username(), promoted.username())); factions.put(factionId, updated); playerToFaction.remove(playerUuid); @@ -669,9 +672,10 @@ 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; Faction updated = faction.withoutMember(playerUuid) - .withLog(FactionLog.create(logType, message, actorUuid)); + .withLog(FactionLog.create(logType, message, actorUuid, msgKey, target.username())); // Update caches factions.put(factionId, updated); @@ -773,7 +777,8 @@ 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)); + target.username() + " promoted to " + ConfigManager.get().getRoleDisplayName(newRole), actorUuid, + MessageKeys.LogsGui.MSG_MEMBER_PROMOTED, target.username(), ConfigManager.get().getRoleDisplayName(newRole))); factions.put(factionId, updated); storage.saveFaction(updated); @@ -823,7 +828,8 @@ 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)); + target.username() + " demoted to " + ConfigManager.get().getRoleDisplayName(FactionRole.MEMBER), actorUuid, + MessageKeys.LogsGui.MSG_MEMBER_DEMOTED, target.username(), ConfigManager.get().getRoleDisplayName(FactionRole.MEMBER))); factions.put(factionId, updated); storage.saveFaction(updated); @@ -871,7 +877,8 @@ public FactionResult transferLeadership(@NotNull UUID factionId, @NotNull UUID n .withMember(oldLeader) .withMember(promoted) .withLog(FactionLog.create(FactionLog.LogType.LEADER_TRANSFER, - "Leadership transferred to " + target.username(), actorUuid)); + "Leadership transferred to " + target.username(), actorUuid, + MessageKeys.LogsGui.MSG_LEADER_TRANSFERRED, target.username())); factions.put(factionId, updated); storage.saveFaction(updated); @@ -923,7 +930,8 @@ public FactionResult adminSetMemberRole(@NotNull UUID factionId, @NotNull UUID p FactionMember updatedMember = target.withRole(newRole); updated = updated.withMember(updatedMember) .withLog(FactionLog.create(FactionLog.LogType.MEMBER_PROMOTE, - "[Admin] " + target.username() + " role set to " + ConfigManager.get().getRoleDisplayName(newRole), null)); + "[Admin] " + target.username() + " role set to " + ConfigManager.get().getRoleDisplayName(newRole), null, + MessageKeys.LogsGui.MSG_ADMIN_ROLE_SET, target.username(), ConfigManager.get().getRoleDisplayName(newRole))); factions.put(factionId, updated); storage.saveFaction(updated); @@ -960,7 +968,8 @@ public FactionResult adminRemoveMember(@NotNull UUID factionId, @NotNull UUID pl // Remove member Faction updated = faction.withoutMember(playerUuid) .withLog(FactionLog.create(FactionLog.LogType.MEMBER_KICK, - "[Admin] " + target.username() + " was kicked", null)); + "[Admin] " + target.username() + " was kicked", null, + MessageKeys.LogsGui.MSG_ADMIN_KICKED, target.username())); factions.put(factionId, updated); playerToFaction.remove(playerUuid); @@ -999,7 +1008,8 @@ 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 ? "Home set" : "Home cleared", actorUuid, + home != null ? MessageKeys.LogsGui.MSG_HOME_SET : MessageKeys.LogsGui.MSG_HOME_CLEARED)); factions.put(factionId, updated); storage.saveFaction(updated); @@ -1021,7 +1031,8 @@ public int cleanupDisallowedWorldHomes() { if (home != null && !ConfigManager.get().isWorldAllowed(home.world())) { Faction updated = faction.withHome(null) .withLog(FactionLog.create(FactionLog.LogType.HOME_SET, - "Home in '" + home.world() + "' cleared (world disallows claiming)", null)); + "Home in '" + home.world() + "' cleared (world disallows claiming)", null, + MessageKeys.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 9976b833..c0116ad1 100644 --- a/src/main/java/com/hyperfactions/manager/RelationManager.java +++ b/src/main/java/com/hyperfactions/manager/RelationManager.java @@ -5,6 +5,7 @@ import com.hyperfactions.data.*; import com.hyperfactions.integration.PermissionManager; import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.function.BiConsumer; @@ -638,7 +639,8 @@ private void setRelation(@NotNull UUID factionId, @NotNull UUID targetId, }; Faction updated = faction.withRelation(relation) - .withLog(FactionLog.create(logType, "Set " + targetName + " as " + type.getDisplayName(), actorUuid)); + .withLog(FactionLog.create(logType, "Set " + targetName + " as " + type.getDisplayName(), actorUuid, + MessageKeys.LogsGui.MSG_RELATION_SET, targetName, type.getDisplayName())); factionManager.updateFaction(updated); diff --git a/src/main/java/com/hyperfactions/storage/json/JsonFactionStorage.java b/src/main/java/com/hyperfactions/storage/json/JsonFactionStorage.java index 23041acb..a4aa66ac 100644 --- a/src/main/java/com/hyperfactions/storage/json/JsonFactionStorage.java +++ b/src/main/java/com/hyperfactions/storage/json/JsonFactionStorage.java @@ -310,6 +310,16 @@ private JsonObject serializeLog(FactionLog log) { if (log.actorUuid() != null) { obj.addProperty("actorUuid", log.actorUuid().toString()); } + if (log.messageKey() != null) { + obj.addProperty("messageKey", log.messageKey()); + } + if (log.messageArgs() != null && !log.messageArgs().isEmpty()) { + JsonArray argsArray = new JsonArray(); + for (String arg : log.messageArgs()) { + argsArray.add(arg); + } + obj.add("messageArgs", argsArray); + } return obj; } @@ -490,11 +500,21 @@ private FactionRelation deserializeRelation(JsonObject obj) { private FactionLog deserializeLog(JsonObject obj) { UUID actorUuid = obj.has("actorUuid") ? UUID.fromString(obj.get("actorUuid").getAsString()) : null; + String messageKey = obj.has("messageKey") ? obj.get("messageKey").getAsString() : null; + List messageArgs = null; + if (obj.has("messageArgs") && obj.get("messageArgs").isJsonArray()) { + messageArgs = new ArrayList<>(); + for (JsonElement el : obj.getAsJsonArray("messageArgs")) { + messageArgs.add(el.getAsString()); + } + } return new FactionLog( FactionLog.LogType.valueOf(obj.get("type").getAsString()), obj.get("message").getAsString(), obj.get("timestamp").getAsLong(), - actorUuid + actorUuid, + messageKey, + messageArgs ); } } diff --git a/src/main/java/com/hyperfactions/util/HFMessages.java b/src/main/java/com/hyperfactions/util/HFMessages.java index 987f43f1..8b76fd34 100644 --- a/src/main/java/com/hyperfactions/util/HFMessages.java +++ b/src/main/java/com/hyperfactions/util/HFMessages.java @@ -1,6 +1,7 @@ package com.hyperfactions.util; import com.hyperfactions.config.ConfigManager; +import com.hyperfactions.data.FactionLog; import com.hypixel.hytale.server.core.modules.i18n.I18nModule; import com.hypixel.hytale.server.core.universe.PlayerRef; import java.util.Map; @@ -158,6 +159,23 @@ public static String getLanguageFor(@Nullable PlayerRef player) { return serverDefault; } + /** + * Resolves a FactionLog's message for display, using the i18n key if available. + * Falls back to the English message for legacy logs without a messageKey. + * + * @param player the player viewing the log (determines locale) + * @param log the faction log entry + * @return the localized message, or the English fallback + */ + @NotNull + public static String resolveLogMessage(@Nullable PlayerRef player, @NotNull FactionLog log) { + if (log.messageKey() != null) { + Object[] args = log.messageArgs() != null ? log.messageArgs().toArray() : new Object[0]; + return get(player, log.messageKey(), args); + } + return log.message(); + } + /** * Formats a message by replacing {0}, {1}, etc. with provided arguments. */ diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 96535d9b..8b42662f 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -1375,6 +1375,82 @@ 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() {} } @@ -1741,6 +1817,9 @@ public static final class AdminGui { 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"; @@ -1783,6 +1862,7 @@ public static final class AdminGui { 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"; @@ -2067,6 +2147,9 @@ public static final class AdminGui { // 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"; @@ -2208,6 +2291,40 @@ public static final class AdminGui { 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/resources/Common/UI/Custom/HyperFactions/admin/admin_dashboard.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_dashboard.ui index 8b5f76f5..400d4ce3 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_dashboard.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_dashboard.ui @@ -258,14 +258,13 @@ $C.@PageOverlay { Label #BypassLabel { Text: "Protection Bypass:"; Style: (FontSize: 13, TextColor: #AAAAAA, VerticalAlignment: Center); - Anchor: (Width: 130); + FlexWeight: 1; } Label #BypassState { Text: "Off"; Style: (FontSize: 14, TextColor: #FF5555, RenderBold: true, VerticalAlignment: Center); - Anchor: (Width: 50); + Anchor: (Width: 80); } - Label { FlexWeight: 1; } TextButton #ToggleBypassBtn { Text: "Enable"; Anchor: (Height: 30, Width: 100); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_entry.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_entry.ui index 31821709..3b8bd30e 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_entry.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_entry.ui @@ -44,7 +44,7 @@ Group { Style: (FontSize: 12, TextColor: #44CC44, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 18); } - Label { + Label #PowerLabel { Text: "power"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 14); @@ -61,7 +61,7 @@ Group { Style: (FontSize: 12, TextColor: #FFAA00, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 18); } - Label { + Label #ClaimsLabel { Text: "claims"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 14); @@ -78,7 +78,7 @@ Group { Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 18); } - Label { + Label #MembersLabel { Text: "members"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 14); @@ -119,7 +119,7 @@ Group { LayoutMode: Left; Anchor: (Height: 20, Bottom: 4); - Label { + Label #CreatedLabel { Text: "Created:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 50); @@ -130,7 +130,7 @@ Group { Anchor: (Width: 90); } - Label { + Label #HomeLabel { Text: "Home:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 40); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_info.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_info.ui index 0ed52eda..14e01f9d 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_info.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_info.ui @@ -360,7 +360,7 @@ $C.@PageOverlay { TextButton #PowerResetAll { Text: "Reset All Power"; - Anchor: (Height: 26, Width: 130); + Anchor: (Height: 26, Width: 170); Style: $S.@CyanButtonStyle; } } @@ -426,7 +426,7 @@ $C.@PageOverlay { TextButton #ViewMembersBtn { Text: "Members"; - Anchor: (Height: 30, Width: 85); + Anchor: (Height: 30, Width: 110); Style: $S.@ButtonStyle; } @@ -434,7 +434,7 @@ $C.@PageOverlay { TextButton #ViewRelationsBtn { Text: "Relations"; - Anchor: (Height: 30, Width: 85); + Anchor: (Height: 30, Width: 110); Style: $S.@ButtonStyle; } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_factions.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_factions.ui index fe2a8798..5e3c3ccd 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_factions.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_factions.ui @@ -50,7 +50,7 @@ $C.@PageOverlay { Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); - Anchor: (Width: 35); + Anchor: (Width: 60); } DropdownBox #SortDropdown { Style: $C.@DefaultDropdownBoxStyle; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_entry.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_entry.ui index a5364b7f..d5514d6a 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_entry.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_entry.ui @@ -90,7 +90,7 @@ Group { LayoutMode: Left; Anchor: (Height: 20, Bottom: 4); - Label { + Label #RoleLabel { Text: "Role:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 35); @@ -101,7 +101,7 @@ Group { Anchor: (Width: 70); } - Label { + Label #JoinedLabel { Text: "Joined:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 45); @@ -112,7 +112,7 @@ Group { Anchor: (Width: 80); } - Label { + Label #LastOnlineLabel { Text: "Last Online:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 70); @@ -129,7 +129,7 @@ Group { LayoutMode: Left; Anchor: (Height: 20, Bottom: 4); - Label { + Label #KdrLabel { Text: "K/D/R:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 40); @@ -140,7 +140,7 @@ Group { Anchor: (Width: 100); } - Label { + Label #PowerLabel { Text: "Power:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 45); @@ -157,7 +157,7 @@ Group { LayoutMode: Left; Anchor: (Height: 18, Bottom: 8); - Label { + Label #UuidLabel { Text: "UUID:"; Style: (FontSize: 9, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 40); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_entry.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_entry.ui index 13172dda..639386dd 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_entry.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zone_entry.ui @@ -47,7 +47,7 @@ Group { Anchor: (Width: 140); LayoutMode: Left; - Label { + Label #WorldLabel { Text: "World:"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 40); @@ -64,7 +64,7 @@ Group { Anchor: (Width: 80); LayoutMode: Left; - Label { + Label #InlineChunksLabel { Text: "Chunks:"; Style: (FontSize: 10, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 45); @@ -111,7 +111,7 @@ Group { LayoutMode: Left; Anchor: (Height: 22, Bottom: 6); - Label { + Label #ChunksLabel { Text: "Chunks:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 50); @@ -122,7 +122,7 @@ Group { Anchor: (Width: 50); } - Label { + Label #BoundsLabel { Text: "Bounds:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 50); @@ -133,7 +133,7 @@ Group { Anchor: (Width: 150); } - Label { + Label #CreatedLabel { Text: "Created:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 52); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/activity_entry.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/activity_entry.ui index 0764a118..719203a2 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/activity_entry.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/activity_entry.ui @@ -1,29 +1,27 @@ // Activity Entry Template +// Matches log_entry.ui style: date first, type, then description Group { - Anchor: (Height: 24); - LayoutMode: Top; + Anchor: (Height: 30, Bottom: 2); + Background: (Color: #0d1520); + Padding: (Left: 10, Right: 10, Top: 4, Bottom: 4); + LayoutMode: Left; - Group { - LayoutMode: Left; - Anchor: (Height: 24); - - Label #ActivityType { - Text: "Type"; - Style: (FontSize: 10, TextColor: #00AAAA, RenderBold: true, VerticalAlignment: Center); - Anchor: (Width: 65); - } + Label #ActivityTime { + Text: "5m ago"; + Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); + Anchor: (Width: 70); + } - Label #ActivityMessage { - Text: "Activity description"; - Style: (FontSize: 11, TextColor: #AAAAAA, VerticalAlignment: Center); - Anchor: (Width: 220); - } + Label #ActivityType { + Text: "Type"; + Style: (FontSize: 10, TextColor: #00AAAA, RenderBold: true, VerticalAlignment: Center); + Anchor: (Width: 70); + } - Label #ActivityTime { - Text: "5m ago"; - Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 60); - } + Label #ActivityMessage { + Text: "Activity description"; + Style: (FontSize: 11, TextColor: #AAAAAA, VerticalAlignment: Center); + FlexWeight: 1; } } diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang index c25fe32c..4175385d 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang @@ -200,6 +200,9 @@ gui.zint_visibility_label = Visibility Level: gui.zint_cat_essentials = HyperEssentials gui.zint_reset_defaults = Reset to Defaults gui.zint_back_to_flags = Back to Flags +gui.zint_map_vis_faction = Faction Only +gui.zint_map_vis_ally = Faction + Allies +gui.zint_map_vis_all = All Players # ========== Activity Log ========== log.all_types = All Types @@ -244,6 +247,60 @@ gui.zset_children_hint = (children only apply when parent ON) gui.zset_reset_defaults = Reset to Defaults gui.zset_integration_flags = Integration Flags gui.zset_back_to_zones = Back to Zones +gui.zset_chunks = {0} chunks + +# Zone Flag Display Names +gui.zflag_pvp_enabled = PvP Enabled +gui.zflag_friendly_fire = Friendly Fire +gui.zflag_friendly_fire_faction = Faction Damage +gui.zflag_friendly_fire_ally = Ally Damage +gui.zflag_projectile_damage = Projectile Damage +gui.zflag_mob_damage = Take Mob Damage +gui.zflag_pve_damage = Give Mob Damage +gui.zflag_fall_damage = Fall Damage +gui.zflag_environmental_damage = Env. Damage +gui.zflag_explosion_damage = Explosion Damage +gui.zflag_fire_spread = Fire Spread +gui.zflag_keep_inventory = Keep Inventory +gui.zflag_power_loss = Power Loss +gui.zflag_build_allowed = Building Allowed +gui.zflag_block_place = Block Placement +gui.zflag_hammer_use = Hammer Use +gui.zflag_builder_tools_use = Builder Tools +gui.zflag_block_interact = Block Interaction +gui.zflag_door_use = Door Use +gui.zflag_container_use = Container Use +gui.zflag_bench_use = Bench Use +gui.zflag_processing_use = Processing Use +gui.zflag_seat_use = Seat Use +gui.zflag_mount_use = Mount Use +gui.zflag_light_use = Light Use +gui.zflag_npc_use = NPC Interaction +gui.zflag_crate_pickup = Crate Pickup +gui.zflag_crate_place = Crate Place +gui.zflag_npc_tame = NPC Tame +gui.zflag_npc_interact = NPC Interact +gui.zflag_teleporter_use = Teleporter Use +gui.zflag_portal_use = Portal Use +gui.zflag_mount_entry = Mount Entry +gui.zflag_item_drop = Item Drop +gui.zflag_item_pickup = Auto Pickup +gui.zflag_item_pickup_manual = F-Key Pickup +gui.zflag_invincible_items = Invincible Items +gui.zflag_mob_spawning = Mob Spawning +gui.zflag_hostile_mob_spawning = Hostile Mobs +gui.zflag_passive_mob_spawning = Passive Mobs +gui.zflag_neutral_mob_spawning = Neutral Mobs +gui.zflag_npc_spawning = NPC Spawning +gui.zflag_mob_clear = Mob Clearing +gui.zflag_hostile_mob_clear = Clear Hostile Mobs +gui.zflag_passive_mob_clear = Clear Passive Mobs +gui.zflag_neutral_mob_clear = Clear Neutral Mobs +gui.zflag_gravestone_access = Others Loot Graves +gui.zflag_show_on_map = Show on Map +gui.zflag_essentials_homes = Home Use +gui.zflag_essentials_warps = Warp Use +gui.zflag_essentials_kits = Kit Claiming # ========== Zone Properties ========== zprop.current_custom = Current: "{0}" (custom) @@ -532,6 +589,9 @@ gui.set_perm_officers_edit = Officers can edit # Faction relations labels gui.rel_subtitle = Manage faction relations (bypasses approval) gui.rel_set_new = Set New Relation +gui.rel_btn_ally = Ally +gui.rel_btn_neutral = Neutral +gui.rel_btn_enemy = Enemy # Zone page labels gui.zone_sort_name = Name @@ -672,3 +732,41 @@ gui.czw_flags_defaults_desc = Based on zone type gui.czw_flags_defaults = Use defaults gui.czw_flags_customize_desc = Open settings after gui.czw_flags_customize = Customize + +# ========== Entry Labels (Faction/Player/Zone list entries) ========== + +# Faction entry labels +gui.fac_entry_power = power +gui.fac_entry_claims = claims +gui.fac_entry_members = members +gui.fac_entry_created = Created: +gui.fac_entry_home = Home: +gui.fac_entry_tp_home = TP Home +gui.fac_entry_view_info = View Info +gui.fac_entry_members_btn = Members +gui.fac_entry_settings = Settings +gui.fac_entry_unclaim_all = Unclaim All +gui.fac_entry_disband = Disband + +# Player entry labels +gui.plr_entry_role = Role: +gui.plr_entry_joined = Joined: +gui.plr_entry_last_online = Last Online: +gui.plr_entry_kdr = K/D/R: +gui.plr_entry_power = Power: +gui.plr_entry_uuid = UUID: +gui.plr_entry_info = Info +gui.plr_entry_teleport = Teleport +gui.plr_entry_na = N/A +gui.plr_entry_unknown = Unknown +gui.plr_entry_ago = {0} ago + +# Zone entry labels +gui.zone_entry_world = World: +gui.zone_entry_chunks = Chunks: +gui.zone_entry_bounds = Bounds: +gui.zone_entry_created = Created: +gui.zone_entry_edit_map = Edit Map +gui.zone_entry_flags = Flags +gui.zone_entry_settings = Settings +gui.zone_entry_delete = Delete diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index 780b01f0..05664b84 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -558,6 +558,74 @@ logs.type_power_change = Power logs.type_economy = Economy logs.type_admin_power = Admin Power +# Log message templates (i18n for activity log content) +# Player actions +logs.msg_faction_created = {0} created the faction +logs.msg_member_joined = {0} joined the faction +logs.msg_member_left = {0} left the faction +logs.msg_member_kicked = {0} was kicked +logs.msg_member_promoted = {0} promoted to {1} +logs.msg_member_demoted = {0} demoted to {1} +logs.msg_leader_transferred = Leadership transferred to {0} +logs.msg_leader_left_transfer = {0} left, {1} is now leader +logs.msg_relation_set = Set {0} as {1} +# Territory +logs.msg_claimed = Claimed chunk at {0}, {1} in {2} +logs.msg_unclaimed = Unclaimed chunk at {0}, {1} in {2} +logs.msg_overclaim_lost = Lost chunk at {0}, {1} to {2} +logs.msg_overclaim_taken = Overclaimed chunk at {0}, {1} from {2} +logs.msg_all_unclaimed = All territory unclaimed +logs.msg_claim_removed_world = Claim in '{0}' removed (world disallows claiming) +logs.msg_claims_lost_upkeep = Lost {0} claim(s) to upkeep (missed {1} payments) +logs.msg_claims_removed_inactive = {0} claims removed due to inactivity ({1} days) +# Home +logs.msg_home_set = Home set +logs.msg_home_cleared = Home cleared +logs.msg_home_cleared_world = Home in '{0}' cleared (world disallows claiming) +# Settings +logs.msg_renamed = Renamed from '{0}' to '{1}' +logs.msg_set_open = Faction set to open +logs.msg_set_closed = Faction set to invite-only +logs.msg_desc_set = Description set +logs.msg_desc_cleared = Description cleared +logs.msg_color_changed = Color changed to '{0}' +# Economy +logs.msg_deposit = Deposit: {0} (+{1}) +logs.msg_withdrawal = Withdrawal: {0} (-{1}) +logs.msg_upkeep_paid = Upkeep paid: {0} ({1} billable chunks) +logs.msg_upkeep_grace_started = Upkeep failed: grace period started ({0}h) +logs.msg_upkeep_missed = Upkeep missed (payment {0}), grace expires in {1} +logs.msg_upkeep_manual = Upkeep paid manually: {0} ({1} billable chunks, grace cleared) +# Admin power +logs.msg_admin_power_set = Admin set {0}'s power to {1} (was {2}) +logs.msg_admin_power_add = Admin added {0} power to {1} ({2} -> {3}) +logs.msg_admin_power_remove = Admin removed {0} power from {1} ({2} -> {3}) +logs.msg_admin_power_reset = Admin reset {0}'s power to {1} (was {2}) +logs.msg_admin_power_adjusted = Admin adjusted {0}'s power by {1} ({2} -> {3}) +logs.msg_admin_maxpower_set = Admin set {0}'s max power to {1} (was {2}) +logs.msg_admin_maxpower_reset = Admin reset {0}'s max power to global default ({1}) +logs.msg_admin_powerloss_enabled = Admin enabled power loss for {0} +logs.msg_admin_powerloss_disabled = Admin disabled power loss for {0} +logs.msg_admin_decay_enabled = Admin enabled claim decay exemption for {0} +logs.msg_admin_decay_disabled = Admin disabled claim decay exemption for {0} +logs.msg_admin_kd_reset = Admin reset K/D for {0} +logs.msg_admin_power_set_all = Admin set all {0} members' power to {1} +logs.msg_admin_power_add_all = Admin added {0} power to all {1} members +logs.msg_admin_power_remove_all = Admin removed {0} power from all {1} members +logs.msg_admin_power_reset_all = Admin reset power for all {0} members +logs.msg_admin_power_adjusted_all = Admin adjusted all {0} members' power by {1} +# Admin faction +logs.msg_admin_kicked = [Admin] {0} was kicked +logs.msg_admin_role_set = [Admin] {0} role set to {1} +logs.msg_admin_leader_kick = [Admin] Leadership transferred from {0} to {1} (admin kick) +logs.msg_admin_econ_added = Admin added: {0} (balance: {1}) +logs.msg_admin_econ_deducted = Admin deducted: {0} (balance: {1}) +logs.msg_admin_econ_set = Admin set balance to {0} (was {1}) +# Import +logs.msg_left_import = {0} left (imported to another faction) +logs.msg_leader_import_transfer = {0} became leader (previous leader imported to another faction) +logs.msg_imported_from = Faction imported from {0} + # ========== Chat Page ========== chat.title = Faction Chat chat.tab_faction = Faction diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang index 24f91d3f..e8e70a9d 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang @@ -200,6 +200,9 @@ gui.zint_visibility_label = Nivel de Visibilidad: gui.zint_cat_essentials = HyperEssentials gui.zint_reset_defaults = Restablecer Valores gui.zint_back_to_flags = Volver a Flags +gui.zint_map_vis_faction = Solo Faccion +gui.zint_map_vis_ally = Faccion + Aliados +gui.zint_map_vis_all = Todos los Jugadores # ========== Registro de Actividad ========== log.all_types = Todos los Tipos @@ -244,6 +247,60 @@ gui.zset_children_hint = (hijos solo aplican cuando el padre esta EN) gui.zset_reset_defaults = Restablecer Valores gui.zset_integration_flags = Flags de Integracion gui.zset_back_to_zones = Volver a Zonas +gui.zset_chunks = {0} chunks + +# Nombres de Flags de Zona +gui.zflag_pvp_enabled = PvP Activado +gui.zflag_friendly_fire = Fuego Amigo +gui.zflag_friendly_fire_faction = Dano de Faccion +gui.zflag_friendly_fire_ally = Dano de Aliado +gui.zflag_projectile_damage = Dano de Proyectil +gui.zflag_mob_damage = Recibir Dano de Mob +gui.zflag_pve_damage = Dar Dano a Mob +gui.zflag_fall_damage = Dano por Caida +gui.zflag_environmental_damage = Dano Ambiental +gui.zflag_explosion_damage = Dano de Explosion +gui.zflag_fire_spread = Propagacion de Fuego +gui.zflag_keep_inventory = Conservar Inventario +gui.zflag_power_loss = Perdida de Poder +gui.zflag_build_allowed = Construccion Permitida +gui.zflag_block_place = Colocar Bloques +gui.zflag_hammer_use = Uso de Martillo +gui.zflag_builder_tools_use = Herr. de Constructor +gui.zflag_block_interact = Interaccion de Bloques +gui.zflag_door_use = Uso de Puertas +gui.zflag_container_use = Uso de Contenedores +gui.zflag_bench_use = Uso de Bancos +gui.zflag_processing_use = Uso de Procesadores +gui.zflag_seat_use = Uso de Asientos +gui.zflag_mount_use = Uso de Monturas +gui.zflag_light_use = Uso de Luces +gui.zflag_npc_use = Interaccion con NPC +gui.zflag_crate_pickup = Recoger Cajas +gui.zflag_crate_place = Colocar Cajas +gui.zflag_npc_tame = Domesticar NPC +gui.zflag_npc_interact = Interactuar con NPC +gui.zflag_teleporter_use = Uso de Teletransporte +gui.zflag_portal_use = Uso de Portales +gui.zflag_mount_entry = Entrada a Montura +gui.zflag_item_drop = Soltar Objetos +gui.zflag_item_pickup = Recoger Automatico +gui.zflag_item_pickup_manual = Recoger con F +gui.zflag_invincible_items = Objetos Invencibles +gui.zflag_mob_spawning = Aparicion de Mobs +gui.zflag_hostile_mob_spawning = Mobs Hostiles +gui.zflag_passive_mob_spawning = Mobs Pasivos +gui.zflag_neutral_mob_spawning = Mobs Neutrales +gui.zflag_npc_spawning = Aparicion de NPC +gui.zflag_mob_clear = Limpieza de Mobs +gui.zflag_hostile_mob_clear = Limpiar Mobs Hostiles +gui.zflag_passive_mob_clear = Limpiar Mobs Pasivos +gui.zflag_neutral_mob_clear = Limpiar Mobs Neutrales +gui.zflag_gravestone_access = Saquear Tumbas Ajenas +gui.zflag_show_on_map = Mostrar en Mapa +gui.zflag_essentials_homes = Uso de Hogar +gui.zflag_essentials_warps = Uso de Warps +gui.zflag_essentials_kits = Reclamo de Kits # ========== Propiedades de Zona ========== zprop.current_custom = Actual: "{0}" (personalizado) @@ -532,6 +589,9 @@ gui.set_perm_officers_edit = Oficiales pueden editar # Etiquetas de relaciones de faccion gui.rel_subtitle = Gestionar relaciones de faccion (sin aprobacion) gui.rel_set_new = Establecer Nueva Relacion +gui.rel_btn_ally = Aliado +gui.rel_btn_neutral = Neutral +gui.rel_btn_enemy = Enemigo # Etiquetas de pagina de zonas gui.zone_sort_name = Nombre @@ -672,3 +732,41 @@ gui.czw_flags_defaults_desc = Basado en tipo de zona gui.czw_flags_defaults = Usar por defecto gui.czw_flags_customize_desc = Abrir ajustes despues gui.czw_flags_customize = Personalizar + +# ========== Etiquetas de Entradas (listas de Faccion/Jugador/Zona) ========== + +# Etiquetas de entrada de faccion +gui.fac_entry_power = poder +gui.fac_entry_claims = reclamos +gui.fac_entry_members = miembros +gui.fac_entry_created = Creada: +gui.fac_entry_home = Hogar: +gui.fac_entry_tp_home = TP Hogar +gui.fac_entry_view_info = Ver Info +gui.fac_entry_members_btn = Miembros +gui.fac_entry_settings = Ajustes +gui.fac_entry_unclaim_all = Desreclamar +gui.fac_entry_disband = Disolver + +# Etiquetas de entrada de jugador +gui.plr_entry_role = Rol: +gui.plr_entry_joined = Ingreso: +gui.plr_entry_last_online = Ultima Conexion: +gui.plr_entry_kdr = K/D/R: +gui.plr_entry_power = Poder: +gui.plr_entry_uuid = UUID: +gui.plr_entry_info = Info +gui.plr_entry_teleport = Teletransportar +gui.plr_entry_na = N/D +gui.plr_entry_unknown = Desconocido +gui.plr_entry_ago = hace {0} + +# Etiquetas de entrada de zona +gui.zone_entry_world = Mundo: +gui.zone_entry_chunks = Chunks: +gui.zone_entry_bounds = Limites: +gui.zone_entry_created = Creada: +gui.zone_entry_edit_map = Editar Mapa +gui.zone_entry_flags = Flags +gui.zone_entry_settings = Ajustes +gui.zone_entry_delete = Eliminar diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang index cd99dafd..adbcf30d 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang @@ -558,6 +558,74 @@ logs.type_power_change = Poder logs.type_economy = Economia logs.type_admin_power = Admin +# Plantillas de mensajes de registro (i18n para contenido del registro de actividad) +# Acciones de jugador +logs.msg_faction_created = {0} creo la faccion +logs.msg_member_joined = {0} se unio a la faccion +logs.msg_member_left = {0} abandono la faccion +logs.msg_member_kicked = {0} fue expulsado +logs.msg_member_promoted = {0} ascendido a {1} +logs.msg_member_demoted = {0} degradado a {1} +logs.msg_leader_transferred = Liderazgo transferido a {0} +logs.msg_leader_left_transfer = {0} se fue, {1} es ahora el lider +logs.msg_relation_set = {0} establecido como {1} +# Territorio +logs.msg_claimed = Chunk reclamado en {0}, {1} en {2} +logs.msg_unclaimed = Chunk abandonado en {0}, {1} en {2} +logs.msg_overclaim_lost = Chunk perdido en {0}, {1} ante {2} +logs.msg_overclaim_taken = Sobrerreclamo de chunk en {0}, {1} de {2} +logs.msg_all_unclaimed = Todo el territorio abandonado +logs.msg_claim_removed_world = Reclamo en '{0}' eliminado (mundo no permite reclamos) +logs.msg_claims_lost_upkeep = {0} reclamo(s) perdidos por mantenimiento (faltan {1} pagos) +logs.msg_claims_removed_inactive = {0} reclamos eliminados por inactividad ({1} dias) +# Hogar +logs.msg_home_set = Hogar establecido +logs.msg_home_cleared = Hogar eliminado +logs.msg_home_cleared_world = Hogar en '{0}' eliminado (mundo no permite reclamos) +# Ajustes +logs.msg_renamed = Renombrado de '{0}' a '{1}' +logs.msg_set_open = Faccion abierta al publico +logs.msg_set_closed = Faccion solo por invitacion +logs.msg_desc_set = Descripcion establecida +logs.msg_desc_cleared = Descripcion eliminada +logs.msg_color_changed = Color cambiado a '{0}' +# Economia +logs.msg_deposit = Deposito: {0} (+{1}) +logs.msg_withdrawal = Retiro: {0} (-{1}) +logs.msg_upkeep_paid = Mantenimiento pagado: {0} ({1} chunks facturables) +logs.msg_upkeep_grace_started = Mantenimiento fallido: periodo de gracia iniciado ({0}h) +logs.msg_upkeep_missed = Mantenimiento no pagado (pago {0}), gracia expira en {1} +logs.msg_upkeep_manual = Mantenimiento pagado manualmente: {0} ({1} chunks facturables, gracia eliminada) +# Admin poder +logs.msg_admin_power_set = Admin establecio el poder de {0} a {1} (era {2}) +logs.msg_admin_power_add = Admin agrego {0} de poder a {1} ({2} -> {3}) +logs.msg_admin_power_remove = Admin quito {0} de poder de {1} ({2} -> {3}) +logs.msg_admin_power_reset = Admin reinicio el poder de {0} a {1} (era {2}) +logs.msg_admin_power_adjusted = Admin ajusto el poder de {0} en {1} ({2} -> {3}) +logs.msg_admin_maxpower_set = Admin establecio el poder maximo de {0} a {1} (era {2}) +logs.msg_admin_maxpower_reset = Admin reinicio el poder maximo de {0} al valor predeterminado ({1}) +logs.msg_admin_powerloss_enabled = Admin habilito perdida de poder para {0} +logs.msg_admin_powerloss_disabled = Admin deshabilito perdida de poder para {0} +logs.msg_admin_decay_enabled = Admin habilito exencion de deterioro de reclamos para {0} +logs.msg_admin_decay_disabled = Admin deshabilito exencion de deterioro de reclamos para {0} +logs.msg_admin_kd_reset = Admin reinicio K/D de {0} +logs.msg_admin_power_set_all = Admin establecio el poder de los {0} miembros a {1} +logs.msg_admin_power_add_all = Admin agrego {0} de poder a los {1} miembros +logs.msg_admin_power_remove_all = Admin quito {0} de poder de los {1} miembros +logs.msg_admin_power_reset_all = Admin reinicio el poder de los {0} miembros +logs.msg_admin_power_adjusted_all = Admin ajusto el poder de los {0} miembros en {1} +# Admin faccion +logs.msg_admin_kicked = [Admin] {0} fue expulsado +logs.msg_admin_role_set = [Admin] Rol de {0} establecido a {1} +logs.msg_admin_leader_kick = [Admin] Liderazgo transferido de {0} a {1} (expulsion admin) +logs.msg_admin_econ_added = Admin agrego: {0} (saldo: {1}) +logs.msg_admin_econ_deducted = Admin dedujo: {0} (saldo: {1}) +logs.msg_admin_econ_set = Admin establecio saldo a {0} (era {1}) +# Importacion +logs.msg_left_import = {0} se fue (importado a otra faccion) +logs.msg_leader_import_transfer = {0} se convirtio en lider (lider anterior importado a otra faccion) +logs.msg_imported_from = Faccion importada desde {0} + # ========== Pagina de Chat ========== chat.title = Chat de Faccion chat.tab_faction = Faccion From 1eb62c502ddbe2520563c9e6b598b7e344089517 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Wed, 11 Mar 2026 10:35:51 -0700 Subject: [PATCH 48/55] feat(i18n): localize player member and browser entry templates Add #IDs to anonymous labels in member_entry.ui (Power, Joined, Last Death) and wire cmd.set() for all entry-level labels and buttons in FactionMembersPage. Add no_description fallback key for browser entries. Widen Recruitment label for Spanish. Add 11 new keys to both en-US and es-ES gui lang files. --- .../gui/faction/page/FactionBrowserPage.java | 2 ++ .../gui/faction/page/FactionMembersPage.java | 11 +++++++++++ src/main/java/com/hyperfactions/util/MessageKeys.java | 10 ++++++++++ .../HyperFactions/faction/faction_browse_entry.ui | 2 +- .../UI/Custom/HyperFactions/faction/member_entry.ui | 10 +++++----- .../Server/Languages/en-US/hyperfactions_gui.lang | 10 ++++++++++ .../Server/Languages/es-ES/hyperfactions_gui.lang | 10 ++++++++++ 7 files changed, 49 insertions(+), 6 deletions(-) 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 056d952e..def7c46d 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionBrowserPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionBrowserPage.java @@ -302,6 +302,8 @@ private void buildFactionEntry(UICommandBuilder cmd, UIEventBuilder events, int ? entry.description.substring(0, 57) + "..." : entry.description; cmd.set(idx + " #Description.Text", desc); + } else { + cmd.set(idx + " #Description.Text", HFMessages.get(playerRef, MessageKeys.BrowserGui.NO_DESCRIPTION)); } // View Info button 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 0f38a18d..c4e80710 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java @@ -226,6 +226,17 @@ private void buildMemberEntry(UICommandBuilder cmd, UIEventBuilder events, int i // Use indexed selector like NavBarHelper does 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)); + // Basic info cmd.set(idx + " #MemberName.Text", member.username()); cmd.set(idx + " #MemberRole.Text", formatRole(member.role())); diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index 8b42662f..a576b8db 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -868,6 +868,15 @@ public static final class MembersGui { 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() {} } @@ -889,6 +898,7 @@ public static final class BrowserGui { 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() {} } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_browse_entry.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_browse_entry.ui index 20f4f8e3..c1b0569f 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_browse_entry.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_browse_entry.ui @@ -139,7 +139,7 @@ Group { Label #RecruitmentLabel { Text: "Recruitment:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 85); + Anchor: (Width: 95); } Label #RecruitmentStatus { Text: "Unknown"; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/member_entry.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/member_entry.ui index 8564050e..829c9ae7 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/member_entry.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/member_entry.ui @@ -93,7 +93,7 @@ Group { LayoutMode: Left; Anchor: (Height: 20, Bottom: 4); - Label { + Label #PowerLabel { Text: "Power:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 45); @@ -104,10 +104,10 @@ Group { Anchor: (Width: 60); } - Label { + Label #JoinedLabel { Text: "Joined:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 45); + Anchor: (Width: 50); } Label #JoinedDate { Text: "Unknown"; @@ -115,10 +115,10 @@ Group { Anchor: (Width: 80); } - Label { + Label #LastDeathLabel { Text: "Last Death:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 65); + Anchor: (Width: 75); } Label #LastDeath { Text: "Never"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index 05664b84..95913ea8 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -196,6 +196,15 @@ members.demoted = Demoted {0} to {1}. members.demote_failed = Failed to demote: {0} members.kicked = Kicked {0} from the faction. members.kick_failed = Failed to kick: {0} +members.label_power = Power: +members.label_joined = Joined: +members.label_last_death = Last Death: +members.btn_promote = Promote +members.btn_demote = Demote +members.btn_kick = Kick +members.btn_make_leader = Make Leader +members.btn_profile = Profile +members.self_label = (You) # ========== Browser Page ========== browser.title = Browse Factions @@ -213,6 +222,7 @@ browser.label_created = Created: browser.label_description = Description: browser.view_info_btn = View Info browser.label_leader = Leader: +browser.no_description = No description set # ========== Leaderboard Page ========== leaderboard.title = Faction Leaderboard diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang index adbcf30d..8bb206d7 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang @@ -196,6 +196,15 @@ members.demoted = {0} degradado a {1}. members.demote_failed = No se pudo degradar: {0} members.kicked = {0} expulsado de la faccion. members.kick_failed = No se pudo expulsar: {0} +members.label_power = Poder: +members.label_joined = Ingreso: +members.label_last_death = Ultima Muerte: +members.btn_promote = Promover +members.btn_demote = Degradar +members.btn_kick = Expulsar +members.btn_make_leader = Hacer Lider +members.btn_profile = Perfil +members.self_label = (Tu) # ========== Pagina del Explorador ========== browser.title = Explorar Facciones @@ -213,6 +222,7 @@ browser.label_created = Creada: browser.label_description = Descripcion: browser.view_info_btn = Ver Info browser.label_leader = Lider: +browser.no_description = Sin descripcion # ========== Pagina de Clasificacion ========== leaderboard.title = Clasificacion de Facciones From feab96515cb0ecac83b2d460a2880cebfe81fcef Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Wed, 11 Mar 2026 11:11:37 -0700 Subject: [PATCH 49/55] feat(i18n): localize admin member entries and player info page Add #IDs to anonymous labels in admin_faction_members_entry.ui, wire cmd.set() for entry labels and buttons in AdminFactionMembersPage. Localize formatReason(), bypass checkbox labels, and NoFactionLabel in AdminPlayerInfoPage. Widen sort label and teleport button for Spanish. Add 13 new keys per locale. --- .../gui/admin/page/AdminFactionMembersPage.java | 11 +++++++++++ .../gui/admin/page/AdminPlayerInfoPage.java | 13 +++++++++---- .../java/com/hyperfactions/util/MessageKeys.java | 15 +++++++++++++++ .../HyperFactions/admin/admin_faction_members.ui | 2 +- .../admin/admin_faction_members_entry.ui | 14 +++++++------- .../Languages/en-US/hyperfactions_admin.lang | 15 +++++++++++++++ .../Languages/es-ES/hyperfactions_admin.lang | 15 +++++++++++++++ 7 files changed, 73 insertions(+), 12 deletions(-) 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 86384171..f6e4df09 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java @@ -129,6 +129,17 @@ private void buildMemberEntry(UICommandBuilder cmd, UIEventBuilder events, int i boolean memberIsOnline = isOnline(member); 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 + " #MemberName.Text", member.username()); cmd.set(idx + " #MemberRole.Text", formatRole(member.role())); cmd.set(idx + " #RoleIndicator.Background.Color", GuiColors.forRole(member.role())); 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 9ccb1518..019edf54 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java @@ -128,6 +128,11 @@ public void build(Ref ref, UICommandBuilder cmd, 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)); + // Localize bypass checkbox labels and no-faction label + cmd.set("#NoLossCheck #CheckBox.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_NO_POWER_LOSS)); + cmd.set("#NoDecayCheck #CheckBox.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_NO_CLAIM_DECAY)); + cmd.set("#NoFactionLabel.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.NO_FACTION)); + buildContent(cmd, events); } @@ -555,10 +560,10 @@ private String formatRole(FactionRole role) { private String formatReason(MembershipRecord.LeaveReason reason) { return switch (reason) { - case ACTIVE -> "ACTIVE"; - case LEFT -> "LEFT"; - case KICKED -> "KICKED"; - case DISBANDED -> "DISBANDED"; + 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); }; } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index a576b8db..d6bbb1b4 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -1895,6 +1895,16 @@ public static final class AdminGui { // 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"; @@ -2063,6 +2073,11 @@ public static final class AdminGui { 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"; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members.ui index af86ffbf..c60d8c1b 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members.ui @@ -69,7 +69,7 @@ $C.@PageOverlay { Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); - Anchor: (Width: 35); + Anchor: (Width: 50); } DropdownBox #SortDropdown { Style: $C.@DefaultDropdownBoxStyle; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members_entry.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members_entry.ui index ff83490e..0fb91319 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members_entry.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members_entry.ui @@ -94,7 +94,7 @@ Group { LayoutMode: Left; Anchor: (Height: 20, Bottom: 4); - Label { + Label #PowerLabel { Text: "Power:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 45); @@ -105,10 +105,10 @@ Group { Anchor: (Width: 60); } - Label { + Label #JoinedLabel { Text: "Joined:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 45); + Anchor: (Width: 50); } Label #JoinedDate { Text: "Unknown"; @@ -116,10 +116,10 @@ Group { Anchor: (Width: 80); } - Label { + Label #LastDeathLabel { Text: "Last Death:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 65); + Anchor: (Width: 75); } Label #LastDeath { Text: "Never"; @@ -133,7 +133,7 @@ Group { LayoutMode: Left; Anchor: (Height: 18, Bottom: 8); - Label { + Label #UuidLabel { Text: "UUID:"; Style: (FontSize: 9, TextColor: #555555, VerticalAlignment: Center); Anchor: (Width: 40); @@ -157,7 +157,7 @@ Group { } TextButton #TeleportBtn { Text: "Teleport"; - Anchor: (Height: 24, Width: 80, Right: 6); + Anchor: (Height: 24, Width: 95, Right: 6); Style: $S.@ButtonStyle; } TextButton #PromoteBtn { diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang index 4175385d..01654007 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang @@ -495,6 +495,21 @@ gui.plr_view = View gui.plr_kick_from_faction = Kick from Faction gui.plr_set_max_btn = Set Max gui.plr_combat = Combat +gui.plr_reason_active = ACTIVE +gui.plr_reason_left = LEFT +gui.plr_reason_kicked = KICKED +gui.plr_reason_disbanded = DISBANDED + +# Member entry labels +gui.mem_label_power = Power: +gui.mem_label_joined = Joined: +gui.mem_label_last_death = Last Death: +gui.mem_label_uuid = UUID: +gui.mem_btn_info = Info +gui.mem_btn_teleport = Teleport +gui.mem_btn_promote = Promote +gui.mem_btn_demote = Demote +gui.mem_btn_kick = Kick # Faction info labels gui.fac_description = Description diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang index e8e70a9d..5dfd1fcc 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang @@ -495,6 +495,21 @@ gui.plr_view = Ver gui.plr_kick_from_faction = Expulsar de Faccion gui.plr_set_max_btn = Establecer Max gui.plr_combat = Combate +gui.plr_reason_active = ACTIVO +gui.plr_reason_left = SALIO +gui.plr_reason_kicked = EXPULSADO +gui.plr_reason_disbanded = DISUELTO + +# Etiquetas de entrada de miembros +gui.mem_label_power = Poder: +gui.mem_label_joined = Ingreso: +gui.mem_label_last_death = Ultima Muerte: +gui.mem_label_uuid = UUID: +gui.mem_btn_info = Info +gui.mem_btn_teleport = Teletransportar +gui.mem_btn_promote = Promover +gui.mem_btn_demote = Degradar +gui.mem_btn_kick = Expulsar # Etiquetas de info de faccion gui.fac_description = Descripcion From 0d20d6b8248298babaac24de2155d61ee83b497b Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Wed, 11 Mar 2026 13:27:49 -0700 Subject: [PATCH 50/55] feat(i18n): localize player invite and relation entry templates Add #IDs to anonymous labels in faction_invite_entry.ui and faction_relation_entry.ui, wire cmd.set() for all entry-level labels and buttons in FactionInvitesPage and FactionRelationsPage, add 17 new MessageKeys constants, and add en-US/es-ES lang entries. Width adjustments: ClaimsLabel 50->55px, DirectionLabel 65->70px for Spanish translations. --- .../gui/faction/page/FactionInvitesPage.java | 8 +++++++- .../gui/faction/page/FactionRelationsPage.java | 14 ++++++++++++++ .../java/com/hyperfactions/util/MessageKeys.java | 16 ++++++++++++++++ .../faction/faction_invite_entry.ui | 2 +- .../faction/faction_relation_entry.ui | 14 +++++++------- .../Languages/en-US/hyperfactions_gui.lang | 16 ++++++++++++++++ .../Languages/es-ES/hyperfactions_gui.lang | 16 ++++++++++++++++ 7 files changed, 77 insertions(+), 9 deletions(-) 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 47c810cd..29c085a9 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionInvitesPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionInvitesPage.java @@ -257,6 +257,12 @@ 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)); + // Basic info cmd.set(idx + " #PlayerName.Text", item.playerName); cmd.set(idx + " #StatusInfo.Text", HFMessages.get(playerRef, MessageKeys.InvitesGui.EXPIRES, formatTime(item.remainingSeconds))); @@ -349,7 +355,7 @@ private String getPlayerName(UUID playerUuid) { return member.username(); } } - return "Unknown"; + return HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); } private String formatTime(int seconds) { 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 531030df..ab8f2b99 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionRelationsPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionRelationsPage.java @@ -339,6 +339,20 @@ 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)); + // === Header info === cmd.set(idx + " #FactionName.Text", item.factionName); cmd.set(idx + " #LeaderName.Text", HFMessages.get(playerRef, MessageKeys.GuiCommon.LEADER_LABEL, item.leaderName)); diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index d6bbb1b4..f5a06a60 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -1074,6 +1074,18 @@ public static final class RelationsGui { 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() {} } @@ -1509,6 +1521,10 @@ public static final class InvitesGui { 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() {} } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_invite_entry.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_invite_entry.ui index 8d66b25d..ddad2af2 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_invite_entry.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_invite_entry.ui @@ -97,7 +97,7 @@ Group { LayoutMode: Left; Anchor: (Height: 18, Bottom: 6); - Label { + Label #MessageLabel { Text: "Message:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 70); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_relation_entry.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_relation_entry.ui index 37db0a44..a44c8e44 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_relation_entry.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_relation_entry.ui @@ -64,7 +64,7 @@ Group { Style: (FontSize: 12, TextColor: #888888, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 18); } - Label { + Label #MemberLabel { Text: "members"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 14); @@ -81,7 +81,7 @@ Group { Style: (FontSize: 12, TextColor: #44CC44, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 18); } - Label { + Label #PowerLabel { Text: "power"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center, HorizontalAlignment: Center); Anchor: (Height: 14); @@ -122,7 +122,7 @@ Group { LayoutMode: Left; Anchor: (Height: 20, Bottom: 4); - Label { + Label #SinceLabel { Text: "Since:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); Anchor: (Width: 50); @@ -133,10 +133,10 @@ Group { Anchor: (Width: 100); } - Label { + Label #ClaimsLabel { Text: "Claims:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 50); + Anchor: (Width: 55); } Label #ClaimsValue { Text: "0"; @@ -150,10 +150,10 @@ Group { LayoutMode: Left; Anchor: (Height: 20, Bottom: 4); - Label { + Label #DirectionLabel { Text: "Direction:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 65); + Anchor: (Width: 70); } Label #DirectionValue { Text: "Incoming"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index 95913ea8..aa17cc9a 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -297,6 +297,18 @@ relations.search_hint = Search for a faction to set relation relations.no_results = No factions found matching '{0}' relations.power_display = {0} power relations.member_count = {0} members +relations.label_members = members +relations.label_power = power +relations.label_since = Since: +relations.label_claims = Claims: +relations.label_direction = Direction: +relations.btn_view = View +relations.btn_neutral = Neutral +relations.btn_enemy = Enemy +relations.btn_ally = Ally +relations.btn_accept = Accept +relations.btn_decline = Decline +relations.btn_cancel = Cancel # ========== Settings Page ========== settings.title = Faction Settings @@ -676,6 +688,10 @@ invites.request_declined = Declined join request from {0}. invites.time_seconds = {0}s invites.time_minutes = {0}m invites.time_hours = {0}h +invites.label_message = Message: +invites.btn_cancel = Cancel +invites.btn_accept = Accept +invites.btn_decline = Decline # ========== Map Page ========== map.title = Territory Map diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang index 8bb206d7..a0ba35f1 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang @@ -297,6 +297,18 @@ relations.search_hint = Busca una faccion para establecer relacion relations.no_results = No se encontraron facciones con '{0}' relations.power_display = {0} poder relations.member_count = {0} miembros +relations.label_members = miembros +relations.label_power = poder +relations.label_since = Desde: +relations.label_claims = Reclamos: +relations.label_direction = Direccion: +relations.btn_view = Ver +relations.btn_neutral = Neutral +relations.btn_enemy = Enemigo +relations.btn_ally = Aliado +relations.btn_accept = Aceptar +relations.btn_decline = Rechazar +relations.btn_cancel = Cancelar # ========== Pagina de Ajustes ========== settings.title = Ajustes de Faccion @@ -676,6 +688,10 @@ invites.request_declined = Solicitud de ingreso de {0} rechazada. invites.time_seconds = {0}s invites.time_minutes = {0}m invites.time_hours = {0}h +invites.label_message = Mensaje: +invites.btn_cancel = Cancelar +invites.btn_accept = Aceptar +invites.btn_decline = Rechazar # ========== Pagina del Mapa ========== map.title = Mapa de Territorio From 2b6a71358cc10c0a3f093059634045cf85f9ab3d Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Wed, 11 Mar 2026 13:53:56 -0700 Subject: [PATCH 51/55] feat(i18n): localize all hardcoded Java strings in GUI pages Replace hardcoded English strings with HFMessages.get() calls: - FactionPageOpener: "Treasury is not available." (5 occurrences) - AdminPageOpener: "Economy system is not enabled." (3 occurrences) - AdminFactionInfoPage: "+N more" officer list truncation - FactionDashboardPage: "in " upkeep time prefix - AdminVersionPage: "Unknown" fallbacks - AdminActivityLogPage: "1h"/"24h"/"7d"/"All" time filter labels - CreateZoneWizardPage: "circular"/"square" shape names - ZoneChangeTypeModalPage: "flags reset"/"flags kept" Add 14 new MessageKeys constants and en-US/es-ES lang entries. --- .../com/hyperfactions/gui/AdminPageOpener.java | 7 ++++--- .../com/hyperfactions/gui/FactionPageOpener.java | 11 ++++++----- .../gui/admin/page/AdminActivityLogPage.java | 16 ++++++++-------- .../gui/admin/page/AdminFactionInfoPage.java | 2 +- .../gui/admin/page/AdminVersionPage.java | 5 +++-- .../gui/admin/page/CreateZoneWizardPage.java | 2 +- .../gui/admin/page/ZoneChangeTypeModalPage.java | 2 +- .../gui/faction/page/FactionDashboardPage.java | 2 +- .../java/com/hyperfactions/util/MessageKeys.java | 13 +++++++++++++ .../Languages/en-US/hyperfactions_admin.lang | 10 ++++++++++ .../Languages/en-US/hyperfactions_gui.lang | 2 ++ .../Languages/es-ES/hyperfactions_admin.lang | 10 ++++++++++ .../Languages/es-ES/hyperfactions_gui.lang | 2 ++ 13 files changed, 62 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/hyperfactions/gui/AdminPageOpener.java b/src/main/java/com/hyperfactions/gui/AdminPageOpener.java index cadda709..42461b9e 100644 --- a/src/main/java/com/hyperfactions/gui/AdminPageOpener.java +++ b/src/main/java/com/hyperfactions/gui/AdminPageOpener.java @@ -2,6 +2,7 @@ import com.hyperfactions.HyperFactions; import com.hyperfactions.Permissions; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionMember; import com.hyperfactions.data.FactionRole; @@ -310,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("Economy system is not enabled.")); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ECON_NOT_ENABLED)); return; } PageManager pageManager = player.getPageManager(); @@ -343,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("Economy system is not enabled.")); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.AdminGui.ECON_NOT_ENABLED)); return; } PageManager pageManager = player.getPageManager(); @@ -371,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("Economy system is not enabled.")); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.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 03a6fe95..dc0cef77 100644 --- a/src/main/java/com/hyperfactions/gui/FactionPageOpener.java +++ b/src/main/java/com/hyperfactions/gui/FactionPageOpener.java @@ -2,6 +2,7 @@ import com.hyperfactions.HyperFactions; import com.hyperfactions.Permissions; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.data.Faction; import com.hyperfactions.data.FactionMember; import com.hyperfactions.data.FactionRole; @@ -730,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("Treasury is not available.")); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); return; } PageManager pageManager = player.getPageManager(); @@ -766,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("Treasury is not available.")); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); return; } var page = new TreasuryDepositModalPage(playerRef, guiManager.getFactionManager().get(), econ, @@ -787,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("Treasury is not available.")); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); return; } var page = new TreasuryTransferSearchPage(playerRef, guiManager.getFactionManager().get(), econ, @@ -809,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("Treasury is not available.")); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.GuiCommon.TREASURY_NOT_AVAILABLE)); return; } var page = new TreasuryTransferConfirmPage(playerRef, guiManager.getFactionManager().get(), econ, @@ -830,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("Treasury is not available.")); + player.sendMessage(com.hyperfactions.util.MessageUtil.errorText(playerRef, MessageKeys.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/admin/page/AdminActivityLogPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java index 2ae1ca72..f067e5ac 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminActivityLogPage.java @@ -64,17 +64,17 @@ private record GlobalLogEntry( ) {} private enum TimeFilter { - HOUR_1("1h", 3600_000L), - HOUR_24("24h", 86400_000L), - DAY_7("7d", 604800_000L), - ALL("All", Long.MAX_VALUE); + 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); - private final String displayName; + private final String messageKey; private final long millis; - TimeFilter(String displayName, long millis) { - this.displayName = displayName; + TimeFilter(String messageKey, long millis) { + this.messageKey = messageKey; this.millis = millis; } } @@ -144,7 +144,7 @@ private void buildLogList(UICommandBuilder cmd, UIEventBuilder events) { // Time filter dropdown List timeOptions = new ArrayList<>(); for (TimeFilter tf : TimeFilter.values()) { - timeOptions.add(new DropdownEntryInfo(LocalizableString.fromString(tf.displayName), tf.name())); + timeOptions.add(new DropdownEntryInfo(LocalizableString.fromString(HFMessages.get(playerRef, tf.messageKey)), tf.name())); } cmd.set("#TimeDropdown.Entries", timeOptions); cmd.set("#TimeDropdown.Value", timeFilter.name()); 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 1a0d8c0a..affdaaa3 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionInfoPage.java @@ -191,7 +191,7 @@ public void build(Ref ref, UICommandBuilder cmd, .limit(3) .collect(Collectors.joining(", ")); if (officers.size() > 3) { - officerNames += " +" + (officers.size() - 3) + " more"; + officerNames += " " + HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_INFO_MORE, officers.size() - 3); } cmd.set("#OfficersValue.Text", officerNames); } 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 c2074ea7..fe97518a 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminVersionPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminVersionPage.java @@ -80,9 +80,10 @@ public void build(Ref ref, UICommandBuilder cmd, cmd.set("#FactionsVersion.Text", "v" + HyperFactions.VERSION); String serverVersion = ManifestUtil.getVersion(); - cmd.set("#ServerVersion.Text", serverVersion != null ? serverVersion : "Unknown"); + cmd.set("#ServerVersion.Text", serverVersion != null ? serverVersion : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN)); - cmd.set("#JavaVersion.Text", System.getProperty("java.version", "Unknown")); + String javaVersion = System.getProperty("java.version"); + cmd.set("#JavaVersion.Text", javaVersion != null ? javaVersion : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN)); // --- Permissions --- setStatus(cmd, "#HyperPermsStatus", HyperPermsIntegration.isAvailable(), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_ACTIVE), HFMessages.get(playerRef, MessageKeys.AdminGui.VER_NOT_FOUND)); 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 314910ad..6f61361d 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/CreateZoneWizardPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/CreateZoneWizardPage.java @@ -528,7 +528,7 @@ private void handleCreate(Player player, Ref ref, Store 0) { - player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.WIZ_RADIUS_CLAIMED, "#44cc44", claimed, (circle ? "circular" : "square"), radius)); + 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)); newZone = zoneManager.getZoneById(newZone.id()); } else { player.sendMessage(MessageUtil.text(playerRef, MessageKeys.AdminGui.WIZ_RADIUS_NO_CLAIMS, MessageUtil.COLOR_GOLD)); 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 b021ab8f..e24c79bb 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/ZoneChangeTypeModalPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/ZoneChangeTypeModalPage.java @@ -188,7 +188,7 @@ private void handleTypeChange(Player player, Ref ref, Store 0) { long intervalMs = ConfigManager.get().getUpkeepIntervalHours() * 3600_000L; long remaining = Math.max(0, (fEcon.lastUpkeepTimestamp() + intervalMs) - System.currentTimeMillis()); - cmd.set("#PerCycleLabel.Text", "in " + com.hyperfactions.economy.UpkeepProcessor.formatDuration(remaining)); + cmd.set("#PerCycleLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.UPKEEP_IN, com.hyperfactions.economy.UpkeepProcessor.formatDuration(remaining))); } else { cmd.set("#PerCycleLabel.Text", HFMessages.get(playerRef, MessageKeys.DashboardGui.BILLABLE_CHUNKS, billableChunks)); } diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index f5a06a60..f8b559cb 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -828,6 +828,7 @@ public static final class DashboardGui { 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() {} } @@ -845,6 +846,8 @@ public static final class GuiCommon { 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() {} } @@ -1782,6 +1785,14 @@ public static final class AdminGui { 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"; @@ -1828,6 +1839,8 @@ public static final class AdminGui { 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"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang index 01654007..80edb943 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang @@ -184,6 +184,8 @@ zone_rename.rename_failed = Failed to rename zone: {0} zone_type.zone_gone = Zone no longer exists. zone_type.changed = [Admin] Changed {0} from {1} to {2} ({3}). zone_type.failed = Failed to change zone type: {0} +zone_type.flags_reset = flags reset +zone_type.flags_kept = flags kept # ========== Zone Integration Flags ========== zone_int.zone_not_found = Zone Not Found @@ -510,6 +512,14 @@ gui.mem_btn_teleport = Teleport gui.mem_btn_promote = Promote gui.mem_btn_demote = Demote gui.mem_btn_kick = Kick +gui.econ_not_enabled = Economy system is not enabled. +gui.info_more = +{0} more +gui.log_time_1h = 1h +gui.log_time_24h = 24h +gui.log_time_7d = 7d +gui.log_time_all = All +gui.shape_circular = circular +gui.shape_square = square # Faction info labels gui.fac_description = Description diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index aa17cc9a..fa850639 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -155,6 +155,7 @@ dashboard.time_days = {0}d ago dashboard.no_home_hint = Your faction has no home set. Ask an officer to set one. dashboard.chat_mode_set = Chat mode: {0} dashboard.claim_success = Claimed chunk at ({0}, {1}) +dashboard.upkeep_in = in {0} # ========== Faction Main Page ========== main.no_faction = No Faction @@ -176,6 +177,7 @@ common.search = Search: common.sort = Sort: common.prev = < Prev common.next = Next > +common.treasury_not_available = Treasury is not available. # ========== Members Page ========== members.title = Members diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang index 5dfd1fcc..7c4a9b34 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang @@ -184,6 +184,8 @@ zone_rename.rename_failed = No se pudo renombrar la zona: {0} zone_type.zone_gone = La zona ya no existe. zone_type.changed = [Admin] {0} cambiada de {1} a {2} ({3}). zone_type.failed = No se pudo cambiar el tipo de zona: {0} +zone_type.flags_reset = flags reiniciados +zone_type.flags_kept = flags conservados # ========== Flags de Integracion de Zona ========== zone_int.zone_not_found = Zona No Encontrada @@ -510,6 +512,14 @@ gui.mem_btn_teleport = Teletransportar gui.mem_btn_promote = Promover gui.mem_btn_demote = Degradar gui.mem_btn_kick = Expulsar +gui.econ_not_enabled = El sistema de economia no esta habilitado. +gui.info_more = +{0} mas +gui.log_time_1h = 1h +gui.log_time_24h = 24h +gui.log_time_7d = 7d +gui.log_time_all = Todos +gui.shape_circular = circular +gui.shape_square = cuadrado # Etiquetas de info de faccion gui.fac_description = Descripcion diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang index a0ba35f1..ec5bcce6 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang @@ -155,6 +155,7 @@ dashboard.time_days = hace {0}d dashboard.no_home_hint = Tu faccion no tiene hogar. Pide a un oficial que lo establezca. dashboard.chat_mode_set = Modo de chat: {0} dashboard.claim_success = Chunk reclamado en ({0}, {1}) +dashboard.upkeep_in = en {0} # ========== Pagina Principal de Faccion ========== main.no_faction = Sin Faccion @@ -176,6 +177,7 @@ common.search = Buscar: common.sort = Orden: common.prev = < Anterior common.next = Siguiente > +common.treasury_not_available = La tesoreria no esta disponible. # ========== Pagina de Miembros ========== members.title = Miembros From 073e8acba1e5a2fc6912a5ffaf541ae27af285b1 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Wed, 11 Mar 2026 14:06:41 -0700 Subject: [PATCH 52/55] feat(i18n): localize admin nav bar title and economy entry buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wire cmd.set() for Admin Panel title in AdminNavBarHelper and Adjust/Info button text in AdminEconomyPage entries. Add 3 new MessageKeys constants and en-US/es-ES lang entries. Stage 5 (new player pages) already fully localized — no changes needed. --- .../java/com/hyperfactions/gui/admin/AdminNavBarHelper.java | 5 ++++- .../com/hyperfactions/gui/admin/page/AdminEconomyPage.java | 4 ++++ src/main/java/com/hyperfactions/util/MessageKeys.java | 3 +++ .../Server/Languages/en-US/hyperfactions_admin.lang | 3 +++ .../Server/Languages/es-ES/hyperfactions_admin.lang | 3 +++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/hyperfactions/gui/admin/AdminNavBarHelper.java b/src/main/java/com/hyperfactions/gui/admin/AdminNavBarHelper.java index 0f208b11..cc0237d9 100644 --- a/src/main/java/com/hyperfactions/gui/admin/AdminNavBarHelper.java +++ b/src/main/java/com/hyperfactions/gui/admin/AdminNavBarHelper.java @@ -2,6 +2,8 @@ import com.hyperfactions.gui.GuiManager; import com.hyperfactions.gui.UIPaths; +import com.hyperfactions.util.HFMessages; +import com.hyperfactions.util.MessageKeys; import com.hyperfactions.gui.admin.data.AdminNavAwareData; import com.hyperfactions.gui.shared.NavBarUtil; import com.hypixel.hytale.component.Ref; @@ -49,7 +51,8 @@ public static void setupBar( } // Nav bar is included in UI templates via $Nav.@HyperFactionsAdminNavBar - // We just set up the dynamic content here + // Localize the nav bar title + cmd.set("#AdminNavBarTitleLabel.Text", HFMessages.get(playerRef, MessageKeys.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/AdminEconomyPage.java b/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java index 32da0bbb..273fc261 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminEconomyPage.java @@ -227,6 +227,10 @@ private void buildFactionList(UICommandBuilder cmd, UIEventBuilder events) { cmd.set(sel + " #Balance.Text", economyManager.formatCurrencyCompact(entry.economy.balance())); 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)); + // Upkeep status indicator if (com.hyperfactions.config.ConfigManager.get().isUpkeepEnabled()) { cmd.set(sel + " #UpkeepDot.Visible", true); diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index f8b559cb..bf9c9a42 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -1694,6 +1694,9 @@ public static final class AdminGui { 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"; diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang index 80edb943..40599147 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang @@ -520,6 +520,9 @@ gui.log_time_7d = 7d gui.log_time_all = All gui.shape_circular = circular gui.shape_square = square +gui.nav_title = Admin Panel +gui.econ_btn_adjust = Adjust +gui.econ_btn_info = Info # Faction info labels gui.fac_description = Description diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang index 7c4a9b34..4378eb78 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang @@ -520,6 +520,9 @@ gui.log_time_7d = 7d gui.log_time_all = Todos gui.shape_circular = circular gui.shape_square = cuadrado +gui.nav_title = Panel de Admin +gui.econ_btn_adjust = Ajustar +gui.econ_btn_info = Info # Etiquetas de info de faccion gui.fac_description = Descripcion From 3efaa516f53482947536eb14d558113eebb411d0 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Wed, 11 Mar 2026 15:32:49 -0700 Subject: [PATCH 53/55] feat(i18n): localize remaining hardcoded fallbacks and format strings Replace all "Unknown", "None", "world", "another zone" fallbacks with localized equivalents across admin and player GUI pages. Localize treasury upkeep cost format ("every Nh") and time-left display strings. --- .../gui/admin/page/AdminFactionMembersPage.java | 2 +- .../gui/admin/page/AdminFactionRelationsPage.java | 10 +++++----- .../hyperfactions/gui/admin/page/AdminPlayersPage.java | 2 +- .../hyperfactions/gui/admin/page/AdminZoneMapPage.java | 4 ++-- .../gui/admin/page/CreateZoneWizardPage.java | 2 +- .../hyperfactions/gui/faction/page/ChunkMapPage.java | 4 ++-- .../gui/faction/page/FactionInvitesPage.java | 2 +- .../gui/faction/page/FactionMembersPage.java | 2 +- .../hyperfactions/gui/faction/page/TreasuryPage.java | 4 ++-- .../gui/newplayer/page/NewPlayerBrowsePage.java | 2 +- .../gui/newplayer/page/NewPlayerMapPage.java | 2 +- src/main/java/com/hyperfactions/util/MessageKeys.java | 5 +++++ .../Server/Languages/en-US/hyperfactions.lang | 1 + .../Server/Languages/en-US/hyperfactions_admin.lang | 1 + .../Server/Languages/en-US/hyperfactions_gui.lang | 2 ++ .../Server/Languages/es-ES/hyperfactions.lang | 1 + .../Server/Languages/es-ES/hyperfactions_admin.lang | 1 + .../Server/Languages/es-ES/hyperfactions_gui.lang | 2 ++ 18 files changed, 31 insertions(+), 18 deletions(-) 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 f6e4df09..335aeb96 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionMembersPage.java @@ -238,7 +238,7 @@ public void handleDataEvent(Ref ref, Store store, Admi 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 : "Unknown"; guiManager.openAdminPlayerInfo(player, ref, store, playerRef, memberUuid, memberName, factionId, AdminPlayerInfoPage.Origin.FACTION_MEMBERS); } } + 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); } } 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 fce9ec1e..788fd702 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminFactionRelationsPage.java @@ -129,7 +129,7 @@ private void buildSetRelationSection(UICommandBuilder cmd, UIEventBuilder events cmd.append("#NeutralList", UIPaths.ADMIN_FACTION_RELATIONS_ENTRY); String idx = "#NeutralList[" + i + "]"; FactionMember leader = other.getLeader(); - String leaderName = leader != null ? leader.username() : "Unknown"; + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.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 + " #DateEstablished.Text", ""); @@ -159,7 +159,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() : "Unknown"; + String leaderName = leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); entries.add(new RelationEntry(other.id(), other.name(), leaderName, relation.since())); } } @@ -189,9 +189,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() : "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() : "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() : "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, 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); } } default -> sendUpdate(); } } 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 c6345262..2067957a 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayersPage.java @@ -528,7 +528,7 @@ public void handleDataEvent(Ref ref, Store store, sendUpdate(); return; } - String targetName = data.playerName != null ? data.playerName : "Unknown"; + String targetName = data.playerName != null ? data.playerName : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); // Find the player's faction for context UUID factionId = null; for (Faction faction : factionManager.getAllFactions()) { 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 21425b8c..40d520bb 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneMapPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminZoneMapPage.java @@ -121,7 +121,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() : "world"; + String worldName = world != null ? world.getName() : HFMessages.get(playerRef, MessageKeys.Common.WORLD_FALLBACK); // Check if player is in the same world as the zone boolean sameWorld = zone.world().equals(worldName); @@ -499,7 +499,7 @@ public void handleDataEvent(Ref ref, Store store, case "OtherZone" -> { Zone otherZone = zoneManager.getZone(zoneWorld, data.chunkX, data.chunkZ); - String zoneName = otherZone != null ? otherZone.name() : "another zone"; + 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)); } 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 6f61361d..927c2219 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/CreateZoneWizardPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/CreateZoneWizardPage.java @@ -358,7 +358,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() : "world"; + String worldName = world != null ? world.getName() : HFMessages.get(playerRef, MessageKeys.Common.WORLD_FALLBACK); if (player == null || playerRef == null || data.button == null) { sendUpdate(); 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 55b90c65..c0b70753 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/ChunkMapPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/ChunkMapPage.java @@ -122,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() : "world"; + String worldName = world != null ? world.getName() : HFMessages.get(playerRef, MessageKeys.Common.WORLD_FALLBACK); int playerChunkX = 0; int playerChunkZ = 0; @@ -545,7 +545,7 @@ public void handleDataEvent(Ref ref, Store store, Faction viewerFaction = factionManager.getPlayerFaction(playerRef.getUuid()); World world = player.getWorld(); - String worldName = world != null ? world.getName() : "world"; + String worldName = world != null ? world.getName() : HFMessages.get(playerRef, MessageKeys.Common.WORLD_FALLBACK); // Handle navigation - use new player nav when no faction if (viewerFaction != null) { 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 29c085a9..edf5143b 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionInvitesPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionInvitesPage.java @@ -510,7 +510,7 @@ private void handleDeclineRequest(Player player, FactionPageData data) { } JoinRequest request = joinRequestManager.getRequest(faction.id(), targetUuid); - String playerName = request != null ? request.playerName() : "Unknown"; + String playerName = request != null ? request.playerName() : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); joinRequestManager.declineRequest(faction.id(), targetUuid); 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 c4e80710..b1e202fa 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/FactionMembersPage.java @@ -496,7 +496,7 @@ public void handleDataEvent(Ref ref, Store store, sendUpdate(); return; } - String targetName = data.target != null ? data.target : "Unknown"; + String targetName = data.target != null ? data.target : HFMessages.get(playerRef, MessageKeys.Common.UNKNOWN); guiManager.openPlayerInfo(player, ref, store, playerRef, uuid, targetName, "members"); } } 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 edb65563..33553af2 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java @@ -191,7 +191,7 @@ private void buildUpkeepSection(UICommandBuilder cmd, UIEventBuilder events, // Show chunk breakdown String chunkDetail = HFMessages.get(playerRef, MessageKeys.TreasuryGui.CHUNKS_DETAIL, Math.min(freeChunks, claimCount), billableChunks); - String costString = economyManager.formatCurrency(costPerCycle) + " every " + intervalHours + "h"; + 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)); cmd.set("#UpkeepDetail.Text", chunkDetail); @@ -210,7 +210,7 @@ private void buildUpkeepSection(UICommandBuilder cmd, UIEventBuilder events, cmd.set("#UpkeepBar.Bar.Color", barColor); cmd.set("#UpkeepTimer.Text", remaining < 0 ? HFMessages.get(playerRef, MessageKeys.TreasuryGui.PENDING) - : formatDuration(remaining) + " left"); + : HFMessages.get(playerRef, MessageKeys.TreasuryGui.UPKEEP_TIME_LEFT, formatDuration(remaining))); boolean autoPay = economy != null && economy.upkeepAutoPay(); cmd.set("#AutoPayStatus.Text", autoPay diff --git a/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerBrowsePage.java b/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerBrowsePage.java index 2293c969..638063f6 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerBrowsePage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerBrowsePage.java @@ -236,7 +236,7 @@ private List buildFactionEntryList() { stats.currentPower(), stats.maxPower(), faction.claims().size(), - leader != null ? leader.username() : "None", + leader != null ? leader.username() : HFMessages.get(playerRef, MessageKeys.Common.NONE), faction.open(), faction.description() )); diff --git a/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerMapPage.java b/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerMapPage.java index af27b67f..c3e37e53 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerMapPage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerMapPage.java @@ -115,7 +115,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() : "world"; + String worldName = world != null ? world.getName() : HFMessages.get(playerRef, MessageKeys.Common.WORLD_FALLBACK); int playerChunkX = 0; int playerChunkZ = 0; diff --git a/src/main/java/com/hyperfactions/util/MessageKeys.java b/src/main/java/com/hyperfactions/util/MessageKeys.java index bf9c9a42..df0116a3 100644 --- a/src/main/java/com/hyperfactions/util/MessageKeys.java +++ b/src/main/java/com/hyperfactions/util/MessageKeys.java @@ -61,6 +61,7 @@ public static final class Common { 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() {} } @@ -1310,6 +1311,9 @@ public static final class TreasuryGui { 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() {} } @@ -1953,6 +1957,7 @@ public static final class AdminGui { 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) ========== diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions.lang b/src/main/resources/Server/Languages/en-US/hyperfactions.lang index c9c9ab92..2fc0c45b 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions.lang @@ -22,6 +22,7 @@ common.back = Back common.leave = Leave common.transfer = Transfer common.disband = Disband +common.world_fallback = world common.yes = Yes common.no = No common.loading = Loading... diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang index 40599147..bb35ea86 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_admin.lang @@ -345,6 +345,7 @@ map.unclaim_failed = Failed to unclaim chunk: {0} map.chunk_belongs = This chunk belongs to {0}. map.chunk_faction = This chunk is claimed by a faction. map.chunk_protected = This chunk is in a protected region. +map.another_zone = another zone # ========== GUI Label Keys (for .ui hardcoded text localization) ========== diff --git a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang index fa850639..9f68570a 100644 --- a/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/en-US/hyperfactions_gui.lang @@ -445,6 +445,8 @@ treasury.no_limit_hint = Set to 0 for no limit treasury.upkeep_settings = UPKEEP SETTINGS treasury.auto_pay_upkeep = Auto-pay upkeep from treasury treasury.back_btn = Back +treasury.upkeep_cost_format = {0} every {1}h +treasury.upkeep_time_left = {0} left treasury.wallet_label = Your wallet: {0} treasury.treasury_label = Treasury balance: {0} treasury.chunks_detail = {0} free + {1} billable chunks diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions.lang index 8f7d943b..0354cca2 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions.lang @@ -22,6 +22,7 @@ common.back = Volver common.leave = Salir common.transfer = Transferir common.disband = Disolver +common.world_fallback = mundo common.yes = Si common.no = No common.loading = Cargando... diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang index 4378eb78..605b811f 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_admin.lang @@ -345,6 +345,7 @@ map.unclaim_failed = No se pudo desreclamar el chunk: {0} map.chunk_belongs = Este chunk pertenece a {0}. map.chunk_faction = Este chunk esta reclamado por una faccion. map.chunk_protected = Este chunk esta en una region protegida. +map.another_zone = otra zona # ========== Claves de Etiquetas GUI (localizacion de texto en .ui) ========== diff --git a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang index ec5bcce6..6a730430 100644 --- a/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang +++ b/src/main/resources/Server/Languages/es-ES/hyperfactions_gui.lang @@ -445,6 +445,8 @@ treasury.no_limit_hint = Usar 0 para sin limite treasury.upkeep_settings = AJUSTES DE MANTENIMIENTO treasury.auto_pay_upkeep = Pago automatico de mantenimiento desde tesoreria treasury.back_btn = Volver +treasury.upkeep_cost_format = {0} cada {1}h +treasury.upkeep_time_left = {0} restante treasury.wallet_label = Tu billetera: {0} treasury.treasury_label = Saldo de tesoreria: {0} treasury.chunks_detail = {0} gratis + {1} chunks facturables From d7078dd73fc0f4a79d0c6c3df61d13ac09b8a2bf Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Wed, 11 Mar 2026 16:56:28 -0700 Subject: [PATCH 54/55] fix(i18n): resolve Spanish truncation, crashes, and missing translations across GUI - Widen label/button widths across admin pages for longer Spanish text: player info (Primera conexion, Ultima conexion, Set/Reset/SetMax buttons), sort labels (Ordenar:) on players/economy/zones/members pages, bypass state label (Desactivado) on dashboard, teleport button and last online label on player entries, lock hints on faction settings and create faction pages - Fix admin player info crash: replace CheckBoxWithLabel @Text (not dynamically settable) with empty checkbox + separate addressable labels for bypass toggles (Sin Perdida de Poder / Sin Decaimiento de Reclamos) - Widen admin player info container 720->780px for button space - Add lock hint Wrap:true and increased height for long Spanish text - Fix treasury column widths to fit Spanish type names (Transferencia) - Fix help table 4-column widths for longer Spanish headers - Add missing NOTE callout to es-ES combat/tagging.md (line count parity) - Remove unsupported mid-text color code from es-ES alliances table - Add i18n cmd.set() calls for new player map page legend labels --- .../gui/admin/page/AdminPlayerInfoPage.java | 6 +-- .../gui/faction/page/TreasuryPage.java | 8 ++-- .../gui/help/page/HelpMainPage.java | 4 +- .../gui/newplayer/page/NewPlayerMapPage.java | 15 ++++-- .../HyperFactions/admin/admin_dashboard.ui | 2 +- .../HyperFactions/admin/admin_economy.ui | 2 +- .../admin/admin_faction_members.ui | 2 +- .../admin/admin_faction_settings.ui | 6 +-- .../HyperFactions/admin/admin_player_entry.ui | 4 +- .../HyperFactions/admin/admin_player_info.ui | 46 +++++++++++-------- .../HyperFactions/admin/admin_players.ui | 2 +- .../Custom/HyperFactions/admin/admin_zones.ui | 2 +- .../HyperFactions/faction/faction_treasury.ui | 8 ++-- .../HyperFactions/faction/player_info.ui | 6 +-- .../HyperFactions/newplayer/create_faction.ui | 6 +-- .../Languages/es-ES/help/combat/tagging.md | 2 + .../es-ES/help/diplomacy/alliances.md | 2 +- 17 files changed, 72 insertions(+), 51 deletions(-) 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 019edf54..3924803c 100644 --- a/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java +++ b/src/main/java/com/hyperfactions/gui/admin/page/AdminPlayerInfoPage.java @@ -128,10 +128,10 @@ public void build(Ref ref, UICommandBuilder cmd, 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)); - // Localize bypass checkbox labels and no-faction label - cmd.set("#NoLossCheck #CheckBox.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_NO_POWER_LOSS)); - cmd.set("#NoDecayCheck #CheckBox.Text", HFMessages.get(playerRef, MessageKeys.AdminGui.GUI_PLR_NO_CLAIM_DECAY)); + // 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)); buildContent(cmd, events); } 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 33553af2..e99d095b 100644 --- a/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java +++ b/src/main/java/com/hyperfactions/gui/faction/page/TreasuryPage.java @@ -347,10 +347,10 @@ private void buildTransactionLog(UICommandBuilder cmd, FactionEconomy economy) { cmd.appendInline("#TransactionList", "Group { LayoutMode: Left; Anchor: (Height: 22); Background: (Color: " + bgColor + "); Padding: (Left: 6, Right: 6); " - + "Label { Text: \"" + time + "\"; Style: (FontSize: 10, TextColor: #666666); Anchor: (Width: 100); } " - + "Label { Text: \"" + typeName + "\"; Style: (FontSize: 10, TextColor: " + typeColor + "); Anchor: (Width: 100); } " - + "Label { Text: \"" + actorName + "\"; Style: (FontSize: 10, TextColor: #AAAAAA); Anchor: (Width: 90); } " - + "Label { Text: \"" + amountStr + "\"; Style: (FontSize: 10, TextColor: #FFFFFF); Anchor: (Width: 100); } " + + "Label { Text: \"" + time + "\"; Style: (FontSize: 10, TextColor: #666666); Anchor: (Width: 80); } " + + "Label { Text: \"" + typeName + "\"; Style: (FontSize: 10, TextColor: " + typeColor + "); Anchor: (Width: 155); } " + + "Label { Text: \"" + actorName + "\"; Style: (FontSize: 10, TextColor: #AAAAAA); Anchor: (Width: 75); } " + + "Label { Text: \"" + amountStr + "\"; Style: (FontSize: 10, TextColor: #FFFFFF); Anchor: (Width: 80); } " + "Label { Text: \"" + desc + "\"; Style: (FontSize: 10, TextColor: #555555); FlexWeight: 1; } " + "}"); } 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 1364650e..5958e520 100644 --- a/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java +++ b/src/main/java/com/hyperfactions/gui/help/page/HelpMainPage.java @@ -242,7 +242,7 @@ private void applyCellText(UICommandBuilder cmd, String rowSelector, private static int[] getColumnPixelWidths(int numCols) { return switch (numCols) { case 3 -> new int[]{170, 170, 280}; - case 4 -> new int[]{170, 85, 85, 270}; + case 4 -> new int[]{140, 140, 140, 190}; default -> new int[]{217, 400}; }; } @@ -251,7 +251,7 @@ private static int[] getColumnPixelWidths(int numCols) { private static int[] getColumnFixedWidths(int numCols) { return switch (numCols) { case 3 -> new int[]{170, 170}; - case 4 -> new int[]{170, 85, 85}; + case 4 -> new int[]{140, 140, 140}; default -> new int[]{217}; }; } diff --git a/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerMapPage.java b/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerMapPage.java index c3e37e53..c04e5576 100644 --- a/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerMapPage.java +++ b/src/main/java/com/hyperfactions/gui/newplayer/page/NewPlayerMapPage.java @@ -136,11 +136,20 @@ public void build(Ref ref, UICommandBuilder cmd, // Setup navigation bar for new players (instead of faction nav bar) NewPlayerNavBarHelper.setupBar(playerRef, PAGE_ID, cmd, events); - // Update position info + // 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)); - - // Update hint text for read-only mode 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)); + if (!terrainEnabled) { + cmd.set("#LegendWildernessLabel.Text", HFMessages.get(playerRef, MessageKeys.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)); // Hide claim/power stats (not relevant for new players) cmd.set("#ClaimStats.Text", ""); diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_dashboard.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_dashboard.ui index 400d4ce3..3b1a60d1 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_dashboard.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_dashboard.ui @@ -263,7 +263,7 @@ $C.@PageOverlay { Label #BypassState { Text: "Off"; Style: (FontSize: 14, TextColor: #FF5555, RenderBold: true, VerticalAlignment: Center); - Anchor: (Width: 80); + Anchor: (Width: 105); } TextButton #ToggleBypassBtn { Text: "Enable"; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_economy.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_economy.ui index 4144fa25..1f18e5cb 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_economy.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_economy.ui @@ -187,7 +187,7 @@ $C.@PageOverlay { Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); - Anchor: (Width: 35); + Anchor: (Width: 65); } DropdownBox #SortDropdown { Style: $C.@DefaultDropdownBoxStyle; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members.ui index c60d8c1b..76be0d7d 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_members.ui @@ -69,7 +69,7 @@ $C.@PageOverlay { Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); - Anchor: (Width: 50); + Anchor: (Width: 65); } DropdownBox #SortDropdown { Style: $C.@DefaultDropdownBoxStyle; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_settings.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_settings.ui index aecdf49e..8e9aa31d 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_settings.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_faction_settings.ui @@ -281,14 +281,14 @@ $C.@PageOverlay { // Lock hint Group { - Anchor: (Height: 22, Bottom: 6); + Anchor: (Height: 32, Bottom: 6); Background: (Color: #1a1a2a); - Padding: (Left: 8, Right: 8, Top: 0, Bottom: 0); + Padding: (Left: 8, Right: 8, Top: 4, Bottom: 4); LayoutMode: Left; Label #LockHint { Text: "Some options may be locked by the server and won't accept changes."; - Style: (FontSize: 9, TextColor: #555577, VerticalAlignment: Center); + Style: (FontSize: 9, TextColor: #555577, VerticalAlignment: Center, Wrap: true); FlexWeight: 1; } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_entry.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_entry.ui index d5514d6a..552c6fb8 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_entry.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_entry.ui @@ -115,7 +115,7 @@ Group { Label #LastOnlineLabel { Text: "Last Online:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 70); + Anchor: (Width: 105); } Label #LastOnline { Text: "Unknown"; @@ -181,7 +181,7 @@ Group { } TextButton #TeleportBtn { Text: "Teleport"; - Anchor: (Height: 24, Width: 80, Right: 6); + Anchor: (Height: 24, Width: 110, Right: 6); Style: $S.@ButtonStyle; } Group { FlexWeight: 1; } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_info.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_info.ui index 78f7473c..1411f064 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_info.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_player_info.ui @@ -9,7 +9,7 @@ $C.@PageOverlay { $Nav.@HyperFactionsAdminNavBar #HyperFactionsAdminNavBar {} $C.@Container { - Anchor: (Width: 720, Height: 600); + Anchor: (Width: 780, Height: 600); #Title { $C.@Title #PageTitle { @@ -59,18 +59,18 @@ $C.@PageOverlay { Label #FirstJoinedLabel { Text: "First joined:"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 68); + Anchor: (Width: 108); } Label #FirstJoinedValue { Text: ""; Style: (FontSize: 9, TextColor: #AAAAAA, VerticalAlignment: Center); - Anchor: (Width: 120); + Anchor: (Width: 100); } Label #LastOnlineLabel { Text: "Last online:"; Style: (FontSize: 9, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 64); + Anchor: (Width: 104); } Label #LastOnlineValue { Text: ""; @@ -320,36 +320,36 @@ $C.@PageOverlay { TextButton #SubFive { Text: "-5"; - Anchor: (Height: 24, Width: 34, Right: 2); + Anchor: (Height: 24, Width: 30, Right: 2); Style: $S.@RedButtonStyle; } TextButton #SubOne { Text: "-1"; - Anchor: (Height: 24, Width: 34, Right: 3); + Anchor: (Height: 24, Width: 30, Right: 2); Style: $S.@RedButtonStyle; } $C.@TextField #PowerInput { - Anchor: (Height: 24, Width: 52, Right: 3); + Anchor: (Height: 24, Width: 46, Right: 2); Style: (FontSize: 11, TextColor: #FFFFFF); } TextButton #AddOne { Text: "+1"; - Anchor: (Height: 24, Width: 34, Right: 2); + Anchor: (Height: 24, Width: 30, Right: 2); Style: $S.@ButtonStyle; } TextButton #AddFive { Text: "+5"; - Anchor: (Height: 24, Width: 34, Right: 3); + Anchor: (Height: 24, Width: 30, Right: 2); Style: $S.@ButtonStyle; } TextButton #SetPowerBtn { Text: "Set"; - Anchor: (Height: 24, Width: 36, Right: 2); + Anchor: (Height: 24, Width: 78, Right: 2); Style: $S.@CyanButtonStyle; } TextButton #ResetPowerBtn { Text: "Reset"; - Anchor: (Height: 24, Width: 44); + Anchor: (Height: 24, Width: 68); Style: $S.@RedButtonStyle; } } @@ -365,17 +365,17 @@ $C.@PageOverlay { Anchor: (Width: 33); } $C.@TextField #MaxPowerInput { - Anchor: (Height: 24, Width: 56, Right: 3); + Anchor: (Height: 24, Width: 50, Right: 2); Style: (FontSize: 11, TextColor: #FFFFFF); } TextButton #SetMaxBtn { Text: "Set Max"; - Anchor: (Height: 24, Width: 58, Right: 2); + Anchor: (Height: 24, Width: 104, Right: 2); Style: $S.@CyanButtonStyle; } TextButton #ResetMaxBtn { Text: "Reset"; - Anchor: (Height: 24, Width: 44); + Anchor: (Height: 24, Width: 68); Style: $S.@RedButtonStyle; } } @@ -422,9 +422,14 @@ $C.@PageOverlay { Anchor: (Height: 26, Bottom: 3); $C.@CheckBoxWithLabel #NoLossCheck { - @Text = "Disable Power Loss"; + @Text = ""; @Checked = false; - Anchor: (Height: 22, Width: 175); + Anchor: (Height: 22, Width: 28); + } + Label #NoLossLabel { + Text: "Disable Power Loss"; + Style: (FontSize: 10, TextColor: #CCCCCC, VerticalAlignment: Center); + FlexWeight: 1; } } @@ -433,9 +438,14 @@ $C.@PageOverlay { Anchor: (Height: 26); $C.@CheckBoxWithLabel #NoDecayCheck { - @Text = "Disable Claim Decay"; + @Text = ""; @Checked = false; - Anchor: (Height: 22, Width: 175); + Anchor: (Height: 22, Width: 28); + } + Label #NoDecayLabel { + Text: "Disable Claim Decay"; + Style: (FontSize: 10, TextColor: #CCCCCC, VerticalAlignment: Center); + FlexWeight: 1; } } } diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_players.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_players.ui index 80638b8d..b8738828 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_players.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_players.ui @@ -55,7 +55,7 @@ $C.@PageOverlay { Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); - Anchor: (Width: 35); + Anchor: (Width: 65); } DropdownBox #SortDropdown { Style: $C.@DefaultDropdownBoxStyle; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zones.ui b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zones.ui index 59b763d9..1592afcf 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zones.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/admin/admin_zones.ui @@ -74,7 +74,7 @@ $C.@PageOverlay { Label #SortLabel { Text: "Sort:"; Style: (FontSize: 11, TextColor: #888888, VerticalAlignment: Center); - Anchor: (Width: 35); + Anchor: (Width: 65); } DropdownBox #SortDropdown { Style: $C.@DefaultDropdownBoxStyle; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_treasury.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_treasury.ui index 3709479e..bf3338f6 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_treasury.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/faction_treasury.ui @@ -385,22 +385,22 @@ $C.@PageOverlay { Label #ColDateLabel { Text: "Date"; Style: (FontSize: 10, TextColor: #555555); - Anchor: (Width: 100); + Anchor: (Width: 80); } Label #ColTypeLabel { Text: "Type"; Style: (FontSize: 10, TextColor: #555555); - Anchor: (Width: 100); + Anchor: (Width: 155); } Label #ColByLabel { Text: "By"; Style: (FontSize: 10, TextColor: #555555); - Anchor: (Width: 90); + Anchor: (Width: 75); } Label #ColAmountLabel { Text: "Amount"; Style: (FontSize: 10, TextColor: #555555); - Anchor: (Width: 100); + Anchor: (Width: 80); } Label #ColDetailsLabel { Text: "Details"; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/faction/player_info.ui b/src/main/resources/Common/UI/Custom/HyperFactions/faction/player_info.ui index 01c05df2..a6b607d0 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/faction/player_info.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/faction/player_info.ui @@ -50,18 +50,18 @@ $C.@PageOverlay { Label #FirstJoinedLabel { Text: "First joined:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 75); + Anchor: (Width: 110); } Label #FirstJoinedValue { Text: ""; Style: (FontSize: 10, TextColor: #AAAAAA, VerticalAlignment: Center); - Anchor: (Width: 130); + Anchor: (Width: 110); } Label #LastOnlineLabel { Text: "Last online:"; Style: (FontSize: 10, TextColor: #666666, VerticalAlignment: Center); - Anchor: (Width: 70); + Anchor: (Width: 100); } Label #LastOnlineValue { Text: ""; diff --git a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/create_faction.ui b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/create_faction.ui index 1c8b528e..3f9add62 100644 --- a/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/create_faction.ui +++ b/src/main/resources/Common/UI/Custom/HyperFactions/newplayer/create_faction.ui @@ -170,14 +170,14 @@ $C.@PageOverlay { // Lock hint Group { - Anchor: (Height: 22, Bottom: 6); + Anchor: (Height: 32, Bottom: 6); Background: (Color: #1a1a2a); - Padding: (Left: 8, Right: 8, Top: 0, Bottom: 0); + Padding: (Left: 8, Right: 8, Top: 4, Bottom: 4); LayoutMode: Left; Label #LockHint { Text: "Some options may be locked by the server and won't accept changes."; - Style: (FontSize: 9, TextColor: #555577, VerticalAlignment: Center); + Style: (FontSize: 9, TextColor: #555577, VerticalAlignment: Center, Wrap: true); FlexWeight: 1; } } diff --git a/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md b/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md index b9dc61e5..46b88caf 100644 --- a/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md +++ b/src/main/resources/Server/Languages/es-ES/help/combat/tagging.md @@ -24,4 +24,6 @@ Tus objetos caen donde te desconectaste y los enemigos pueden saquearlos. Siempr El temporizador de etiqueta de combate aparece en pantalla cuando entras en combate. Cada nuevo golpe lo reinicia a 15 segundos. Una vez que llega a cero, todas las restricciones se levantan. +>[!NOTE] Estos son valores predeterminados. El administrador de tu servidor puede haber configurado ajustes diferentes. + >[!TIP] Desvincularte y espera a que el temporizador termine si necesitas teletransportarte. diff --git a/src/main/resources/Server/Languages/es-ES/help/diplomacy/alliances.md b/src/main/resources/Server/Languages/es-ES/help/diplomacy/alliances.md index a9dfac40..2a89f468 100644 --- a/src/main/resources/Server/Languages/es-ES/help/diplomacy/alliances.md +++ b/src/main/resources/Server/Languages/es-ES/help/diplomacy/alliances.md @@ -27,7 +27,7 @@ Cualquier lado puede terminar unilateralmente una alianza restableciendo la rela | Beneficio | Detalles | |-----------|----------| | **Sin fuego amigo** | Los jugadores aliados no pueden danarse entre si (cuando el dano entre aliados esta desactivado) | -| **Visibilidad compartida en mapa** | El territorio aliado se muestra en [#5555FF] azul en el mapa de territorio | +| **Visibilidad compartida en mapa** | El territorio aliado se muestra en azul en el mapa de territorio | | **Interaccion con territorio** | Los aliados pueden usar puertas, asientos y transporte en tu territorio por defecto | | **Chat de aliados** | Usa `/f c` para cambiar al modo de chat de aliados para comunicacion entre facciones | | **Proteccion contra sobrereclamacion** | Los aliados no pueden sobrereclamar el territorio del otro | From 839de8963956bc9ebc7d66700e365a2198c8e0be Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Wed, 11 Mar 2026 21:11:07 -0700 Subject: [PATCH 55/55] feat: add SimpleClaims data importer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Import parties, claims, and alliances from SimpleClaims into HyperFactions. Supports both SQLite (modern) and JSON (legacy) storage formats with automatic detection. Key conversion details: - Party Owner → Leader, Members → Member (no Officer role in SC) - Only mutual alliances imported as ALLY (one-way skipped) - Player allies logged as data loss (no HF equivalent) - Protection overrides mapped to outsider permission flags - Default max power assigned (SC has no power system) - No zones or homes (SC doesn't have these concepts) Includes SQLite JDBC driver detection with clear error message if the driver is unavailable. --- .../admin/handler/AdminImportHandler.java | 56 +- .../importer/SimpleClaimsImporter.java | 919 ++++++++++++++++++ .../simpleclaims/ScAdminOverrides.java | 11 + .../importer/simpleclaims/ScChunkInfo.java | 23 + .../importer/simpleclaims/ScClaims.java | 11 + .../importer/simpleclaims/ScDimension.java | 12 + .../importer/simpleclaims/ScNameCache.java | 11 + .../importer/simpleclaims/ScNameEntry.java | 11 + .../importer/simpleclaims/ScOverride.java | 14 + .../simpleclaims/ScOverrideValue.java | 29 + .../importer/simpleclaims/ScParties.java | 11 + .../importer/simpleclaims/ScParty.java | 34 + .../importer/simpleclaims/ScSqliteReader.java | 220 +++++ .../importer/simpleclaims/ScTracker.java | 40 + 14 files changed, 1401 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/hyperfactions/importer/SimpleClaimsImporter.java create mode 100644 src/main/java/com/hyperfactions/importer/simpleclaims/ScAdminOverrides.java create mode 100644 src/main/java/com/hyperfactions/importer/simpleclaims/ScChunkInfo.java create mode 100644 src/main/java/com/hyperfactions/importer/simpleclaims/ScClaims.java create mode 100644 src/main/java/com/hyperfactions/importer/simpleclaims/ScDimension.java create mode 100644 src/main/java/com/hyperfactions/importer/simpleclaims/ScNameCache.java create mode 100644 src/main/java/com/hyperfactions/importer/simpleclaims/ScNameEntry.java create mode 100644 src/main/java/com/hyperfactions/importer/simpleclaims/ScOverride.java create mode 100644 src/main/java/com/hyperfactions/importer/simpleclaims/ScOverrideValue.java create mode 100644 src/main/java/com/hyperfactions/importer/simpleclaims/ScParties.java create mode 100644 src/main/java/com/hyperfactions/importer/simpleclaims/ScParty.java create mode 100644 src/main/java/com/hyperfactions/importer/simpleclaims/ScSqliteReader.java create mode 100644 src/main/java/com/hyperfactions/importer/simpleclaims/ScTracker.java 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 e738ee5e..31371677 100644 --- a/src/main/java/com/hyperfactions/command/admin/handler/AdminImportHandler.java +++ b/src/main/java/com/hyperfactions/command/admin/handler/AdminImportHandler.java @@ -5,6 +5,7 @@ import com.hyperfactions.importer.ElbaphFactionsImporter; import com.hyperfactions.importer.HyFactionsImporter; import com.hyperfactions.importer.ImportResult; +import com.hyperfactions.importer.SimpleClaimsImporter; import com.hyperfactions.util.CommandHelp; import com.hyperfactions.util.HelpFormatter; import com.hypixel.hytale.server.core.Message; @@ -17,7 +18,7 @@ import java.util.concurrent.CompletableFuture; /** - * Handles /f admin import commands (hyfactions, elbaphfactions). + * Handles /f admin import commands (hyfactions, elbaphfactions, simpleclaims). */ public class AdminImportHandler { @@ -59,6 +60,7 @@ public void handleAdminImport(CommandContext ctx, String[] args) { switch (subCmd) { case "hyfactions" -> handleImportHyFactions(ctx, subArgs); case "elbaphfactions" -> handleImportElbaphFactions(ctx, subArgs); + case "simpleclaims" -> handleImportSimpleClaims(ctx, subArgs); case "help", "?" -> showImportHelp(ctx); default -> { ctx.sendMessage(prefix().insert(msg("Unknown import source: " + subCmd, COLOR_RED))); @@ -73,6 +75,8 @@ private void showImportHelp(CommandContext ctx) { 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 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")); @@ -187,6 +191,56 @@ public void handleImportElbaphFactions(CommandContext ctx, String[] args) { .thenAccept(result -> reportImportResult(ctx, result, finalDryRun, "ElbaphFactions")); } + /** Handles import simple claims. */ + public void handleImportSimpleClaims(CommandContext ctx, String[] args) { + // Parse path (optional - default to Server/universe/SimpleClaims) + String pathStr = "Server/universe/SimpleClaims"; + int flagStartIndex = 0; + + if (args.length > 0 && !args[0].startsWith("-")) { + pathStr = args[0]; + flagStartIndex = 1; + } + + Path dataPath = Paths.get(pathStr); + + boolean dryRun = false; + boolean overwrite = false; + boolean skipPower = false; + + for (int i = flagStartIndex; i < args.length; i++) { + String flag = args[i].toLowerCase(); + switch (flag) { + case "--dry-run", "-n" -> dryRun = true; + case "--overwrite" -> overwrite = true; + case "--no-power" -> skipPower = true; + default -> throw new IllegalStateException("Unexpected value"); + } + } + + ctx.sendMessage(prefix().insert(msg("Importing from SimpleClaims...", COLOR_YELLOW))); + ctx.sendMessage(msg(" Path: " + dataPath, COLOR_GRAY)); + if (dryRun) { + ctx.sendMessage(msg(" (Dry run - no changes will be made)", COLOR_GRAY)); + } + + SimpleClaimsImporter importer = new SimpleClaimsImporter( + hyperFactions.getFactionManager(), + hyperFactions.getClaimManager(), + hyperFactions.getZoneManager(), + hyperFactions.getPowerManager(), + hyperFactions.getBackupManager() + ); + + importer.setDryRun(dryRun); + importer.setOverwrite(overwrite); + importer.setSkipPower(skipPower); + + final boolean finalDryRun = dryRun; + CompletableFuture.supplyAsync(() -> importer.importFrom(dataPath)) + .thenAccept(result -> reportImportResult(ctx, result, finalDryRun, "SimpleClaims")); + } + 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))); diff --git a/src/main/java/com/hyperfactions/importer/SimpleClaimsImporter.java b/src/main/java/com/hyperfactions/importer/SimpleClaimsImporter.java new file mode 100644 index 00000000..1d24682e --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/SimpleClaimsImporter.java @@ -0,0 +1,919 @@ +package com.hyperfactions.importer; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.hyperfactions.backup.BackupManager; +import com.hyperfactions.backup.BackupType; +import com.hyperfactions.config.ConfigManager; +import com.hyperfactions.data.*; +import com.hyperfactions.importer.simpleclaims.*; +import com.hyperfactions.manager.ClaimManager; +import com.hyperfactions.manager.FactionManager; +import com.hyperfactions.manager.PowerManager; +import com.hyperfactions.manager.ZoneManager; +import com.hyperfactions.util.Logger; +import com.hyperfactions.util.MessageKeys; +import java.io.File; +import java.io.FileReader; +import java.nio.file.Path; +import java.sql.SQLException; +import java.util.*; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.locks.ReentrantLock; +import java.util.function.Consumer; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Imports faction data from SimpleClaims mod into HyperFactions. + * Thread-safe: only one import can run at a time. + * + *

SimpleClaims data can be in two formats: + *

    + *
  • SQLite ({@code SimpleClaims.db}) — modern format with correct column names
  • + *
  • JSON ({@code Parties.json}, {@code Claims.json}, etc.) — legacy format with ChunkY=Z quirk
  • + *
+ * + *

Key differences from FactionsX/HyFactions importers: + *

    + *
  • Only 2 roles: Owner (→ LEADER) and Member (→ MEMBER)
  • + *
  • No power system — assigns config defaults to all imported players
  • + *
  • No zones (safezone/warzone)
  • + *
  • No faction home
  • + *
  • One-way alliances — only mutual alliances are imported as ALLY
  • + *
  • Player allies have no HF equivalent — logged as warnings
  • + *
+ */ +public class SimpleClaimsImporter { + + private final Gson gson; + + private final FactionManager factionManager; + + private final ClaimManager claimManager; + + private final ZoneManager zoneManager; + + private final PowerManager powerManager; + + @Nullable + private final BackupManager backupManager; + + @Nullable + private Runnable onImportComplete; + + // Thread safety: own lock, also checks other importers + private static final ReentrantLock importLock = new ReentrantLock(); + + private static final AtomicBoolean importInProgress = new AtomicBoolean(false); + + // Import options + private boolean dryRun = true; + + private boolean overwrite = false; + + private boolean skipPower = false; + + private boolean createBackup = true; + + @Nullable + private Consumer progressCallback; + + // Name cache for UUID -> username lookups + private final Map nameCache = new HashMap<>(); + + // Storage format detected + private enum StorageFormat { SQLITE, JSON } + + /** Creates a new SimpleClaimsImporter. */ + public SimpleClaimsImporter( + @NotNull FactionManager factionManager, + @NotNull ClaimManager claimManager, + @NotNull ZoneManager zoneManager, + @NotNull PowerManager powerManager, + @Nullable BackupManager backupManager + ) { + this.factionManager = factionManager; + this.claimManager = claimManager; + this.zoneManager = zoneManager; + this.powerManager = powerManager; + this.backupManager = backupManager; + this.gson = new GsonBuilder().create(); + } + + // === Configuration Methods === + + /** Sets the dry run. */ + public SimpleClaimsImporter setDryRun(boolean dryRun) { + this.dryRun = dryRun; + return this; + } + + /** Sets the overwrite. */ + public SimpleClaimsImporter setOverwrite(boolean overwrite) { + this.overwrite = overwrite; + return this; + } + + /** Sets the skip power. */ + public SimpleClaimsImporter setSkipPower(boolean skipPower) { + this.skipPower = skipPower; + return this; + } + + /** Sets the create backup. */ + public SimpleClaimsImporter setCreateBackup(boolean createBackup) { + this.createBackup = createBackup; + return this; + } + + /** Sets the progress callback. */ + public SimpleClaimsImporter setProgressCallback(@Nullable Consumer callback) { + this.progressCallback = callback; + return this; + } + + /** Sets the on import complete. */ + public SimpleClaimsImporter setOnImportComplete(@Nullable Runnable callback) { + this.onImportComplete = callback; + return this; + } + + /** + * Checks if an import is currently in progress. + * + * @return true if an import is running + */ + public static boolean isImportInProgress() { + return importInProgress.get(); + } + + // === Import Entry Point === + + /** + * Imports SimpleClaims data from the given source path. + * + * @param sourcePath path to the SimpleClaims data directory (typically {@code mods/SimpleClaims}) + * @return the import result + */ + public ImportResult importFrom(@NotNull Path sourcePath) { + ImportResult.Builder result = ImportResult.builder().dryRun(dryRun); + + // Check other importers aren't running + if (HyFactionsImporter.isImportInProgress()) { + result.error("A HyFactions import is already in progress. Please wait for it to complete."); + return result.build(); + } + if (ElbaphFactionsImporter.isImportInProgress()) { + result.error("An ElbaphFactions import is already in progress. Please wait for it to complete."); + return result.build(); + } + // Thread safety: prevent concurrent imports + if (!importLock.tryLock()) { + result.error("Another import is already in progress. Please wait for it to complete."); + return result.build(); + } + + try { + importInProgress.set(true); + return doImport(sourcePath, result); + } finally { + importInProgress.set(false); + importLock.unlock(); + } + } + + // === Core Import Logic === + + private ImportResult doImport(@NotNull Path sourcePath, ImportResult.Builder result) { + progress("Starting SimpleClaims import from: " + sourcePath); + + File sourceDir = sourcePath.toFile(); + if (!sourceDir.exists() || !sourceDir.isDirectory()) { + result.error("Source directory not found: " + sourcePath); + return result.build(); + } + + // Detect storage format + // SimpleClaims stores data under Server/universe/SimpleClaims/ but also reads + // from its own mod dir. The admin provides the directory containing the data files. + File dbFile = new File(sourceDir, "SimpleClaims.db"); + File partiesFile = new File(sourceDir, "Parties.json"); + + StorageFormat format; + if (dbFile.exists()) { + if (!ScSqliteReader.isDriverAvailable()) { + result.error("SimpleClaims data is in SQLite format but the SQLite JDBC driver " + + "is not available. Please add the SimpleClaims JAR to your mods folder " + + "and restart the server, then retry the import."); + return result.build(); + } + format = StorageFormat.SQLITE; + progress("Detected SQLite storage format"); + } else if (partiesFile.exists()) { + format = StorageFormat.JSON; + progress("Detected legacy JSON storage format"); + } else { + result.error("No SimpleClaims data found in " + sourcePath + + " (expected SimpleClaims.db or Parties.json)"); + return result.build(); + } + + // Create pre-import backup if not dry run + if (!dryRun && createBackup && backupManager != null) { + progress("Creating pre-import backup..."); + try { + var backupResult = backupManager.createBackup( + BackupType.MANUAL, "pre-import-simpleclaims", null + ).join(); + + if (backupResult instanceof BackupManager.BackupResult.Success success) { + progress("Pre-import backup created: %s (%s)", + success.metadata().name(), success.metadata().getFormattedSize()); + } else if (backupResult instanceof BackupManager.BackupResult.Failure failure) { + result.warning("Failed to create pre-import backup: " + failure.error()); + progress("WARNING: Pre-import backup failed, continuing anyway..."); + } + } catch (Exception e) { + result.warning("Exception creating pre-import backup: " + e.getMessage()); + progress("WARNING: Pre-import backup failed, continuing anyway..."); + } + } else if (!dryRun && createBackup && backupManager == null) { + progress("WARNING: Backup manager not available, skipping pre-import backup"); + result.warning("Pre-import backup skipped (backup manager not available)"); + } + + // Load data + List parties; + ScClaims claims; + + if (format == StorageFormat.SQLITE) { + try { + ScSqliteReader reader = new ScSqliteReader(dbFile.toPath()); + + // Load name cache first + Map sqlNameCache = reader.readNameCache(); + for (Map.Entry entry : sqlNameCache.entrySet()) { + UUID uuid = parseUUID(entry.getKey()); + if (uuid != null) { + nameCache.put(uuid, entry.getValue()); + } + } + progress("Loaded %d name cache entries from SQLite", sqlNameCache.size()); + + parties = reader.readParties(); + claims = reader.readClaims(); + } catch (SQLException e) { + result.error("Failed to read SQLite database: " + e.getMessage()); + return result.build(); + } + } else { + // Load from JSON + loadNameCacheFromJson(sourceDir, result); + parties = loadPartiesFromJson(sourceDir, result); + claims = loadClaimsFromJson(sourceDir, result); + } + + if (parties == null || parties.isEmpty()) { + result.error("No parties found to import"); + return result.build(); + } + + // Build claims-by-party index + Map> claimsByParty = indexClaims(claims, format); + + int totalClaims = claimsByParty.values().stream().mapToInt(List::size).sum(); + progress("Found %d parties, %d claims", parties.size(), totalClaims); + + // Build alliance graph for mutual detection + Map> allianceGraph = buildAllianceGraph(parties); + + // Process parties + for (ScParty party : parties) { + processParty(party, claimsByParty, allianceGraph, result); + } + + if (dryRun) { + progress("Dry run complete - no changes made"); + } else { + // Rebuild claim index + progress("Rebuilding claim index..."); + claimManager.buildIndex(); + + // Trigger world map refresh + if (onImportComplete != null) { + progress("Refreshing world maps..."); + try { + onImportComplete.run(); + } catch (Exception e) { + result.warning("Failed to refresh world maps: " + e.getMessage()); + } + } + + progress("Import complete!"); + } + + return result.build(); + } + + // === Loading Methods === + + private void loadNameCacheFromJson(File sourceDir, ImportResult.Builder result) { + File file = new File(sourceDir, "NameCache.json"); + if (!file.exists()) { + result.warning("NameCache.json not found - usernames may show as 'Unknown'"); + return; + } + + try (FileReader reader = new FileReader(file)) { + ScNameCache cache = gson.fromJson(reader, ScNameCache.class); + if (cache != null && cache.Values() != null) { + for (ScNameEntry entry : cache.Values()) { + if (entry.UUID() != null && entry.Name() != null) { + UUID uuid = parseUUID(entry.UUID()); + if (uuid != null) { + nameCache.put(uuid, entry.Name()); + } + } + } + } + progress("Loaded %d name cache entries from JSON", nameCache.size()); + } catch (Exception e) { + result.warning("Failed to load NameCache.json: " + e.getMessage()); + } + } + + @Nullable + private List loadPartiesFromJson(File sourceDir, ImportResult.Builder result) { + File file = new File(sourceDir, "Parties.json"); + if (!file.exists()) { + result.error("Parties.json not found"); + return null; + } + + try (FileReader reader = new FileReader(file)) { + ScParties data = gson.fromJson(reader, ScParties.class); + if (data != null && data.Parties() != null) { + return data.Parties(); + } + result.error("Parties.json is empty or malformed"); + return null; + } catch (Exception e) { + result.error("Failed to load Parties.json: " + e.getMessage()); + return null; + } + } + + @Nullable + private ScClaims loadClaimsFromJson(File sourceDir, ImportResult.Builder result) { + File file = new File(sourceDir, "Claims.json"); + if (!file.exists()) { + result.warning("Claims.json not found - no claims will be imported"); + return null; + } + + try (FileReader reader = new FileReader(file)) { + return gson.fromJson(reader, ScClaims.class); + } catch (Exception e) { + result.warning("Failed to load Claims.json: " + e.getMessage()); + return null; + } + } + + // === Claim Indexing === + + /** Wrapper for claim data from either format. */ + private record ClaimData(String dimension, int chunkX, int chunkZ, long claimedAt, @Nullable UUID claimedBy) {} + + /** + * Indexes claims by party UUID. + */ + private Map> indexClaims(@Nullable ScClaims claims, StorageFormat format) { + Map> byParty = new HashMap<>(); + + if (claims == null || claims.Dimensions() == null) { + return byParty; + } + + for (ScDimension dim : claims.Dimensions()) { + if (dim.ChunkInfo() == null) continue; + String dimension = dim.Dimension() != null ? dim.Dimension() : "default"; + + for (ScChunkInfo chunk : dim.ChunkInfo()) { + if (chunk.UUID() == null) continue; + + UUID partyId = parseUUID(chunk.UUID()); + if (partyId == null) continue; + + long claimedAt = chunk.CreatedTracker() != null + ? chunk.CreatedTracker().toEpochMillis() + : System.currentTimeMillis(); + + UUID claimedBy = chunk.CreatedTracker() != null && chunk.CreatedTracker().UserUUID() != null + ? parseUUID(chunk.CreatedTracker().UserUUID()) + : null; + + // JSON uses ChunkY for Z; SQLite stores chunkZ directly in the ChunkY field + // via ScSqliteReader which already maps chunkZ → ScChunkInfo.ChunkY + int chunkZ = chunk.getChunkZ(); + + byParty.computeIfAbsent(partyId, k -> new ArrayList<>()) + .add(new ClaimData(dimension, chunk.ChunkX(), chunkZ, claimedAt, claimedBy)); + } + } + + return byParty; + } + + // === Alliance Graph === + + /** + * Builds a graph of party-to-party alliances for mutual detection. + */ + private Map> buildAllianceGraph(List parties) { + Map> graph = new HashMap<>(); + + for (ScParty party : parties) { + if (party.Id() == null || party.PartyAllies() == null) continue; + + UUID partyId = parseUUID(party.Id()); + if (partyId == null) continue; + + Set allies = new HashSet<>(); + for (String allyIdStr : party.PartyAllies()) { + UUID allyId = parseUUID(allyIdStr); + if (allyId != null) { + allies.add(allyId); + } + } + + if (!allies.isEmpty()) { + graph.put(partyId, allies); + } + } + + return graph; + } + + /** + * Checks if two parties are mutually allied. + */ + private boolean isMutualAlliance(UUID partyA, UUID partyB, Map> graph) { + Set aAllies = graph.get(partyA); + Set bAllies = graph.get(partyB); + return aAllies != null && aAllies.contains(partyB) + && bAllies != null && bAllies.contains(partyA); + } + + // === Processing === + + private void processParty(ScParty party, Map> claimsByParty, + Map> allianceGraph, ImportResult.Builder result) { + if (party.Id() == null || party.Name() == null) { + result.warning("Skipping party with missing ID or name"); + result.incrementFactionsSkipped(); + return; + } + + UUID partyId; + try { + partyId = UUID.fromString(party.Id()); + } catch (IllegalArgumentException e) { + result.warning("Skipping party with invalid ID: " + party.Id()); + result.incrementFactionsSkipped(); + return; + } + + progress("Processing party: %s (%s)", party.Name(), party.Id().substring(0, 8)); + + // Check for existing faction + Faction existing = factionManager.getFaction(partyId); + if (existing != null && !overwrite) { + progress(" - Skipping (already exists, use --overwrite to replace)"); + result.incrementFactionsSkipped(); + return; + } + + // Convert the party to a faction + Faction converted = convertParty(party, claimsByParty, allianceGraph, result); + if (converted == null) { + result.incrementFactionsSkipped(); + return; + } + + // Log summary + progress(" - %d members", converted.getMemberCount()); + progress(" - %d claims", converted.getClaimCount()); + + // Handle players already in existing factions + int playersRemoved = handleExistingMemberships(converted, result); + if (playersRemoved > 0) { + progress(" - Removed %d players from existing factions", playersRemoved); + } + + if (!dryRun) { + factionManager.importFaction(converted, overwrite); + } + + result.incrementFactionsImported(); + result.addClaimsImported(converted.getClaimCount()); + + // Assign default power (SimpleClaims has no power system) + if (!skipPower) { + assignDefaultPower(converted, result); + } + } + + @Nullable + private Faction convertParty(ScParty party, Map> claimsByParty, + Map> allianceGraph, ImportResult.Builder result) { + UUID partyId = UUID.fromString(party.Id()); + + // Convert color: SimpleClaims uses signed 32-bit RGB (includes alpha), extract lower 24 bits + String color = convertColor(party.Color()); + if (color.equals("#000000") || party.Color() == 0) { + color = getRandomColor(); + progress(" - Generated random color (original was black/missing)"); + } + + // Get creation timestamp + long createdAt = party.CreatedTracker() != null + ? party.CreatedTracker().toEpochMillis() + : System.currentTimeMillis(); + + // Build members map (owner + members) + Map members = buildMembers(party, createdAt, result); + if (members.isEmpty()) { + result.warning(String.format("Party '%s' has no valid members", party.Name())); + return null; + } + + // No home in SimpleClaims + + // Convert claims + Set claims = convertClaims(partyId, claimsByParty); + + // Convert relations (mutual alliances only) + Map relations = convertRelations(party, allianceGraph, result); + + // Convert protection overrides to FactionPermissions + FactionPermissions permissions = convertPermissions(party.Overrides()); + + // Generate unique tag from party name + String tag = factionManager.generateUniqueTag(party.Name()); + progress(" - Generated tag: %s", tag); + + // Description + String description = party.Description() != null && !party.Description().isEmpty() + ? party.Description() + : "Imported from SimpleClaims"; + + // Create import log entry + List logs = new ArrayList<>(); + logs.add(FactionLog.system(FactionLog.LogType.MEMBER_JOIN, + "Faction imported from SimpleClaims", + MessageKeys.LogsGui.MSG_IMPORTED_FROM, "SimpleClaims")); + + return new Faction( + partyId, + party.Name(), + description, + tag, + color, + createdAt, + null, // no home + members, + claims, + relations, + logs, + false, // not open by default + permissions, + null // no hardcore power + ); + } + + /** + * Builds the members map. Owner → LEADER, all Members → MEMBER. + * SimpleClaims has only 2 roles. + */ + private Map buildMembers(ScParty party, long createdAt, + ImportResult.Builder result) { + Map members = new HashMap<>(); + long now = System.currentTimeMillis(); + + // Add owner as LEADER + UUID ownerUuid = party.Owner() != null ? parseUUID(party.Owner()) : null; + if (ownerUuid != null) { + String ownerName = nameCache.getOrDefault(ownerUuid, "Unknown"); + members.put(ownerUuid, new FactionMember( + ownerUuid, + ownerName, + FactionRole.LEADER, + createdAt, + now + )); + } + + // Add remaining members + if (party.Members() != null) { + for (String memberUuidStr : party.Members()) { + UUID memberUuid = parseUUID(memberUuidStr); + if (memberUuid == null) continue; + + // Skip if already added as owner + if (memberUuid.equals(ownerUuid)) continue; + + String username = nameCache.getOrDefault(memberUuid, "Unknown"); + members.put(memberUuid, new FactionMember( + memberUuid, + username, + FactionRole.MEMBER, + createdAt, + now + )); + } + } + + // If no owner was set but we have members, promote first member to leader + if (ownerUuid == null && !members.isEmpty()) { + UUID firstMember = members.keySet().iterator().next(); + FactionMember promoted = members.get(firstMember).withRole(FactionRole.LEADER); + members.put(firstMember, promoted); + result.warning(String.format("Party '%s' has no owner, promoted %s to leader", + party.Name(), promoted.username())); + } + + return members; + } + + private Set convertClaims(UUID partyId, Map> claimsByParty) { + Set claims = new HashSet<>(); + List partyClaims = claimsByParty.get(partyId); + + if (partyClaims == null) { + return claims; + } + + for (ClaimData cd : partyClaims) { + UUID claimedBy = cd.claimedBy() != null ? cd.claimedBy() : UUID.randomUUID(); + claims.add(new FactionClaim(cd.dimension(), cd.chunkX(), cd.chunkZ(), cd.claimedAt(), claimedBy)); + } + + return claims; + } + + /** + * Converts SimpleClaims alliances. Only mutual alliances are imported as ALLY. + * One-way alliances are logged as warnings. Player allies are also logged as warnings. + */ + private Map convertRelations(ScParty party, + Map> allianceGraph, + ImportResult.Builder result) { + Map relations = new HashMap<>(); + UUID partyId = parseUUID(party.Id()); + if (partyId == null) return relations; + + // Process party alliances + if (party.PartyAllies() != null) { + for (String allyIdStr : party.PartyAllies()) { + UUID allyId = parseUUID(allyIdStr); + if (allyId == null) continue; + + if (isMutualAlliance(partyId, allyId, allianceGraph)) { + relations.put(allyId, FactionRelation.create(allyId, RelationType.ALLY)); + } else { + result.warning(String.format( + "One-way alliance from '%s' to party %s skipped (not mutual)", + party.Name(), allyIdStr.substring(0, 8))); + } + } + } + + // Log player allies as data loss + if (party.PlayerAllies() != null && !party.PlayerAllies().isEmpty()) { + result.warning(String.format( + "Party '%s' has %d player allies (no HyperFactions equivalent, skipped)", + party.Name(), party.PlayerAllies().size())); + } + + return relations; + } + + /** + * Converts SimpleClaims protection overrides to HyperFactions FactionPermissions. + * + *

SimpleClaims uses inverted booleans: {@code false} = protected (default), + * {@code true} = open to outsiders. HyperFactions flags: {@code true} = allowed. + * So SimpleClaims protection values map directly to outsider flags. + */ + @Nullable + private FactionPermissions convertPermissions(@Nullable List overrides) { + if (overrides == null || overrides.isEmpty()) { + return null; // Use default permissions + } + + Map flags = new HashMap<>(); + + for (ScOverride override : overrides) { + if (override.Type() == null || override.Value() == null) continue; + if (!"bool".equals(override.Value().Type())) continue; + + boolean value = override.Value().asBoolean(); + + // Map SimpleClaims protection flags to HyperFactions outsider flags + // SC false = protected = HF outsider false (cannot do action) + // SC true = open = HF outsider true (can do action) + switch (override.Type()) { + case "simpleclaims.party.protection.place_blocks" -> { + flags.put(FactionPermissions.OUTSIDER_PLACE, value); + } + case "simpleclaims.party.protection.break_blocks" -> { + flags.put(FactionPermissions.OUTSIDER_BREAK, value); + } + case "simpleclaims.party.protection.interact" -> { + flags.put(FactionPermissions.OUTSIDER_INTERACT, value); + // Also set granular interact flags + flags.put(FactionPermissions.OUTSIDER_DOOR_USE, value); + flags.put(FactionPermissions.OUTSIDER_CONTAINER_USE, value); + flags.put(FactionPermissions.OUTSIDER_BENCH_USE, value); + } + case "simpleclaims.party.protection.pvp" -> { + flags.put(FactionPermissions.PVP_ENABLED, value); + } + case "simpleclaims.party.protection.friendly_fire" -> { + // No direct HF equivalent for friendly fire toggle — skip with implicit default + } + case "simpleclaims.party.protection.interact.chest" -> { + flags.put(FactionPermissions.OUTSIDER_CONTAINER_USE, value); + } + case "simpleclaims.party.protection.interact.door" -> { + flags.put(FactionPermissions.OUTSIDER_DOOR_USE, value); + } + case "simpleclaims.party.protection.interact.bench" -> { + flags.put(FactionPermissions.OUTSIDER_BENCH_USE, value); + } + // interact.chair → OUTSIDER_SEAT_USE, interact.portal → no direct equivalent + case "simpleclaims.party.protection.interact.chair" -> { + flags.put(FactionPermissions.OUTSIDER_SEAT_USE, value); + } + case "simpleclaims.party.protection.interact.portal" -> { + // No direct equivalent in HF, log as part of general interact + flags.put(FactionPermissions.OUTSIDER_TRANSPORT_USE, value); + } + default -> { + // ignore unknown overrides (claim amounts, etc.) + } + } + } + + if (flags.isEmpty()) { + return null; + } + + return new FactionPermissions(flags); + } + + // === Existing Membership Handling === + + private int handleExistingMemberships(Faction importedFaction, ImportResult.Builder result) { + int playersRemoved = 0; + Set factionsToCheck = new HashSet<>(); + + for (UUID memberUuid : importedFaction.members().keySet()) { + Faction existingFaction = factionManager.getPlayerFaction(memberUuid); + + if (existingFaction == null || existingFaction.id().equals(importedFaction.id())) { + continue; + } + + FactionMember existingMember = existingFaction.getMember(memberUuid); + String playerName = existingMember != null ? existingMember.username() : "Unknown"; + + progress(" - Player %s is already in faction '%s', removing...", + playerName, existingFaction.name()); + + if (!dryRun) { + Faction updatedExisting = existingFaction.withoutMember(memberUuid) + .withLog(FactionLog.create( + FactionLog.LogType.MEMBER_LEAVE, + playerName + " left (imported to another faction)", + null, + MessageKeys.LogsGui.MSG_LEFT_IMPORT, playerName + )); + + factionManager.removePlayerFromIndex(memberUuid); + + if (updatedExisting.getMemberCount() == 0) { + progress(" - Faction '%s' is now empty, will be disbanded...", existingFaction.name()); + factionsToCheck.add(existingFaction.id()); + factionManager.updateFaction(updatedExisting); + } else { + if (existingMember != null && existingMember.isLeader()) { + FactionMember successor = updatedExisting.findSuccessor(); + if (successor != null) { + FactionMember promoted = successor.withRole(FactionRole.LEADER); + updatedExisting = updatedExisting.withMember(promoted) + .withLog(FactionLog.create( + FactionLog.LogType.LEADER_TRANSFER, + promoted.username() + " became leader (previous leader imported to another faction)", + null, + MessageKeys.LogsGui.MSG_LEADER_IMPORT_TRANSFER, promoted.username() + )); + progress(" - %s promoted to leader of '%s'", + promoted.username(), existingFaction.name()); + } + } + factionManager.updateFaction(updatedExisting); + } + } + + playersRemoved++; + result.warning(String.format("Player %s removed from faction '%s' (imported to another faction)", + playerName, existingFaction.name())); + } + + if (!dryRun) { + for (UUID factionId : factionsToCheck) { + Faction faction = factionManager.getFaction(factionId); + if (faction != null && faction.getMemberCount() == 0) { + disbandEmptyFaction(faction, result); + } + } + } + + return playersRemoved; + } + + private void disbandEmptyFaction(Faction faction, ImportResult.Builder result) { + progress(" - Disbanding empty faction '%s'", faction.name()); + + FactionManager.FactionResult disbandResult = factionManager.forceDisband( + faction.id(), + "All members imported to other factions" + ); + + if (disbandResult == FactionManager.FactionResult.SUCCESS) { + result.warning(String.format("Faction '%s' disbanded (all members imported elsewhere)", faction.name())); + } else { + result.warning(String.format("Failed to disband faction '%s': %s", faction.name(), disbandResult)); + } + } + + // === Power Assignment === + + /** + * Assigns default max power to all members. SimpleClaims has no power concept, + * so we give every imported player the configured max power to prevent claim loss. + */ + private void assignDefaultPower(Faction faction, ImportResult.Builder result) { + ConfigManager config = ConfigManager.get(); + double maxPower = config.getMaxPlayerPower(); + int membersWithPower = 0; + + for (UUID memberUuid : faction.members().keySet()) { + if (!dryRun) { + powerManager.setPlayerPower(memberUuid, maxPower); + } + membersWithPower++; + } + + if (membersWithPower > 0) { + progress(" - Assigned default power (%.0f) to %d members", maxPower, membersWithPower); + result.addPlayersWithPower(membersWithPower); + } + } + + // === Utility Methods === + + /** Converts a signed 32-bit RGB integer to a hex color string. */ + private String convertColor(int rgb) { + return String.format("#%02X%02X%02X", (rgb >> 16) & 0xFF, (rgb >> 8) & 0xFF, rgb & 0xFF); + } + + @NotNull + private String getRandomColor() { + String[] colors = {"#0000AA", "#00AA00", "#00AAAA", "#AA0000", "#AA00AA", + "#FFAA00", "#5555FF", "#55FF55", "#55FFFF", "#FF5555", "#FF55FF", "#FFFF55"}; + return colors[new Random().nextInt(colors.length)]; + } + + @Nullable + private UUID parseUUID(@Nullable String uuidStr) { + if (uuidStr == null || uuidStr.isEmpty()) { + return null; + } + try { + return UUID.fromString(uuidStr); + } catch (IllegalArgumentException e) { + return null; + } + } + + private void progress(String format, Object... args) { + String message = String.format(format, args); + Logger.info("[SimpleClaimsImport] " + message); + if (progressCallback != null) { + progressCallback.accept(message); + } + } +} diff --git a/src/main/java/com/hyperfactions/importer/simpleclaims/ScAdminOverrides.java b/src/main/java/com/hyperfactions/importer/simpleclaims/ScAdminOverrides.java new file mode 100644 index 00000000..a39e26ee --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/simpleclaims/ScAdminOverrides.java @@ -0,0 +1,11 @@ +package com.hyperfactions.importer.simpleclaims; + +import java.util.List; +import org.jetbrains.annotations.Nullable; + +/** + * Gson-mapped record for the SimpleClaims {@code AdminOverrides.json} root object. + */ +public record ScAdminOverrides( + @Nullable List AdminOverrides +) {} diff --git a/src/main/java/com/hyperfactions/importer/simpleclaims/ScChunkInfo.java b/src/main/java/com/hyperfactions/importer/simpleclaims/ScChunkInfo.java new file mode 100644 index 00000000..d4c12723 --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/simpleclaims/ScChunkInfo.java @@ -0,0 +1,23 @@ +package com.hyperfactions.importer.simpleclaims; + +import org.jetbrains.annotations.Nullable; + +/** + * Gson-mapped record for a chunk claim entry in SimpleClaims {@code Claims.json}. + * + *

Note: SimpleClaims legacy JSON stores the Z coordinate under the key "ChunkY" — + * this is a naming bug from the {@code @FieldName("ChunkY")} annotation on the + * {@code chunkZ} field. Use {@link #getChunkZ()} for the actual Z coordinate. + */ +public record ScChunkInfo( + @Nullable String UUID, + int ChunkX, + int ChunkY, + @Nullable ScTracker CreatedTracker +) { + + /** Returns the actual chunk Z coordinate (stored as ChunkY in legacy JSON). */ + public int getChunkZ() { + return ChunkY; + } +} diff --git a/src/main/java/com/hyperfactions/importer/simpleclaims/ScClaims.java b/src/main/java/com/hyperfactions/importer/simpleclaims/ScClaims.java new file mode 100644 index 00000000..2c8c2e69 --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/simpleclaims/ScClaims.java @@ -0,0 +1,11 @@ +package com.hyperfactions.importer.simpleclaims; + +import java.util.List; +import org.jetbrains.annotations.Nullable; + +/** + * Gson-mapped record for the SimpleClaims {@code Claims.json} root object. + */ +public record ScClaims( + @Nullable List Dimensions +) {} diff --git a/src/main/java/com/hyperfactions/importer/simpleclaims/ScDimension.java b/src/main/java/com/hyperfactions/importer/simpleclaims/ScDimension.java new file mode 100644 index 00000000..e0f0a305 --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/simpleclaims/ScDimension.java @@ -0,0 +1,12 @@ +package com.hyperfactions.importer.simpleclaims; + +import java.util.List; +import org.jetbrains.annotations.Nullable; + +/** + * Gson-mapped record for a dimension entry within SimpleClaims {@code Claims.json}. + */ +public record ScDimension( + @Nullable String Dimension, + @Nullable List ChunkInfo +) {} diff --git a/src/main/java/com/hyperfactions/importer/simpleclaims/ScNameCache.java b/src/main/java/com/hyperfactions/importer/simpleclaims/ScNameCache.java new file mode 100644 index 00000000..37463be6 --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/simpleclaims/ScNameCache.java @@ -0,0 +1,11 @@ +package com.hyperfactions.importer.simpleclaims; + +import java.util.List; +import org.jetbrains.annotations.Nullable; + +/** + * Gson-mapped record for the SimpleClaims {@code NameCache.json} root object. + */ +public record ScNameCache( + @Nullable List Values +) {} diff --git a/src/main/java/com/hyperfactions/importer/simpleclaims/ScNameEntry.java b/src/main/java/com/hyperfactions/importer/simpleclaims/ScNameEntry.java new file mode 100644 index 00000000..bf4c7d5a --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/simpleclaims/ScNameEntry.java @@ -0,0 +1,11 @@ +package com.hyperfactions.importer.simpleclaims; + +import org.jetbrains.annotations.Nullable; + +/** + * Gson-mapped record for a name cache entry in SimpleClaims {@code NameCache.json}. + */ +public record ScNameEntry( + @Nullable String UUID, + @Nullable String Name +) {} diff --git a/src/main/java/com/hyperfactions/importer/simpleclaims/ScOverride.java b/src/main/java/com/hyperfactions/importer/simpleclaims/ScOverride.java new file mode 100644 index 00000000..4ecdff90 --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/simpleclaims/ScOverride.java @@ -0,0 +1,14 @@ +package com.hyperfactions.importer.simpleclaims; + +import org.jetbrains.annotations.Nullable; + +/** + * Gson-mapped record for a SimpleClaims party override entry. + * + * @param Type the override key string (e.g. "simpleclaims.party.protection.place_blocks") + * @param Value the typed value + */ +public record ScOverride( + @Nullable String Type, + @Nullable ScOverrideValue Value +) {} diff --git a/src/main/java/com/hyperfactions/importer/simpleclaims/ScOverrideValue.java b/src/main/java/com/hyperfactions/importer/simpleclaims/ScOverrideValue.java new file mode 100644 index 00000000..69141644 --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/simpleclaims/ScOverrideValue.java @@ -0,0 +1,29 @@ +package com.hyperfactions.importer.simpleclaims; + +import org.jetbrains.annotations.Nullable; + +/** + * Gson-mapped record for a SimpleClaims override value. + * + * @param Type the value type: {@code "bool"} or {@code "integer"} + * @param Value the string representation of the value + */ +public record ScOverrideValue( + @Nullable String Type, + @Nullable String Value +) { + + /** Returns the value as a boolean (for "bool" type). */ + public boolean asBoolean() { + return "true".equalsIgnoreCase(Value); + } + + /** Returns the value as an integer (for "integer" type). */ + public int asInt() { + try { + return Value != null ? Integer.parseInt(Value) : 0; + } catch (NumberFormatException e) { + return 0; + } + } +} diff --git a/src/main/java/com/hyperfactions/importer/simpleclaims/ScParties.java b/src/main/java/com/hyperfactions/importer/simpleclaims/ScParties.java new file mode 100644 index 00000000..03e43c4d --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/simpleclaims/ScParties.java @@ -0,0 +1,11 @@ +package com.hyperfactions.importer.simpleclaims; + +import java.util.List; +import org.jetbrains.annotations.Nullable; + +/** + * Gson-mapped record for the SimpleClaims {@code Parties.json} root object. + */ +public record ScParties( + @Nullable List Parties +) {} diff --git a/src/main/java/com/hyperfactions/importer/simpleclaims/ScParty.java b/src/main/java/com/hyperfactions/importer/simpleclaims/ScParty.java new file mode 100644 index 00000000..55744bcd --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/simpleclaims/ScParty.java @@ -0,0 +1,34 @@ +package com.hyperfactions.importer.simpleclaims; + +import java.util.List; +import org.jetbrains.annotations.Nullable; + +/** + * Gson-mapped record for a SimpleClaims party from {@code Parties.json}. + * + *

Key quirk: the {@code Owner} is NOT in the {@code Members} list. + * Members only contains non-owner members. + */ +public record ScParty( + @Nullable String Id, + @Nullable String Owner, + @Nullable String Name, + @Nullable String Description, + @Nullable List Members, + int Color, + @Nullable List Overrides, + @Nullable ScTracker CreatedTracker, + @Nullable ScTracker ModifiedTracker, + @Nullable List PartyAllies, + @Nullable List PlayerAllies +) { + + /** Returns the total member count including the owner. */ + public int getMemberCount() { + int count = Members != null ? Members.size() : 0; + if (Owner != null && !Owner.isEmpty()) { + count++; + } + return count; + } +} diff --git a/src/main/java/com/hyperfactions/importer/simpleclaims/ScSqliteReader.java b/src/main/java/com/hyperfactions/importer/simpleclaims/ScSqliteReader.java new file mode 100644 index 00000000..8b73804c --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/simpleclaims/ScSqliteReader.java @@ -0,0 +1,220 @@ +package com.hyperfactions.importer.simpleclaims; + +import com.hyperfactions.util.Logger; +import java.nio.file.Path; +import java.sql.*; +import java.util.*; +import org.jetbrains.annotations.NotNull; + +/** + * Reads SimpleClaims data from its SQLite database ({@code SimpleClaims.db}). + * + *

Uses reflection-based JDBC driver detection — the SQLite driver must be on the + * classpath (typically from the SimpleClaims JAR itself). + */ +public class ScSqliteReader { + + private final Path dbPath; + + /** Creates a new reader for the given database path. */ + public ScSqliteReader(@NotNull Path dbPath) { + this.dbPath = dbPath; + } + + /** + * Checks if the SQLite JDBC driver is available on the classpath. + * + * @return true if the driver can be loaded + */ + public static boolean isDriverAvailable() { + try { + Class.forName("org.sqlite.JDBC"); + return true; + } catch (ClassNotFoundException e) { + return false; + } + } + + /** + * Reads all parties from the database. + * + * @return list of parties with their members, overrides, and allies populated + * @throws SQLException if a database error occurs + */ + public List readParties() throws SQLException { + List parties = new ArrayList<>(); + + try (Connection conn = getConnection()) { + // Read base party data + Map builders = new LinkedHashMap<>(); + try (Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery( + "SELECT id, owner, name, description, color, " + + "created_user_uuid, created_user_name, created_date, " + + "modified_user_uuid, modified_user_name, modified_date FROM parties")) { + while (rs.next()) { + String id = rs.getString("id"); + builders.put(id, new ScPartyBuilder( + id, + rs.getString("owner"), + rs.getString("name"), + rs.getString("description"), + rs.getInt("color"), + new ScTracker(rs.getString("created_user_uuid"), + rs.getString("created_user_name"), rs.getString("created_date")), + new ScTracker(rs.getString("modified_user_uuid"), + rs.getString("modified_user_name"), rs.getString("modified_date")) + )); + } + } + + // Read members + try (Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery("SELECT party_id, member_uuid FROM party_members")) { + while (rs.next()) { + ScPartyBuilder builder = builders.get(rs.getString("party_id")); + if (builder != null) { + builder.members.add(rs.getString("member_uuid")); + } + } + } + + // Read overrides + try (Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery("SELECT party_id, type, value_type, value FROM party_overrides")) { + while (rs.next()) { + ScPartyBuilder builder = builders.get(rs.getString("party_id")); + if (builder != null) { + builder.overrides.add(new ScOverride( + rs.getString("type"), + new ScOverrideValue(rs.getString("value_type"), rs.getString("value")) + )); + } + } + } + + // Read party allies + try (Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery("SELECT party_id, ally_party_id FROM party_allies")) { + while (rs.next()) { + ScPartyBuilder builder = builders.get(rs.getString("party_id")); + if (builder != null) { + builder.partyAllies.add(rs.getString("ally_party_id")); + } + } + } + + // Read player allies + try (Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery("SELECT party_id, player_uuid FROM player_allies")) { + while (rs.next()) { + ScPartyBuilder builder = builders.get(rs.getString("party_id")); + if (builder != null) { + builder.playerAllies.add(rs.getString("player_uuid")); + } + } + } + + // Build ScParty records + for (ScPartyBuilder b : builders.values()) { + parties.add(new ScParty( + b.id, b.owner, b.name, b.description, + b.members.isEmpty() ? null : List.copyOf(b.members), + b.color, + b.overrides.isEmpty() ? null : List.copyOf(b.overrides), + b.createdTracker, b.modifiedTracker, + b.partyAllies.isEmpty() ? null : List.copyOf(b.partyAllies), + b.playerAllies.isEmpty() ? null : List.copyOf(b.playerAllies) + )); + } + } + + return parties; + } + + /** + * Reads all claims from the database, organized by dimension. + * + * @return claims grouped by dimension + * @throws SQLException if a database error occurs + */ + public ScClaims readClaims() throws SQLException { + Map> byDimension = new LinkedHashMap<>(); + + try (Connection conn = getConnection(); + Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery( + "SELECT dimension, chunkX, chunkZ, party_owner, " + + "created_user_uuid, created_user_name, created_date FROM claims")) { + while (rs.next()) { + String dim = rs.getString("dimension"); + // SQLite uses correct chunkZ column name — no ChunkY quirk + ScChunkInfo chunk = new ScChunkInfo( + rs.getString("party_owner"), + rs.getInt("chunkX"), + rs.getInt("chunkZ"), // stored directly as chunkZ, not via getChunkZ() + new ScTracker(rs.getString("created_user_uuid"), + rs.getString("created_user_name"), rs.getString("created_date")) + ); + byDimension.computeIfAbsent(dim, k -> new ArrayList<>()).add(chunk); + } + } + + List dimensions = new ArrayList<>(); + for (Map.Entry> entry : byDimension.entrySet()) { + dimensions.add(new ScDimension(entry.getKey(), entry.getValue())); + } + + return new ScClaims(dimensions); + } + + /** + * Reads the name cache from the database. + * + * @return map of UUID string to player name + * @throws SQLException if a database error occurs + */ + public Map readNameCache() throws SQLException { + Map cache = new HashMap<>(); + + try (Connection conn = getConnection(); + Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery("SELECT uuid, name FROM name_cache")) { + while (rs.next()) { + cache.put(rs.getString("uuid"), rs.getString("name")); + } + } + + return cache; + } + + private Connection getConnection() throws SQLException { + return DriverManager.getConnection("jdbc:sqlite:" + dbPath.toAbsolutePath()); + } + + /** Mutable builder for assembling ScParty from multiple queries. */ + private static class ScPartyBuilder { + final String id; + final String owner; + final String name; + final String description; + final int color; + final ScTracker createdTracker; + final ScTracker modifiedTracker; + final List members = new ArrayList<>(); + final List overrides = new ArrayList<>(); + final List partyAllies = new ArrayList<>(); + final List playerAllies = new ArrayList<>(); + + ScPartyBuilder(String id, String owner, String name, String description, + int color, ScTracker createdTracker, ScTracker modifiedTracker) { + this.id = id; + this.owner = owner; + this.name = name; + this.description = description; + this.color = color; + this.createdTracker = createdTracker; + this.modifiedTracker = modifiedTracker; + } + } +} diff --git a/src/main/java/com/hyperfactions/importer/simpleclaims/ScTracker.java b/src/main/java/com/hyperfactions/importer/simpleclaims/ScTracker.java new file mode 100644 index 00000000..59561024 --- /dev/null +++ b/src/main/java/com/hyperfactions/importer/simpleclaims/ScTracker.java @@ -0,0 +1,40 @@ +package com.hyperfactions.importer.simpleclaims; + +import java.time.Instant; +import java.time.LocalDateTime; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; +import org.jetbrains.annotations.Nullable; + +/** + * Gson-mapped record for SimpleClaims tracker objects (CreatedTracker / ModifiedTracker). + * Date is a LocalDateTime ISO-8601 string (e.g. "2026-01-15T10:30:15.123"). + */ +public record ScTracker( + @Nullable String UserUUID, + @Nullable String UserName, + @Nullable String Date +) { + + /** + * Parses the ISO-8601 date string to epoch milliseconds. + * Falls back to current time if parsing fails. + */ + public long toEpochMillis() { + if (Date == null || Date.isEmpty()) { + return System.currentTimeMillis(); + } + + try { + LocalDateTime ldt = LocalDateTime.parse(Date, DateTimeFormatter.ISO_LOCAL_DATE_TIME); + return ldt.toInstant(ZoneOffset.UTC).toEpochMilli(); + } catch (DateTimeParseException e) { + try { + return Instant.parse(Date).toEpochMilli(); + } catch (DateTimeParseException e2) { + return System.currentTimeMillis(); + } + } + } +}