diff --git a/plugin/mappings_generator.gradle b/plugin/mappings_generator.gradle index 21837c0b..bdd01ea3 100644 --- a/plugin/mappings_generator.gradle +++ b/plugin/mappings_generator.gradle @@ -188,12 +188,11 @@ File generateData(MinecraftVersion version) { targetDir.deleteDir() this.javaexec() { + classpath(jarFile) if (version >= MinecraftVersion.MINECRAFT_1_18) { jvmArgs("-DbundlerMainClass=net.minecraft.data.Main") - setMainClass("-jar") - args(jarFile.getAbsolutePath()) + setMainClass("net.minecraft.bundler.Main") } else { - classpath(jarFile.getAbsolutePath()) setMainClass("net.minecraft.data.Main") } diff --git a/plugin/src/main/java/net/elytrium/limboapi/injection/packet/UpsertPlayerInfoHook.java b/plugin/src/main/java/net/elytrium/limboapi/injection/packet/UpsertPlayerInfoHook.java index 207c7f0c..9c53065b 100644 --- a/plugin/src/main/java/net/elytrium/limboapi/injection/packet/UpsertPlayerInfoHook.java +++ b/plugin/src/main/java/net/elytrium/limboapi/injection/packet/UpsertPlayerInfoHook.java @@ -66,13 +66,13 @@ public boolean handle(MinecraftSessionHandler handler) { private static Entry createFixedEntry(UUID initialId, Entry item, ConnectedPlayer player) { Entry fixedEntry = new Entry(initialId); - fixedEntry.setDisplayName(item.getDisplayName()); - fixedEntry.setGameMode(item.getGameMode()); - fixedEntry.setLatency(item.getLatency()); - fixedEntry.setDisplayName(item.getDisplayName()); GameProfile profile = item.getProfile(); fixedEntry.setProfile(profile == null || !profile.getId().equals(player.getUniqueId()) ? profile : new GameProfile(initialId, profile.getName(), profile.getProperties())); fixedEntry.setListed(item.isListed()); + fixedEntry.setLatency(item.getLatency()); + fixedEntry.setGameMode(item.getGameMode()); + fixedEntry.setDisplayName(item.getDisplayName()); + fixedEntry.setListOrder(item.getListOrder()); fixedEntry.setChatSession(item.getChatSession()); return fixedEntry; } diff --git a/plugin/src/main/java/net/elytrium/limboapi/injection/tablist/RewritingTabList.java b/plugin/src/main/java/net/elytrium/limboapi/injection/tablist/RewritingTabList.java index 23ff4cc1..5d68b7b3 100644 --- a/plugin/src/main/java/net/elytrium/limboapi/injection/tablist/RewritingTabList.java +++ b/plugin/src/main/java/net/elytrium/limboapi/injection/tablist/RewritingTabList.java @@ -34,15 +34,15 @@ default TabListEntry rewriteEntry(TabListEntry entry) { return entry; } - TabListEntry.Builder builder = TabListEntry.builder(); - builder.tabList(entry.getTabList()); - builder.profile(new GameProfile(this.rewriteUuid(profileId), profile.getName(), profile.getProperties())); - builder.listed(entry.isListed()); - builder.latency(entry.getLatency()); - builder.gameMode(entry.getGameMode()); - entry.getDisplayNameComponent().ifPresent(builder::displayName); - builder.chatSession(entry.getChatSession()); - return builder.build(); + return TabListEntry.builder() + .tabList(entry.getTabList()) + .profile(new GameProfile(this.rewriteUuid(profileId), profile.getName(), profile.getProperties())) + .chatSession(entry.getChatSession()) + .latency(entry.getLatency()) + .gameMode(entry.getGameMode()) + .listed(entry.isListed()) + .listOrder(entry.getListOrder()) + .build(); } default UUID rewriteUuid(UUID uuid) {