Minestom/src/main/java/net/minestom/server/permission/PermissionVerifier.java
2020-12-10 02:56:56 +01:00

21 lines
688 B
Java

package net.minestom.server.permission;
import org.jetbrains.annotations.Nullable;
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
/**
* Interface used to check if the {@link NBTCompound nbt data} of a {@link Permission} is correct.
*/
@FunctionalInterface
public interface PermissionVerifier {
/**
* Called when using {@link PermissionHandler#hasPermission(String, PermissionVerifier)}.
*
* @param nbtCompound the data of the permission, can be null if not any
* @return true if {@link PermissionHandler#hasPermission(String, PermissionVerifier)}
* should return true, false otherwise
*/
boolean isValid(@Nullable NBTCompound nbtCompound);
}