Перейти к содержимому
Mineforgian

TimedOnlineRewards

A powerful Minecraft Bukkit/Spigot plugin that provides a flexible timed reward system for servers. Supports multiple time modes, rich reward types, and comprehensive offline reward handling mechanisms.

Загрузки
385
Подписчики
2
Обновлён
6 августа 2025 г.
Лицензия
MIT

Опубликован 6 августа 2025 г.

TimedOnlineRewards - 定时在线奖励插件 / Timed Online Rewards Plugin

License Minecraft Java

一个功能强大的Minecraft Bukkit/Spigot插件,为服务器提供灵活的定时奖励系统。支持多种时间模式、丰富的奖励类型和完善的离线奖励处理机制。

A powerful Minecraft Bukkit/Spigot plugin that provides a flexible timed reward system for servers. Supports multiple time modes, rich reward types, and comprehensive offline reward handling mechanisms.

✨ 主要特性 / Main Features

  • 🕒 多种时间模式 / Multiple Time Modes - 支持每日、每周、每月、特定时间和相对时间 / Supports daily, weekly, monthly, specific time and relative time
  • 🎁 丰富奖励类型 / Rich Reward Types - 物品、金币、经验、自定义命令 / Items, coins, experience, custom commands
  • 👥 离线奖励处理 / Offline Reward Handling - 保留、延迟发放或跳过离线玩家奖励 / Keep, delay or skip offline player rewards
  • 🖥️ 图形化管理界面 / Graphical Management Interface - 直观的GUI管理系统 / Intuitive GUI management system
  • ⚙️ 灵活配置 / Flexible Configuration - 完全可自定义的配置文件 / Fully customizable configuration files
  • 🔧 权限系统 / Permission System - 细粒度的权限控制 / Fine-grained permission control
  • 💾 数据备份 / Data Backup - 自动备份重要数据 / Automatic backup of important data

📸 界面预览 / Interface Preview

主管理界面 / Main Management Interface

![主界面](Replace this with a description ) 主管理界面 - 查看和管理所有奖励计划 / Main management interface - View and manage all reward plans

创建奖励计划 / Create Reward Plan

![创建计划](Replace this with a description ) 创建新的奖励计划 / Create new reward plans

时间设置界面 / Time Setting Interface

![时间设置](Replace this with a description ) 灵活的时间配置选项 / Flexible time configuration options

奖励内容设置 / Reward Content Setting

![奖励设置](<img width="1112" height="714" alt="image" src="https://github.com/user-attachments/assets/e99c7697-e2fe-4d95-aa28-24c935c03da0" /> ) 丰富的奖励类型配置 / Rich reward type configuration

🚀 快速开始 / Quick Start

系统要求 / System Requirements

  • Minecraft 1.16+
  • Java 17+
  • Bukkit/Spigot/Paper 服务器 / server
  • Vault插件(可选,用于经济系统支持)/ Vault plugin (optional, for economy system support)

安装步骤 / Installation Steps

  1. 下载最新版本的插件jar文件 / Download the latest plugin jar file
  2. 将jar文件放入服务器的 plugins 文件夹 / Place the jar file in the server's plugins folder
  3. 重启服务器 / Restart the server
  4. 使用 /tr 命令打开管理界面 / Use /tr command to open the management interface

基本配置 / Basic Configuration

插件首次运行时会自动生成配置文件:/ The plugin will automatically generate configuration files on first run:

# config.yml - 主配置文件 / Main configuration file
prefix: "§6[定时奖励] "
debug-mode: false

rewards:
  offline-handling: "keep"  # keep/delay/skip

messages:
  offline-welcome: "§e欢迎回来!您有 §a%count% §e个离线奖励待领取"
  offline-hint: "§7使用 §f/tr offline §7查看和领取离线奖励"

📋 命令列表 / Command List

命令 / Command 描述 / Description 权限 / Permission
/tr 打开主管理界面 / Open main management interface timedrewards.admin
/tr list 列出所有奖励计划 / List all reward plans timedrewards.list
/tr toggle <计划ID> 启用/禁用奖励计划 / Enable/disable reward plan timedrewards.edit
/tr reload 重新加载配置 / Reload configuration timedrewards.admin
/tr offline 查看离线奖励 / View offline rewards timedrewards.offline
/tr offline list 查看离线奖励详情 / View offline reward details timedrewards.offline
/tr offline claim 领取离线奖励 / Claim offline rewards timedrewards.offline
/tr help 显示帮助信息 / Show help information -

