Package pers.neige.neigeitems.event
Class ItemGenerateEvent
-
- All Implemented Interfaces:
public final class ItemGenerateEvent extends BasicEvent
物品生成事件.
-
-
Field Summary
Fields Modifier and Type Field Description public final static HandlerList
handlers
public final String
id
public final OfflinePlayer
player
public final Map<String, String>
cache
public final ConfigReader
configSection
public final ConfigurationSection
sections
public ItemStack
itemStack
public final static HandlerList
handlers
-
Constructor Summary
Constructors Constructor Description ItemGenerateEvent(String id, OfflinePlayer player, ItemStack itemStack, Map<String, String> cache, ConfigReader configSection, ConfigurationSection sections)
-
Method Summary
Modifier and Type Method Description HandlerList
getHandlers()
String
getId()
获取物品ID OfflinePlayer
getPlayer()
获取用于解析物品的玩家 Map<String, String>
getCache()
获取节点缓存 ConfigReader
getConfigSection()
获取物品配置(经过了节点解析, 不包含节点配置) ConfigurationSection
getSections()
获取节点配置 ItemStack
getItemStack()
获取生成的物品 void
setItemStack(@NonNull() ItemStack itemStack)
设置生成的物品 static HandlerList
getHandlerList()
-
Methods inherited from class org.bukkit.event.Event
getEventName, getHandlers, isAsynchronous
-
Methods inherited from class pers.neige.neigeitems.event.BasicEvent
call
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ItemGenerateEvent
ItemGenerateEvent(String id, OfflinePlayer player, ItemStack itemStack, Map<String, String> cache, ConfigReader configSection, ConfigurationSection sections)
- Parameters:
id
- 物品IDplayer
- 用于解析物品的玩家itemStack
- 生成的物品cache
- 节点缓存configSection
- 物品配置(经过了节点解析, 不包含节点配置)sections
- 节点配置
-
-
Method Detail
-
getHandlers
@NonNull() HandlerList getHandlers()
-
getPlayer
@Nullable() OfflinePlayer getPlayer()
获取用于解析物品的玩家
-
getConfigSection
@NonNull() ConfigReader getConfigSection()
获取物品配置(经过了节点解析, 不包含节点配置)
-
getSections
@Nullable() ConfigurationSection getSections()
获取节点配置
-
getItemStack
@NonNull() ItemStack getItemStack()
获取生成的物品
-
setItemStack
void setItemStack(@NonNull() ItemStack itemStack)
设置生成的物品
- Parameters:
itemStack
- 生成的物品
-
getHandlerList
@NonNull() static HandlerList getHandlerList()
-
-
-
-