Can't cancel void damage. Turns into infinite loop.

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Environment:

      git-Spigot-6f291ea-55a8535 version 1.9-R0.1-SNAPSHOT

      Raspbian (Shouldn't effect this bug.)

      Ok so basically you can't cancel the EntityDamageEvent and tp the entity when the entity is hit by void otherwise it will go into an "infinity loop"

      Code to replicate

          @EventHandler (priority = EventPriority.LOWEST)
          public void onDamage(EntityDamageEvent event) {
              if (event.getEntityType() != EntityType.PLAYER) return;
              Player player = (Player) event.getEntity();
              if (event.getCause() == EntityDamageEvent.DamageCause.VOID) {
                  player.teleport(spawn);
                  Bukkit.broadcastMessage("Called!");
              }
      
              event.setCancelled(true);
          }
      
      

            Assignee:
            Unassigned
            Reporter:
            Camden b
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: