介绍
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 packs` - `
void 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 color` - `
String Warning(String); // yellow color` - `
String Error(String); // Red color` - `
String 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 支持哪些 Minecraft 版本?
Server API 支持 Minecraft Java 版 1.18.2–1.21.1,共 9 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
Server API 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
AuxAtlas 的其他作品
查看全部 →
Green Cuts
No more deforestation on SMP!
JumpVader (Polymer)
A server-side-only elevator mod for FabricMC using Polymer library
Vanillify Library
A server-side library that allows creation of other server-side-only mods/items
Wanda
A server-side point selection wand API
评论
登录后评论和评分