Interface IAbilityManager
- All Superinterfaces:
IDataManager<IAbilityData>,Map<net.minecraft.resources.ResourceLocation,IAbilityData>
Provides and manages the data for all abilities and some helper methods.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionList<net.minecraft.resources.ResourceLocation>getAbilitiesForAffinity(IAffinity affinity) List<net.minecraft.resources.ResourceLocation>getAbilitiesForAffinity(net.minecraft.resources.ResourceLocation affinity) List<net.minecraft.resources.ResourceLocation>getAbilitiesForPlayer(net.minecraft.world.entity.player.Player player) booleanhasAbility(net.minecraft.world.entity.player.Player player, net.minecraft.resources.ResourceLocation ability) Methods inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.util.IDataManager
get, getNullable, getOptionalMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
getAbilitiesForPlayer
List<net.minecraft.resources.ResourceLocation> getAbilitiesForPlayer(net.minecraft.world.entity.player.Player player) - Parameters:
player- The player to check.- Returns:
- The abilities the given player currently has.
-
getAbilitiesForAffinity
- Parameters:
affinity- The affinity to check.- Returns:
- All abilities for the given affinity.
-
getAbilitiesForAffinity
List<net.minecraft.resources.ResourceLocation> getAbilitiesForAffinity(net.minecraft.resources.ResourceLocation affinity) - Parameters:
affinity- The id of the affinity to check.- Returns:
- All abilities for the given affinity.
-
hasAbility
boolean hasAbility(net.minecraft.world.entity.player.Player player, net.minecraft.resources.ResourceLocation ability) - Parameters:
player- The player to check.ability- The ability to check.- Returns:
- Whether the player has the ability.
-