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