Skip to content

Repository files navigation

⚡ Admin Forcefield Plugin

License: MIT Paper Version Java Version

A powerful admin-only forcefield plugin designed to help server owners and administrators work without player interference. Perfect for building, maintenance, and administrative tasks.

🎯 Purpose

This plugin is specifically designed for server owners and administrators who need to:

  • Build or work without players getting in the way
  • Clear areas quickly during construction projects
  • Maintain focus during detailed administrative tasks
  • Set up events or areas without interruption

✨ Features

  • Admin/OP Only: Restricted to operators and specific permissions
  • Dual Push System: Continuous gentle push + powerful sneak-blast
  • Smart Whitelisting: Add trusted players who won't be affected
  • Persistent Storage: Whitelist saves across server restarts
  • Rich Messaging: Beautiful MiniMessage formatting with action bars
  • Configurable: Adjust radius, strength, and visual effects
  • Thread Safe: Reliable performance with concurrent data structures
  • Modern Architecture: Clean, maintainable code built for Paper 1.21+

🚀 Quick Start

  1. Download the latest release from releases
  2. Drop it in your plugins/ folder
  3. Restart your server
  4. As an OP, use /ff to toggle your forcefield!

🎮 How It Works

Continuous Push Effect

  • When enabled, gently pushes players away from you
  • Configurable radius and strength
  • Shows "ADMIN AREA - STAY BACK" in action bar

Sneak Blast Effect

  • Release sneak to trigger a powerful blast
  • Much larger radius and stronger force
  • Launches players up and away
  • Pro tip: Spam sneak to launch persistent players even further!

Whitelist System

  • Add trusted builders/admins who won't be pushed
  • Persistent across server restarts
  • Easy toggle on/off per player

📋 Commands

Command Description Usage
/forcefield Toggle your forcefield on/off /ff
/forcefield <player> Add/remove player from whitelist /ff Steve
/forcefield list View your whitelist /ff list
/forcefield status Check if forcefield is active /ff status
/forcefield clear Clear your entire whitelist /ff clear
/forcefield reload Reload configuration /ff reload
/forcefield info View plugin statistics /ff info

Alias: ff

🔐 Permissions

Permission Description Default
forcefield.use Use forcefield commands OP
forcefield.admin Access admin commands (info, clear) OP
forcefield.reload Reload plugin configuration OP
forcefield.bypass Bypass all forcefield effects OP

Note: All permissions default to OP level. Regular players have no access by default.

⚙️ Configuration

Basic Settings

# Push effect (continuous)
push_radius: 8
push_strength: 1.5

# Force effect (sneak release)  
force_radius: 12
force_strength: 3.0

# Task timing
task_interval_ticks: 2

# Visual effects
show_action_bar: true
particle_effects: true

Message Customization

Full MiniMessage support with admin-themed messages:

messages:
  forcefieldEnabled: "<gold>⚡ <green>Admin Forcefield <bold>ENABLED</bold> <gold>⚡"
  actionBarEnabled: "<gold>⚡ <green><bold>ADMIN AREA - STAY BACK</bold> <gold>⚡"
  # ... more customizable messages

📥 Installation

  1. Download the latest Forcefield-1.0.0.jar from releases
  2. Place in your server's plugins/ folder
  3. Restart your server
  4. Configure in plugins/Forcefield/config.yml if desired
  5. Use /ff as an OP to start pushing players away!

🛠️ Requirements

  • Server: Paper 1.21.4 or newer
  • Java: Java 21 or newer
  • Permissions: OP status or manual permission assignment
  • Dependencies: None required

🔨 Building from Source

git clone https://github.com/LoralonMC/Forcefield.git
cd Forcefield
./gradlew build

The compiled plugin will be in build/libs/Forcefield-1.0.0.jar

🎯 Usage Examples

Building Projects

/ff              # Enable forcefield
# Build in peace while players are gently pushed away
# Spam sneak to blast away persistent players
/ff Steve        # Whitelist your builder friend
/ff              # Disable when done

Event Setup

/ff              # Clear the area
/ff list         # Check who's whitelisted
/ff clear        # Remove all whitelist entries
/ff status       # Confirm it's active

Administrative Work

/ff              # Enable for server maintenance
# Work without player interference
/ff reload       # Apply config changes without restart

🏗️ Architecture

Built with modern, modular architecture:

  • Forcefield.java: Main plugin initialization
  • ForcefieldManager: Core logic and data management
  • ConfigManager: Configuration handling and validation
  • MessageManager: MiniMessage formatting and localization
  • ForcefieldInstance: Individual forcefield data and persistence
  • ForcefieldCommand: Command processing and tab completion
  • ForcefieldListener: Event handling (sneak detection, cleanup)

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

📝 Changelog

Version 1.0.0

  • Initial release
  • Admin-only forcefield system
  • Dual push/force mechanics with sneak blasting
  • Persistent whitelist system
  • MiniMessage formatting
  • Modern Paper 1.21+ architecture
  • OP permission defaults

Made for server administrators who need to get work done! 💪

About

Admin forcefield plugin for pushing away players while working or building.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages