Hello,
I'm currently trying to setup an Plugin for minecraft (currently I'm just testing simple stuff out).
My prob is: If i get errors, it doesnt shows whats the prob ._.
Copy from Error:
Code:
2013-06-12 07:22:41 [SEVERE] Could not load 'plugins\testplugin.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.ClassNotFoundException: com.earliboy.testPlugin.TestPlugin
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184)
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugins(CraftServer.java:239)
at org.bukkit.craftbukkit.v1_5_R3.CraftServer.<init>(CraftServer.java:217)
at net.minecraft.server.v1_5_R3.PlayerList.<init>(PlayerList.java:55)
at net.minecraft.server.v1_5_R3.DedicatedPlayerList.<init>(SourceFile:11)
at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.java:106)
at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:382)
at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
Caused by: java.lang.ClassNotFoundException: com.earliboy.testPlugin.TestPlugin
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173)
... 9 more
Class: (Ye its may fucked up
Just trying to get it fast to work)
Added: "spam", since this it doesnt works anymore. Do I need to use an class file for EACH command?
And no, Eclipse does not gives me any errors at these lines.
Everything works well (this is just an part of the class file, not going to post the full one cause its just since the "spam").
And no, it doesnt matters whats inside the 'spam' just since I added the "else if(blabla)"
Code:
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
if(cmd.getName().equalsIgnoreCase("test")){
if(args.length <= 0 || args.length > 50)
return false;
String tString = "";
int i;
for (i = 0; i < args.length; ++i)
{
tString += args[i];
tString += " ";
}
System.out.println("Test done: " + tString);
System.out.println("String length: " + i);
return true;
}
else if(cmd.getName().equalsIgnoreCase("spam")){
if(args.length <= 0 || args.length >= 2)
return false;
System.out.println("Running 'Spam'");
int t = Integer.parseInt(args[0]);
int i;
System.out.println("Integer is: " + t + " String is: " + args[1]);
for( i = 0; i < t; i++ )
System.out.println(args[1]);
return true;
}
return false;
}
Thanks for any help.