getEntityByInstance

abstract fun getEntityByInstance(instance: Any): McServerEntity

Creates a new McServerEntity instance of wrapped instance.

The instance parameter represents the server-specific entity instance:

  • For Bukkit: org.bukkit.entity.LivingEntity

  • For modded servers (Fabric/Forge): net.minecraft.world.entity.Entity

Return

The entity.