public MobModule
@NotNull
org.bukkit.NamespacedKey getNamespacedKey(@NotNull
org.bukkit.entity.LivingEntity livingEntity)
Returns the NamespacedKey assigned to this livingEntity.
livingEntity,
See wiki about NamespacedKey@Deprecated
void getMobsInside(@NotNull
CoordTag areaTag,
@NotNull
java.util.function.Consumer<java.util.List> callback)
Inspect which Mobs are inside the area.
@NotNull GameShopkeeper getShopkeeper(@NotNull org.bukkit.entity.Entity entity)
Get class GameShopkeeper by entity.
IllegalArgumentException - is raised if this entity is not a class GameShopkeeperDependencyNotFound - is raised if Shopkeepers is not installed.class GameShopkeeper,
entity,
makeShopkeeper@NotNull GameShopkeeper makeShopkeeper(@NotNull org.bukkit.entity.Entity entity)
Convert this entity into a class GameShopkeeper.
IllegalArgumentException - is raised if this entity cannot be converted.DependencyNotFound - is raised if Shopkeepers is not installed.ShopkeeperCreateException - can be thrown during conversion.entity,
class GameShopkeeper@NotNull
org.bukkit.entity.Mob spawnMob(@NotNull
java.lang.String type,
@Nullable
java.lang.String name,
@Nullable
org.bukkit.loot.LootTable loot,
@NotNull
org.bukkit.Location location)
Spawn vanilla mob at location.
type - Type of Mobs to be spawned.name - Custom name.loot - The LootTable which defines the items to drop upon death.Use ItemModule.getLootTable to get a loot table.location - Location of spawnpoint.IllegalArgumentException - is thrown if type doesn't indicate any type of Mob.RuntimeException - is thrown if the specified Mob is not spawn-able.MapNotFound - is thrown if world is not yet loaded.location@NotNull
org.bukkit.entity.Mob spawnMob(@NotNull
java.lang.String type,
@Nullable
java.lang.String name,
@Nullable
org.bukkit.loot.LootTable loot,
@NotNull
CoordTag tag)
Spawn vanilla mob at arbitrary location.
Location is randomly picked among the ones captured by tag.
type - Type of Mobs to be spawned.name - Custom name.loot - The LootTable which defines the items to drop upon death.Use ItemModule.getLootTable to get a loot table.tag - class CoordTag that captures spawnpoint(s).IllegalArgumentException - is thrown if type doesn't indicate any type of Mob.MapNotFound - is thrown if world is not yet loaded.tag@NotNull
org.bukkit.entity.Entity spawnMythicMob(@NotNull
java.lang.String name,
int level,
@NotNull
org.bukkit.Location location)
Spawn MythicMob at location.
name - Name of the MythicMob(s) to be spawned.level - Initial level of the MythicMob(s).location - Location of spawnpoint.IllegalArgumentException - is thrown if name doesn't indicate any type of MythicMob.MapNotFound - is thrown if world is not yet loaded.DependencyNotFound - is thrown if MythicMobs is not installed.ReflectiveOperationExceptionlocation@NotNull
org.bukkit.entity.Entity spawnMythicMob(@NotNull
java.lang.String name,
int level,
@NotNull
CoordTag tag)
Spawn one MythicMob at arbitrary location.
Location is randomly picked among the ones captured by tag.
name - Name of the MythicMob(s) to be spawned.level - Initial level of the MythicMob(s).tag - class CoordTag that captures spawnpoint(s).IllegalArgumentException - is thrown if name doesn't indicate any type of MythicMob.MapNotFound - is thrown if world is not yet loaded.DependencyNotFound - is thrown if MythicMobs is not installed.RuntimeException - is thrown if spawn area cannot be resolved.ReflectiveOperationExceptiontag@NotNull
org.bukkit.entity.Entity spawnNPC(@NotNull
java.lang.String name,
@NotNull
org.bukkit.entity.EntityType type,
@Nullable
java.lang.String assignment,
@NotNull
org.bukkit.Location location)
Spawn NPC at location.
name - Name of this NPC.type - Entity type of this NPC.assignment - (Optional) Name of Denizen script assignment.location - Location of spawnpoint.MapNotFound - is thrown if world is not yet loaded.DependencyNotFound - is thrown if Citizens is not installed.location@NotNull
org.bukkit.entity.Entity spawnNPC(@NotNull
java.lang.String name,
@NotNull
org.bukkit.entity.EntityType type,
@Nullable
java.lang.String assignment,
@NotNull
CoordTag tag)
Spawn NPC at arbitrary location.
Location is randomly picked among the ones captured by tag.
name - Name of this NPC.type - Entity type of this NPC.assignment - (Optional) Name of Denizen script assignment.tag - class CoordTag that captures spawnpoint(s).IllegalArgumentException - is raised if tag mode is not relevant.MapNotFound - is thrown if world is not yet loaded.RuntimeException - is thrown if spawn area cannot be resolved.DependencyNotFound - is thrown if Citizens is not installed.tag@NotNull
org.bukkit.entity.Entity spawnPlayerNPC(@NotNull
java.lang.String name,
@Nullable
java.lang.String skinURL,
@Nullable
java.lang.String assignment,
@NotNull
org.bukkit.Location location)
Spawn Player-typed NPC at location.
name - Name of this NPC.skinURL - (Optional) URL of skin file. Link must be available for download.assignment - (Optional) Name of Denizen script assignment.location - Location of spawnpoint.MapNotFound - is thrown if world is not yet loaded.DependencyNotFound - is thrown if Citizens is not installed.location@NotNull
org.bukkit.entity.Entity spawnPlayerNPC(@NotNull
java.lang.String name,
@Nullable
java.lang.String skinURL,
@Nullable
java.lang.String assignment,
@NotNull
CoordTag tag)
Spawn Player-typed NPC at arbitrary location.
Location is randomly picked among the ones captured by tag.
name - Name of this NPC.skinURL - (Optional) URL of skin file. Link must be available for download.assignment - (Optional) Name of Denizen script assignment.tag - class CoordTag that captures spawnpoint(s).MapNotFound - is thrown if world is not yet loaded.RuntimeException - is thrown if spawn area cannot be resolved.DependencyNotFound - is thrown if Citizens is not installed.tagint despawnEntities(@NotNull
org.bukkit.entity.EntityType type)
Despawn specific type of entities.
MapNotFound - is thrown if world is not yet loaded.