How to Add Discord Rewards to Your Minecraft Server (Step-by-Step)

Jak dodać nagrodę za Discord na serwerze Minecraft How to Add a Discord Reward to Your Minecraft Server

Chcesz, by gracze odbierali nagrody za użycie Waszego Discorda? Poniżej kompletny setup wtyczki q1zZ-DiscordRewards: pobranie, bot, bezpieczna konfiguracja i testy.

Want players to claim rewards by using your Discord? This guide sets up q1zZ-DiscordRewards end-to-end: download, bot setup, secure configuration, and testing.

Nagrody za Discord na serwerze Minecraft Discord rewards on a Minecraft server
Ważne Pobieraj tylko z zaufanych źródeł. Nie udostępniaj tokena bota Discord ani danych bazy. Jeśli token wycieknie, natychmiast zresetuj go w Discord Developer Portal.

1) Pobierz wtyczkę

2) Instalacja na serwerze

  1. Wgraj plik JAR do /plugins.
  2. Zrestartuj serwer, żeby wtyczka utworzyła folder i domyślne pliki.

3) Utwórz bota Discord

  1. Przejdź do Discord Developer Portal: discord.com/developers/applications.
  2. Utwórz nową Application → zakładka BotAdd Bot.
  3. Włącz MESSAGE CONTENT INTENT.
  4. Kliknij Reset Token (jeśli trzeba) i skopiuj Bot Token — wkleisz go do konfiguracji.
  5. (Rekomendowane) Zaproś bota na serwer: OAuth2 → URL Generator → zakres bot (opcjonalnie applications.commands), uprawnienia: View Channels, Send Messages, Read Message History. Otwórz wygenerowany link i dodaj bota do gildii.
Wskazówka Aby kopiować ID kanałów, włącz Developer Mode (Ustawienia Użytkownika → Advanced). PPM na kanał → Copy Channel ID.

4) Konfiguracja wtyczki

Wejdź do /plugins/q1zz-DiscordRewards/ i otwórz configuration.yml. Uzupełnij bazę, token, kanał oraz komendy nagrody.

Baza danych

database:
  host: localhost
  port: 3306
  database: db_name
  username: root
  password: password
  use-ssl: false

Token bota

token: "YOUR_BOT_TOKEN_HERE"

ID kanału Discord do odbierania nagrody

discordChannelID: '000000000000000000'

Komendy nagrody (uruchamiane na serwerze Minecraft)

W komendach {PLAYER} zostanie podmienione na nick gracza. Najpierw przetestuj komendy ręcznie w konsoli.

commands:
 - give {PLAYER} diamond 1
 - say Gratulacje {PLAYER}, odebrano nagrodę za Discord!

Broadcast (ogłoszenie na serwerze)

broadcast:
 - ' '
 - '&8» &fGracz &9{PLAYER} &fodebrał nagrodę za Discord!'
 - '&8» &fDiscord: &9&nhttps://discord.com/yourinvite'
 - ' '

(Opcjonalnie) Tylko komendy — bez itemów

Zostaw listę przedmiotów pustą:

reward:
  items: []

Dodatkowe wiadomości/embedy edytujesz w messages.yml w tym samym folderze.

Uwaga Nie kasuj tokena po wklejeniu do configu — bot go potrzebuje. Gdy wycieknie, wygeneruj nowy i zaktualizuj plik.

5) Restart i test

  1. Zrestartuj serwer Minecraft.
  2. Sprawdź, czy bot jest online na Discordzie, a wtyczka ładuje się bez błędów.
  3. Przejdź cały proces odbierania nagrody i potwierdź, że nagroda uruchamia się w grze.

FAQ i wskazówki

Bot jest offline lub nie odpowiada.

  • Zweryfikuj poprawność token w configuration.yml.
  • Sprawdź uprawnienia bota do czytania i pisania w wybranym kanale.
  • Upewnij się, że włączone jest MESSAGE CONTENT INTENT w Dev Portal.

Komendy się nie wykonują.

  • Sprawdź składnię i użycie {PLAYER}.
  • Przejrzyj konsolę przy starcie i podczas odbierania nagrody.

Security Notice Only download from trusted sources. Never share your Discord bot token or DB credentials. If a token leaks, reset it immediately in the Discord Developer Portal.

1) Download the Plugin

2) Install on Your Server

  1. Upload the JAR to /plugins.
  2. Restart the server once so the plugin generates its folder and defaults.

3) Create Your Discord Bot

  1. Open the Discord Developer Portal: discord.com/developers/applications.
  2. Create a new Application → go to BotAdd Bot.
  3. Enable MESSAGE CONTENT INTENT.
  4. Click Reset Token (if needed) and copy your Bot Token — you’ll paste it into the config.
  5. (Recommended) Invite the bot: OAuth2 → URL Generator → scopes bot (optionally applications.commands), permissions: View Channels, Send Messages, Read Message History. Open the generated link and add the bot to your guild.
Tip To copy channel IDs, enable Developer Mode (User Settings → Advanced). Right-click a channel → Copy Channel ID.

4) Configure the Plugin

Go to /plugins/q1zz-DiscordRewards/ and open configuration.yml. Fill in the database, Discord token, target channel, and reward commands.

Database connection

database:
  host: localhost
  port: 3306
  database: db_name
  username: root
  password: password
  use-ssl: false

Discord bot token

token: "YOUR_BOT_TOKEN_HERE"

Discord channel for claiming rewards

discordChannelID: '000000000000000000'

Reward commands (run on the Minecraft server)

Commands run with {PLAYER} replaced by the player’s name. Test commands manually first, then paste here.

commands:
 - give {PLAYER} diamond 1
 - say Congrats {PLAYER}, you claimed the Discord reward!

Broadcast message (server-wide)

broadcast:
 - ' '
 - '&8» &fPlayer &9{PLAYER} &freceived the discord reward!'
 - '&8» &fDiscord link: &9&nhttps://discord.com/yourinvite'
 - ' '

(Optional) Disable item-based rewards

If you prefer command-only rewards, leave the items list empty:

reward:
  items: []

You can also customize embeds and messages in messages.yml in the same plugin folder.

Important Do not delete your token after pasting — the bot needs it to log in. If it leaks, regenerate a new token and update the config.

5) Restart & Test

  1. Restart your Minecraft server.
  2. Confirm the bot is online in Discord and the plugin loads without errors.
  3. Follow the claim flow (in the configured channel) and verify in-game rewards trigger correctly.

FAQ & Tips

The bot is offline or not responding.

  • Double-check the token in configuration.yml.
  • Ensure the bot can view/send messages in your reward channel.
  • Confirm MESSAGE CONTENT INTENT is enabled in the Dev Portal.

Commands don’t run on the server.

  • Validate syntax and {PLAYER} usage.
  • Check the console on startup and when claiming the reward.