Answer the question
In order to leave comments, you need to log in
How to stop condition checks?
There are 2 conditions:
if(a == Action.LEFT_CLICK_BLOCK || a == Action.RIGHT_CLICK_BLOCK && (p.getInventory().getItemInMainHand().getType() == Material.DIAMOND_SWORD || p.getInventory().getItemInMainHand().getType() == Material.IRON_SWORD) && e.getClickedBlock().getType() == Material.CHEST || e.getClickedBlock().getType() == Material.ENDER_CHEST) {
e.setCancelled(true);
p.sendMessage(ChatColor.BOLD + ("Убери меч из рук"));
p.playSound(p.getLocation(), Sound.BLOCK_DISPENSER_FAIL, 2, 1);
}
if(a == Action.LEFT_CLICK_AIR && p.getInventory().getItemInMainHand().getType() == Material.APPLE ) {
p.sendMessage("Ussed");
}
}
}
Answer the question
In order to leave comments, you need to log in
The first thing you should do is make normal hyphens in the first block to make it easier to read the code.
The second is to rewrite the question itself once again.
I think that if you complete the first and second points, then you yourself will correct the error or supplement the code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question