What. The. F***. After all my hard work, this pops up: Code: 2012-04-14 16:28:30 [SEVERE] Could not load 'plugins\JailLikeHell v4.1.5.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.ClassCastException: class code.husky.JLH at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:150) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:207) at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:183) at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:53) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:156) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:422) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.ClassCastException: class code.husky.JLH at java.lang.Class.asSubclass(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:140) ... 8 more Any help is appreciated. The faster you post the answer, the better. Thank you! Moved from Bukkit Help.
I dont think you have your plugin.yml synced to your actual main class. Make sure: A) In plugin.yml, your "main" field is whatever you actual main field is. -or- B) Set your main class in the package "code.husky" and name the class "JLH"
Here's my Source File for the main class: http://pastebin.com/wDY7MPeq And my plugin.yml: http://pastebin.com/e0miTzrp
Thats the largest main class I've ever seen. You should really create new typed classes and organize each item based on its class (i.e. put commands in your Commands class). That would help a lot. Your main class should always only contain what it does when enabled (i.e. load files from a separate class, or say "Hey, im enabled" or something, not every method in your plugin). It's better to extend JavaPlugin and implement Listener, then register the other classes in your main.
I'm tellin ya, a lil' organization will go a LONG way. Since it looks like your plugin is all in your main class, that doesnt help debugging... It points to something being wrong with the class, but that could be anything! If you make new classes, and it STILL points to your main class, then we can take a more thorough look.
using an jre1.7.0 class on an jre1.6.0 would give an other exception "unsupportted major.minor version"
I've deleted jre 1.6.0. All I have now is jre 1.7.0, and yet this still isn't working. I was receiving the unsupported major.minor version error, but I fixed it by deleting jre 1.6.0. Yes. Yup.
@Daniel Heppner told me to give you this: https://github.com/Bukkit/Bukkit/bl.../org/bukkit/plugin/java/JavaPluginLoader.java It's the JavaPluginLoader, which is related to the error.
First thing; "Unkown source". Second thing; here's line 140 of the JavaPluginLoader: Code:java Class<? extends JavaPlugin> plugin = jarClass.asSubclass(JavaPlugin.class); That line correlates the first error line that I quoted "at java.lang.Class.asSubclass" Things to double check: does your main jar extend Java Plugin do you have the bukkit API hooked into the compiler That's the only thing I can think of. You could also try remaking the first part of the plugin, then copy over the rest of your code. I would take that as an opportunity to organize your code into classes! Especially with as much code that you have, it'd do loads for organization and debugging.
I suggested the first, second is a good idea too. I can't imagine why this would suddenly start happening though.
Okay, I added the Bukkit API (sorry, new to Bukkit) after my computer got wiped a few days ago. Now i'm getting this error: Code: 2012-04-17 17:27:26 [SEVERE] Could not load 'plugins\JailLikeHell v4.1.5.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.Error: Unresolved compilation problems: The import com.platymuus cannot be resolved The import com.platymuus cannot be resolved The import ru cannot be resolved The import ru cannot be resolved The import ru cannot be resolved The import ru cannot be resolved PermissionsPlugin cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionsPlugin cannot be resolved to a type PermissionsPlugin cannot be resolved to a type The method setGroup(String, String) in the type JLH is not applicable for the arguments (String, List<capture#2-of ?>) PermissionsPlugin cannot be resolved to a type PermissionsPlugin cannot be resolved to a type PermissionsPlugin cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionsEx cannot be resolved PermissionsPlugin cannot be resolved to a type PermissionsPlugin cannot be resolved to a type Group cannot be resolved to a type Type mismatch: cannot convert from element type Object to Group PermissionManager cannot be resolved to a type PermissionGroup cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionGroup cannot be resolved to a type PermissionsPlugin cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionsPlugin cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionManager cannot be resolved to a type at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:148) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:207) at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:183) at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:53) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:156) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:422) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.Error: Unresolved compilation problems: The import com.platymuus cannot be resolved The import com.platymuus cannot be resolved The import ru cannot be resolved The import ru cannot be resolved The import ru cannot be resolved The import ru cannot be resolved PermissionsPlugin cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionsPlugin cannot be resolved to a type PermissionsPlugin cannot be resolved to a type The method setGroup(String, String) in the type JLH is not applicable for the arguments (String, List<capture#2-of ?>) PermissionsPlugin cannot be resolved to a type PermissionsPlugin cannot be resolved to a type PermissionsPlugin cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionsEx cannot be resolved PermissionsPlugin cannot be resolved to a type PermissionsPlugin cannot be resolved to a type Group cannot be resolved to a type Type mismatch: cannot convert from element type Object to Group PermissionManager cannot be resolved to a type PermissionGroup cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionGroup cannot be resolved to a type PermissionsPlugin cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionsPlugin cannot be resolved to a type PermissionManager cannot be resolved to a type PermissionManager cannot be resolved to a type at code.husky.JLH.<init>(JLH.java:3) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:144) ... 8 more