getParent

@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.gameplay" If the key is "minecraft" this would return ROOT_KEY


@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.minecraft"