Battle: How can I end an actor's turn

Hello again,

I think it applies generally to all situations where I want an actor's turn to end, but in this case I try to do it in Yanfly's Actor Switch plugin.

It allows you to switch an actor mid-battle (actor command menu), and then opens again the actor command menu from the changed actor, so he can still make an action. However, I want the turn to be over as soon as an actor was switched out!

This is the function in question:

Code:
Scene_Battle.prototype.postPartySwitch = function(index, swapOut, swapIn) {
  var cooldown = Yanfly.Param.PartySwitchCooldown;
  BattleManager.actor().setPartySwitchCooldown(cooldown)
  if (Imported.YEP_X_BattleSysATB && BattleManager.isATB()) {
    if (swapIn._atbSpeed === undefined) swapIn.onATBStart();
    swapIn._atbSpeed = swapOut._atbSpeed + BattleManager.atbTarget();
  }
  if (Imported.YEP_X_BattleSysCTB && BattleManager.isCTB()) {
    if (swapIn._ctbSpeed === undefined) swapIn.onCTBStart();
    swapIn._ctbSpeed = swapOut._ctbSpeed + BattleManager.ctbTarget();
  }
  if (Imported.YEP_RowFormation) {
    var subject = BattleManager._subject;
    BattleManager._subject = undefined;
    this.refreshRowPositions();
    BattleManager._subject = subject;
  }
  if (BattleManager.actor().isAutoBattle()) {
    BattleManager.actor().makeAutoBattleActions();
    this.selectNextCommand();
  } else if (BattleManager.actor().isConfused()) {
    BattleManager.actor().makeConfusionActions();
    this.selectNextCommand();
  } else {
    this._actorCommandWindow.setup(BattleManager.actor());
  }
};


I tried replacing everything in that function with this.selectNextCommand(); but nothing.

The only way that works is giving an actual action like

BattleManager.inputtingAction().setGuard();
or BattleManager.actor().makeConfusionActions();

But I just want the actor to do nothing!!! How can I do that...!?
What about making a skill that does absolutely nothing and make the actor execute that?
Thank you very much @Jules98, that did the trick! I don't see any issues with it now so I hope it stays that way. Nice idea!

Original thread: https://forums.rpgmakerweb.com/threads/battle-how-can-i-end-an-actors-turn.88691/