📅  最后修改于: 2022-03-11 14:58:55.709000             🧑  作者: Mango
@EventHandler(priority=EventPriority.NORMAL, ignoreCancelled=true)
public void onRightClick(PlayerInteractEntityEvent event) {
Player player = event.getPlayer();
if (event.getRightClicked().getType()==EntityType.VILLAGER) {
event.setCancelled(true);
//continued code