getKeyName

@Contract(pure = true)
public String getKeyName()

The name of the key by itself

For example: If the key is "net.minecraft.gameplay.gamemode" this would return "gamemode"