mirror of
https://github.com/NEZNAMY/TAB.git
synced 2026-11-12 20:22:01 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
019a0287b2 | ||
|
|
a71dac28c0 | ||
|
|
155886e000 | ||
|
|
ed4c303d2e |
No files matched your search
+1
-1
@@ -4,7 +4,7 @@ plugins {
|
||||
|
||||
allprojects {
|
||||
group = "me.neznamy"
|
||||
version = "4.0.8-SNAPSHOT"
|
||||
version = "4.0.9"
|
||||
description = "An all-in-one solution that works"
|
||||
|
||||
ext.set("id", "tab")
|
||||
|
||||
@@ -32,12 +32,12 @@ public abstract class HeaderFooter {
|
||||
Bukkit.getConsoleSender().sendMessage(EnumChatFormat.RED.getFormat() + "[TAB] Failed to initialize NMS fields for " +
|
||||
"sending Header/Footer due to a compatibility error. Using fallback solution using Bukkit API. " +
|
||||
"This will drastically drop performance, as well as miss support for fonts (added in 1.16). " +
|
||||
"Please update the plugin with to version proper support for your server version.");
|
||||
"Please update the plugin to version with proper support for your server version.");
|
||||
} else if (BukkitReflection.getMinorVersion() >= 8) {
|
||||
Bukkit.getConsoleSender().sendMessage(EnumChatFormat.RED.getFormat() + "[TAB] Failed to initialize NMS fields for " +
|
||||
"sending Header/Footer due to a compatibility error. No fallback solution was found either. This will " +
|
||||
"result in the feature not working. " +
|
||||
"Please update the plugin with to version proper support for your server version.");
|
||||
"Please update the plugin to version with proper support for your server version.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -105,15 +105,15 @@ public class BungeeMultiVersion {
|
||||
|
||||
@NotNull
|
||||
@SneakyThrows
|
||||
public static ScoreboardObjective newScoreboardObjective(@NotNull String objective, @NotNull IChatBaseComponent title,
|
||||
public static ScoreboardObjective newScoreboardObjective(@NotNull String objective, @NotNull String title,
|
||||
@Nullable ScoreboardObjective.HealthDisplay healthDisplay, byte action,
|
||||
@NotNull ProtocolVersion version) {
|
||||
if (b1760Plus) {
|
||||
return ScoreboardObjective.class
|
||||
.getConstructor(String.class, BaseComponent.class, ScoreboardObjective.HealthDisplay.class, byte.class)
|
||||
.newInstance(objective, toComponent(title, version), healthDisplay, action);
|
||||
.newInstance(objective, toComponent(IChatBaseComponent.optimizedComponent(title), version), healthDisplay, action);
|
||||
} else {
|
||||
return new ScoreboardObjective(objective, title.toString(version), healthDisplay, action);
|
||||
return new ScoreboardObjective(objective, jsonOrRaw(title, version), healthDisplay, action);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package me.neznamy.tab.platforms.bungeecord;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import me.neznamy.tab.shared.chat.EnumChatFormat;
|
||||
import me.neznamy.tab.shared.chat.IChatBaseComponent;
|
||||
import me.neznamy.tab.shared.platform.Scoreboard;
|
||||
import net.md_5.bungee.protocol.packet.ScoreboardObjective;
|
||||
import net.md_5.bungee.protocol.packet.ScoreboardScore;
|
||||
@@ -32,7 +31,7 @@ public class BungeeScoreboard extends Scoreboard<BungeeTabPlayer> {
|
||||
public void registerObjective0(@NotNull String objectiveName, @NotNull String title, @NotNull HealthDisplay display) {
|
||||
player.sendPacket(BungeeMultiVersion.newScoreboardObjective(
|
||||
objectiveName,
|
||||
IChatBaseComponent.optimizedComponent(title),
|
||||
title,
|
||||
ScoreboardObjective.HealthDisplay.valueOf(display.name()),
|
||||
(byte) 0,
|
||||
player.getVersion()
|
||||
@@ -43,7 +42,7 @@ public class BungeeScoreboard extends Scoreboard<BungeeTabPlayer> {
|
||||
public void unregisterObjective0(@NotNull String objectiveName) {
|
||||
player.sendPacket(BungeeMultiVersion.newScoreboardObjective(
|
||||
objectiveName,
|
||||
new IChatBaseComponent(), // Empty value instead of null to prevent NPE kick on 1.7
|
||||
"", // Empty value instead of null to prevent NPE kick on 1.7
|
||||
null,
|
||||
(byte) 1,
|
||||
player.getVersion()
|
||||
@@ -54,7 +53,7 @@ public class BungeeScoreboard extends Scoreboard<BungeeTabPlayer> {
|
||||
public void updateObjective0(@NotNull String objectiveName, @NotNull String title, @NotNull HealthDisplay display) {
|
||||
player.sendPacket(BungeeMultiVersion.newScoreboardObjective(
|
||||
objectiveName,
|
||||
IChatBaseComponent.optimizedComponent(title),
|
||||
title,
|
||||
ScoreboardObjective.HealthDisplay.valueOf(display.name()),
|
||||
(byte) 2,
|
||||
player.getVersion()
|
||||
|
||||
Reference in new issue
Block a user