?️ Votify
面向 Minecraft 服务器的现代化、高性能投票管理插件
采用稳健的 SQLite 持久化存储、线程安全的异步架构、动态投票派对活动、游戏化奖励以及现代 Hex RGB 视觉效果打造而成。
? 概述
Votify 专为对投票生态系统的可靠性、美观性和高性能有严苛要求的服务器管理员而设计。Votify 摒弃了脆弱的平面文件配置,引入了索引化的 SQLite 数据库引擎、完整的线程安全执行机制,并通过交互式 GUI、动态 BossBar(Boss 栏)和可点击的网络链接,为玩家提供流畅无摩擦的投票体验。
✨ 主要功能
?️ 高性能引擎与线程安全
- SQLite 数据库架构: 告别损坏的平面文件。投票计数、连击数、元数据和里程碑历史记录均安全地存储在索引化的 SQLite 表(
votify_players、votify_metadata、votify_pending_rewards)中。
- 零丢失自动迁移器 (
DataMigrator): 无需丢失任何一次投票记录,即可自动将旧的 votedata.yml 数据迁移至 SQLite。
- 异步 I/O 与线程安全: 所有重型查询和投票钩子均在非主线程运行,而库存交互、命令、标题和粒子效果则严格在 Bukkit 主线程上调度,确保始终维持 20.0 TPS。
? 现代视觉与音效
- 通用 Hex RGB 颜色 (
ColorUtil): 支持在所有消息、GUI 布局、物品描述、标题和 BossBar 中使用现代 &#RRGGBB 十六进制颜色渐变,同时完全兼容旧版 & 代码。
- 动态投票派对 BossBar: 一个持久化的实时 BossBar,显示投票派对的进度(
VOTE PARTY: X/Y votes (Z%)),随着投票到达和玩家加入自动调整。
- 壮观的投票派对庆典: 达到投票派对阈值时,将触发全服多色烟花、自定义立体声音效景观(
UI_TOAST_CHALLENGE_COMPLETE + ENTITY_PLAYER_LEVELUP)、全屏标题以及同步的奖励分发。
? 游戏化奖励
- ? 幸运投票系统: 基于配置的随机概率进行投票抽奖:
- 大奖层级 (5%): 巨额现金奖励 + 广播公告。
- 奖励层级 (15%): 即时额外货币或物品奖励。
- ? 投票里程碑: 在投票阈值(如 10、25、50、100 票)处提供长期的奖励进度。里程碑领取情况在数据库中永久追踪,以防止重复利用漏洞。
- ? 月度排行榜与连击: 自动生成的月度排名和投票连击机制,鼓励每日社区参与。
? 无缝玩家体验
- 现代化
/vote 中心: 交互式库存 GUI,包含:
- 第 11 槽位(信标): 投票站点目录。
- 第 13 槽位(玩家头颅): 个人统计数据及当前排名。
- 第 15 槽位(金锭): 月度排行榜领奖台。
- 可点击的聊天链接: 在
/vote sites 内点击投票站点,会自动发送带有 [CLICK TO OPEN LINK] 操作和悬停提示框的交互式 BungeeCord 聊天组件。
- 集成 Tab 补全: 支持所有玩家命令(
top、info、stats、sites、links、claim、help)的完整自动补全。
? 命令与权限
? 玩家命令 (/vote)
| 命令 |
权限 |
描述 |
/vote |
votify.vote |
打开主要的交互式投票菜单。 |
/vote sites / links |
votify.vote |
打开投票链接 GUI 并向聊天发送可点击的 URL。 |
/vote top |
votify.top |
打开最高投票者 GUI 并打印聊天摘要。 |
/vote stats / info |
votify.stats |
查看个人投票统计数据和当前连击数。 |
/vote claim |
votify.claim |
领取可用的里程碑奖励。 |
/vote help |
votify.vote |
显示帮助菜单。 |
?️ 管理员命令 (/votifyadmin)
| 命令 |
权限 |
描述 |
/votifyadmin reload |
votify.admin |
重新加载所有配置并同步 BossBar。 |
/votifyadmin party force |
votify.admin |
立即启动投票派对活动。 |
/votifyadmin party add <amount> |
votify.admin |
直接向投票派对目标添加票数。 |
/votifyadmin party reset |
votify.admin |
将当前活动的投票派对计数器重置为 0。 |
/votifyadmin setvotes <player> <amount> [type] |
votify.admin |
修改玩家投票数据(total、monthly、weekly)。 |
/votifyadmin resetplayer <player> |
votify.admin |
重置玩家的投票记录。 |
/votifyadmin testvote <player> <service> |
votify.admin |
派发模拟投票事件用于测试。 |
? PlaceholderAPI 支持
Votify 通过 VotifyExpansion.java 提供了广泛的 PlaceholderAPI 集成:
| 占位符 |
说明 |
%votify_votes% |
玩家累计投票总数。 |
%votify_monthly_votes% |
玩家当前月份的投票总数。 |
%votify_streak% |
当前的连续投票天数(以天为单位)。 |
%votify_party_current% |
当前活跃投票派对计数器中的投票数量。 |
%votify_party_required% |
触发投票派对所需的票数目标。 |
%votify_party_percent% |
当前投票派对的完成百分比。 |
%votify_top_name_<1-10>% |
指定排名中最高票玩家的名称。 |
%votify_top_votes_<1-10>% |
指定排名中最高票玩家的票数。 |
⚙️ 安装与设置
- 前置条件:
- 安装步骤:
- 从 Releases 下载最新的
votify-v1.1.0.jar。
- 将
.jar 文件放入服务器的 plugins/ 目录中。
- 启动或重启服务器以生成配置文件和 SQLite 数据库表。
- (如果从 v1.0.x 迁移) 保留文件夹中的
votedata.yml;Votify 将在启动时自动将现有数据导入到 SQLite 中。
- 配置:
- 编辑
plugins/Votify/config.yml 以设置投票 URL、消息和 BossBar 偏好。
- 在
voterewards.yml 中自定义奖励、幸运投票几率和里程碑。
- 运行
/votifyadmin reload 即时应用更改,无需停机。
?️ 从源代码构建
# 克隆仓库
git clone [https://github.com/ImJopehhh/votify.git](https://github.com/ImJopehhh/votify.git)
# 进入项目目录
cd votify
# 使用 Maven 构建
mvn clean package
编译后的二进制文件将位于 target/ 目录内。
? 许可证
本项目采用 MIT License 授权。
?️ Votify
Modern, High-Performance Voting Management Plugin for Minecraft Servers
Built with robust SQLite persistence, thread-safe asynchronous architecture, dynamic Vote Party events, gamified rewards, and modern Hex RGB visuals.
? Overview
Votify is designed for server owners who demand reliability, aesthetics, and high performance from their voting ecosystem. Moving beyond fragile flatfile configurations, Votify introduces an indexed SQLite database engine, full thread-safe execution, and a frictionless voting experience for players through interactive GUIs, dynamic BossBars, and clickable web links.
✨ Key Features
?️ High-Performance Engine & Thread Safety
- SQLite Database Architecture: Say goodbye to corrupted flatfiles. Vote counts, streaks, metadata, and milestone history are securely stored in indexed SQLite tables (
votify_players, votify_metadata, votify_pending_rewards).
- Zero-Loss Auto-Migrator (
DataMigrator): Automatically migrates legacy votedata.yml records into SQLite without losing a single vote.
- Asynchronous I/O & Thread Safety: All heavy queries and vote hooks run off-thread, while inventory interactions, commands, titles, and particle effects strictly dispatch on the Bukkit main thread, ensuring a constant 20.0 TPS.
? Modern Visuals & Audio
- Universal Hex RGB Colors (
ColorUtil): Supports modern &#RRGGBB hex color gradients across all messages, GUI layouts, lore, titles, and BossBars, with full backward compatibility for legacy & codes.
- Dynamic Vote Party BossBar: A persistent, real-time BossBar displaying vote party progress (
VOTE PARTY: X/Y votes (Z%)) that adjusts automatically as votes arrive and when players join.
- Spectacular Vote Party Celebrations: Reaching vote party thresholds triggers server-wide multi-color fireworks, custom stereo audio soundscapes (
UI_TOAST_CHALLENGE_COMPLETE + ENTITY_PLAYER_LEVELUP), full-screen titles, and synced reward distribution.
? Gamified Rewards
- ? Lucky Vote System: Configurable chance-based rolls on incoming votes:
- Jackpot Tier (5%): Massive cash bonus + broadcast announcement.
- Bonus Tier (15%): Instant extra monetary or item reward.
- ? Vote Milestones: Long-term reward progression at vote thresholds (e.g., 10, 25, 50, 100 votes). Milestone claims are permanently tracked in the database to prevent duplicate exploit loops.
- ? Monthly Leaderboards & Streaks: Automated monthly rankings and vote streak mechanics to encourage daily community engagement.
? Seamless Player Experience
- Modern
/vote Hub: Interactive inventory GUI featuring:
- Slot 11 (Beacon): Vote Sites directory.
- Slot 13 (Player Head): Personal statistics & current ranking.
- Slot 15 (Gold Ingot): Monthly leaderboard podium.
- Clickable Chat Links: Clicking a vote site inside
/vote sites automatically sends interactive BungeeCord chat components with a [CLICK TO OPEN LINK] action and hover tooltips.
- Integrated Tab-Completion: Full auto-completion for all player commands (
top, info, stats, sites, links, claim, help).
? Commands & Permissions
? Player Commands (/vote)
| Command |
Permission |
Description |
/vote |
votify.vote |
Opens the main interactive voting menu. |
/vote sites / links |
votify.vote |
Opens the vote link GUI and sends clickable URLs to chat. |
/vote top |
votify.top |
Opens top voter GUI & prints chat summary. |
/vote stats / info |
votify.stats |
Views personal vote statistics and current streak. |
/vote claim |
votify.claim |
Claims available milestone rewards. |
/vote help |
votify.vote |
Displays the help menu. |
?️ Admin Commands (/votifyadmin)
| Command |
Permission |
Description |
/votifyadmin reload |
votify.admin |
Reloads all configurations & resyncs BossBars. |
/votifyadmin party force |
votify.admin |
Instantly starts a Vote Party event. |
/votifyadmin party add <amount> |
votify.admin |
Adds votes directly toward the Vote Party goal. |
/votifyadmin party reset |
votify.admin |
Resets the active Vote Party counter to 0. |
/votifyadmin setvotes <player> <amount> [type] |
votify.admin |
Modifies player vote data (total, monthly, weekly). |
/votifyadmin resetplayer <player> |
votify.admin |
Resets a player's vote records. |
/votifyadmin testvote <player> <service> |
votify.admin |
Dispatches a simulated vote event for testing. |
? PlaceholderAPI Support
Votify includes extensive PlaceholderAPI integration via VotifyExpansion.java:
| Placeholder |
Description |
%votify_votes% |
Total lifetime votes of the player. |
%votify_monthly_votes% |
Total votes by the player in the current month. |
%votify_streak% |
Current active vote streak (in days). |
%votify_party_current% |
Current number of votes in the active Vote Party counter. |
%votify_party_required% |
Target number of votes required to trigger a Vote Party. |
%votify_party_percent% |
Active Vote Party completion percentage. |
%votify_top_name_<1-10>% |
Username of the top voter at the specified rank. |
%votify_top_votes_<1-10>% |
Vote count of the top voter at the specified rank. |
⚙️ Installation & Setup
- Prerequisites:
- Java 21 or higher.
- Paper / Purpur / Spigot 1.16+ (Fully tested on 1.21.x and PaperMC Year.Drop schema).
- NuVotifier installed and configured on your server.
- (Optional) PlaceholderAPI and Vault.
- Installation:
- Download the latest
votify-v1.1.0.jar from Releases.
- Place the
.jar into your server's plugins/ directory.
- Start or restart your server to generate configuration files and SQLite database tables.
- (If migrating from v1.0.x) Keep
votedata.yml in the folder; Votify will automatically import your existing data into SQLite on startup.
- Configuration:
- Edit
plugins/Votify/config.yml to set your voting URLs, messages, and BossBar preferences.
- Customize rewards, lucky vote chances, and milestones in
voterewards.yml.
- Run
/votifyadmin reload to apply changes instantly without server downtime.
?️ Building from Source
# Clone the repository
git clone [https://github.com/ImJopehhh/votify.git](https://github.com/ImJopehhh/votify.git)
# Navigate into the project directory
cd votify
# Build with Maven
mvn clean package
Compiled binaries will be available inside the target/ directory.
? License
This project is licensed under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