--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/GrassCommand.java 2011/05/18 18:22:24 1467 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/GrassCommand.java 2011/05/18 18:25:09 1468 @@ -18,11 +18,15 @@ Player p = (Player) sender; - Location l = p.getLocation(); - World w = l.getWorld(); - Block b = w.getBlockAt(l); + Location loc = p.getLocation(); + World w = loc.getWorld(); + Block b = w.getBlockAt(loc.getBlockX(), loc.getBlockY()-1, loc.getBlockZ()); - b.setTypeId(2); + if (b.getTypeId() == 3) { + b.setTypeId(2); + } else { + p.sendMessage("Can only plant grass on dirt"); + } return true;