📝UI Config
Where can I find them?
All cards event configurations are saved in /plugin/FlipCard/ui
folder.
Name
Every FlipCard card flop UI configuration have its unique name. It likes example.yml. The name of card configuration determines the command arg <uiName>
when you use the plugin's commands. Taking example.yml as an example, you need use /fc forceopen <PlayerName> example command to open its card flop UI.
Composition
All card configurations are composed of UI configuration and reward configuration.
UI Configuration
Open a card configurations, you will find the following section.
settings:
slots: [9,11,13,15,17,36,38,40,42,44]
title: "&9Pass Reward"
time: 60
timer: true
display: true
auto-close: true
can-close: true
auto-claim-free-rewards: true
close-animal: true
total-max: 10
slots: Slots of the item representing the card. Only can be set to: [9,11,13,15,17,36,38,40,42,44] (10 cards) or [10,12,14,16,37,39,41,43] (8 cards).
title: Titles of the card flip UI. In language file there also have some language key to use in the UI title. Both them support use
{timer}
(display left times, in second) and{times}
(display total left flip times, if this value is 0, player no longer can flip card in the UI) placeholder.time: Duration of the card flip. Players must claim cards in this time. ONLY take effect when the timer option is enabled.
timer: Enable or disable timer.
display: Allow or disallow player preview the card rewards. After preview the cards will be shuffled.
auto-close: Whether the flip UI will close after all cards have floped.
can-close: Whether the flip UI can close by player self or player have to wait the timer is out.
close-animal: Whether display close animal when auto close enabled and activated. In this animal, all cards will display its reward (however players wont get them) before UI closes.
auto-claim-free-rewards: Whether plugin will auto send all free type rewards to players after they close flip UI.
total-max: Total max flip limit for all cards in a flip UI. Default to -1, which means no limit.
Card Type Configuration
The following section are card type configurations. Each card type configureation mean one card type, not one card.
card_1:
# card_1's config
card_2:
# card_2's config
card_3:
# card_3's config
The detailed configuration is as follows:
card_1:
front: card2
back: card3
amount: 5
name: "&dLucky Flip - Advanced"
lore:
- "You need to cost %price% "
- "to flip this card"
prices:
1:
material: STONE
placeholder: 'STONE x10'
apply: [1,2]
amount: 10
2:
economy-plugin: Vault
placeholders:
2: '$10'
3: '$20'
4: '$30'
5: '$40'
apply: [2,3,4,5]
cost: [10,20,30,40]
conditions: []
rewards:
1:
material: GOLDEN_APPLE
amount: 1~5
rates:
default: 3
vip: 30
rates-conditions:
vip:
1:
type: permission
permission: 'group.vip'
edge: very_rare
2:
material: DIAMOND
amount: 5~10
rate: 6
edge: rare
3:
material: ENCHANTED_GOLDEN_APPLE
amount: 5~10
rate: 1
edge: very_very_rare
flip-actions:
1:
type: announcement
message: '&a[FlipCard] %player% received &6%amount%-%display%'
actions:
1:
type: announcement
message: '&a[FlipCard] %display% has send to your inventory!'
card_2:
front: card2
back: card1
amount: 5
name: "&bLucky Flip"
lore:
- "You need to cost %price% "
- "to flip this card"
- "You should have permission: group.default when flip this card first time"
- "You should in world Wolrd When flip this card second time"
prices:
1:
free: true
apply: [1,2]
conditions:
1:
1:
type: permission
permission: 'group.default'
2:
1:
type: world
world: world
2:
type: permission
permission: 'group.default'
2:
material: "sword"
placeholder: "A OR TWO SUPER SWORD?!"
start-apply: 3
amount: 2
3:
economy-plugin: Vault
placeholders:
# Apply Times: Placeholder String
1: '$50'
2: '$500'
3: '$1000'
4: '$1500'
5: '$2000'
apply: [1,2,3,4,5]
cost: [50,500,1000,1500,2000]
conditions:
1:
type: world
world: world
2:
type: permission
permission: 'group.default'
rewards:
1:
material: IRON_INGOT
amount: 5~10
rate: 10
edge: common
2:
material: DIAMOND
amount: 1~2
rate: 5
edge: rare
3:
material: GOLD_INGOT
amount: 1~5
rate: 6
edge: rare
# If you want to use saved items:
4:
material: "sword"
amount: 1
rate: 1
edge: very_rare
limit: 1
# If you want to use commands as reward
5:
material: GOLD_NUGGET
name: "&6money"
cmd: 10
amount: 1
lore:
- "x1000"
give-item: false
actions:
1:
type: console_command
command: "eco give %player_name% 1000"
rate: 5
edge: common
# If you want to use hook plugins
6:
hook-plugin: MMOItems
hook-item: SWORD;;TEST
rate: 5
edge: common
front: Texture of unfliped card.
back: Texture of fliped card.
animate: Custom animate used by this card type, if set, you should remove front and back option here.
max: The max flip max times in a card flip event. It should be less than amount.
amount: Amount of this type of card. The combined value of all cards amount cannot be greater than the value set by the slot option. (For example, 10 slots = 10 cards)
name: Card display name.
lore: Card lore. Can use
%price%
to display its cost.prices: Price config. For more details, please view Price Config.
rewards: Reward config. For more details, please view Rewards Config.
Last updated