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.
/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
on my server i am running:
Pixelmon
Pixelextras
BlockCommand
command-utils-2.4.0
(for the main ones involved)
what im wanting to do is when right clicking on a sign execute this command
cu execute if ācu has in hand pixelmon:poke_ballā āpokeedit 1 ball:pokeā
so as to change the pokeball the userās first pokemon is in. with your plugin however this does not work as i assume its using " to figure out what the command it is supposed to run is. however, the command-utils-2.4.0 also uses " and requires it to be in to find out what argument is what. is there a way to either make " work inside of the blockcommand.conf or is it possible to add conditionals directly through commands and not through something like command-utils-2.4.0. ive tried even using a scoreboard method but pokeedit doesnt recognize @p in the command blocks.
Is there a way to make a block disappear after clicking? Currently I am using a custom head in my server and I want it to disappear after being used. I have tried adding world edit commands that would replace the head with air but I canāt figure it out. Thanks in advance