# CocoBans - 插件 de sanctions pour Velocity
Scroll down for English version
## 法语
CocoBans 是一个用于使用 Velocity 的 Minecraft 服务器的完整制裁管理插件。由 Lechat 开发,它为您的服务器管理制裁提供了一种强大且高效的解决方案。
### 主要功能
- **17 个功能命令**,用于完整的制裁管理
- **多数据库支持**(默认 SQLite,可选 MySQL)
- **高级日志系统**,带专用文件和游戏内咨询
- **预定义的模板**,用于快速应用常见的制裁
- **详细的统计信息**,提供全面的指标
- **完全可定制的配置**,提供 60 多个选项
- **增强的安全系统**,具有防滥用保护
- **优化的性能**,采用异步查询和智能缓存
### 支持的制裁类型
#### 玩家制裁
- **Ban** - 临时或永久封禁
- **Mute** - 聊天静音
- **Kick** - 立即从服务器移除
- **Warn** - 无需断开连接的警告
#### IP 制裁
- **BanIP** - 完整 IP 地址封禁
- **MuteIP** - 静音来自 IP 的所有玩家
- **KickIP** - 移除连接自 IP 的所有玩家
### 安装
#### 快速安装
1. 从 releases 下载 JAR 文件
2. 将其放在 Velocity 服务器的 `plugins/` 文件夹中
3. 重新启动服务器
4. 插件将自动创建其配置
### 配置
插件将自动生成包含所有可用选项的完整 `config.yml` 文件。您可以自定义:
- 消息和通知
- 数据库参数
- 权限和命令
- 制裁模板
- 广播选项
- 默认时长
### 可用的命令
#### 基本制裁
```
/ban - 封禁一名玩家
/mute - 静音一名玩家
/kick - 移除一名玩家
/warn - 警告一名玩家
```
#### IP 制裁
```
/banip - 封禁 IP 地址
/muteip - 静音 IP 地址
/kickip - 移除 IP 地址
```
#### 撤销
```
/unban - 解封一名玩家
/unmute - 解静音一名玩家
```
#### 信息
```
/check - 检查活跃制裁
/history - 查看完整历史记录
```
#### 管理
```
/cocobans reload - 重新加载配置
/cocobans info - 插件信息
/cbstats - 详细统计
/cbtemplate list - 列出模板
/cbtemplate use - 应用一个模板
/cblogs [lines] - 查看日志
```
### 权限系统
#### 基本权限
- `cocobans.admin` - 完整的管理员访问权限
- `cocobans.ban` - 封禁权限
- `cocobans.mute` - 静音权限
- `cocobans.kick` - 移除权限
- `cocobans.warn` - 警告权限
- `cocobans.unban` - 解封权限
- `cocobans.unmute` - 解静音权限
- `cocobans.check` - 检查制裁权限
- `cocobans.history` - 查看历史记录权限
#### IP 权限
- `cocobans.banip` - 通过 IP 封禁权限
- `cocobans.muteip` - 通过 IP 静音权限
- `cocobans.kickip` - 通过 IP 移除权限
#### 绕过权限
- `cocobans.bypass.ban` - 对封禁的豁免
- `cocobans.bypass.mute` - 对静音的豁免
- `cocobans.bypass.kick` - 对移除的豁免
#### 特殊权限
- `cocobans.alerts` - 接收制裁通知
### 时长格式
该插件接受多种时长格式,例如:
- `30s` - 30 秒
- `5m` - 5 分钟
- `2h` - 2 小时
- `7d` - 7 天
- `perm` - 永久
### 预定义的模板
该插件包含常见制裁的模板:
- `grief` - 针对破坏行为的 7 天封禁
- `spam` - 针对垃圾邮件的 1 小时静音
- `insultes` - 针对辱骂的 6 小时静音
- `hack` - 针对作弊的永久封禁
- `pub` - 针对广告的移除
- `avertissement` - 一般警告
### 数据库
#### SQLite(默认)
无需配置。数据库将自动在插件文件夹中创建。
#### MySQL(可选)
在 `config.yml` 中配置连接参数:
```yaml
database:
type: "mysql"
host: "localhost"
port: 3306
database: "cocobans"
username: "your_username"
password: "your_password"
```
### 技术要求
- **Java** 17 或更高版本
- **Velocity** 3.2.0 或更高版本
- **Minecraft** 1.19 或更高版本
### 支持和文档
如需帮助,请通过 Discord 联系我:@lechat87
---
## English
CocoBans is a comprehensive sanctions management plugin for Minecraft servers using Velocity. Developed by Lechat, it provides a robust and performant solution for administering sanctions on your server.
### Key Features
- **17 functional commands** for complete sanctions management
- **Multi-database support** (SQLite by default, MySQL optional)
- **Advanced logging system** with dedicated file and in-game consultation
- **Predefined templates** for quick application of common sanctions
- **Detailed statistics** with comprehensive metrics
- **Fully customizable configuration** with 60+ options
- **Enhanced security system** with anti-abuse protections
- **Optimized performance** with asynchronous queries and intelligent caching
### Supported Sanction Types
#### Player Sanctions
- **Ban** - Temporary or permanent banishment
- **Mute** - Chat silencing
- **Kick** - Immediate server expulsion
- **Warn** - Warning without disconnection
#### IP Sanctions
- **BanIP** - Complete IP address banishment
- **MuteIP** - Silencing all players from an IP
- **KickIP** - Expulsion of all players connected from an IP
### Installation
#### Quick Installation
1. Download the JAR file from releases
2. Place it in your Velocity server's `plugins/` folder
3. Restart the server
4. The plugin will automatically create its configuration
### Configuration
The plugin automatically generates a complete `config.yml` file with all available options. You can customize:
- Messages and notifications
- Database parameters
- Permissions and commands
- Sanction templates
- Broadcast options
- Default durations
### Available Commands
#### Basic Sanctions
```
/ban - Ban a player
/mute - Mute a player
/kick - Kick a player
/warn - Warn a player
```
#### IP Sanctions
```
/banip - Ban an IP address
/muteip - Mute an IP address
/kickip - Kick an IP address
```
#### Revocations
```
/unban - Unban a player
/unmute - Unmute a player
```
#### Information
```
/check - Check active sanctions
/history - View complete history
```
#### Administration
```
/cocobans reload - Reload configuration
/cocobans info - Plugin information
/cbstats - Detailed statistics
/cbtemplate list - List templates
/cbtemplate use - Apply a template
/cblogs [lines] - View logs
```
### Permission System
#### Basic Permissions
- `cocobans.admin` - Full administrator access
- `cocobans.ban` - Permission to ban
- `cocobans.mute` - Permission to mute
- `cocobans.kick` - Permission to kick
- `cocobans.warn` - Permission to warn
- `cocobans.unban` - Permission to unban
- `cocobans.unmute` - Permission to unmute
- `cocobans.check` - Permission to check sanctions
- `cocobans.history` - Permission to view history
#### IP Permissions
- `cocobans.banip` - Permission to ban by IP
- `cocobans.muteip` - Permission to mute by IP
- `cocobans.kickip` - Permission to kick by IP
#### Bypass Permissions
- `cocobans.bypass.ban` - Immunity against bans
- `cocobans.bypass.mute` - Immunity against mutes
- `cocobans.bypass.kick` - Immunity against kicks
#### Special Permissions
- `cocobans.alerts` - Receive sanction notifications
### Duration Formats
The plugin accepts several duration formats, like :
- `30s` - 30 seconds
- `5m` - 5 minutes
- `2h` - 2 hours
- `7d` - 7 days
- `perm` - Permanent
### Predefined Templates
The plugin includes templates for common sanctions:
- `grief` - 7-day ban for griefing
- `spam` - 1-hour mute for spam
- `insultes` - 6-hour mute for insults
- `hack` - Permanent ban for hacking
- `pub` - Kick for advertising
- `avertissement` - General warning
### Database
#### SQLite (default)
No configuration required. The database is automatically created in the plugin folder.
#### MySQL (optional)
Configure connection parameters in `config.yml`:
```yaml
database:
type: "mysql"
host: "localhost"
port: 3306
database: "cocobans"
username: "your_username"
password: "your_password"
```
### Technical Requirements
- **Java** 17 or higher
- **Velocity** 3.2.0 or higher
- **Minecraft** 1.19 or higher
### Support and Documentation
For help, contact me on Discord : @lechat87
---
## 作者
**Lechat_**