ArtformGames / ResidenceList

List existing residence in server in a gui, and allow players to manage, teleport, and comment.
https://modrinth.com/plugin/residencelist
GNU General Public License v3.0
8 stars 1 forks source link

feat(sort): support sorting in list GUI #15

Closed Sraconni closed 5 months ago

Sraconni commented 8 months ago

Description

Add a sorting feature in list GUI.

Source

The sorting in the list gui is now randomly generated and appears messy. Adding a sorting feature can allow players to quickly locate the residence they need.

Examples (Optional)

# Turn GUI sorting feature on or off.
# true = Use sorting-type feature.
# false = Use randomly generated by install ResidenceList. (default)
gui-sorting: true/false

  # 1 = Sorting by rated.
  # 2 = Sorting by size residence size.
  # 3 = Sorting by name (A-Z).
  # 4 = Sorting by name (Z-A).
  type: 1/2/3/4

AddItional details

No

CarmJos commented 8 months ago

Sorting will be applied as a user-side function. Users can switch sort mehods in list GUI, and will be saved in users' dafa files.

CarmJos commented 8 months ago

Sort functions:

All functions support reverse sorting.

Sraconni commented 5 months ago

Sort functions:

  • By ratings (high->low)
  • By size (large->small)
  • By name (A->Z)

All functions support reverse sorting.

The sorting of uppercase characters and lowercase characters in Sort by Name is sorted independently and should be Aa-Zz.

CarmJos commented 5 months ago

Sort functions:

  • By ratings (high->low)
  • By size (large->small)
  • By name (A->Z)

All functions support reverse sorting.

The sorting of uppercase characters and lowercase characters in Sort by Name is sorted independently and should be Aa-Zz.

Now using String::compareToIgnoreCase.