WorldGuard region creation not working

Discussion in 'Plugin Development' started by xLoGiiKzZo, Aug 12, 2013.

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

    xLoGiiKzZo

    I'm trying to create a WorldGuard region with the following code:

    Code:java
    1. RegionManager rm = plugin.WG().getRegionManager(player.getWorld());
    2. BlockVector b1 = new BlockVector(pX + 8, pY, pZ + 8);
    3. BlockVector b2 = new BlockVector(pX - 8, pY + 7, pZ - 8);
    4. ProtectedCuboidRegion pr = new ProtectedCuboidRegion(player.getName() + "Shed", b1, b2);
    5. DefaultDomain dd = new DefaultDomain();
    6. dd.addPlayer(player.getName());
    7. pr.setOwners(dd);
    8. try {
    9. rm.save();
    10. Bukkit.broadcastMessage("Saved");
    11. } catch (ProtectionDatabaseException e1) {
    12. e1.printStackTrace();
    13. }


    The "saved" message does get broadcasted but the region is not created.
     
  2. Offline

    newboyhun

    xLoGiiKzZo likes this.
  3. Offline

    xLoGiiKzZo

    newboyhun
    Thanks. I always forget the dumbest things :p
     
  4. Offline

    newboyhun

Thread Status:
Not open for further replies.

Share This Page