Skip to content

Repository files navigation

DigitalAFK

A modern AFK reward plugin for Paper 1.21+ servers.

Features

  • AFK Zones – Create unlimited zones where players earn rewards for standing still
  • Multiple Reward Types – Shards, commands, and items as rewards
  • Random Rewards – Set a chance for each reward
  • Shard Shop – Players can spend shards on configurable keys/rewards
  • Actionbar & Title – Notify players with actionbar and title messages
  • Bossbar – Show a bossbar with time until next reward
  • IP Limit – Limit how many players per IP can be in a zone
  • Time Formats – Supports 30s, 10m, 2h formats for intervals
  • Smart Reloading – Reload config without restarting the server
  • Permissions – Full permission support

Requirements

  • Paper 1.21+
  • Java 21+

Installation

  1. Download DigitalAFK.jar
  2. Place it in your plugins/ folder
  3. Restart the server
  4. Configure config.yml and zones.yml

Commands

Command Description Permission
/shards View your shard balance and AFK status afkshards.use
/shards shop Open the shard shop afkshards.use
/shards reload Reload the config afkshards.admin
/sa give <player> <amount> Give shards to a player afkshards.admin
/sa take <player> <amount> Take shards from a player afkshards.admin
/sa set <player> <amount> Set a player's shards afkshards.admin
/sa check <player> Check a player's shards afkshards.admin
/sa reset <player> Reset a player's shards afkshards.admin
/afkzone create <name> [radius] Create an AFK zone afkshards.admin
/afkzone delete <name> Delete an AFK zone afkshards.admin
/afkzone list List all AFK zones afkshards.admin
/afkzone reload Reload zones afkshards.admin

Permissions

Permission Description Default
afkshards.use Use shards and AFK zones true
afkshards.admin Admin commands op
afkshards.bypass Receive shards even while moving false

Configuration

config.yml

# How long a player must stand still to receive a reward
afk-interval: "30m"

# How many rewards are given per interval
rewards-per-interval: 1

# Maximum shards a player can hold
max-shards: 999

# Maximum players per IP in a zone (0 = unlimited)
ip-limit: 2

# How far a player can move before being considered active
movement-threshold: 0.5

Reward Types

Type Description
SHARD Give shards to the player
COMMAND Run a console command
ITEM Give an item to the player

Time Formats

Format Example Description
Seconds 30s 30 seconds
Minutes 10m 10 minutes
Hours 2h 2 hours

Placeholders

Placeholder Description
{player} Player name
{zone} Zone name
{amount} Reward amount
{time} Time until next reward
{cost} Shop key cost
{have} Player's current shards
{key} Shop key name

Zone Setup

  1. Stand in the location where you want to create a zone
  2. Run /afkzone create <name> [radius]
  3. The zone will be created as a cube around you

Shop Setup

Add keys to config.yml under shop.keys:

shop:
  keys:
    1:
      display-name: "§6My Key"
      material: "NETHER_STAR"
      cost: 50
      slot: 13
      commands:
        1: "crate key give {player} mykey 1"

Building

./gradlew build

Output: build/libs/DigitalAFK-1.0.0.jar


Dependencies


License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages