Skip to content

Conversation

@TheMug06
Copy link
Contributor

Problem

No syntax currently exists for interaction entities. SkBee used to have it, but it is disabled along with its display syntaxes in favor of Skript's.

Solution

This PR introduces several new syntaxes for each aspect of interaction entities.
Includes Height, Width, Responsiveness, Last interaction/attack date/player and a condition for responsiveness.

Testing Completed

Manually tested scripts, all syntax works locally. Can add tests if wanted :D

Supporting Information

None


Completes: none
Related: none

@TheMug06 TheMug06 requested a review from a team as a code owner November 20, 2025 00:26
@TheMug06 TheMug06 added the feature Pull request adding a new feature. label Nov 20, 2025
@TheMug06 TheMug06 requested review from Pesekjak and removed request for a team November 20, 2025 00:26
@TheMug06 TheMug06 added the 2.14 Targeting a 2.14.X version release. label Nov 20, 2025
@TheMug06 TheMug06 requested a review from cheeezburga November 20, 2025 00:26
Copy link
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

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

Haven't looked at code in detail, but this is missing last attacker support

@TheMug06
Copy link
Contributor Author

Haven't looked at code in detail, but this is missing last attacker support

See ExprLastInteractionPlayer, same goes for last attack date in ExprLastInteractionDate.

@sovdeeth
Copy link
Member

Haven't looked at code in detail, but this is missing last attacker support

See ExprLastInteractionPlayer, same goes for last attack date in ExprLastInteractionDate.

No, ExprLastAttacker (unless it already works?)

@TheMug06
Copy link
Contributor Author

TheMug06 commented Nov 20, 2025

Haven't looked at code in detail, but this is missing last attacker support

See ExprLastInteractionPlayer, same goes for last attack date in ExprLastInteractionDate.

No, ExprLastAttacker (unless it already works?)

Interaction extends Entity, so ExprLastAttacker should work fine (?). Though idk if it would due to getLastDamageCause()?

Copy link
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

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

lot of edits needed for code quality and conventions
requested comments don't cover everything

@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label Nov 20, 2025
Copy link
Contributor

@Absolutionism Absolutionism left a comment

Choose a reason for hiding this comment

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

As per Sovde's review of following coding conventions, things I've noticed

  • Use SyntaxRegistry to register elements
  • Forgot to load the InteractionModule via main Skript class
  • No finals
  • Use @Example instead of @Examples
  • Each example should be in it's own @Example
  • One liner @Example and @Description should not be encased in {}
  • Inline Nullable annotation, i.e. @Nullable blah or blah @Nullable []
  • No 1 letter variable names
  • Tests
  • Expression change should allow changing of multiple interactions, not just one

@skriptlang-automation skriptlang-automation bot removed the needs reviews A PR that needs additional reviews label Nov 20, 2025
@sovdeeth sovdeeth requested a review from a team as a code owner December 14, 2025 01:27
@sovdeeth sovdeeth requested review from UnderscoreTud and removed request for a team December 14, 2025 01:27
@github-project-automation github-project-automation bot moved this to In Review in 2.14 Releases Dec 14, 2025
@sovdeeth sovdeeth linked an issue Dec 14, 2025 that may be closed by this pull request
1 task
@github-project-automation github-project-automation bot moved this from In Review to Awaiting Merge in 2.14 Releases Dec 14, 2025
@skriptlang-automation skriptlang-automation bot added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Dec 14, 2025
Copy link
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.

Implementation/design is great, just a couple formatting/readability things.

interaction:
name: interaction¦s
pattern: interaction[plural:s]
pattern: interaction([plural:s]| entit(plural:ies|y))
Copy link
Member

Choose a reason for hiding this comment

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

Might be clearer to use two separate patterns here

private boolean responsive;
@Override
public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelayed, ParseResult parseResult) {
responsive = !parseResult.hasTag("unresponsive");
Copy link
Member

Choose a reason for hiding this comment

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

might make more sense to just put a parse tag on responsive rather than negating, but not a huge deal


@Override
public @Nullable Date convert(Entity entity) {
if (entity instanceof Interaction interaction) {
Copy link
Member

Choose a reason for hiding this comment

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

I think a guard clause would be better here

@APickledWalrus APickledWalrus merged commit 230071c into SkriptLang:dev/feature Jan 1, 2026
9 checks passed
@skriptlang-automation skriptlang-automation bot added the completed The issue has been fully resolved and the change will be in the next Skript update. label Jan 1, 2026
@github-project-automation github-project-automation bot moved this from Awaiting Merge to Done - Awaiting Release in 2.14 Releases Jan 1, 2026
@skriptlang-automation skriptlang-automation bot removed the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Jan 1, 2026
@APickledWalrus APickledWalrus moved this from Done - Awaiting Release to Done - Released in 2.14 Releases Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.14 Targeting a 2.14.X version release. completed The issue has been fully resolved and the change will be in the next Skript update. feature Pull request adding a new feature.

Projects

Status: Done - Released

Development

Successfully merging this pull request may close these issues.

Support for interaction entities

5 participants