Class AbstractComponentFactory<Factory extends ComponentFactory<Factory>>
java.lang.Object
com.ericlam.mc.eldgui.component.factory.AbstractComponentFactory<Factory>
- Type Parameters:
Factory
- 工廠
- All Implemented Interfaces:
ComponentFactory<Factory>
public abstract class AbstractComponentFactory<Factory extends ComponentFactory<Factory>>
extends Object
implements ComponentFactory<Factory>
用於繼承組件工廠,預設了很多事先的邏輯,方便創建
-
Constructor Summary
ConstructorDescriptionAbstractComponentFactory
(ItemStackService itemStackService, AttributeController attributeController) -
Method Summary
-
Constructor Details
-
AbstractComponentFactory
public AbstractComponentFactory(ItemStackService itemStackService, AttributeController attributeController)
-
-
Method Details
-
icon
- Specified by:
icon
in interfaceComponentFactory<Factory extends ComponentFactory<Factory>>
- Parameters:
material
- 圖示- Returns:
- this
-
bind
Description copied from interface:ComponentFactory
綁定組件屬性- Specified by:
bind
in interfaceComponentFactory<Factory extends ComponentFactory<Factory>>
- Parameters:
key
- 鍵value
- 數值- Returns:
- this
-
number
- Specified by:
number
in interfaceComponentFactory<Factory extends ComponentFactory<Factory>>
- Parameters:
amount
- 數量- Returns:
- this
-
mirror
Description copied from interface:ComponentFactory
以該物品為組件外觀原型。注意此舉將會覆蓋之前的所有設定 (包括綁定數值和外觀等)- Specified by:
mirror
in interfaceComponentFactory<Factory extends ComponentFactory<Factory>>
- Parameters:
item
- bukkit 物品- Returns:
- this
-
create
Description copied from interface:ComponentFactory
創建組件- Specified by:
create
in interfaceComponentFactory<Factory extends ComponentFactory<Factory>>
- Returns:
- this
-
build
-