Interface CachedDataManager
PermissionHolder.
All calls will account for inheritance, as well as any default data provided by the platform. These calls are heavily cached and are therefore fast.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceCachedDataManager.Container<T extends CachedData>Manages a specific type ofcached datawithin aCachedDataManagerinstance. -
Method Summary
Modifier and TypeMethodDescriptionGets MetaData from the cache, using the most appropriate query options available at the time.getMetaData(@NonNull QueryOptions queryOptions) Gets MetaData from the cache, using the given query options.Gets PermissionData from the cache, using the most appropriate query options available at the time.getPermissionData(@NonNull QueryOptions queryOptions) Gets PermissionData from the cache, using the given query options.voidInvalidates all cachedCachedPermissionDataandCachedMetaDatainstances.voidInvalidates all underlying permission calculators.metaData()Gets the manager forCachedMetaData.Gets the manager forCachedPermissionData.
-
Method Details
-
permissionData
@NonNull CachedDataManager.Container<CachedPermissionData> permissionData()Gets the manager forCachedPermissionData.- Returns:
- the permission data manager
-
metaData
@NonNull CachedDataManager.Container<CachedMetaData> metaData()Gets the manager forCachedMetaData.- Returns:
- the meta data manager
-
getPermissionData
Gets PermissionData from the cache, using the given query options.- Parameters:
queryOptions- the query options- Returns:
- a permission data instance
-
getMetaData
Gets MetaData from the cache, using the given query options.- Parameters:
queryOptions- the query options- Returns:
- a meta data instance
-
getPermissionData
@NonNull CachedPermissionData getPermissionData()Gets PermissionData from the cache, using the most appropriate query options available at the time.For
Users, the most appropriate query options will be theircurrent active query optionsif the corresponding player is online, and otherwise, will fallback tothe current static query options.For
Groups, the most appropriate query options will always bethe current static query options.- Returns:
- a permission data instance
- Since:
- 5.1
-
getMetaData
@NonNull CachedMetaData getMetaData()Gets MetaData from the cache, using the most appropriate query options available at the time.For
Users, the most appropriate query options will be theircurrent active query optionsif the corresponding player is online, and otherwise, will fallback tothe current static query options.For
Groups, the most appropriate query options will always bethe current static query options.- Returns:
- a meta data instance
- Since:
- 5.1
- See Also:
-
invalidate
void invalidate()Invalidates all cachedCachedPermissionDataandCachedMetaDatainstances. -
invalidatePermissionCalculators
void invalidatePermissionCalculators()Invalidates all underlying permission calculators.Can be called to allow for an update in defaults.
-