Package org.bukkit

Examples of org.bukkit.Material


     *
     * @param item Item to check
     * @return true if the item is a bow, false otherwise
     */
    public static boolean isBow(ItemStack item) {
        Material type = item.getType();

        switch (type) {
            case BOW:
                return true;

View Full Code Here


     *
     * @param item Item to check
     * @return true if the item is a sword, false otherwise
     */
    public static boolean isSword(ItemStack item) {
        Material type = item.getType();

        switch (type) {
            case DIAMOND_SWORD:
            case GOLD_SWORD:
            case IRON_SWORD:
View Full Code Here

     *
     * @param item Item to check
     * @return true if the item is a hoe, false otherwise
     */
    public static boolean isHoe(ItemStack item) {
        Material type = item.getType();

        switch (type) {
            case DIAMOND_HOE:
            case GOLD_HOE:
            case IRON_HOE:
View Full Code Here

     *
     * @param item Item to check
     * @return true if the item is a shovel, false otherwise
     */
    public static boolean isShovel(ItemStack item) {
        Material type = item.getType();

        switch (type) {
            case DIAMOND_SPADE:
            case GOLD_SPADE:
            case IRON_SPADE:
View Full Code Here

     *
     * @param item Item to check
     * @return true if the item is an axe, false otherwise
     */
    public static boolean isAxe(ItemStack item) {
        Material type = item.getType();

        switch (type) {
            case DIAMOND_AXE:
            case GOLD_AXE:
            case IRON_AXE:
View Full Code Here

     *
     * @param item Item to check
     * @return true if the item is a pickaxe, false otherwise
     */
    public static boolean isPickaxe(ItemStack item) {
        Material type = item.getType();

        switch (type) {
            case DIAMOND_PICKAXE:
            case GOLD_PICKAXE:
            case IRON_PICKAXE:
View Full Code Here

     *
     * @param item Item to check
     * @return true if the item is a helmet, false otherwise
     */
    public static boolean isHelmet(ItemStack item) {
        Material type = item.getType();

        switch (type) {
            case DIAMOND_HELMET:
            case GOLD_HELMET:
            case IRON_HELMET:
View Full Code Here

     *
     * @param item Item to check
     * @return true if the item is a chestplate, false otherwise
     */
    public static boolean isChestplate(ItemStack item) {
        Material type = item.getType();

        switch (type) {
            case DIAMOND_CHESTPLATE:
            case GOLD_CHESTPLATE:
            case IRON_CHESTPLATE:
View Full Code Here

     *
     * @param item Item to check
     * @return true if the item is a pair of pants, false otherwise
     */
    public static boolean isLeggings(ItemStack item) {
        Material type = item.getType();

        switch (type) {
            case DIAMOND_LEGGINGS:
            case GOLD_LEGGINGS:
            case IRON_LEGGINGS:
View Full Code Here

     *
     * @param item Item to check
     * @return true if the item is a pair of boots, false otherwise
     */
    public static boolean isBoots(ItemStack item) {
        Material type = item.getType();

        switch (type) {
            case DIAMOND_BOOTS:
            case GOLD_BOOTS:
            case IRON_BOOTS:
View Full Code Here

TOP

Related Classes of org.bukkit.Material

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.