▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
KeyAll

KeyAll

KeyAll is an advanced per-player timed key distribution system for Minecraft servers. It tracks individual player playtime and automatically distributes keys or executes commands at specified intervals for each player independently.

Оцените первым
84
1

KeyAll is an advanced per-player timed key distribution system for Minecraft servers. It tracks individual player playtime and automatically distributes keys or executes commands at specified intervals for each player independently.

Features

  • Per-Player Tracking: Each player has their own independent timer based on their actual playtime
  • Multiple KeyAll Events: Create unlimited key distribution events with different intervals
  • Permission-Based: Optionally require permissions for specific KeyAll events
  • Multiple Commands: Execute multiple commands in sequence for each KeyAll event
  • Pause/Resume: Temporarily pause and resume KeyAll events
  • PlaceholderAPI Support: Display time remaining until next key with placeholders
  • Persistent Data: Player data is saved and persists across server restarts
  • Optimized Performance: Async checking with efficient data management

Installation

  1. Download the KeyAll plugin JAR file
  2. Place it in your server's plugins folder
  3. (Optional) Install PlaceholderAPI for placeholder support
  4. Restart your server
  5. Configure the plugin in plugins/KeyAll/config.yml

Commands

CommandDescriptionPermission
/keyall create <name> <interval> "<command>" [permission]Create a new KeyAll eventkeyall.admin
/keyall delete <name>Delete a KeyAll eventkeyall.admin
/keyall pause <name>Pause a KeyAll eventkeyall.admin
/keyall resume <name>Resume a paused KeyAll eventkeyall.admin
/keyall listList all KeyAll eventskeyall.admin
/keyall info <name>View detailed info about a KeyAll eventkeyall.admin
/keyall reloadReload the plugin configurationkeyall.admin

Command Examples

# Create a common key that gives every hour
/keyall create common_key 60m "crates give key %playername% 1 commonkey"

# Create a rare key for VIP players every 3 hours
/keyall create rare_key 3h "crates give key %playername% 1 rarekey" keyall.vip

# Create a daily reward with multiple commands
/keyall create daily_reward 24h "eco give %playername% 5000" none
/keyall create daily_bonus 24h "give %playername% diamond 5" none

# Delete a KeyAll event
/keyall delete common_key

# Pause and resume
/keyall pause rare_key
/keyall resume rare_key

Time Format

Use these suffixes for time intervals:

  • s = seconds (e.g., 30s = 30 seconds)
  • m = minutes (e.g., 60m = 60 minutes)
  • h = hours (e.g., 2h = 2 hours)
  • d = days (e.g., 1d = 1 day)

Placeholders

Requires PlaceholderAPI to be installed.

PlaceholderDescriptionExample Output
%keyall_time_<name>%Time remaining in formatted text1h 30m
%keyall_seconds_<name>%Seconds remaining5400
%keyall_minutes_<name>%Minutes remaining90
%keyall_hours_<name>%Hours remaining1

Example Usage:

%keyall_time_common_key%     → "45m 30s"
%keyall_time_rare_key%       → "2h 15m"
%keyall_minutes_daily_reward% → "120"

Configuration Example

keyalls:
  keyall:
    interval: 10s
    commands:
    - "crates give key %playername% 1 keyall"
    - '[click] /warp Crates'
    - '[message] &7You got a key! &5&lClick Here&r &7 to warp to crates area'
    permission: none
    paused: false
  
  vip_key:
    interval: "2h"
    commands:
      - "crates give key %playername% 1 vipkey"
      - "broadcast &e%playername% &areceived a VIP key!"
    permission: "keyall.vip"
    paused: false

How It Works

  1. Playtime Tracking: The plugin tracks each player's total playtime in seconds
  2. Independent Timers: Each player has their own timer for each KeyAll event
  3. Interval Checking: Every second, the plugin checks if any player has reached their interval
  4. Command Execution: When a player reaches the interval, all commands are executed in sequence
  5. Timer Reset: The player's timer for that specific KeyAll resets after receiving the reward

Example Scenario

  • Player A joins and plays for 2 hours
  • common_key interval is 1 hour
  • Player A receives the key at 1 hour and 2 hours of playtime
  • If Player A leaves and rejoins, their playtime continues from 2 hours
  • Player A will receive the next key at 3 hours of total playtime

Permissions

  • keyall.admin - Access to all KeyAll commands (default: op)
  • Custom permissions can be set per KeyAll event in the config

Player Data

Player data is stored in plugins/KeyAll/playerdata/<uuid>.yml and includes:

  • Total playtime
  • Last received time for each KeyAll event
  • Session information

Data is automatically saved when players leave and persists across server restarts.

Performance

  • Async checking every second to minimize server lag
  • Efficient data structures using ConcurrentHashMap
  • Minimal file I/O with cached player data
  • Optimized for servers with hundreds of players

🤝 Support

For issues, suggestions, or contributions:

  • Contact SOULESS STUDIOS

KeyAll - Making key distribution fair and per-player! 🔑

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

26.1.x1.21.x1.20.x1.19.x1.18.x

Платформы

Поддерживаемые окружения

Сервер

Зависимости

Детали

Лицензия:
Опубликован:5 месяцев назад
Обновлён:2 недели назад
Главная