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
源代码
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 工作人员审核,因此请自行承担责任使用。
更新器
该插件包含一个默认启用的自动更新器。如果您不希望自动下载新更新,请编辑 BarAPI/config.yml 并将 autoUpdate 设置为 false。
待办事项
- 如果字符串超过 64 个字符,则滚动显示消息。
使用 BarAPI 的插件
指标统计
为了确定 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
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.
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
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.

下载 BarAPI
下载 BarAPI
下载 BarAPI
下载 BarAPI
下载 BarAPI
下载 BarAPI
下载 BarAPI
下载 BarAPI
- 新增 Spigot 1.10+ 支持
- 弃用所有方法。本插件仅用于向后兼容,请迁移至 Bukkit 的新 BossBar 方法。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
ExyliaPlugins 的库。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
插件
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
插件
SkyBlock、OneBlock、Boxed、SkyGrid、AcidIsland、CaveBlock、Poseidon、StrangerRealms——以及更多!这些只是由 BentoBox 支持的基于岛屿的游戏模式之一。来自原版 ASkyBlock 的作者。
插件
一个强大的 API,用于为你的 Minecraft 服务器创建自定义进度。
评论 0
登录后参与评分
还没有评论,来抢沙发吧