Skip to content

Configuration

MisterFenek edited this page Jul 31, 2026 · 2 revisions

⚙️ Configuration

Navigation: Home · Quick Start · Commands & Permissions


RulesAreMandatory uses several YAML files in plugins/RulesAreMandatory/. This page documents every configuration option.

🔄 Config Migration

When the plugin updates its ConfigVersion, it automatically:

  1. Backs up your old config files (renamed to .bak, .bak.1, etc.)
  2. Extracts fresh defaults
  3. Logs the migration in console

Note: Your players.yml data is preserved during migration. Only settings.yml, messages.yml, and rules.yml are backed up and replaced.


📄 settings.yml — Main Settings

General

Option Default Description
ConfigVersion 3 Internal version tracker. Do not edit manually.
Debug false Print freeze state and enforcement details to console.

Menu (Chat UI Buttons)

Menu:
  BackBtn: '&3<< &2Back'       # Previous page button text
  NextBtn: '&2Next &3>>'       # Next page button text
  AcceptBtn: '&2>> Accept <<'  # Accept button text
  DenyBtn: '&4>> Deny <<'      # Deny button text
  Spacer: ' '                  # Spacing between elements

All values support Minecraft color codes (& prefix).

Page (Pagination)

Option Default Description
Page.ItemsPerPage 4 Number of rule lines displayed per chat page.
Page.Cooldown 3 Seconds the player must wait before accepting (anti-skip).

Actions (Console Commands on Accept/Decline)

Actions:
  OnAccept:
    - 'say Player &6%player% &faccepted the server rules!'
  OnDecline:
    - 'say Player &3%player% &fdeclined the rules!'
    - |-
      kick %player% Hello %player%,
      please accept our rules before playing on the server!
  AllowedBeforeAccept:
    - rsam
    - rule
    - register
    - login
Key Description
OnAccept List of console commands run when a player accepts. %player% is replaced with the player's name.
OnDecline List of console commands run when a player declines.
AllowedBeforeAccept Commands the player can use before accepting rules (by base command name, without /).

Freeze (Player Immobilization)

Freeze:
  Enabled: true
  MessageCooldown: 3
  AllowLook: true
  BlockCamera: true
  BlockMovement: true
  Blindness: false
Option Default Description
Enabled true Master switch for the freeze system.
MessageCooldown 3 Seconds between "you are frozen" warning messages.
AllowLook true Allow camera rotation when BlockCamera is false.
BlockCamera true Lock yaw/pitch — player cannot look around.
BlockMovement true Teleport player back to their frozen position on movement.
Blindness false Apply the Blindness potion effect while frozen.

Misc (General Behavior)

Option Default Description
Misc.ForceOP true When true, operators (OPs) must also accept rules. When false, players with rsam.admin.* are exempt.
Misc.ForceAdventure true Force Adventure game mode while rules are not accepted.
Misc.AcceptGameMode SURVIVAL Game mode set after accepting rules. Valid: SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR.
Misc.SkipWorlds [] List of world names where the plugin does not enforce rules.

Block (Action Blocking)

Option Default Description
Block.Chat true Block chat messages before accepting.
Block.Commands true Block all commands except AllowedBeforeAccept.
Block.Interact true Block block breaking/placing, entity damage, and interaction.
Block.MsgCooldown 3 Seconds between "you must accept rules" messages.

Reaccept (Automatic Re-acceptance)

Option Default Description
Reaccept.Enabled false Enable automatic re-acceptance timer.
Reaccept.Days 90 Days after which players must re-accept rules.

Title (On-Screen Titles)

Each event section has the same structure:

Title:
  OnJoin:          # Shown when a player who hasn't accepted joins
    Enabled: true
    Title: '&6&lRulesAreMandatory'
    Subtitle: '&eRead the rules below'
    FadeIn: 10     # Ticks
    Stay: 70       # Ticks
    FadeOut: 20    # Ticks
  OnShowRules:     # Shown when /rsam rules is used
    Enabled: true
    Title: '&6&lServer Rules'
    Subtitle: '&ePlease read carefully'
  OnAccept:        # Shown when player accepts
    Enabled: true
    Title: '&a&l✔ Rules Accepted!'
    Subtitle: '&eWelcome to the server!'
  OnDecline:       # Shown when player declines
    Enabled: true
    Title: '&c&l✘ Rules Declined'
    Subtitle: '&eYou will be kicked'

📄 rules.yml — Rule List

Version: 1.0.0

Rules:
  - '=> &c(✘) &rCheat clients and unfair advantage mods are prohibited.'
  - '=> &c(✘) &rGriefing — destroying/damaging other players builds — is prohibited.'
  - '=> &c(✘) &rKilling players without reason or consent is prohibited.'
  - '=> &b(O) &rViolations — 2 warnings, 3rd offense = permanent ban.'
  - '=> &a(+) &rRules may be updated — you will be asked to read them again.'

⚠️ Important: The Version field is tracked per player. When you update your rules and want all players to re-accept, change this value (e.g., 1.0.01.0.1 or 2.0.0). The plugin compares the stored version with the current one to decide if re-acceptance is needed.


💬 messages.yml — Chat Messages

All messages support Minecraft color codes with &. The %player% placeholder is replaced with the player's name where applicable.

System:
  ReloadDone: '&r[&bRSAM&r] &aConfig reloaded!'
  NotFound: '&r[&bRSAM&r] &cPlayer not found!'
  Denied: '&r[&bRSAM&r] &cNo permission!'

Stats:
  Player: '&2Player:&5 '
  Accepted: '&2Accepted:&3 '
  Ver: '&2Version:&6 '
  Date: '&2Date:&5 '

Text:
  ResetDone: '&3Player &6%player% &3data reset. They must re-accept the rules.'
  ApproveDone: '&aPlayer &6%player% &aforce-accepted!'
  Rush: '&6>>> &cPlease read the rules carefully! &6<<<'
  Welcome: '&rType &6/rsam rules&r to read and accept the server rules.'
  Online: '&rType &6/rsam rules&r to read and accept the server rules.'
  Confirm: '&rPlease confirm you have read and understood the rules:'
  Frozen: '&rYou cannot move. Read and accept with &7/rsam&r!'
  BlockChat: '&rYou must accept rules first. Use &7/rsam&r'
  BlockCmd: '&rYou must accept rules first. Use &7/rsam&r'
  BlockInteract: '&rYou must accept rules first. Use &7/rsam&r'
  Broadcast: '&b%player% &raccepted the rules!'
  BedrockTitle: '&bRulesAreMandatory&r'
  Accepted: '&a&l✔ You have accepted the server rules!'
  Declined: '&c&lYou declined the rules.'

👥 players.yml — Player Data (Auto-generated)

This file is created and managed automatically. Do not edit manually — use /rsam reset and /rsam approve commands instead.

Structure:

<UUID>:
  done: true          # Whether the player accepted
  ver: 1.0            # Which rules version they accepted
  ts: 1690000000000   # Timestamp (milliseconds since epoch)
_meta:
  v: '1.0.0'          # Plugin version that wrote this file

Navigation: Home · Quick Start · Configuration · Commands & Permissions