InventoryClickEvent: Item SubID abfragen?

ich würde gerne die subid von einem material in einer if abfrage abfragen hier mein code habe die stellen gekennzeichnet

if (event.getCurrentItem().getItemMeta().getDisplayName().equals("§aUnebene Erde")) {

        ClickType clickType = event.getClick();

        if (clickType.equals(ClickType.LEFT)) {

          if (CityBuild.getInstance().getEconomyAPI().hasEnoughMoney(player.getName(), 6)) {

            CityBuild.getInstance().getEconomyAPI().removeMoney(player.getName(), 6);

            player.getInventory().addItem(new ItemBuilder(Material.DIRT, 1).build());

          } else {

            player.sendMessage(Data.prefix + "§cDu hast nicht genug Geld!");

          }

        } else if (clickType.equals(ClickType.SHIFT_LEFT)) {

          if (CityBuild.getInstance().getEconomyAPI().hasEnoughMoney(player.getName(), 384)) {

            player.getInventory().addItem(new ItemBuilder(Material.DIRT, 1).setAmount(64).build());

            CityBuild.getInstance().getEconomyAPI().removeMoney(player.getName(), 384);

          } else {

            player.sendMessage(Data.prefix + "§cDu hast nicht genug Geld!");

          }

        } else if (clickType.equals(ClickType.RIGHT)) {

          for (ItemStack cdirt : player.getInventory().getContents()) {

            if (cdirt == null || cdirt.getType() == Material.AIR) return;

//HIER SUBID ABFRAGEN START

            if (cdirt.getType() == Material.DIRT) {

//HIER SUBID ABFRAGEN ENDE

              if (cdirt.getAmount() >= 1) {

                cdirt.setAmount(cdirt.getAmount() - 1);

                CityBuild.getInstance().getEconomyAPI().addMoney(player.getName(), 3);

              }

            } else {

              player.sendMessage(Data.prefix + "§cDu besitzt dieses Item nicht!");

            }

          }

        }

      }

programmieren, Java, Minecraft, Minecraft Plugin, plugins programmieren