Advertisement
Guest User

Untitled

a guest
Dec 27th, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.24 KB | None | 0 0
  1.         try
  2.         {
  3.             bottomRight = new Location(claimsWorld, plotRegion.getMinimumPoint().getX(), plotRegion.getMinimumPoint().getY(), plotRegion.getMinimumPoint().getZ());
  4.             bottomLeft = new Location(claimsWorld, bottomRight.getX() + (plotSize - 1), plugin.plotHeight, bottomRight.getZ());
  5.             topRight = new Location(claimsWorld, bottomRight.getX(), plugin.plotHeight, bottomRight.getZ() + (plotSize - 1));
  6.             topLeft = new Location(claimsWorld, bottomRight.getX() + (plotSize - 1), plugin.plotHeight, bottomRight.getZ() + (plotSize - 1));
  7.         }
  8.         catch (NullPointerException e1)
  9.         {
  10.             plugin.getServer().getPlayer(sender.getName()).sendMessage(pluginPrefix + plugin.messages.getMessage("plot-not-found", plotName));
  11.             return;
  12.         }
  13.        
  14.         try
  15.         {
  16.             regeneratePlot(((Player)sender).getName(), playerName, plotName, worldName);
  17.         }
  18.         catch (InvalidWorldException e)
  19.         {
  20.             plugin.getServer().getPlayer(sender.getName()).sendMessage(pluginPrefix + plugin.messages.getMessage("not-plotworld-error", worldName));
  21.             return;
  22.         }
  23.        
  24.         if (plugin.signsEnabled)
  25.         {
  26.             if (plugin.signPlacementMethod.equals("entrance"))
  27.             {
  28.                 Location entranceLocation1 = new Location(claimsWorld, bottomRight.getX() + (plotSize / 2) - 2, plugin.plotHeight + 3, bottomRight.getZ() + (plotSize));
  29.                 Location entranceLocation2 = new Location(claimsWorld, bottomRight.getX() + (plotSize / 2) + 2, plugin.plotHeight + 3, bottomRight.getZ() + (plotSize));
  30.                 removeSign(entranceLocation1);
  31.                 removeSign(entranceLocation2);
  32.             }
  33.             else if (plugin.signPlacementMethod.equals("corners"))
  34.             {
  35.                 Location bottomRightTest = new Location(claimsWorld, bottomRight.getX() - 1, bottomRight.getY() + 3, bottomRight.getZ() - 1);
  36.                 removeSign(bottomRightTest);
  37.  
  38.                 Location bottomLeftTest = new Location(claimsWorld, bottomLeft.getX() + 1, bottomLeft.getY() + 3, bottomLeft.getZ() - 1);
  39.                 removeSign(bottomLeftTest);
  40.  
  41.                 Location topRightSign = new Location(claimsWorld, topRight.getX() - 1, topRight.getY() + 3, topRight.getZ() + 1);
  42.                 removeSign(topRightSign);
  43.  
  44.                 Location topLeftSign = new Location(claimsWorld, topLeft.getX() + 1, topLeft.getY() + 3, topLeft.getZ() + 1);
  45.                 removeSign(topLeftSign);
  46.             }
  47.             else if (plugin.signPlacementMethod.equals("both"))
  48.             {
  49.                 Location entranceLocation1 = new Location(claimsWorld, bottomRight.getX() + (plotSize / 2) - 2, plugin.plotHeight + 3, bottomRight.getZ() + (plotSize));
  50.                 Location entranceLocation2 = new Location(claimsWorld, bottomRight.getX() + (plotSize / 2) + 2, plugin.plotHeight + 3, bottomRight.getZ() + (plotSize));
  51.                 removeSign(entranceLocation1);
  52.                 removeSign(entranceLocation2);
  53.  
  54.                 Location bottomRightTest = new Location(claimsWorld, bottomRight.getX() - 1, bottomRight.getY() + 3, bottomRight.getZ() - 1);
  55.                 removeSign(bottomRightTest);
  56.  
  57.                 Location bottomLeftTest = new Location(claimsWorld, bottomLeft.getX() + 1, bottomLeft.getY() + 3, bottomLeft.getZ() - 1);
  58.                 removeSign(bottomLeftTest);
  59.  
  60.                 Location topRightSign = new Location(claimsWorld, topRight.getX() - 1, topRight.getY() + 3, topRight.getZ() + 1);
  61.                 removeSign(topRightSign);
  62.  
  63.                 Location topLeftSign = new Location(claimsWorld, topLeft.getX() + 1, topLeft.getY() + 3, topLeft.getZ() + 1);
  64.                 removeSign(topLeftSign);
  65.             }
  66.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement