Solved Line going red (dont know why)

Discussion in 'Plugin Development' started by Tabbin, Jul 19, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Tabbin

    So im making a double jump plugin for a server, and this is one of the lines:
    Code:
    && (player.getLocation().subtract(0, 1, 0).getBlock().getType() != Material.AIR)
    But it's underlined and i dont know why?
    The errors:

    Incompatible operand types org.bukkit.Matieral and net.minecraft.server.v1_7_r4.Material
     
  2. Offline

    JustinsCool15

    Delete your net.minecraft.server.v1_7_r4.Material import and import org.bukkit.Material
     
  3. Offline

    Assist

    Tabbin
    Looks like you've imported the wrong Material. Remove the current import, then import the correct one (org.bukkit...). If you're using an IDE, hovering over the problematic line should give you a quick fix option.

    JustinsCool15
    Out of curiosity; did you even know the answer to this question when you first posted the "wat" picture, or did you edit your post to copy mine?
     
  4. Offline

    Tabbin

    Cheers guys!
     
  5. Offline

    JustinsCool15

    Assist
    Before he edited the original post his error said the same thing as his code so no I didn't until he posted the actual error, but I did not copy you. :p
     
  6. Offline

    Assist

    JustinsCool15
    Ah, my apologies. I've seen few cases where people first come on the thread to troll (in this case, the picture), then later edit their post and copy someone's answer to make them look like they know something :p
     
Thread Status:
Not open for further replies.

Share This Page