com.amoebaman.kitmaster
Class KitMaster

java.lang.Object
  extended by org.bukkit.plugin.PluginBase
      extended by org.bukkit.plugin.java.JavaPlugin
          extended by com.amoebaman.kitmaster.KitMaster
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.event.Listener, org.bukkit.plugin.Plugin

public class KitMaster
extends org.bukkit.plugin.java.JavaPlugin
implements org.bukkit.event.Listener

The main class for KitMaster

Author:
Dennison

Field Summary
static boolean DEBUG_KITS
           
static boolean DEBUG_PERMS
           
 
Constructor Summary
KitMaster()
           
 
Method Summary
static void applyKitClears(org.bukkit.entity.Player player, Kit kit)
          Applies clearing attributes of a kit to a player.
static void clearAll(org.bukkit.entity.Player player)
          Clears all attributes for all kits in history and clears the history for a player.
static org.bukkit.inventory.ItemStack getBook(java.lang.String name)
          Gets the Book object saved to file with the given name.
static GiveKitResult giveKit(org.bukkit.entity.Player player, Kit kit, GiveKitContext context)
          Gives a player a kit.
static boolean isVaultEnabled()
           
static org.bukkit.plugin.PluginLogger logger()
           
 void onBlockBreak(org.bukkit.event.block.BlockBreakEvent event)
           
 void onBlockDamage(org.bukkit.event.block.BlockDamageEvent event)
           
 boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, java.lang.String label, java.lang.String[] args)
           
 void onDisable()
           
 void onEnable()
           
 void onPlayerDeath(org.bukkit.event.entity.PlayerDeathEvent event)
           
 void onPlayerKick(org.bukkit.event.player.PlayerKickEvent event)
           
 void onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent event)
           
 void onSignChange(org.bukkit.event.block.SignChangeEvent event)
           
static void setupVaultProviders()
          Retrieves and stores service providers obtained using the Vault API.
 
Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getCommand, getConfig, getDatabase, getDatabaseClasses, getDataFolder, getDefaultWorldGenerator, getDescription, getLogger, getPluginLoader, getResource, getServer, isEnabled, isInitialized, isNaggable, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setNaggable, toString
 
Methods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG_PERMS

public static final boolean DEBUG_PERMS
See Also:
Constant Field Values

DEBUG_KITS

public static final boolean DEBUG_KITS
See Also:
Constant Field Values
Constructor Detail

KitMaster

public KitMaster()
Method Detail

onEnable

public void onEnable()
Specified by:
onEnable in interface org.bukkit.plugin.Plugin
Overrides:
onEnable in class org.bukkit.plugin.java.JavaPlugin

onDisable

public void onDisable()
Specified by:
onDisable in interface org.bukkit.plugin.Plugin
Overrides:
onDisable in class org.bukkit.plugin.java.JavaPlugin

logger

public static org.bukkit.plugin.PluginLogger logger()

isVaultEnabled

public static boolean isVaultEnabled()

onCommand

public boolean onCommand(org.bukkit.command.CommandSender sender,
                         org.bukkit.command.Command command,
                         java.lang.String label,
                         java.lang.String[] args)
Specified by:
onCommand in interface org.bukkit.command.CommandExecutor
Overrides:
onCommand in class org.bukkit.plugin.java.JavaPlugin

onBlockDamage

public void onBlockDamage(org.bukkit.event.block.BlockDamageEvent event)

onSignChange

public void onSignChange(org.bukkit.event.block.SignChangeEvent event)

onBlockBreak

public void onBlockBreak(org.bukkit.event.block.BlockBreakEvent event)

onPlayerDeath

public void onPlayerDeath(org.bukkit.event.entity.PlayerDeathEvent event)

onPlayerQuit

public void onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent event)

onPlayerKick

public void onPlayerKick(org.bukkit.event.player.PlayerKickEvent event)

giveKit

public static GiveKitResult giveKit(org.bukkit.entity.Player player,
                                    Kit kit,
                                    GiveKitContext context)
Gives a player a kit. This method will consider and apply all attributes of the given kit, including timeouts, permissions, and inheritance. If the kit has a parent kit, a recursive call will be made to this method prior to the application of kit, with GiveKitContext.PARENT_GIVEN..

Parameters:
player - The player to give the kit to.
kit - The kit that will be given.
context - The context or reason for giving this kit.
Returns:
a GiveKitResult signifying the success or reason for failure of giving the kit.

applyKitClears

public static void applyKitClears(org.bukkit.entity.Player player,
                                  Kit kit)
Applies clearing attributes of a kit to a player.

Parameters:
player - The target player.
kit - The kit whose clearing attributes should be considered.

clearAll

public static void clearAll(org.bukkit.entity.Player player)
Clears all attributes for all kits in history and clears the history for a player. This call is equivalent to calling applyKitClears with a kit that has the CLEAR_ALL attribute.

Parameters:
player - The target player.

getBook

public static org.bukkit.inventory.ItemStack getBook(java.lang.String name)
Gets the Book object saved to file with the given name.

Parameters:
name - The name of the Book to retrieve.
Returns:
The book that matches the given name, or a blank written book if no book matched.

setupVaultProviders

public static void setupVaultProviders()
Retrieves and stores service providers obtained using the Vault API.