Skip to content

Commit

Permalink
Add method to check for harvesting of crops.
Browse files Browse the repository at this point in the history
  • Loading branch information
Staartvin committed Dec 1, 2019
1 parent 33ec4c8 commit f47508a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/me/staartvin/statz/util/StatzUtil.java
Expand Up @@ -649,6 +649,15 @@ public static org.bukkit.Material findMaterial(int typeId, int dataValue) {
return null;
}

public static boolean isHarvestableCrop(Material material) {

List<Material> crops = Arrays.asList(WHEAT, BEETROOTS, CARROTS, POTATOES, MELON, PUMPKIN, BAMBOO, COCOA,
SUGAR_CANE, CACTUS, BROWN_MUSHROOM, RED_MUSHROOM, KELP_PLANT,
SEA_PICKLE, NETHER_WART, CHORUS_PLANT, CHORUS_FLOWER);

return crops.contains(material);
}

public enum Time {
DAYS, HOURS, MINUTES, SECONDS
}
Expand Down

0 comments on commit f47508a

Please sign in to comment.