Skip to content

Adds ExprPlayerListOrder#8600

Open
AnOwlBe wants to merge 20 commits intoSkriptLang:dev/featurefrom
AnOwlBe:ExprPlayerListOrder
Open

Adds ExprPlayerListOrder#8600
AnOwlBe wants to merge 20 commits intoSkriptLang:dev/featurefrom
AnOwlBe:ExprPlayerListOrder

Conversation

@AnOwlBe
Copy link
Copy Markdown

@AnOwlBe AnOwlBe commented Apr 28, 2026

Problem

Its very useful as it grants ability for us to sort players on tab without need of teams.

Solution

Adds a ExprPlayerListOrder

with GET, SET & RESET for acceptChange (did not add DELETE as that would not make sense unless it did same thing as RESET)

Testing Completed

Tested on PaperMC 1.21.11 get, set, add, reset all work fine even with negative values

Supporting Information


Completes: none
Related: none
AI assistance: none

@AnOwlBe AnOwlBe requested a review from a team as a code owner April 28, 2026 02:59
@AnOwlBe AnOwlBe requested review from Pesekjak and TheMug06 and removed request for a team April 28, 2026 02:59
@skriptlang-automation skriptlang-automation Bot added needs reviews A PR that needs additional reviews needs triage An issue that hasn't been classified or verified yet labels Apr 28, 2026
@skriptlang-automation

This comment has been minimized.

@skriptlang-automation skriptlang-automation Bot added the feature Pull request adding a new feature. label Apr 28, 2026
@skriptlang-automation skriptlang-automation Bot removed the needs triage An issue that hasn't been classified or verified yet label Apr 28, 2026
@github-project-automation github-project-automation Bot moved this to In Review in 2.16 Releases Apr 28, 2026
@AnOwlBe AnOwlBe requested a review from sovdeeth April 28, 2026 03:40
@AnOwlBe
Copy link
Copy Markdown
Author

AnOwlBe commented Apr 28, 2026

oh I didn't see your additional comment after my reply yeah I think priority fits possibly weight?

@sovdeeth
Copy link
Copy Markdown
Member

Priority can probably stay, but you need a lot more explanation of this syntax in the description

@AnOwlBe
Copy link
Copy Markdown
Author

AnOwlBe commented Apr 28, 2026

Okay I made it more detailed

…nts/expressions/ExprPlayerListPriority.java

Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
@Efnilite Efnilite requested a review from Absolutionism April 28, 2026 19:47
@skriptlang-automation skriptlang-automation Bot removed the needs reviews A PR that needs additional reviews label Apr 28, 2026
…nts/expressions/ExprPlayerListPriority.java

Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@ShaneBeee ShaneBeee left a comment

Choose a reason for hiding this comment

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

Just a few small nit picks. looks good otherwise :)

@skriptlang-automation skriptlang-automation Bot added the needs reviews A PR that needs additional reviews label Apr 29, 2026
Copy link
Copy Markdown
Contributor

@ShaneBeee ShaneBeee left a comment

Choose a reason for hiding this comment

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

Looks good to me.
One small note, just me being Picky McPicky Pants!
Otherwise looks good.
Thanks for doing those other changes.

…nts/expressions/ExprPlayerListPriority.java

Co-authored-by: Shane Bee <shanebolenback@me.com>
@skriptlang-automation skriptlang-automation Bot removed the needs reviews A PR that needs additional reviews label Apr 29, 2026
AnOwlBe and others added 4 commits April 28, 2026 23:58
…ayerListOrder

# Conflicts:
#	src/main/java/org/skriptlang/skript/bukkit/entity/player/elements/expressions/ExprPlayerListPriority.java
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.

Looks really good so far! I like this feature

AnOwlBe and others added 2 commits May 5, 2026 14:25
…nts/expressions/ExprPlayerListPriority.java

Co-authored-by: Patrick Miller <apickledwalrus@icloud.com>
@AnOwlBe AnOwlBe requested a review from APickledWalrus May 5, 2026 18:29

@Override
public void change(Event event, Object @Nullable [] delta, ChangeMode mode) {
Integer amount = mode == ChangeMode.RESET ? null : (Integer) delta[0];
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.

Rather than have amount be null, you can just use 0 (since that's the value RESET uses anyways). That should allow you to remove the assertions and even use int instead. You can replace mode == ChangeMode.RESET with delta == null if it still gives you issues with delta nullability.

@AnOwlBe AnOwlBe requested a review from APickledWalrus May 7, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Pull request adding a new feature.

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

7 participants