mirror of
https://github.com/NEZNAMY/TAB.git
synced 2026-11-26 10:29:49 -05:00
internal scoreboard recode, split class into more for cleaner code + easier limit reaching
This commit is contained in:
1 parent
d893e18273
commit
6f6891c420
15 files changed
+659
-296
No files matched your search
@@ -5,7 +5,7 @@ import java.util.UUID;
|
||||
|
||||
import me.neznamy.tab.platforms.bukkit.BukkitMethods;
|
||||
import me.neznamy.tab.platforms.bukkit.placeholders.afk.AFKProvider;
|
||||
import me.neznamy.tab.premium.ScoreboardManager;
|
||||
import me.neznamy.tab.premium.scoreboard.ScoreboardManager;
|
||||
import me.neznamy.tab.shared.Shared;
|
||||
import me.neznamy.tab.shared.config.Configs;
|
||||
import me.neznamy.tab.shared.features.PlaceholderManager;
|
||||
@@ -126,8 +126,8 @@ public class TABAPI {
|
||||
}
|
||||
ScoreboardManager sbm = (ScoreboardManager) Shared.features.get("scoreboard");
|
||||
if (sbm == null) throw new IllegalStateException("Scoreboard feature is not enabled");
|
||||
Scoreboard sb = new me.neznamy.tab.premium.Scoreboard(sbm, "API", title, lines);
|
||||
sbm.APIscoreboards.add((me.neznamy.tab.premium.Scoreboard) sb);
|
||||
Scoreboard sb = new me.neznamy.tab.premium.scoreboard.Scoreboard(sbm, "API", title, lines);
|
||||
sbm.APIscoreboards.add((me.neznamy.tab.premium.scoreboard.Scoreboard) sb);
|
||||
return sb;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import me.neznamy.tab.platforms.bukkit.permission.Vault;
|
||||
import me.neznamy.tab.platforms.bukkit.placeholders.BukkitPlaceholderRegistry;
|
||||
import me.neznamy.tab.premium.AlignedSuffix;
|
||||
import me.neznamy.tab.premium.Premium;
|
||||
import me.neznamy.tab.premium.ScoreboardManager;
|
||||
import me.neznamy.tab.premium.scoreboard.ScoreboardManager;
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.PlatformMethods;
|
||||
import me.neznamy.tab.shared.ProtocolVersion;
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Map;
|
||||
import me.neznamy.tab.platforms.bungee.permission.None;
|
||||
import me.neznamy.tab.premium.AlignedSuffix;
|
||||
import me.neznamy.tab.premium.Premium;
|
||||
import me.neznamy.tab.premium.ScoreboardManager;
|
||||
import me.neznamy.tab.premium.scoreboard.ScoreboardManager;
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.PlatformMethods;
|
||||
import me.neznamy.tab.shared.ProtocolVersion;
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.velocitypowered.api.proxy.server.RegisteredServer;
|
||||
|
||||
import me.neznamy.tab.premium.AlignedSuffix;
|
||||
import me.neznamy.tab.premium.Premium;
|
||||
import me.neznamy.tab.premium.ScoreboardManager;
|
||||
import me.neznamy.tab.premium.scoreboard.ScoreboardManager;
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.PlatformMethods;
|
||||
import me.neznamy.tab.shared.Shared;
|
||||
|
||||
@@ -1,286 +0,0 @@
|
||||
package me.neznamy.tab.premium;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import me.neznamy.tab.premium.conditions.Condition;
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.PacketAPI;
|
||||
import me.neznamy.tab.shared.Property;
|
||||
import me.neznamy.tab.shared.Shared;
|
||||
import me.neznamy.tab.shared.cpu.CPUFeature;
|
||||
import me.neznamy.tab.shared.features.interfaces.Refreshable;
|
||||
import me.neznamy.tab.shared.packets.IChatBaseComponent;
|
||||
import me.neznamy.tab.shared.packets.PacketPlayOutScoreboardObjective;
|
||||
import me.neznamy.tab.shared.packets.PacketPlayOutScoreboardObjective.EnumScoreboardHealthDisplay;
|
||||
import me.neznamy.tab.shared.packets.PacketPlayOutScoreboardTeam;
|
||||
import me.neznamy.tab.shared.placeholders.Placeholders;
|
||||
|
||||
public class Scoreboard implements me.neznamy.tab.api.Scoreboard, Refreshable {
|
||||
|
||||
private final String ObjectiveName = "TAB-Scoreboard";
|
||||
private final int DisplaySlot = 1;
|
||||
|
||||
private ScoreboardManager manager;
|
||||
private String name;
|
||||
private String title;
|
||||
private Condition displayCondition;
|
||||
private String childBoard;
|
||||
private List<Score> scores = new ArrayList<Score>();
|
||||
private List<ITabPlayer> players = new ArrayList<ITabPlayer>();
|
||||
private Set<String> usedPlaceholders;
|
||||
|
||||
public Scoreboard(ScoreboardManager manager, String name, String title, List<String> lines, String displayCondition, String childBoard) {
|
||||
this(manager, name, title, lines);
|
||||
if (displayCondition != null) {
|
||||
if (Premium.conditions.containsKey(displayCondition)) {
|
||||
this.displayCondition = Premium.conditions.get(displayCondition);
|
||||
} else {
|
||||
List<String> conditions = Lists.newArrayList(displayCondition.split(";"));
|
||||
this.displayCondition = Condition.compile(null, conditions, null, null, null);
|
||||
}
|
||||
}
|
||||
this.childBoard = childBoard;
|
||||
refreshUsedPlaceholders();
|
||||
}
|
||||
public Scoreboard(ScoreboardManager manager, String name, String title, List<String> lines) {
|
||||
this.manager = manager;
|
||||
this.name = name;
|
||||
this.title = title;
|
||||
for (int i=0; i<lines.size(); i++) {
|
||||
Score score = new Score(lines.size()-i, "TAB-SB-TM-"+i, getLineName(i), lines.get(i));
|
||||
scores.add(score);
|
||||
Shared.registerFeature("scoreboard-score-" + name + "-" + i, score);
|
||||
}
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public boolean isConditionMet(ITabPlayer p) {
|
||||
if (displayCondition == null) return true;
|
||||
return displayCondition.isMet(p);
|
||||
}
|
||||
public String getChildScoreboard() {
|
||||
return childBoard;
|
||||
}
|
||||
public String getLineName(int i) {
|
||||
String id = i+"";
|
||||
if (id.length() == 1) id = "0" + id;
|
||||
char c = Placeholders.colorChar;
|
||||
return c + String.valueOf(id.charAt(0)) + c + String.valueOf(id.charAt(1)) + c + "r";
|
||||
}
|
||||
public List<ITabPlayer> getRegisteredUsers(){
|
||||
return players;
|
||||
}
|
||||
public void register(ITabPlayer p) {
|
||||
if (!players.contains(p)) {
|
||||
p.setProperty("scoreboard-title", title, null);
|
||||
PacketAPI.registerScoreboardObjective(p, ObjectiveName, p.properties.get("scoreboard-title").get(), DisplaySlot, EnumScoreboardHealthDisplay.INTEGER);
|
||||
for (Score s : scores) {
|
||||
s.register(p);
|
||||
}
|
||||
players.add(p);
|
||||
}
|
||||
}
|
||||
public void unregister() {
|
||||
for (ITabPlayer all : players.toArray(new ITabPlayer[0])) {
|
||||
unregister(all);
|
||||
}
|
||||
players.clear();
|
||||
scores.clear();
|
||||
}
|
||||
public void unregister(ITabPlayer p) {
|
||||
if (players.contains(p)) {
|
||||
p.sendCustomPacket(PacketPlayOutScoreboardObjective.UNREGISTER(ObjectiveName));
|
||||
for (Score s : scores) {
|
||||
s.unregister(p);
|
||||
}
|
||||
players.remove(p);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh(ITabPlayer refreshed, boolean force) {
|
||||
if (refreshed.properties.get("scoreboard-title") == null) return;
|
||||
refreshed.sendCustomPacket(PacketPlayOutScoreboardObjective.UPDATE_TITLE(ObjectiveName, refreshed.properties.get("scoreboard-title").updateAndGet(), EnumScoreboardHealthDisplay.INTEGER));
|
||||
}
|
||||
@Override
|
||||
public CPUFeature getRefreshCPU() {
|
||||
return CPUFeature.SCOREBOARD_TITLE;
|
||||
}
|
||||
@Override
|
||||
public Set<String> getUsedPlaceholders() {
|
||||
return usedPlaceholders;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshUsedPlaceholders() {
|
||||
usedPlaceholders = Placeholders.getUsedPlaceholderIdentifiersRecursive(title);
|
||||
}
|
||||
|
||||
public void removeFrom(UUID player) {
|
||||
ITabPlayer p = Shared.getPlayer(player);
|
||||
p.setActiveScoreboard(null);
|
||||
unregister(p);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private class Score implements Refreshable {
|
||||
|
||||
private int score;
|
||||
private String rawtext;
|
||||
private String teamname;
|
||||
private String player;
|
||||
private Set<String> usedPlaceholders;
|
||||
private boolean Static;
|
||||
private String staticPrefix;
|
||||
private String staticName;
|
||||
private String staticSuffix;
|
||||
private String staticPrefix1_7;
|
||||
private String staticName1_7;
|
||||
private String staticSuffix1_7;
|
||||
|
||||
public Score(int score, String teamname, String player, String rawtext) {
|
||||
this.score = score;
|
||||
this.teamname = teamname;
|
||||
this.player = player;
|
||||
this.rawtext = rawtext;
|
||||
refreshUsedPlaceholders();
|
||||
if (Static) {
|
||||
rawtext = IChatBaseComponent.fromColoredText(rawtext).toColoredText(); //translating RGB to legacy codes as <1.13 can't see RGB anyway
|
||||
if (rawtext.length() <= 34) { //6 forced characters &x&x&r
|
||||
staticPrefix = "";
|
||||
staticName = player + rawtext;
|
||||
staticSuffix = "";
|
||||
} else {
|
||||
String[] sub = substring(rawtext, 16);
|
||||
staticPrefix = sub[0];
|
||||
String rest = sub[1];
|
||||
String last = Placeholders.getLastColors(staticPrefix);
|
||||
if (last.length() == 0) last = Placeholders.colorChar + "r";
|
||||
rest = player + last + rest;
|
||||
sub = substring(rest, 40);
|
||||
staticName = sub[0];
|
||||
staticSuffix = sub[1];
|
||||
if (staticSuffix.length() > 16) staticSuffix = staticSuffix.substring(0, 16);
|
||||
}
|
||||
if (rawtext.length() <= 10) { //6 forced characters &x&x&r
|
||||
staticPrefix1_7 = "";
|
||||
staticName1_7 = player + rawtext;
|
||||
staticSuffix1_7 = "";
|
||||
} else {
|
||||
String[] sub = substring(rawtext, 16);
|
||||
staticPrefix1_7 = sub[0];
|
||||
String rest = sub[1];
|
||||
String last = Placeholders.getLastColors(staticPrefix1_7);
|
||||
if (last.length() == 0) last = Placeholders.colorChar + "r";
|
||||
rest = player + last + rest;
|
||||
sub = substring(rest, 16);
|
||||
staticName1_7 = sub[0];
|
||||
staticSuffix1_7 = sub[1];
|
||||
if (staticSuffix1_7.length() > 16) staticSuffix1_7 = staticSuffix1_7.substring(0, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
private String[] substring(String string, int length) {
|
||||
if (string.length() <= length) return new String[] {string, ""};
|
||||
if (string.charAt(length-1) == Placeholders.colorChar) length--;
|
||||
return new String[] {string.substring(0, length), string.substring(length, string.length())};
|
||||
}
|
||||
private List<String> replaceText(ITabPlayer p, boolean force, boolean suppressToggle) {
|
||||
if (Static && p.getVersion().getMinorVersion() < 13) {
|
||||
if (p.getVersion().getMinorVersion() < 8) {
|
||||
return Arrays.asList(staticPrefix1_7, staticSuffix1_7);
|
||||
} else {
|
||||
return Arrays.asList(staticPrefix, staticSuffix);
|
||||
}
|
||||
}
|
||||
Property scoreproperty = p.properties.get("sb-"+teamname);
|
||||
boolean emptyBefore = scoreproperty.get().length() == 0;
|
||||
if (!scoreproperty.update() && !force) return null;
|
||||
String replaced = scoreproperty.get();
|
||||
String prefix;
|
||||
String suffix;
|
||||
if (replaced.length() > 16 && p.getVersion().getMinorVersion() < 13) {
|
||||
prefix = replaced.substring(0, 16);
|
||||
suffix = replaced.substring(16, replaced.length());
|
||||
if (prefix.charAt(15) == Placeholders.colorChar) {
|
||||
prefix = prefix.substring(0, 15);
|
||||
suffix = Placeholders.colorChar + suffix;
|
||||
}
|
||||
String last = Placeholders.getLastColors(IChatBaseComponent.fromColoredText(prefix).toColoredText());
|
||||
if (last.length() == 0) last = Placeholders.colorChar + "r";
|
||||
suffix = last + suffix;
|
||||
if (suffix.length() > 16) suffix = suffix.substring(0, 16);
|
||||
} else {
|
||||
prefix = replaced;
|
||||
suffix = "";
|
||||
}
|
||||
if (replaced.length() > 0) {
|
||||
if (emptyBefore) {
|
||||
//was "", now it is not
|
||||
int score = (p.getVersion().getMinorVersion() < 8 || manager.useNumbers) ? this.score : manager.staticNumber;
|
||||
PacketAPI.registerScoreboardScore(p, teamname, player, prefix, suffix, ObjectiveName, score);
|
||||
return null;
|
||||
} else {
|
||||
return Arrays.asList(prefix, suffix);
|
||||
}
|
||||
} else {
|
||||
if (!suppressToggle) {
|
||||
//new string is "", but before it was not
|
||||
PacketAPI.removeScoreboardScore(p, player, teamname);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
public void register(ITabPlayer p) {
|
||||
p.setProperty("sb-"+teamname, rawtext, null);
|
||||
List<String> prefixsuffix = replaceText(p, true, true);
|
||||
if (prefixsuffix == null) return;
|
||||
int score = (p.getVersion().getMinorVersion() < 8 || manager.useNumbers) ? this.score : manager.staticNumber;
|
||||
PacketAPI.registerScoreboardScore(p, teamname, getName(p), prefixsuffix.get(0), prefixsuffix.get(1), ObjectiveName, score);
|
||||
}
|
||||
private void unregister(ITabPlayer p) {
|
||||
if (players.contains(p) && p.properties.get("sb-"+teamname).get().length() > 0) {
|
||||
PacketAPI.removeScoreboardScore(p, getName(p), teamname);
|
||||
}
|
||||
}
|
||||
private String getName(ITabPlayer p) {
|
||||
if (Static && p.getVersion().getMinorVersion() < 13) {
|
||||
if (p.getVersion().getMinorVersion() < 8) {
|
||||
return staticName1_7;
|
||||
} else {
|
||||
return staticName;
|
||||
}
|
||||
}
|
||||
return player;
|
||||
}
|
||||
@Override
|
||||
public void refresh(ITabPlayer refreshed, boolean force) {
|
||||
if (!players.contains(refreshed)) return; //player has different scoreboard displayed
|
||||
List<String> prefixsuffix = replaceText(refreshed, force, false);
|
||||
if (prefixsuffix == null) return;
|
||||
refreshed.sendCustomPacket(PacketPlayOutScoreboardTeam.UPDATE_TEAM_INFO(teamname, prefixsuffix.get(0), prefixsuffix.get(1), "always", "always", 69));
|
||||
}
|
||||
@Override
|
||||
public CPUFeature getRefreshCPU() {
|
||||
return CPUFeature.SCOREBOARD_LINES;
|
||||
}
|
||||
@Override
|
||||
public Set<String> getUsedPlaceholders() {
|
||||
return usedPlaceholders;
|
||||
}
|
||||
@Override
|
||||
public void refreshUsedPlaceholders() {
|
||||
usedPlaceholders = Placeholders.getUsedPlaceholderIdentifiersRecursive(rawtext);
|
||||
Static = usedPlaceholders.isEmpty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
package me.neznamy.tab.premium.scoreboard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import me.neznamy.tab.premium.Premium;
|
||||
import me.neznamy.tab.premium.conditions.Condition;
|
||||
import me.neznamy.tab.premium.scoreboard.lines.All0StableDynamicLine;
|
||||
import me.neznamy.tab.premium.scoreboard.lines.All0StaticLine;
|
||||
import me.neznamy.tab.premium.scoreboard.lines.CustomLine;
|
||||
import me.neznamy.tab.premium.scoreboard.lines.NumberedStableDynamicLine;
|
||||
import me.neznamy.tab.premium.scoreboard.lines.NumberedStaticLine;
|
||||
import me.neznamy.tab.premium.scoreboard.lines.ScoreboardLine;
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.PacketAPI;
|
||||
import me.neznamy.tab.shared.Shared;
|
||||
import me.neznamy.tab.shared.cpu.CPUFeature;
|
||||
import me.neznamy.tab.shared.features.interfaces.Refreshable;
|
||||
import me.neznamy.tab.shared.packets.PacketPlayOutScoreboardObjective;
|
||||
import me.neznamy.tab.shared.packets.PacketPlayOutScoreboardObjective.EnumScoreboardHealthDisplay;
|
||||
import me.neznamy.tab.shared.placeholders.Placeholders;
|
||||
|
||||
public class Scoreboard implements me.neznamy.tab.api.Scoreboard, Refreshable {
|
||||
|
||||
private final String ObjectiveName = "TAB-Scoreboard";
|
||||
private final int DisplaySlot = 1;
|
||||
|
||||
public ScoreboardManager manager;
|
||||
private String name;
|
||||
private String title;
|
||||
private Condition displayCondition;
|
||||
private String childBoard;
|
||||
private List<ScoreboardLine> lines = new ArrayList<ScoreboardLine>();
|
||||
public List<ITabPlayer> players = new ArrayList<ITabPlayer>();
|
||||
private Set<String> usedPlaceholders;
|
||||
|
||||
public Scoreboard(ScoreboardManager manager, String name, String title, List<String> lines, String displayCondition, String childBoard) {
|
||||
this(manager, name, title, lines);
|
||||
if (displayCondition != null) {
|
||||
if (Premium.conditions.containsKey(displayCondition)) {
|
||||
this.displayCondition = Premium.conditions.get(displayCondition);
|
||||
} else {
|
||||
List<String> conditions = Lists.newArrayList(displayCondition.split(";"));
|
||||
this.displayCondition = Condition.compile(null, conditions, null, null, null);
|
||||
}
|
||||
}
|
||||
this.childBoard = childBoard;
|
||||
refreshUsedPlaceholders();
|
||||
}
|
||||
public Scoreboard(ScoreboardManager manager, String name, String title, List<String> lines) {
|
||||
this.manager = manager;
|
||||
this.name = name;
|
||||
this.title = title;
|
||||
for (int i=0; i<lines.size(); i++) {
|
||||
ScoreboardLine score = registerLine(lines.size()-i, lines.get(i));
|
||||
this.lines.add(score);
|
||||
Shared.registerFeature("scoreboard-score-" + name + "-" + i, score);
|
||||
}
|
||||
}
|
||||
|
||||
private ScoreboardLine registerLine(int lineID, String text) {
|
||||
if (text.startsWith("Custom|")) {
|
||||
String[] elements = text.split("\\|");
|
||||
return new CustomLine(this, lineID, elements[1], elements[2], elements[3], Integer.parseInt(elements[4]));
|
||||
} else {
|
||||
if (text.contains("%")) {
|
||||
if (manager.useNumbers) {
|
||||
return new NumberedStableDynamicLine(this, lineID, text);
|
||||
} else {
|
||||
return new All0StableDynamicLine(this, lineID, text);
|
||||
}
|
||||
} else {
|
||||
if (manager.useNumbers) {
|
||||
return new NumberedStaticLine(lineID, text);
|
||||
} else {
|
||||
return new All0StaticLine(this, lineID, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public boolean isConditionMet(ITabPlayer p) {
|
||||
if (displayCondition == null) return true;
|
||||
return displayCondition.isMet(p);
|
||||
}
|
||||
|
||||
public String getChildScoreboard() {
|
||||
return childBoard;
|
||||
}
|
||||
|
||||
public List<ITabPlayer> getRegisteredUsers(){
|
||||
return players;
|
||||
}
|
||||
|
||||
public void register(ITabPlayer p) {
|
||||
if (!players.contains(p)) {
|
||||
p.setProperty("scoreboard-title", title, null);
|
||||
PacketAPI.registerScoreboardObjective(p, ObjectiveName, p.properties.get("scoreboard-title").get(), DisplaySlot, EnumScoreboardHealthDisplay.INTEGER);
|
||||
for (ScoreboardLine s : lines) {
|
||||
s.register(p);
|
||||
}
|
||||
players.add(p);
|
||||
}
|
||||
}
|
||||
public void unregister() {
|
||||
for (ITabPlayer all : players.toArray(new ITabPlayer[0])) {
|
||||
unregister(all);
|
||||
}
|
||||
players.clear();
|
||||
lines.clear();
|
||||
}
|
||||
public void unregister(ITabPlayer p) {
|
||||
if (players.contains(p)) {
|
||||
p.sendCustomPacket(PacketPlayOutScoreboardObjective.UNREGISTER(ObjectiveName));
|
||||
for (ScoreboardLine s : lines) {
|
||||
s.unregister(p);
|
||||
}
|
||||
players.remove(p);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh(ITabPlayer refreshed, boolean force) {
|
||||
if (refreshed.properties.get("scoreboard-title") == null) return;
|
||||
refreshed.sendCustomPacket(PacketPlayOutScoreboardObjective.UPDATE_TITLE(ObjectiveName, refreshed.properties.get("scoreboard-title").updateAndGet(), EnumScoreboardHealthDisplay.INTEGER));
|
||||
}
|
||||
@Override
|
||||
public CPUFeature getRefreshCPU() {
|
||||
return CPUFeature.SCOREBOARD_TITLE;
|
||||
}
|
||||
@Override
|
||||
public Set<String> getUsedPlaceholders() {
|
||||
return usedPlaceholders;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshUsedPlaceholders() {
|
||||
usedPlaceholders = Placeholders.getUsedPlaceholderIdentifiersRecursive(title);
|
||||
}
|
||||
|
||||
public void removeFrom(UUID player) {
|
||||
ITabPlayer p = Shared.getPlayer(player);
|
||||
p.setActiveScoreboard(null);
|
||||
unregister(p);
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
package me.neznamy.tab.premium;
|
||||
package me.neznamy.tab.premium.scoreboard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -6,6 +6,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import me.neznamy.tab.premium.Premium;
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.Shared;
|
||||
import me.neznamy.tab.shared.config.Configs;
|
||||
@@ -0,0 +1,99 @@
|
||||
package me.neznamy.tab.premium.scoreboard.lines;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import me.neznamy.tab.premium.scoreboard.Scoreboard;
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.PacketAPI;
|
||||
import me.neznamy.tab.shared.Property;
|
||||
import me.neznamy.tab.shared.packets.IChatBaseComponent;
|
||||
import me.neznamy.tab.shared.packets.PacketPlayOutScoreboardTeam;
|
||||
import me.neznamy.tab.shared.placeholders.Placeholders;
|
||||
|
||||
/**
|
||||
* A stable (anti-flickering) line with dynamic text (supports placeholders) with 0 everywhere
|
||||
* Limitations:
|
||||
* 1.5.x - 1.12.x: up to 32 characters (depending on color/magic codes)
|
||||
*/
|
||||
public class All0StableDynamicLine extends ScoreboardLine {
|
||||
|
||||
private Scoreboard parent;
|
||||
private int lineID;
|
||||
private String text;
|
||||
|
||||
public All0StableDynamicLine(Scoreboard parent, int lineID, String text) {
|
||||
super(lineID);
|
||||
this.parent = parent;
|
||||
this.lineID = lineID;
|
||||
this.text = text;
|
||||
refreshUsedPlaceholders();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh(ITabPlayer refreshed, boolean force) {
|
||||
if (!parent.players.contains(refreshed)) return; //player has different scoreboard displayed
|
||||
List<String> prefixsuffix = replaceText(refreshed, force, false);
|
||||
if (prefixsuffix == null) return;
|
||||
refreshed.sendCustomPacket(PacketPlayOutScoreboardTeam.UPDATE_TEAM_INFO(teamName, prefixsuffix.get(0), prefixsuffix.get(1), "always", "always", 69));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshUsedPlaceholders() {
|
||||
usedPlaceholders = Placeholders.getUsedPlaceholderIdentifiersRecursive(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(ITabPlayer p) {
|
||||
p.setProperty(teamName, text, null);
|
||||
List<String> prefixsuffix = replaceText(p, true, true);
|
||||
if (prefixsuffix == null) return;
|
||||
PacketAPI.registerScoreboardScore(p, teamName, getPlayerName(), prefixsuffix.get(0), prefixsuffix.get(1), ObjectiveName, parent.manager.staticNumber);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregister(ITabPlayer p) {
|
||||
if (parent.players.contains(p) && p.properties.get(teamName).get().length() > 0) {
|
||||
PacketAPI.removeScoreboardScore(p, getPlayerName(), teamName);
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> replaceText(ITabPlayer p, boolean force, boolean suppressToggle) {
|
||||
Property scoreproperty = p.properties.get(teamName);
|
||||
boolean emptyBefore = scoreproperty.get().length() == 0;
|
||||
if (!scoreproperty.update() && !force) return null;
|
||||
String replaced = scoreproperty.get();
|
||||
String prefix;
|
||||
String suffix;
|
||||
if (replaced.length() > 16 && p.getVersion().getMinorVersion() < 13) {
|
||||
prefix = replaced.substring(0, 16);
|
||||
suffix = replaced.substring(16, replaced.length());
|
||||
if (prefix.charAt(15) == Placeholders.colorChar) {
|
||||
prefix = prefix.substring(0, 15);
|
||||
suffix = Placeholders.colorChar + suffix;
|
||||
}
|
||||
String last = Placeholders.getLastColors(IChatBaseComponent.fromColoredText(prefix).toColoredText());
|
||||
suffix = last + suffix;
|
||||
if (suffix.length() > 16) suffix = suffix.substring(0, 16);
|
||||
} else {
|
||||
prefix = replaced;
|
||||
suffix = "";
|
||||
}
|
||||
if (replaced.length() > 0) {
|
||||
if (emptyBefore) {
|
||||
//was "", now it is not
|
||||
PacketAPI.registerScoreboardScore(p, teamName, getPlayerName(), prefix, suffix, ObjectiveName, lineID);
|
||||
return null;
|
||||
} else {
|
||||
return Arrays.asList(prefix, suffix);
|
||||
}
|
||||
} else {
|
||||
if (!suppressToggle) {
|
||||
//new string is "", but before it was not
|
||||
PacketAPI.removeScoreboardScore(p, getPlayerName(), teamName);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package me.neznamy.tab.premium.scoreboard.lines;
|
||||
|
||||
import me.neznamy.tab.premium.scoreboard.Scoreboard;
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.PacketAPI;
|
||||
import me.neznamy.tab.shared.packets.IChatBaseComponent;
|
||||
import me.neznamy.tab.shared.placeholders.Placeholders;
|
||||
|
||||
/**
|
||||
* A line with static text (no placeholders) with 0 everywhere
|
||||
* Limitations:
|
||||
* 1.5.x - 1.7.x: up to 42 characters (depending on color/magic codes)
|
||||
* 1.8.x - 1.12.x: up to 66 characters (depending on color/magic codes)
|
||||
*/
|
||||
public class All0StaticLine extends ScoreboardLine {
|
||||
|
||||
private Scoreboard parent;
|
||||
private String text;
|
||||
|
||||
private String prefix1_7;
|
||||
private String name1_7;
|
||||
private String suffix1_7;
|
||||
|
||||
private String prefix;
|
||||
private String name;
|
||||
private String suffix;
|
||||
|
||||
public All0StaticLine(Scoreboard parent, int lineID, String text) {
|
||||
super(lineID);
|
||||
this.parent = parent;
|
||||
this.text = IChatBaseComponent.fromColoredText(text).toColoredText(); //colorizing + translating RGB codes into legacy
|
||||
//1.8+
|
||||
if (this.text.length() <= 34) { //6 forced characters &x&x&r
|
||||
prefix = "";
|
||||
name = getPlayerName() + this.text;
|
||||
suffix = "";
|
||||
} else {
|
||||
String[] prefix_other = split(this.text, 16);
|
||||
prefix = prefix_other[0];
|
||||
String other = prefix_other[1];
|
||||
String lastColors = Placeholders.getLastColors(prefix);
|
||||
other = getPlayerName() + lastColors + other;
|
||||
String[] name_suffix = split(other, 40);
|
||||
name = name_suffix[0];
|
||||
suffix = name_suffix[1];
|
||||
if (suffix.length() > 16) suffix = suffix.substring(0, 16);
|
||||
}
|
||||
if (this.text.length() <= 10) { //6 forced characters &x&x&r
|
||||
prefix1_7= "";
|
||||
name1_7 = getPlayerName() + this.text;
|
||||
suffix1_7 = "";
|
||||
} else {
|
||||
String[] prefix_other = split(this.text, 16);
|
||||
prefix1_7 = prefix_other[0];
|
||||
String other = prefix_other[1];
|
||||
String lastColors = Placeholders.getLastColors(prefix1_7);
|
||||
other = getPlayerName() + lastColors + other;
|
||||
String[] name_suffix = split(other, 40);
|
||||
name1_7 = name_suffix[0];
|
||||
suffix1_7 = name_suffix[1];
|
||||
if (suffix1_7.length() > 16) suffix1_7 = suffix1_7.substring(0, 16);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh(ITabPlayer refreshed, boolean force) {
|
||||
//nothing to refresh
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshUsedPlaceholders() {
|
||||
//no placeholders
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(ITabPlayer p) {
|
||||
p.setProperty(teamName, text, null);
|
||||
if (p.getVersion().getMinorVersion() < 8) {
|
||||
PacketAPI.registerScoreboardScore(p, teamName, name1_7, prefix1_7, suffix1_7, ObjectiveName, parent.manager.staticNumber);
|
||||
} else {
|
||||
PacketAPI.registerScoreboardScore(p, teamName, name, prefix, suffix, ObjectiveName, parent.manager.staticNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregister(ITabPlayer p) {
|
||||
if (p.properties.get(teamName).get().length() > 0) {
|
||||
PacketAPI.removeScoreboardScore(p, p.getVersion().getMinorVersion() < 8 ? name1_7 : name, teamName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package me.neznamy.tab.premium.scoreboard.lines;
|
||||
|
||||
import me.neznamy.tab.premium.scoreboard.Scoreboard;
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.PacketAPI;
|
||||
import me.neznamy.tab.shared.packets.PacketPlayOutScoreboardTeam;
|
||||
import me.neznamy.tab.shared.placeholders.Placeholders;
|
||||
|
||||
/**
|
||||
* Fully customizable line
|
||||
* Not for public use
|
||||
*/
|
||||
public class CustomLine extends ScoreboardLine {
|
||||
|
||||
private Scoreboard parent;
|
||||
private String prefix;
|
||||
private String name;
|
||||
private String suffix;
|
||||
private int score;
|
||||
|
||||
public CustomLine(Scoreboard parent, int lineID, String prefix, String name, String suffix, int score) {
|
||||
super(lineID);
|
||||
this.parent = parent;
|
||||
this.prefix = prefix;
|
||||
this.name = name;
|
||||
this.suffix = suffix;
|
||||
this.score = score;
|
||||
refreshUsedPlaceholders();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh(ITabPlayer refreshed, boolean force) {
|
||||
String oldName = refreshed.properties.get(teamName + "-name").get();
|
||||
boolean prefix = refreshed.properties.get(teamName + "-prefix").update();
|
||||
boolean name = refreshed.properties.get(teamName + "-name").update();
|
||||
boolean suffix = refreshed.properties.get(teamName + "-suffix").update();
|
||||
if (prefix || name || suffix) {
|
||||
if (name) {
|
||||
//name changed as well
|
||||
PacketAPI.removeScoreboardScore(refreshed, oldName, teamName);
|
||||
PacketAPI.registerScoreboardScore(refreshed, teamName, refreshed.properties.get(teamName + "-name").get(),
|
||||
refreshed.properties.get(teamName + "-prefix").get(), refreshed.properties.get(teamName + "-suffix").get(), ObjectiveName, score);
|
||||
} else {
|
||||
//only prefix/suffix changed
|
||||
refreshed.sendCustomPacket(PacketPlayOutScoreboardTeam.UPDATE_TEAM_INFO(teamName, refreshed.properties.get(teamName + "-prefix").get(),
|
||||
refreshed.properties.get(teamName + "-suffix").get(), "always", "always", 69));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshUsedPlaceholders() {
|
||||
usedPlaceholders = Placeholders.getUsedPlaceholderIdentifiersRecursive(prefix, name, suffix);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(ITabPlayer p) {
|
||||
p.setProperty(teamName + "-prefix", prefix, null);
|
||||
p.setProperty(teamName + "-name", name, null);
|
||||
p.setProperty(teamName + "-suffix", suffix, null);
|
||||
PacketAPI.registerScoreboardScore(p, teamName, p.properties.get(teamName + "-name").get(), p.properties.get(teamName + "-prefix").get(),
|
||||
p.properties.get(teamName + "-suffix").get(), ObjectiveName, score);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregister(ITabPlayer p) {
|
||||
if (parent.players.contains(p)) {
|
||||
PacketAPI.removeScoreboardScore(p, p.properties.get(teamName + "-name").get(), teamName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package me.neznamy.tab.premium.scoreboard.lines;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import me.neznamy.tab.premium.scoreboard.Scoreboard;
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.PacketAPI;
|
||||
import me.neznamy.tab.shared.Property;
|
||||
import me.neznamy.tab.shared.packets.IChatBaseComponent;
|
||||
import me.neznamy.tab.shared.packets.PacketPlayOutScoreboardTeam;
|
||||
import me.neznamy.tab.shared.placeholders.Placeholders;
|
||||
|
||||
/**
|
||||
* A stable (anti-flickering) line with dynamic text (supports placeholders) with numbers 1-15
|
||||
* Limitations:
|
||||
* 1.5.x - 1.12.x: up to 32 characters (depending on color/magic codes)
|
||||
*/
|
||||
public class NumberedStableDynamicLine extends ScoreboardLine {
|
||||
|
||||
private Scoreboard parent;
|
||||
private int lineID;
|
||||
private String text;
|
||||
|
||||
public NumberedStableDynamicLine(Scoreboard parent, int lineID, String text) {
|
||||
super(lineID);
|
||||
this.parent = parent;
|
||||
this.lineID = lineID;
|
||||
this.text = text;
|
||||
refreshUsedPlaceholders();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh(ITabPlayer refreshed, boolean force) {
|
||||
if (!parent.players.contains(refreshed)) return; //player has different scoreboard displayed
|
||||
List<String> prefixsuffix = replaceText(refreshed, force, false);
|
||||
if (prefixsuffix == null) return;
|
||||
refreshed.sendCustomPacket(PacketPlayOutScoreboardTeam.UPDATE_TEAM_INFO(teamName, prefixsuffix.get(0), prefixsuffix.get(1), "always", "always", 69));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshUsedPlaceholders() {
|
||||
usedPlaceholders = Placeholders.getUsedPlaceholderIdentifiersRecursive(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(ITabPlayer p) {
|
||||
p.setProperty(teamName, text, null);
|
||||
List<String> prefixsuffix = replaceText(p, true, true);
|
||||
if (prefixsuffix == null) return;
|
||||
PacketAPI.registerScoreboardScore(p, teamName, getPlayerName(), prefixsuffix.get(0), prefixsuffix.get(1), ObjectiveName, lineID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregister(ITabPlayer p) {
|
||||
if (parent.players.contains(p) && p.properties.get(teamName).get().length() > 0) {
|
||||
PacketAPI.removeScoreboardScore(p, getPlayerName(), teamName);
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> replaceText(ITabPlayer p, boolean force, boolean suppressToggle) {
|
||||
Property scoreproperty = p.properties.get(teamName);
|
||||
boolean emptyBefore = scoreproperty.get().length() == 0;
|
||||
if (!scoreproperty.update() && !force) return null;
|
||||
String replaced = scoreproperty.get();
|
||||
String prefix;
|
||||
String suffix;
|
||||
if (replaced.length() > 16 && p.getVersion().getMinorVersion() < 13) {
|
||||
prefix = replaced.substring(0, 16);
|
||||
suffix = replaced.substring(16, replaced.length());
|
||||
if (prefix.charAt(15) == Placeholders.colorChar) {
|
||||
prefix = prefix.substring(0, 15);
|
||||
suffix = Placeholders.colorChar + suffix;
|
||||
}
|
||||
String last = Placeholders.getLastColors(IChatBaseComponent.fromColoredText(prefix).toColoredText());
|
||||
suffix = last + suffix;
|
||||
if (suffix.length() > 16) suffix = suffix.substring(0, 16);
|
||||
} else {
|
||||
prefix = replaced;
|
||||
suffix = "";
|
||||
}
|
||||
if (replaced.length() > 0) {
|
||||
if (emptyBefore) {
|
||||
//was "", now it is not
|
||||
PacketAPI.registerScoreboardScore(p, teamName, getPlayerName(), prefix, suffix, ObjectiveName, lineID);
|
||||
return null;
|
||||
} else {
|
||||
return Arrays.asList(prefix, suffix);
|
||||
}
|
||||
} else {
|
||||
if (!suppressToggle) {
|
||||
//new string is "", but before it was not
|
||||
PacketAPI.removeScoreboardScore(p, getPlayerName(), teamName);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package me.neznamy.tab.premium.scoreboard.lines;
|
||||
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.PacketAPI;
|
||||
import me.neznamy.tab.shared.packets.IChatBaseComponent;
|
||||
|
||||
/**
|
||||
* A line with static text (no placeholders) with numbers 1-15
|
||||
* Limitations:
|
||||
* 1.5.x - 1.7.x: 48 characters
|
||||
* 1.8.x - 1.12.x: 72 characters
|
||||
*/
|
||||
public class NumberedStaticLine extends ScoreboardLine {
|
||||
|
||||
private int lineID;
|
||||
private String text;
|
||||
|
||||
private String prefix1_7;
|
||||
private String name1_7;
|
||||
private String suffix1_7;
|
||||
|
||||
private String prefix;
|
||||
private String name;
|
||||
private String suffix;
|
||||
|
||||
public NumberedStaticLine(int lineID, String text) {
|
||||
super(lineID);
|
||||
this.lineID = lineID;
|
||||
this.text = IChatBaseComponent.fromColoredText(text).toColoredText(); //colorizing + translating RGB codes into legacy
|
||||
//1.8+
|
||||
if (this.text.length() <= 40) {
|
||||
prefix = "";
|
||||
name = this.text;
|
||||
suffix = "";
|
||||
} else {
|
||||
String[] prefix_other = split(this.text, 16);
|
||||
prefix = prefix_other[0];
|
||||
String other = prefix_other[1];
|
||||
String[] name_suffix = split(other, 40);
|
||||
name = name_suffix[0];
|
||||
suffix = name_suffix[1];
|
||||
if (suffix.length() > 16) suffix = suffix.substring(0, 16);
|
||||
}
|
||||
//1.7-
|
||||
if (this.text.length() <= 16) {
|
||||
prefix1_7 = "";
|
||||
name1_7 = this.text;
|
||||
suffix1_7 = "";
|
||||
} else {
|
||||
String[] prefix_other = split(this.text, 16);
|
||||
prefix1_7 = prefix_other[0];
|
||||
String other = prefix_other[1];
|
||||
String[] name_suffix = split(other, 40);
|
||||
name1_7 = name_suffix[0];
|
||||
suffix1_7 = name_suffix[1];
|
||||
if (suffix1_7.length() > 16) suffix1_7 = suffix1_7.substring(0, 16);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh(ITabPlayer refreshed, boolean force) {
|
||||
//nothing to refresh
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshUsedPlaceholders() {
|
||||
//no placeholders
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(ITabPlayer p) {
|
||||
p.setProperty(teamName, text, null);
|
||||
if (p.getVersion().getMinorVersion() < 8) {
|
||||
PacketAPI.registerScoreboardScore(p, teamName, name1_7, prefix1_7, suffix1_7, ObjectiveName, lineID);
|
||||
} else {
|
||||
PacketAPI.registerScoreboardScore(p, teamName, name, prefix, suffix, ObjectiveName, lineID);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregister(ITabPlayer p) {
|
||||
if (p.properties.get(teamName).get().length() > 0) {
|
||||
PacketAPI.removeScoreboardScore(p, p.getVersion().getMinorVersion() < 8 ? name1_7 : name, teamName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package me.neznamy.tab.premium.scoreboard.lines;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.cpu.CPUFeature;
|
||||
import me.neznamy.tab.shared.features.interfaces.Refreshable;
|
||||
import me.neznamy.tab.shared.placeholders.Placeholders;
|
||||
|
||||
public abstract class ScoreboardLine implements Refreshable {
|
||||
|
||||
protected static final String ObjectiveName = "TAB-Scoreboard";
|
||||
protected Set<String> usedPlaceholders = new HashSet<String>();
|
||||
protected String teamName;
|
||||
private String playerName;
|
||||
|
||||
public ScoreboardLine(int lineID) {
|
||||
teamName = "TAB-SB-TM-"+lineID;
|
||||
String id = 15-lineID+"";
|
||||
if (id.length() == 1) id = "0" + id;
|
||||
char c = Placeholders.colorChar;
|
||||
playerName = c + String.valueOf(id.charAt(0)) + c + String.valueOf(id.charAt(1)) + c + "r";
|
||||
}
|
||||
|
||||
public abstract void register(ITabPlayer p);
|
||||
public abstract void unregister(ITabPlayer p);
|
||||
|
||||
@Override
|
||||
public CPUFeature getRefreshCPU() {
|
||||
return CPUFeature.SCOREBOARD_LINES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getUsedPlaceholders() {
|
||||
return usedPlaceholders;
|
||||
}
|
||||
|
||||
protected String[] split(String string, int firstElementMaxLength) {
|
||||
if (string.length() <= firstElementMaxLength) return new String[] {string, ""};
|
||||
if (string.charAt(firstElementMaxLength-1) == Placeholders.colorChar) firstElementMaxLength--;
|
||||
return new String[] {string.substring(0, firstElementMaxLength), string.substring(firstElementMaxLength, string.length())};
|
||||
}
|
||||
|
||||
protected String getPlayerName() {
|
||||
return playerName;
|
||||
}
|
||||
}
|
||||
@@ -15,9 +15,9 @@ import me.neznamy.tab.api.EnumProperty;
|
||||
import me.neznamy.tab.api.TabPlayer;
|
||||
import me.neznamy.tab.platforms.bukkit.features.unlimitedtags.ArmorStandManager;
|
||||
import me.neznamy.tab.platforms.bukkit.packets.PacketPlayOut;
|
||||
import me.neznamy.tab.premium.Scoreboard;
|
||||
import me.neznamy.tab.premium.ScoreboardManager;
|
||||
import me.neznamy.tab.premium.SortingType;
|
||||
import me.neznamy.tab.premium.scoreboard.Scoreboard;
|
||||
import me.neznamy.tab.premium.scoreboard.ScoreboardManager;
|
||||
import me.neznamy.tab.shared.command.level1.PlayerCommand;
|
||||
import me.neznamy.tab.shared.config.Configs;
|
||||
import me.neznamy.tab.shared.cpu.CPUFeature;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package me.neznamy.tab.shared.command.level1;
|
||||
|
||||
import me.neznamy.tab.premium.ScoreboardManager;
|
||||
import me.neznamy.tab.premium.scoreboard.ScoreboardManager;
|
||||
import me.neznamy.tab.shared.ITabPlayer;
|
||||
import me.neznamy.tab.shared.Shared;
|
||||
import me.neznamy.tab.shared.command.SubCommand;
|
||||
|
||||
Reference in new issue
Block a user