package xyz.upperlevel.uppercore.arena;

import lombok.Getter;
import org.bukkit.entity.Player;

public class PhaseManager extends Phase {
    @Getter
    private Phase phase;

    public PhaseManager(String id) {
        super(id);
    }

    public void setPhase(Phase phase) {
        Phase old = this.phase;
        if (old != null) {
            old.onDisable(phase);
        }
        this.phase = phase;
        if (phase != null) {
            phase.setPhaseManager(this);
            phase.onEnable(old);
        }
    }

    @Override
    public boolean onJoin(Player player) {
        super.onJoin(player);
        if (phase != null) {
            return phase.onJoin(player);
        }
        return false;
    }

    @Override
    public boolean onQuit(Player player) {
        super.onQuit(player);
        if (phase != null) {
            return phase.onQuit(player);
        }
        return false;
    }
}

@@ -516,32 +516,272 @@
        %7D%0A    %7D%0A%0A
+    @Override%0A    public void onDisable(Phase next) %7B%0A        super.onDisable(next);%0A        if (phase != null) %7B%0A            phase.onDisable(null); // Disables also the phase that is currently enabled within this manager.%0A        %7D%0A    %7D%0A%0A
     @Override%0A  

Make PhaseManager also disable child phase