BlockCommand - Run commands during block interactions


#1

This is a discussion topic for the Ore project, BlockCommand. View the full project on Ore for downloads and more information.


BlockCommand

Description

BlockCommand is a plugin similiar to the ServerSigns bukkit plugin which allows to add commands to blocks which get executed when the player interacts with the block.

Features

  • Run any command as player or server
  • Send or broadcast a message
  • Supports all blocks and pressure plates (Configurable, default is signs)

Commands

  • /bcmd add <command> - Adds a command to the block you are looking at
  • /bcmd list - Lists the commands of the block you are looking at

Permissions

  • blockcommand.command.use - Allows command usage
  • blockcommand.admin - Allows breaking blocks with commands

Placeholders

Placeholder Description
<player|name> Name of the interacting player
<uuid> UUID of the interacting player
<server|srv|s> Defines the command to be run as server/console
<message|msg|m> Defines it to be a message send to the player
<broadcast|bcast|b> Defines it to be a message send to all players

Examples

/bcmd add <srv> give <player> stone
Runs the give command as server and replaces <player> with the name of the interacting player.

/bcmd add help
Runs the help command as player.

/bcmd add <msg> Hello <player>
Sends a message to the interacting player.


#2

How many commands can I add to a block?


#3

There is no limit atm.


#4

/bcmd add
[21:12:43] [Server thread/INFO] [nucleus]: Server 执行指令: /bcmd add
[21:12:43] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Error occurred while executing command: No value present
[21:12:43] [Server thread/ERROR] [Sponge]: Error occurred while executing command ‘bcmd add’ for source DedicatedServer: No value present
java.util.NoSuchElementException: No value present
at java.util.Optional.get(Unknown Source) ~[?:1.8.0_172]
at net.mineyourmind.blockcommand.commands.AddCommand.execute(AddCommand.java:23) ~[AddCommand.class:?]
at org.spongepowered.api.command.args.ChildCommandElementExecutor.execute(ChildCommandElementExecutor.java:255) ~[ChildCommandElementExecutor.class:1.12.2-2705-7.1.0-BETA-3206]
at org.spongepowered.api.command.spec.CommandSpec.process(CommandSpec.java:388) ~[CommandSpec.class:1.12.2-2705-7.1.0-BETA-3206]
at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:341) ~[SimpleDispatcher.class:1.12.2-2705-7.1.0-BETA-3206]
at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:328) [SpongeCommandManager.class:1.12.2-2705-7.1.0-BETA-3206]
at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:1083) [dh.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71333_ah(DedicatedServer.java:432) [nz.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_172]
/bcmd add


#5

You didn’t specific any command.


#6

/bcmd add
I am using this


#7

Did you read the examples above? You have to write a command behind add.


#8

[BlockCommand] The block White wool is not listed in the config!


#9

Add the block to the config.


#10

The plugin works fine.
Good job, seriously sponge deserve more plugin like this.