setPassenger() is cooldowned for 3 seconds after calling eject().

    • Type: Bug
    • Resolution: Invalid
    • Priority: Major
    • None
    • Affects Version/s: None
    • Environment:

      Spigot 1.9

      Unable to set entity again as a passenger for 3 seconds after calling eject() method.
      Reproducing:
      [code]Sheep sheep = (Sheep) player.getPassenger();
      sheep.eject();
      Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
      public void run()

      { player.setPassenger(sheep); // Doesn't let me to set the sheep as a passenger for 3 seconds. }

      }, 20L);[/code]

      What I did to get around it temporary:
      [code]Sheep sheep = (Sheep) player.getPassenger();
      sheep.eject();
      Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
      public void run()

      { sheep.remove(); Sheep newSheep = sheep.getWorld().spawn(sheep.getLocation(), Sheep.class); player.setPassenger(newSheep); // Works... }

      }, 20L);[/code]

            Assignee:
            Unassigned
            Reporter:
            Mathias K.
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: