// Plugin: Add Resume to Main Menu
(() => {
  const alias = Scene_Menu.prototype.createCommandWindow;
  Scene_Menu.prototype.createCommandWindow = function() {
    alias.call(this);
    this._commandWindow.setHandler("resume", this.commandResume.bind(this));
  };

  const aliasMakeCommandList = Window_MenuCommand.prototype.makeCommandList;
  Window_MenuCommand.prototype.makeCommandList = function() {
    aliasMakeCommandList.call(this);
    this.addCommand("Resume", "resume");
  };

  Scene_Menu.prototype.commandResume = function() {
    SceneManager.pop(); // Closes menu
  };
})();