getModeledEntity

public static ModeledEntity getModeledEntity(Entity entity)

O(1) single-entity lookup against the live underlying-entity registry. Prefer this over getLoadedModeledEntitiesWithUnderlyingEntities when only one entity is needed — the snapshot getter copies the whole registry per call.

Return

the modeled entity bound to it, or null if none

Parameters

entity

the underlying Bukkit entity, may be null