check for version of fabric permission api

This commit is contained in:
Flemmli97 2022-09-12 15:52:04 +02:00
parent f77401ea83
commit 34e08374e9
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Flan 1.8.1.1
================
- Check for version of fabric permission api
Flan 1.8.1 Flan 1.8.1
================ ================
- Relocating shaded libs. Should solve some lib problems. - Relocating shaded libs. Should solve some lib problems.

View File

@ -55,7 +55,9 @@ public class FlanFabric implements ModInitializer {
ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> PlayerEvents.onLogout(handler.player)); ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> PlayerEvents.onLogout(handler.player));
CommandRegistrationCallback.EVENT.register((dispatcher, reg, env) -> CommandClaim.register(dispatcher, env == Commands.CommandSelection.DEDICATED)); CommandRegistrationCallback.EVENT.register((dispatcher, reg, env) -> CommandClaim.register(dispatcher, env == Commands.CommandSelection.DEDICATED));
Flan.permissionAPI = FabricLoader.getInstance().isModLoaded("fabric-permissions-api-v0"); Flan.permissionAPI = FabricLoader.getInstance()
.getModContainer("fabric-permissions-api-v0")
.map(c -> c.getMetadata().getVersion().getFriendlyString().equals("0.2-SNAPSHOT")).orElse(false);
Flan.gunpowder = FabricLoader.getInstance().isModLoaded("gunpowder-currency"); Flan.gunpowder = FabricLoader.getInstance().isModLoaded("gunpowder-currency");
Flan.playerAbilityLib = FabricLoader.getInstance().isModLoaded("playerabilitylib"); Flan.playerAbilityLib = FabricLoader.getInstance().isModLoaded("playerabilitylib");
Flan.ftbRanks = FabricLoader.getInstance().isModLoaded("ftbranks"); Flan.ftbRanks = FabricLoader.getInstance().isModLoaded("ftbranks");

View File

@ -8,7 +8,7 @@ forge_version=1.19-41.1.0
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
loader_version=0.14.8 loader_version=0.14.8
# Mod Properties # Mod Properties
mod_version=1.8.1 mod_version=1.8.1.1
maven_group=io.github.flemmli97 maven_group=io.github.flemmli97
archives_base_name=flan archives_base_name=flan