Skip to content

Deprecate boolean expressions#8619

Open
Phill310 wants to merge 10 commits intoSkriptLang:dev/featurefrom
Phill310:deprecate-boolean-expressions
Open

Deprecate boolean expressions#8619
Phill310 wants to merge 10 commits intoSkriptLang:dev/featurefrom
Phill310:deprecate-boolean-expressions

Conversation

@Phill310
Copy link
Copy Markdown
Contributor

@Phill310 Phill310 commented May 2, 2026

Problem

We have moved away from Boolean Expressions in favor of effect+condition pairs.

Solution

I looked through the expressions to find boolean expressions which could be deprecated and replaced. I then created effects and conditions to replace the functionality of the deprecated expressions.

Testing Completed

Tests will be coming soon. I wanted to get opinions on the rest of the code first.

Supporting Information

  • ExprAI: Created effect
  • ExprFlightMode: Already has effect + condition
  • ExprGlidingState: Entity Gliding #8588
  • ExprGlowing: Created effect and condition
  • ExprGravity: Created effect
  • ExprProjectileCriticalState: Creates effect + condition

Please let me know if I missed any or if some of these don't count.


Completes: none
Related: none
AI assistance: none

@Phill310 Phill310 requested a review from a team as a code owner May 2, 2026 08:41
@Phill310 Phill310 requested review from APickledWalrus and erenkarakal and removed request for a team May 2, 2026 08:41
@skriptlang-automation skriptlang-automation Bot added the needs reviews A PR that needs additional reviews label May 5, 2026
Copy link
Copy Markdown
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good so far! Nice work.

Comment thread src/main/java/ch/njol/skript/expressions/ExprAI.java Outdated
Comment on lines +32 to +33
"%projectile% is in (projectile|arrow) critical (state|mode)",
"%projectile% (is not|isn't) in (projectile|arrow) critical (state|mode)")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fine to support multiple projectiles. And using infoBuilder rather than manually adding the patterns should work.

Comment thread src/main/java/org/skriptlang/skript/bukkit/entity/elements/effects/EffAI.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/entity/elements/effects/EffAI.java Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs reviews A PR that needs additional reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants