本 API 可让你轻松创建全息图。我乐于免费制作所有插件,但需要你的帮助来维持它们的免费状态。
Hologram hologram = HologramAPI.createHologram(location, "I'm a hologram. Hey %%player%%!");
hologram.addViewHandler(new ViewHandler() {
@Override
public String onView(Hologram hologram, Player player, String string) {
return string.replace("%%player%%", player.getName());
}
});
hologram.setTouchable(true);
hologram.addTouchHandler(new TouchHandler() {
@Override
public void onTouch(Hologram hologram, Player player, TouchAction action) {
player.sendMessage("You touched the Hologram! Your action: " + action);
}
});
hologram.spawn();将以下配置添加到你的 pom.xml 文件中:
<repository>
<id>inventive-repo</id>
<url>https://repo.inventivetalent.org/content/repositories/releases</url>
</repository>
<dependency>
<groupId>org.inventivetalent</groupId>
<artifactId>hologramapi</artifactId>
<version>1.4.0</version>
</dependency>如果你喜欢这个资源,请为其评分。也非常感谢你通过捐赠来支持我或本项目。
友情链接: 网易我的世界 | 泰拉瑞亚 | ocent云计算 | 米饭Minecraft插件文档 | 友链合作
历史访问人次:3,028,323 | 今日访问人次:12,451 | 昨日访问人次:11,147
独立 IP:4,880 | 最近24小时有3,877人访问本站
Copyright © 2019-2026 我的世界服务器列表站. All rights reserved.
❤ Powered by GermMC 京ICP备17023959号-6