Closed syylaxx closed 2 weeks ago
Have you checked the return value of dispatch_command
? It could be that the player doesn't have the permission to run the /scriptevent
command. In which case I suggest using the execute as
command to run it. See the solution here: https://github.com/EndstoneMC/endstone/issues/64.
I didn't check the return value. But whenever you try running a scriptEvent as a player without op. It sends a error message "You do not have permission to use that command". In the screenshot I sent, we can see that it says it performed scriptEvent. I will try using execute as soon as I will hop on.
Update: i had one mistake in my command: you cannot send a message stating with [] without quotes... Works how it should, so my mistake.
Description Using self.server.dispatch_command() with scheduler doesnt result in actual scriptEvent.
To Reproduce Use this code below, and set a scheduler. I run this every 5 seconds, 100 Minecraft-Ticks.
Expected behavior Triggering scriptEventReceiveEvent in Minecraft Script API.
Screenshots:
When running /rename Console logs an Error due to it executing scriptevent. scriptEvent ran with scheduler doesnt output error "ASDASD".
Details:
Additional context Console sends a message whenever the commands should be performed but Script API doesnt receive ScriptEventMessage. For example when running scriptEvent on "on_command", scriptEvent works perfectly fine. Using scheduler doesnt.