AFKPass

AFKPass - Explanation

How it works

AFKPass is an exciting feature in the AFK Rewards plugin that functions similarly to a battle pass but is based on a player's accumulated time spent AFK (Away From Keyboard) instead of traditional experience points. With AFKPass, you can create an infinite number of tiers, each with its own custom AFK rewarding times to achieve. Players can progress through these tiers by accumulating the required AFK time and claim unique rewards at each level.

Here's how AFKPass works:

  1. Infinite Tiers:

    • AFKPass allows you to set up an infinite number of tiers, meaning you can define as many levels of rewards as you want for your players to achieve.

  2. Custom AFK Rewarding Times:

    • Each tier can have a custom AFK rewarding time requirement. For example, Tier 1 may require 10 minutes of cumulative AFK time, while Tier 2 might require 30 minutes, and so on. The times can be adjusted to suit your server's pacing and reward distribution.

  3. Unique Rewards:

    • Each tier can offer unique and custom rewards to the players who reach them. These rewards can be anything you desire, including in-game items, currency, XP, permissions, or any other custom feature your server offers.

  4. Interactivity and Progression:

    • AFKPass creates a sense of accomplishment and progression for players. As they spend more time AFK on your server, they can unlock increasingly valuable rewards, encouraging them to stay engaged and rewarded for their time spent online.

  5. Error Handling:

    • If a tier is set up with incorrect settings or gives an error, it will be marked as invalid. This ensures that players won't encounter unexpected issues or receive unintended rewards.

  6. Claimed Tiers:

    • Once a player claims a tier reward, they cannot claim it again. This prevents players from repeatedly obtaining the same rewards.

The AFKPass feature enhances the engagement and retention of players on your server by providing a continuous stream of rewards as they invest more time into the game. It's an interactive and rewarding system that encourages players to stay AFK on your server, making it a valuable addition to your server's gameplay experience.

Setup and configuration

To create AFKPass tiers, you will use the afkpass.yml file and create individual tier files in the "tiers" folder. Below is a step-by-step guide on how to create a custom tier:

  1. afkpass.yml:

    • rewards_amount: Set the total number of rewards players can claim through the AFKPass.

    • distance_between_rewards: Specify the distance between rewards if they don't fit on a single page. This helps organize the tiers in the AFKPass interface.

  2. tiers Folder: Inside the "tiers" folder, there are three default .yml files:

    • claimed_reward_icon.yml: This file determines the item that appears after a player claims a reward.

    • empty_reward_icon.yml: This file defines the item used to create spacing between tiers.

    • invalid_reward_icon.yml: This file sets the item to be used when a tier doesn't work or has errors.

  3. Custom Tiers: To create custom tiers, follow these naming conventions in the "tiers" folder:

    • tier_1.yml: The first tier. For each tier, increment the number in the file name (e.g., tier_2.yml, tier_3.yml, and so on).

  4. Tier .yml Format: In each tier file, you can customize various properties. Here's an example for tier_1.yml:

functionality:
    type: BLACK_STAINED_GLASS_PANE
    time_req: 0
    display_name: '&r&cTier: &f{index}'
    commands_to_be_executed:
    - eco give {player} 100
    - msg {player} You have claimed tier 1!
    lore:
    - '&cTest 1'
    - '&dTime required: &f{timeReq}'
    - '&3Your time: &f{playerTime}'
  • type: The type of item for the tier. In this example, it's set to a black stained glass pane.

  • time_req: The AFK time required to reach this tier. Set this value to the number of seconds of AFK time needed for this tier.

  • display_name: The display name of the tier item, where {index} will be replaced by the tier number (e.g., "Tier 1", "Tier 2").

  • commands_to_be_executed: A list of commands to be executed when the player claims this tier's rewards.

  • lore: The lore (description) of the tier item. {timeReq} and {playerTime} will be replaced by the respective values.

By following these steps, you can create custom tiers with specific rewards and AFK time requirements for your AFKPass. Players can claim rewards as they progress through the tiers based on the amount of time they spend AFK on your server.

Last updated