Does someone know how to fix this? i need a function that does a database lookup for a given player and returns a string but i cant use normal functions for it since they dont allow a delay.
im trying with skript-mirror but there is no documentation or examples that go past 2-liners
I know this cant work, cant even explain where the effect would get the expr-1 from but thats the best i could stitch together with what i found
im trying with skript-mirror but there is no documentation or examples that go past 2-liners
code_language.skript:
expression last permissioncheck %offline player%:
get:
return {permissioncheck}
set:
set {permissioncheck} to change value
delete:
delete {permissioncheck}
effect permissioncheck %offline player%:
trigger:
if expr-1.getLastPlayed() is 0:
set permissioncheck expr-1 to "Unknown"
stop
else:
delay the effect
set {_api} to LuckPerms.getApi()
set {_uuid} to {_p}.getUniqueId()
{_api}.getUserManager().loadUser({_uuid})
loop 10 times:
wait 1 tick
{_api}.getUserManager().isLoaded({_uuid}) is true
stop loop
set permissioncheck expr-1 to "%{_u}.getPermissions()%"
continue
send "%permissioncheck%" to ops
command /test <offline player>:
permission: *
trigger:
permissioncheck arg-1
last delay example
send "%last permissioncheck arg-1%"