All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minestom.server.permission.PermissionVerifier Maven / Gradle / Ivy

There is a newer version: 7320437640
Show newest version
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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy