
Anti-Politically-Related-Content
A Minecraft Bukkit plugin that uses AI-powered real-time moderation to automatically detect and filter politically sensitive content in chat, commands, and player names.
35
0
Anti-Politically-Related-Content Plugin
Project Overview
This is a Minecraft Bukkit plugin designed to detect and filter politically related content within the game. The plugin utilizes the OpenRouter AI API to perform real-time moderation of player chat content, commands, and player IDs.
Features
- Real-time monitoring of player chat content
- Detection of political content in player commands
- Checking player IDs upon new player joins
- Automatic handling of violations:
- Players sending political content are kicked
- Players using inappropriate IDs are banned
- Asynchronous API calls to avoid impacting server performance
- 【Version 2.0 Update】Admins can enable/disable the plugin via command
- 【Version 4.0-RELEASE Update】Test API address connection via
/aprc test - 【Version 4.0-RELEASE Update】API-related configurations can be changed via the config file (meaning the author can upload a pre-packaged jar)
- 【Version 4.0-RELEASE Update】
/aprc reloadcan reload the configuration file - 【Version 4.0-RELEASE Update】Added a backup API address slot to prevent sudden downtime of one API platform
Installation Requirements
- Minecraft Paper Server 1.21.4+
- Java 17 or higher
- A valid OpenRouter API key (visit openrouter.ai to create one)
- (Optional) A valid SiliconFlow API key (visit SiliconFlow Official Website to create one)
- (Optional) API keys from other open API platforms (requires some programming knowledge to change the model name and API address)
Installation Guide
-
Build the project using Maven:
mvn clean package -
Copy the generated target/anti-politically-related-content-1.0-SNAPSHOT.jar to the server's plugins folder
-
Restart the server
Configuration
API Settings (Modify the config file generated after server startup)
primary:
api_key: Primary_API_Key
model: deepseek/deepseek-chat-v3-0324:free
api_url: https://openrouter.ai/api/v1/chat/completions
backup:
api_key: Backup_API_Key
model: deepseek-ai/DeepSeek-R1-0528-Qwen3-8B
api_url: https://api.siliconflow.cn/v1/chat/completions
Response Customization
Modify the following methods in Main.java to change violation handling:
- handleChatViolation() - Handles chat violations
- handleNameViolation() - Handles name violations
Usage Example
- Install and configure the plugin
- The plugin will automatically:
- Scan all chat messages
- Check new player names
- Take automatic action upon detecting violations
- Players with the aprc.admin permission can use the /aprc <test|on|off|reload> command to test the API address/enable the plugin/disable the plugin/reload the plugin.
Notes
- An internet connection is required to access the API
- API calls may have a 1-3 second delay
- The free version has rate limits (upgrading is recommended for high-traffic servers)
- Please test thoroughly before deploying on a production server (the author is also unsure about the number of potential bugs)
Developer Information
- Project Name: Anti-Politically-Related-Content
- Version: 4.0-RELEASE
- Dependencies:
- PaperAPI
- OkHttp 4.12.0
- Gson 2.10.1
License
MIT License
Совместимость
Ссылки
Создатели
Детали
Лицензия:MIT
Опубликован:7 месяцев назад
Обновлён:7 месяцев назад