🔐 权限系统 / Permission System

权限节点 / Permission Node 描述 / Description 默认 / Default
timedrewards.admin 管理员权限 / Administrator permission op
timedrewards.create 创建奖励计划 / Create reward plans op
timedrewards.edit 编辑奖励计划 / Edit reward plans op
timedrewards.delete 删除奖励计划 / Delete reward plans op
timedrewards.list 查看奖励计划列表 / View reward plan list true
timedrewards.offline 管理离线奖励 / Manage offline rewards true

⚙️ 配置说明 / Configuration Guide

时间模式配置 / Time Mode Configuration

timeSettings:
  type: "daily"        # daily/weekly/monthly/specific/relative
  hour: 12            # 小时 (0-23) / Hour (0-23)
  minute: 0           # 分钟 (0-59) / Minute (0-59)
  second: 0           # 秒 (0-59) / Second (0-59)
  dayOfWeek: 1        # 星期几 (1-7, 仅weekly模式) / Day of week (1-7, weekly mode only)
  dayOfMonth: 1       # 每月第几天 (1-31, 仅monthly模式) / Day of month (1-31, monthly mode only)

奖励内容配置 / Reward Content Configuration

rewards:
  items:              # 物品奖励列表 / Item reward list
    - type: DIAMOND
      amount: 5
  economy: 100.0      # 金币奖励 / Economy reward
  experience: 50      # 经验奖励 / Experience reward
  commands:           # 命令奖励 / Command rewards
    - "give %player% minecraft:diamond 1"

离线奖励处理 / Offline Reward Handling

  • keep - 保留离线奖励,玩家上线后可手动领取 / Keep offline rewards, players can manually claim after coming online
  • delay - 延迟发放,玩家上线时自动发放所有离线奖励 / Delay distribution, automatically distribute all offline rewards when players come online
  • skip - 跳过离线玩家,不发放奖励 / Skip offline players, do not distribute rewards

🛠️ 开发构建 / Development Build

环境要求 / Environment Requirements

  • JDK 17+
  • Maven 3.6+
  • Git

## 🎯 命令奖励详解 / Command Rewards Guide

### 功能概述 / Function Overview
命令奖励允许您在发放奖励时执行自定义的服务器命令,这为奖励系统提供了极大的灵活性。所有命令以控制台权限执行,可以实现几乎任何类型的奖励效果。

Command rewards allow you to execute custom server commands when distributing rewards, providing great flexibility to the reward system. All commands are executed with console permissions and can achieve almost any type of reward effect.

### 设置方法 / Setup Method

#### 通过GUI设置(推荐)/ Setup via GUI (Recommended)
1. 使用命令 `/tr` 打开主界面 / Use command `/tr` to open main interface
2. 点击"创建奖励计划"或选择现有计划进行编辑 / Click "Create Reward Plan" or select existing plan to edit
3. 在奖励设置界面点击 **"命令奖励"** 按钮 / Click **"Command Rewards"** button in reward setting interface
4. 系统会提示您在聊天框中输入命令 / System will prompt you to enter command in chat
5. 输入要执行的命令(**不需要**添加 `/` 前缀)/ Enter command to execute (**no need** to add `/` prefix)
6. 点击"保存设置"按钮完成设置 / Click "Save Settings" button to complete setup

### 使用示例 / Usage Examples

#### 基础命令示例 / Basic Command Examples

给玩家物品 / Give player items

give %player% diamond_sword 1

传送玩家到spawn点 / Teleport player to spawn

spawn %player%

给玩家添加临时飞行权限(需要权限插件)/ Give player temporary fly permission (requires permission plugin)

lp user %player% permission settemp essentials.fly true 1h

发送全服公告 / Send server-wide announcement

broadcast §6[奖励] §e%player% §a获得了特殊奖励!

给予经济奖励(需要经济插件)/ Give economy reward (requires economy plugin)

eco give %player% 1000


## 📊 离线奖励详解 / Offline Rewards Guide

### 工作原理 / How It Works
当奖励计划执行时,插件会检查所有应该接收奖励的玩家:
- **在线玩家** - 立即发放奖励
- **离线玩家** - 根据配置处理

