-
Notifications
You must be signed in to change notification settings - Fork 14
[EN] Plugin Tutorial
The main important functions are explained in this section.
It can be executed by API or Command, but basically it is executed based on the condition of the ScriptKey.
(For example, if you want to execute a script that is set to "interact", you need to click on the target block.)
| ScriptKey | Description |
|---|---|
| interact | When you click on a block. |
| break | When you destroy a block. |
| walk | When you walked on the block. |
| hit | When a projectile hits a block. |
This will only work if you have enabled the setting to run script in Redstone.
Searches for players in the surrounding area based on the selector and filters that have been set.
(For example, if "@p" is set, it will search for the nearest player and execute the script on them.)
You can invert the result by adding ! to the first letter of the Option.
(For example, "[!$item:stone 1] [@command heal]" will execute the command only if you do not have the stone.)
| Placeholder | Description |
|---|---|
| <world> | World name |
| <online> | Number of players online |
| <players> | Number of players in the world |
See this site for more information.
| Argment | Description |
|---|---|
op=has |
Check if the player has the OP.has must be true or false. |
perm=node |
Check if the player has the Permisson.node should be a Permission Node. |
limit=number |
Limit the number of executions.number should be an Integer. |
Filters can be used to narrow down the results of the selector.
Basically, it is written in the form of filter{argument=value}.
It is also possible to specify more than one filter by writing filter{argument=value,argument=value}.
(For example, if "filter{op=true,limit=1} @a[sort=nearest]" is set, it will target the closest player who has the OP.)
| Argument | Description |
|---|---|
| <scriptkey> | See the list of ScriptKeys. |
| <options> | See the list of Options. |
| <world> | World name |
| <x> <y> <z> | X, Y, Z coordinates. |
| <needs> | Whether or not the script will work in Redstone(true / false). |
| [pasteonair] | Whether to paste the script on the air block(true / false). |
| [player] | Player name |
| [filter] | See the list of Filters. |
| [selector] | See the list of Selectors. |
| [overwrite] | Whether to overwrite the existing script(true / false). |
| Command | Description |
|---|---|
| /sbp <scriptkey> run [player] <world> <x> <y> <z> | Executes the Script at the specified coordinates. |
After executing the command, Right Click on any block.
You can specify multiple Options by enclosing them in parentheses [...].
(For example, [@player &aHEAL!!] [@bypass /heal])
| Command | Description |
|---|---|
| /sbp <scriptkey> create <options> | Create a new script to the block.The previous settings will be deleted and overwritten.
|
| /sbp <scriptkey> add <options> | Add a new script to the block.Adds only the specified options, leaving the settings unchanged.
|
| /sbp <scriptkey> remove | Remove the script from the block.Delete all settings, including cool time, etc.
|
| /sbp <scriptkey> view | View the script for the block. |
After executing the command, Right Click on any block.
| Command | Description |
|---|---|
| /sbp <scriptkey> redstone <needs> [filter] [selector] | Set if the script works with Redstone. |
First, use the Script Editor to copy the Script for any block.
Then use the Block Selector to select a range, and execute the command to paste.
| Command | Description |
|---|---|
| /sbp selector paste [pasteonair] [overwrite] | Paste the script into the selection. |
Use the Block Selector to select a range, and then execute the command to delete it.
| Command | Description |
|---|---|
| /sbp selector remove | Remove the script into the selection. |
| Command | Description |
|---|---|
| /sbp tool | Distribute the tools to the sender. |
This tool is used to select a range.
A tool for editing script.
If you want to paste a script into the selected area, copy the script in Script Editor and then execute the command.
This is a tool to search for scripts in the surrounding area.
| NMS | Description |
|---|---|
| Enabled | Searches for scripts within a 15m radius around the player.Air blocks are shown in blue, other blocks in green. Since it searches and displays blocks that are not emitting light, the load is not very high. |
| Disabled | Searches for scripts within a 10m radius around the player.Air blocks are shown in light blue, and other blocks in yellow-green. Every 0.5 seconds, a large number of particles are being sent, so the load is considerable. |
If you have enabled SortScripts, the Options will be sorted in the order in which they are registered.
This is a useful feature that sorts the Options in the best possible order.
------------------------------------
| config.yml/SortScripts: true |
------------------------------------
[@command /heal][@actionbar:You have been healed.][@delay:100] ---> [@delay:100][@actionbar:You have been healed.][@command /heal]
-------------------------------------
| config.yml/SortScripts: false |
-------------------------------------
[@command /heal][@actionbar:You have been healed.][@delay:100] ---> No change
If OptionPermission is enabled, Permission will be required to execute the option.
Permission: scriptblockplus.option.<optionid>
| Argment | Description |
|---|---|
| <optionid> | See ID in the list of Options. |