[SPIGOT-2705] Method to check if an entity can use portals Created: 30/Sep/16  Updated: 01/Oct/16  Resolved: 01/Oct/16

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Jikoo Assignee: Unassigned
Resolution: Fixed Votes: 2
Labels: entity, portal


 Description   

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;
}

Generated at Sun Mar 16 22:57:13 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.