When reward plans execute, the plugin checks all players who should receive rewards:
- **Online players** - Distribute rewards immediately
- **Offline players** - Handle according to configuration

### 三种处理模式 / Three Handling Modes

#### 1. 保留模式 (keep) / Keep Mode
```yaml
offline-handling: "keep"
  • 离线奖励保存到文件 / Offline rewards saved to files
  • 玩家上线时收到提示消息 / Players receive notification when coming online
  • 使用命令手动领取奖励 / Use commands to manually claim rewards
  • 适合重要奖励,确保玩家不错过 / Suitable for important rewards, ensuring players don't miss them

玩家体验 / Player Experience:

[定时奖励] §e欢迎回来!您有 §a2 §e个离线奖励待领取
[定时奖励] §7使用 §f/tr offline §7查看和领取离线奖励

2. 跳过模式 (skip) / Skip Mode

offline-handling: "skip"
  • 离线玩家直接跳过奖励 / Offline players are directly skipped for rewards
  • 不保存任何记录 / No records are saved
  • 适合鼓励在线活跃度的奖励 / Suitable for rewards that encourage online activity

3. 延迟模式 (delay) / Delay Mode

offline-handling: "delay"
  • 离线奖励保存到文件 / Offline rewards saved to files
  • 玩家上线时自动发放所有奖励 / Automatically distribute all rewards when players come online
  • 适合日常小奖励,简化操作 / Suitable for daily small rewards, simplifying operations

📝 更新日志 / Changelog

v1.0.0

  • 🎉 首次发布 / Initial release
  • ✨ 基础定时奖励功能 / Basic timed reward functionality
  • 🖥️ GUI管理界面 / GUI management interface
  • 🎁 多种奖励类型支持 / Multiple reward type support
  • 👥 离线奖励处理机制 / Offline reward handling mechanism

v1.0.1 (最新功能更新 / Latest Feature Updates)

  • 新增自定义奖励消息功能 / Added custom reward message feature:为每个奖励计划设置个性化消息 / Set personalized messages for each reward plan
  • 优化奖励显示 / Optimized reward display:奖励发放时显示详细内容和数量 / Show detailed content and quantities when distributing rewards
  • 改进GUI反馈系统 / Improved GUI feedback system:使用ActionBar提供即时操作反馈 / Use ActionBar for instant operation feedback
  • 重构物品奖励设置 / Refactored item reward settings:移除拖拽功能,改为按钮操作 / Removed drag functionality, changed to button operations
  • 完善命令奖励系统 / Enhanced command reward system:支持占位符、控制台权限执行、多命令组合 / Support placeholders, console permission execution, multiple command combinations

Ченджлог

1.0Релиз1.21.6, 1.21.7, 1.21.8 · 6 августа 2025 г.

TimedOnlineRewards v1.0.0 Release Notes

定时在线奖励插件 v1.0.0 发布说明

发布日期 / Release Date: 2025年8月6日 / August 6, 2025
版本类型 / Version Type: 正式版 / Stable Release
兼容性 / Compatibility: Minecraft 1.16+ | Java 17+ | Bukkit/Spigot/Paper


🎉 首次发布 / Initial Release

我们很高兴地宣布 TimedOnlineRewards 插件的首个正式版本发布!这是一个功能完整、稳定可靠的定时奖励管理系统,专为 Minecraft 服务器管理员设计。

We are excited to announce the first official release of the TimedOnlineRewards plugin! This is a feature-complete, stable and reliable timed reward management system designed specifically for Minecraft server administrators.

✨ 核心功能 / Core Features

🕒 灵活的时间管理系统 / Flexible Time Management System

  • 多种时间模式 / Multiple Time Modes

    • 每日奖励 (Daily) - 每天指定时间自动发放
    • 每周奖励 (Weekly) - 每周指定星期几发放
    • 每月奖励 (Monthly) - 每月指定日期发放
    • 特定时间 (Specific) - 指定具体时间戳执行
    • 相对时间 (Relative) - 基于相对时间间隔执行
  • 精确时间控制 / Precise Time Control

    • 支持时、分、秒级别的精确设置
    • 自动计算下次执行时间
    • 跨时区兼容性支持

🎁 丰富的奖励类型 / Rich Reward Types

  • 物品奖励 / Item Rewards

    • 支持任意 Minecraft 物品
    • 自定义物品数量和属性
    • 支持附魔物品和自定义NBT数据
  • 经济奖励 / Economy Rewards

    • 通过 Vault API 集成经济系统
    • 支持主流经济插件 (EssentialsX, CMI等)
    • 灵活的金额设置
  • 经验奖励 / Experience Rewards

    • 直接给予玩家经验值
    • 支持大量经验发放
    • 自动处理经验等级计算
  • 命令奖励 / Command Rewards

    • 执行自定义服务器命令
    • 支持占位符 (%player%)
    • 控制台权限执行,无权限限制
    • 支持多命令组合执行

🖥️ 直观的GUI管理界面 / Intuitive GUI Management Interface

  • 主管理界面 / Main Management Interface

    • 一目了然的奖励计划概览
    • 实时显示计划状态和下次执行时间
    • 快速启用/禁用奖励计划
    • 一键创建、编辑、删除功能
  • 创建奖励计划向导 / Reward Plan Creation Wizard

    • 分步骤引导创建流程
    • 直观的时间设置界面
    • 可视化奖励内容配置
    • 实时预览和验证
  • 高级编辑功能 / Advanced Editing Features

    • 完整的奖励计划编辑器
    • 支持复制和修改现有计划
    • 批量操作支持
    • 撤销/重做功能

👥 智能离线奖励处理 / Intelligent Offline Reward Processing

  • 三种处理模式 / Three Processing Modes

    • 保留模式 (Keep): 离线奖励保存,玩家上线后手动领取
    • 延迟模式 (Delay): 玩家上线时自动发放所有离线奖励
    • 跳过模式 (Skip): 直接跳过离线玩家,不保存奖励
  • 完整的离线奖励管理 / Complete Offline Reward Management

    • 持久化数据存储,跨服务器重启保持
    • 详细的离线奖励记录和统计
    • 灵活的领取方式 (单个/批量)
    • 自动清理过期记录

⚙️ 强大的配置系统 / Powerful Configuration System

  • 分层配置架构 / Layered Configuration Architecture

    • 主配置文件 (config.yml) - 全局设置
    • 奖励配置文件 (rewards.yml) - 奖励计划数据
    • 自动配置验证和错误提示
  • 热重载支持 / Hot Reload Support

    • 无需重启服务器即可重载配置
    • 实时应用配置更改
    • 配置冲突检测和解决
  • 自动备份机制 / Automatic Backup Mechanism

    • 定时自动备份重要数据
    • 可配置备份间隔和保留数量
    • 一键恢复备份功能

🔐 完善的权限系统 / Comprehensive Permission System

  • 细粒度权限控制 / Fine-grained Permission Control

    timedrewards.admin     - 管理员权限 (包含所有权限)
    timedrewards.create    - 创建奖励计划
    timedrewards.edit      - 编辑奖励计划
    timedrewards.delete    - 删除奖励计划
    timedrewards.list      - 查看奖励计划列表
    timedrewards.offline   - 管理离线奖励
    
  • 权限继承机制 / Permission Inheritance

    • 管理员权限自动包含所有子权限
    • 支持权限组和用户级别设置
    • 与主流权限插件完美兼容

🚀 技术特性 / Technical Features

高性能架构 / High-Performance Architecture

  • 异步处理机制 / Asynchronous Processing

    • 所有耗时操作异步执行
    • 不阻塞服务器主线程
    • 优化的内存使用和垃圾回收
  • 智能调度系统 / Intelligent Scheduling System

    • 高精度时间计算
    • 自动处理时区转换
    • 服务器重启后自动恢复调度

数据安全保障 / Data Security Assurance

  • 多重数据保护 / Multiple Data Protection

    • 原子性文件操作
    • 数据完整性验证
    • 自动错误恢复机制
  • 兼容性保证 / Compatibility Guarantee

    • 支持 Minecraft 1.16 到最新版本
    • 兼容 Bukkit、Spigot、Paper 服务器
    • 向后兼容性承诺

📋 完整命令列表 / Complete Command List

主要命令 / Main Commands

/tr                    - 打开主GUI界面
/tr help               - 显示帮助信息
/tr list               - 列出所有奖励计划
/tr toggle <计划ID>    - 启用/禁用奖励计划
/tr reload             - 重新加载配置文件

离线奖励命令 / Offline Reward Commands

/tr offline            - 查看离线奖励概览
/tr offline list       - 查看详细离线奖励列表
/tr offline claim      - 领取下一个离线奖励
/tr offline claim all  - 领取所有离线奖励
/tr offline clear      - 清空离线奖励记录 (管理员)

🛠️ 安装和配置 / Installation and Configuration

快速安装 / Quick Installation

  1. 下载 TimedOnlineRewards-1.0.0.jar 文件
  2. 将文件放入服务器的 plugins 文件夹
  3. 重启服务器
  4. 插件将自动生成默认配置文件
  5. 使用 /tr 命令开始配置奖励计划

推荐配置 / Recommended Configuration

# config.yml 推荐设置
prefix: "&6[定时奖励] "
debug-mode: false

rewards:
  offline-handling: "keep"  # 推荐使用保留模式

storage:
  auto-backup: true
  backup-interval: 24       # 24小时自动备份一次

依赖插件 / Dependencies

  • 必需 / Required: 无 / None
  • 可选 / Optional:
    • Vault (用于经济奖励功能)
    • 任意经济插件 (EssentialsX, CMI, 等)

🔧 开发者信息 / Developer Information

构建信息 / Build Information

  • Java版本 / Java Version: 17
  • Maven版本 / Maven Version: 3.8+
  • 构建时间 / Build Time: 2025-08-06 13:00:00 UTC+8
  • Git提交 / Git Commit: a1b2c3d4

API支持 / API Support

插件提供完整的开发者API,支持第三方插件集成:

// 获取插件实例
TimedOnlineRewards plugin = TimedOnlineRewards.getInstance();

// 创建奖励计划
RewardPlan plan = new RewardPlan("daily_reward", "每日奖励");
plugin.getRewardManager().addRewardPlan(plan);

// 手动发放奖励
plugin.getRewardManager().giveReward(player, plan);

🐛 已知问题和限制 / Known Issues and Limitations

已知问题 / Known Issues

  • 无重大已知问题 / No major known issues

使用限制 / Limitations

  • ActionBar消息功能需要 Spigot/Paper 服务器支持
  • 经济奖励功能需要安装 Vault 和经济插件
  • 命令奖励的执行结果不会返回给插件

兼容性说明 / Compatibility Notes

  • 不支持 Minecraft 1.15 及以下版本
  • 纯 Bukkit 服务器可能无法使用部分高级功能
  • 某些过时的权限插件可能存在兼容性问题

🎯 快速开始指南 / Quick Start Guide

5分钟快速配置 / 5-Minute Quick Setup

  1. 安装插件 / Install Plugin

    # 下载并放入plugins文件夹,重启服务器
    # Download and place in plugins folder, restart server
    
  2. 创建第一个奖励计划 / Create First Reward Plan

    1. 使用 /tr 打开GUI界面
    2. 点击"创建奖励计划"
    3. 设置计划名称: "每日签到奖励"
    4. 设置时间: 每日 12:00:00
    5. 添加奖励: 钻石 x5, 金币 x100
    6. 点击"创建计划"
    
  3. 验证配置 / Verify Configuration

    使用 /tr list 查看创建的奖励计划
    检查下次执行时间是否正确
    
  4. 测试功能 / Test Functionality

    等待执行时间到达,或使用管理命令手动触发
    检查奖励是否正确发放给在线玩家
    

常用配置模板 / Common Configuration Templates

每日签到奖励 / Daily Check-in Reward

plans:
  daily_checkin:
    name: "每日签到奖励"
    enabled: true
    timeSettings:
      type: "daily"
      hour: 12
      minute: 0
      second: 0
    rewards:
      items:
        - type: DIAMOND
          amount: 5
      economy: 100.0
      experience: 50
    customMessage: "感谢 %player% 的每日签到!"

周末特殊奖励 / Weekend Special Reward

plans:
  weekend_special:
    name: "周末大礼包"
    enabled: true
    timeSettings:
      type: "weekly"
      dayOfWeek: 6  # 星期六
      hour: 20
      minute: 0
      second: 0
    rewards:
      items:
        - type: ENCHANTED_BOOK
          amount: 1
      economy: 500.0
      commands:
        - "effect give %player% minecraft:luck 3600 1"
    customMessage: "周末愉快!%player% 获得了特殊奖励!"

Комментарии

Загружаем…