Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7048

addPassenger() not working when vehicle is player


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None



    • 3513-Spigot-fa893f0-576a037 (MC: 1.19) (Implementing API version 1.19-R0.1-SNAPSHOT)
    • SpigotBug (Personal)
    • Yes

      Entity#addPassenger() does not function as intended.


      With a small plugin setup I arranged, I implemented the "PlayerInteractEntityEvent" with simple methods of setting the event#getRightClicked method as the passenger of the event#getPlayer() method.


      Here is the code for any questions:

      package me.coderky.spigotbug;
      import org.bukkit.Bukkit;
      import org.bukkit.event.EventHandler;
      import org.bukkit.event.Listener;
      import org.bukkit.event.player.PlayerInteractEntityEvent;
      import org.bukkit.plugin.java.JavaPlugin;
      public final class SpigotBug extends JavaPlugin implements Listener {
          public void onEnable() {
              // Plugin startup logic
              getServer().getPluginManager().registerEvents(this, this);
          public void onDisable() {
              // Plugin shutdown logic
          public void onInteract(PlayerInteractEntityEvent event) {
              event.getPlayer().sendMessage("Added Passenger: " + event.getRightClicked().getName());


      This method originally states:


      Here is the output of my results from the code listed below:


      Before I mention anything else, I'd like to state that there are no error stacktraces within my server's console. 


      As you can see, event#getRightClicked() works as intended; however, the entity clicked does not get stacked onto the vehicle (The player) instead, the passenger becomes completely frozen not being able to move or be pushed when walking into it's hit box.


      This bug i cannot replicate in normal minecraft. Running the command:

      /summon cow ~ ~1 ~ {Passengers:[{id:wolf}]} 

      Allows me to summon a normal cow with a wolf as a passenger normally

            Unassigned Unassigned
            coderky Coder Ky
            1 Vote for this issue
            3 Start watching this issue