Fabric Server API
一个面向 Fabric 的服务端 API,旨在大幅简化服务端模组的开发。 我们的目标是将 Fabric 服务端模组打造为更加稳定且愉快的体验。
热键菜单
- 默认绑定 Shift+F
- 默认禁用
- 请通过 ServerAPI 的配置文件启用
目前的热键菜单仅允许用户传送回出生点。未来它将支持更多功能,包括其他服务端模组的配置界面、替代类型的 TPA(玩家间传送)、交易、决斗等。
要使用当前的“传送至出生点”功能,管理员必须首先通过右上角的“ADMIN”按钮在菜单中设置出生点。这需要玩家拥有 OP 权限,或具备 serverapi.admin 权限。
预计在未来几个月内,热键菜单系统将增加更多功能(希望如此)。
事件
- PlayerEvents.JUMP
- 针对所有 ServerPlayerEntity 的可取消跳跃事件
- PlayerEvents.SNEAK
- 针对所有 ServerPlayerEntity 的可取消潜行事件
- PlayerEvents.BLOCK_BREAK
- 当玩家破坏方块时触发的可取消事件
ServerUtils
一个实用工具类,包含一系列静态方法供你使用!
Block getBlockByTag(Identifier);ItemStack getHeadFromRaw(String rawId);void setStackModelData(ItemStack, int); // 适用于资源包void setStackLore(ItemStack, List<MutableText>);MutableText getText(String, Formatting...);
ServerAPI
这是访问……或者至少是未来计划中的主要 API。目前仅限有限使用!
ServerPlayerEntity getPlayerByUUID(UUID, MinecraftServer);ServerAPI.Logger- 提供带有颜色属性的字符串,用于向日志控制台输出彩色文本。由于可能被滥用,未来版本可能会通过配置选项默认禁用此功能?
String Success(String); // 绿色String Warning(String); // 黄色String Error(String); // 红色String Debug (String); // 青色
未来目标 - 更远期规划
- 一个 "ServerPlayer" 类,将抽象处理与服务端 Fabric 模组交互时涉及玩家类的许多“复杂”操作。
- 更多的自定义事件。
- 更简便的配置文件管理方式,方便你的服务端模组使用!
- 轻松读取/写入离线玩家数据。
- 为你的服务端模组提供 GUI 配置管理功能。
注意: “瓶子”及其相关概念已被废弃。抱歉让大家期待落空了!
Fabric Server API
A server api for Fabric aiming to simplify server-side mods significantly. With big goals of make server-sided fabric a much more stable and enjoyable experience.
Hotkey Menu
- Currently bound to Shift+F
- DISABLED by default
- Enable via the config file for ServerAPI
The hotkey menu currently just allows users to teleport to spawn. In the future it will allow MUCH more including configuration screens for other server-side mods, alternative type of TPA, trading, dueling, and many others.
To use the current "teleport to spawn" feature, admins must first set spawn in the menu via the "ADMIN" button on the top-right of it. This will require either the player be an OP, or that they have the serverapi.admin permission.
More features for the Hotkey Menu system in the coming months(hopefully).
Events
- PlayerEvents.JUMP
- A cancelable jump event for all ServerPlayerEntity
- PlayerEvents.SNEAK
- A cancelable sneak event for all ServerPlayerEntity
- PlayerEvents.BLOCK_BREAK
- A cancelable event for when a player breaks a block
ServerUtils
A utility class featuring a array of static methods for you to use!
Block getBlockByTag(Identifier);ItemStack getHeadFromRaw(String rawId);void setStackModelData(ItemStack, int); // For resource packsvoid setStackLore(ItemStack, List<MutableText>);MutableText getText(String, Formatting...);
ServerAPI
The "main" API to access... or at least thats the goal for the future. Limited use for now!
ServerPlayerEntity getPlayerByUUID(UUID, MinecraftServer);ServerAPI.Logger- Gives a string infused with color attributes for you to log colored text to the console. Abusable so may be disabled by default in future versions via a config option?
String Success(String); // green colorString Warning(String); // yellow colorString Error(String); // Red colorString Debug (String); // cyan color
Future Goals - Further Out
- A "ServerPlayer" class that would abstract a lot of the more "complex" things about dealing with server-sided fabric mods that interact directly with the Player class.
- A lot more events.
- Easier configuration file management for YOUR server-side mods!
- Easily read/write from offline players.
- GUI configuration management for your server-side mods.
Notice: Bottles and all of its relations have been scrapped as a concept. Sorry for the hype!
下载 Server API
下载 Server API
下载 Server API
下载 Server API
下载 Server API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Server API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Server API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Server API
下载 Server API
下载 Server API
- 更新到 1.21.1
- 移除了对 Polymer 和 STA 的依赖
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
评论 0
登录后参与评分
还没有评论,来抢沙发吧