LimitedUses [BSP] - Allows to limit the amount of uses of shop items

LimitedUses [BSP] - Allows to limit the amount of uses of shop items - LimitedUses [BSP] - 限制商店物品使用次数

此BossShopPro附加组件通过添加新的条件类型,允许限制物品的使用次数。
Bukkit / Spigot 作者 Blackixx 支持版本 1.7 - 1.15
服务器使用量
未统计
服务玩家数
未统计
下载量
5,376
插件详细介绍

LimitedUses 是一款 BossShopPro 插件扩展,它通过新增条件类型,允许你限制玩家购买商店物品的次数或设置购买冷却时间。

功能特性

  • 新增两种条件类型:
- **uses**:基于玩家先前购买次数的条件。
- **cooldown**:为物品购买设置冷却时间(以秒为单位)。
  • 新增占位符:
- `%uses%`:显示玩家对当前商店物品的购买次数。
- `%uses_<商店名>:<物品名>%`:在任何地方显示玩家对特定商店物品的购买次数。
- `%cooldown_<商店名>:<物品名>%`:在任何地方显示特定商店物品的剩余冷却时间。
  • 插件本身非常轻量,对服务器性能影响极小。

命令

以下命令可用于管理玩家的购买次数(例如,允许玩家购买更多次数)。使用这些命令需要 LimitedUses.Modify 权限。

  • lius set <玩家名> <商店名> <物品名> <次数>:将玩家对指定商店物品的购买次数设置为特定值。
  • lius add <玩家名> <商店名> <物品名> <次数>:为玩家对指定商店物品的购买次数增加特定值。
  • lius remove <玩家名> <商店名> <物品名> <次数>:为玩家对指定商店物品的购买次数减少特定值。
  • lius reset <玩家名> <商店名> <物品名>:重置玩家对指定商店物品的购买次数。
  • lius reset <玩家名>:重置该玩家对所有商店物品的购买次数。
  • lius resetall:重置所有玩家对所有商店物品的购买次数。

配置示例

单个物品配置示例

以下是一个在 BossShopPro 商店配置中使用 uses 条件的物品示例,它限制玩家最多购买 10 次。

Obsidian:
  MenuItem:
    - type: OBSIDIAN
    - amount: 64
    - name: '&964 Obsidian'
    - 'lore: &cPrice: %price%#&eBought: &4%uses%/10 &etimes.'
  RewardType: ITEM
  Reward:
    - - type: OBSIDIAN
      - amount: 64
  PriceType: MONEY
  Price: 10000
  Message: '&eYou bought %reward%! Money left: &c%left%'
  ExtraPermission: ''
  InventoryLocation: 7
  Condition:
    - type: uses
    - below: 10

完整商店配置示例

这是一个完整的示例商店配置,展示了 usescooldown 条件的使用。

# 这是一个展示 LimitedUses 插件的示例商店
ShopName: LimitedUses
DisplayName: '&4&lLimitedUses'
Command: limiteduses
signs:
  text: '[LimitedUses]'
  NeedPermissionToCreateSign: true
shop:
  Diamond:
    MenuItem:
      - type: DIAMOND
      - amount: 1
      - name: '&dDiamond'
      - 'lore1: &8You can purchase one diamond every ten hours.'
      - 'lore2: &cPrice: %price%.'
    RewardType: ITEM
    Reward:
      - - amount: 1
        - type: DIAMOND
    PriceType: MONEY
    Price: 150.0
    Message: '&eYou bought a diamond for %price%.'
    ExtraPermission: ''
    InventoryLocation: 1
    Condition:
      - type: cooldown
      - over: 36000

  Diamond_blocked:
    MenuItem:
      - type: BARRIER
      - amount: 1
      - name: '&f&lOut of stock'
    RewardType: NOTHING
    PriceType: NOTHING
    Message: '&8Come back in %cooldown_LimitedUses:Diamond%.'
    ExtraPermission: ''
    InventoryLocation: 1

  StarterKit:
    MenuItem:
      - type: WOOD_PICKAXE
      - amount: 1
      - name: '&fStarter Kit'
      - 'lore: &8Click to receive your starter kit.'
    RewardType: ITEM
    Reward:
      - - amount: 1
        - type: WOOD_PICKAXE
      - - amount: 1
        - type: WOOD_SPADE
      - - amount: 1
        - type: WOOD_AXE
      - - amount: 1
        - type: WOOD_SWORD
      - - amount: 16
        - type: TORCH
      - - amount: 32
        - id: 4
    PriceType: NOTHING
    Message: '&eReceived your starter kit.'
    ExtraPermission: ''
    InventoryLocation: 2
    Condition:
      - type: uses
      - under: 1

  StarterKit_blocked:
    MenuItem:
      - type: BARRIER
      - amount: 1
      - name: '&f&lOut of stock'
      - 'lore: &cYou have already taken your starter kit.'
    RewardType: NOTHING
    PriceType: NOTHING
    Message: ''
    ExtraPermission: ''
    InventoryLocation: 2

  Obsidian:
    MenuItem:
      - type: OBSIDIAN
      - amount: 64
      - name: '&964 Obsidian'
      - 'lore1: &cPrice: 10000 Money'
      - 'lore2: &cBought: &b%uses%&c/&b15 &ctimes.'
    RewardType: ITEM
    Reward:
      - - type: OBSIDIAN
        - amount: 64
    PriceType: MONEY
    Price: 10000
    Message: '&eYou bought %reward%! Money left: &c%left%'
    ExtraPermission: ''
    InventoryLocation: 3
    Condition:
      - type: uses
      - under: 15

注意事项

  • 本插件是 BossShopPro 的扩展,必须先安装 BossShopPro 主插件才能使用。
  • 管理命令需要 LimitedUses.Modify 权限。
  • 占位符 %uses_<shop>:<item>%%cooldown_<shop>:<item>% 可以与其他支持 PlaceholderAPI 的插件配合使用,在更多地方显示信息。
测试支持版本
1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15
版本分布
基本信息
插件名称 LimitedUses [BSP] - Allows to limit the amount of uses of shop items
作者 Blackixx
平台 Bukkit / Spigot
支持版本 1.7 - 1.15
点赞数 7
最近版本
暂无数据 -

友情链接: 网易我的世界 | 泰拉瑞亚 | ocent云计算 | 米饭Minecraft插件文档 | 友链合作

历史访问人数:2,621,005  |  历史访问人次:3,177,850

今日访问人数:42,195  |  今日访问人次:47,471

昨日访问人数:24,332  |  昨日访问人次:29,698

Copyright © 2019-2026 我的世界服务器列表站. All rights reserved.

Powered by GermMC 京ICP备17023959号-6