Class MergedSpawnerAPI

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
com.vk2gpz.mergedspawner.api.MergedSpawnerAPI
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public abstract class MergedSpawnerAPI
extends org.bukkit.plugin.java.JavaPlugin
MergedSpawnerAPI provides the basic APIs which allow anyone to obtain information on merged spawners.

You can access this plugin's public API as:
 
 import com.vk2gpz.mergedspawner.*;
 ...
 MergedSpawenrAPI msAPI = MergedSpawnerAPI.getINSTANCE();
 if (msAPI != null) {
   int count = msAPI.getCountFor(spawner);
   }
 ...
 
 
See Also:
JavaPlugin
  • Constructor Summary

    Constructors 
    Constructor Description
    MergedSpawnerAPI()  
  • Method Summary

    Modifier and Type Method Description
    abstract int getCountFor​(org.bukkit.block.Block spawner)
    This method returns the number of spawners.
    abstract org.bukkit.entity.EntityType getEntityType​(org.bukkit.inventory.ItemStack spawner)
    This method returns the mob type of the given spawner.
    static MergedSpawnerAPI getInstance()
    This returns the INSTANCE of TokenEnchant plugin.
    abstract org.bukkit.inventory.ItemStack getSpawnerFor​(org.bukkit.entity.EntityType etype, int amount)
    This method returns the spawner item of the specified mob type
    void onEnable()
    Called when this plugin is enabled.
    abstract void setCount​(org.bukkit.block.Block spawner, int newCount)
    This method sets the specified spawner count to the specified spawner.

    Methods inherited from class org.bukkit.plugin.java.JavaPlugin

    getClassLoader, getCommand, getConfig, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onDisable, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString

    Methods inherited from class org.bukkit.plugin.PluginBase

    equals, getName, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • getInstance

      public static MergedSpawnerAPI getInstance()
      This returns the INSTANCE of TokenEnchant plugin.
      Returns:
      the INSTANCE of TokenEnchant plugin.
    • onEnable

      public void onEnable()
      Called when this plugin is enabled.
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • getCountFor

      public abstract int getCountFor​(org.bukkit.block.Block spawner)
      This method returns the number of spawners.
      Parameters:
      spawner - the spawner block to be examined.
      Returns:
      the number of spawners in this stack.
    • getSpawnerFor

      public abstract org.bukkit.inventory.ItemStack getSpawnerFor​(org.bukkit.entity.EntityType etype, int amount)
      This method returns the spawner item of the specified mob type
      Parameters:
      etype - the mob type
      amount - the amount of spawner
      Returns:
      the spaecified mobs spawner.
    • getEntityType

      public abstract org.bukkit.entity.EntityType getEntityType​(org.bukkit.inventory.ItemStack spawner)
      This method returns the mob type of the given spawner.
      Parameters:
      spawner - the spawner item
      Returns:
      mob type of the spawner.
    • setCount

      public abstract void setCount​(org.bukkit.block.Block spawner, int newCount)
      This method sets the specified spawner count to the specified spawner.
      Parameters:
      spawner - the spawner item
      newCount - the new count.