package com.mrkayjaydee.playhours.config; import net.minecraftforge.common.ForgeConfigSpec; /** * Message configuration for PlayHours. * Contains custom message overrides for various events. */ public final class MessagesConfig { private MessagesConfig() {} public static ForgeConfigSpec.ConfigValue ACCESS_DENIED; public static ForgeConfigSpec.ConfigValue THRESHOLD_DENIED; public static ForgeConfigSpec.ConfigValue WARN; public static ForgeConfigSpec.ConfigValue KICK; public static ForgeConfigSpec.ConfigValue FORCE_OPEN; public static ForgeConfigSpec.ConfigValue FORCE_CLOSED; public static ForgeConfigSpec.ConfigValue STATUS_LINE; public static ForgeConfigSpec.ConfigValue STATUS_OPEN; public static ForgeConfigSpec.ConfigValue STATUS_CLOSED; public static ForgeConfigSpec.ConfigValue COUNTDOWN; public static ForgeConfigSpec.ConfigValue CONFIG_NOT_READY; public static ForgeConfigSpec.ConfigValue UNEXPECTED_ERROR; public static ForgeConfigSpec.ConfigValue CONFIG_RELOADED; public static ForgeConfigSpec.ConfigValue INVALID_TIME_RANGE; public static ForgeConfigSpec.ConfigValue FAILED_CLEAR_DEFAULT_PERIODS; public static ForgeConfigSpec.ConfigValue SETTINGS_UPDATED; static void init(ForgeConfigSpec.Builder builder) { builder.push("messages"); ACCESS_DENIED = builder.comment( "Custom text for access denied on login (server closed).", "Placeholders: %openday%, %opentime%.") .define("access_denied", ""); THRESHOLD_DENIED = builder.comment( "Custom text when deny_login_during_threshold denies new logins.", "Placeholders: %openday%, %opentime%.") .define("threshold_denied", ""); WARN = builder.comment( "Broadcast warning format when approaching close.", "Placeholders: %minutes%, %s% (plural suffix), %closetime%.") .define("warn", ""); KICK = builder.comment( "Kick message at close time.", "Placeholders: %openday%, %opentime%.") .define("kick", ""); FORCE_OPEN = builder.comment("Notification when force mode is set to FORCE_OPEN.") .define("force_open", ""); FORCE_CLOSED = builder.comment("Notification when force mode is set to FORCE_CLOSED.") .define("force_closed", ""); STATUS_LINE = builder.comment( "Text used by /hours status.", "Placeholders: %mode%, %isopen%, %closetime%, %openday%, %opentime%.") .define("status_line", ""); STATUS_OPEN = builder.comment( "Text displayed when server is open.", "Used in status messages. No placeholders.") .define("status_open", ""); STATUS_CLOSED = builder.comment( "Text displayed when server is closed.", "Used in status messages. No placeholders.") .define("status_closed", ""); COUNTDOWN = builder.comment( "Countdown message sent every second before closing.", "Placeholders: %seconds%") .define("countdown", ""); CONFIG_NOT_READY = builder.comment( "Error message when config is not ready.", "No placeholders.") .define("config_not_ready", ""); UNEXPECTED_ERROR = builder.comment( "Generic error message for unexpected errors.", "No placeholders.") .define("unexpected_error", ""); CONFIG_RELOADED = builder.comment( "Success message when config is reloaded.", "No placeholders.") .define("config_reloaded", ""); INVALID_TIME_RANGE = builder.comment( "Error message for invalid time range format.", "No placeholders.") .define("invalid_time_range", ""); FAILED_CLEAR_DEFAULT_PERIODS = builder.comment( "Error message when clearing default periods fails.", "No placeholders.") .define("failed_clear_default_periods", ""); SETTINGS_UPDATED = builder.comment( "Success message when settings are updated.", "No placeholders.") .define("settings_updated", ""); builder.pop(); } }