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.CauseCreates the simple implementation ofStockEvent.Causethat implementsname()@NotNull Stringname()Gets the string that indicates the cause.
-
Method Details
-
create
Creates the simple implementation ofStockEvent.Causethat implementsname()- Parameters:
name- the cause that indicates why theStockEventwas called- Returns:
- a
StockEvent.Causeinstance
-
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
-