Anti AFK System 图标

Anti AFK System

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/anti-afk-system
资源信息

Minecraft 版本: 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

平台: paper

标签: management technology utility

资源介绍

AntiAFK Plugin

A complete Anti-AFK plugin for Minecraft Paper 1.21.10 that automatically detects and kicks inactive players.

✨ Features

  • ? Automatic AFK Detection - Detects players who are inactive for too long
  • ⚠️ Warning System - Warns players before they get kicked
  • ? Manual AFK Toggle - Players can mark themselves as AFK with /afk
  • ⚙️ Fully Configurable - Customize timeouts, messages and detection
  • ?️ Permission System - Staff can bypass AFK detection
  • ? Broadcast Messages - Server is informed when players go AFK or return

? Requirements

  • Minecraft: 1.21.10
  • Server Software: Paper (or forks like Purpur)
  • Java: 21 or higher

? Installation

  1. Download the latest AntiAFK-1.0.0.jar from releases
  2. Place the JAR file in your server's plugins folder
  3. Restart your server
  4. Customize the configuration in plugins/AntiAFK/config.yml
  5. Use /afkreload to reload the configuration

⚙️ Configuration

The configuration is located in plugins/AntiAFK/config.yml:

# Time in seconds before a player is considered AFK
afk-timeout: 300

# Time in seconds before the warning is given
warning-time: 270

# Check interval in ticks (20 ticks = 1 second)
check-interval: 100

# Messages (use & for color codes)
messages:
  kick: "&cYou have been kicked for inactivity!"
  warning: "&eWarning: You will be kicked in {time} seconds for inactivity!"
  afk-enabled: "&7You are now AFK"
  afk-disabled: "&7You are no longer AFK"
  player-afk: "&7{player} is now AFK"
  player-back: "&7{player} is back"
  reload: "&aConfiguration reloaded!"
  no-permission: "&cYou don't have permission to do this!"

# Actions that reset AFK status
detect-movement: true
detect-chat: true
detect-block-break: true
detect-block-place: true
detect-interact: true
detect-damage: true

Configuration Options

Option Default Description
afk-timeout 300 Seconds before player gets kicked
warning-time 270 Seconds before warning is given
check-interval 100 Ticks between each check (20 = 1 sec)
detect-movement true Detect movement as activity
detect-chat true Detect chat as activity
detect-block-break true Detect block breaking as activity
detect-block-place true Detect block placing as activity
detect-interact true Detect interactions as activity
detect-damage true Detect damage as activity

? Commands

Command Description Permission
/afk Toggle your AFK status manually antiafk.command
/afkreload Reload the plugin configuration antiafk.reload

? Permissions

Permission Default Description
antiafk.command true Use the /afk command
antiafk.bypass op Bypass AFK detection (for staff)
antiafk.reload op Reload the configuration

Permission Examples

LuckPerms:

# Give moderators bypass permission
lp group moderator permission set antiafk.bypass true

# Give admins reload permission
lp group admin permission set antiafk.reload true

? How it Works

  1. Activity Tracking: The plugin tracks when players were last active
  2. Periodic Checks: Every X ticks (configurable) it checks if players have been inactive too long
  3. Warning: At warning-time seconds the player receives a warning
  4. Kick: At afk-timeout seconds the player gets kicked
  5. Broadcast: Other players are informed when someone goes AFK or returns

Detected Activities

The plugin detects the following activities (if enabled in config):

  • ✅ Movement (position change, not just head rotation)
  • ✅ Chat messages
  • ✅ Breaking blocks
  • ✅ Placing blocks
  • ✅ Interactions (buttons, doors, etc.)
  • ✅ Taking damage
  • ✅ Executing commands

? Examples

Example 1: Default Usage

Player is inactive for 4 minutes
→ At 4:30 minutes: "⚠️ Warning: You will be kicked in 30 seconds for inactivity!"
→ At 5:00 minutes: Player gets kicked

Example 2: Manual AFK

Player: /afk
→ "You are now AFK"
→ Server: "Player123 is now AFK"

Player moves
→ "You are no longer AFK"
→ Server: "Player123 is back"

Example 3: Staff Bypass

Staff with antiafk.bypass permission
→ Never gets kicked, regardless of inactivity

? Troubleshooting

Players are not getting kicked:

  • Check if afk-timeout is set correctly
  • Verify players don't have antiafk.bypass permission
  • Verify the plugin is loaded correctly with /plugins

Warnings don't work:

  • Make sure warning-time is less than afk-timeout
  • Check the console for errors

Config changes don't work:

  • Use /afkreload after editing the config
  • Or restart the server

? License

This project is open source and available for personal and commercial use.


Made with ❤️ for the Minecraft community

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Show Me What You Got port

价格:0 墨喵币
下载量:0

查看详情
VaultLeaderboards

价格:0 墨喵币
下载量:0

查看详情
CreateMore

价格:0 墨喵币
下载量:0

查看详情
Modifiable Players

价格:0 墨喵币
下载量:0

查看详情