Interface CommandShopProduct
- All Superinterfaces:
ShopProduct
Represents a command being executed.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the command that will be executed on purchasebooleanReturns if the command will be executed as the player or as the consolevoidsetAsConsole(boolean asConsole) Define if the command should be executed as if the console typed it or as if the buyer typed it.voidsetCommand(String command) Set the command that shall be executed on purchaseMethods inherited from interface ShopProduct
getAmount, getDisplayName, getDisplayName, getGivingItems, getId, getItem, getType, give, give, isAutoWear, isUnbreakable, setAmount, setAutoWear, setUnbreakable
-
Method Details
-
getCommand
-
setCommand
Set the command that shall be executed on purchase- Parameters:
command- The new command
-
isAsConsole
boolean isAsConsole()Returns if the command will be executed as the player or as the console- Returns:
false: Gets executed as if the player would type it in,true: Gets executed as if the console sent it
-
setAsConsole
void setAsConsole(boolean asConsole) Define if the command should be executed as if the console typed it or as if the buyer typed it.
true:as if the console typed it
false:as if the buyer typed it- Parameters:
asConsole- Either true or false
-