Why those mistakes...

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

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


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

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

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


    Post the error.
    Shadownd63 likes this.
  3. Offline


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


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


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


    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


Thread Status:
Not open for further replies.

Share This Page