promotional bannermobile promotional banner

Verdict Staffs - Medieval Role Play Prison Mod

Staffs that Teleport the Rank below to their designated Prisons

File Details

verdictsticks-1.0.2.jar

  • R
  • Oct 23, 2025
  • 34.86 KB
  • 22
  • 1.20.1
  • Forge

File Name

verdictsticks-1.0.2.jar

Supported Versions

  • 1.20.1

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:verdict-staffs-role-play-prison-mod-1235089:7140836")
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

Version [Current] - Enhanced Banishment System

🆕 New Features

  • Command Blocking System: Banished players are now prevented from executing any commands while banished to the Nether roof
  • Position Saving & Restoration: Players' original positions are saved and they're automatically returned when banishment expires
  • Death Respawn Override: Banished players who die are forced to respawn at their Nether roof banishment location
  • Configurable Command Block Duration: New config option commandBlockDuration allows setting how long players are blocked from commands (0-7200 seconds, default: 300 seconds/5 minutes)
  • Enhanced Banishment Messages: Global banishment messages now indicate when command blocking is active with "(commands blocked)" suffix
  • Real-time Feedback: Blocked players receive countdown messages showing remaining time when attempting commands
  • Automatic Return System: Server automatically detects expired banishments and teleports players back to their original location

🔧 Technical Improvements

  • Enhanced BanishmentManager Class: Comprehensive banishment system with: - Position Tracking: Saves original player position and dimension before banishment - Event-driven Architecture: Uses Forge's CommandEvent, PlayerRespawnEvent, and ServerTickEvent - Thread-safe Implementation: ConcurrentHashMap for concurrent player data access - Server Tick Monitoring: Automatic expiration checking every second (20 ticks) - Memory Efficient: Automatic cleanup of expired banishments and offline players - Robust Error Handling: Null safety for server operations and dimension validation

⚙️ Configuration Changes

  • New Config Option: commandBlockDuration - Description: Duration in seconds to block all commands while banished (0 to disable) - Default: 300 seconds (5 minutes) - Range: 0-7200 seconds (0 to 2 hours) - Location: config/verdictsticks.toml

🛡️ Code Quality Improvements

  • Added proper null safety annotations (@javax.annotation.Nonnull)
  • Enhanced null pointer protection for server operations
  • Improved error handling and edge case management
  • Better logging for command blocking events

📝 Configuration Example

[verdictsticks]
    # Duration in seconds to block all commands while banished (0 to disable)
    commandBlockDuration = 300
   
    # Banishment duration in seconds displayed in the global message
    banishmentDuration = 60
   
    # Other existing configurations...

🎯 How It Works

  1. Banishment Process: When a player is banished with a Verdict Stick: - Position Saved: Original position and dimension are recorded - Teleportation: Player is moved to a random location on the Nether roof - Command Blocking: Added to the restriction system (if commandBlockDuration > 0) - Time Tracking: Banishment expiration time is calculated and monitored

  2. During Banishment: While banished, players experience: - Command Blocking: All commands are intercepted and canceled - Death Override: Dying forces respawn at the same Nether roof location - Countdown Feedback: Attempting commands shows remaining banishment time - No Escape: Only way out is waiting for expiration or admin intervention

  3. Automatic Return: When banishment expires: - Server Detection: Background tick event detects expiration every second - Dimension Restoration: Player is teleported back to their original dimension - Position Accuracy: Exact coordinates where they were banished from - Notification: Player receives confirmation message of return

  4. Global Messaging: Server-wide messages now show: - "PlayerName has been Banished for 300 seconds (commands blocked)" when command blocking is active - "PlayerName has been Banished for 60 seconds" when command blocking is disabled

🔄 Backward Compatibility

  • Fully backward compatible with existing configurations
  • Command blocking can be disabled by setting commandBlockDuration = 0
  • All existing Verdict Stick functionality remains unchanged

🚫 Security Enhancements

  • Complete Isolation: Banished players cannot escape through: - Commands (all blocked during banishment) - Death (forced respawn at banishment location) - Logging out/in (position persists) - Teleportation abilities (overridden by respawn system)

  • Admin Tools: Server operators can: - Manually unbanish players using the BanishmentManager.unbanishPlayer() method - Monitor banishment status through server logs - Configure all aspects through the config file

📊 Data Persistence

  • In-Memory Storage: Banishment data is stored in server memory during runtime
  • Automatic Cleanup: Offline players and expired banishments are automatically removed
  • Thread Safety: Concurrent access protection for multiplayer servers

This update transforms the Verdict Sticks from a simple teleportation tool into a comprehensive banishment system. Players truly cannot escape their punishment until the configured duration expires or an admin intervenes.