private void invalidate() {
        this.valid = false;
        this.invalidated = true;

        MetadataMap metadataMap = Metadata.provideForPlayer(this.player);
        Gui existing = metadataMap.getOrNull(OPEN_GUI_KEY);
        if (existing == this) {
            metadataMap.remove(OPEN_GUI_KEY);
        }

        // stop listening
        this.compositeTerminable.closeAndReportException();

        // clear all items from the GUI, just in case the menu didn't close properly.
        clearItems();
    }
Gets the initial title which was set when this GUI was made

@return the initial title used when this GUI was made
helper/src/main/java/me/lucko/helper/menu/Gui.java