• 你好,Guest,欢迎回来!Nukkit-MOT BBS社区是专为Minecraft玩家和开发者提供的Nukkit-MOT平台技术论坛。Nukkit-MOT是一个多版本、内置实体AI、广泛插件兼容的我的世界服务器软件,采用Java编写,专为性能和可扩展性设计,支持插件开发和自定义功能。在Nukkit-MOT BBS,您可以轻松找到开服教程、插件开发资源和插件分享,帮助您快速搭建和管理Nukkit-MOT服务器,提升开发技能,推广您的插件。

    You can join [Discord] to get the latest notifications.
    为了避免一些意外情况,你可以【加入QQ群】来获取最新通知
ElySecurity

ElySecurity 1.0.1

Resource Type
Originality
API Version
1.0.1
Copyright Link
#

ElySecurity Server Security Plugin

A powerful Minecraft Nukkit server security plugin providing comprehensive player management and content security features.

🚀 Features

🔒 Core Security Functions

  • OP Permission Management - Dual storage mode: Database/File
  • Permission Status Synchronization - Real-time detection and synchronization of player permissions
  • Content Security Detection - Supports dual detection via local and Baidu API

🛡️ Anti-Violation Mechanisms

  • Smart Spam Detection - Multi-dimensional detection based on message interval, similarity, and information entropy
  • Prohibited Word Filtering - Local word library + Baidu AI Content Moderation
  • Multiple Punishment Methods - Configurable punishments: warning, kick, mute, etc.

⚙️ Technical Features

  • Dual Storage Mode - Choice between MySQL database or YAML file storage
  • Redis Cache Support - High-performance caching for acceleration
  • Multi-language Support - Chinese/English interface
  • Asynchronous Detection - Does not block the server's main thread

📦 Installation Requirements

Environment Requirements

  • Nukkit API: 1.0.10+
  • Java: 8+
  • Optional: MySQL 5.7+ / Redis 5+

Dependencies

  • Required: Nukkit Server
  • Optional: MySQL Driver, Redis Client

⚡ Quick Start

1. Install the Plugin

Place ElySecurity.jar into the plugins/ directory and restart the server.

2. Basic Configuration

Edit plugins/ElySecurity/config.yml:

# Basic Settings
language: "zh_CN" # Language: zh_CN / en_US

# Storage Mode Selection
mysql:
  enabled: false # Disable MySQL, use file storage

3. Add an Administrator

Execute in the console:

op add YourGameID

🛠️ Configuration Guide

Storage Mode Configuration

Option A: Use File Storage (Simple)

mysql:
  enabled: false

OP list will be saved at: plugins/ElySecurity/admin.yml

Option B: Use Database Storage (Recommended)

mysql:
  enabled: true
  host: "localhost"
  port: 3306
  database: "elysecurity"
  username: "root"
  password: "your_password"

Security Feature Configuration

Anti-Spam Settings

anti-spam:
  enabled: true
  message-interval: 1000 # Message interval(ms)
  similarity-threshold: 0.8 # Similarity threshold
  punishment: "kick" # Punishment method: warning/kick

Prohibited Words Settings

prohibited-words:
  enabled: true
  mode: "local" # local/baidu/both
  punishment: "mute" # Punishment method: warning/kick/mute
  mute-duration: 300 # Mute duration(seconds)

📋 Command List

Command Permission Description Example
/op add <player> elysecurity.op Add OP permission /op add Steve
/op remove <player> elysecurity.op Remove OP permission /op remove Alex

⚠️ Note: OP commands can only be executed from the server console.

📁 File Structure

plugins/ElySecurity/
├── config.yml # Main configuration file
├── admin.yml # OP list (File mode)
├── prohibited-words.yml # Prohibited word library
├── lang/
│ ├── zh_CN.yml # Chinese language file
│ └── en_US.yml # English language file
└── logs/ # Log directory

🔧 Advanced Features

Redis Cache Acceleration

redis:
  enabled: true
  host: "localhost"
  port: 6379
  password: ""

Baidu AI Content Moderation

baidu-api:
  enabled: true
  api-key: "your_api_key"
  secret-key: "your_secret_key"

Custom Prohibited Words

Edit prohibited-words.yml:

local-words:
  - "Banned Word 1"
  - "Banned Word 2"
  - "Banned Word 3"

❓ FAQ

Q1: Plugin fails to load?

  • Check if Nukkit version ≥ 1.0.10
  • Check if Java version ≥ 8
  • Check server logs for detailed error messages

Q2: OP permissions not syncing?

  • Ensure storage mode configuration is correct
  • Check database connection (if using MySQL)
  • Try re-executing the OP command

Q3: How to backup OP list?

  • File mode: Backup admin.yml
  • Database mode: Backup the ops table in MySQL

Q4: How to update the plugin?

  1. Backup configuration files
  2. Replace the plugin JAR file
  3. Restart the server
  4. Check configuration compatibility

📊 Performance Optimization Suggestions

  1. Small-scale servers: Use file storage mode
  2. Medium/Large servers: Use MySQL+Redis combination
  3. Adjust detection thresholds: Tune sensitivity based on server load
  4. Regular cache cleanup: Restart to free memory after long uptime

🤝 Contribution & Support

Issue Reporting

When reporting issues, please provide:

  1. Nukkit version
  2. Plugin version
  3. Error log screenshot
  4. Steps to reproduce

Feature Suggestions

Feature suggestions are welcome via GitHub Issues.

📄 License

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

🔌 API Calls

Baidu Content Moderation API

Other plugins can call this plugin's Baidu content moderation function via:

// Get the ElySecurity plugin instance
PluginBase elySecurity = getServer().getPluginManager().getPlugin("ElySecurity");

// Check if content violates rules
if (elySecurity instanceof cn.ElysianArena.ElySecurity.Main) {
    cn.ElysianArena.ElySecurity.Main main = (cn.ElysianArena.ElySecurity.Main) elySecurity;
    cn.ElysianArena.ElySecurity.security.ViolationResult result = main.getProhibitedWords().checkContent(playerName, content);

    if (result.isViolated()) {
        // Handle violating content
        String source = result.getSource(); // Violation source (local/baidu)
        List<String> details = result.getViolationDetails(); // Violation details
        double confidence = result.getConfidence(); // Confidence level
    }
}

The returned ViolationResult object contains the following fields:

  • violated: Whether it violates rules
  • violationType: Violation type ID
  • subType: Subtype
  • violationDetails: Violation details (e.g., matched keywords)
  • source: Detection source (local/baidu)
  • confidence: Confidence level
  • message: Additional message

✨ Changelog

v1.0.0

  • ✅ OP Permission Management
  • ✅ Anti-Spam System
  • ✅ Prohibited Word Filtering
  • ✅ Dual Storage Mode Support
  • ✅ Multi-language Interface

bStats

Author
NemoCat纱猫
Downloads
4
Views
7
First release
Last update
Rating
0.00 star(s) 0 ratings
.block.block--category>.block-container:before { margin-bottom: 4px; } .message:not(:last-of-type):after { margin-bottom: -7px; }
Forgot your password?
or Log in using