Server API

Server API

A Server-Sided Mod API For Fabric

by
3.7K Downloads
fabriclibraryutility
Rent Server with this Mod

About this Mod

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!

Available Versions

v1.0.10+1.21.1release
MC 1.21.1fabric
August 30, 2024
v1.0.10+mc1.20.1release
MC 1.20.1fabric
August 30, 2023
v1.0.8+mc1.20.1release
MC 1.20.1fabric
August 30, 2023
v1.0.7+mc1.20.1release
MC 1.20.1fabric
August 17, 2023
v1.0.10+mc1.19.2release
MC 1.19, 1.19.1, 1.19.2fabric
July 4, 2023

How to Install Server API on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.1).

3

Install Mod

Open the mod browser in the dashboard and search for "Server API". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.21.1, 1.20.1, 1.20 (+6 more)

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Server API server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.1). You can switch loaders with one click in the panel.

Is Server API compatible with fabric?

Server API officially supports fabric for Minecraft 1.21.1, 1.20.1, 1.20. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with Server API – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Server API consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install Server API with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
GNU Lesser General Public License v3.0 only
Server-side
Required

Supported Versions

1.21.11.20.11.201.19.41.19.31.19.21.19.11.191.18.2