Block Commands

Block Commands

5.7k Downloads

Looking for a replacement of the ScriptBlock ?

Here it is!

Block Commands----Powerfull Script Block Mod Both for server and singer players.!

Want Your Players to change weather even if they are not OPs?

Want Your Players buy things using Items?

Want to Set traps && Awards simply by using commands ?

You can do all these in this Mod!

It can Be run on servers only ! Clients do not have to install it !

Basic Commands:

/commandcreate [Notes] prepare to add a command to a block by right click it, at least contains "@Command".

Example: /commandcreate @Command:/weather clear @isWalk

/commandadd [Notes] prepare to add some notes to a block's last added command. Can not contain "@Command".

/commanddel prepare to remove commands on a block by right click it.

/commandview View Mode, right click a block to show all commands on this block.

/commandclear Clear all commands in this world.

/commandfind [Distance] show all blocks with commands in a certain range of coordinates.

/comandremove [PosX] [PosY] [PosZ] delete commands on Block [PosX] [PosY] [PosZ].

/commanddis Exit Command Edit Mode. 

Optional Notes:

@isWalk
Usage:allow this command to be excuted by walk by a block

@isClick
Usage:allow this command to be excuted by click by a block

Note that A command needs at least one of "@isWalk" and "@isClick".

@Command
Usage: @Command:CommandText
Example: @Command:/weather clear @isWalk @isClick

This will excute "/weather clear" when a player walk by or left click the block if the player has the permission.

@Message
Usage: @Command:MessageText
Example: @Message:I'm a fool. @isWalk

This will send "I'm a fool" to the command excutor.

@Bypass
This Note will make the player have OP permission when excuting this command.
Example: @Command:/weather rain @isWalk.

This will excute "/weather rain" when a player walk by a block, whether or not the player has the permission.

@Player
Usage: @Player:playername
Only this player can excute this command.
Example: @Command:/weather rain @Player:Tom @isWalk @Bypass

Only Tom can excute this command.

@Cooldown
This will add a cooldown time to this command.
Usage: @Cooldown:cooldownseconds
Example: @Command:/weather rain @Cooldown:5 @isWalk
After this command excuted,you can not excute it in 5 seconds.

Note that I use the current real time when coding.

@Amount
Pattern:@Amount:amount
This limits the command excutes times.
Example: @Command:/give @a diamond 2 @isWalk @Amount:3

This is useful in servers..as you imagine

@Delay
Pattern:@Delay:delayseconds
this command will be excuted after some seconds.
Example: @Command:/kill @a @Message:You will die! @isWalk @Dealy:5

@Item
Pattern:@Item:itemname:amount
When excuting this command, you will need to cost some items,but when amount = 0 or -1 means you need to have this item but
excute this command will not decrease the amount of your item.
Example: @Command:/day @Message:Cost 2 Apples to by a day @isWalk @Cooldown:5 @Item:apple:2

@Punish
Pattern:@Punish:CommandText
Will excute this command when can't satisfy the "@Item" restrictions.
Example: @Command:/give @a apple 2 @Message:find 2 Diamonds in 30 seconds to buy 2 apples or you will die! @Delay:30 @Item:dimond:2 @Punish:/kill @a

@isBreak
Skip the execution of the remaining commands on the block when the command's "@Item" or the "@Player" constraints are not met
For example, there are two commands on a bloxk:
The first one is @Command:/give @a apple 64 @Message:2 Diamonds to buy 64 Apples and 64 Wool @Item:diamond:2 @isBreak @isWalk 
The second is @Command:/give @a wool 64 @isWalk
In this case, if the player does not give enough 2 diamonds, the following command on the block will not be executed without executing this command itself.

Note that all Optional "@" Above can be used only once in a command.
But you can add multiple commands to one block.

A block with commands can not be destoryed by players but can be destoryed by TNT or creeper..

Server Plugin Under Sponge API with permission operations is under developing too!

V2.2 update: Pay attention that "@Split" , "&&" is prohibited.