getInstance

abstract fun <T> getInstance(): T

Gets the server's implementation instance for this entity.

The return type may vary depending on the server platform:

  • For Bukkit: org.bukkit.entity.LivingEntity

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

Return

The server's implementation object associated with this entity.

Parameters

T

The expected type of the server's implementation instance.