hallo again so i am working on a plugin and i made it so that if they rightclick with a diamond pickaxe then it takes your pickaxe and replaceses it Code: @EventHandler public void onPlayerUse(PlayerInteractEvent e) { Player p = e.getPlayer(); if(plugin.toggle) { if (p.isSneaking()) { if(e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) { if(p.hasPermission("infusion.toggle")) { if(e.hasItem()) { ItemStack item = e.getItem(); if(plugin.helper.canEnchant(item.getType())) { if(plugin.helper.hasInfusion(item.getEnchantments())) { plugin.helper.remove(item); }else { plugin.helper.add(item); } p.playSound(p.getLocation(), Sound.ORB_PICKUP, 1F, 1F); return; but i cant figure out how to do so when they rightclick nothing will happend unless its names Infusion Pickaxe. heres all my code http://pastie.org/private/yefpot0lyicgru8wxmzv9w please help me so i cant figure it out i tryed but cant get it to work
check for the name/lore of the item. Also you dont need a boolean in your oncommand method to define if it is a player, instead if it is not a player return true
@mine-care example of how to put it into my code i tryed alot of times but cant get it to work together
@xguysprison well I think you are looking for spoon feeding, it won't help you and it will probably lead to a mistake, the li k above shows a google search where it is exactly what you need. Just read the docs and you will find what you Need =)