LevelManager

Generates levels and manages other functions related to levelling mobs

Author

lokka30, stumper66, CoolBoy, Esophose, 7smile7, Shevchik, Hugo5551, limzikiki

Since

2.4.0

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

The following entity types MUST NOT be levellable.

Link copied to clipboard
val summonedOrSpawnEggs: WeakHashMap<LivingEntity, Any>

Functions

Link copied to clipboard
open override fun applyLevelToMob(lmEntity: LivingEntityWrapper, level: Int, isSummoned: Boolean, bypassLimits: Boolean, additionalLevelInformation: MutableSet<AdditionalLevelInformation>?)

This method applies a level to the target mob.

Link copied to clipboard
open override fun generateLevel(lmEntity: LivingEntityWrapper): Int
open override fun generateLevel(lmEntity: LivingEntityWrapper, minLevel: Int, maxLevel: Int): Int

This method generates a level for the mob. It utilises the levelling mode specified by the administrator through the settings.yml configuration.

Link copied to clipboard
open override fun getLevellableState(livingEntity: LivingEntity): LevellableState

Check if an existing mob is allowed to be levelled, according to the user's configuration.

Link copied to clipboard
Link copied to clipboard
open override fun getLevelOfMob(livingEntity: LivingEntity): Int

Retrieve the level of a levelled mob.

Link copied to clipboard
Link copied to clipboard
open override fun getMobNametag(livingEntity: LivingEntity): String?
Link copied to clipboard
fun getNametag(lmEntity: LivingEntityWrapper, isDeathNametag: Boolean): NametagResult
fun getNametag(lmEntity: LivingEntityWrapper, isDeathNametag: Boolean, preserveMobName: Boolean): NametagResult
Link copied to clipboard
fun getPlayerLevelSourceNumber(player: Player?, lmEntity: LivingEntityWrapper, variableToUse: String): PlayerLevelSourceResult
Link copied to clipboard
open override fun isLevelled(livingEntity: LivingEntity): Boolean

Check if a LivingEntity is a levelled mob or not. This is determined after MobPreLevelEvent.

Link copied to clipboard
fun load()
Link copied to clipboard
fun multiplyDrop(lmEntity: LivingEntityWrapper, currentDrop: ItemStack, addition: Double, isCustomDrop: Boolean)
Link copied to clipboard
open override fun removeLevel(lmEntity: LivingEntityWrapper)
open override fun removeLevel(livingEntity: LivingEntity)

Un-level a mob.

Link copied to clipboard
fun removeVanillaDrops(lmEntity: LivingEntityWrapper, drops: MutableList<ItemStack>)
Link copied to clipboard
fun replaceStringPlaceholders(text: String, lmEntity: LivingEntityWrapper, usePAPI: Boolean, player: Player?, preserveMobName: Boolean): String
Link copied to clipboard
fun setLevelledItemDrops(lmEntity: LivingEntityWrapper, currentDrops: MutableList<ItemStack>, disableItemBoost: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun updateNametag(lmEntity: LivingEntityWrapper, nametag: NametagResult, players: MutableList<Player>)
fun updateNametag(lmEntity: LivingEntityWrapper, nametag: StringReplacer, preserveMobName: Boolean, customDeathMessage: String?): NametagResult
Link copied to clipboard