diff --git a/src/main/java/org/rebotted/Client.java b/src/main/java/org/rebotted/Client.java index 1e910ef..d25ceca 100644 --- a/src/main/java/org/rebotted/Client.java +++ b/src/main/java/org/rebotted/Client.java @@ -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(); diff --git a/src/main/java/org/rebotted/bot/loader/APILoader.java b/src/main/java/org/rebotted/bot/loader/APILoader.java index 079e768..788f385 100644 --- a/src/main/java/org/rebotted/bot/loader/APILoader.java +++ b/src/main/java/org/rebotted/bot/loader/APILoader.java @@ -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; + } } } } diff --git a/src/main/java/org/rebotted/ui/BotFrame.java b/src/main/java/org/rebotted/ui/BotFrame.java index d261d2b..fe7f9b2 100644 --- a/src/main/java/org/rebotted/ui/BotFrame.java +++ b/src/main/java/org/rebotted/ui/BotFrame.java @@ -79,7 +79,6 @@ public final class BotFrame extends JFrame implements ActionListener { setStopped(); ScriptHandler.getInstance().stop(); break; - case "entities": Configuration.namesAboveHeads = !Configuration.namesAboveHeads; break;