forked from Upstream/Velocitab
Improvements on server switch
This commit is contained in:
parent
ea40814c71
commit
2cf4f4956b
@ -102,9 +102,9 @@ public class Velocitab implements ConfigProvider, ScoreboardProvider, LoggerProv
|
||||
checkCompatibility();
|
||||
loadConfigs();
|
||||
loadHooks();
|
||||
preparePlaceholderManager();
|
||||
prepareVanishManager();
|
||||
prepareChannelManager();
|
||||
preparePlaceholderManager();
|
||||
prepareScoreboard();
|
||||
registerCommands();
|
||||
registerMetrics();
|
||||
|
@ -74,6 +74,7 @@ public class PlaceholderManager {
|
||||
if (player == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final Map<String, String> parsed = placeholders.computeIfAbsent(uuid, k -> Maps.newConcurrentMap());
|
||||
final TabPlayer tabPlayer = plugin.getTabList().getTabPlayer(player)
|
||||
.orElse(new TabPlayer(plugin, player,
|
||||
|
@ -110,14 +110,6 @@ public final class TabPlayer implements Comparable<TabPlayer> {
|
||||
return plugin.getTabGroups().getPosition(group);
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
public String getDisplayName(@NotNull Velocitab plugin) {
|
||||
final String format = group.format();
|
||||
final String displayName = plugin.getPlaceholderManager().applyPlaceholders(this, format);
|
||||
return lastDisplayName = displayName;
|
||||
}
|
||||
|
||||
public Nametag getNametag(@NotNull Velocitab plugin) {
|
||||
final String prefix = plugin.getPlaceholderManager().applyPlaceholders(this, group.nametag().prefix());
|
||||
final String suffix = plugin.getPlaceholderManager().applyPlaceholders(this, group.nametag().suffix());
|
||||
|
@ -91,7 +91,7 @@ public interface ScoreboardProvider {
|
||||
setTabList(tabList);
|
||||
getPlugin().getServer().getEventManager().register(this, tabList);
|
||||
|
||||
getPlugin().getServer().getScheduler().buildTask(this, tabList::load).delay(1, TimeUnit.SECONDS).schedule();
|
||||
getPlugin().getServer().getScheduler().buildTask(this, tabList::load).delay(250, TimeUnit.MILLISECONDS).schedule();
|
||||
|
||||
final SortingManager sortingManager = new SortingManager(getPlugin());
|
||||
setSortingManager(sortingManager);
|
||||
|
@ -68,7 +68,6 @@ public class PlayerTabList {
|
||||
this.players = Maps.newConcurrentMap();
|
||||
this.taskManager = new TaskManager(plugin);
|
||||
this.entriesFields = Maps.newHashMap();
|
||||
this.reloadUpdate();
|
||||
this.registerListener();
|
||||
this.ensureDisplayNameTask();
|
||||
this.registerFields();
|
||||
@ -137,6 +136,8 @@ public class PlayerTabList {
|
||||
|
||||
joinPlayer(p, group.get());
|
||||
});
|
||||
|
||||
reloadUpdate();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -151,7 +151,7 @@ public class TabListListener {
|
||||
|
||||
final ScheduledTask task = plugin.getServer().getScheduler()
|
||||
.buildTask(plugin, () -> plugin.getPlaceholderManager().fetchPlaceholders(joined.getUniqueId(), group.getTextsWithPlaceholders()))
|
||||
.delay(100, TimeUnit.MILLISECONDS)
|
||||
.delay(10, TimeUnit.MILLISECONDS)
|
||||
.repeat(50, TimeUnit.MILLISECONDS)
|
||||
.schedule();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user