BarAPI

服务器管理员
该插件本身并无实际功能。它仅为其他插件提供接口以实现相关功能。
开发者
只需将 BarAPI.jar 添加到项目的构建路径中即可。
该插件使用了反射机制,因此“不会”因 CraftBukkit 的更新而失效。
限制说明
消息长度不能超过 64 个字符。如果超出,BarAPI 会自动将其截断为 64 个字符,以防止客户端崩溃。
这是客户端的限制,无法更改。
示例
BarAPI.setMessage(Player player, String message)
为玩家设置一条消息。该消息会一直显示,直到玩家下线或被其他插件覆盖。
BarAPI.setMessage(Player player, String message, float percent)
与上述方法相同,但您可以设置血条的百分比。100 表示显示完整血条,50 表示显示一半血条,依此类推。
BarAPI.setMessage(final Player player, String message, int seconds)
为玩家设置一条带有计时器的消息。该消息会持续显示直到计时结束。血条会根据计时器的时长自动减少。
BarAPI.hasBar(Player player)
顾名思义,返回一个布尔值。
BarAPI.removeBar(Player player)
同样顾名思义。
BarAPI.setHealth(Player player, float percent)
允许您修改现有血条的健康值(百分比)。如果玩家没有血条,则此操作无效。
教程
德语 - DerFeliix
源代码
GitHub
Maven
<repositories>
<repository>
<id>confuser-repo</id>
<url></url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>me.confuser</groupId>
<artifactId>BarAPI</artifactId>
<version>3.0</version>
</dependency>
</dependencies>
开发版本
这些版本未经 BukkitDev 工作人员审核,因此请自行承担责任使用。
Frostcast CI
更新器
该插件包含一个默认启用的自动更新器。如果您不希望自动下载新更新,请编辑 BarAPI/config.yml 并将 autoUpdate 设置为 false。
待办事项
使用 BarAPI 的插件
WelcomeBar
Parkour
QuickSupport
BossBroadcast
BossMessage
PvPGames Automated
BossEventScheduler
Infernal Mobs
MythicMobs
MultiKill
PlayerBoss
BossAds
Item Lore Stats
BossBarPro
VIPLobby
Battle Of Blocks
BossBroadcaster
SilkSpawners
BarJoin
JoinGlobalMessages
指标统计
为了确定 BarAPI 的流行度和使用情况,插件安装量会通过 Metrics 插件跟踪系统进行自动追踪。收集的信息包括您的 Java 版本、操作系统、玩家数量、服务器所在国家以及插件和服务器的版本。这些数据用于确定哪些环境正在使用该插件,以确保完全兼容。此收集过程是匿名的。如果您不想参与此项追踪,请编辑 plugins/PluginMetrics/config.yml 并将 opt-out 设置为 true。

BarAPI

Server Owners
This plugin does nothing on its own. It is simply an API for other plugins to implement with.
Developers
Simply add BarAPI.jar to your project build path.
This plugin makes use of reflection and therefore "shouldn't" break on craftbukkit updates.
Limitations
The message can not be more than 64 characters. If it is more, BarAPI will automatically cut it to 64 characters to prevent the client from crashing.
This is a client limitation and cannot be changed.
Examples
BarAPI.setMessage(Player player, String message)
Set a message for the player. It will remain there until the player logs off or another plugin overrides it.
BarAPI.setMessage(Player player, String message, float percent)
Same as above except you can set the % of the health bar. 100 shows the entire health bar, 50 shows half the health bar and so on.
BarAPI.setMessage(final Player player, String message, int seconds)
Sets a timed message for the player. It will remain until the timer runs out. The health automatically reduces based on how long the timer is.
BarAPI.hasBar(Player player)
Pretty self explanatory, returns a boolean.
BarAPI.removeBar(Player player)
Also pretty self explanatory.
BarAPI.setHealth(Player player, float percent)
Allows you to modify the health of an existing bar. If the player has no bar, this does nothing.
Tutorials
German - DerFeliix
Source
GitHub
Maven
<repositories>
<repository>
<id>confuser-repo</id>
<url></url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>me.confuser</groupId>
<artifactId>BarAPI</artifactId>
<version>3.0</version>
</dependency>
</dependencies>
Developer Builds
These builds have not been approved by BukkitDev staff, therefore, use at your own risk.
Frostcast CI
Updater
This plugin contains an auto updater which is enabled by default. If you do not wish to automatically download new updates, edit BarAPI/config.yml and set autoUpdate to false.
To Dos
- Scroll messages if string is greater than 64 characters.
Plugins Using BarAPI
WelcomeBar
Parkour
QuickSupport
BossBroadcast
BossMessage
PvPGames Automated
BossEventScheduler
Infernal Mobs
MythicMobs
MultiKill
PlayerBoss
BossAds
Item Lore Stats
BossBarPro
VIPLobby
Battle Of Blocks
BossBroadcaster
SilkSpawners
BarJoin
JoinGlobalMessages
Metrics
To determine popularity and usage of BarAPI, plugin installs are automatically tracked by the Metrics plugin tracking system. Your Java version, OS, player count, server country location and plugin & server versions are collected. This is used to determine what environments are using the plugin to ensure full compatibility. This collection is anonymous. If you don't want this tracking, edit plugins/PluginMetrics/config.yml and set opt-out to true.

评论 0
登录后参与评分
还没有评论,来抢沙发吧