Skript

Skript

743k Downloads

Command no longer has event-block option

ShaneBeee opened this issue ยท 1 comments

commented

Skript/Server Version

[09:53:42 INFO]: [Skript] Server Version: 1.21-DEV-aa8d38d (MC: 1.21)
[09:53:42 INFO]: [Skript] Skript Version: 2.8.7 (selfbuilt-unknown)
[09:53:42 INFO]: [Skript] Installed Skript Addons: 
[09:53:42 INFO]: [Skript]  - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[09:53:42 INFO]: [Skript]  - SkBee v3.5.6 (https://github.com/ShaneBeee/SkBee)
[09:53:42 INFO]: [Skript]  - SkBriggy v1.3.2
[09:53:42 INFO]: [Skript] Installed dependencies: 
[09:53:42 INFO]: [Skript]  - Vault v1.7.3-b131

Bug Description

According to the docs:
https://docs.skriptlang.org/expressions.html?search=#ExprCommandSender

block should be usable in a command to get the CommandBlock issuing a command.
I believe this used to work.
I have a small feeling this broke due to the changes made regarding holder of block expression.

Expected Behavior

The command block should be returned.

Steps to Reproduce

test code

command /test:
	trigger:
		broadcast "Sender: %sender% // Block: %event-block%"

Errors or Screenshots

error:

[09:53:15 INFO]: Line 4: (test.sk)
[09:53:15 INFO]:     There's no block in a command event
[09:53:15 INFO]:     Line: broadcast "Sender: %sender% // Block: %event-block%"

Other

A possible fix is adding a block event value to the command event.

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
commented

Adding a BlockCommandSender -> Block converter would probably be best here, since sender's location should also be valid.