DiscordInvitesRewards
2.0.0A lightweight plugin that rewards players for inviting other players to your discord server.
2.0.0latestDiscordInvitesRewards 2.0.0Jun 14, 2026 Huge changes is Security. Added DiscordSRV Integration and Fixed some major bugs.1.1.0DiscordInvitesRewards 1.1.0May 29, 2026 Changelogs
v1.1.0 - Security & Bug Fix Release
Critical Fixes
- Rejoin Exploit Prevention: Added tracking of Discord user IDs that have already been counted as valid invites. Previously, a single user could join, leave, and rejoin repeatedly via the same invite link to farm reward codes for the inviter. Now,onGuildMemberJoinchecks acounted-userslist persisted indata.ymlbefore issuing a reward. If a user has already been counted, the join event is silently skipped.High Severity Fixes
- Race Condition in Code Generation/Claiming: All read-modify-write operations onactive-codesandcounted-usersinRewardCodeManagerare now wrapped in asynchronized (dataLock)block. Previously, concurrent code generation or claims could corrupt the code list, leading to lost or duplicate codes. - Multiple Invite Detection:onGuildMemberJoinnow collects all invites with an increased use count (instead of stopping at the first one). Previously, if two users joined via different invite links between cache updates, only the first inviter was credited and the second was silently lost.Medium Severity Fixes
- Async Save Data Corruption: ReplacedsaveDataAsync()withsaveDataSync()as the primary save method inRewardCodeManager. The old async save could result in corrupted or partially-writtendata.ymlbecause Bukkit'sFileConfiguration.save()is not thread-safe and the in-memory data could be modified before the async write completed.saveDataAsync()is retained but marked@Deprecated. - Console Command Injection via Player Name: Added aVALID_PLAYER_NAMEregex pattern (^[a-zA-Z0-9_]{1,16}$) that validates the player's name before substituting it into reward commands. On cracked/offline-mode servers, malicious player names containing spaces or special characters could manipulate console commands. Invalid usernames now receive an error message instead. - Bot Token Validation on Reload:/invitesreward reloadnow validates the bot token before restarting the Discord bot. If the token is null or empty, the bot is stopped and the admin is warned, rather than attempting to start JDA with an invalid token.Low Severity Fixes
- JDA Shutdown Without Awaiting:DiscordBot.stop()now callsjda.awaitShutdown(5, TimeUnit.SECONDS)afterjda.shutdown(), with a fallback tojda.shutdownNow()if the graceful shutdown times out. This prevents ghost connections during server shutdown. - DM Failure Silently Ignored: Added proper error handling tosendDM()inDiscordBot. Previously, if a user had DMs disabled or the private channel couldn't be opened, the failure was silently ignored. Now, failures are logged as warnings. - Missing tutorial.md Resource: Removed theplugin.saveResource("tutorial.md", false)call fromConfigManager.setup(). Thetutorial.mdfile was referenced but never existed insrc/main/resources/, causing anIllegalArgumentExceptionon first startup.New Features
- Duplicate Code Prevention:generateCode()now checks that the generated code doesn't already exist inactive-codesbefore returning it. If a collision occurs (extremely unlikely with 6-char alphanumeric), it regenerates. - Reward Command Error Handling:handleClaim()now wrapsdispatchCommand()in a try-catch so a failing reward command doesn't prevent other commands in the same group from executing, and the failure is logged. Source code can be found in GitHubCopyright 2026 NotNawfas. All rights reserved. Redistribution is strictly prohibited.
1.0.0InvitesRewards 1.0.0Apr 22, 2026 First ever release. report any bugs in https://discord.gg/JnTmmb9rDH
Similar projects
Plugin →VeinMiner
Mine the whole vein on mining a single ore/block. Make the tedious mining experience to something satisfying and fun! FTB Ultimine alternative
99.3MSueta
Simple Voice Chat
A working voice chat in Minecraft!
76.8MSueta
Chunky
Pre-generates chunks, quickly and efficiently
18.4MSueta
VeinMiner Enchantment
Veinminer Addon - Adds vineminer enchantment to enchanting tables. Only tools with the enchantment can veinmine
18MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
WorldEdit
A Minecraft Map Editor... that runs in-game! With selections, schematics, copy and paste, brushes, and scripting. Use it in creative, or use it temporarily in survival.
11.6MSueta