Tags
Creators
Details
Licensed MIT
Published 6 months ago
Updated 5 months ago
All versions
1.0.0
Release
CObblemon:CRZquiz 1.0.05 months ago 1,153
Compatibility
Minecraft: Java Edition
1.21.1
Platform
Fabric
Supported environments
Server-side
Singleplayer
Changes
The bug was in RewardManager.giveRewards() — two issues:
- transactionId was just the player's UUID (line 32): Since the transaction ID never changed between quizzes, the anti-dupe check at line 45 would permanently block the player after their first win.
- cleanup() was called only at the end (line 86): When a player got blocked by the transaction check, the method returned early at line 47, so cleanup() was never reached and the stale entry was never removed.
Fix applied:
- Changed transactionId from playerId.toString() to playerId + "-" + System.currentTimeMillis(), making it unique per reward event instead of per player. This way the anti-dupe check only prevents the same reward call from being processed twice simultaneously, without blocking future quizzes.
- Moved cleanup() to the beginning of the method, before any checks, so stale entries are always cleared regardless of early returns.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:4fKMIcEd:ulMYgrHk"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:4fKMIcEd:ulMYgrHk"
}

