ServerStatus
当前版本
- 最新版本为 v1.6,适用于最新的 Craftbukkit 版本。
基本信息
- 该插件通过 GET 请求头将数据发送到您网站上的自定义 .PHP 文件。数据包含当前服务器状态的信息,例如在线/离线、在线玩家数量等。
安装
配置文件
useSecurityKey: false securityKey: '12345' callUrl: 'http://www.example.com/path/to/file/getServerStatus.php' connection-timeout: -1 ignore-list: 'player1,player2,player3' refresh-rate: -1
- 在首次启动带有此插件的服务器时,插件会创建 ServerStatus 文件夹和配置文件。然后,您需要在配置中设置数据并重启服务器。
- 在 config.yml 配置文件中,您可以设置 useSecurityKey(true 或 false)、您的安全密钥以及指向 .PHP 文件的完整路径(地址)。
- 安全密钥可以是任何您想要的表达式,只需在此 config.yml 文件和 .PHP 文件中设置即可。密钥将由插件通过 GET 请求头发送,.PHP 文件将检查其是否匹配。
- 接下来,您可以设置连接超时时间。这意味着插件连接到 .PHP 文件所允许的最长时间。(单位为毫秒)
(设置为 -1 使用默认超时) - 还有一个忽略列表。忽略列表中的玩家将被排除在计数和玩家列表之外(插件不会将他们发送到 .PHP 文件)。
- 最后,您可以将刷新率设置为若干秒。这意味着插件将每隔 x 秒发送最新信息。
(设置为 -1 以禁用周期性调用)
.PHP 文件
- 文件代码和下载链接:点击此处。
- 该 .PHP 文件仅包含一个简单的脚本,用于从 GET 请求头读取数据并将其写入 .TXT 文件。您需要设置安全密钥,如果您是一位优秀的 PHP 程序员,您还可以将代码重写为您想要的任何形式(例如,将数据写入 .HTML 文件或 MySQL 数据库等)。
- 您可以选择是显示 banner.png 还是某个包含服务器状态的 TXT 文件。
Banner 效果如下:
GET 请求头列表
- sec - 安全密钥
- status - 服务器状态,可以为 Online(在线)或 Offline(离线)
- name - 服务器名称,从 server-properties 文件加载
- motd - 服务器的每日消息(Message of the Day),来自 server-properties 文件
- ip - 服务器的 IP 地址,从 server-properties 文件加载
- port - 位于 IP 地址之后的服务器端口,从 server-properties 文件加载
- plsnum - 在线玩家数量
- maxnum - 最大玩家数量,从 server-properties 文件加载
- players - 在线玩家列表
- log - 调用该 URL 的原因(可以是“正在启动 Minecraft 服务器”、“正在停止 Minecraft 服务器”、“玩家 (name) 加入了游戏”、“玩家 (name) 离开了游戏”)
- plversion - 包含此插件的版本号
- bkversion - 包含所使用的 Bukkit 版本的版本号
server.properties
- 别忘了在服务器的 server.properties 文件中设置正确的信息(server-ip、server-port、server-name、max-players)!
命令与权限
- serverstatus.reload - 允许你使用 /serverstatus 命令,该命令会重新加载配置
- serverstatus.ignore - 拥有此权限的玩家将不被计入和列出
更新日志
v1.6
- 添加了将刷新率设置为 -1 以禁用周期性调用,或设置为任意秒数的选项
- 添加了将连接超时设置为 -1 以使用默认超时,或设置为任意毫秒数的选项
- (这次不是开玩笑,java.lang.NullPointerException 错误真的被修复了!:))
v1.5.3
- 真正修复了 java.lang.NullPointerException 错误 ;)
v1.5.2
- 修复了 java.lang.NullPointerException 错误
v1.5.1
- 修复了 StringIndexOutOfBoundsException 错误——当服务器上没有人且尝试截取空字符串时抛出此异常
- 修复了“离线”和“在线”状态的发送问题
- 添加了与 MCStats.org 的合作支持
v1.5
- 针对最新 CB 的更新
- 完全重写了代码
- 添加了刷新率功能
- 添加了用于获取 bukkit 版本和插件版本的新的 GET 请求
v1.4
- 添加了忽略列表(列表中的玩家将不被计入和列出)
- 添加了忽略权限
- 添加了可配置的连接超时时间(单位为秒)
v1.3
- 修复了插件与 PHP 文件通信的问题。
- 修复了权限相关的问题。
v1.2
- 新增:从 server.properties 获取 MOTD。
- 新增:用于重新加载配置的命令。
- 修复了获取玩家名称时的 bug。
v1.1
- 新增:如果在 server.properties 中未指定服务器的 IP 地址,插件将获取本地机器的 IP 地址。
- 针对 CB 1.3.1-R2.0 的更新
v1.0
- ServerStatus 的第一个版本。
待办事项
设置秒为单位的连接超时时间设置忽略不计入和列出的玩家。提供通过 PHP 代码创建图像横幅的选项从 server.properties 文件获取 MOTD重载配置的命令从本地机器而非 server.properties 获取 IP 地址。
你喜欢我的插件吗?
ServerStatus
Current version
- Actual version is v1.6 intended for newest Craftbukkit versions.
Basic information
- This plugin sends data to custom .PHP file on your website using GET headers. The data is information about current server status, e.g. Online/Offline, number of online players etc.
Installation
Configuration file
useSecurityKey: false securityKey: '12345' callUrl: 'http://www.example.com/path/to/file/getServerStatus.php' connection-timeout: -1 ignore-list: 'player1,player2,player3' refresh-rate: -1
- On the first start of server with this plugin the plugin creates folder ServerStatus and the configuration file. Then you have set data in config and restart the server.
- In configuration file config.yml you can set useSecurityKey (true or false), your security key and full path (adress) to the .PHP file.
- Security key can be any expession you want, you will need to set it only in this config.yml file and then in .PHP file. Key will be sent by plugin in GET header, and the .PHP file will check if it is equal.
- Then you can set connection timeout. It means how long time give you to plugin to connect to .PHP file. (in milliseconds)
(set -1 for default timeout) - And there is a ignore list. Players in ignore list will be ignored from counting and listing players (plugin won't send them to .PHP file).
- Finally you can set refresh-rate to some number of seconds. It means that the plugin will send newest information every x seconds.
(set -1 for disabling periodic call)
.PHP file
- File code and download link: click here.
- In this .PHP file is only easy script to read data from GET headers and to write it into .TXT file. You have to set the security key and if you are good .PHP programmer, you would be able to rewrite the code to whatever you want (e.g. write data to .HTML files, to MySQL database,...).
- You can choose, if you want to have banner.png or some TXT file with server status.
Banner will look like this:
List of GET headers
- sec - The security key
- status - Status of the server, can be Online or Offline
- name - Name of the server, loaded from server-properties file
- motd - Server's message of the day from server-properties file
- ip - IP adress of the server, loaded from server-properties file
- port - Port of server behind the IP adress, loaded from server-properties file
- plsnum - Number of online players
- maxnum - Maximum number of players, loaded from server-properties file
- players - List of online players
- log - Reason why was the URL called (It can be "Starting up Minecraft server", "Stopping Minecraft server", "Player (name) has joined the game", "Player (name) has left the game")
- plversion - Contains version number of this plugin
- bkversion - Contains version number of used Bukkit version
server.properties
- Don't forget to set correct information (server-ip, server-port, server-name, max-players) in server's file server.properties!
Commands & Permissions
- serverstatus.reload - Allows you to use /serverstatus command, which reloads the config
- serverstatus.ignore - Player with this permission will be ignored from counting and listing players
Changelog
v1.6
- Added option to set refresh-rate to -1 for disabling periodic call or set it to any time in seconds
- Added option to set connection-timeout to -1 for default timeout or set it to any time in milliseconds
- (and no kidding, now is the java.lang.NullPointerException error really fixed! :))
v1.5.3
- Really fixed java.lang.NullPointerException error ;)
v1.5.2
- Fixed java.lang.NullPointerException error
v1.5.1
- Fixed StringIndexOutOfBoundsException - was thrown when noone was on the server and it tried to substring empty string
- Fixed sending of "Offline" and "Online" status
- Added co-op with MCStats.org
v1.5
- Update for newest CB
- Completely rewrited code
- Added refresh rate
- Added new GETs for bukkit version and for plugin version
v1.4
- Added ignore list (players on this list will be ignored from counting and listing)
- Added ignore permission
- Added configurable connection timeout (in seconds)
v1.3
- Fixed problem with communication of plugin and PHP file.
- Fixed problem with permissions.
v1.2
- Added: Obtaining MOTD from server.properties.
- Added: Command for reload config.
- Fixed bug with obtaining player names.
v1.1
- Added: If you don't specify server's IP address in server.properties, plugin will get the IP address of local machine.
- Update for CB 1.3.1-R2.0
v1.0
- First version of ServerStatus.
To do
Set connection timeout in secondsSetting players to be ignored from counting and listing.Option that you can choose to create image banner by .PHP codeObtaining the MOTD from server.properties fileCommand to reload configGetting IP adress from local machine, not from server.properties.
Do you like my plugins?
版本游戏版本平台发布时间本站下载
正式版
ServerStatus v1.6
1.6.21.6.1 13 年前 ·
0
1.6.2
1.6.1
下载 ServerStatus
正式版
ServerStatus v1.5.3
1.5.1 13 年前 ·
0
1.5.1
下载 ServerStatus
正式版
ServerStatus v1.5.2
1.4.7 13 年前 ·
0
1.4.7
下载 ServerStatus
正式版
ServerStatus v1.5.1
1.4.7 13 年前 ·
0
1.4.7
下载 ServerStatus
正式版
ServerStatus v1.5
1.4.7 13 年前 ·
0
1.4.7
下载 ServerStatus
正式版
ServerStatus v1.4
14 年前 ·
0
下载 ServerStatus
正式版
ServerStatus v1.3
14 年前 ·
0
下载 ServerStatus
正式版
ServerStatus v1.2
14 年前 ·
0
下载 ServerStatus
正式版
ServerStatus v1.1
14 年前 ·
0
下载 ServerStatus
正式版
ServerStatus v1.0
14 年前 ·
0
下载 ServerStatus
ServerStatus v1.6
正式版
2013-07-20
- 添加了将刷新率设置为 -1 以禁用周期性调用,或设置为任意秒数的选项
- 添加了将连接超时设置为 -1 以使用默认超时,或设置为任意毫秒数的选项
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
数据包事件PacketEvents
retrooper
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
前置科技
46
插件
ExyliaLib
ExyliaServices
ExyliaPlugins 的库。
前置实用
26
插件
ProAuthMeLogin
3623813757
通过对话框或铁砧界面帮助你的 Anthme
实用
16
插件
Vessel
muhdfdeen
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
生物存储
13
插件
Vivecraft Spigot Extension
fayer3
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
前置实用
12
插件
旅行地图
mysticdrew
用于绘制游戏内地图或在浏览器中随探索实时进行地图绘制的实时地图。
冒险实用
12
评论 0
登录后参与评分
还没有评论,来抢沙发吧