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

VehicleExitEvent doesn't cancel properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • None
    • This server is running CraftBukkit version git-Spigot-ad703da-e2403a3 (MC: 1.16.1) (Implementing API version 1.16.1-R0.1-SNAPSHOT)
    • Yes

      When exiting a minecart, the VehicleExitEvent fires, but if I set that as cancelled, I still exit the cart. 

       

      The code I tested With

      @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false) 
      public void onCartExit(VehicleExitEvent e) {
        RidesPlugin.getInstance().getLogger().info("VehicleExitEvent"); 
        e.setCancelled(true); 
        RidesPlugin.getInstance().getLogger().info("cancelled: " + e.isCancelled());
      }
      

      Exiting a minecart Spigot 1.16.1: https://youtu.be/k_dM1hmIsdk 

      Console output

      [10:50:33] [Server thread/INFO]: [ccRides] VehicleExitEvent
      [10:50:33] [Server thread/INFO]: [ccRides] cancelled: true
      

       

      On 1.15.2, cancelling the event prevents you exiting the cart at all. However on 1.16, it lets you get out but then can't enter any other vehicle.
       

            Unassigned Unassigned
            TheClowner Nathanael Green
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: