排名
搜索
高级搜索 Ctrl + K 打开搜索

Hytale Votifier 插件

Top-Games 开发的现代化 Hytale 服务器投票插件。通过可配置的等级系统自动奖励投票的玩家。

Hytale 兼容
HMAC-SHA256 认证
10 种语言
内置奖励

要求

重要: 此配置需要安装了 WebServer 插件的 Hytale 服务器。
  • 运行中的 Hytale 服务器
  • Java 25 或更高版本
  • 已安装 WebServer 插件(Hytale 推荐的插件)
  • 访问服务器配置文件

安装 SimpleVotifier

1
下载 SimpleVotifier

从 Modtale 下载最新版本的插件。

在 Modtale 下载
2
安装插件

将 SimpleVotifier.jar 文件复制到 Hytale 服务器的 mods/ 文件夹。

mods/SimpleVotifier.jar
3
验证 WebServer

确保 WebServer 插件(Hytale 推荐的插件)已安装并正常运行。

4
启动服务器

启动您的 Hytale 服务器,让 SimpleVotifier 自动生成其配置。

5
配置插件

根据您的需要编辑生成的配置文件(参见配置部分)。

配置

首次启动后,SimpleVotifier 自动创建配置文件 mods/SimpleVotifier/config.json。

默认配置
mods/SimpleVotifier/config.json
{
  "language": "cn",
  "token": "AbCdEfGh123456789XyZ0123",
  "allowedIps": [],
  "logVotes": true,
  "broadcastVotes": true,
  "rewards": {
    "enabled": false,
    "monthlyReset": true,
    "everyVoteCommands": [
      "give {player} Plant_Crop_Carrot_Item"
    ],
    "tiers": [
      {
        "votesRequired": 10,
        "commands": ["give {player} Container_Bucket"]
      },
      {
        "votesRequired": 50,
        "commands": ["give {player} Armor_Iron_Head"]
      },
      {
        "votesRequired": 100,
        "commands": ["give {player} Rock_Gem_Diamond"]
      }
    ]
  },
  "leaderboard": {
    "enabled": true,
    "format": "html",
    "showVoteSites": true
  },
  "voteSites": [
    {
      "service": "Top-Games",
      "url": "https://top-games.net/hytale/my-server"
    }
  ]
}
配置选项
选项 类型 描述
language string 语言代码 (en, fr, es, de, it, pt, ru, uk, zh, ja)
token string HMAC 认证的安全令牌(自动生成)
allowedIps array IP 白名单(空 = 允许所有)
logVotes boolean 在控制台显示投票
broadcastVotes boolean 向所有玩家广播投票
安全令牌: 令牌自动生成。将其复制到您的 Top-Games 面板以启用连接。

Top-Games 配置

1
获取您的令牌

SimpleVotifier 自动生成一个令牌,您需要从配置文件中获取。

文件位置: mods/SimpleVotifier/config.json
2
在 Top-Games 中配置

前往您的 Top-Games 面板,Hytale 服务器的"Votifier"部分。

  • 启用"SimpleVotifier"
  • 输入您服务器的 IP
  • 端口:默认为服务器端口 + 3(例如:5523)
  • 输入 config.json 中的令牌
3
测试连接

使用 Top-Games 面板中的"测试"按钮验证通信是否正常工作。

奖励系统(可选)

SimpleVotifier 包含内置奖励系统,每次投票执行命令并有等级奖励。

奖励配置
config.json (rewards section)
{
  "rewards": {
    "enabled": true,
    "monthlyReset": true,
    "everyVoteCommands": ["give {player} Plant_Crop_Carrot_Item"],
    "tiers": [
      {
        "votesRequired": 10,
        "commands": ["give {player} Container_Bucket"]
      },
      {
        "votesRequired": 50,
        "commands": ["give {player} Armor_Iron_Head"]
      },
      {
        "votesRequired": 100,
        "commands": ["give {player} Rock_Gem_Diamond"]
      }
    ]
  }
}
可用占位符: 在命令中使用 {player} - 将被替换为玩家名称。
玩家命令
命令 描述
/rewards 领取待领取的投票奖励
/vote 显示配置的投票链接
/voteinfo 查看投票统计和等级进度

开发者 API

第三方插件可以通过 Hytale EventBus 监听投票事件。

MyPlugin.java
import com.hypixel.hytale.server.core.HytaleServer;
import net.top_games.hytale.plugins.simplevotifier.VoteEvent;

public class MyPlugin extends JavaPlugin {

    @Override
    protected void setup() {
        HytaleServer.get().getEventBus()
            .listenFor(VoteEvent.class, null)
            .listen(this::onVote);
    }

    private void onVote(VoteEvent event) {
        String username = event.getUsername();
        String service = event.getServiceName();

        getLogger().atInfo().log(username + " voted on " + service);
        // Add your custom logic here
    }
}
注意: 当 VoteRewards 模块启用时,它自动管理奖励。如果您想通过自己的奖励插件完全控制,请禁用它(rewards.enabled: false)。

排行榜(可选)

SimpleVotifier 包含排行榜端点,用于显示服务器上的最佳投票者。

排行榜配置
config.json (leaderboard section)
{
  "leaderboard": {
    "enabled": true,
    "format": "html",
    "showVoteSites": true
  }
}
排行榜选项
选项 类型 描述
enabled boolean 启用/禁用排行榜端点(默认禁用)
format string 默认输出格式:"html"或"json"(默认 html)
showVoteSites boolean 在排行榜上显示/隐藏投票网站部分
排行榜端点
GET https://your-server:port/Top-Games/SimpleVotifier/leaderboard

故障排除

  • 检查 WebServer 插件是否已安装
  • 检查服务器日志中的错误消息

  • 检查 HMAC 签名是否正确生成
  • 检查 allowedIps 配置
  • 检查服务器日志中的错误消息

  • 确保 rewards.enabled 设置为 true
  • 检查配置中的命令语法
  • 检查玩家是否在线或使用 /rewards 领取

  • 确认 monthlyReset 已启用
  • 检查 last_reset.txt 文件的最后重置日期
  • 重置在新月份的第一次投票时触发
信息
类型: Hytale 插件
兼容性: Hytale 服务器
Java: Java 25+
协议: HMAC-SHA256 + HTTP
语言: 支持 10 种语言
功能
  • 安全的 HMAC-SHA256 认证
  • 内置奖励系统
  • 支持 10 种语言
  • 向所有玩家广播投票
  • 每月投票重置
  • 第三方插件的事件 API
  • 排行榜端点(HTML/JSON)
配置摘要
  1. 安装 WebServer 插件
  2. 安装 SimpleVotifier
  3. 配置 config.json
  4. 在 Top-Games 中配置
  5. 测试连接
  6. 配置奖励
  7. 配置排行榜
支持

需要帮助配置 SimpleVotifier?我们的团队随时为您提供帮助。

发现 Hytale 服务器

探索我们最佳 Hytale 服务器排名并加入社区!

查看 Hytale 服务器