Adds ExprPlayerListOrder#8600
Conversation
This comment has been minimized.
This comment has been minimized.
|
oh I didn't see your additional comment after my reply yeah I think priority fits possibly weight? |
|
Priority can probably stay, but you need a lot more explanation of this syntax in the description |
|
Okay I made it more detailed |
…nts/expressions/ExprPlayerListPriority.java Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
…nts/expressions/ExprPlayerListPriority.java Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
ShaneBeee
left a comment
There was a problem hiding this comment.
Just a few small nit picks. looks good otherwise :)
ShaneBeee
left a comment
There was a problem hiding this comment.
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>
…ayerListOrder # Conflicts: # src/main/java/org/skriptlang/skript/bukkit/entity/player/elements/expressions/ExprPlayerListPriority.java
APickledWalrus
left a comment
There was a problem hiding this comment.
Looks really good so far! I like this feature
…nts/expressions/ExprPlayerListPriority.java Co-authored-by: Patrick Miller <apickledwalrus@icloud.com>
|
|
||
| @Override | ||
| public void change(Event event, Object @Nullable [] delta, ChangeMode mode) { | ||
| Integer amount = mode == ChangeMode.RESET ? null : (Integer) delta[0]; |
There was a problem hiding this comment.
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.
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