Interface MmoMobsApi


public interface MmoMobsApi
The public API for managing, querying, and spawning custom mobs in MMO-Mobs.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Collection<String>
    getCustomMobTags(@NotNull org.bukkit.entity.Entity entity)
    Retrieves a collection of scoreboard and custom tags associated with the given Entity.
    @NotNull Optional<String>
    getCustomMobType(@NotNull org.bukkit.entity.Entity entity)
    Retrieves the custom mob configuration ID associated with the given Entity.
    boolean
    isCustomMob(@NotNull org.bukkit.entity.Entity entity)
    Checks if the given Entity is a custom MMO-Mob.
    boolean
    isFeatureEnabled(@NotNull org.bukkit.entity.Player player)
    Checks if the MMO-Mobs admin features are enabled for the player.
    void
    sendMessage(@NotNull org.bukkit.entity.Player player, @NotNull String message)
    Sends a MiniMessage styled message to the player.
    @NotNull org.bukkit.entity.Entity
    spawnCustomMob(@NotNull String mobType, @NotNull org.bukkit.Location location)
    Spawns a custom mob at the specified location.
  • Method Details

    • sendMessage

      void sendMessage(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String message)
      Sends a MiniMessage styled message to the player.
      Parameters:
      player - the recipient player
      message - the MiniMessage formatted message string
    • isFeatureEnabled

      boolean isFeatureEnabled(@NotNull @NotNull org.bukkit.entity.Player player)
      Checks if the MMO-Mobs admin features are enabled for the player.
      Parameters:
      player - the player to check permissions for
      Returns:
      true if features are enabled, false otherwise
    • isCustomMob

      boolean isCustomMob(@NotNull @NotNull org.bukkit.entity.Entity entity)
      Checks if the given Entity is a custom MMO-Mob.
      Parameters:
      entity - the entity to check
      Returns:
      true if it contains the custom mob type PDC tag, false otherwise
    • getCustomMobType

      @NotNull @NotNull Optional<String> getCustomMobType(@NotNull @NotNull org.bukkit.entity.Entity entity)
      Retrieves the custom mob configuration ID associated with the given Entity.
      Parameters:
      entity - the entity to query
      Returns:
      an Optional containing the custom mob type if present, otherwise empty
    • getCustomMobTags

      @NotNull @NotNull Collection<String> getCustomMobTags(@NotNull @NotNull org.bukkit.entity.Entity entity)
      Retrieves a collection of scoreboard and custom tags associated with the given Entity.
      Parameters:
      entity - the entity to query
      Returns:
      a collection of custom tag strings
    • spawnCustomMob

      @NotNull @NotNull org.bukkit.entity.Entity spawnCustomMob(@NotNull @NotNull String mobType, @NotNull @NotNull org.bukkit.Location location)
      Spawns a custom mob at the specified location.
      Parameters:
      mobType - the custom mob registration ID
      location - the location to spawn the entity at
      Returns:
      the spawned Bukkit Entity
      Throws:
      IllegalArgumentException - if the mob type configuration is unknown or base entity type is invalid