New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structure API Update #77
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my eyes glazed over halfway through the code but all my testing couldn't produce any bugs
so seems good for dev build testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not yet taken too deep of look into the other custom syntax structures, but they have the same "issues" as StructCustomCondition
excellent work so far!
src/main/java/com/btk5h/skriptmirror/skript/custom/SyntaxParseEvent.java
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/java/elements/structures/StructImport.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/java/elements/structures/StructImport.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/condition/elements/StructCustomCondition.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/condition/elements/StructCustomCondition.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/condition/elements/StructCustomCondition.java
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/event/elements/StructCustomEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/condition/elements/StructCustomCondition.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/expression/ChangerEntryData.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking pretty good
src/main/java/org/skriptlang/reflect/syntax/CustomSyntaxStructure.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/PatternsEntryData.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/condition/elements/StructCustomCondition.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/condition/elements/StructCustomCondition.java
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/expression/elements/StructCustomExpression.java
Outdated
Show resolved
Hide resolved
Is there already a stable version with these changes? |
…structure Fix custom syntax elements erroring if they don't have a 'parse' entry
src/main/java/org/skriptlang/reflect/java/elements/structures/StructImport.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some final formatting suggestions. Excellent work! Next stop: merging :)
src/main/java/org/skriptlang/reflect/java/elements/structures/StructImport.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/condition/elements/StructCustomCondition.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/condition/elements/StructCustomCondition.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/effect/elements/StructCustomEffect.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/event/elements/StructCustomEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/event/elements/StructCustomEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/expression/elements/StructCustomExpression.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/expression/elements/StructCustomExpression.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/reflect/syntax/expression/elements/StructCustomExpression.java
Outdated
Show resolved
Hide resolved
idk is it correct place or not but I want to mention that skript-reflects detects import:
java.util.ArrayList
java.util.Collections
java.util.Map$Entry
ch.njol.skript.variables.Variables
# Example
#set {_topkillers::*} to the top (size of {Kills::*}) values of {Kills::*} as "&e@place. &a@index &7- &b@value"
expression replace values %strings% with %strings% in %string%:
get:
set {_string} to expression-3
loop expressions-1:
add 1 to {_index}
replace all "%loop-value%" with "%{_index}th element of expressions-2%" in {_string}
return {_string}
plural expression [the ](1¦(highest|top)|2¦(lowest|last)) %integer% values of %objects% [formatted ]as %string%:
get:
set {_list} to new ArrayList(Variables.getVariable(raw expressions-2.getName().toString(event), event, raw expressions-2.isLocal()).entrySet())
({_list}).sort(Entry.comparingByValue())
if parse mark = 1:
Collections.reverse({_list})
loop ...{_list}:
add 1 to {_index}
set {_sorted::%{_index}%} to replace values "@place", "@index" and "@value" with "%{_index}%", "%loop-value.getKey()%" and "%loop-value.getValue()%" in expression-3
{_index} = expression-1
stop loop
return {_sorted::*} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done 🚀
Convert code using SelfRegisteringSkriptEvent to use Structures and start moving classes into the new package (
org.skriptlang.skript
)Fixes #75
Fixes #72
Fixes #69