Npc

class Npc(var id: NamespacedKey, val name: String? = null, var playerEntity: Player, var gameProfile: GameProfile, val mirrorSkin: Boolean = false, val location: Location, val actions: EnumSet<InfoUpdateAction> = EnumSet.noneOf( InfoUpdateAction::class.java ), val glowing: Boolean = false, val type: EntityType? = null, val equipment: MutableMap<EquipmentSlot?, ItemStack?>? = mutableMapOf(), val turnToPlayer: Boolean? = null, val turnToPlayerDistance: Int? = null, var isVisibleForPlayer: MutableMap<UUID?, Boolean?>? = mutableMapOf(), val skin: NpcSkinData? = null, var entityId: Int, var isTeamCreated: MutableMap<UUID?, Boolean?>? = mutableMapOf(), var isLookingAtPlayer: MutableMap<UUID?, Boolean?>? = mutableMapOf(), val permission: String? = "npc.", val spawnOnJoin: Boolean? = null) : INpc

Basic implementation of INpc for standard NPC functionality. Please note that due to a lack of general use cases, it is only available for storage purposes and not for all implementations.

Constructors

Link copied to clipboard
constructor(id: NamespacedKey, name: String? = null, playerEntity: Player, gameProfile: GameProfile, mirrorSkin: Boolean = false, location: Location, actions: EnumSet<InfoUpdateAction> = EnumSet.noneOf( InfoUpdateAction::class.java ), glowing: Boolean = false, type: EntityType? = null, equipment: MutableMap<EquipmentSlot?, ItemStack?>? = mutableMapOf(), turnToPlayer: Boolean? = null, turnToPlayerDistance: Int? = null, isVisibleForPlayer: MutableMap<UUID?, Boolean?>? = mutableMapOf(), skin: NpcSkinData? = null, entityId: Int, isTeamCreated: MutableMap<UUID?, Boolean?>? = mutableMapOf(), isLookingAtPlayer: MutableMap<UUID?, Boolean?>? = mutableMapOf(), permission: String? = "npc.", spawnOnJoin: Boolean? = null)

Properties

Link copied to clipboard
open override val actions: EnumSet<InfoUpdateAction>
Link copied to clipboard
open override var entityId: Int
Link copied to clipboard
open override val equipment: MutableMap<EquipmentSlot?, ItemStack?>?
Link copied to clipboard
open override var gameProfile: GameProfile
Link copied to clipboard
open override val glowing: Boolean
Link copied to clipboard
open override var id: NamespacedKey
Link copied to clipboard
open override var isLookingAtPlayer: MutableMap<UUID?, Boolean?>?
Link copied to clipboard
open override var isTeamCreated: MutableMap<UUID?, Boolean?>?
Link copied to clipboard
open override var isVisibleForPlayer: MutableMap<UUID?, Boolean?>?
Link copied to clipboard
open override val location: Location
Link copied to clipboard
open override val mirrorSkin: Boolean
Link copied to clipboard
open override val name: String?
Link copied to clipboard
open override val permission: String?
Link copied to clipboard
open override var playerEntity: Player
Link copied to clipboard
open override val skin: NpcSkinData?
Link copied to clipboard
open override val spawnOnJoin: Boolean?
Link copied to clipboard
open override val turnToPlayer: Boolean?
Link copied to clipboard
open override val turnToPlayerDistance: Int?
Link copied to clipboard
open override val type: EntityType?

Functions

Link copied to clipboard
open override fun remove(player: Player)

Implemented fun to simple remove the NPC from the Player.

Link copied to clipboard
open override fun removeAll()

Implemented fun to simple remove the NPC from all Players.

Link copied to clipboard
open override fun spawn(player: Player)

Implemented fun to simple spawn the NPC on the Location in the selected world.

Link copied to clipboard
open override fun spawnAll()

Implemented fun to simple spawn the NPC on the Location in the selected world.