Commit Graph

142 Commits

Author SHA1 Message Date
William278
7a558d4072 Fix trailing comma in Protocol403Adapter 2023-09-25 15:21:11 +01:00
William278
6c8b1b8147 Update config file with new sorting key 2023-09-25 15:20:34 +01:00
William278
2afbf38ee1 Add %server_group% and %server_group_index% placeholders 2023-09-25 15:19:32 +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
AlexDev_
8ae25521dd
Fix encode error on 1.20.1 (#90)
* Added test debug

* Fix issue https://github.com/WiIIiam278/Velocitab/issues/89

* Removed ViaVersion problem message

* Re-Added final keyword on plugin parameter in UpdateTeamsPacket
2023-09-16 10:53:50 +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
William278
c1682aeda9 Update about menu, minor code cleanup 2023-09-13 10:06:44 +03:00
AlexDev_
8d654d6b26
Added support for 1.8.x and 1.12.2 clients (#87)
* Added support for 1.12.2 players

* Added support for 1.8.x & fixed code style

* Moved VersionManager inside ScoreboardManager

* Code refactor

* 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/UpdateTeamsPacket.java

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

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

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

* Added requested changes

* Code refactoring

---------

Co-authored-by: William <will27528@gmail.com>
2023-09-12 17:30:55 +03:00
AlexDev_
8349d7eb51
Added function to unregister packets on plugin disable. [Dev System Only] (#83)
* Added function to unregister packets on plugin disable.

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

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

* Added null check + changed style

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

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

* Fix indentation problem

---------

Co-authored-by: William <will27528@gmail.com>
2023-08-27 17:06:43 +01:00
Apehum
14482fd43e
Handle DisconnectEvent only if login status is SUCCESSFUL_LOGIN (#80) 2023-08-19 13:55:22 +01:00
William
0ca8d5185b
Fix wrong comment in config file 2023-07-25 12:27:38 +01:00
William
71efba9139
Fix wrong PAPI cache time 2023-06-12 14:25:18 +01:00
William
4a0895cc8b
Add a bit more validation to the PAPI cache time option 2023-06-12 13:17:01 +01:00
William
a55eda8e52
Add option to configure the PAPIProxyBridge cache time 2023-06-12 13:16:12 +01:00
William
07fd9c306a
Add role_display_name placeholder, add docs for sorting 2023-06-12 12:02:33 +01:00
ironboundred
3c1a980e25
set minimal update rate (#52) 2023-05-01 20:50:59 +01:00
William
8e7ba474ae
Remove redundant removeIf log when a player cannot be removed 2023-04-21 21:48:56 +01:00
Adrian
548e47f85a
fix: Fixed NullPointerException in Player Join Listener (#47) 2023-04-21 09:30:02 +01:00
William
e422bf0840
Add plugin metrics and update checker (#46) 2023-04-21 00:22:07 +01:00
Adrian
d3d67cb613
Implement native packets handling and remove Protocolize dependency (#44) 2023-04-19 10:31:37 +01:00
William
4d586d28c3
Remove unneeded log when player remove does not occur 2023-04-18 15:24:57 +01:00
William
3c630dcc50
Remove unnecessary if check 2023-04-18 15:23:37 +01:00
William
5da7da8514
Add new contributors to credits 2023-04-17 21:06:40 +01:00
William
7e349d3393
Add option to disable sorting players, close #39 2023-04-17 20:38:24 +01:00
William
adcdef358b
Update modrinth icon character 2023-04-17 16:30:39 +01:00
ironboundred
7712eaaf15
Check against offline users during permission recalc TAB update (#43) 2023-04-17 16:28:03 +01:00
William
1e3f163f2d
Bump minimessage, fix empty string used for concatenation 2023-04-17 16:06:57 +01:00
William
c6603da50a
Add license header, tweak build scripts 2023-04-17 16:04:53 +01:00
ironboundred
dad64098b2
More checkes for offline players (#42) 2023-04-14 17:36:33 +01:00
FreeMonoid
99ce4e3f54
Handle ProtocolizePlayer absence before sending packets (#40) 2023-04-11 00:27:10 +01:00
FreeMonoid
3c7187cca0
Support legacy RGB color codes (#37) 2023-04-06 18:11:00 +01:00
Adrian
82ffd265a7
Improved Velocitab command using native Brigadier (#34) 2023-04-02 00:40:22 +01:00
ironboundred
b653d568f5
Reload when proxy reload event is fired (#33) 2023-04-02 00:39:54 +01:00
ironboundred
88d1c4f6cf
Reload and About Commands (#32) 2023-04-01 00:46:56 +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
William278
4c10d27b6b Cleanup unneccessary annotations 2023-03-31 14:22:00 +01:00
FreeMonoid
ef7e07c59d
Allow setting display name for servers (#30) 2023-03-31 14:21:17 +01:00
ironboundred
f14a92b432
Fix failed Dispatch Packet on server disconnect (#28) 2023-03-30 20:40:22 +01:00
William
95bc4669a8
Merge remote-tracking branch 'origin/master' 2023-03-23 22:15:40 +00:00
William
dbf5509a9a
Add only_list_players_in_same_group option (true by default) 2023-03-23 22:14:31 +00:00
ironboundred
10c8102e59
Add support for header and footer animations (#25) 2023-03-22 18:47:20 +00:00
William278
c144f79caa Fix compatibility with 1.19.4 2023-03-22 16:21:19 +00:00
William
6007cdddb3
Fix LuckPerms role update not updating actual user in TAB list 2023-03-16 21:11:53 +00: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
1b4587bf0b
Tweak unset header/footer values to work with MiniMessage by default 2023-03-12 19:26:36 +00:00
William
ee820967de
Fix double underscore escaping still happening with MiniMessage, refactor formatter 2023-03-12 19:23:48 +00:00
William
fb66fb44ff
Merge remote-tracking branch 'origin/master' 2023-03-12 18:15:22 +00:00
William
da1ead367a
Better handling for nullable collision rules 2023-03-12 18:14:57 +00:00
William278
36fa0e2625 Move formatting logic into enum function 2023-03-12 13:35:42 +00:00
William
6df397b77a
Periodic updates: Also update header/footer, fix extra delay 2023-03-11 20:29:10 +00:00
William
b431ee2165
Add optional support for MiniMessage and hook for MiniPlaceholders (#18) 2023-03-11 20:23:47 +00:00
William
73593ce6c5
Fix main class declaration in velocity-plugin.json 2023-03-11 00:04:28 +00:00
William278
2730778ef9 Bump to 1.1.1, update build script, stop shading lombok 2023-03-10 12:47:04 +00:00
William278
a7d512e6fe Support 1.16.5 through 1.19.3, add more protocol mappings 2023-03-10 12:27:43 +00:00
William278
c062fe2d14 [ci-skip] config: Add comment for update_rate 2023-03-08 12:56:29 +00:00
William278
10ec3831d4 [ci-skip] config: Minor comment tweak 2023-03-08 12:55:43 +00:00
William278
7abf085734 [ci-skip] style: Remove double brackets on update_rate @YamlKey 2023-03-08 12:51:37 +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
ironboundred
7d85ed6cfe
Setup a repeating task (#12)
* Setup a repeating task

Task will repeat to a configured time in milliseconds. setting the time to 0 will cause the task to not be scheduled.

* Update Settings.java

* requested changes
2023-03-04 19:01:43 +00:00
ironboundred
80bb9ab627
Fix player names with underscores having formatting applied (#10) 2023-03-01 00:51:43 +00:00
William
10e02233f3
Fix wrong team names being sent in packets to joining players 2023-02-26 20:34:21 +00:00
William
6cea56364e
Ensure roleMappings are updated when team is made 2023-02-26 20:00:02 +00:00
William
0a39899705
Reduce number of packets being sent, adjust logic 2023-02-26 19:54:12 +00:00
William
de747bf3eb
Add additional handling to ensure entities is not null when written 2023-02-25 12:55:40 +00:00
William
39b196b647
Clarify / simplify packet logic 2023-02-25 12:52:51 +00:00
William
ad99b1655c
Always display latency as 0 where unknown 2023-02-25 12:46:58 +00:00
William
fb0be16fd7
Use byte instead of int for packet update mode 2023-02-25 12:40:25 +00:00
William
3e4f036171
Fix exception reading update teams packet 2023-02-25 12:35:47 +00:00
William
fcdcdc80dc
Specify TabList when creating new player entry 2023-02-25 12:29:06 +00:00
William
c70d4892a5
Ensure players on other servers are added as TabListEntries 2023-02-25 12:27:28 +00:00
William
a50837dcb4
Add function to exclude servers 2023-02-24 19:00:06 +00:00
William
a968fc32fc
Improve error handling 2023-02-24 18:42:02 +00:00
William
0fb1a3146a
Tweak concurrency handling 2023-02-24 18:29:35 +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
dbccc21706
Fix ConcurrentModificationException; make players immutable 2023-02-24 17:35:30 +00:00
William
c16fbf40ab
Simplify string comparable weight logic to fix issues with low weight diffs 2023-02-24 17:28:11 +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
54928f597a
Add protocol mappings for 1.19 versions, Add DEBUG_TEAM_NAME placeholder, weight sort logic tweaks 2023-02-19 23:51:45 +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
60baf597fd
Fix missing annotation 2023-02-19 12:54:44 +00:00
William
d73530c903
Reverse role comparable sort order 2023-02-19 12:47:58 +00:00
William
f5f8708686
Reverse role comparable sort order 2023-02-19 12:47:49 +00:00
ironboundred
d9a33587b9
Fix issue when clearing immutable list (#1) 2023-02-19 12:46:06 +00:00
ironboundred
1ec41b9942
Remove players when switching worlds (#2) 2023-02-19 12:45:29 +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