Blocks To Commands 4

Allows player to assign a command to any block in-game | Make any block run a command!

  1. ILoveAMac
    Native Minecraft Version:
    1.13
    Tested Minecraft Versions:
    • 1.13
    Source Code:
    https://github.com/ILoveAMac/BlocksToCommands
    VAULT SUPPORT!
    Vault is a dependency for this plugin!
    can be found here: https://dev.bukkit.org/projects/vault
    (1.12)
    or here https://www.spigotmc.org/resources/vault.34315/ (1.13)

    For 1.12 support: Download version 3.12
    For 1.13 support: Download version 4

    The plugin allows the player to assign any command to a block. The command will be run when a player right clicks the block. The command will be run from console or from the player depending on how you set it up.



    HOW TO USE:
    - Look at block
    - do /btc <name> <create> <runFromConsole> <command>
    (/btc diamonds create true give @p diamond 1 )
    OR
    (/btc diamonds02 create false give @p diamond 1)
    The true-false value will tell the plugin if the command should be run from console or if the player must execute the command



    - Right-click block (command will run that you set.
    Players must have btc.use to be able to right-click the block)

    REMOVE A BLOCK COMMAND:

    - Go in config file and delete it.
    - reload server / restart server
    ===OR===
    - crouch and break the block (only possible with perm btc.remove)
    ===OR===
    - btc <name> remove


    Do "/btc list" to see a list of the blocks that have been set

    PERMISSIONS:

    - btc.create
    - btc.remove All permissions can be configured in config.yml
    - btc.use
    - btc.cost
    - btc.reload
    - btc.list

    Vault Support (NEW!)
    - Add Costs to blocks
    Commands:
    - /btc {name} cost add {amount}
    - /btc {name} cost remove

    VARIABLES:
    Variables are inside a container that looks like this: ${variableName}

    - ${name} - gets name of player
    - ${displayName} - gets player display name
    - ${uuid} - gets UUID of player
    - ${ip} - gets player ip
    - ${near} - @p (will be changed in future to work from console)
    - ${randomPlayer} - gets random name of a player online
    - ${x}
    - ${y} - X Y Z values of player pos
    - ${z}
    - ${blockX}
    - ${blockY} - X Y Z values of block clicked pos
    - ${blockZ}
    - ${world} - gets current world name

    How to use variables:

    /btc test create true give ${name} diamond 1

    Variables are case sensitive and must be typed out as shown above!
    They use camelCasing (first-word first letter lowercase, all following words have an uppercase letter at the beginning of the word)


    Code (Text):

    # BlocksToCommands (V.3.8) 2017
    # By ILoveAMac

    #====IF YOU DON'T UNDERSTAND THE CODE BELOW LEAVE IT ALONE====#
    permissions:
      create: btc.create
      remove: btc.remove
      use: btc.use
      cost: btc.cost
      reload: btc.reload
      list: btc.list

    messages:

      # Player does not have needed perms set above
      noPermsCreate: '&4You do not have permission to perform the command!'
      noPermsRemove: '&4You do not have permission to perform the command!'
      noPermsUse: '&4You do not have permission to use this block!'
      noPermsGeneric: '&4You do not have permission to do this!'

      # Exception occurred during the right click
      clickException: '&c[btc] Unfortunately this block is not working as it should. Please contact an administrator to get this fixed.'

      # May not break block
      noBreak: '&4You do not have permission to break this block!'

      # Name already in blocks.yml
      nameAlreadySet: '&c[BTC] This name is in use, rename and try again.'

      # Block removed
      blockDelete: '&a[BTC] The block was removed!'

      # Block does not exist in blocks.yml
      notExist: '&c[BTC] The command could not be removed because it does not exist!'

      # No true / false value for runFromConsole *DON'T TOUCH TO PREVENT CONFUSION!*
      noRunFromConsole: '&c[BTC] You must give a true / false value for runFromConsole!'

      # Player does not have enough funds
      noFunds: '&c[BTC] You don't have enough funds to use this!'

      currency: 'dollars'

    options:
      # can Shift remove blocks
      shiftRemove: true
     

    Code (Text):
    diamonds:
      Name: diamonds
      Command: give @p diamond 1
      runFromConsole: true
      World: Hub
      X: -2
      Y: 72
      Z: 4
      cost: '0'
    diamonds02:
      Name: diamonds02
      Command: give @p diamond 1
      runFromConsole: false
      World: Hub
      X: 0
      Y: 72
      Z: 4
      cost: '0'
     

    The plugin has been made open source on GitHub, however, I am planning to recode the plugin as the code is not on a standard I am comfortable with. The source code for the plugin is only compatible with 1.13.

    Thank you for over 2000
    downloads!

    Have any features suggestions?
    Tell me in the discussion section

    or fork the project on GitHub
    joda, MindoTv and shaokeyibb like this.

