L2JMobius
Free Users => Shares/Contributions => Committed User Contributions => Topic started by: ReynalDev on August 17, 2019, 03:02:48 PM
-
I think this could be useful.
Use:
String className = getClass().getSimpleName());
instead
String className = getClass().getName().substring(46);
Commit: https://bitbucket.org/MobiusDev/l2j_mobius/commits/994d0aa90d7597d213ca9bbb15199f50bafbe325
Comparation:
public static void main(String[] args)
{
Config c = new Config();
System.out.println("getName --> " + c.getClass().getName());
System.out.println("getSimpleName --> " + c.getClass().getSimpleName());
}
output:
getName --> com.l2jfrozen.Config
getSimpleName --> Config
-
Have you tested it?
-
Have you tested it?
You want to know the class name of the NPC Class right? yeah im using it in L2jFrozen 1.5.
-
Committed with revision 5794.
Thanks :D