Jonathan K avatar Jonathan K committed fc0b8f1 Merge

Merged in zbob750/godpowers/PR3 (pull request #3)

Fixes v3

Comments (0)

Files changed (2)

         <dependency>
             <groupId>org.bukkit</groupId>
             <artifactId>bukkit</artifactId>
-            <version>1.7.2-R0.1-SNAPSHOT</version>
+            <version>1.7.2-R0.3-SNAPSHOT</version>
             <type>jar</type>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.bukkit</groupId>
             <artifactId>craftbukkit</artifactId>
-            <version>1.7.2-R0.1-SNAPSHOT</version>
+            <version>1.7.2-R0.3-SNAPSHOT</version>
             <type>jar</type>
             <scope>compile</scope>
         </dependency>

src/main/java/com/FriedTaco/taco/godPowers/godPowersPlayerListener.java

 				block.setType(Material.RED_ROSE);
 			else if(chance > .04 && chance <= .1)
 			{
-				block.setType(Material.GRASS);
+				block.setType(Material.LONG_GRASS);
+				block.setData((byte) 1);
 			}
 			
 		}
     		World w = p.getWorld();
     		if(plugin.isZeus.contains(p.getName()))
     		{
-    			w.strikeLightning((getTargetBlock(p,1).getLocation()));
+    			//p.getTargetBlock is a Magic Value!
+    			w.strikeLightning((p.getTargetBlock(null, 100).getLocation()));
     		}
     		if(plugin.isVulcan.contains(p.getName()))
     		{
         return target;
  
     }
-public Block getTargetBlock(Player player, int range) {
-    Location loc = player.getEyeLocation();
-    Vector dir = loc.getDirection().normalize();
-    Block b = null;
-    for (int i = 0; i <= range; i++) {
-        b = loc.add(dir).getBlock();
-    }
-    return b;
-}
 private Color getColor(int i) {
 	  Color c = null;
 	  if(i==1){
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.