Interface StockEvent.Cause
- All Known Subinterfaces:
StickCause
- All Known Implementing Classes:
CommandCauses.AdminGive
,CommandCauses.AdminReset
,CommandCauses.AdminSet
,CommandCauses.AdminTake
,CommandCauses.Give
,CommandCauses.Receive
,CraftCause
,GuiCauses.Deposit
,GuiCauses.Withdraw
,StickCauses.BlockItem
,StickCauses.BlockPlace
,StickCauses.Brewer
,StickCauses.Container
,StickCauses.Furnace
,StickCauses.ItemBreak
,StickCauses.ItemConsume
,StickCauses.ProjectileLaunch
,StickCauses.ShootBow
- Enclosing class:
StockEvent
public static interface StockEvent.Cause
An interface that indicates why the
StockEvent
was called.
By implementing this interface, StockEvent.Cause
can have additional information.
If no additional information is needed, an instance can be created via create(String)
.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull StockEvent.Cause
Creates the simple implementation ofStockEvent.Cause
that implementsname()
@NotNull String
name()
Gets the string that indicates the cause.
-
Method Details
-
create
Creates the simple implementation ofStockEvent.Cause
that implementsname()
- Parameters:
name
- the cause that indicates why theStockEvent
was called- Returns:
- a
StockEvent.Cause
instance
-
name
Gets the string that indicates the cause.This method returns a string that is a concise representation of the "cause".
For example, an API call is "api", and a player's stock deposit/withdrawal is "deposit" or "withdraw".
- Returns:
- the string that indicates the cause
-