DaClans
一款适用于 Paper 服务器的简单、可配置的模组(插件),支持等级、联盟、公会银行以及反组队机制。
DaClans 允许玩家组建公会,邀请好友,晋升等级阶梯,与其他公会结盟,并将资金存入共享的公会银行。服务器管理员可以获得完全可配置的等级系统、队友间的伤害规则以及对中立玩家的反组队检测功能。
基于 Paper Brigadier 命令 API 和 Paper 插件描述文件 (paper-plugin.yml) 构建。
特性
公会 (Clans)
- 创建、重命名、解散和离开公会
- 邀请玩家(邀请有过期时间)或开放公会加入权限,允许任何人加入
- 可配置的名称格式和成员上限
- 通过
/clan setowner 转移所有权
等级与权限
- 四种默认等级:成员 (Member)、官员 (Officer)、副首领 (Co-Leader) 和首领 (Leader)
- 在
config.yml 中添加更多等级或修改默认等级,按等级高低排序
- 每个公会有独立的最低等级要求,用于邀请、踢人、重命名、设置和警告操作,由首领在游戏中设定
- 每个等级拥有自定义显示名称、材质、背景描述和发光效果
外交
- 带有过期时间的联盟请求,需从对方公会运行命令来接受
- 将其他公会标记为敌人
- 可选的公会成员之间以及盟友之间的伤害减免
经济
- 公会银行,使用
/clan deposit 存款和 /clan withdraw 取款
- 从设置菜单购买额外的成员槽位
- 使用 Vault 接口,兼容任何支持 Vault 的经济系统
管理
- 反组队机制:当多名无公会玩家聚集攻击某人时,向相关公会和盟友发出警告
- 通过权限节点向工作人员发送通知
- 可选的 BountyLite 集成,阻止对队友悬赏
界面与附加功能
- 用于公会设置、等级权限和成员晋升的箱子 GUI
- 按银行金额或成员数量排序的公会排行榜
- PlaceholderAPI 占位符支持
- Nexo 自定义物品用于 GUI 和等级图标
- MiniMessage 格式化所有消息和菜单项
- 默认使用 SQLite,可选 MySQL
依赖
| 需求 |
详情 |
| 服务器 |
Paper 或 Purpur 1.21.11 或更高版本 |
| Java |
21 或更高版本 |
| Vault |
可选,/clan deposit 和 /clan withdraw 需要此插件 |
| 经济插件 |
可选,任何兼容 Vault 的经济插件均可 |
| PlaceholderAPI |
可选,启用下方的占位符功能 |
| Nexo |
可选,启用自定义物品图标 |
| BountyLite |
可选,启用阻止对队友悬赏的功能 |
安装
- 从 Modrinth 下载最新版本。
- 将 jar 文件放入服务器的
plugins 文件夹中。
- 启动服务器一次以生成默认配置文件,然后在
plugins/DaClans/ 目录中进行编辑。
- 重启服务器以应用配置更改。
config.yml 和 settings.yml 在首次启动时生成,且更新不会覆盖这些文件。
命令
主要命令为 /clan,别名包括 /clans 和 /daclans。
| 命令 |
描述 |
使用者权限 |
/clan create <name> |
创建一个公会 |
未加入任何公会的玩家 |
/clan disband |
解散你的公会 |
首领 |
/clan rename <name> |
重命名你的公会 |
满足 rename 设定的最低等级 |
/clan invite <player> |
邀请一名在线玩家 |
首领,或在邀请对等级开放时满足 invite 设定的最低等级 |
/clan join [clan] |
加入你被邀请的公会,或任意开放加入的公会 |
未加入任何公会的玩家 |
/clan leave |
离开你的公会 |
成员(首领无法离开) |
/clan promote <player> |
提升一名成员的等级 |
首领 |
/clan demote <player> |
降低一名成员的等级 |
首领 |
/clan setowner <player> |
将领导权移交给另一名成员 |
首领 |
/clan kick <player> |
移除一名较低等级的成员 |
满足 kick 设定的最低等级 |
/clan settings |
打开设置菜单 |
满足 settings 设定的最低等级 |
/clan ally <clan> |
发送、接受或结束联盟 |
首领 |
/clan enemy <clan> |
将某个公会切换为你的敌人 |
首领 |
/clan warn <player> <message> |
向成员发送警告 |
满足 warn 设定的最低等级 |
/clan deposit <amount> |
向公会银行存入资金 |
成员 |
/clan withdraw [amount] |
从银行取钱,若不指定金额则取出全部 |
首领 |
/clan top [page] |
显示公会排行榜 |
任何人 |
权限
所有 daclans.command.* 权限默认授予玩家。游戏中的等级检查在此基础上额外生效。
| 命令 |
权限节点 |
/clan create <name> |
daclans.command.create |
/clan disband |
daclans.command.disband |
/clan rename <name> |
daclans.command.rename |
/clan invite <player> |
daclans.command.invite |
/clan join [clan] |
daclans.command.join |
/clan leave |
daclans.command.leave |
/clan promote <player> |
daclans.command.promote |
/clan demote <player> |
daclans.command.demote |
/clan setowner <player> |
daclans.command.setowner |
/clan kick <player> |
daclans.command.kick |
/clan settings |
daclans.command.settings |
/clan ally <clan> |
daclans.command.ally |
/clan enemy <clan> |
daclans.command.enemy |
/clan warn <player> <message> |
daclans.command.warn |
/clan deposit <amount> |
daclans.command.deposit |
/clan withdraw [amount] |
daclans.command.withdraw |
/clan top [page] |
daclans.command.top |
| 权限 |
描述 |
默认值 |
daclans.antiteam.notify |
当氏族成员对某玩家进行组队攻击时,接收管理员通知 |
op |
设置菜单
/clan settings 打开一个箱子菜单。任何拥有 settings 等级的玩家都可以打开它并切换氏族访问权限。其余所有功能仅限首领使用。
| 按钮 |
操作 |
适用对象 |
| 氏族访问 |
在开放和仅邀请之间切换 |
Settings 等级或更高 |
| 谁可以邀请 |
在仅限首领和基于等级的邀请之间切换 |
首领 |
| 等级权限 |
左键点击提升,右键点击降低每个动作所需的最低等级 |
首领 |
| 晋升 / 降级 |
左键点击晋升,右键点击降级一名成员 |
首领 |
| 升级氏族人数上限 |
消耗银行资金以增加成员槽位 |
首领 |
新建的氏族默认为“仅邀请”模式,直到更改该设置之前,只有首领可以邀请他人加入。
占位符
需要 PlaceholderAPI。标识符为 daclans。
占位符列表
| 占位符 |
描述 |
%daclans_name% |
玩家的氏族名称 |
%daclans_leader% |
氏族首领的名称 |
%daclans_members% |
当前成员数量 |
%daclans_max_members% |
成员上限 |
%daclans_bank% |
银行余额 |
%daclans_rank% |
玩家的等级键名(例如 officer) |
%daclans_allies% |
盟友氏族数量 |
%daclans_top_<n>_name% |
排行榜第 n 位的氏族名称 |
%daclans_top_<n>_value% |
该氏族在排行榜中的数值(银行余额或成员数) |
%daclans_top_<n>_members% |
该氏族的成员数量 |
当玩家没有氏族,或者请求的排行榜位置没有氏族时,占位符将返回空字符串。
配置
| 文件 |
内容 |
config.yml |
存储、钩子、氏族限制、等级、默认等级权限、伤害规则、反组队、排行榜、赏金屏蔽以及所有消息 |
settings.yml |
设置菜单的大小、标题和项目,包括槽位、材质、升级成本和大小 |
配置选项
config.yml 中的关键选项:
clan:
name-regex: "[A-Za-z0-9_]{3,16}"
max-members: 10
invite-expiry-seconds: 60
ally-request-expiry-seconds: 120
default-permissions: # 每个动作所需的最低等级
invite: member
kick: officer
rename: leader
settings: coleader
warn: officer
damage-reduction: # 百分比,0 到 100
clan: 0
allies: 0
anti-teaming:
enabled: true
threshold: 2 # 窗口期内来自同一氏族组的攻击者数量
window-seconds: 15
leaderboard:
enabled: true
sort: bank # 按银行余额或成员数排序
page-size: 10
refresh-seconds: 60
等级按 level 排序。最低等级分配给新成员,键名为 leader 的等级保留给氏族所有者:
ranks:
officer:
level: 2
displayname: "<yellow>Officer"
material: GOLD_INGOT
nexoId: "" # 使用 Nexo 物品代替材质
glowing: false
lore:
- "<dark_gray>Trusted clan rank"
每个集成都可以在 hooks 下关闭:
hooks:
placeholderapi: true
nexo: true
bountylite: true
vault: true
BountyLite
当安装 BountyLite 且 hooks.bountylite 开启时,玩家不能对氏族成员或盟友放置赏金。检查的命令和子命令是可配置的:
bounty:
allow-on-teammates: false
commands:
- bounty
blocked-subcommands:
- set
- bet
存储
氏族默认存储在 SQLite 数据库中,路径为 plugins/DaClans/clans.db。要使用 MySQL,请更改 config.yml 中的存储部分并重启服务器:
storage:
type: mysql
mysql:
host: localhost
port: 3306
database: daclans
username: root
password: ""
clans 和 members 表会在首次启动时自动创建。使用 MySQL 时,数据库本身必须已经存在。
从源代码构建
git clone https://github.com/malusic23354/DaClans.git
cd DaClans
./gradlew build
插件 jar 包将生成至 build/libs/DaClans-<version>.jar。需要 Java 21。
支持
发现错误或有任何建议?请在 问题追踪器 上提交 issue。请包含你的服务器软件及版本、DaClans 版本以及任何相关的控制台日志输出。
DaClans
A simple, configurable clans plugin for Paper servers, with ranks, alliances, a clan bank and anti-teaming.
DaClans lets players form clans, invite friends, climb a rank ladder, ally with other clans and pool money in a shared bank. Server owners get a fully configurable rank system, damage rules between teammates and an anti-teaming check against neutral players.
Built on the Paper Brigadier command API and Paper plugin descriptor (paper-plugin.yml).
Features
Clans
- Create, rename, disband and leave clans
- Invite players (invites expire) or leave the clan open so anyone can join
- Configurable name pattern and member limit
- Transfer ownership with
/clan setowner
Ranks and permissions
- Four default ranks: Member, Officer, Co-Leader and Leader
- Add more ranks or change the default ones in
config.yml, ordered by level
- Per-clan minimum rank for inviting, kicking, renaming, settings and warning, set by the leader in-game
- Custom display name, material, lore and glow for each rank
Diplomacy
- Alliances with expiring requests, accepted by running the command from the other clan
- Mark other clans as enemies
- Optional damage reduction between clan members and between allies
Economy
- Clan bank with
/clan deposit and /clan withdraw
- Buy extra member slots from the settings menu
- Uses Vault, so it works with any Vault-compatible economy
Moderation
- Anti-teaming: warns clans and allies that gang up on a player with no clan
- Staff notifications through a permission node
- Optional BountyLite integration that blocks bounties on teammates
Interface and extras
- Chest GUI for clan settings, rank permissions and member promotions
- Clan leaderboard sorted by bank or member count
- PlaceholderAPI placeholders
- Nexo custom items for GUI and rank icons
- MiniMessage formatting for every message and menu item
- SQLite by default, MySQL optional
Requirements
| Requirement |
Details |
| Server |
Paper or Purpur 1.21.11 or newer |
| Java |
21 or newer |
| Vault |
Optional, needed for /clan deposit and /clan withdraw |
| Economy plugin |
Optional, any Vault-compatible provider |
| PlaceholderAPI |
Optional, enables the placeholders below |
| Nexo |
Optional, enables custom item icons |
| BountyLite |
Optional, enables teammate bounty blocking |
Installation
- Download the latest release from Modrinth.
- Drop the jar into your server's
plugins folder.
- Start the server once to generate the default files, then edit them in
plugins/DaClans/.
- Restart the server to apply configuration changes.
config.yml and settings.yml are generated on first start and are never overwritten by updates.
Commands
The main command is /clan, with the aliases /clans and /daclans.
| Command |
Description |
Who can use it |
/clan create <name> |
Create a clan |
Anyone not in a clan |
/clan disband |
Delete your clan |
Leader |
/clan rename <name> |
Rename your clan |
Minimum rank set for rename |
/clan invite <player> |
Invite an online player |
Leader, or the minimum rank set for invite if invites are open to ranks |
/clan join [clan] |
Join a clan you were invited to, or any open clan |
Anyone not in a clan |
/clan leave |
Leave your clan |
Members (leaders cannot leave) |
/clan promote <player> |
Raise a member one rank |
Leader |
/clan demote <player> |
Lower a member one rank |
Leader |
/clan setowner <player> |
Hand leadership to another member |
Leader |
/clan kick <player> |
Remove a member of a lower rank |
Minimum rank set for kick |
/clan settings |
Open the settings menu |
Minimum rank set for settings |
/clan ally <clan> |
Send, accept or end an alliance |
Leader |
/clan enemy <clan> |
Toggle a clan as your enemy |
Leader |
/clan warn <player> <message> |
Send a warning to a member |
Minimum rank set for warn |
/clan deposit <amount> |
Add money to the clan bank |
Members |
/clan withdraw [amount] |
Take money from the bank, or everything if no amount is given |
Leader |
/clan top [page] |
Show the clan leaderboard |
Anyone |
Permissions
All daclans.command.* permissions are granted to players by default. In-game rank checks apply on top of them.
| Command |
Permission |
/clan create <name> |
daclans.command.create |
/clan disband |
daclans.command.disband |
/clan rename <name> |
daclans.command.rename |
/clan invite <player> |
daclans.command.invite |
/clan join [clan] |
daclans.command.join |
/clan leave |
daclans.command.leave |
/clan promote <player> |
daclans.command.promote |
/clan demote <player> |
daclans.command.demote |
/clan setowner <player> |
daclans.command.setowner |
/clan kick <player> |
daclans.command.kick |
/clan settings |
daclans.command.settings |
/clan ally <clan> |
daclans.command.ally |
/clan enemy <clan> |
daclans.command.enemy |
/clan warn <player> <message> |
daclans.command.warn |
/clan deposit <amount> |
daclans.command.deposit |
/clan withdraw [amount] |
daclans.command.withdraw |
/clan top [page] |
daclans.command.top |
| Permission |
Description |
Default |
daclans.antiteam.notify |
Receive a staff notice when clan members are teaming on a player |
op |
Settings menu
/clan settings opens a chest menu. Anyone who meets the settings rank can open it and toggle clan access. Everything else is leader only.
| Button |
Action |
Who |
| Clan access |
Switch between open and invite only |
Settings rank or higher |
| Who can invite |
Switch between leader only and rank based invites |
Leader |
| Rank permissions |
Left click raises, right click lowers the minimum rank for each action |
Leader |
| Promote / Demote |
Left click promotes, right click demotes a member |
Leader |
| Upgrade clan size |
Spend bank money to add member slots |
Leader |
New clans start invite only, and only the leader can invite until that setting is changed.
Placeholders
Requires PlaceholderAPI. The identifier is daclans.
Placeholder list
| Placeholder |
Description |
%daclans_name% |
The player's clan name |
%daclans_leader% |
Name of the clan leader |
%daclans_members% |
Current member count |
%daclans_max_members% |
Member limit |
%daclans_bank% |
Bank balance |
%daclans_rank% |
The player's rank key (for example officer) |
%daclans_allies% |
Number of allied clans |
%daclans_top_<n>_name% |
Name of the clan in position n on the leaderboard |
%daclans_top_<n>_value% |
Leaderboard value of that clan (bank or members) |
%daclans_top_<n>_members% |
Member count of that clan |
Placeholders return an empty string when the player has no clan, or when there is no clan at the requested leaderboard position.
Configuration
| File |
Contents |
config.yml |
Storage, hooks, clan limits, ranks, default rank permissions, damage rules, anti-teaming, leaderboard, bounty blocking and every message |
settings.yml |
Size, title and items of the settings menu, including slots, materials, upgrade cost and size |
Configuration options
Key options in config.yml:
clan:
name-regex: "[A-Za-z0-9_]{3,16}"
max-members: 10
invite-expiry-seconds: 60
ally-request-expiry-seconds: 120
default-permissions: # minimum rank required for each action
invite: member
kick: officer
rename: leader
settings: coleader
warn: officer
damage-reduction: # percent, 0 to 100
clan: 0
allies: 0
anti-teaming:
enabled: true
threshold: 2 # attackers from one clan group within the window
window-seconds: 15
leaderboard:
enabled: true
sort: bank # bank or members
page-size: 10
refresh-seconds: 60
Ranks are ordered by level. The lowest rank is given to new members, and the rank with the key leader is reserved for the clan owner:
ranks:
officer:
level: 2
displayname: "<yellow>Officer"
material: GOLD_INGOT
nexoId: "" # use a Nexo item instead of the material
glowing: false
lore:
- "<dark_gray>Trusted clan rank"
Each integration can be switched off under hooks:
hooks:
placeholderapi: true
nexo: true
bountylite: true
vault: true
BountyLite
When BountyLite is installed and hooks.bountylite is on, players cannot place bounties on clan members or allies. The commands and subcommands that are checked are configurable:
bounty:
allow-on-teammates: false
commands:
- bounty
blocked-subcommands:
- set
- bet
Storage
Clans are stored in SQLite by default, in plugins/DaClans/clans.db. To use MySQL, change the storage section in config.yml and restart:
storage:
type: mysql
mysql:
host: localhost
port: 3306
database: daclans
username: root
password: ""
The clans and members tables are created automatically on first start. The database itself must already exist when using MySQL.
Building from source
git clone https://github.com/malusic23354/DaClans.git
cd DaClans
./gradlew build
The plugin jar is written to build/libs/DaClans-<version>.jar. Java 21 is required.
Support
Found a bug or have a suggestion? Open an issue on the issue tracker. Please include your server software and version, the DaClans version and any relevant console log output.
评论 0
登录后参与评分
还没有评论,来抢沙发吧