Olyno/skent

Right click on sign still not fixed.

Closed this issue · 3 comments

Describe your problem

A new release, a new things, a new bugs. I have installed the newest version of Skent and this happened:
I tried to right click sign to save the text and location from it into yml file.

Versions

Skript: Skript version 2.5.3
Server: This server is running Purpur version git-Purpur-1022 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
Skent: Skent version 3.0.0

Code

on rightclick on any sign:
	if file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt" is missing:
		create file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt"
	set {_now} to now formatted as "[dd.MM.yyyy HH:mm:ss]"
	set {_loc} to "<x: %x-loc of event-block%; y: %y-loc of event-block%; z: %z-loc of event-block%; świat: %event-block's world%>"
	append "%{_now}%" to file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt"
	append "%{_loc}%" to file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt"
	append "- %line 1%" to file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt"
	append "- %line 2%" to file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt"
	append "- %line 3%" to file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt"
	append "- %line 4%" to file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt"

Error

https://pastebin.com/uNEuVWbt

Result:
[18.03.2021 19:38:07]
<x: -78.5; y: 72.5; z: 84.5; świat: world>
[18.03.2021 19:39:25]

using this complicated code:

on rightclick on any sign:
	if file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt" is missing:
		create file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt"
	else:
		set {_now} to now formatted as "[dd.MM.yyyy HH:mm:ss]"
		wait 3 tick
		set {_loc} to "<x: %x-loc of event-block%; y: %y-loc of event-block%; z: %z-loc of event-block%; świat: %event-block's world%>"
		wait 3 ticks
		append "%{_now}%" to file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt"
		wait 3 ticks
		append "%{_loc}%" to file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt"
		wait 3 ticks
		set {_1} to line 1 of clicked block
		wait 3 ticks
		append "- %{_1}%" to file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt":
			wait 3 ticks
			set {_2} to line 2 of clicked block
			wait 3 ticks
			append "- %{_2}%" to file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt":
				wait 3 ticks
				set {_3} to line 3 of clicked block
				wait 3 ticks
				append "- %{_3}%" to file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt":
					wait 3 ticks
					set {_4} to line 4 of clicked block
					wait 3 ticks
					append "- %{_4}%" to file path "Gracze/Folder Gracza: %player%/Tabliczki gracza/Stare tabliczki.txt"

send this result:
[18.03.2021 19:44:13]
(only 1 NONE is here) the none should be replaced with location and world

  • yes
  • we
  • do
  • work
Olyno commented

As I already told you in the other issue, this is not related to Skent:

Caused by: java.lang.IllegalStateException: Tile is null, asynchronous access? CraftBlock{pos=BlockPosition{x=-79, y=72, z=84},type=SPRUCE_SIGN,data=Block{minecraft:spruce_sign}

And

Exception in thread "append "- %line 4 of event-block%" to file/directory "Gracze/Folder Gracza: %the player%/Tabliczki gracza/Stare tabliczki.txt"" Exception in thread "append "- %line 3 of event-block%" to file/directory "Gracze/Folder Gracza: %the player%/Tabliczki gracza/Stare tabliczki.txt"" java.lang.RuntimeException: Failed to read BlockState at: world: world location: (-79, 72, 84)

Confirm what I'm saying. Skent is not using any BlockState or Tile in its code, so this issue comes from Skript, and to be precise it comes from spigot directly which does not support async operations in the world stuff.

Yes I confirm and I understand now clearly. I thought the issue was with Skent and they say its with Skent so I got confused. @Olyno, thank you.