public class GermBlockAPI
extends java.lang.Object
提供模型方块的创建、管理和识别功能
支持头颅和箱子两种方块类型作为模型方块载体
Constructor and Description |
---|
GermBlockAPI() |
Modifier and Type | Method and Description |
---|---|
static org.bukkit.inventory.ItemStack |
buildItemStackFromModelBlockIndexName(java.lang.String modelIndexName)
根据模型索引名构建方块模型物品
|
static java.lang.String |
getModelBlockIndexName(org.bukkit.block.Block block)
获取模型方块的索引名
|
static java.lang.String |
parseItemStackModelBlockIndexName(org.bukkit.inventory.ItemStack itemStack)
解析物品堆栈中的模型方块索引名
|
static void |
setModelBlockIndexName(org.bukkit.block.Block block,
java.lang.String modelIndexName)
设置方块的模型索引名
|
static void |
setModelBlockIndexName(org.bukkit.block.Block block,
java.lang.String modelIndexName,
org.bukkit.block.BlockFace blockFace)
设置方块的模型索引名并指定朝向
|
static void |
setModelBlockIndexName(org.bukkit.Location location,
java.lang.String modelIndexName)
在指定位置设置模型方块
|
static void |
setModelBlockIndexName(org.bukkit.Location location,
java.lang.String modelIndexName,
org.bukkit.block.BlockFace blockFace)
在指定位置设置模型方块并指定朝向
|
public static java.lang.String getModelBlockIndexName(org.bukkit.block.Block block)
block
- 目标方块public static void setModelBlockIndexName(org.bukkit.block.Block block, java.lang.String modelIndexName)
block
- 目标方块modelIndexName
- 模型索引名public static void setModelBlockIndexName(org.bukkit.block.Block block, java.lang.String modelIndexName, org.bukkit.block.BlockFace blockFace)
block
- 目标方块modelIndexName
- 模型索引名blockFace
- 方块朝向public static void setModelBlockIndexName(org.bukkit.Location location, java.lang.String modelIndexName)
location
- 目标位置modelIndexName
- 模型索引名public static void setModelBlockIndexName(org.bukkit.Location location, java.lang.String modelIndexName, org.bukkit.block.BlockFace blockFace)
location
- 目标位置modelIndexName
- 模型索引名blockFace
- 方块朝向,仅对头颅类型有效public static java.lang.String parseItemStackModelBlockIndexName(org.bukkit.inventory.ItemStack itemStack)
itemStack
- 需要解析的物品public static org.bukkit.inventory.ItemStack buildItemStackFromModelBlockIndexName(java.lang.String modelIndexName)
modelIndexName
- GermPlugin/item文件夹中type为block的配置索引名