I was wondering if there is a way to stop one class from using a method but let another use the method depending on what they extend.
Lets say class1 implements Plugin and class2 implements Mod, is it possible to allow class2 to use method load(); but stop class1 from using it
Maybe you can pass the type of the caller to the method and then use the instanceof comparison operator. For example:
public void myMethod(Object obj){
if(obj instanceof Mod){
\\ do something
} else if(obj instanceof Plugin){
\\ do not permit
}
}