WorldGuard hook

Discussion in 'Plugin Development' started by needspeed10, Mar 14, 2011.

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

    needspeed10

    I'm trying to make a protected region if you click on a sign.
    To realise that, i hooked (with nijijokuns tutorial) into it.
    First i just want to protect the block im looking to(to learn how it works).
    Thats looking so:
    Code:
    Player player = (Player) sender;
                com.sk89q.worldedit.BlockVector min,max;
                String id;
                Block target = player.getTargetBlock(transparentMaterials, 100);
                com.sk89q.worldedit.Vector v = new com.sk89q.worldedit.Vector((target.getLocation().getX()),(target.getLocation().getY()),(target.getLocation().getZ()));
                getServer().broadcastMessage(v.getX() + " " + v.getY() + " " + v.getZ());
                min = v.toBlockVector();
                max = v.toBlockVector();
                id = "test";
                com.sk89q.worldguard.protection.ProtectedRegion region = new com.sk89q.worldguard.protection.ProtectedCuboidRegion(id, min, max);
                RegionManager regionManager = wg.getRegionManager();
                regionManager.addRegion(region);
                getServer().broadcastMessage("min: " + min + " max: " + max + " id: " + id);
    Eclipse says nothing as error but bukkit when i start it:
    Code:
    22:04:35 [SCHWERWIEGEND] Could not load plugins\playersetup-0.0.1-SNAPSHOT.jar i
    n plugins: null
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:113)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:159)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:107)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoClassDefFoundError: com/sk89q/worldguard/protection/Prote
    ctedRegion
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:247)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:105)
            ... 8 more
    Caused by: java.lang.ClassNotFoundException: com.sk89q.worldguard.protection.Pro
    tectedRegion
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:30)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
            ... 11 more
    I hope you can help me ^^

    (Another way to realise that maybe would be to simulate a command or so...)
     
  2. Offline

    Crash

  3. Offline

    needspeed10

Thread Status:
Not open for further replies.

Share This Page