CLASS RESTRICTION [HELP]

Hello Guys,
I want to ask if there is a possible way to restrict class/sublaclass for learning or switching again?
in my project i have PRIMARY CLASS which is Swordsman and SUBCLASS is PALADIN and BLADER.
this is my situation.
if i learn PALADIN Subclass i want the BLADER subclass to restrict or unlearn-able, and if choose BLADER the PALADIN Subclass will restrict or not unlearn-able beacause i choose the blader sublass .
is there a way to do this guys?
even if it's scripting via event just like giving me a piece of advice about the code.

im using YEP_X_Subclass and YEP_ClassChangeCore Plugin

I've moved this thread to Plugin Support. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/class-restriction-help.105686/