/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/GrassCommand.java
ViewVC logotype

Diff of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/GrassCommand.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1467 by torben, Wed May 18 18:13:55 2011 UTC revision 1468 by torben, Wed May 18 18:25:09 2011 UTC
# Line 18  public class GrassCommand implements Com Line 18  public class GrassCommand implements Com
18                                    
19                  Player p = (Player) sender;                  Player p = (Player) sender;
20                                    
21                  Location l = p.getLocation();                  Location loc = p.getLocation();
22                  World w = l.getWorld();                  World w = loc.getWorld();              
23                  Block b = w.getBlockAt(l);                  Block b = w.getBlockAt(loc.getBlockX(), loc.getBlockY()-1, loc.getBlockZ());
24                                    
25                  b.setTypeId(2);                  if (b.getTypeId() == 3) {
26                            b.setTypeId(2);
27                    } else {
28                            p.sendMessage("Can only plant grass on dirt");
29                    }
30                                    
31                                    
32                  return true;                  return true;

Legend:
Removed from v.1467  
changed lines
  Added in v.1468

  ViewVC Help
Powered by ViewVC 1.1.20