Recent Reviews

  1. iTeChNoLoGiCi
    iTeChNoLoGiCi
    5/5,
    Version: 4
    Plugin is ultra cool,easy to use and useful!Love it!
    Though,could you make BTC "Entity edition"?Would work the same way but entities instead of blocks.
    Or perhaps you could add it as a feature? :o
    Thanks anyways,i love your work <3
  2. TIMORAD
    TIMORAD
    2/5,
    Version: 4
  3. Nekiplay4
    Nekiplay4
    4/5,
    Version: 4
    add 1.8
    111111111111111111111111111111111111111111111111111111111111111111111111111111111111
  4. Gustavo_Player
    Gustavo_Player
    5/5,
    Version: 3.12
    Great plugin! =)
  5. AlexiMaria
    AlexiMaria
    3/5,
    Version: 3.12
    Please remove sounds or add it on config.yml
    ----------------------------------------------------------------------
  6. Asura_Prism
    Asura_Prism
    4/5,
    Version: 3.12
    I'm have error when use in 1.10-R2 plz fixed!
    Really love you plugin xDDDDDDDDDD
  7. yoyoyoghurtboy
    yoyoyoghurtboy
    4/5,
    Version: 3.12
    pls make a future you can set all of one sort block to a command pls pls pls i maked a computer and a rp but i can't trigger the computer
  8. Keffisor21
    Keffisor21
    5/5,
    Version: 3.12
    Please add a support for 1.8.8 ;-;
    ------------------------------------------------
  9. minez
    minez
    5/5,
    Version: 3.12
    Thanks to the author for the plugin and for responsiveness! The plugin is very cool running and has a bunch of settings, I recommend!
    1. ILoveAMac
      Author's Response
      Thanks! I appreciate the feedback!
  10. AxeelGames
    AxeelGames
    2/5,
    Version: 3.10
    HELP
    25.09 18:56:57 [Server] ERROR Could not pass event PlayerInteractEvent to BlocksToCommands v3.1
    25.09 18:56:57 [Server] INFO org.bukkit.event.EventException
    25.09 18:56:57 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:228) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:195) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.BlockPressurePlateWeighted.f(BlockPressurePlateWeighted.java:32) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.BlockPressurePlateAbstract.a(BlockPressurePlateAbstract.java:100) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.BlockPressurePlateAbstract.a(BlockPressurePlateAbstract.java:93) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.Entity.checkBlockCollisions(Entity.java:761) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.Entity.move(Entity.java:407) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.EntityLiving.g(EntityLiving.java:1395) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.EntityHuman.g(EntityHuman.java:1355) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.EntityLiving.m(EntityLiving.java:1652) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.EntityHuman.m(EntityHuman.java:393) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.EntityLiving.t_(EntityLiving.java:1487) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.EntityHuman.t_(EntityHuman.java:173) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.EntityPlayer.l(EntityPlayer.java:285) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:382) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.PacketPlayInFlying.a(SourceFile:126) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.PacketPlayInFlying$PacketPlayInPosition.a(SourceFile:57) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_141]
    25.09 18:56:57 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_141]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141]
    25.09 18:56:57 [Server] INFO Caused by: java.lang.NoSuchMethodError: org.bukkit.event.player.PlayerInteractEvent.getHand()Lorg/bukkit/inventory/EquipmentSlot;
    25.09 18:56:57 [Server] INFO at za.co.wihan.Listeners.PlayerInteract.onInteract(PlayerInteract.java:34) ~[?:?]
    25.09 18:56:57 [Server] INFO at sun.reflect.GeneratedMethodAccessor334.invoke(Unknown Source) ~[?:?]
    25.09 18:56:57 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_141]
    25.09 18:56:57 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_141]
    25.09 18:56:57 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:56:57 [Server] INFO ... 29 more
    25.09 18:57:18 [Server] INFO AxeelGames issued server command: /btc randomsdas create false sw join
    25.09 18:57:20 [Server] ERROR Could not pass event PlayerInteractEvent to BlocksToCommands v3.1
    25.09 18:57:20 [Server] INFO org.bukkit.event.EventException
    25.09 18:57:20 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:228) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at net.minecraft.server.v1_8_R3.PlayerInteractManager.interact(PlayerInteractManager.java:463) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:759) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at net.minecraft.server.v1_8_R3.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:52) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at net.minecraft.server.v1_8_R3.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:1) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_141]
    25.09 18:57:20 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_141]
    25.09 18:57:20 [Server] INFO at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141]
    25.09 18:57:20 [Server] INFO Caused by: java.lang.NoSuchMethodError: org.bukkit.event.player.PlayerInteractEvent.getHand()Lorg/bukkit/inventory/EquipmentSlot;
    25.09 18:57:20 [Server] INFO at za.co.wihan.Listeners.PlayerInteract.onInteract(PlayerInteract.java:34) ~[?:?]
    25.09 18:57:20 [Server] INFO at sun.reflect.GeneratedMethodAccessor334.invoke(Unknown Source) ~[?:?]
    25.09 18:57:20 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_141]
    25.09 18:57:20 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_141]
    25.09 18:57:20 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    25.09 18:57:20 [Server] INFO ... 17 more
    1. ILoveAMac
      Author's Response
      Not the place to post this... Please post it in the discussion section next time. I will fix the bug asap