Basically it doesn't return any items for Cocoa (Yes tested a ton of times), Returns not the normal items when you break Crops (No Seeds) And it doesn't support Nether_Wart (No items returned)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onHarvest(BlockBreakEvent event) { Player player = event.getPlayer(); Block block = event.getBlock(); Bukkit.broadcastMessage(block.getType().name() + plants.contains(block.getType())); if (!plants.contains(block.getType()) || autoHarvest.getPlayerManager().hasPlayer(player)) return; Location location = block.getLocation(); Collection<ItemStack> drops = block.getDrops(); if(block.getType() == Material.CROPS) drops.add(new ItemStack(Material.SEEDS, 2)); for(ItemStack itemStack : drops) Bukkit.broadcastMessage(itemStack.getType().name()); HashMap<Integer, ItemStack> stack = player.getInventory().addItem(drops.toArray(new ItemStack[drops.size()])); block.setType(Material.AIR); if (stack.size() != 0) { for (int i : stack.keySet()) location.getWorld().dropItem(location, stack.get(i)); player.sendMessage(chatUtils.format(message)); } }
Method I used ^
Any help would be nice