I am making a plugin for staff that when you /StaffWand it will give you a staffwand, I did the permissions for /staffwand already, it's just that I don't want random players to get a stick and it will be a wand, so I am currently trying to make it like this: public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { if(cmd.getName().equalsIgnoreCase("StaffWand")) { if(!sender.hasPermission("StaffWand.staff")) { sender.sendMessage(ChatColor.RED + "Only Staff can use this!"); }else{ if(sender.hasPermission("StaffWand.staff")) { sender.sendMessage(ChatColor.GREEN + "Here is your staff wand!"); ItemStack item = new ItemStack(Material.STICK, 1); ItemMeta meta = stick.getItemMeta(); meta.setDisplayName("Staff Wand"); ArrayList<String> lore = new ArrayList<String>(); lore.add("Staff Wand"); meta.setLore(lore); }else{ if(Material.STICK != ItemMeta.meta); returnfalse; ((Player)sender).getInventory().addItem(item); return true; if(Material.STICK == ItemMeta.meta); returntrue; That is my code, I put the red on where it is not working, know how to fix?
I have learn't java, I just need some help with this, if the material has a meta name, the wand will work, if it doesn't, everything will return false?
I can help you i think so but first put your code between the [ code ] [ / code ] tags. (use not the spaces in the tag)