NoHopper
Removes the Hoppper Recipepublic class NoHopperCraft extends JavaPlugin implements Listener { @Override public void onEnable() { Bukkit.getPluginManager().registerEvents(this, this); removeHopperRecipe(); } private void removeHopperRecipe() { NamespacedKey hopperKey = NamespacedKey.minecraft("hopper"); Recipe recipe = Bukkit.getRecipe(hopperKey); if (recipe != null) { Bukkit.removeRecipe(hopperKey); getLogger().info("Hopper crafting recipe removed."); } } @EventHandler public void onPrepareItemCraft(PrepareItemCraftEvent event) { if (event.getInventory().getResult() != null && event.getInventory().getResult().getType() == Material.HOPPER) { event.getInventory().setResult(null); } } }
Leave a Comment