9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-22 08:29:35 +00:00
This commit is contained in:
Xiao-MoMi
2022-07-08 21:55:44 +08:00
parent b8a365c7ab
commit 904767188b
3 changed files with 10 additions and 12 deletions

View File

@@ -31,7 +31,7 @@ public class BreakBlock implements Listener {
Player player =event.getPlayer();
Location location = event.getBlock().getLocation();
for (Integration integration : ConfigReader.Config.integration){
if(!integration.canPlace(location, player)) return;
if(!integration.canBreak(location, player)) return;
}
if(player.getInventory().getItemInMainHand().containsEnchantment(Enchantment.SILK_TOUCH) || player.getInventory().getItemInMainHand().getType() == Material.SHEARS){
event.setCancelled(true);