▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/CObblemon:CRZquiz
CObblemon:CRZquiz

CObblemon:CRZquiz

CRZquiz is a server-side Fabric mod for Minecraft 1.21.1 that runs an automatic Pokemon trivia quiz system with Cobblemon item rewards

805
3
Все версииCObblemon:CRZquiz 1.0.0

CObblemon:CRZquiz 1.0.0

Release1 мес. назад

Список изменений

The bug was in RewardManager.giveRewards() — two issues:

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

Файлы

CRZquiz-1.0.0.jar(54.99 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

1.0.0

Загрузчики

Fabric

Версии игры

1.21.1

Загрузок

543

Дата публикации

1 мес. назад

Загрузил

ID версии

Главная