AntiAFK - The Performance AFK Solution
作者:rebot | 分类:模组
Minecraft 版本: 1.13.2 1.14 1.14.1 1.14.2 1.14.3 1.14.4 1.15 1.15.1 1.15.2 1.16 1.16.1 1.16.2 1.16.3 1.16.4 1.16.5 1.17 1.17.1 1.18 1.18.1 1.18.2 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11
平台: bukkit paper purpur spigot
标签: game-mechanics optimization technology
## Smart, Performance-Focused, and Comprehensive AFK Management System
  
Repeating Pointless Movements Continuously in the Same Block (Pointless Activity Analysis)
Pointless Activity System visuals.
GUI Display:
GUI System images.
? "Learning Mode": Intelligent Pattern Recognition
Leveraging machine learning principles, Learning Mode detects and counteracts sophisticated AFK bots that follow predefined movement patterns or routes. This system goes beyond simple activity checks to analyze how players move over time. A highly optimized, asynchronous task continuously compares the recent movements of all online players against a library of known bot patterns using the Dynamic Time Warping (DTW) algorithm, which effectively compares two movement sequences even if they are performed at different speeds.
- Asynchronous Pattern Analysis: A custom-built task runs entirely off the main server thread to perform computationally intensive DTW comparisons, ensuring zero server lag.
- High-Performance Design: Implements object pooling (Apache Commons Pool2) to significantly reduce garbage collection overhead and uses a lock-free queue to safely pass data between threads.
- Comprehensive Pattern Management: A new command suite,
/antiafk pattern, gives you full control to record, list, and manage bot patterns. - Dual Serialization Formats: Patterns can be saved in human-readable JSON (for debugging) or a highly efficient binary Kryo format for optimal performance.
Multi-Layered Detection Architecture
AntiAFK applies a four-layered analysis to detect AFK behavior and bots that mimic it:
- Layer 1: Classic Activity Monitoring: Monitors over 10 basic actions, including movement, chat, inventory, and world interaction.
- Layer 2: Pointless Actions Analysis: Counts non-movement actions repeated by the player while staying at the same block coordinates. When the threshold is exceeded, these actions are prevented from resetting the AFK timer.
- Layer 3: Macro and Exploit Detection: Detects clicking patterns that are too consistent to be human (Auto-Clicker) and exploits involving very fast position changes using portals/commands.
- Layer 4: Asynchronous Behavioral Analysis: Analyzes players' movement trajectories asynchronously, catching even bots that follow the most complex trajectories along a specific route.
“Turing Test” (Captcha Protection)
When suspicious behavior is detected, AntiAFK challenges the player:
- Smart Triggers: Automatically activate based on suspicious trajectory repetition or pointless action counts.
- Flexible Question-Answer System: Asks the player a random question from
questions.ymlto verify they are human. Supports multiple correct answers for each question. - Suspicious Mode: While a test is active, the bot's movements or clicks cannot reset the AFK timer, making it impossible for bots to bypass the test.
- Customizable Penalties: You can define custom commands such as
kickorbanfor players who fail the test.
Graduated Penalty and Record System
Provides a fair and effective penalty system:
- Persistent Data Storage (SQLite): Players' entire AFK history (number of penalties, total AFK time, captcha statistics) is permanently stored on the server.
- Graduated Penalties: For repeated AFK behavior, you can configure actions (warning, kick, temporary ban, etc.) that increase in severity based on the number of penalties.
- Automatic Penalty Reset: The records of players who have not caused problems for a long time are automatically cleared after a specified period.
? Full Internationalization (i18n) Support
AntiAFK now speaks your language! The entire plugin has been overhauled to provide a truly multilingual experience.
- All Messages are Translatable: Every single message, including system logs, error messages, and in-game commands, is managed by the language system.
- Global Language Setting: Set the global language for all console output directly in
config.ymlusing thelangsetting. - Multiple Supported Languages: Comes with full support for Turkish, English, Spanish, German, French, Russian, and Polish.
- Easy Translation: To change the language for player-facing messages, simply replace your
messages.ymlfile with one from the provided language files. You can find all official translations here.
Comprehensive Management and Configuration
Provides full control to server owners:
- Administrator Commands: Provides access to all management tools through a single main command (
/antiafk).- panel: Opens a fully featured GUI to manage the plugin from within the game.
- reload: Reloads all configuration files.
- check : Queries a player's detailed record and current status.
- top <time|punishments>: Displays AFK leaderboards.
- list: Lists players who are currently AFK.
- pattern <record|list|manage>: Manage the "Learning Mode" bot detection patterns.
- Flexible Configuration: All texts, commands, announcements, penalties, and detection mechanisms can be configured in detail via the
config.yml,messages.yml, andquestions.ymlfiles.
AntiAFK has been developed using the most modern techniques to keep its impact on server performance to an absolute minimum. It doesn't just show results, it transparently reveals how it achieves them:
- Asynchronous Operations: Computationally expensive operations, such as the behavioral and pattern analysis (DTW algorithm) and all database interactions, are executed entirely outside the server's main thread. This prevents disk I/O or intensive CPU usage from affecting the server's tick rate (TPS).
- Smart Caching (Caffeine): Frequently accessed data (player statistics, configuration values) is stored in high-performance caches to minimize database queries and file reads.
- Distributed Load: Periodic tasks spread their operations evenly across 20 ticks within a one-second timeframe, preventing sudden performance spikes on the server during high player counts.
Integrations:
- WorldGuard: Allows you to define completely different AFK durations and penalty actions for specific areas (arena, market, AFK room, etc.). (Optional)
- PlaceholderAPI: Share dynamic data such as
%antiafk_tag%,%antiafk_reason%with other plugins. (Optional) - ProtocolLib: Offers a more advanced user experience for features like text input within the GUI. (Optional)
Installation:
- Download the latest version here.
- Place the
.jarfile in your server'spluginsfolder. - Start the server to generate the default configuration files (
config.yml,messages.yml,questions.yml,playerdata.db). - Customize the configuration files as needed and use the
/antiafk reloadcommand.
GitHub Page | Report an Issue
请登录后举报
暂无评论,抢个沙发吧~