net.minestom.server.permission.PermissionVerifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of minestom-snapshots Show documentation
Show all versions of minestom-snapshots Show documentation
1.20.4 Lightweight Minecraft server
package net.minestom.server.permission;
import net.kyori.adventure.nbt.CompoundBinaryTag;
import org.jetbrains.annotations.Nullable;
/**
* Interface used to check if the {@link CompoundBinaryTag 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 CompoundBinaryTag nbtCompound);
}