small bug fixes

This commit is contained in:
Ethan
2019-12-16 22:25:55 -06:00
parent f25a72b75e
commit dee970aa2b
3 changed files with 14 additions and 13 deletions
+4 -4
View File
@@ -4745,10 +4745,10 @@ public class Client extends GameApplet {
inputDialogState = 0;
updateChatbox = true;
}
int first = -1;
int button = -1;
int action = -1;
int clicked = -1;
int first;
int button;
int action;
int clicked;
//First: 0 button: 0 action: 412 clicked: 777 actionText: Attack @yel@Man@gr1@ (level-2)
if(menuAction != null) {
first = menuAction.getMouseX();
@@ -65,14 +65,16 @@ public class APILoader {
classArchive.loadClasses(classMap);
final ASMClassLoader classLoader = new ASMClassLoader(classArchive);
for(ClassNode node : classArchive.classes.values()) {
for(AnnotationNode annotationNode : node.visibleAnnotations) {
if(annotationNode.desc.equals("L"+APIManifest.class.getCanonicalName().replaceAll("\\.", "/")+";")) {
final Class<?> clazz = classLoader.loadClass(node.name.replaceAll("/", "."));
final APIManifest manifest = clazz.getAnnotation(APIManifest.class);
rebottedAPI = (RebottedAPI) clazz.getConstructors()[0].newInstance(client);
System.out.println("Rebotted API version "+manifest.version()+" has been loaded...");
final APIData apiData = new APIData(clazz, manifest.version(), null, classArchive, classLoader);
return apiData;
if (node.visibleAnnotations != null && node.visibleAnnotations.size() > 0) {
for (AnnotationNode annotationNode : node.visibleAnnotations) {
if (annotationNode.desc.equals("L" + APIManifest.class.getCanonicalName().replaceAll("\\.", "/") + ";")) {
final Class<?> clazz = classLoader.loadClass(node.name.replaceAll("/", "."));
final APIManifest manifest = clazz.getAnnotation(APIManifest.class);
rebottedAPI = (RebottedAPI) clazz.getConstructors()[0].newInstance(client);
System.out.println("Rebotted API version " + manifest.version() + " has been loaded...");
final APIData apiData = new APIData(clazz, manifest.version(), null, classArchive, classLoader);
return apiData;
}
}
}
}
@@ -79,7 +79,6 @@ public final class BotFrame extends JFrame implements ActionListener {
setStopped();
ScriptHandler.getInstance().stop();
break;
case "entities":
Configuration.namesAboveHeads = !Configuration.namesAboveHeads;
break;