dailyreward with VIP pool. and ingame editor banner
dailyreward with VIP pool. and ingame editor icon

dailyreward with VIP pool. and ingame editor

Core Features: 1. Interaction: Players right-click a specific Villager NPC to claim rewards. 2. Cooldown: Players can only claim a reward once every 24 hours...

00
fabricServer1.21.1mod

DailyReward is a server-only Fabric mod that adds a static "Dailyrewards" villager players can right-click to claim daily loot with a 24-hour cooldown.

What’s included and how it works

  • Right-click the tagged villager to claim; requires at least 2 empty inventory slots. On success the player gets one random item from the default pool, plus one from the VIP pool if they have daily.vip. If on cooldown, an action bar shows the remaining hours/minutes; missing space shows a chat warning and does not start the cooldown.
  • The NPC spawned with /dailyrewards spawnnpc is named “Dailyrewards”, silent, invulnerable, no AI, and marked with the dailyrewards_npc command tag so only that villager triggers rewards.
  • Pools and data are YAML-backed in the config folder: config.yml for message text, rewards.yml for serialized ItemStacks (NBT, lore, enchants preserved), and data.yml for player cooldown timestamps.
  • /dailyrewards editpool <pool> opens a 54-slot GUI. Items left inside on close are saved to that pool and removed from the world; place the exact stacks you want awarded (recommended to use creative copies).
  • Admin commands (all require daily.admin): /dailyrewards reload, /dailyrewards spawnnpc, /dailyrewards clear <player>, /dailyrewards editpool <pool>.

Implementation notes and suggestions

  • Rewards are serialized with NBT to keep full item data. Pools are keyed by lowercased pool names (default and vip are expected).
  • Permissions use Fabric Permissions API when present and fall back to operator level 2 if the API is missing.
  • Cooldowns are stored as epoch milliseconds; clearing a player removes their entry entirely.
  • Consider adding world-guarding or respawn logic if the villager might be removed by external mods/plugins.

Server Validation

Server validation passed - The mod was tested on a real Minecraft server and loaded successfully.