mirror of
https://github.com/NEZNAMY/TAB.git
synced 2026-11-12 20:22:01 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a44c97d5a | ||
|
|
29cf0a26d6 | ||
|
|
33d172598d | ||
|
|
af1e685c2b | ||
|
|
09129974db |
No files matched your search
+1
-1
@@ -4,7 +4,7 @@ plugins {
|
||||
|
||||
allprojects {
|
||||
group = "me.neznamy"
|
||||
version = "4.1.7"
|
||||
version = "4.1.8"
|
||||
description = "An all-in-one solution that works"
|
||||
|
||||
ext.set("id", "tab")
|
||||
|
||||
@@ -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
|
||||
|
||||
+9
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user