ClassDefError: com/sk89q/worldedit/Vector

Discussion in 'Plugin Development' started by bigboy2013, Mar 28, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    bigboy2013

    I came across a problem with my code I just can't seem to get past. Here is the problematic code:

    Code:
    Location min = BukkitUtil.toLocation(world, WGBukkit.getRegionManager(world).getRegion(regionName).getMinimumPoint());
    Location max = BukkitUtil.toLocation(world, WGBukkit.getRegionManager(world).getRegion(regionName).getMaximumPoint());
    I get no errors or warning from within the IDE, and everything runs completely fine if I remove those two lines. Maybe there is a better way to do this instead? I tried converting the max/min points to locations and using them, but the stack trace I get is:

    Code:
    2013-03-28 23:53:15 [SEVERE] Could not load 'plugins\MegaDig.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: com/sk89q/worldedit/Vector
        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_R2.CraftServer.loadPlugins(CraftServer.java:239)
        at org.bukkit.craftbukkit.v1_5_R2.CraftServer.reload(CraftServer.java:603)
        at org.bukkit.Bukkit.reload(Bukkit.java:184)
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:187)
        at org.bukkit.craftbukkit.v1_5_R2.CraftServer.dispatchCommand(CraftServer.java:523)
        at org.bukkit.craftbukkit.v1_5_R2.CraftServer.dispatchServerCommand(CraftServer.java:512)
        at net.minecraft.server.v1_5_R2.DedicatedServer.am(DedicatedServer.java:261)
        at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:226)
        at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:476)
        at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:409)
        at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573)
    Caused by: java.lang.NoClassDefFoundError: com/sk89q/worldedit/Vector
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173)
        ... 14 more
    Caused by: java.lang.ClassNotFoundException: com.sk89q.worldedit.Vector
        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)
        ... 17 more
    Any help on this problem would be appreciated. The lines I displayed above were lines 382, and 383. If any more of the code is needed to diagnose this, I will post it right away.
     
  2. Offline

    dillyg10

    You need to add WorldEdit in your project to eclipse :)
     
  3. Offline

    bigboy2013

    I actually already have worldedit added, and worldguard also. I have already used them throughout my plugin, and have had no problem with either until this showed up.
     
  4. Offline

    dillyg10

    Ignore what I said before, you need to add WG to the depend in the plugin.yml
     
  5. Offline

    bigboy2013

    Thanks! It works now.
     
  6. Offline

    dillyg10

    Noprob, make sure to put a [Solved[ next to the title.
     
Thread Status:
Not open for further replies.

Share This Page