Package xaero.pac.common.server.api
Class OpenPACServerAPI
java.lang.Object
xaero.pac.common.server.api.OpenPACServerAPI
This is the main server-side API access point. You can get the instance with
get(MinecraftServer)
.
For functionality that requires registering handlers/listeners, it is often required or recommended to do so during the OPACServerAddonRegister.EVENT on Fabric or the OPACServerAddonRegisterEvent on Forge.
Additionally, to access some data attached to online server players,
use ServerPlayerDataAPI.from(ServerPlayer)
. You probably won't need that though.
-
Constructor Summary
ConstructorsConstructorDescriptionOpenPACServerAPI
(xaero.pac.common.server.IServerDataAPI serverData) Constructor for internal usage. -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenPACServerAPI
get
(net.minecraft.server.MinecraftServer server) Gets the server-side Open Parties and Claims API instance.Gets the API for the server-side adaptive text localizer that lets you create translated text components that are readable even by players that don't have the mod installed.Gets the API for the chunk protection with some basic methods you can use.Gets the API for the server-side player party manager.Gets the API for the server-side player config manager.Gets the API for the server-side claims manager.
-
Constructor Details
-
OpenPACServerAPI
public OpenPACServerAPI(xaero.pac.common.server.IServerDataAPI serverData) Constructor for internal usage.- Parameters:
serverData
- the server data
-
-
Method Details
-
getPartyManager
Gets the API for the server-side player party manager.- Returns:
- instance of the server-side player party manager API, not null
-
getServerClaimsManager
Gets the API for the server-side claims manager.- Returns:
- instance of the server-side claims manager API, not null
-
getPlayerConfigs
Gets the API for the server-side player config manager.- Returns:
- instance of the server-side player config manager API, not null
-
getAdaptiveTextLocalizer
Gets the API for the server-side adaptive text localizer that lets you create translated text components that are readable even by players that don't have the mod installed.- Returns:
- the adaptive text localizer API, not null
-
getChunkProtection
Gets the API for the chunk protection with some basic methods you can use.- Returns:
- the chunk protection API
-
get
Gets the server-side Open Parties and Claims API instance.- Parameters:
server
- the server instance, not null- Returns:
- instance of the server-side API, not null
-