CodeRedeem

插件

· 作者 SkyX

兑换码插件

0 本站下载 0 关注 更新于 2 年前

最新 1.0.5 · 1.21.1 · Bukkit / Paper

一键开服(送7天)

CodeRedeem by SkyX

CodeRedeem

CodeRedeem 允许你为玩家创建随机兑换码,以兑换特定的奖励。

功能特性

  • 奖励系统完全可自定义,允许你根据配置文件中指定的每种代码类型定义要执行的命令。你可以在 resources 文件夹中按照你的偏好设置兑换码。
  • 确保修改代码和奖励时无需重启服务器(自动保存)。

用法

  • 玩家兑换的用法:
/redeem <Code>
  • OP(管理员)和控制台使用的用法:

command

警告

然而,请注意,不建议手动编辑 data.yml 文件。

config.yml

config.yml
# Selec Language
language: en_US
# Economy
economy:

  use-vault: true

# Advance Setting
additional-settings:
  
  example-setting: "value"

老实说,在 config.yml 中仅用于设置语言。对于其他设置,似乎无需更改它们。

example_code.yml

该文件位于 codes 文件夹中。

example_code.yml
# REDEEM CODE (use only capital letters and numbers)
code: REDEEMCODE123

# Enable or disable the code
enabled: false

# Validity date in yyyyMMdd format
validity: 20241231

# Rewards configuration 
# Reference to the book YAML file in writtenbook folder
# level enhantment 1-100
# Command must be valid
rewards:

  - book: great_tale
    custom_name: "&6The Great &cTale"
    count: 1
     
  - item: DIAMOND_SWORD
    custom_name: "&cFire &6Sword"
    count: 1
    enchantments:
      - type: FIRE_ASPECT
        level: 100
      - type: UNBREAKING
        level: 100
        
  - item: GOLDEN_APPLE
    count: 5
    
  - money: 1000
  
  - command: give {player} minecraft:diamond_sword
    message: "&x&0&8&4&C&F&BY&x&0&D&5&1&F&Bo&x&1&2&5&6&F&Bu &x&1&C&6&0&F&Bh&x&2&1&6&5&F&Ba&x&2&6&6&A&F&Bv&x&2&B&6&F&F&Be &x&3&5&7&A&F&Cr&x&3&A&7&F&F&Ce&x&3&F&8&4&F&Cc&x&4&4&8&9&F&Ce&x&4&9&8&E&F&Ci&x&4&E&9&3&F&Cv&x&5&3&9&8&F&Ce&x&5&8&9&D&F&Cd &x&6&2&A&7&F&CL&x&6&7&A&C&F&Le&x&6&C&B&1&F&Gg&x&7&1&B&6&F&Ge&x&7&6&B&B&F&Gn&x&7&B&C&0&F&Gd&x&8&0&C&5&F&Da&x&8&5&C&B&F&Dr&x&8&A&D&0&F&Dy &x&9&4&D&A&F&DW&x&9&9&D&F&Fe&x&9&E&E&4&F&Da&x&A&3&E&9&F&Dp&x&A&8&E&E&F&Do&x&A&D&F&3&F&Dn"
  
# Optional: Define how many times the code can be redeemed
# Use -1 for unlimited
redeem_limit: 10 

#dont change this
redeem_count: 0


en_US.yml

该文件位于 language 文件夹中。

en_US.yml
version: 1.0.1
# Set your langue in this

already_redeemed: "You have already redeemed this code."
book_received: "You have received the book {title}."
code_expired: "This code has expired."
code_not_available: "Code not available."
empty_book: "The book {bookName} is empty."
error_creating_book: "There was an error creating the book: {bookName}."
error_parsing_date: "Error parsing the expiration date."
error_loading_code: "Codes folder does not exist or is not a directory."
error_processing_reward: "There was an error processing one or more rewards."
invalid_book_reference: "The book reference {bookName} is invalid or does not exist."
invalid_code: "The code you provided is invalid or does not exist."
invalid_date_format: "The date format in the code configuration is invalid."
invalid_enchantment: "Invalid enchantment:  {enchantmentName}. Please check the enchantment name."
invalid_item_material: "Invalid item material: {itemName}. Please check the item name."
invalid_reward_format: "The reward format is invalid."
invalid_subcommand: "Invalid subcommand. Use /cr help for a list of commands."
money_received: "You have received ${money}"
no_permission: "You do not have permission to use this command."
only_players: "This command can only be used by players."
plugin_reloaded: "The plugin has been reloaded successfully."
redeem_limit_reached: "The redeem limit for this code has been reached."
redeem_successful: "You have successfully redeemed the code!"
reloaded: "Plugin configuration and language reloaded successfully."
usage_subcommand: "Usage: /cr {subCommand}"
usage_info: "Usage: /cr info <code>"
usage_redeem: "Usage: /redeem <code>"
warning_throw_book: "This written book cannot be discarded."
message_received_reward: "You have received {count} {itemName}s."
inalid_number_format_for_length: "Invalid number format for length."
invalid_length: "Length must be between 6 and 16."
invalid_code_length: "Code must be beween 6 and 16 character"
success_create_code: "File created and modified successfully. New file: "
failed_create_code: "Failed to save the new file."
code_not_found_in_data: "Code not found in data"
code_refreshed: "The code was successfully refreshed"
failed_refresh_code: "The code failed to refresh"
op_only: "You must be an operator to use this command."
hold_written_book: "You must be holding a Written Book."
invalid_book: "The item in your hand is not a valid written book."
no_title: "The written book must have a title."
file_exists: "A file with this title already exists. Choose a different title."
save_success: "The book has been successfully saved as {fileName}."
save_error: "An error occurred while saving the book."
usage_enable_code: "Usage: /cr enable <code>"
usage_disable_code: "Usage: /cr disable <code>"
code_enabled_successfully: "The code has been enabled successfully."
code_disabled_successfully: "The code has been disabled successfully."
error_saving_file: "An error occurred while saving the file."
invalid_redeem_code: "Invalid redeem code. Please contact the administrator."
error_enable_code: "Failed to enable code. Because the code has been enabled"
error_disable_code: "Failed to disable code. Because the code has been disable"

translate for /cr info

code_info_header: "代码信息" status: "状态" code: "代码" validity_date: "有效期至" redeem_limit: "兑换上限" redeem_count: "已兑换次数" file: "文件名"


</details>

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源