Why those mistakes...

Discussion in 'Plugin Development' started by Shadownd63, Sep 20, 2014.

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

    Shadownd63

    Hey, Im making a plugin that allows you to ride entity, well extualy player
    But i got ERRORS!
    Can someone please help me?

    @EventHandler
    public void Ride(PlayerInteractEntityEvent e) {
    Player p = e.getPlayer();

    e.getRightClicked().setPassenger(p);
    if (e.getRightClicked () == EntityType.PLAYER) { //The error is here
    p.sendMessage(ChatColor.DARK_AQUA + "You are now on top of someone!");
     
  2. Offline

    thepaperboy99

    Post the error.
     
    Shadownd63 likes this.
  3. Offline

    Shadownd63

    How do you mean? Like in the console? Theres no error, becuse i cant export it
     
  4. Offline

    thepaperboy99

    What does it say when you try to export it?
     
  5. Offline

    Shadownd63

    JAR export finished with warnings. See details for additional information.
    Exported with compile errors: RitoCraft/src/me/shadownd/RitoCraft/Main.java
     
  6. Offline

    Yukari

    You should post the error also, that makes it much easier to help. The error is "Incompatible operand types Entity and EntityType. Which pretty much tells you exactly what your problem is, you're trying to compare an Entity with an EntityType.
     
  7. Use "e.getRightClicked() instanceof Player" instead.
     
    Panjab and ChipDev like this.
  8. Offline

    ChipDev

    Yep.
     
Thread Status:
Not open for further replies.

Share This Page