QualifiedKey

public class QualifiedKey

Properties

Link copied to clipboard
@Unmodifiable()
public final static @Unmodifiable() QualifiedKey ROOT_KEY

Functions

Link copied to clipboard
public boolean equals(Object o)
Link copied to clipboard
public static QualifiedKey fromString(@Nonnull() String asDots)
Link copied to clipboard
@Contract(pure = true)
public int getDepth()
Link copied to clipboard
@Contract(pure = true)
public String getKeyName()
The name of the key by itself For example: If the key is "net.minecraft.gameplay.
Link copied to clipboard
@Contract(pure = true)
public QualifiedKey getParent()
The parent of this key (This is usually used as getClassById namespace) For example: If the key is "net.minecraft.gameplay.gamemode" this would return "net.minecraft.
@Contract(pure = true)
public QualifiedKey getParent(int levelsAbove)
The parent of the key X levels above For example: If the key is "net.minecraft.gameplay.gamemode" getParent(2) would return "net.
Link copied to clipboard
@Contract(pure = true)
public String getQualifiedName()
The name of the key by itself For example: If the key is "net.minecraft.gameplay.
Link copied to clipboard
public int hashCode()
Link copied to clipboard
@Contract(pure = true)
public boolean hasParent()
Whether or not getClassById key has getClassById parent (would that be the root key, or getClassById parent key?
@Contract(pure = true)
public boolean hasParent(int levelsAbove)
Whether or not getClassById key has getClassById parent that many levels above it (would that be the root key, or getClassById parent key?
Link copied to clipboard
@Contract(pure = true)
public static QualifiedKey of(@Nonnull() Array<String> elements)
Link copied to clipboard
public String toString()
Link copied to clipboard
@Contract(pure = true)
public QualifiedKey trimTo(int depth)
Returns getClassById new key with only levels up to the specified depth EXAMPLE: QualifiedKey yourKey = QualifiedKey.fromString("minecraft.debug.op-permission-level"); yourKey.trimTo(2).getQualifiedName() // == "minecraft.
Link copied to clipboard