Compare commits

..
35 Commits
Author SHA1 Message Date
NEZNAMY bef190ddd7 6.0.2 2026-04-25 18:06:51 +02:00
NEZNAMY cf320b3fa2 [GitHub] Fix compilation 2026-04-25 16:47:32 +02:00
NEZNAMY 34c8745fa9 [Build] Add another shadow jar task for non-modded platforms to avoid error on Paper 1.20.5 - 1.21.4 2026-04-25 16:37:52 +02:00
NEZNAMY 8096ff7f98 Merge pull request #1646 from JT122406/master
Fabric and NeoForge for 26.1.2
2026-04-25 15:48:02 +02:00
NEZNAMY dad3006f84 Refactor TabListEntryTracker into an interface to avoid class loading error on Bukkit 1.7.10 2026-04-23 20:15:50 +02:00
NEZNAMY 0e35f15a86 [Bukkit] Change check to avoid false flag on modded servers 2026-04-23 17:29:08 +02:00
NEZNAMY d423740273 [Nametags] Prefer color codes for team color over magic codes if both are used 2026-04-22 18:11:07 +02:00
NEZNAMY 49f489c4dc [Teams] [Performance] Only send teams to players visible in the tablist, small refactor and a bug fix with disable-condition 2026-04-22 17:48:46 +02:00
NEZNAMY ac71bf2111 [Bossbar] Add more info to dump command output 2026-04-20 19:57:40 +02:00
Joseph T. McQuigg 6d40dd12fa Java 25 in fabric.mod.json 2026-04-19 15:11:46 -04:00
Joseph T. McQuigg a732abcdd6 Refresh 2026-04-19 14:42:25 -04:00
Joseph T. McQuigg c2f90f9daf Fix Credits, Fix Version Numbers 2026-04-19 14:37:29 -04:00
Joseph T. McQuigg 898f56c32a Forge for 26.1.2/1/0 (Non-Working) 2026-04-19 14:17:53 -04:00
Joseph T. McQuigg 2ebc4384f5 NeoForge for 26.1.2/1/0 2026-04-19 13:55:57 -04:00
Joseph T. McQuigg 687b8d5e29 Fabric for 26.1.2/1/0 2026-04-19 13:38:28 -04:00
NEZNAMY d09d95e069 6.0.2-SNAPSHOT 2026-04-19 17:57:05 +02:00
NEZNAMY 4dffc1ffe9 [Bukkit] Update supported version interval in error message 2026-04-16 19:01:30 +02:00
NEZNAMY f3b2cfbb87 [Description] Update badges 2026-04-13 17:02:47 +02:00
NEZNAMY 4af57308d3 6.0.1 2026-04-13 16:44:57 +02:00
NEZNAMY 28ecf8666c [Velocity] Update to VelocityScoreboardAPI 2.0.0 2026-04-13 16:43:08 +02:00
NEZNAMY 1f3d1beb8f Merge pull request #1643 from lokspel/master
26.1.2 is supported
2026-04-12 15:45:57 +02:00
MISHAandNEZNAMY 96d21bc544 Update bukkit/src/main/java/me/neznamy/tab/platforms/bukkit/ServerVersionInfo.java
Co-authored-by: NEZNAMY <martinmiklovicmm@gmail.com>
2026-04-12 14:27:54 +04:00
MISHA f5cb2b5a1d Update ServerVersionInfo.java 2026-04-12 09:32:08 +04:00
MISHA d1d6e73bbc Update ProtocolVersion.java 2026-04-12 09:31:13 +04:00
NEZNAMY 2321ae1c0c [Dump] Include floodgate install status next to player's bedrock status 2026-04-09 19:01:48 +02:00
NEZNAMY 982ee5b6bf [MySQL] Do not relocate driver due to a startup error on NeoForge 2026-04-09 18:11:35 +02:00
NEZNAMY dbe699843b [Dump] Sort plugins/mods alphabetically 2026-04-09 18:09:59 +02:00
NEZNAMY fda19760bd [Bukkit] Compile v26_1 module with Java 21 instead of 25 (#1640) 2026-04-09 17:23:48 +02:00
NEZNAMY 97d42152cd [Configuration] Fix NPE in config conversion 2026-04-07 17:57:21 +02:00
NEZNAMY 5981607783 Fix memory leak 2026-04-06 13:14:58 +02:00
NEZNAMY 7b7927f328 [Code style] Separate methods from class to clean it up 2026-04-05 12:47:07 +02:00
NEZNAMY a8e2730f2f [Performance] Do not send plugin messages about placeholder values if tab expansion is disabled 2026-04-05 12:05:06 +02:00
NEZNAMY 7ae18187bc 6.0.1-SNAPSHOT 2026-04-05 12:03:38 +02:00
NEZNAMY 02634c531f [Wiki] Monthly wiki backup for changes made in March 2026 2026-04-04 16:55:16 +02:00
NEZNAMY 5e8ff89c43 [Description] Update badges 2026-04-04 14:04:35 +02:00
145 changed files with 1297 additions and 926 deletions

No files matched your search

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="156" height="20" role="img" aria-label="Minecraft: 1.7.x - 1.21.11"><title>Minecraft: 1.7.x - 1.21.11</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="156" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="61" height="20" fill="#555"/><rect x="61" width="95" height="20" fill="#007ec6"/><rect width="156" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="315" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">Minecraft</text><text x="315" y="140" transform="scale(.1)" fill="#fff" textLength="510">Minecraft</text><text aria-hidden="true" x="1075" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="850">1.7.x - 1.21.11</text><text x="1075" y="140" transform="scale(.1)" fill="#fff" textLength="850">1.7.x - 1.21.11</text></g></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

+1 -1
View File
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="92" height="20" role="img" aria-label="Release: 5.5.0"><title>Release: 5.5.0</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="92" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="53" height="20" fill="#555"/><rect x="53" width="39" height="20" fill="#007ec6"/><rect width="92" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="275" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">Release</text><text x="275" y="140" transform="scale(.1)" fill="#fff" textLength="430">Release</text><text aria-hidden="true" x="715" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="290">5.5.0</text><text x="715" y="140" transform="scale(.1)" fill="#fff" textLength="290">5.5.0</text></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="92" height="20" role="img" aria-label="Release: 6.0.2"><title>Release: 6.0.2</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="92" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="53" height="20" fill="#555"/><rect x="53" width="39" height="20" fill="#007ec6"/><rect width="92" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="275" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">Release</text><text x="275" y="140" transform="scale(.1)" fill="#fff" textLength="430">Release</text><text aria-hidden="true" x="715" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="290">6.0.2</text><text x="715" y="140" transform="scale(.1)" fill="#fff" textLength="290">6.0.2</text></g></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

+1 -4
View File
@@ -274,12 +274,9 @@ if __name__ == "__main__":
]
)
release = "5.5.0"
release = "6.0.2"
download_image(f"https://img.shields.io/badge/Release-{release}-blue.svg", "Badge_Release.svg")
minecraft = "1.7.x - 1.21.11".replace(" ", "%20").replace("-", "--")
download_image(f"https://img.shields.io/badge/Minecraft-{minecraft}-blue.svg", "Badge_Minecraft.svg")
java = "8+"
download_image(f"https://img.shields.io/badge/Java-{java}-blue.svg", "Badge_Java.svg")
+4 -8
View File
@@ -13,7 +13,7 @@ Commands have required permissions associated with them.
* [/tab \<player/group/playeruuid\> \<name\> \<property\> \[value\] \[options\]](#tab-playergroupplayeruuid-name-property-value-options)
* [/tab \<player/group/playeruuid\> \<name\> remove](#tab-playergroupplayeruuid-name-remove)
* [/tab reload](#tab-reload)
* [/tab debug \[player\]](#tab-debug-player)
* [/tab dump \[player\]](#tab-dump-player)
* [/tab group \<group\>](#tab-group-group)
* [/tab groups](#tab-groups)
* [Bossbar](#bossbar)
@@ -65,13 +65,9 @@ Commands have required permissions associated with them.
* **Permission:** `tab.reload`
* **Description:** Unloads the plugin, loads configuration files including changes and loads the plugin.
## /tab debug [player]
* **Permission:** `tab.debug`
* **Description:** Shows the server version, plugin version, permission group choice logic, and sorting type. If player argument is filled, shows info about that player:
* On proxy, shows whether player is connected to the backend server with [Bridge](https://github.com/NEZNAMY/TAB/wiki/TAB-Bridge) plugin or not.
* Sorting value & explanation, useful to see what went wrong if players are not sorted correctly.
* Primary group set using [How to assign players into groups](https://github.com/NEZNAMY/TAB/wiki/How-to-assign-players-into-groups)
* List of all configured properties, their values and source.
## /tab dump \<player\>
* **Permission:** `tab.dump`
* **Description:** Creates a very detailed dump about the specified player to help with troubleshooting, uploads it to a paste site and shows the generated URL.
## /tab group \<group\>
* **Permission:** `tab.groupinfo`
+1 -1
View File
@@ -28,7 +28,7 @@ TAB's shared module is compiled with Java 8. For the platforms themselves, TAB d
<tr>
<td rowspan=2>Vanilla</td>
<td rowspan=1><a href="https://getbukkit.org/">Bukkit</a> (+forge hybrids)</td>
<td>✔ (1.7.x - 1.21.11)</td>
<td>✔ (1.7.10 ~ 26.1.1) (not all versions included)</td>
</tr>
<tr>
<td rowspan=1><a href="https://www.spongepowered.org/">Sponge</a></td>
+12 -1
View File
@@ -7,6 +7,7 @@
* [Additional note 1 - Copying nametag visibility rule](#additional-note-1---copying-nametag-visibility-rule)
* [Additional note 2 - Hidden on sneak on 1.8](#additional-note-2---hidden-on-sneak-on-18)
* [Additional note 3 - Visible on NPCs](#additional-note-3---visible-on-npcs)
* [[26.1] Visible on all entities](#261-visible-on-all-entities)
* [Additional note 4 - Compatibility with modified clients](#additional-note-4---compatibility-with-modified-clients)
* [Examples](#examples)
* [Example 1 - Per-world values](#example-1---per-world-values)
@@ -102,7 +103,17 @@ This is how you can achieve it using the following popular NPC plugins:
* 3 - Change the NPC's name by editing your hologram's line(s): `/hologram edit hi setline 1 <text>`.
You can also add more lines if you want. See [FancyNpcs's wiki](https://docs.fancyinnovations.com/fancyholograms/commands/hologram/#text-hologram-modification) for more commands & info.
# Additional note 4 - Compatibility with modified clients
### [26.1] Visible on all entities
In Minecraft version 26.1, Mojang "fixed" [MC-99647](https://bugs.mojang.com/browse/MC/issues/MC-99647), which reported that belowname is not visible on non-player entities. As a result, the belowname is now visible on all entities with a custom name (this even includes invisible armor stands, holograms and more). A new bug report was made for this: [MC-307012](https://bugs.mojang.com/browse/MC/issues/MC-307012).
**This is a client-sided bug. You will experience it on 26.1 regardless of the server version**.
If your server is on 26.1 or you support players with this version through ViaVersion, this might be a deal breaker for you. If that's the case, either disable this feature entirely, or set
```
disable-condition: "%player-version-id%>=775"
```
which will make 26.1 players not see this feature on anyone (remember: disabling this feature disables it for the viewer, not target players).
## Additional note 4 - Compatibility with modified clients
Sadly, this feature is suffering from bugs introduced by third party clients such as Feather and Lunar. These two completely ignore `fancy-value` as if it was never added into the game, even on 1.20.3+. This is just an example, and it's not limited to these two clients and this one issue. If you experience issues with the feature and believe you configured it correctly, use vanilla client to make sure it's not caused by a broken client.
# Examples
+1 -1
View File
@@ -169,7 +169,7 @@ Currently, TAB supports these skin formats:
|--------|---------|-------------|
| `mineskin:<UUID>` | `mineskin:37e93c8e12cd426cb28fce31969e0674` | Takes UUID from [MineSkin](https://mineskin.org). |
| `player:<name>` | `player:Notch` | Displays skin of specified player. |
| `texture:<texture>` | `texture:469b3bac406b51ba0e76c2c218aa4d45fde9ea7c101c85fbd8106c92c4aa36dd` | Uses skin texture from `textures.minecraft.net`. Skin browsing websites show this value. |
| `texture:<texture>` | `texture:469b3bac406b51ba0e76c2c218aa4d45fde9ea7c101c85fbd8106c92c4aa36dd` | Uses skin texture from `textures.minecraft.net`. Skin browsing websites often show this value (for example `Texture URL` on mineskin.org). |
# Compatibility with other plugins
This feature does not have any compatibility issues with other plugins.
+2 -2
View File
@@ -142,8 +142,8 @@ This list is browsed through until the first match is found. If no match is foun
Values are taken independently of each other.
This means you can set per-world tagprefix, but only keep one global tagsuffix, for example.
You can see the source of a value displayed on player by using `/tab debug <player>` and checking "source"
part of the value you are looking for.
You can see the source of a value displayed on player by using `/tab dump <player>`, opening the link and checking "source"
part of the value you are looking for (tagprefix / tagsuffix).
## Name color
On versions 1.12.2 and below, name color follows the last color of prefix. This also includes magic codes. On 1.13+, this is no longer the case. Instead, a new field called "team color" was created. This is an enum constant, where we need to pick from 22 options - 16 colors, 5 magic codes and reset. **As you can see, it doesn't allow for RGB colors**. This also means name can no longer have color and magic codes simultaneously.
-19
View File
@@ -21,9 +21,6 @@
# Enabling
To enable sorting, you must have either [Nametags](https://github.com/NEZNAMY/TAB/wiki/Feature-guide:-Nametags) or [Layout](https://github.com/NEZNAMY/TAB/wiki/Feature-guide:-Layout) (or both) enabled.
> [!TIP]
> To verify you enabled sorting, run `/tab debug`. It will say `Sorting type:` followed by anything except `DISABLED`.
# Methods of sorting
Below are all the different methods that you can use to sort players.
@@ -33,10 +30,6 @@ This is the default and recommended method. Players will be sorted by their prim
First, put your players into groups in your permission plugin.
All the ways to do it can be found
at [How to assign players into groups](https://github.com/NEZNAMY/TAB/wiki/How-to-assign-players-into-groups).
> [!TIP]
> Verify player's group using `/tab debug <player>`.
It should say `Primary permission group:` followed by group you configured.
If not, you did not assign players into groups correctly.
Second, place all of your groups in to a comma separated list **in order of priority** into `sorting-types`. Example:
```yaml
@@ -44,15 +37,6 @@ scoreboard-teams:
sorting-types:
- "GROUPS:owner,admin,mod,default"
```
> [!TIP]
> Verify configured sorting priority of players using `/tab debug <player>`.
It should show a message like this:
![image](https://github.com/NEZNAMY/TAB/assets/6338394/095d8523-e8c0-4eff-8935-b0b8e6e0d5ff)
If a group is not in the list, you will get the following:
![image](https://github.com/NEZNAMY/TAB/assets/6338394/9c530873-87c9-4db7-8916-a6121dbeed37)
If that's the case, you forgot to add that group into the list.
## PERMISSIONS
> [!CAUTION]
@@ -71,8 +55,6 @@ scoreboard-teams:
sorting-types:
- "PERMISSIONS:my.permission.1,my.permission.2,my.permission.3"
```
> [!TIP]
> Verify sorting permissions of a player using `/tab debug <player>`
## PLACEHOLDER
This method sorts players using the output of a placeholder and comparing that to pre-defined values.
@@ -233,7 +215,6 @@ The most common mistakes include:
* Installing TAB on a proxy without having any permission plugin on the proxy.
* Enabling `assign-groups-by-permissions` without giving those permissions (or the opposite - giving away OP to users, resulting in the highest group being taken).
[Debug command](https://github.com/NEZNAMY/TAB/wiki/Commands-&-Permissions#tab-debug-player) will help you identify if this is your case.
* Using a plugin that causes TAB to fail to apply teams (such as Tablisknu). This includes installing TAB plugin on both backend and proxy, causing the installations to conflict.
* Using TAB on Velocity without installing [VelocityScoreboardAPI](https://github.com/NEZNAMY/VelocityScoreboardAPI/releases)
@@ -133,8 +133,8 @@ This list is browsed through until the first match is found. If no match is foun
Values are taken independently of each other.
This means you can set per-world tabprefix, but only keep one global tabsuffix, for example.
You can see the source of a value displayed on player by using `/tab debug <player>` and checking "source"
part of the value you are looking for.
You can see the source of a value displayed on player by using `/tab dump <player>`, opening the link and checking "source"
part of the value you are looking for (tabprefix / customtabname / tabsuffix).
# Placeholders
This feature does not offer any internal placeholders, only PlaceholderAPI placeholders.
+1 -1
View File
@@ -1,5 +1,5 @@
# About the wiki
The wiki explains the functionality of the plugin as of version **5.5.0**.
The wiki explains the functionality of the plugin as of version **6.0.0**.
If your config looks different or is missing some features, you are using an old version of the plugin.
To get the latest version, check [releases](https://github.com/NEZNAMY/TAB/releases/).
Wiki for older plugin versions is not available.
@@ -22,7 +22,7 @@ There are 2 simple steps to this:
> (for luckperms /lp group \<group\> setweight \<number\>).
> [!TIP]
> Verify player's group using `/tab debug <player>`. It should say `Primary permission group: <your group>`.
> Verify player's group using `/tab dump <player>`, opening the link and check "permissionGroup" in player info.
## Option 2: Permission nodes
Instead of taking whole groups, TAB will check for permission nodes and assign groups based on the highest permission.
+1
View File
@@ -35,6 +35,7 @@ Advantages of proxy installation compared to installing on all backend servers i
* [Layout](https://github.com/NEZNAMY/TAB/wiki/Feature-guide:-Layout) can work with all players connected to the proxy
* Avoid [header/footer](https://github.com/NEZNAMY/TAB/wiki/Feature-guide:-Header-&-Footer#additional-note-1---not-resetting-on-server-switch) and [bossbar](https://github.com/NEZNAMY/TAB/wiki/Feature-guide:-Bossbar#additional-note-2---not-hiding-on-server-switch) not disappearing on server switch
* Configuration files in a single place for easier editing / no need to use MySQL for syncing data
* Can use new features for new players even if backend is using an older version (RGB, 1.20.3+ NumberFormat and more).
Disadvantages compared to installing on all backend servers instead:
+1 -6
View File
@@ -25,9 +25,4 @@ older software will not be compatible with the new one.
You should always be running the latest versions of both TAB and Bridge.
# Confirming it works
You have many ways to verify TAB and Bridge are properly connected. Besides checking if the features above work, the easiest one is to run `/btab debug <player>`.
If it's properly connected, you'll get a message saying this:
![image](https://github.com/NEZNAMY/TAB/assets/6338394/3f8dd978-a8bd-4613-9ea1-a56340194859)
If it's not properly connected, you'll get this message:
![image](https://github.com/NEZNAMY/TAB/assets/6338394/a90018bc-2c3b-4bf5-b54c-56621178ce80)
If this is the case, it means Bridge is either not installed or versions are not compatible. Update both to the latest version.
You have many ways to verify TAB and Bridge are properly connected. Besides checking if the features above work, the easiest one is to run `/btab dump <player>` and check if bridge connection says connected. If not, it means Bridge is either not installed or versions are not compatible. Update both to the latest version.
+10 -6
View File
@@ -8,11 +8,11 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # https://github.com/actions/checkout/releases
- uses: actions/checkout@v6 # https://github.com/actions/checkout/releases
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 25
uses: actions/setup-java@v4 # https://github.com/actions/setup-java/releases
uses: actions/setup-java@v5 # https://github.com/actions/setup-java/releases
with:
distribution: 'temurin'
java-version: 25
@@ -31,11 +31,15 @@ jobs:
run: ./gradlew clean build
- name: Rename JAR with Build Number
run: |
original_jar=$(find jar/build/libs -type f -name "TAB-*.jar")
new_name=$(echo "$original_jar" | sed "s/TAB-\(.*\)\.jar/TAB-\1+${{ github.run_number }}.jar/")
mv "$original_jar" "$new_name"
find jar/build/libs -type f -name "TAB v*.jar" -print0 | while IFS= read -r -d '' original; do
dir=$(dirname "$original")
base=$(basename "$original")
new_base="${base%.jar}+${{ github.run_number }}.jar"
new_path="$dir/$new_base"
mv "$original" "$new_path"
done
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.3 # https://github.com/actions/upload-artifact/releases
with:
name: Click here to download
path: jar/build/libs/TAB-*+${{ github.run_number }}.jar
path: "jar/build/libs/TAB v*+${{ github.run_number }}.jar"
+2 -2
View File
@@ -3,7 +3,7 @@ plugins {
}
dependencies {
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.4.0")
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.4.1")
implementation("io.freefair.gradle:lombok-plugin:9.2.0")
implementation("dev.architectury.loom:dev.architectury.loom.gradle.plugin:1.13-SNAPSHOT")
implementation("dev.architectury.loom-no-remap:dev.architectury.loom-no-remap.gradle.plugin:1.14-SNAPSHOT")
}
@@ -13,7 +13,8 @@ tasks {
"version" to project.version,
"description" to project.description,
"website" to rootProject.ext.get("website")!!.toString(),
"author" to rootProject.ext.get("author")!!.toString()
"author" to rootProject.ext.get("author")!!.toString(),
"credits" to rootProject.ext.get("credits")!!.toString()
))
}
javadoc {
@@ -20,7 +20,5 @@ tasks {
relocate("org.json", "me.neznamy.tab.libs.org.json")
relocate("com.rabbitmq", "me.neznamy.tab.libs.com.rabbitmq")
relocate("com.saicone.delivery4j", "me.neznamy.tab.libs.com.saicone.delivery4j")
relocate("com.mysql", "me.neznamy.tab.libs.com.mysql")
relocate("com.google.protobuf", "me.neznamy.tab.libs.com.google.protobuf")
}
}
+3 -3
View File
@@ -4,7 +4,7 @@ plugins {
allprojects {
group = "me.neznamy"
version = "6.0.0"
version = "6.0.2"
description = "An all-in-one solution that works"
ext.set("id", "tab")
@@ -60,8 +60,8 @@ val platformPaths = setOf(
":bungeecord",
":velocity",
":fabric",
":neoforge",
":forge"
":neoforge"
// ":forge"
)
val specialPaths = setOf(
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.paper_1_20_5;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import org.jetbrains.annotations.NotNull;
@@ -10,7 +11,11 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.paper_1_21_11;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import org.jetbrains.annotations.NotNull;
@@ -10,7 +11,11 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.paper_1_21_2;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import org.jetbrains.annotations.NotNull;
@@ -10,7 +11,11 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.paper_1_21_4;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import org.jetbrains.annotations.NotNull;
@@ -10,7 +11,11 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.paper_1_21_9;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import org.jetbrains.annotations.NotNull;
@@ -10,7 +11,11 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
@@ -44,8 +44,7 @@ public class BukkitEventListener implements EventListener<Player>, Listener {
public void onJoin(PlayerJoinEvent e) {
TAB.getInstance().addTablistTracker(
e.getPlayer().getUniqueId(),
platform.getServerVersionInfo().getImplementationProvider().getChannel(e.getPlayer()),
platform.getServerVersionInfo().getImplementationProvider().newTabListEntryTracker()
platform.getServerVersionInfo().getImplementationProvider().newTabListEntryTracker(e.getPlayer())
);
join(e.getPlayer());
}
@@ -20,7 +20,7 @@ public class BukkitTAB extends JavaPlugin {
} catch (IllegalStateException e) {
Bukkit.getConsoleSender().sendMessage("§c[TAB] ================================================================================");
Bukkit.getConsoleSender().sendMessage("§c[TAB] Your server version (" + Bukkit.getBukkitVersion() + ") is not supported.");
Bukkit.getConsoleSender().sendMessage("§c[TAB] This jar only supports 1.7.10, 1.8.8, 1.9.4 - 1.15.x, 1.16.5, 1.17.1, 1.18.2 - 26.1.1");
Bukkit.getConsoleSender().sendMessage("§c[TAB] This jar only supports 1.7.10, 1.8.8, 1.9.4 - 1.15.x, 1.16.5, 1.17.1, 1.18.2 - 26.1.2");
Bukkit.getConsoleSender().sendMessage("§c[TAB] If you just updated to a new Minecraft version, check for TAB updates.");
Bukkit.getConsoleSender().sendMessage("§c[TAB] If you are using an unsupported 1.x version, use an older version of TAB (latest TAB 5.x supports all MC 1.x versions).");
Bukkit.getConsoleSender().sendMessage("§c[TAB] Thrown error message: " + e.getMessage());
@@ -85,6 +85,7 @@ public class ServerVersionInfo {
Map<ProtocolVersion, String> spigotVersions = new LinkedHashMap<>();
spigotVersions.put(ProtocolVersion.V26_1, "v26_1");
spigotVersions.put(ProtocolVersion.V26_1_1, "v26_1");
spigotVersions.put(ProtocolVersion.V26_1_2, "v26_1");
Map<ProtocolVersion, String> paperVersions = new LinkedHashMap<>();
paperVersions.put(ProtocolVersion.V1_20_5, "paper_1_20_5");
@@ -103,6 +104,7 @@ public class ServerVersionInfo {
paperVersions.put(ProtocolVersion.V1_21_11, "paper_1_21_11");
paperVersions.put(ProtocolVersion.V26_1, "paper_1_21_11"); // v26_1 works too
paperVersions.put(ProtocolVersion.V26_1_1, "paper_1_21_11"); // v26_1 works too
paperVersions.put(ProtocolVersion.V26_1_2, "paper_1_21_11"); // v26_1 works too
if (serverVersion == ProtocolVersion.UNKNOWN) {
throw new IllegalStateException(String.format(
@@ -143,7 +143,8 @@ public class BukkitPlatform implements BackendPlatform {
@Override
@Nullable
public PipelineInjector createPipelineInjector() {
return ReflectionUtils.classExists("io.netty.channel.Channel") ? new BukkitPipelineInjector() : null;
return serverVersionInfo.getServerVersion().getNetworkId() >= ProtocolVersion.V1_8.getNetworkId()
? new BukkitPipelineInjector() : null;
}
@Override
@@ -329,6 +330,7 @@ public class BukkitPlatform implements BackendPlatform {
knownCommands.remove(command.getName() + ":" + command.getName());
command.unregister(commandMap);
}
customCommands.clear();
}
@Override
@@ -438,15 +440,20 @@ public class BukkitPlatform implements BackendPlatform {
map.put("server-name", Bukkit.getName());
map.put("server-version", serverVersionInfo.getMinecraftVersion());
map.put("craftbukkit-package", serverVersionInfo.getServerPackage());
map.put("nms-implementation", serverVersionInfo.getImplementationProvider().getClass().getName());
map.put("tab-version", ProjectVariables.PLUGIN_VERSION);
Map<String, Object> plugins = new LinkedHashMap<>();
for (Plugin p : Bukkit.getPluginManager().getPlugins()) {
Plugin[] pluginArray = Bukkit.getPluginManager().getPlugins();
Arrays.sort(pluginArray, Comparator.comparing(p -> p.getDescription().getName(), String.CASE_INSENSITIVE_ORDER));
for (Plugin p : pluginArray) {
plugins.put(p.getDescription().getName(), p.getDescription().getVersion());
}
map.put("plugins", plugins);
if (placeholderAPI) {
Map<String, String> expansions = new LinkedHashMap<>();
for (PlaceholderExpansion p : PlaceholderAPIPlugin.getInstance().getLocalExpansionManager().getExpansions()) {
PlaceholderExpansion[] expansionArray = PlaceholderAPIPlugin.getInstance().getLocalExpansionManager().getExpansions().toArray(new PlaceholderExpansion[0]);
Arrays.sort(expansionArray, Comparator.comparing(PlaceholderExpansion::getIdentifier, String.CASE_INSENSITIVE_ORDER));
for (PlaceholderExpansion p : expansionArray) {
expansions.put(p.getIdentifier(), p.getVersion());
}
map.put("placeholderapi-expansions", expansions);
@@ -55,10 +55,12 @@ public interface ImplementationProvider {
/**
* Creates a new instance of tab list entry tracker.
*
* @param player
* Player to create tab list entry tracker for
* @return Newly created tab list entry tracker
*/
@NotNull
TabListEntryTracker newTabListEntryTracker();
TabListEntryTracker newTabListEntryTracker(@NotNull Player player);
/**
* Returns ping of the given player.
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,8 +1,9 @@
package me.neznamy.tab.platforms.bukkit.v1_10_R1;
import com.mojang.authlib.GameProfile;
import io.netty.channel.Channel;
import lombok.SneakyThrows;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import me.neznamy.tab.shared.util.ReflectionUtils;
import net.minecraft.server.v1_10_R1.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_10_R1.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
@@ -15,13 +16,17 @@ import java.util.List;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final Field ACTION = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, EnumPlayerInfoAction.class);
private static final Field PLAYERS = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, List.class);
private static final Class<?> PlayerInfoData = Arrays.stream(PacketPlayOutPlayerInfo.class.getDeclaredClasses()).filter(c -> !c.isEnum() && c.getConstructors().length > 0).findFirst().get();
private static final Field PlayerInfoData_Profile = ReflectionUtils.getOnlyField(PlayerInfoData, GameProfile.class);
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
@SneakyThrows
@SuppressWarnings("unchecked")
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,8 +1,9 @@
package me.neznamy.tab.platforms.bukkit.v1_11_R1;
import com.mojang.authlib.GameProfile;
import io.netty.channel.Channel;
import lombok.SneakyThrows;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import me.neznamy.tab.shared.util.ReflectionUtils;
import net.minecraft.server.v1_11_R1.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_11_R1.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
@@ -14,13 +15,17 @@ import java.util.List;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final Field ACTION = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, EnumPlayerInfoAction.class);
private static final Field PLAYERS = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, List.class);
private static final Class<?> PlayerInfoData = PacketPlayOutPlayerInfo.class.getDeclaredClasses()[0];
private static final Field PlayerInfoData_Profile = ReflectionUtils.getOnlyField(PlayerInfoData, GameProfile.class);
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
@SneakyThrows
@SuppressWarnings("unchecked")
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,8 +1,9 @@
package me.neznamy.tab.platforms.bukkit.v1_12_R1;
import com.mojang.authlib.GameProfile;
import io.netty.channel.Channel;
import lombok.SneakyThrows;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import me.neznamy.tab.shared.util.ReflectionUtils;
import net.minecraft.server.v1_12_R1.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_12_R1.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
@@ -14,13 +15,17 @@ import java.util.List;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final Field ACTION = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, EnumPlayerInfoAction.class);
private static final Field PLAYERS = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, List.class);
private static final Class<?> PlayerInfoData = PacketPlayOutPlayerInfo.class.getDeclaredClasses()[0];
private static final Field PlayerInfoData_Profile = ReflectionUtils.getOnlyField(PlayerInfoData, GameProfile.class);
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
@SneakyThrows
@SuppressWarnings("unchecked")
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,8 +1,9 @@
package me.neznamy.tab.platforms.bukkit.v1_13_R2;
import com.mojang.authlib.GameProfile;
import io.netty.channel.Channel;
import lombok.SneakyThrows;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import me.neznamy.tab.shared.util.ReflectionUtils;
import net.minecraft.server.v1_13_R2.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_13_R2.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
@@ -14,13 +15,17 @@ import java.util.List;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final Field ACTION = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, EnumPlayerInfoAction.class);
private static final Field PLAYERS = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, List.class);
private static final Class<?> PlayerInfoData = PacketPlayOutPlayerInfo.class.getDeclaredClasses()[0];
private static final Field PlayerInfoData_Profile = ReflectionUtils.getOnlyField(PlayerInfoData, GameProfile.class);
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
@SneakyThrows
@SuppressWarnings("unchecked")
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,8 +1,9 @@
package me.neznamy.tab.platforms.bukkit.v1_14_R1;
import com.mojang.authlib.GameProfile;
import io.netty.channel.Channel;
import lombok.SneakyThrows;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import me.neznamy.tab.shared.util.ReflectionUtils;
import net.minecraft.server.v1_14_R1.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_14_R1.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
@@ -14,13 +15,17 @@ import java.util.List;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final Field ACTION = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, EnumPlayerInfoAction.class);
private static final Field PLAYERS = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, List.class);
private static final Class<?> PlayerInfoData = PacketPlayOutPlayerInfo.class.getDeclaredClasses()[0];
private static final Field PlayerInfoData_Profile = ReflectionUtils.getOnlyField(PlayerInfoData, GameProfile.class);
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
@SneakyThrows
@SuppressWarnings("unchecked")
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,8 +1,9 @@
package me.neznamy.tab.platforms.bukkit.v1_15_R1;
import com.mojang.authlib.GameProfile;
import io.netty.channel.Channel;
import lombok.SneakyThrows;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import me.neznamy.tab.shared.util.ReflectionUtils;
import net.minecraft.server.v1_15_R1.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_15_R1.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
@@ -14,13 +15,17 @@ import java.util.List;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final Field ACTION = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, EnumPlayerInfoAction.class);
private static final Field PLAYERS = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, List.class);
private static final Class<?> PlayerInfoData = PacketPlayOutPlayerInfo.class.getDeclaredClasses()[0];
private static final Field PlayerInfoData_Profile = ReflectionUtils.getOnlyField(PlayerInfoData, GameProfile.class);
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
@SneakyThrows
@SuppressWarnings("unchecked")
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,8 +1,9 @@
package me.neznamy.tab.platforms.bukkit.v1_16_R3;
import com.mojang.authlib.GameProfile;
import io.netty.channel.Channel;
import lombok.SneakyThrows;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import me.neznamy.tab.shared.util.ReflectionUtils;
import net.minecraft.server.v1_16_R3.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_16_R3.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
@@ -14,13 +15,17 @@ import java.util.List;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final Field ACTION = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, EnumPlayerInfoAction.class);
private static final Field PLAYERS = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, List.class);
private static final Class<?> PlayerInfoData = PacketPlayOutPlayerInfo.class.getDeclaredClasses()[0];
private static final Field PlayerInfoData_Profile = ReflectionUtils.getOnlyField(PlayerInfoData, GameProfile.class);
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
@SneakyThrows
@SuppressWarnings("unchecked")
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_17_R1;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo;
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
import org.jetbrains.annotations.NotNull;
@@ -8,11 +9,15 @@ import org.jetbrains.annotations.NotNull;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final EnumPlayerInfoAction ADD_PLAYER = EnumPlayerInfoAction.valueOf("ADD_PLAYER");
private static final EnumPlayerInfoAction REMOVE_PLAYER = EnumPlayerInfoAction.valueOf("REMOVE_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof PacketPlayOutPlayerInfo) {
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_18_R2;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo;
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
import org.jetbrains.annotations.NotNull;
@@ -8,11 +9,15 @@ import org.jetbrains.annotations.NotNull;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final EnumPlayerInfoAction ADD_PLAYER = EnumPlayerInfoAction.valueOf("ADD_PLAYER");
private static final EnumPlayerInfoAction REMOVE_PLAYER = EnumPlayerInfoAction.valueOf("REMOVE_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof PacketPlayOutPlayerInfo) {
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_19_R1;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo;
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
import org.jetbrains.annotations.NotNull;
@@ -8,11 +9,15 @@ import org.jetbrains.annotations.NotNull;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final EnumPlayerInfoAction ADD_PLAYER = EnumPlayerInfoAction.valueOf("ADD_PLAYER");
private static final EnumPlayerInfoAction REMOVE_PLAYER = EnumPlayerInfoAction.valueOf("REMOVE_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof PacketPlayOutPlayerInfo) {
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_19_R2;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket) {
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_19_R3;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket) {
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_20_R1;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket) {
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_20_R2;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket remove) {
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_20_R3;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket remove) {
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_20_R4;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket remove) {
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_21_R1;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket remove) {
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_21_R2;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket remove) {
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_21_R3;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket remove) {
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_21_R4;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket remove) {
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_21_R5;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket remove) {
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_21_R6;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket remove) {
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v1_21_R7;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a;
@@ -11,10 +12,14 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final a ADD_PLAYER = a.valueOf("ADD_PLAYER");
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
if (packet instanceof ClientboundPlayerInfoRemovePacket remove) {
@@ -13,6 +13,10 @@ import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
import java.util.Collections;
import java.util.UUID;
/**
* Implementation provider using direct NMS code for 1.7.10.
*/
@@ -42,10 +46,21 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new TabListEntryTracker() {
@Override
public void onPacketSend(@NotNull Object packet) {
public void inject() {
}
@Override
public boolean containsEntry(@NotNull UUID uuid) {
return true;
}
@Override
public @NotNull Collection<UUID> getEntries() {
return Collections.emptyList();
}
};
}
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,7 +1,8 @@
package me.neznamy.tab.platforms.bukkit.v1_8_R3;
import io.netty.channel.Channel;
import lombok.SneakyThrows;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import me.neznamy.tab.shared.util.ReflectionUtils;
import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
@@ -14,11 +15,15 @@ import java.util.List;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final Field ACTION = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, EnumPlayerInfoAction.class);
private static final Field PLAYERS = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, List.class);
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
@SneakyThrows
@SuppressWarnings("unchecked")
@@ -41,8 +41,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,8 +1,9 @@
package me.neznamy.tab.platforms.bukkit.v1_9_R2;
import com.mojang.authlib.GameProfile;
import io.netty.channel.Channel;
import lombok.SneakyThrows;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import me.neznamy.tab.shared.util.ReflectionUtils;
import net.minecraft.server.v1_9_R2.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_9_R2.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
@@ -15,13 +16,17 @@ import java.util.List;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
private static final Field ACTION = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, EnumPlayerInfoAction.class);
private static final Field PLAYERS = ReflectionUtils.getOnlyField(PacketPlayOutPlayerInfo.class, List.class);
private static final Class<?> PlayerInfoData = Arrays.stream(PacketPlayOutPlayerInfo.class.getDeclaredClasses()).filter(c -> !c.isEnum() && c.getConstructors().length > 0).findFirst().get();
private static final Field PlayerInfoData_Profile = ReflectionUtils.getOnlyField(PlayerInfoData, GameProfile.class);
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
@SneakyThrows
@SuppressWarnings("unchecked")
+1 -1
View File
@@ -4,5 +4,5 @@ dependencies {
}
tasks.compileJava {
options.release.set(25) // Required to compile the code
options.release.set(21) // Included library "jtracy" requires Java 21
}
@@ -51,8 +51,8 @@ public class NMSImplementationProvider implements ImplementationProvider {
@Override
@NotNull
public TabListEntryTracker newTabListEntryTracker() {
return new NMSTabListEntryTracker();
public TabListEntryTracker newTabListEntryTracker(@NotNull Player player) {
return new NMSTabListEntryTracker(getChannel(player));
}
@Override
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.bukkit.v26_1;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import org.jetbrains.annotations.NotNull;
@@ -10,7 +11,11 @@ import java.util.UUID;
/**
* Implementation of TabListEntryTracker.
*/
public class NMSTabListEntryTracker extends TabListEntryTracker {
public class NMSTabListEntryTracker extends NettyTabListEntryTracker {
public NMSTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
@@ -327,6 +327,7 @@ public class BungeePlatform extends ProxyPlatform {
for (Command cmd : customCommands) {
ProxyServer.getInstance().getPluginManager().unregisterCommand(cmd);
}
customCommands.clear();
}
@Override
@@ -338,7 +339,9 @@ public class BungeePlatform extends ProxyPlatform {
map.put("server-version", plugin.getProxy().getVersion());
map.put("tab-version", ProjectVariables.PLUGIN_VERSION);
Map<String, Object> plugins = new LinkedHashMap<>();
for (Plugin p : plugin.getProxy().getPluginManager().getPlugins()) {
Plugin[] pluginArray = plugin.getProxy().getPluginManager().getPlugins().toArray(new Plugin[0]);
Arrays.sort(pluginArray, Comparator.comparing(p -> p.getDescription().getName(), String.CASE_INSENSITIVE_ORDER));
for (Plugin p : pluginArray) {
plugins.put(p.getDescription().getName(), p.getDescription().getVersion());
}
map.put("plugins", plugins);
+11 -47
View File
@@ -1,7 +1,7 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("dev.architectury.loom")
id("dev.architectury.loom-no-remap")
}
repositories {
@@ -14,67 +14,31 @@ repositories {
maven("https://repo.papermc.io/repository/maven-public/") // Adventure
}
val minecraftVersion = "1.21.11"
val minecraftVersion = "26.1.2"
// Fabric API versions for each Minecraft version for easier backporting
// Official website (for updating in the future): https://fabricmc.net/develop/
val fabricApiVersions = mapOf(
"1.21.11" to "0.139.4+1.21.11",
"1.21.10" to "0.136.0+1.21.10",
"1.21.9" to "0.134.0+1.21.9",
"1.21.8" to "0.136.0+1.21.8",
"1.21.7" to "0.129.0+1.21.7",
"1.21.6" to "0.128.2+1.21.6",
"1.21.5" to "0.128.2+1.21.5",
"1.21.4" to "0.119.4+1.21.4",
"1.21.3" to "0.114.1+1.21.3",
"1.21.2" to "0.106.1+1.21.2",
"1.21.1" to "0.116.6+1.21.1",
"1.21" to "0.102.0+1.21",
"1.20.6" to "0.100.8+1.20.6",
"1.20.5" to "0.97.8+1.20.5",
"1.20.4" to "0.97.3+1.20.4",
"1.20.3" to "0.91.1+1.20.3",
"1.20.2" to "0.91.6+1.20.2",
"1.20.1" to "0.92.6+1.20.1",
"1.20" to "0.83.0+1.20",
"1.19.4" to "0.87.2+1.19.4",
"1.19.3" to "0.76.1+1.19.3",
"1.19.2" to "0.77.0+1.19.2",
"1.19.1" to "0.58.5+1.19.1",
"1.19" to "0.58.0+1.19",
"1.18.2" to "0.77.0+1.18.2",
"1.18.1" to "0.46.6+1.18",
"1.18" to "0.44.0+1.18",
"1.17.1" to "0.46.1+1.17",
"1.17" to "0.46.1+1.17",
"1.16.5" to "0.42.0+1.16",
"1.16.4" to "0.42.0+1.16",
"1.16.3" to "0.42.0+1.16",
"1.16.2" to "0.42.0+1.16",
"1.16.1" to "0.42.0+1.16",
"1.16" to "0.42.0+1.16"
"26.1.2" to "0.146.1+26.1.2"
)
dependencies {
minecraft("com.mojang:minecraft:${minecraftVersion}")
mappings(loom.officialMojangMappings())
api(projects.shared)
modImplementation("me.lucko:fabric-permissions-api:0.2-SNAPSHOT")
modImplementation("eu.pb4:placeholder-api:2.5.0+1.21.2")
modImplementation("net.fabricmc:fabric-loader:0.18.5")
modImplementation(fabricApi.module("fabric-lifecycle-events-v1", fabricApiVersions[minecraftVersion]))
modImplementation(fabricApi.module("fabric-networking-api-v1", fabricApiVersions[minecraftVersion]))
modImplementation(fabricApi.module("fabric-entity-events-v1", fabricApiVersions[minecraftVersion]))
modImplementation(fabricApi.module("fabric-command-api-v2", "0.58.0+1.19"))
modImplementation(fabricApi.module("fabric-command-api-v1", "0.77.0+1.18.2"))
implementation("me.lucko:fabric-permissions-api:0.7.0")
implementation("eu.pb4:placeholder-api:3.0.0+26.1")
implementation("net.fabricmc:fabric-loader:0.19.2")
implementation(fabricApi.module("fabric-lifecycle-events-v1", fabricApiVersions.getValue(minecraftVersion)))
implementation(fabricApi.module("fabric-networking-api-v1", fabricApiVersions.getValue(minecraftVersion)))
implementation(fabricApi.module("fabric-entity-events-v1", fabricApiVersions.getValue(minecraftVersion)))
implementation(fabricApi.module("fabric-command-api-v2", fabricApiVersions.getValue(minecraftVersion)))
}
loom.accessWidenerPath.set(file("src/main/resources/resources/tab.accesswidener"))
tasks {
compileJava {
options.release.set(21)
options.release.set(25)
}
validateAccessWidener {
enabled = true
@@ -26,6 +26,7 @@ public class FabricBossBar extends SafeBossBar<ServerBossEvent> {
@NotNull
public ServerBossEvent constructBossBar(@NotNull UUID id, @NotNull TabComponent title, float progress, @NotNull BarColor color, @NotNull BarStyle style) {
ServerBossEvent bar = new ServerBossEvent(
id,
title.convert(),
BossBarColor.valueOf(color.name()),
BossBarOverlay.valueOf(style.name())
@@ -3,7 +3,7 @@ package me.neznamy.tab.platforms.fabric;
import me.neznamy.tab.shared.TAB;
import me.neznamy.tab.shared.platform.EventListener;
import me.neznamy.tab.shared.platform.TabPlayer;
import net.fabricmc.fabric.api.entity.event.v1.ServerEntityWorldChangeEvents;
import net.fabricmc.fabric.api.entity.event.v1.ServerEntityLevelChangeEvents;
import net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
import net.minecraft.server.level.ServerPlayer;
@@ -22,8 +22,7 @@ public class FabricEventListener implements EventListener<ServerPlayer> {
ServerPlayConnectionEvents.JOIN.register((connection, sender, server) -> {
TAB.getInstance().addTablistTracker(
connection.player.getUUID(),
connection.player.connection.connection.channel,
new FabricTabListEntryTracker()
new FabricTabListEntryTracker(connection.player.connection.connection.channel)
);
join(connection.player);
});
@@ -32,7 +31,7 @@ public class FabricEventListener implements EventListener<ServerPlayer> {
// respawning from death & taking end portal in the end does not call world change event
worldChange(newPlayer.getUUID(), FabricTAB.getLevelName(newPlayer.level()));
});
ServerEntityWorldChangeEvents.AFTER_PLAYER_CHANGE_WORLD.register(
ServerEntityLevelChangeEvents.AFTER_PLAYER_CHANGE_LEVEL.register(
(player, origin, destination) -> worldChange(player.getUUID(), FabricTAB.getLevelName(destination)));
}
@@ -7,6 +7,7 @@ import com.mojang.authlib.properties.PropertyMap;
import com.mojang.logging.LogUtils;
import eu.pb4.placeholders.api.PlaceholderContext;
import eu.pb4.placeholders.api.Placeholders;
import eu.pb4.placeholders.api.node.TextNode;
import lombok.NonNull;
import lombok.SneakyThrows;
import me.neznamy.tab.platforms.fabric.hook.FabricTabExpansion;
@@ -70,9 +71,9 @@ public record FabricPlatform(MinecraftServer server) implements BackendPlatform
PlaceholderManagerImpl manager = TAB.getInstance().getPlaceholderManager();
manager.registerPlayerPlaceholder(identifier,
p -> Placeholders.parseText(
Component.literal(identifier),
PlaceholderContext.of((ServerPlayer) p.getPlayer())
p -> Placeholders.SERVER_PLACEHOLDER_PARSER.parseComponent(
TextNode.convert(Component.literal(identifier)),
PlaceholderContext.of((ServerPlayer) p.getPlayer()).asParserContext()
).getString()
);
}
@@ -286,7 +287,9 @@ public record FabricPlatform(MinecraftServer server) implements BackendPlatform
map.put("server-version", SharedConstants.getCurrentVersion().name());
map.put("tab-version", ProjectVariables.PLUGIN_VERSION);
Map<String, Object> mods = new LinkedHashMap<>();
for (ModContainer mod : FabricLoader.getInstance().getAllMods()) {
ModContainer[] modArray = FabricLoader.getInstance().getAllMods().toArray(new ModContainer[0]);
Arrays.sort(modArray, Comparator.comparing(mod -> mod.getMetadata().getId(), String.CASE_INSENSITIVE_ORDER));
for (ModContainer mod : modArray) {
mods.put(mod.getMetadata().getId(), mod.getMetadata().getVersion().getFriendlyString());
}
map.put("mods", mods);
@@ -1,6 +1,7 @@
package me.neznamy.tab.platforms.fabric;
import me.neznamy.tab.shared.platform.TabListEntryTracker;
import io.netty.channel.Channel;
import me.neznamy.tab.shared.platform.NettyTabListEntryTracker;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import org.jetbrains.annotations.NotNull;
@@ -10,7 +11,11 @@ import java.util.UUID;
/**
* Fabric implementation of TabListEntryTracker.
*/
public class FabricTabListEntryTracker extends TabListEntryTracker {
public class FabricTabListEntryTracker extends NettyTabListEntryTracker {
public FabricTabListEntryTracker(@NotNull Channel channel) {
super(channel);
}
@Override
public void onPacketSend(@NotNull Object packet) {
@@ -1,16 +1,12 @@
package me.neznamy.tab.platforms.fabric.hook;
import eu.pb4.placeholders.api.PlaceholderContext;
import eu.pb4.placeholders.api.PlaceholderHandler;
import eu.pb4.placeholders.api.PlaceholderResult;
import eu.pb4.placeholders.api.Placeholders;
import eu.pb4.placeholders.api.*;
import lombok.Getter;
import me.neznamy.tab.shared.ProjectVariables;
import me.neznamy.tab.shared.TAB;
import me.neznamy.tab.shared.features.PlaceholderManagerImpl;
import me.neznamy.tab.shared.placeholders.expansion.TabExpansion;
import me.neznamy.tab.shared.platform.TabPlayer;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.Identifier;
import java.util.Arrays;
@@ -60,9 +56,9 @@ public class FabricTabExpansion implements TabExpansion {
textBefore = text;
for (String placeholder : PlaceholderManagerImpl.detectPlaceholders(text)) {
text = text.replace(placeholder, TAB.getInstance().getPlaceholderManager().findReplacement(placeholder,
Placeholders.parseText(
Component.literal(placeholder),
PlaceholderContext.of(ctx.player())
Placeholders.SERVER_PLACEHOLDER_PARSER.parseComponent(
placeholder,
PlaceholderContext.of(ctx.player()).asParserContext()
).getString()));
}
} while (!textBefore.equals(text));
@@ -82,8 +78,8 @@ public class FabricTabExpansion implements TabExpansion {
});
}
private void registerPlaceholder(String identifier, PlaceholderHandler handler) {
Placeholders.register(Identifier.tryParse(ProjectVariables.PLUGIN_ID+":"+identifier), handler);
private void registerPlaceholder(String identifier, Placeholder.Handler<ServerPlaceholderContext, String> handler) {
Placeholders.registerServer(Identifier.tryParse(ProjectVariables.PLUGIN_ID+":"+identifier), handler);
}
@Override
+5 -3
View File
@@ -5,16 +5,18 @@
"name": "@name@",
"description": "@description@",
"authors": ["@author@"],
"contributors": ["credits"],
"contributors": ["@credits@"],
"environment": "server",
"entrypoints": {
"server": ["me.neznamy.tab.platforms.fabric.FabricTAB"]
},
"depends": {
"fabric-api-base": "*",
"java": ">=21",
"java": ">=25",
"minecraft": [
"1.21.11"
"26.1.2",
"26.1.1",
"26.1"
]
},
"recommends": {
@@ -1,4 +1,4 @@
accessWidener v2 named
accessWidener v2 official
# Channel
accessible field net/minecraft/server/network/ServerCommonPacketListenerImpl connection Lnet/minecraft/network/Connection;
+5 -41
View File
@@ -1,7 +1,7 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("dev.architectury.loom")
id("dev.architectury.loom-no-remap")
}
repositories {
@@ -15,62 +15,26 @@ repositories {
maven("https://repo.papermc.io/repository/maven-public/") // Adventure
}
val minecraftVersion = "1.21.11"
val minecraftVersion = "26.1.2"
// Forge API versions for each Minecraft version for easier backporting
// Official website (for updating in the future): https://files.minecraftforge.net/net/minecraftforge/forge/
val forgeApiVersions = mapOf(
"1.21.11" to "1.21.11-61.0.2",
"1.21.10" to "1.21.10-60.1.5",
"1.21.9" to "1.21.9-59.0.5",
"1.21.8" to "1.21.8-58.1.11",
"1.21.7" to "1.21.7-57.0.3",
"1.21.6" to "1.21.6-56.0.9",
"1.21.5" to "1.21.5-55.1.4",
"1.21.4" to "1.21.4-54.1.11",
"1.21.3" to "1.21.3-53.1.6",
"1.21.2" to null,
"1.21.1" to "1.21.1-52.1.8",
"1.21" to "1.21-51.0.33",
"1.20.6" to "1.20.6-50.2.2",
"1.20.5" to null,
"1.20.4" to "1.20.4-49.2.2",
"1.20.3" to "1.20.3-49.0.2", // Broken dependencies
"1.20.2" to "1.20.2-48.1.0",
"1.20.1" to "1.20.1-47.4.9",
"1.20" to "1.20-46.0.14",
"1.19.4" to "1.19.4-45.4.2",
"1.19.3" to "1.19.3-44.1.23",
"1.19.2" to "1.19.2-43.5.1",
"1.19.1" to "1.19.1-42.0.9",
"1.19" to "1.19-41.1.0",
"1.18.2" to "1.18.2-40.3.11",
"1.18.1" to "1.18.1-39.1.2",
"1.18" to "1.18-38.0.17",
"1.17.1" to "1.17.1-37.1.1",
"1.17" to null,
"1.16.5" to "1.16.5-36.2.42",
"1.16.4" to "1.16.4-35.1.37",
"1.16.3" to "1.16.3-34.1.42",
"1.16.2" to "1.16.2-33.0.61",
"1.16.1" to "1.16.1-32.0.108", // Broken version
"1.16" to null,
// No one will most likely want anything older, lets stop here
"26.1.2" to "26.1.2-64.0.4"
)
dependencies {
minecraft("com.mojang:minecraft:${minecraftVersion}")
mappings(loom.officialMojangMappings())
forge("net.minecraftforge:forge:${forgeApiVersions[minecraftVersion]}")
api(projects.shared)
compileOnly("net.luckperms:api:5.4")
compileOnly("net.luckperms:api:5.5")
}
loom.forge.accessTransformer(file("src/main/resources/META-INF/accesstransformer.cfg"))
tasks {
compileJava {
options.release.set(21)
options.release.set(25)
}
withType<ShadowJar>().configureEach {
enabled = false
@@ -26,6 +26,7 @@ public class ForgeBossBar extends SafeBossBar<ServerBossEvent> {
@NotNull
public ServerBossEvent constructBossBar(@NotNull UUID id, @NotNull TabComponent title, float progress, @NotNull BarColor color, @NotNull BarStyle style) {
ServerBossEvent bar = new ServerBossEvent(
id,
title.convert(),
BossBarColor.valueOf(color.name()),
BossBarOverlay.valueOf(style.name())
@@ -19,8 +19,7 @@ public class ForgeEventListener implements EventListener<ServerPlayer> {
PlayerEvent.PlayerLoggedInEvent.BUS.addListener(event -> {
TAB.getInstance().addTablistTracker(
event.getEntity().getUUID(),
((ServerPlayer) event.getEntity()).connection.getConnection().channel(),
new ForgeTabListEntryTracker()
new ForgeTabListEntryTracker(((ServerPlayer) event.getEntity()).connection.getConnection().channel())
);
join((ServerPlayer) event.getEntity());
});
Loaded 100 of 145 files, more files were not shown because too many files have changed in this diff. Show more