通过激动人心的抽奖活动提升你的服务器社区活跃度!
mGiveaway 无缝整合 Discord 与 Minecraft,
让你能够创建引人入胜的抽奖活动、设置自定义奖励,
并自动将奖品在游戏内发送给中奖者。
mGiveaway - Discord Minecraft Giveaway Plugin
- Discord 集成:在 Discord 中使用斜杠命令轻松创建和管理抽奖活动。
- 自动化抽奖:可设定开始和结束时间,实现完全自动化的抽奖流程。
- 可配置的要求条件:支持权限、组/角色(Vault)、PlaceholderAPI 值等限制。
- 游戏内奖励:自动为中奖者执行指令以发放奖励。
- 可自定义的嵌入消息:支持通过 JSON 配置丰富的 Discord 嵌入消息样式。
- 动态占位符:嵌入消息会实时更新剩余时间、参与人数、中奖人数等信息。
- 抽奖提醒:在游戏内广播通知玩家。
- 统计数据追踪:记录参与次数和中奖情况。
- 丰富的文本配置:通过 config.yml 配置文件自定义消息、界面文本等。
- 更新检查器:在新版本发布时,在游戏内发送通知。
- Spigot:1.17+ [推荐使用 Paper]
- PlaceholderAPI:2.11.6+
- Vault:1.7+
- 下载并安装:从 GitHub Releases 获取 mGiveaway-VERSION.jar,并将其放入 /plugins 文件夹。
- 重启服务器
- 在 config.yml 中配置 Discord Bot:
- 在 Discord Developer Portal 创建 Bot。
- 获取 Bot Token(“Bot”选项卡)。
- 将 Token 粘贴到 plugins/mGiveaway/config.yml 中的 discord.bot.token 字段。
- 配置 config.yml 以下选项:
- prefix:游戏内前缀。
- broadcast_interval 和 broadcast_message:抽奖提醒。
- discord.bot 设置(token、状态、活动、频道等)——必须提供 Token 和 giveaway_channel。
- discord.bot.command 自定义。
- discord.bot.giveaway_embed、giveaway_end_embed、log_embed:JSON Embed 自定义(使用 Discord Embed Builder)。
- messages:所有文本消息。
- giveaways:定义抽奖设置与要求。
- 重载插件:使用 /mgwreload 或重启服务器。
使用 /create_giveaway(默认)来创建抽奖活动。
/create_giveaway name:抽奖名称> prize:奖品描述> minecraft_prize:<Minecraft物品占位符> duration:持续时间字符串> winners:获奖者数量> command:奖励指令> requirements:<true/false>
- name: 必填:内部抽奖活动名称。
- prize: 必填:格式化奖品描述(用于 Discord)。
- minecraft_prize: 必填:纯文本奖品(游戏内广播)。
- duration: 必填:持续时间字符串(例如 2d 30m)。
- winners: 必填:中奖人数。
- command: 必填:首个奖励命令(%player% 占位符)。
- requirements: 可选:true/false(是否应在满足条件后才开始抽奖)。
⚙️ 配置抽奖活动 (config.yml - giveaways 部分):
请参阅 config.yml 中的示例抽奖活动配置 (giveaways.5Diamonds) 作为模板。在 giveaways 部分下定义的每个抽奖活动的关键配置选项如下:
- settings: - 抽奖活动的设置
- scheduled_start: (可选) 在未来指定时间自动开始抽奖活动的日期和时间。格式:dd/MM/yyyy HH:mm:ss(24小时制)。如果未设置,则抽奖活动立即开始(或在手动强制开始时启动)。
- end_time: 必填: 自动结束抽奖活动的日期和时间。格式:dd/MM/yyyy HH:mm:ss(24小时制)。
- winners: 必填: 本次抽奖的中奖人数。
- commands: 必填: 奖励命令(%player%)。
- prize_formatted: 必填: Discord 奖品描述。
- minecraft_prize: 必填: 游戏内奖品文本。
- requirements: (可选)
- group: Vault 组/角色。
- <group_name>: value: true/false, formatted。
- permission: Vault 权限。
- <permission_node>: value: true/false, formatted。
- placeholder: PlaceholderAPI 值。
- <placeholder_name>: over: <number> 或 under: <number>, formatted。
用于抽奖和抽奖结束嵌入消息的占位符:
{TIME-LEFT}, {END-TIME}, {ENTRIES}, {WIN-COUNT}, {PRIZE}, {WINNERS}
用于日志嵌入消息的占位符:
{GIVEAWAY-NAME}, {ENTRIES-COUNT}, {PRIZE}, {COMMANDS}, {WINNERS-MENTIONS}, {ENTRIES-LIST}
在对 config.yml 文件进行任何更改后,请记得在游戏内使用 /mgwreload 重新加载插件。
有时,由于运行时错误,插件会暂停运行。只需重新加载即可重启它 :)
* PlaceholderAPI: 2.11.6+
- 下载并安装: 从 GitHub Releases 获取
mGiveaway-VERSION.jar 并将其放入 /plugins 文件夹。
- 重启服务器
- 在
config.yml 中配置 Discord 机器人:
- 在 Discord Developer Portal 创建机器人。
- 获取机器人令牌(“Bot”选项卡)。
- 将令牌粘贴到
plugins/mGiveaway/config.yml 中的 discord.bot.token 处。
- 在
config.yml 中配置以下内容:
prefix: 游戏内前缀。
broadcast_interval 和 broadcast_message: 抽奖提醒。
discord.bot 设置(令牌、状态、活动、频道等)- 令牌和 giveaway_channel 为必填项。
discord.bot.command 自定义。
discord.bot.giveaway_embed, giveaway_end_embed, log_embed: JSON 嵌入消息自定义(请使用 Discord Embed Builder)。
messages: 所有文本消息。
giveaways: 定义抽奖活动的设置和要求。
- 重新加载插件: 使用
/mgwreload 或重启服务器。
使用 /create_giveaway(默认)来创建抽奖活动。
/create_giveaway name:<giveaway_name> prize:<prize_description> minecraft_prize:<minecraft_prize_placeholder> duration:<duration_string> winners:<number_of_winners> command:<reward_command> requirements:<true/false>
- name: 必填: 内部抽奖活动名称。
- prize: 必填: 格式化后的奖品描述(Discord)。
- minecraft_prize: 必填: 纯文本奖品(游戏内广播)。
- duration: 必填: 持续时间字符串(例如
2d 30m)。
- winners: 必填: 中奖人数。
- command: 必填: 第一条奖励命令(
%player% 占位符)。
- requirements: 可选:
true/false(如果抽奖活动开始应等待满足要求)
⚙️ 配置抽奖活动(config.yml - giveaways 部分):
请参阅 config.yml 中的示例抽奖活动配置(giveaways.5Diamonds)作为模板。在 giveaways 部分下定义的每个抽奖活动的关键配置选项:
- settings: - 抽奖活动的设置
scheduled_start: (可选) 在未来指定时间自动开始抽奖活动的日期和时间。格式:dd/MM/yyyy HH:mm:ss(24小时制)。如果未设置,则抽奖活动立即开始(或在手动强制开始时启动)。
end_time: 必填: 自动结束抽奖活动的日期和时间。格式:dd/MM/yyyy HH:mm:ss(24小时制)。
winners: 必填: 本次抽奖的中奖人数。
commands: 必填: 奖励命令(%player%)。
prize_formatted: 必填: Discord 奖品描述。
minecraft_prize: 必填: 游戏内奖品文本。
requirements: (可选)
group: Vault 组/角色。
<group_name>: value: true/false, formatted.
permission: Vault 权限。
<permission_node>: value: true/false, formatted.
placeholder: PlaceholderAPI 值。
<placeholder_name>: over: <number> 或 under: <number>, formatted.
用于抽奖和抽奖结束嵌入消息的占位符:
{TIME-LEFT}, {END-TIME}, {ENTRIES}, {WIN-COUNT},
{PRIZE}, {WINNERS}
用于日志嵌入:
-
{GIVEAWAY-NAME}(抽奖名称)、{ENTRIES-COUNT}(参与人数)、{PRIZE}(奖品)、{COMMANDS}(指令)、
{WINNERS-MENTIONS}(获奖者提及)、{ENTRIES-LIST}(参与者列表)
-
需要 Paper 服务器。此插件在 Spigot 上无法运行
-
修改 config.yml 文件后,请记得在游戏中使用 /mgwreload 重载插件。
有时插件会因为运行时错误而暂停。要重启它只需重新加载即可 ;)
* discord.bot.activity: 设置机器人的活动类型(例如 PLAYING、WATCHING、LISTENING、STREAMING)。
* discord.bot.activity_text: 设置机器人活动的文本内容。
* discord.bot.activity_url: 如果使用 STREAMING 活动时,设置相应的 URL。
* discord.bot.giveaway_channel: 输入将发布抽奖嵌入消息的 Discord 文本频道的 ID。
* discord.bot.log_embed_channel: 输入用于记录抽奖结束日志的 Discord 文本频道的 ID。
* discord.bot.log_embed_color: 自定义抽奖日志嵌入的颜色。
* discord.bot.command.name: 自定义 Discord 斜杠命令的名称(默认:create_giveaway)。
* discord.bot.command.description: 自定义 Discord 斜杠命令的描述。
* discord.bot.giveaway_embed: 自定义抽奖嵌入消息的 JSON 结构。参见 config.yml 中的示例及下方的占位符。(建议使用 此网站 来更轻松地创建嵌入)
* discord.bot.giveaway_end_embed: 自定义抽奖结束嵌入消息的 JSON 结构。参见示例和占位符。
* giveaways: 在此部分下配置你的抽奖活动。有关设置抽奖设置和要求的详细信息,请参阅 config.yml 中的示例抽奖 (10KluczyPodniebnych)。
- 重载插件:
斜杠命令用法 (Discord):
在你的 Discord 服务器中使用配置的斜杠命令(默认:/reate_giveaway)来创建抽奖活动。
配置抽奖活动 (config.yml - giveaways 部分):
请参阅 config.yml 中的示例抽奖配置 (giveaways.5Diamonds) 作为模板。每个抽奖的关键配置选项如下:
settings.scheduled_start: (可选)自动开始抽奖活动的日期和时间(格式:dd/MM/yyyy HH:mm:ss)。如果未设置,抽奖将立即开始(或在强制时开始)。
settings.end_time: 必需: 自动结束抽奖活动的日期和时间(格式:dd/MM/yyyy HH:mm:ss)。
settings.winners: 必需: 获奖者数量。
settings.commands: 必需: 为每位获奖者执行的指令列表。占位符:%player%。
settings.prize_formatted: 必需: 用于 Discord 嵌入的奖品格式化描述。
settings.prize_placeholder: 必需: 用于游戏内广播的奖品简短占位符。
requirements: (可选)定义参与抽奖的要求:
group: 基于角色/组的要求(使用 Vault)。
permission: 基于权限的要求(使用 Vault)。
placeholder: 基于 PlaceholderAPI 数值的要求(进行数值比较)。
- 有关定义要求的详细语法和选项(包括
value、formatted(用于显示)、over/under(用于数值占位符)),请参阅 config.yml 示例。
嵌入 JSON 占位符 (discord.bot.giveaway_embed, discord.bot.giveaway_end_embed):
在嵌入 JSON 配置中使用这些占位符以动态显示抽奖信息:
{TIME-LEFT}:距离抽奖结束剩余的时间(Discord 相对时间戳)。
{END-TIME}:抽奖结束的时间(格式化日期和时间)。
{ENTRIES}:当前抽奖的参与人数。
{WIN-COUNT}:获奖者数量。
{PRIZE}:格式化后的奖品描述。
{WINNERS}:(仅限抽奖结束嵌入)获奖者列表(Discord 提及和用户名)。
Boost your server community with exciting giveaways!
mGiveaway seamlessly integrates Discord and Minecraft,
allowing you to create engaging giveaways, set custom rewards,
and automatically deliver prizes to winners in-game.
mGiveaway - Discord Minecraft Giveaway Plugin
- Discord Integration: Slash commands for easy giveaway creation & management in Discord.
- Automated Giveaways: Schedule start/end times for fully automated giveaways.
- Configurable Requirements: Permissions, Groups/Roles (Vault), PlaceholderAPI values.
- In-Game Rewards: Automatic execution of commands for winners.
- Customizable Embeds: JSON configuration for rich Discord embed messages.
- Dynamic Placeholders: Embeds update with time left, entries, winners, etc.
- Giveaway Reminders: In-game broadcasts to notify players.
- Statistics Tracking: Track entries and wins.
- Extensive Text Config: config.yml for messages, UI text, etc.
- Update Checker: In-game notifications for new versions.
- Spigot: 1.17+ [Paper recommended]
- PlaceholderAPI: 2.11.6+
- Vault: 1.7+
- Download & Install: Get mGiveaway-VERSION.jar from GitHub Releases and place in /plugins folder.
- Restart your server
- Configure Discord Bot in config.yml:
- Create Bot at Discord Developer Portal.
- Get Bot Token ("Bot" tab).
- Paste Token into discord.bot.token in plugins/mGiveaway/config.yml
- Configure config.yml for:
- prefix: In-game prefix.
- broadcast_interval & broadcast_message: Giveaway reminders.
- discord.bot settings (token, status, activity, channels, etc.) - Token & giveaway_channel REQUIRED.
- discord.bot.command customization.
- discord.bot.giveaway_embed, giveaway_end_embed, log_embed: JSON Embed customization (use Discord Embed Builder).
- messages: All text messages.
- giveaways: Define giveaway settings & requirements.
- Reload Plugin: Use /mgwreload or restart server.
Use /create_giveaway (default) to create giveaways.
/create_giveaway name:<giveaway_name> prize:<prize_description> minecraft_prize:<minecraft_prize_placeholder> duration:<duration_string> winners:<number_of_winners> command:<reward_command> requirements:<true/false>
- name: REQUIRED: Internal giveaway name.
- prize: REQUIRED: Formatted prize description (Discord).
- minecraft_prize: REQUIRED: Plain-text prize (in-game broadcast).
- duration: REQUIRED: Duration string (e.g., 2d 30m).
- winners: REQUIRED: Number of winners.
- command: REQUIRED: First reward command (%player% placeholder).
- requirements: OPTIONAL: true/false (if the giveaway start should wait for requirements)
⚙️ Configuring Giveaways (config.yml - giveaways section):
See the example giveaway configuration (giveaways.5Diamonds) in the config.yml for a template. Key configuration options for each giveaway defined under the giveaways section:
- settings: - Settings for the giveaway
- scheduled_start: (Optional) Date and time to automatically start the giveaway at a future time. Format: dd/MM/yyyy HH:mm:ss (24-hour format). If not set, the giveaway starts immediately (or when manually forced).
- end_time: REQUIRED: Date and time to automatically end the giveaway. Format: dd/MM/yyyy HH:mm:ss (24-hour format).
- winners: REQUIRED: The number of winners for this giveaway.
- commands: REQUIRED: Reward commands (%player%).
- prize_formatted: REQUIRED: Discord prize description.
- minecraft_prize: REQUIRED: In-game prize text.
- requirements: (Optional)
- group: Vault Group/Role.
- <group_name>: value: true/false, formatted.
- permission: Vault Permission.
- <permission_node>: value: true/false, formatted.
- placeholder: PlaceholderAPI value.
- <placeholder_name>: over: <number> or under: <number>, formatted.
For Giveaway and Giveaway End Embeds:
{TIME-LEFT}, {END-TIME}, {ENTRIES}, {WIN-COUNT}, {PRIZE}, {WINNERS}
For Log Embed:
{GIVEAWAY-NAME}, {ENTRIES-COUNT}, {PRIZE}, {COMMANDS}, {WINNERS-MENTIONS}, {ENTRIES-LIST}
After making any changes to the config.yml file, remember to use /mgwreload in-game to reload the plugin.
Sometimes, the plugin pauses itself because of runtime errors. To restart it just reload it ;)
* PlaceholderAPI: 2.11.6+
- Download & Install: Get
mGiveaway-VERSION.jar from GitHub Releases and place in /plugins folder.
- Restart your server
- Configure Discord Bot in
config.yml:
- Create Bot at Discord Developer Portal.
- Get Bot Token ("Bot" tab).
- Paste Token into
discord.bot.token in plugins/mGiveaway/config.yml
- Configure
config.yml for:
prefix: In-game prefix.
broadcast_interval & broadcast_message: Giveaway reminders.
discord.bot settings (token, status, activity, channels, etc.) - Token & giveaway_channel REQUIRED.
discord.bot.command customization.
discord.bot.giveaway_embed, giveaway_end_embed, log_embed: JSON Embed customization (use Discord Embed Builder).
messages: All text messages.
giveaways: Define giveaway settings & requirements.
- Reload Plugin: Use
/mgwreload or restart server.
Use /create_giveaway (default) to create giveaways.
/create_giveaway name:<giveaway_name> prize:<prize_description> minecraft_prize:<minecraft_prize_placeholder> duration:<duration_string> winners:<number_of_winners> command:<reward_command> requirements:<true/false>
- name: REQUIRED: Internal giveaway name.
- prize: REQUIRED: Formatted prize description (Discord).
- minecraft_prize: REQUIRED: Plain-text prize (in-game broadcast).
- duration: REQUIRED: Duration string (e.g.,
2d 30m).
- winners: REQUIRED: Number of winners.
- command: REQUIRED: First reward command (
%player% placeholder).
- requirements: OPTIONAL:
true/false (if the giveaway start should wait for requirements)
⚙️ Configuring Giveaways (config.yml - giveaways section):
See the example giveaway configuration (giveaways.5Diamonds) in the config.yml for a template. Key configuration options for each giveaway defined under the giveaways section:
- settings: - Settings for the giveaway
scheduled_start: (Optional) Date and time to automatically start the giveaway at a future time. Format: dd/MM/yyyy HH:mm:ss (24-hour format). If not set, the giveaway starts immediately (or when manually forced).
end_time: REQUIRED: Date and time to automatically end the giveaway. Format: dd/MM/yyyy HH:mm:ss (24-hour format).
winners: REQUIRED: The number of winners for this giveaway.
commands: REQUIRED: Reward commands (%player%).
prize_formatted: REQUIRED: Discord prize description.
minecraft_prize: REQUIRED: In-game prize text.
requirements: (Optional)
group: Vault Group/Role.
<group_name>: value: true/false, formatted.
permission: Vault Permission.
<permission_node>: value: true/false, formatted.
placeholder: PlaceholderAPI value.
<placeholder_name>: over: <number> or under: <number>, formatted.
For Giveaway and Giveaway End Embeds:
{TIME-LEFT}, {END-TIME}, {ENTRIES}, {WIN-COUNT},
{PRIZE}, {WINNERS}
For Log Embed:
-
{GIVEAWAY-NAME}, {ENTRIES-COUNT}, {PRIZE}, {COMMANDS},
{WINNERS-MENTIONS}, {ENTRIES-LIST}
-
Paper server is required. This plugin won't work on Spigot
-
After making any changes to the config.yml file, remember to use /mgwreload in-game to reload the plugin.
Sometimes, the plugin pauses itself because of runtime errors. To restart it just reload it ;)
* discord.bot.activity: Set the bot's activity type (e.g., PLAYING, WATCHING, LISTENING, STREAMING).
* discord.bot.activity_text: Set the text for the bot's activity.
* discord.bot.activity_url: Set the URL if using STREAMING activity.
* discord.bot.giveaway_channel: Enter the ID of the Discord text channel where giveaway embeds will be posted.
* discord.bot.log_embed_channel: Enter the ID of the Discord text channel for giveaway end logs.
* discord.bot.log_embed_color: Customize the color of the giveaway log embed.
* discord.bot.command.name: Customize the Discord slash command name (default: create_giveaway).
* discord.bot.command.description: Customize the Discord slash command description.
* discord.bot.giveaway_embed: Customize the JSON structure of the giveaway embed message. See example in config.yml and placeholders below. (use this site for easier embed creation)
* discord.bot.giveaway_end_embed: Customize the JSON structure of the giveaway end embed message. See example and placeholders.
* giveaways: Configure your giveaways under this section. See example giveaway (10KluczyPodniebnych) in config.yml for details on setting up giveaway settings and requirements.
- Reload Plugin:
- Either use a plugin or restart your server
- Plugin example: PlugManX
Slash Command Usage (Discord):
Use the configured slash command (default: /reate_giveaway) in your Discord server to create a giveaway.
Configuring Giveaways (config.yml - giveaways section):
See the example giveaway configuration (giveaways.5Diamonds) in the config.yml for a template. Key configuration options for each giveaway:
settings.scheduled_start: (Optional) Date and time to automatically start the giveaway (format: dd/MM/yyyy HH:mm:ss). If not set, the giveaway starts immediately (or when forced).
settings.end_time: REQUIRED: Date and time to automatically end the giveaway (format: dd/MM/yyyy HH:mm:ss).
settings.winners: REQUIRED: Number of winners.
settings.commands: REQUIRED: List of commands to execute for each winner. Placeholders: %player%.
settings.prize_formatted: REQUIRED: Formatted prize description for Discord embed.
settings.prize_placeholder: REQUIRED: Short placeholder for prize in in-game broadcasts.
requirements: (Optional) Define requirements for giveaway entry:
group: Role/group based requirements (using Vault).
permission: Permission-based requirements (using Vault).
placeholder: PlaceholderAPI value-based requirements (numerical comparisons).
- See
config.yml example for detailed syntax and options for defining requirements, including value, formatted (for display), over/under (for number placeholders).
Embed JSON Placeholders (discord.bot.giveaway_embed, discord.bot.giveaway_end_embed):
Use these placeholders in your embed JSON configurations to dynamically display giveaway information:
{TIME-LEFT}: Time remaining until giveaway ends (Discord relative timestamp).
{END-TIME}: End time of the giveaway (formatted date and time).
{ENTRIES}: Number of current giveaway entries.
{WIN-COUNT}: Number of winners.
{PRIZE}: Formatted prize description.
{WINNERS}: (Giveaway end embed only) List of winners (Discord mentions and usernames).
评论 0
登录后参与评分
还没有评论,来抢沙发吧