Commit Graph

25 Commits

Author SHA1 Message Date
AlexDev_
1e2aff4cf0
Added Sorting Manager (#105)
* Added SortingManager.

* Fixed initialization problem + added cache for team name

* Improved code readability

* Commit with the requested changes.

* Update src/main/java/net/william278/velocitab/Velocitab.java

Co-authored-by: William <will27528@gmail.com>

---------

Co-authored-by: William <will27528@gmail.com>
2023-10-15 13:04:10 +01:00
AlexDev_
a79404a530
Improved sorting logic to handle both high and low values. (#103) 2023-10-13 10:08:30 +01:00
William
8224cd0ff1
Fixes, logic simplification, update docs for nametags (#101) 2023-10-12 11:44:27 +01:00
AlexDev_
cb8a50c24f
Sorting System with Placeholders (#94)
* Added regex check for placeholders to avoid useless requests.
Added support for custom nametags. Due to minecraft limit only legacy chatcolor are supported.
Team names now are unique, so 1 team can have max 1 player.
Fixed problem with luckperms event bus while reloading the plugin.

* Update src/main/java/net/william278/velocitab/config/Placeholder.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/hook/LuckPermsHook.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/config/Formatter.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/packet/UpdateTeamsPacket.java

Co-authored-by: William <will27528@gmail.com>

* Fixed problem while updating display names. Changed a few method signature as requested in pr. Applied changes of pr.

* Added support for placeholders as sorting system

* Code reformat

* Update logging, task scheduling and player rosters

Modified logging in the ScoreboardManager to represent playerNames as an array for readability. Ensured all tasks scheduled by Velocitab are canceled on proxy shutdown to prevent unwanted behavior. Reworked player roster management in PlayerTabList to correctly update player roles and decrease asynchronicity, enhancing performance and preventing possible race conditions.

* Fixed problems after merging with upstream, fixed problem with player team color on join.

* Fixed problems with pr-merge. Added sorting system with placeholders.

* Update src/main/java/net/william278/velocitab/packet/UpdateTeamsPacket.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/packet/ScoreboardManager.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/packet/ScoreboardManager.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/packet/ScoreboardManager.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/config/Formatter.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/player/TabPlayer.java

Co-authored-by: William <will27528@gmail.com>

* Fix username replacement in scoreboard and code typo

This commit resolves two issues. Firstly, changed the variable that we split the nametag on in `ScoreboardManager` from a hardcoded string to the player's specific username. This rectifies an issue where incorrect splitting occurred if the username wasn't exactly "%username%". Secondly, fixed a miswritten method call in `Formatter` from '..legacySection()' to '.legacySection()', correcting a syntax error. Lastly, removed superfluous replacement in `TabPlayer's` getNametag method as it was already handled in `ScoreboardManager`.

* Reformat code

* Changed logic with only one plugin message request.

* Update src/main/java/net/william278/velocitab/sorting/SortingManager.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/hook/LuckPermsHook.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/packet/ScoreboardManager.java

Co-authored-by: William <will27528@gmail.com>

* Fixed requested changes

* Changed docs

---------

Co-authored-by: William <will27528@gmail.com>
2023-09-25 15:10:45 +01:00
AlexDev_
75d9f32010
Added support for nametags and fixed a few problems (#84)
* Added regex check for placeholders to avoid useless requests.
Added support for custom nametags. Due to minecraft limit only legacy chatcolor are supported.
Team names now are unique, so 1 team can have max 1 player.
Fixed problem with luckperms event bus while reloading the plugin.

* Update src/main/java/net/william278/velocitab/config/Placeholder.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/hook/LuckPermsHook.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/config/Formatter.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/packet/UpdateTeamsPacket.java

Co-authored-by: William <will27528@gmail.com>

* Fixed problem while updating display names. Changed a few method signature as requested in pr. Applied changes of pr.

* Fixed problems after merging with upstream, fixed problem with player team color on join.

* Update src/main/java/net/william278/velocitab/packet/UpdateTeamsPacket.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/packet/ScoreboardManager.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/packet/ScoreboardManager.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/packet/ScoreboardManager.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/config/Formatter.java

Co-authored-by: William <will27528@gmail.com>

* Update src/main/java/net/william278/velocitab/player/TabPlayer.java

Co-authored-by: William <will27528@gmail.com>

* Fix username replacement in scoreboard and code typo

This commit resolves two issues. Firstly, changed the variable that we split the nametag on in `ScoreboardManager` from a hardcoded string to the player's specific username. This rectifies an issue where incorrect splitting occurred if the username wasn't exactly "%username%". Secondly, fixed a miswritten method call in `Formatter` from '..legacySection()' to '.legacySection()', correcting a syntax error. Lastly, removed superfluous replacement in `TabPlayer's` getNametag method as it was already handled in `ScoreboardManager`.

---------

Co-authored-by: William <will27528@gmail.com>
2023-09-22 17:57:51 +01:00
Nikita Obrekht
90a26f15eb
Add sorting by server group (#88)
* Add sorting by group order and group name

* Fix sorting by server group

* Use order of groups instead of config option

* Remove redundant getServerGroup in SERVER_GROUP

* Update Sorting in docs
2023-09-15 17:54:25 +01:00
William
c6603da50a
Add license header, tweak build scripts 2023-04-17 16:04:53 +01:00
William278
8cbaa6f70f Tweak header/footer index incrementation order 2023-03-31 15:09:05 +01:00
William278
18086fffa4 Track header/footer index per-player, clarify configuration, fix #29 2023-03-31 14:43:35 +01:00
FreeMonoid
ef7e07c59d
Allow setting display name for servers (#30) 2023-03-31 14:21:17 +01:00
William
8a4651fb5f
Fix parsing of enums in sortable element list in config file 2023-03-16 20:00:49 +00:00
William278
28c5398c6b Add sorting by server name, customise sort element order 2023-03-14 14:19:59 +00:00
William
ee820967de
Fix double underscore escaping still happening with MiniMessage, refactor formatter 2023-03-12 19:23:48 +00:00
William278
36fa0e2625 Move formatting logic into enum function 2023-03-12 13:35:42 +00:00
William
b431ee2165
Add optional support for MiniMessage and hook for MiniPlaceholders (#18) 2023-03-11 20:23:47 +00:00
Emibergo02
f0c5ebe5a8
Server groups, formatting based on server groups (#6) 2023-03-08 12:22:15 +00:00
William
f790378182
Add support for PlaceholderAPI placeholders via PAPIProxyBridge (#17)
* Start PAPI hook work

* Finish adding PlaceholderAPI support
2023-03-07 11:39:47 +00:00
William
0a39899705
Reduce number of packets being sent, adjust logic 2023-02-26 19:54:12 +00:00
William
be1756fa9b
Fix CME 2023-02-24 18:21:16 +00:00
William
22972281e2
Tweak role sort order 2023-02-24 17:58:23 +00:00
William
f616a5e08a
Fix weight sort order, team color, CME when updating players, players not updating via LP 2023-02-20 02:23:25 +00:00
William
51c7853b7b
Move to using Protocolize for scoreboard team handling using fake scoreboard teams 2023-02-19 23:08:17 +00:00
William
8ad443f4fc
Fix role sort order 2023-02-19 13:05:02 +00:00
William
500c647ecc
Delayed "real" player removing, spoofed user fixes, sort by server 2023-02-19 01:30:46 +00:00
William
6caf720b5d
Initial commit 2023-02-19 00:02:50 +00:00