COWMODSКаталог модов

✨ mGiveaway | DISCORD ➱ MINECRAFT GIVEAWAYS

mGiveaway is a plugin that allows you to create and manage Discord giveaways from Minecraft. It then automatically rewards the winners in-game. Uses slash commands for easy giveaway creation and button/modal interactions for user-friendly entry.

Автор: m-suro8406обновлён 17 апр. 2025 г.
УправлениеУтилиты

Описание

mGiveaway Banner

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.


GitHub Link Discord Link

mGiveaway - Discord Minecraft Giveaway Plugin

Key Features Icon

  • 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.

Requirements Icon

  • Spigot: 1.17+ [Paper recommended]
  • PlaceholderAPI: 2.11.6+
  • Vault: 1.7+

Setup & Installation Icon

  1. Download & Install: Get mGiveaway-VERSION.jar from GitHub Releases and place in /plugins folder.
  2. Restart your server
  3. 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
  4. 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.
  5. Reload Plugin: Use /mgwreload or restart server.

Slash Command Icon

Use /create_giveaway (default) to create giveaways.

/create_giveaway name: prize: minecraft_prize: duration: winners: command: requirements:
  • 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.

Placeholders Icon

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}

Important Notes Icon

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 ;)

bStats: Paper Servers* PlaceholderAPI: 2.11.6+

  • Vault: 1.7+

Setup & Installation Icon

  1. Download & Install: Get mGiveaway-VERSION.jar from GitHub Releases and place in /plugins folder.
  2. Restart your server
  3. 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
  4. 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.
  5. Reload Plugin: Use /mgwreload or restart server.

Slash Command Icon

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.

Placeholders Icon

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}

Important Notes Icon

  • 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 ;)

bStats: Paper Servers * 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.

  1. 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.

  • /create_giveaway name:<giveaway_name> prize:<prize_description> prize_placeholder:<placeholder_text> duration:<duration_string> winners:<number_of_winners> command:<reward_command> requirements:<true/false>

    • name: The name of the giveaway (used internally, e.g., in config).
    • prize: The formatted description of the prize to display in the Discord embed.
    • prize_placeholder: A short placeholder for the prize used in in-game broadcast messages.
    • duration: The giveaway duration (e.g., 1mo 2w 7d 5h 30m). Units: mo (months), w (weeks), d (days), h (hours), m (minutes), s (seconds).
    • winners: The number of winners for the giveaway.
    • command: The first command to execute for each winner (use config for multiple commands). Placeholders: %player% (winner's Minecraft username).
    • requirements: (Optional, true or false, defaults to false). Set to true if you want to manually add requirements to the giveaway in the config.yml before it starts. If false, the giveaway starts immediately after creation.

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).

Последние версии

Все версии →
release

v0.7.6 | Important fix

v0.7.6
17 апр. 2025 г.216Minecraft: 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4paper, purpur, spigot
Скачать
Что нового
Added a config option to change the wait time before sending the `on_join` in game message Fixed a bug where the database file would get locked if there were multiple giveaways saving entries at one time
release

v0.7.5 | Fixed a placeholder

v0.7.5
12 апр. 2025 г.98Minecraft: 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5paper, purpur, spigot
Скачать
Что нового
Fixed the `%prize%`placeholder in the `on join` giveaway message
release

v0.7.4

v0.7.4
19 мар. 2025 г.70Minecraft: 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4paper, purpur, spigot
Скачать
Что нового
Placeholder %winners% standarized into %win_count% where needed
release

mGiveaway v0.7.3

v0.7.3
5 мар. 2025 г.74Minecraft: 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4paper, purpur, spigot
Скачать
Что нового
**Messaging update** Added global broadcast messages after: - giveaway start - giveaway end Added a personal message to a player when they join the server and there are giveaways active ### Config will automatically update
release

v0.7.2 - Important fix

v0.7.2
27 февр. 2025 г.77Minecraft: 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4paper, purpur, spigot
Скачать
Что нового
Changed update checker interval from 1h to 2h Fixed command giveaway creation (+ improved error handling)
release

v0.7.1 - UpdateCheck improvement

v0.7.1
22 февр. 2025 г.47Minecraft: 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4paper, purpur, spigot
Скачать
Что нового
Improved the updatechecker message and added a config option to change it Your config will automatically update
release

v0.7 - Feedback-Driven Release

