AI Stress Core (The Brain)
Instead of just looking at TPS, the plugin calculates a real-time Stress Score (0–100%). This sophisticated algorithm combines MSPT (Millisecond Per Tick), RAM usage, and Entity counts.
- 0-50% (Green): Server is chilling. The plugin acts passively.
- 50-80% (Yellow): Load is increasing. The plugin prepares preventive measures.
- 80-100% (Red): Critical state. The plugin triggers aggressive optimization to prevent crashes.
The plugin acts as an autopilot for your server’s render distance.
- During Idle: If the server has resources to spare, it increases the view distance to make the game look better for players.
- During Lag: If the Stress Score rises, it incrementally lowers the view distance per world to free up CPU and RAM immediately.
Forget about "Kill All" commands that delete players' items. This optimizer uses intelligent filters:
- Safety First: Never removes named mobs, villagers, tamed animals, or decorative items (armor stands, frames).
- Targeted Cleaning: Removes only ground items, broken projectiles, and excess hostile mobs in unloaded chunks.
- Mode Switching: Runs a standard cleanup during normal load, but switches to an aggressive mode only when the server is critical.
Identify exactly where the lag is coming from without needing complex profilers.
- Chunk Analysis: Scans all loaded chunks and finds the ones with abnormal entity counts.
- Visual Report: Displays a clean, interactive list in chat (/ai inspect). You can click to teleport directly to the problematic chunk.
Admin tools that are actually readable.
- /ai status: A beautiful dashboard showing formatted TPS, Stress Score, MSPT, and per-world view distances.
- /ai serverinfo: Displays hardware details including your exact CPU model, RAM allocation limits, and disk usage—perfect for verifying hosting specs.
- BossBar: A real-time health bar at the top of the screen visible to admins, changing color based on server stress.
To use these placeholders, PlaceholderAPI must be installed on your server.
- %ai_stress% Current Stress Score (raw number).
- %ai_stress_formatted% Stress Score with colors and percentage.
- %ai_tps% Current Server TPS (raw number).
- %ai_tps_formatted% Server TPS colored by status.
- %ai_mspt% Average Milliseconds Per Tick.
- %ai_status% Verbal server status (Stable / Load / Critical).
- %ai_uptime% How long the server has been running.
- %ai_view_distance% Current View Distance of the player's world.
- %ai_entities% Total count of entities in all worlds.
- %ai_chunks% Total count of loaded chunks.
- %ai_cpu% System CPU usage percentage.
- %ai_ram% Used RAM vs. Max Allocated RAM.
Code (YAML):
# =============================================================
# MINECRAFT AI OPTIMIZER - CONFIGURATION
# Version: 2.1
# =============================================================
# -------------------------------------------------------------
# GLOBAL SETTINGS
# -------------------------------------------------------------
settings:
# How often the AI checks server status (in ticks).
# ACTION: Every 100 ticks (5 seconds), the plugin measures TPS and RAM.
# WARNING: Do not set lower than 60 (3 seconds).
check-interval: 100
# Prefix displayed before chat messages.
prefix: "&8[&bAI-Core&8] &7"
# Detailed console logging.
# ACTION: If 'true', the plugin will log everything it does to the console.
verbose-logging: true
# -------------------------------------------------------------
# 1. STRESS SCORE (STRESS THRESHOLDS)
# -------------------------------------------------------------
# Here you set the % of total load at which the measures are activated.
# Stress Score (0-100%) is calculated automatically from RAM, CPU, TPS and MSPT.
stress-thresholds:
# Phase 1: Mild - Preventive Actions
# (Reduce visibility, stop terrain generation)
mild: 45
# Phase 2: High - Game Restrictions
# (No monster spawning, AI range restrictions)
high: 75
# Phase 3: Critical - Server Rescue
# (Aggressive Delete, Server Freeze, Physics Shutdown)
critical: 90
# -------------------------------------------------------------
# 2. ENTITY BRAIN (MOB & ITEM MANAGEMENT)
# -------------------------------------------------------------
entity-optimizer:
# Master switch for the entire entity section.
master-enabled: true
# --- Smart Item Clear ---
smart-clear:
# ACTION: Enables automatic removal of items on the ground.
enabled: true
# Interval in seconds (how often to clear).
interval: 300
# Whitelist (Items that will NEVER be deleted).
whitelist:
- "DIAMOND"
- "NETHERITE_INGOT"
- "ENCHANTED_BOOK"
- "BEACON"
- "SHULKER_BOX"
- "TOTEM_OF_UNDYING"
# Warn players before clearing.
warnings: true
# --- Projectile Cleaner ---
projectile-cleaner:
# ACTION: Enables projectile cleaning.
enabled: true
# ACTION: Removes arrows stuck in the ground/walls.
remove-arrows-on-ground: true
# ACTION: Removes tridents (Default: false).
remove-tridents: false
# --- AI Lobotomy (Disabling Mob Intelligence) ---
ai-suppressor:
# ACTION: Enables the lobotomy system (AI disabler).
enabled: true
# Hard Distance: Mobs further than 48 blocks won't move at all (statues).
hard-distance: 48
# Soft Distance: Mobs further than 24 blocks think less frequently.
soft-distance: 24
# Ignored mobs (Bosses, etc.).
ignored-mobs:
- "ENDER_DRAGON"
- "WITHER"
- "VILLAGER"
# --- Anti-Cluster (Farm Protection) ---
anti-cluster:
# ACTION: Enables reduction of mobs in small areas.
enabled: true
# Mob limit per chunk (excess mobs are removed).
max-mobs-per-chunk: 50
# Disable collisions (huge CPU saver).
disable-collisions: true
# --- Villager Optimizer (Trading Halls) ---
villager-optimizer:
# ACTION: Optimizes villagers in trading halls (removes AI if stuck).
enabled: true
# -------------------------------------------------------------
# 3. REDSTONE & PHYSICS (THE ENGINEER)
# -------------------------------------------------------------
redstone-optimizer:
# Master switch for the redstone section.
master-enabled: true
# --- Physics Freeze ---
physics-freeze:
# ACTION: Enables physics disabling during low TPS.
enabled: true
# ACTION: Stops fire spread.
disable-fire-spread: true
# ACTION: Stops leaves from decaying.
disable-leaf-decay: true
# ACTION: Stops redstone (Risky for farms).
freeze-redstone-on-critical: false
# --- Clock Detector ---
clock-detector:
# ACTION: Scans for redstone circuits that blink too fast.
enabled: true
# Pulse limit per second.
max-pulses-per-second: 20
# Action: "LOG", "BREAK", "FREEZE".
action: "FREEZE"
# -------------------------------------------------------------
# 4. WORLD MANAGER
# -------------------------------------------------------------
world-manager:
# Master switch for world management.
master-enabled: true
# --- Dynamic View Distance ---
dynamic-view:
# ACTION: Enables changing view distance based on TPS.
enabled: true
max-view: 10
min-view: 4
change-rate-seconds: 30
# --- Chunk Cleaner ---
chunk-cleaner:
# ACTION: More aggressive chunk unloading.
enabled: true
# Unload chunk from RAM if unused for 30s.
unload-unused-after-seconds: 30
# -------------------------------------------------------------
# 5. MESSAGES
# -------------------------------------------------------------
messages:
clear-warning: "&cWARNING! Items on the ground will be deleted after &e%time%s&c!"
items-cleared: "&aAI removed &e%count% &aitems."
command-no-perm: "&cYou do not have permission to use this command."
manual-cleanup-success: "&a✔ Successfully deleted &e%count% &aentit."
manual-cleanup-fail: "&c✖ No unnecessary entities were found."
# -------------------------------------------------------------
# 6. DATABASE (MYSQL LOGGING)
# -------------------------------------------------------------
database:
enabled: false
# How often to save data (in seconds). I recommend the 10s - 15s.
log-interval: 10
server-name: "ServerName"
host: "localhost"
port: 3306
database: "minecraft_server"
username: "root"
password: "password"
# -------------------------------------------------------------
# 7. UPDATE CHECKER
# -------------------------------------------------------------
update-checker:
# If true, the plugin will check for a new version on startup.
enabled: true
# -------------------------------------------------------------
# 8. AUTO RESTART SYSTEM
# -------------------------------------------------------------
auto-restart:
# ACTION: Enables automatic server restarts at scheduled times.
enabled: true
# Times when the server should restart (Format HH:mm in 24h).
times:
- "04:00"
- "16:00"
# Countdown warnings in seconds (When to broadcast message).
warnings: [600, 300, 60, 30, 10, 5, 4, 3, 2, 1]
# Commands executed by console during restart sequence.
commands:
- "save-all"
- "restart"
# Messages specifically for the restart system.
messages:
warning: "&c⚠ Server will restart in &e%time%&c."
kick-message: "&cServer is restarting for maintenance.\nPlease rejoin in a moment."
actionbar: "&cRestart in: &e%time%"
"
- /ai status -> ai.admin
- /ai inspect -> ai.admin
- /ai bossbar-> ai.admin
- /ai clear-> ai.admin
- /ai reload-> ai.admin
- /ai checkupdate-> ai.admin
- /ai serverinfo-> ai.admin
- /ai scoreboard -> ai.admin
- /ai restart (seconds) -> ai.admin
- /ai ping -> ai.admin