Pumpkin and Melon seeds are always craftable
SaganWolfric opened this issue ยท 3 comments
Players are able to craft melon and pumpkin seeds even if the config option is enabled.
Cant Craft Melonseeds: true
Maybe 1.13 brought a new method that would require a change to this part of the code?
ExtraHardMode/src/main/java/com/extrahardmode/features/AntiFarming.java
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void onItemCrafted(CraftItemEvent event)
{
World world = null;
Material result = event.getRecipe().getResult().getType();
InventoryHolder human = event.getInventory().getHolder();
Player player = null;
if (human instanceof Player)
{
player = (Player) human;
world = player.getWorld();
}
final boolean cantCraftMelons = world != null && CFG.getBoolean(RootNode.CANT_CRAFT_MELONSEEDS, world.getName());
final boolean playerBypasses = playerModule.playerBypasses(player, Feature.ANTIFARMING);
if (!playerBypasses && cantCraftMelons)
{
// FEATURE: no crafting melon seeds
if (result == Material.MELON_SEEDS || result == Material.PUMPKIN_SEEDS)
{
event.setCancelled(true);
plugin.getModuleForClass(MsgModule.class).send(player, MessageNode.NO_CRAFTING_MELON_SEEDS);
return;
}
}
}
I'm running the latest release of EHM and latest version of Paper.
According to #130 (comment) this was never an issue. If it still is an issue, please paste output of /version
and /version ExtraHardMode