Skip to content

rmue11er/snoozeloot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnoozeLoot

SnoozeLoot rewards AFK players with SnoozePoints (action bar, title, particles) and provides a config-driven points shop GUI with purchase limits, confirmation, and transaction history.

Target: Paper 1.20+ (tested on 1.20.6).

CI

GitHub Actions runs mvn verify on every push and pull request to main, on Ubuntu (Linux) with JDK 21, 22, and 23 — so builds are validated off macOS and on common server runtimes.

SnoozeLoot targets Paper 1.20.5+, which requires Java 21 minimum. Older Minecraft versions (Java 8/17) are out of scope for this plugin.

Release

Pushing a version tag on main builds the plugin and creates a GitHub Release with the shaded jar attached.

# version in pom.xml must match the tag (without the v prefix)
git tag v1.1
git push origin v1.1

Manual release (GitHub → Actions → Release → Run workflow) is also available.

Every push/PR to main still runs tests only (CI). Releases are tag-based so version numbers stay intentional.

Prerequisites

  • JDK 21+ (required for Paper 1.20.5+; matches production servers)
  • Maven (mvn)
java -version
mvn -version

Build

mvn -q -Dmaven.repo.local=.m2 clean package

Output jar (shaded, includes SQLite + bStats):

  • target/snoozeloot-1.1.jar

Do not deploy original-snoozeloot-*.jar — that artifact excludes bundled dependencies.

Local dev server

Build and start:

chmod +x ./dev.sh ./stop.sh ./run/start.sh ./run/stop.sh
./dev.sh

Stop the server:

./stop.sh

The server runs from run/ and copies the plugin jar from target/ to run/plugins/SnoozeLoot.jar on each start.

Defaults:

  • Minecraft version: 1.20.6 (override with MC_VERSION=...)
  • RAM: 2G (override with MEMORY=...)

Example:

MC_VERSION=1.20.6 MEMORY=4G ./dev.sh

Server installation

  1. Stop the Paper server
  2. Copy the jar to plugins/
  3. Start the server

Optional: install PlaceholderAPI and/or WorldGuard for extended features.

Commands & permissions

Command Description Permission
/snooze Show your balance snoozeloot.use
/snooze show <player> Show another player's balance snoozeloot.use
/snooze stats Leaderboard + your rank snoozeloot.use
/snooze shop Open the points shop snoozeloot.use
/snooze help Show commands available to you snoozeloot.use
/snooze pay <player> <amount> Send SnoozePoints snoozeloot.pay
/snooze history [limit] Your purchase history snoozeloot.use
/snooze history <limit> All recent purchases (admin) snoozeloot.history.admin
/snooze admin Show AFK/payout settings snoozeloot.admin
/snooze give/remove/set/reset Manage balances snoozeloot.admin
/snooze reload Reload config & messages snoozeloot.admin
/snooze debug [player] AFK debug info snoozeloot.admin

PlaceholderAPI

When PlaceholderAPI is installed, these placeholders are available:

Placeholder Description
%snoozeloot_points% Current SnoozePoints balance
%snoozeloot_rank% Leaderboard rank (- if unranked)
%snoozeloot_afk% Whether the player is currently AFK
%snoozeloot_streak% Daily login streak days

Configuration

On first start, plugins/SnoozeLoot/config.yml is created (config-version: 3).

Storage

storage:
  type: yaml   # yaml | sqlite
language: en   # loads messages_<language>.yml (en, de)
  • yaml: players.yml, meta.yml, transactions.yml
  • sqlite: single snoozeloot.db (points, meta, purchase counts, transactions)

AFK & points

  • afk.idle-check-interval-seconds — activity check interval
  • afk.afk-time-threshold-seconds — idle time before AFK starts
  • afk.payout-interval-seconds / afk.points-per-interval — earning rate
  • afk.allowed-worlds / afk.allowed-regions — restrict where AFK works (empty = all)
  • afk.blocked-gamemodes — e.g. CREATIVE, SPECTATOR
  • afk.min-active-seconds-before-afk — active play required before first AFK
  • afk.max-afk-seconds-per-day / max-afk-seconds-per-session — caps (-1 = unlimited)
  • afk.pool-detection — ignore circular pool AFK machines
  • afk.start-notification.* — title + sound on AFK enter
  • afk.end-notification.* — sound on AFK exit

Bonuses & streaks

Daily/weekly bonuses are claimed automatically when entering AFK. Streak multipliers boost AFK earnings when the player has enough active play time.

bonuses:
  daily:
    enabled: true
    points: 25
  weekly:
    enabled: true
    points: 100
  streak:
    enabled: true
    min-minutes-per-day: 30
    multiplier-per-day: 0.05
    max-multiplier: 1.5

Multipliers

Permission-based multipliers (highest value wins):

multipliers:
  snoozeloot.multiplier.vip: 1.5
  snoozeloot.multiplier.mvp: 2.0

Pay

pay:
  enabled: true
  min-amount: 1
  cooldown-seconds: 30

Shop

  • shop.confirm-above-price — double-click confirmation for expensive items
  • shop.transaction-log-max-entries — max stored purchases
  • Per item: purchase-limit (-1 = unlimited)
  • Commands support %player%, %uuid%, %world%, %points%

Integrations

On startup SnoozeLoot checks version.txt on GitHub for updates and notifies online admins (snoozeloot.admin). This is built-in and not configurable.

bstats:
  enabled: true                # disable SnoozeLoot metrics only

bStats metrics

SnoozeLoot uses bStats (plugin id 32608) to collect anonymous usage statistics (server count, player counts, Java version, and config summaries like storage type or language). There is no performance impact, and no player names or IPs are sent.

Opt out (either method works):

  1. Per plugin — set bstats.enabled: false in plugins/SnoozeLoot/config.yml
  2. Server-wide — set enabled: false in plugins/bStats/config.yml (created automatically on first start; affects all bStats-enabled plugins on the server)

Custom charts reported: language, storage_type, sqlite, daily_bonus, weekly_bonus, streak_bonus, pay_enabled, worldguard, placeholderapi.

Anti-exploit

Movement in water, vehicles, or on rails does not count as activity when configured. Pool detection ignores circular AFK pool movement patterns.

Tests

mvn -q -Dmaven.repo.local=.m2 test

MiniMessage

All text in messages_*.yml and shop names/lore uses MiniMessage formatting. Use <placeholder> tags (not %placeholder%) in message files.

About

A Minecraft Paper Plugin that gives players rewards for being AFK

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors