Solved I need help with [method ambiguous]

Discussion in 'Spigot Plugin Development' started by StuxProg, May 18, 2016.

  1. Could anyone help me with this command line : Location loc = player.getTargetBlock(null, 100).getLocation();

    I am using bukkit 1.9.4 and this line is not working properly.

    Can anybody help me?
  2. Cast 'null' to a Set<Material> or HashSet<Material>. The HashSet<Material> is deprecated, however, so it's recommended to use Set<Material>.
  3. null can either be a Set<Material> or HashSet<Byte>
    You must cast null to either one of these to make your method call not ambiguous.
    • Agree Agree x 2
  4. thank you so much!
    I should have researched before, there is plenty of that problem here in the forum.
    • Like Like x 1
  5. marking this post as solved would be a relief for not reviving this back.