Files
PlayHours/src/main/java/com/mrkayjaydee/playhours/config/MessagesConfig.java
Mr¤KayJayDee c0fd2a2787 feat(docs): complete PlayHours mod implementation with comprehensive documentation
- Add complete PlayHours mod source code with all features:
  * Schedule enforcement with per-day schedules and midnight-spanning support
  * Login control with configurable thresholds and exemptions
  * Warnings and auto-kick system with countdown functionality
  * Force modes (NORMAL/FORCE_OPEN/FORCE_CLOSED) for maintenance
  * Whitelist/blacklist system for player access control
  * Date exceptions for holidays and special events
  * Multi-language support (English/French) with smart time formatting
  * LuckPerms integration with vanilla ops fallback
  * Dynamic MOTD system with real-time schedule display
  * Comprehensive command system with permission integration
  * TOML configuration with hot-reload support

- Add comprehensive documentation suite:
  * Installation guide with step-by-step setup instructions
  * Complete configuration reference with all options
  * Commands reference with usage examples
  * Features overview with detailed explanations
  * MOTD system configuration and customization guide
  * Permissions system documentation with LuckPerms integration
  * Technical details covering architecture and limitations
  * Usage examples with real-world scenarios
  * Changelog with version history

- Add resource files:
  * Language files (en_us.json, fr_fr.json) with localized messages
  * Mod metadata (mods.toml) with proper Forge configuration
  * Resource pack metadata (pack.mcmeta)

- Update build configuration:
  * Gradle build system with proper dependencies
  * Project properties and version management
  * Development environment setup

- Restructure documentation:
  * Replace old README.txt with new comprehensive README.md
  * Create modular documentation structure in docs/ directory
  * Add cross-references and navigation between documents
  * Include quick start guide and common use cases

This commit represents the complete v1.0.0 release of PlayHours, a production-ready server operation hours enforcement mod for Minecraft Forge 1.20.1.
2025-10-23 23:28:20 +02:00

94 lines
4.5 KiB
Java

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<String> ACCESS_DENIED;
public static ForgeConfigSpec.ConfigValue<String> THRESHOLD_DENIED;
public static ForgeConfigSpec.ConfigValue<String> WARN;
public static ForgeConfigSpec.ConfigValue<String> KICK;
public static ForgeConfigSpec.ConfigValue<String> FORCE_OPEN;
public static ForgeConfigSpec.ConfigValue<String> FORCE_CLOSED;
public static ForgeConfigSpec.ConfigValue<String> STATUS_LINE;
public static ForgeConfigSpec.ConfigValue<String> STATUS_OPEN;
public static ForgeConfigSpec.ConfigValue<String> STATUS_CLOSED;
public static ForgeConfigSpec.ConfigValue<String> COUNTDOWN;
public static ForgeConfigSpec.ConfigValue<String> CONFIG_NOT_READY;
public static ForgeConfigSpec.ConfigValue<String> UNEXPECTED_ERROR;
public static ForgeConfigSpec.ConfigValue<String> CONFIG_RELOADED;
public static ForgeConfigSpec.ConfigValue<String> INVALID_TIME_RANGE;
public static ForgeConfigSpec.ConfigValue<String> FAILED_CLEAR_DEFAULT_PERIODS;
public static ForgeConfigSpec.ConfigValue<String> 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();
}
}