Compare commits

...
12 Commits
Author SHA1 Message Date
NEZNAMY 4c3bd66209 Update README.md 2024-10-11 20:27:07 +02:00
NEZNAMY 0827d083bf 4.1.9 2024-10-11 19:56:06 +02:00
NEZNAMY 2f7b42ab85 [Bukkit] Fix NPE caused by another plugin making a not-null field null (#1368) 2024-10-07 19:20:14 +02:00
NEZNAMY 735aa666d6 I just love Velocity 2024-10-06 18:21:54 +02:00
NEZNAMY c2ceb643e5 [Bukkit] Bump dependency 2024-10-03 18:22:18 +02:00
NEZNAMY 5c166f647f [Velocity] Fix exploit (not specifying more to keep users safe) 2024-10-02 20:48:10 +02:00
NEZNAMY 03a8fb9aa2 4.1.9-SNAPSHOT 2024-08-30 19:11:38 +02:00
NEZNAMY 1a44c97d5a 4.1.8 2024-08-30 18:57:45 +02:00
NEZNAMY 29cf0a26d6 4.1.8-SNAPSHOT 2024-08-25 20:11:13 +02:00
NEZNAMY 33d172598d [BungeeCord] Avoid sending UPDATE_LIST_ORDER tablist action to <1.21.2 players (#1359) 2024-08-25 20:10:53 +02:00
NEZNAMY af1e685c2b Merge pull request #1357 from hans362/fix-get-skin
Get skin from profile properties by property name
2024-08-20 16:01:48 +02:00
hans362 09129974db Get skin from profile properties by property name 2024-08-20 21:26:08 +08:00
9 changed files with 48 additions and 68 deletions

No files matched your search

+2 -58
View File
@@ -1,58 +1,2 @@
# About
TAB aims to be a superior all-in-one minecraft plugin for displaying information that outperforms all
similar plugins in terms of features, performance and compatibility.
More information can be found at [Why TAB?](https://github.com/NEZNAMY/TAB/wiki/Why-TAB%3F) wiki page.
# Download
### Releases
You can download full releases from [GitHub releases](https://github.com/NEZNAMY/TAB/releases),
[SpigotMC](https://www.spigotmc.org/resources/57806/), [Modrinth](https://modrinth.com/plugin/tab-was-taken) or [BuiltByBit](https://builtbybit.com/resources/20631).
### Dev builds
Plugin's development is continuous and contains lots of small changes/fixes not worthy of being called a full
update, therefore development builds are being created and eventually a full update is released when enough changes are made.
If you want to benefit from a recent change in the code before official release, you can download development builds
from [GitHub actions](https://github.com/NEZNAMY/TAB/actions) (you must be logged into GitHub to be able to download it).
# Compiling
Compilation requires JDK 21 and up.
To compile the plugin, run `./gradlew build` from the terminal.
Once the plugin compiles, grab the jar from `/jar/build/libs/` folder.
The universal jar contains all modules for all supported platforms.
# Documentation
You can find everything about the plugin on the [Wiki](https://github.com/NEZNAMY/TAB/wiki). This includes a detailed description
of all features, as well as information regarding compatibility or limitations of each feature.
# Issues
The [Issues](https://github.com/NEZNAMY/TAB/issues) section is an issue tracker for all the kind of problems covered in issue templates.
Please refrain from attempting to use it to receive help with your server, such issues will be closed immediately.
When opening an issue, provide as much information as possible. The difference between a bug getting fixed in 1 week vs 1 hour
is in quality of the report. Bug reports where steps to reproduce are "idk" have no value and will not help to get the bug fixed at all.
# Contributing
See [CONTRIBUTING.md](https://github.com/NEZNAMY/TAB/blob/master/CONTRIBUTING.md)
# Provided services
The plugin is being used by a large amount of servers, which also means the demand for my attention is high. Unfortunately,
I am no longer able to keep up with the demand since I don't want to dedicate my whole existence to a free plugin.
In order to provide the best quality of all provided services, the amount of services provided may vary over time.
Here is the full list of potential services and their status:
| Service type | Availability |
|-------------------------------|--------------|
| Updates for new MC versions | ✔ |
| Bug fixes | ✔ |
| Wiki updates<sup>1</sup> | ✔ |
| Feature requests | ❌ |
| Customer support<sup>2</sup> | ✔ |
| Free user support<sup>3</sup> | ❌* |
| Optimization<sup>4</sup> | ✔ |
<sup>1</sup> - Adding new examples, guides and other kind of useful information people ask about.
<sup>2</sup> - Unrestricted assistance with the plugin for those, who bought a copy of the plugin when it was purchasable.
<sup>3</sup> - Unlimited access to my free time for everyone in the world.
<sup>4</sup> - Improving plugin's performance while not losing out on any features. This was done
proactively a lot in the past, so there isn't much to do anymore, only if someone actually finds and reports something.
*Instead, you can use [this fresh new community discord](https://discord.gg/YPqXt63YQj) made by a nice person who will provide this service.
# Warning
This branch is abandoned and NO support will be provided. It is an archived source code of the latest release with unlimited nametags and 1.8 bossbars (4.1.9) for MC 1.5 - 1.21.1.
+1 -1
View File
@@ -4,7 +4,7 @@ plugins {
allprojects {
group = "me.neznamy"
version = "4.1.7"
version = "4.1.9"
description = "An all-in-one solution that works"
ext.set("id", "tab")
+1 -1
View File
@@ -2,7 +2,7 @@ dependencies {
implementation(projects.shared)
implementation("org.bstats:bstats-bukkit:3.0.1")
compileOnly("org.purpurmc.purpur:purpur-api:1.16.5-R0.1-SNAPSHOT")
compileOnly("me.clip:placeholderapi:2.11.2")
compileOnly("me.clip:placeholderapi:2.11.6")
compileOnly("com.mojang:authlib:1.5.25")
compileOnly("com.github.MilkBowl:VaultAPI:1.7") {
exclude("org.bukkit", "bukkit")
@@ -16,6 +16,7 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
@@ -309,7 +310,8 @@ public class TeamPacketData {
if (!TeamPacketClass.isInstance(packet)) return;
int action = TeamPacket_ACTION.getInt(packet);
if (action == TeamAction.UPDATE) return;
TeamPacket_PLAYERS.set(packet, player.getScoreboard().onTeamPacket(
action, (String) TeamPacket_NAME.get(packet), (Collection<String>) TeamPacket_PLAYERS.get(packet)));
Collection<String> players = (Collection<String>) TeamPacket_PLAYERS.get(packet);
if (players == null) players = Collections.emptyList();
TeamPacket_PLAYERS.set(packet, player.getScoreboard().onTeamPacket(action, (String) TeamPacket_NAME.get(packet), players));
}
}
@@ -93,8 +93,13 @@ public class BungeeTabPlayer extends ProxyTabPlayer {
LoginResult loginResult = ((InitialHandler)getPlayer().getPendingConnection()).getLoginProfile();
if (loginResult == null) return null;
Property[] properties = loginResult.getProperties();
if (properties == null || properties.length == 0) return null; //Offline mode
return new TabList.Skin(properties[0].getValue(), properties[0].getSignature());
if (properties == null) return null; //Offline mode
for (Property property : properties) {
if (property.getName().equals(TabList.TEXTURES_PROPERTY)) {
return new TabList.Skin(property.getValue(), property.getSignature());
}
}
return null;
}
@Override
@@ -20,7 +20,15 @@ public class BungeeTabList1193 extends BungeeTabList {
private static final Map<Action, EnumSet<PlayerListItemUpdate.Action>> actions = new EnumMap<>(Action.class);
static {
actions.put(Action.ADD_PLAYER, EnumSet.allOf(PlayerListItemUpdate.Action.class));
// Do not use allOf because <1.21.2 does not support UPDATE_LIST_ORDER
// TODO Once bungeecord dependency is updated, support it properly
actions.put(Action.ADD_PLAYER, EnumSet.of(
PlayerListItemUpdate.Action.ADD_PLAYER,
PlayerListItemUpdate.Action.UPDATE_GAMEMODE,
PlayerListItemUpdate.Action.UPDATE_LISTED,
PlayerListItemUpdate.Action.UPDATE_LATENCY,
PlayerListItemUpdate.Action.UPDATE_DISPLAY_NAME
));
actions.put(Action.UPDATE_GAME_MODE, EnumSet.of(PlayerListItemUpdate.Action.UPDATE_GAMEMODE));
actions.put(Action.UPDATE_DISPLAY_NAME, EnumSet.of(PlayerListItemUpdate.Action.UPDATE_DISPLAY_NAME));
actions.put(Action.UPDATE_LATENCY, EnumSet.of(PlayerListItemUpdate.Action.UPDATE_LATENCY));
@@ -84,7 +84,12 @@ public class SpongeTabPlayer extends BackendTabPlayer {
public TabList.Skin getSkin() {
List<ProfileProperty> list = getPlayer().profile().properties();
if (list.isEmpty()) return null; // Offline mode
return new TabList.Skin(list.get(0).value(), list.get(0).signature().orElse(null));
for (ProfileProperty property : list) {
if (property.name().equals(TabList.TEXTURES_PROPERTY)) {
return new TabList.Skin(property.value(), property.signature().orElse(null));
}
}
return null;
}
@Override
@@ -18,12 +18,19 @@ import me.neznamy.tab.shared.platform.EventListener;
import me.neznamy.tab.shared.platform.TabPlayer;
import org.jetbrains.annotations.NotNull;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
/**
* The core for Velocity forwarding events into all enabled features
*/
@SuppressWarnings("UnstableApiUsage")
public class VelocityEventListener implements EventListener<Player> {
/** Map for tracking online players */
private final Map<Player, UUID> players = new ConcurrentHashMap<>();
/**
* Listens to player disconnecting from the server.
*
@@ -32,7 +39,10 @@ public class VelocityEventListener implements EventListener<Player> {
*/
@Subscribe
public void onQuit(@NotNull DisconnectEvent e) {
quit(e.getPlayer().getUniqueId());
// Check if the player was actually connected to the server in the first place to avoid processing
// disconnect of an existing player who is still there (because players are mapped by UUID in TAB)
UUID id = players.remove(e.getPlayer());
if (id != null) quit(id);
}
/**
@@ -66,6 +76,7 @@ public class VelocityEventListener implements EventListener<Player> {
tab.getCPUManager().runTask(() -> {
TabPlayer player = tab.getPlayer(e.getPlayer().getUniqueId());
if (player == null) {
players.put(e.getPlayer(), e.getPlayer().getUniqueId());
tab.getFeatureManager().onJoin(createPlayer(e.getPlayer()));
} else {
player.getScoreboard().freeze(); // Prevent server switch listeners from sending packets before re-registering objectives in onLoginPacket
@@ -65,7 +65,12 @@ public class VelocityTabPlayer extends ProxyTabPlayer {
public TabList.Skin getSkin() {
List<GameProfile.Property> properties = getPlayer().getGameProfile().getProperties();
if (properties.isEmpty()) return null; //Offline mode
return new TabList.Skin(properties.get(0).getValue(), properties.get(0).getSignature());
for (GameProfile.Property property : properties) {
if (property.getName().equals(TabList.TEXTURES_PROPERTY)) {
return new TabList.Skin(property.getValue(), property.getSignature());
}
}
return null;
}
@Override