public class SensibleToolbox extends Object
Constructor and Description |
---|
SensibleToolbox() |
Modifier and Type | Method and Description |
---|---|
static BaseSTBBlock |
getBlockAt(Location location)
Given a location, return the STB block at that location, if any.
|
static BaseSTBBlock |
getBlockAt(Location location,
boolean checkSign)
Given a location, return the STB block at that location, if any.
|
static <T extends BaseSTBBlock> |
getBlockAt(Location location,
Class<T> type,
boolean checkSign)
Given a location, return the STB block at that location, if any.
|
static BlockProtection |
getBlockProtection()
Get the block protection handler.
|
static EnergyNet |
getEnergyNet(Block block)
Get the energy net for the given block.
|
static FriendManager |
getFriendManager()
Get the friend manager object.
|
static BaseSTBItem |
getItemFromItemStack(ItemStack stack)
Deprecated.
|
static <T extends BaseSTBItem> |
getItemfromItemStack(ItemStack stack,
Class<T> type)
|
static ItemRegistry |
getItemRegistry()
Get the item registry instance, which handles all item registration,
retrieval and inspection.
|
static String |
getPlayerNameFromUUID(UUID uuid)
Given a UUID, attempt to get the player name for that UUID.
|
static me.desht.sensibletoolbox.SensibleToolboxPlugin |
getPluginInstance()
Get an instance of the running Sensible Toolbox plugin.
|
static void |
registerItem(Plugin plugin,
BaseSTBItem item)
|
static void |
registerItem(Plugin plugin,
BaseSTBItem item,
String configNode)
|
static void |
registerItem(Plugin plugin,
BaseSTBItem item,
String configNode,
String permissionNode)
|
public static me.desht.sensibletoolbox.SensibleToolboxPlugin getPluginInstance()
public static ItemRegistry getItemRegistry()
@Deprecated public static BaseSTBItem getItemFromItemStack(ItemStack stack)
ItemRegistry.fromItemStack(org.bukkit.inventory.ItemStack)
stack
- the item stack@Deprecated public static <T extends BaseSTBItem> T getItemfromItemStack(ItemStack stack, Class<T> type)
stack
- the item stackpublic static BaseSTBBlock getBlockAt(Location location)
location
- the location to checkpublic static BaseSTBBlock getBlockAt(Location location, boolean checkSign)
location
- the location to checkcheckSign
- if true and the location contains a sign, then also
check the location of the block the sign is attached
topublic static <T extends BaseSTBBlock> T getBlockAt(Location location, Class<T> type, boolean checkSign)
location
- the location to checktype
- the block must be an instance or a subclass of this typecheckSign
- if true and the location contains a sign, then also
check the location of the block the sign is attached
topublic static String getPlayerNameFromUUID(UUID uuid)
uuid
- the UUID to check@Deprecated public static void registerItem(Plugin plugin, BaseSTBItem item)
ItemRegistry.registerItem(me.desht.sensibletoolbox.api.items.BaseSTBItem, org.bukkit.plugin.Plugin)
BaseSTBItem
.plugin
- the plugin doing the registrationitem
- an instance of the item to be registered@Deprecated public static void registerItem(Plugin plugin, BaseSTBItem item, String configNode)
ItemRegistry.registerItem(me.desht.sensibletoolbox.api.items.BaseSTBItem, org.bukkit.plugin.Plugin, String)
BaseSTBItem
.plugin
- the plugin doing the registrationitem
- an instance of the item to be registeredconfigNode
- the parent configuration node prefix controlling enablement@Deprecated public static void registerItem(Plugin plugin, BaseSTBItem item, String configNode, String permissionNode)
ItemRegistry.registerItem(me.desht.sensibletoolbox.api.items.BaseSTBItem, org.bukkit.plugin.Plugin, String, String)
BaseSTBItem
.plugin
- the plugin doing the registrationitem
- an instance of the item to be registeredconfigNode
- the parent configuration node prefix controlling enablementpermissionNode
- the permission node prefix for registering item permissionspublic static FriendManager getFriendManager()
public static EnergyNet getEnergyNet(Block block)
block
- the block to checkpublic static BlockProtection getBlockProtection()
Copyright © 2014. All rights reserved.