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

Method to check if an entity can use portals

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None

      When an entity passes through a portal, it is flagged as being unable to use portals. Until it has been out of a portal for that many ticks, portals will not function. It would be nice to have the status exposed. This could be useful for anti-grief plugins trying to prevent players being trapped inside nether portals, among other things.

      I'd like to see an addition to Bukkit, Entity#canUsePortals() or something similar.

      public boolean canUsePortals() {
          return this.getHandle().portalCooldown <= 0;
      }
      

            Unassigned Unassigned
            Jikoo Jikoo
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: