Skip to content

Instantly share code, notes, and snippets.

@Snow-Pyon
Last active January 5, 2018 04:51
Show Gist options
  • Save Snow-Pyon/a9672320643d25fa54127ba841279348 to your computer and use it in GitHub Desktop.
Save Snow-Pyon/a9672320643d25fa54127ba841279348 to your computer and use it in GitHub Desktop.
A snippet to remove the dependency on skQuery.
on script load:
import "ch.njol.skript.lang.Condition"
import "java.lang.System"
get expression whether <(.+)>.:
set {_args::*} to regex-1 and "Invalid condition '%regex-1%'!"
set {_condition} to {Condition}.parse({_args::*})
continue {_condition}.check(event)
get expression %objects% (or else|?:) %objects%:
if expressions-1 isn't set:
continue expressions-2
else:
continue expressions-1
get expression %objects% if %booleans% else %objects%:
if expressions-2 are true:
continue expressions-1
else:
continue expressions-3
get expression %booleans% ? %objects% : %objects%:
continue expressions-2
#get expression %objects% (=(0¦=|1¦>|2¦<)|3¦!=|4¦>|5¦<) %objects%:
# finishing this later
get expression (new line|nl):
continue {System}.getProperty("line.separator")
#Enable only if you don't have MundoSK
#get expression [(1¦not |!)]%booleans%:
# continue expressions-1 != true if parser mark == 1 else expressions-1 == true
@btk5h
Copy link

btk5h commented Dec 29, 2017

Good stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment