Compare commits

...
4 Commits
Author SHA1 Message Date
NEZNAMY 019a0287b2 4.0.9 2023-11-05 14:27:55 +01:00
NEZNAMY a71dac28c0 Hotfix after adding support for latest bungeecord (#1132) 2023-11-05 14:21:25 +01:00
NEZNAMY 155886e000 Fix typo 2023-11-04 15:39:45 +01:00
NEZNAMY ed4c303d2e 4.0.8 2023-11-04 14:55:32 +01:00
4 changed files with 9 additions and 10 deletions

No files matched your search

+1 -1
View File
@@ -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.");
}
}
@@ -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()