RA-StreakSystem

A daily login streak system for Paper 1.21.x with personal and friend streaks, a Java GUI and Bedrock form menu, per-server claimable rewards, a monthly recovery grace period, and MySQL or SQLite storage.

Author: RajaAditya Website: rajaaditya.my.id Version: 1.0.0 API: Paper 1.21.x (Java 21)


This is a different plugin from RA-Streak. RA-Streak uses chat commands and money tiers, while RA-StreakSystem is menu driven, supports Bedrock forms, and tracks rewards per server.


Features

Personal Streak

  • Logging in once per day extends the streak, and a missed day resets it
  • Day boundaries use a configurable timezone (default Asia/Jakarta)
  • A background task catches players who stay online across midnight without rejoining

Friend Streak

  • Two players pair up with /streak friend invite <player>, and a day only counts when both partners log in that day
  • Invites can be accepted, declined, or ended at any time
  • Friend heads are shown in the menu using cached skins

Grace Period and Recovery

  • When a streak "goes out", the player can recover it from the menu, up to a monthly limit (default 3)
  • Recovery is manual by default (the player clicks it), and can be made automatic
  • When the monthly recoveries are used up, the streak resets to 1

Per-Server Rewards

  • Daily and milestone rewards are defined separately for personal and friend streaks in rewards.yml
  • Each reward is a list of console commands plus messages
  • Claims are tracked per (player, server, date), so the same streak can be claimed once per server per day while the streak count itself is shared everywhere
  • Milestones can repeat after a reset or be one-time only

Java and Bedrock Menus

  • /streak opens a chest GUI for Java players and a Cumulus SimpleForm for Bedrock players, chosen automatically
  • Every menu item supports a bedrock: override with enable, priority, and icon, the same convention as RA-ExcellentMenus

Built for Performance

  • Database and network work runs on the plugin's own thread pool, and results are returned to the main thread only when Bukkit API is needed
  • SQLite mode uses WAL, and is meant for one server only

Dependencies

PluginRequiredPurpose
FloodgateNo (softdepend)Bedrock player detection and forms
LuckPermsNo (softdepend)Useful for permission rewards
PlaceholderAPINo (softdepend)Placeholder support

Installation

  1. Place RA-StreakSystem.jar into your plugins/ folder
  2. Start the server once to generate the config folder, then stop it
  3. In config.yml, set a unique server-id and choose database.type (mysql or sqlite)
  4. If you use MySQL, create an empty database first. The plugin creates its tables itself
  5. Edit rewards.yml, messages.yml, and menu.yml
  6. Start the server

File Structure

text
1
plugins/RA-StreakSystem/
├── config.yml        # Server ID, timezone, database, grace period
├── rewards.yml       # Daily and milestone rewards (per server)
├── messages.yml      # All messages
├── menu.yml          # Java GUI and Bedrock form layout
└── streak_data.db    # SQLite file (only in sqlite mode)

Configuration

config.yml

yaml
1
server-id: "server-1"        # must be unique per server, claims are tracked by it
timezone: "Asia/Jakarta"

database:
  type: "mysql"              # mysql or sqlite
  host: localhost
  port: 3306
  name: streak_db
  user: root
  password: "YOUR_PASSWORD"
  pool-size: 10
  connection-timeout-ms: 8000
  sqlite-file: "streak_data.db"   # used when type is sqlite

async:
  thread-pool-size: 4

scheduled-check-interval-minutes: 5

grace-period:
  enabled: true
  max-recovery-per-month: 3
  auto-recover: false        # true = recover automatically on login

skin-cache-ttl-minutes: 15

rewards.yml

yaml
1
personal:
  daily:
    commands:
      - "eco give %player% 100"
    messages:
      - "&aYou received 100 coins from your daily streak!"
  milestones:
    7:
      commands:
        - "give %player% diamond 5"
      messages:
        - "&6A 7 day streak! You received 5 diamonds!"
    30:
      commands:
        - "lp user %player% parent add vip-temp"

friend:
  daily:
    commands:
      - "eco give %player% 150"
  milestones:
    7:
      commands:
        - "give %player% golden_apple 2"

# false = a milestone can repeat each time the streak reaches that number again
reset-milestones-after-claim: false

%player% is replaced with the claiming player's name in every command.

yaml
1
main-menu:
  title: "&8Streak Menu"
  size: 27
  items:
    personal-streak:
      slot: 11
      material: EMERALD
      name: "&aPersonal Streak"
      bedrock:
        enable: true
        priority: 1
        icon: "textures/items/emerald"

Commands

CommandDescriptionAccess
/streakOpen the streak menu (Java GUI or Bedrock form)streak.use
/streak claimClaim today's personal reward without the menustreak.use
/streak friend invite <player>Invite a player to a friend streakstreak.use
/streak friend acceptAccept the latest invitestreak.use
/streak friend declineDecline the latest invitestreak.use
/streak friend end <player>End an active friend streakstreak.use
/streak reloadReload config.yml, messages.yml, rewards.yml, and menu.ymlstreak.admin.reload

Permissions

PermissionDefaultDescription
streak.usetrueBase streak commands and the menu
streak.admin.reloadopReload the configuration

License

Developed by RajaAditya — rajaaditya.my.id