Moreeee stuff

This commit is contained in:
Luck committed 2019-11-09 22:50:10 +00:00
1 parent 287c0f7f7a
commit c836cce59b
23 files changed
+46 -63

No files matched your search

@@ -124,19 +124,19 @@ public interface PermissionHolder {
@NonNull CachedDataManager getCachedData();
/**
* Gets the {@link Data} of a particular type.
* Gets the {@link NodeMap} of a particular type.
*
* @param dataType the data type
* @return the data
*/
Data getData(@NonNull DataType dataType);
NodeMap getData(@NonNull DataType dataType);
/**
* Gets the holders {@link DataType#NORMAL} data.
*
* @return the normal data
*/
@NonNull Data data();
@NonNull NodeMap data();
/**
* Gets the holders {@link DataType#TRANSIENT} data.
@@ -154,7 +154,7 @@ public interface PermissionHolder {
*
* @return the transient data
*/
@NonNull Data transientData();
@NonNull NodeMap transientData();
/**
* Encapsulates a store of data ({@link Node}s) within a {@link PermissionHolder}.
@@ -170,7 +170,7 @@ public interface PermissionHolder {
* made already. This can be done via {@link UserManager#loadUser(UUID)} or
* {@link GroupManager#loadGroup(String)} respectively.</p>
*/
interface Data {
interface NodeMap {
/**
* Gets a map of the {@link Node}s contained within this instance,
@@ -25,17 +25,18 @@
package net.luckperms.api.model;
import net.luckperms.api.model.PermissionHolder.NodeMap;
import net.luckperms.api.node.Node;
/**
* Controls how the implementation should behave when new temporary nodes are set
* that would otherwise conflict with existing entries.
*
* <p>The default behaviour of {@link PermissionHolder.Data#add(Node)} is
* <p>The default behaviour of {@link NodeMap#add(Node)} is
* to return a result of {@link DataMutateResult#ALREADY_HAS} when an equivalent
* node is found. This can be replicated using {@link #FAIL_WITH_ALREADY_HAS}.</p>
*
* <p>However, the {@link PermissionHolder.Data#add(Node, TemporaryMergeBehaviour)}
* <p>However, the {@link NodeMap#add(Node, TemporaryMergeBehaviour)}
* method allows this behaviour to be customized for temporary permissions.</p>
*/
public enum TemporaryMergeBehaviour {