[SOLVED] getTargetBlock

Discussion in 'Spigot Plugin Development' started by TheGamblingMan, Jun 1, 2015.

  1. Hey,
    I have just updated to 1.8.6 and there the Error "The method getTargetBlock(HashSet<Byte>, int) is ambiguous for the type Player" pops up.
    Now my question is there an alternative for the getTargetBlock?
  2. If you are doing null for the first value, e.g) player.getTargetBlock(null, 10); then you need to cast null to a HashSet. It's ambiguous as there are two versions of it; the HashSet and the deprecated Set. null can be either one so you need to specify it's a HashSet with a cast.
    • Useful Useful x 1
  3. LoL, thanks I thouhght I already tryed that but apperently I have failed it