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.

It is recommended you set reward.give-method option value to INSTANT in config.yml if you set can-close to false here. Otherwise, if player leave the server during the timer and didn't get back in server, all his reward will lost! This will lose some animation effects, but it will reduce the likelihood of players losing rewards.

  • 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:
        - 'none'
  rewards:
    1:
      material: GOLDEN_APPLE
      amount: 1~5
      rates:
        default: 3
        vip: 30
      rates-conditions:
        vip:
          - '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:
        - 'announcement: &a[FlipCard] %player% received &6%amount%-%display%'
      actions:
        - 'message: &a[FlipCard] %display% has send to your inventory!'
  • 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 v2 Price Config.

  • rewards: Reward config. For more details, please view v2 Rewards Config.

Last updated