Hey guys I'm trying to put something together for one of my mods and was wondering if anyone knew how to detect if a certain .class exists.
I'm assuming I need to use this but I have no idea how
here's another one i just tried but I cant get it to return true
boolean exists = (new File("/bloodsplatsmods/pathterrain01.png")).exists();{
if (exists) {
System.out.println("the file or directory you are searching does exist : " + exists);
} else {
System.out.println("the file or directory you are searching does not exist : " + exists);
}
}
I'm assuming I need to use this but I have no idea how
What I need it to do is detect if a certain class exists and if it does do something and if it doesnt exist do nothing.
Thanks for the reply i'll give it a try
here's another one i just tried but I cant get it to return true
That won't work after obfuscation though because that will strip the package name and leave it as just "YOURCLASS".
INFORMATION WANTS TO BE WRONG