v0.7
22 февр. 2025 г.41Minecraft: 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4paper, purpur, spigot
Скачать
Что нового
This update focuses on important changes suggested by people because of request **- The plugin now works on Spigot!** However it's recommended to use Paper - Removed the notification sent to me if I join a server that's using mGiveaway - Reduced jar size by 5MB - Finally got the update checker to work - Added a new bStats chart - Fixed an issue where you had to restart the server to properly load a giveaway - Fixed the mention message error when there were no giveaway entries **Propably coming in v0.8:** - Free the config.yml file from giveaways - move them entirely to the database - ⬆ Implement a command for giveaway editing - Improve the config update feature - Improve error handling
release

mGiveaway v0.6

v0.6
17 февр. 2025 г.49Minecraft: 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4paper, purpur
Скачать
Что нового
**Changelog: [https://github.com/m-surowiec/mGiveaway/releases/tag/v0.6](https://github.com/m-surowiec/mGiveaway/releases/tag/v0.6)**
release

mGiveaway v0.5.1

v0.5.1
7 февр. 2025 г.46Minecraft: 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4paper, purpur
Скачать
Что нового
Fixed the update checker
release

mGiveaway v0.5

v0.5
2 февр. 2025 г.41Minecraft: 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4paper, purpur
Скачать
Что нового
## mGiveaway v0.5 Changelog - Enhanced Configurability Update This update focuses on significantly increasing plugin configurability and improving player data handling for a more robust and user-friendly experience. **✨ Features** * **Extensive Text Configurability:** * **All User-Facing Text Configurable:** Nearly all text displayed to users, both in-game and in Discord, is now fully configurable through the `config.yml` file. * **Translatable Messages:** Server owners can now easily translate all plugin messages into different languages by editing the `config.yml`. * **Configurable Message Categories:** Messages are organized into logical sections within `config.yml` (e.g., `messages.discord`, `messages.in_game`, `messages.error`, `discord_command`) for easier management and localization. * **Configurable Discord Command Options:** Descriptions for all Discord slash command options (name, prize, duration, winners, etc.) are now configurable, allowing for customization and localization of command help text. * **Configurable Button and Modal Text:** Text for Discord giveaway buttons and join modals (titles, input questions, placeholders) are now configurable. * **Configurable Discord Log Embeds:** The format and content of giveaway log messages sent to Discord are now fully customizable via the new `discord.bot.log_embed` section in `config.yml`. * **Asynchronous Offline Player Handling for Requirements:** * **Non-Blocking Player Lookups:** Implemented asynchronous API calls to fetch `OfflinePlayer` data when players are not cached, preventing the main server thread from blocking during requirement checks. * **Improved Responsiveness:** Plugin remains responsive even when performing player data lookups for offline players, ensuring a smoother user experience, especially during giveaway entry. * **Callback-Based Requirement Checks:** Utilizes an asynchronous callback mechanism (`checkRequirementsAsync`) to handle requirement checks and process results efficiently without freezing the server. * **Automatic Update Checker:** * **Stay Up-to-Date:** Implemented an automatic update checker that notifies server operators in-game when a new version of mGiveaway is available on GitHub Releases. * **Easy Updates:** Provides a direct download link to the latest release for easy plugin updates. **📈 Improvements & Enhancements** * **Robust Configuration Loading:** * Improved config loading and update mechanism (`ConfigUtil.updateConfig()`) to automatically add new configuration options with default values when updating from older plugin versions, ensuring smoother upgrades. * Enhanced configuration file structure with logical sections for messages and Discord command settings for better organization. **🛠️ Technical Changes** * **Refactored Configuration Structure:** * Significantly restructured `config.yml` to include `messages` and `discord_command` sections, centralizing all configurable text elements. **📝 Important Notes** * **Configuration Reset (Recommended):** Due to significant changes in `config.yml` structure, it is **highly recommended** to **delete your old `config.yml` file** and allow the plugin to generate a fresh `config.yml` with all the new configurable messages and sections. This will ensure you have all the new configuration options available. You can then re-enter your previous settings and customize the new messages as desired. * **Translation Ready:** mGiveaway v0.5 is now significantly easier to translate to other languages. Server owners can translate all user-facing text directly within the `config.yml` file. * **Performance Considerations:** While asynchronous player lookups improve responsiveness, be mindful of excessive giveaway creation and entry frequency, as Mojang API rate limits may still apply under extreme load.