1 281
收录服务器
1 758
注册
45 675
玩家
Blocks To Commands 指令方块
允许玩家分配一个命令到任何块在游戏中|使任何块运行命令!
作 者 ILoveAMac
发布时间 2017年6月11日
支持核心 Spigot
原生版本
支持版本 1.8,1.9,1.10,1.11,1.12,1.13,1.14,1.15
点此下载

🧱BlocksToCommands

BlocksToCommands 插件允许玩家将任何命令分配给一个方块。当玩家右键点击该方块时,命令将被执行。命令可以从控制台或玩家处运行,具体取决于你的设置。

📌使用方法

  1. 看着目标方块。
  2. 输入 /btc create <name> 创建一个方块命令。
  3. 输入 /btc add cmd <name> <runFromConsole: true/false> <command> 添加命令。
  4. 输入 /btc help 获取更多信息。

右键点击方块,设定的命令将会运行。玩家需要拥有 btc.use 权限以及你设置的自定义权限才能使用该方块。

📌移除方块命令

方式一:潜行并破坏方块(需要 btc.remove 权限)。

方式二:使用命令 /btc remove <name>

使用 /btc list 查看已设置的方块列表。

🔑权限

  • btc.admin
  • btc.use
  • 自定义权限:使用 /btc set perm <name> <perm> 设置,例如:/btc set perm test my.perm

💰Vault 支持

可以为方块设置使用费用。

命令:

  • /btc set cost <name> <amount>
  • /btc remove cost <name>

⚙️变量

变量位于容器内,格式如下:${variableName}

  • ${name} - 获取玩家名字
  • ${displayName} - 获取玩家显示名字
  • ${uuid} - 获取玩家 UUID
  • ${ip} - 获取玩家 IP 地址
  • ${randomPlayer} - 获取一个在线的随机玩家名字
  • ${x}
  • ${y} - 玩家位置的 X、Y、Z 值
  • ${z}
  • ${blockX}
  • ${blockY} - 点击方块位置的 X、Y、Z 值
  • ${blockZ}
  • ${world} - 获取当前世界名字

如何使用变量:


/btc add cmd <name> true op ${name}
/btc add msg <name> &aHello ${name}

变量区分大小写,必须按照上述格式输入!变量名采用驼峰命名法(第一个单词首字母小写,后面每个单词首字母大写)。

🛠️配置示例

config.yml


# ________ _________ ________
# |\ __ \|\___ ___\\ ____\
# \ \ \|\ /\|___ \ \_\ \ \___|
# \ \ __ \ \ \ \ \ \ \
# \ \ \|\ \ \ \ \ \ \ \____
# \ \_______\ \ \__\ \ \_______\
# \|_______| \|__| \|_______|

# BlocksToCommands (V.5.0.0 BETA) 2020
# API: Minecraft 1.8

# By ILoveAMac

# These are the messages non-admin players will receive
# The fundsDeducted and notEnoughFunds message has variables.
# ${cost} -> Value that was deducted from the payer's account.
# ${currency} -> Server currency as set below.
messages:
  mayNotPerformCommand: '&cYou do not have permission to perform this command.'
  mayNotBreakBlock: '&cYou do not have permission to break this block.'
  mayNotUseBlock: '&cYou do not have permission to use this block.'
  notEnoughFunds: '&cYou do not have enough ${currency} to use this block.' # e.g You do not have enough dollars to use this block.
  fundsDeducted: '&a${cost} ${currency} were deducted from your account.' # e.g 10 dollars were deducted from your account

# Server currency
currency: 'dollars'

# Additional configuration
options:
  adminShiftRemove: true # When enabled players with the perm btc.admin ac hold shift and break a BTC block to delete it
  interactSounds: true # Play sounds when players interact with BTC blocks # NOT IMPLEMENTED YET
  metrics: true # collect anonymous data to help improve plugin?

# Plugin perms
# btc.admin -> Give only to admins on server
# btc.use -> Give to players you want to use BTC blocks
# custom perms can be assigned to blocks too. If a block has a custom perm, a player needs btc.use and the custom set perm in order to use the block

op.yml


Block:
  name: op
  location:
    world: world
    x: -319
    y: 144
    z: 415
  messages:
    msg_1:
      message: '&aYou are now OP'
  commands:
    cmd_1:
      command: op ${name}
      runFromConsole: true
    cmd_2:
      command: money
      runFromConsole: false
  cost: 1000.0