Class GenesisBuyAdvanced
java.lang.Object
studio.magemonkey.genesis.core.GenesisBuy
studio.magemonkey.genesis.inbuiltaddons.advancedshops.GenesisBuyAdvanced
-
Constructor Summary
ConstructorsConstructorDescriptionGenesisBuyAdvanced(GenesisRewardType rewardT, GenesisPriceType priceT, Object reward, Object price, String msg, int location, String permission, String name, GenesisCondition condition, GenesisInputType inputType, String inputMessage, Map<org.bukkit.event.inventory.ClickType, ActionSet> actions) -
Method Summary
Modifier and TypeMethodDescriptiongetExtraPermission(org.bukkit.event.inventory.ClickType clickType) getInputText(org.bukkit.event.inventory.ClickType clickType) getInputType(org.bukkit.event.inventory.ClickType clickType) getMessage(org.bukkit.event.inventory.ClickType clickType) getPrice(org.bukkit.event.inventory.ClickType clickType) getPriceType(org.bukkit.event.inventory.ClickType clickType) getReward(org.bukkit.event.inventory.ClickType clickType) getRewardType(org.bukkit.event.inventory.ClickType clickType) booleanisExtraPermissionGroup(org.bukkit.event.inventory.ClickType clickType) transformMessage(String msg, GenesisShop shop, org.bukkit.entity.Player p) Transforms the selected message by replacing price and reward placeholders with descriptions of price or reward.Methods inherited from class studio.magemonkey.genesis.core.GenesisBuy
click, containsConditions, getConfigurationSection, getInventoryLocation, hasPermission, isExtraPermissionExisting, isItemFix, meetsCondition, purchase, purchaseTask, purchaseTry, putSpecialInformation, readSpecialInformation, setInventoryLocation, setItem, updateShop
-
Constructor Details
-
GenesisBuyAdvanced
public GenesisBuyAdvanced(GenesisRewardType rewardT, GenesisPriceType priceT, Object reward, Object price, String msg, int location, String permission, String name, GenesisCondition condition, GenesisInputType inputType, String inputMessage, Map<org.bukkit.event.inventory.ClickType, ActionSet> actions)
-
-
Method Details
-
getRewardType
- Overrides:
getRewardTypein classGenesisBuy
-
getPriceType
- Overrides:
getPriceTypein classGenesisBuy
-
getReward
- Overrides:
getRewardin classGenesisBuy
-
getPrice
- Overrides:
getPricein classGenesisBuy
-
getMessage
- Overrides:
getMessagein classGenesisBuy
-
getInputType
- Overrides:
getInputTypein classGenesisBuy
-
getInputText
- Overrides:
getInputTextin classGenesisBuy
-
isExtraPermissionGroup
public boolean isExtraPermissionGroup(org.bukkit.event.inventory.ClickType clickType) - Overrides:
isExtraPermissionGroupin classGenesisBuy
-
getExtraPermission
- Overrides:
getExtraPermissionin classGenesisBuy
-
transformMessage
Description copied from class:GenesisBuyTransforms the selected message by replacing price and reward placeholders with descriptions of price or reward. If player is null only player-independent placeholders are replaced. Additionally item placeholders like amount, material and more are replaced.
The method needs to be executed once the item is created (player=null):
- to replace all player-independent placeholders
- to mark the related shop as customizable if it contains player-dependent placeholders
- to detect the inputType of this shopItem. If it is not null (default is null) players need to enter input before purchases are made
The method also needs to be executed when a certain player accesses the item (player!=null):
- to replace all player-dependent placeholders- Overrides:
transformMessagein classGenesisBuy- Parameters:
msg- Message to transform.shop- Shop this shopItem belongs to.p- Related player. Can be null.- Returns:
- transformed message.
-