Added comment about permission serialization

This commit is contained in:
Felix Cravic 2020-12-11 21:46:55 +01:00
parent 90102e1562
commit f092e6ebfd

View File

@ -2,11 +2,19 @@ package net.minestom.server.permission;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
import org.jglrxavpok.hephaistos.nbt.SNBTParser;
import java.util.Set;
/**
* Represents an object which can have permissions.
* <p>
* Permissions are in-memory only by default.
* You have however the capacity to store them persistently as the {@link Permission} object
* is serializer-friendly, {@link Permission#getPermissionName()} being a {@link String}
* and {@link Permission#getNBTData()} serializable into a string using {@link NBTCompound#toSNBT()}
* and deserialized back with {@link SNBTParser#parse()}.
*/
public interface PermissionHandler {