ZLDiscord 是一款适用于 Minecraft 服务器的通用插件,提供高级功能,包括投票系统、语音聊天占位符集成以及自定义消息的创建。该插件旨在简化和自动化服务器管理。
版本: 1.16.5 - 1.21.x
最低 Java 版本: 17
必需依赖项:
PlaceholderAPI
开发信息: 此处
游戏内命令:
• /zlink — 将你的账号与 Discord 绑定。(zoliryzik.link)
• /zunlink — 将你的账号从 Discord 解绑。(zoliryzik.unlink)
• /zevent "title" "command" "time" "channel_id" [resolve-now] — 创建一个新的投票。(zoliryzik.event)
• /zembed "name" "title" "description" "channel_id" [image] [thumbnail] [footer] [icon] — 在 Discord 中创建一个嵌入卡片。(zoliryzik.embed)
• /zembedmanage delete/edit_title/edit_description <name> [value] — 管理嵌入卡片。(zoliryzik.embed_manage)
• /zcc list/run/create/remove/reload/info <name> — 使用模板引擎管理自定义命令。(zoliryzik.cc)
• /zattr get/set/inc/dec list bot|member|player <key> [value] — DataStore 属性操作。(zoliryzik.attr)
• /zstatus — 显示机器人和插件状态。(zoliryzik.status)
• /zlongpoll create/list/remove/reload <name> <url> <key> [wait] — 支持自动重连的 LongPoll 连接。(zoliryzik.longpoll)
• /zsync — 同步 Discord 角色与 LuckPerms。(zoliryzik.sync)
• /zprefix set/reload [prefix] — 查看或更改命令前缀。(zoliryzik.prefix)
• /zreload — 重新加载插件配置。(zoliryzik.reload)
• /rolegive <member> <role> — 给成员分配一个 Discord 角色。(zoliryzik.rolegive)
• /roleremove <member> <role> — 移除成员的 Discord 角色。(zoliryzik.roleremove)
• /rolemenu — 在 Discord 中打开角色选择菜单。(zoliryzik.rolemenu)
• /roletoggle [member] [role] — 切换一个 Discord 角色。(zoliryzik.roletoggle)
Discord 中的命令:
斜杠命令:
• /zevent — 创建一个新的投票。(需要管理员角色权限)
• /zcc reload — 重新加载自定义命令。
• /zcc list — 列出所有自定义命令。
• /zcc prefix — 管理前缀设置。
文本命令:
• z!link <code> — 将你的账号绑定到 Discord。(通过机器人私聊)
权限:
zoliryzik.link
zoliryzik.unlink
zoliryzik.embed
zoliryzik.embed_manage
zoliryzik.cc
zoliryzik.attr
zoliryzik.longpoll
zoliryzik.event
zoliryzik.status
zoliryzik.rolegive
zoliryzik.roleremove
zoliryzik.rolemenu
zoliryzik.roletoggle
zoliryzik.sync
zoliryzik.prefix
zoliryzik.reload
zoliryzik.admin
占位符 (PlaceholderAPI)
ZLDiscord 与 PlaceholderAPI 集成,以显示语音聊天状态、角色信息和 DataStore 属性。请确保已安装 PlaceholderAPI。
可用的占位符:
• %zoliryzik_in_vc% — 根据已绑定的 Discord 成员的语音状态返回“在语音聊天中”、“不在语音聊天中”或“未绑定”。
• %zoliryzik_role_<role_id>% — 如果玩家拥有指定 Discord 角色 ID 中的任意一个,则返回“true”。多个 ID 用逗号分隔。(OR 逻辑)
• %zoliryzik_roles_<role_id>% — 如果玩家拥有指定的所有 Discord 角色 ID,则返回“true”。多个 ID 用逗号分隔。(AND 逻辑)
• %zoliryzik_attr_member_<key>% — 返回已绑定 Discord 成员的 DataStore 属性值。
• %zoliryzik_attr_player_<key>% — 返回玩家的 DataStore 属性值。
• %zoliryzik_attr_bot_<key>% — 返回机器人的 DataStore 属性值。
使用示例
为活动创建投票:
• /zevent "Siege of the ship" "say &aSiege of the ship is starting!" "20m" 0000000000000000000
标题固定。投票结束时执行命令。
创建带有传送功能的投票:
• /zevent "PvP Tournament" "tp %player_name% 500 65 -300" "30m" 0000000000000000000
标题固定。占位符在创建时解析。投票结束时执行传送。
创建标题中包含占位符的投票:
• /zevent "%player_name% invites to raid" "say &cRaid is starting!" "10m" 0000000000000000000
标题固定(玩家名称在创建时解析)。投票结束时执行命令。
创建 resolve-now=false 的投票:
• /zevent "Online: %server_online%" "say &aHello, %player_name%!" "20m" 0000000000000000000 false
标题显示创建时的在线人数。命令中的占位符在投票结束时解析——结果可能不同。
在 Discord 中创建嵌入消息:
• /zembed "Siege of the ship" "Siege of the ship" "The Siege of the Ship event is underway\nCords X: 0 Y: 0" "0000000000000000000"
玩家将在您指定的 Discord 频道中看到此消息。
属性:
• /zattr set player balance 100
• /zattr get player balance
自定义命令:
命令在 commands/ 文件夹中创建和编辑。示例 commands/heal.yml:
<do mc.command('effect give ' + _player_name + ' regeneration 10 5')>
<do mc.broadcast('&a' + _player_name + ' has been healed!')>
然后在 custom_commands.yml 中注册:
commands:
heal:
file: "commands/heal.yml"
description: "Heal a player"
cooldown: 10
enabled: true
command_mc: heal
permission: zoliryzik.heal
ZLDiscord is a universal plugin for Minecraft servers that provides advanced features, including a voting system, integration with placeholders for voice chats, and the creation of custom messages. This plugin is designed to simplify and automate server management.
Version: 1.16.5 - 1.21.x
Minimum Java: 17
Mandatory dependencies:
PlaceholderAPI
Development: here
Commands in the game:
• /zlink — Link your account to Discord. (zoliryzik.link)
• /zunlink — Unlink your account from Discord. (zoliryzik.unlink)
• /zevent "title" "command" "time" "channel_id" [resolve-now] — Creates a new poll. (zoliryzik.event)
• /zembed "name" "title" "description" "channel_id" [image] [thumbnail] [footer] [icon] — Creates an embed in Discord. (zoliryzik.embed)
• /zembedmanage delete/edit_title/edit_description <name> [value] — Manage embeds. (zoliryzik.embed_manage)
• /zcc list/run/create/remove/reload/info <name> — Manage custom commands with template engine. (zoliryzik.cc)
• /zattr get/set/inc/dec list bot|member|player <key> [value] — DataStore attributes. (zoliryzik.attr)
• /zstatus — Show bot and plugin status. (zoliryzik.status)
• /zlongpoll create/list/remove/reload <name> <url> <key> [wait] — LongPoll connections with auto-reconnect. (zoliryzik.longpoll)
• /zsync — Synchronize Discord roles with LuckPerms. (zoliryzik.sync)
• /zprefix set/reload [prefix] — View or change command prefix. (zoliryzik.prefix)
• /zreload — Reload plugin configuration. (zoliryzik.reload)
• /rolegive <member> <role> — Give a Discord role to a member. (zoliryzik.rolegive)
• /roleremove <member> <role> — Remove a Discord role from a member. (zoliryzik.roleremove)
• /rolemenu — Open role selection menu in Discord. (zoliryzik.rolemenu)
• /roletoggle [member] [role] — Toggle a Discord role. (zoliryzik.roletoggle)
Commands in Discord:
Slash Commands:
• /zevent — Creates a new poll. (Admin roles required).
• /zcc reload — Reload custom commands.
• /zcc list — List all custom commands.
• /zcc prefix — Manage prefix settings.
Text Commands:
• z!link <code> — Link your account to Discord. (Bot DMs)
Permissions:
zoliryzik.link
zoliryzik.unlink
zoliryzik.embed
zoliryzik.embed_manage
zoliryzik.cc
zoliryzik.attr
zoliryzik.longpoll
zoliryzik.event
zoliryzik.status
zoliryzik.rolegive
zoliryzik.roleremove
zoliryzik.rolemenu
zoliryzik.roletoggle
zoliryzik.sync
zoliryzik.prefix
zoliryzik.reload
zoliryzik.admin
Placeholders (PlaceholderAPI)
ZLDiscord integrates with PlaceholderAPI to display voice chat status, role information and DataStore attributes. Make sure you have PlaceholderAPI installed.
Available placeholders:
• %zoliryzik_in_vc% — Returns "In voice chat", "Not in voice chat" or "Not linked" based on the linked Discord member's voice status.
• %zoliryzik_role_<role_id>% — Returns "true" if the player has ANY of the specified Discord role IDs. Multiple IDs separated by commas. (OR logic)
• %zoliryzik_roles_<role_id>% — Returns "true" if the player has ALL of the specified Discord role IDs. Multiple IDs separated by commas. (AND logic)
• %zoliryzik_attr_member_<key>% — Returns a DataStore attribute for the linked Discord member.
• %zoliryzik_attr_player_<key>% — Returns a DataStore attribute for the player.
• %zoliryzik_attr_bot_<key>% — Returns a DataStore attribute for the bot.
Examples of use
Create a poll for an event:
• /zevent "Siege of the ship" "say &aSiege of the ship is starting!" "20m" 0000000000000000000
Title is fixed. Command executes when voting ends.
Create a poll with teleport:
• /zevent "PvP Tournament" "tp %player_name% 500 65 -300" "30m" 0000000000000000000
Title is fixed. Placeholder is resolved at creation. Teleport happens when voting ends.
Create a poll with placeholder in title:
• /zevent "%player_name% invites to raid" "say &cRaid is starting!" "10m" 0000000000000000000
Title is fixed (player name resolved at creation). Command executes when voting ends.
Create a poll with resolve-now=false:
• /zevent "Online: %server_online%" "say &aHello, %player_name%!" "20m" 0000000000000000000 false
Title shows online at creation. Placeholder in command is resolved when voting ends — may differ.
Create an embed message in Discord:
• /zembed "Siege of the ship" "Siege of the ship" "The Siege of the Ship event is underway\nCords X: 0 Y: 0" "0000000000000000000"
Players will be able to see this message in the Discord channel you specified.
Attributes:
• /zattr set player balance 100
• /zattr get player balance
Custom command:
Commands are created and edited in the commands/ folder. Example commands/heal.yml:
<do mc.command('effect give ' + _player_name + ' regeneration 10 5')>
<do mc.broadcast('&a' + _player_name + ' has been healed!')>
Then register in custom_commands.yml:
commands:
heal:
file: "commands/heal.yml"
description: "Heal a player"
cooldown: 10
enabled: true
command_mc: heal
permission: zoliryzik.heal
评论 0
登录后参与评分
还没有评论,来抢沙发吧