Vouchers

The Vouchers Module allows server owners and developers to create custom items with unique effects and commands attached. Using conditions and PlaceholderAPI placeholders, you can fine-tune item interactions to fit your server's gameplay.

Admins can give these items to players with /voucher give <player> <itemid> [amount].

Features

  • Assign commands to custom items that execute when used.

  • Utilize conditions to control item usage based on various parameters.

  • Integrate PlaceholderAPI to check player stats, permissions, and other dynamic values.

  • Configure console and player commands separately.

  • Customize item display names, lore, and enchantments for better immersion.

Condition Usage

The module supports various logical operators to create complex conditions:

  • && (AND) - Both conditions must be true.

  • || (OR) - At least one condition must be true.

  • == (EQUALS) - Compares if two values are equal.

  • != (NOT EQUALS) - Checks if values are different.

  • < (LESS THAN) - Left value must be smaller.

  • > (GREATER THAN) - Left value must be larger.

  • <= (LESS THAN OR EQUALS) - Left value must be smaller or equal.

  • >= (GREATER THAN OR EQUALS) - Left value must be larger or equal.

Example Condition

(%player_health% < 20 && %player_food% > 10) || !%player_is_flying%
  • This checks if the player's health is below 20 and food level is above 10, or if the player is not flying.

  • If a placeholder fails to parse, the condition will return false.

Example Items

Instant Heal Item

instant_heal:
  Conditions:
    check_health:
      Condition: "%player_health% < 20"
      Console Commands:
        - "[MESSAGE] §cYou are already at max health!"
    check_gamemode:
      Condition: "%player_gamemode% == SURVIVAL"
      Console Commands:
        - "[MESSAGE] §cYou can only use this item in survival mode!"
    check_permission:
      Condition: "%luckperms_check_permission_vortexprisoncore.vouchers.item.instant_health% == yes || %luckperms_check_permission_vortexprisoncore.vouchers.all%"
      Console Commands:
        - "[MESSAGE_KEY:General.No Permission]"
  Console Commands:
    - "heal <player>"
    - "[MESSAGE] - §aYou feel refreshed!"
  Item:
    Display Name: "§6§lInstant Heal"
    Material: "GOLDEN_APPLE"
    Enchantments:
      MENDING: 1
    Flags:
      - "HIDE_ENCHANTS"
    Lore:
      - "§7Heals you to max health."

Personal Money Booster

personal_money_booster:
  Item:
    Display Name: "§6§lPersonal Money Booster"
    Material: "EMERALD"
    Lore:
      - "§7Boosts your money gain by 50% for 1 hour."
    Enchantments:
      MENDING: 1
    Flags:
      - "HIDE_ENCHANTS"
  Console Commands:
    - "booster activate economy_money_booster <player> 1h"

Conclusion

The Vouchers Module provides a flexible way to create custom items with powerful effects. Using PlaceholderAPI, conditions, and command execution, you can fine-tune item interactions to enhance your server’s experience. Experiment with different setups to maximize the potential of your custom items!

Last updated