You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If the latency or the TPS is high, displays an informational message
explaining the probable cause of the performances issue to the user.
- Fixed 113+ compatibility.
- Added flag for this compatibility.
? I.t("The time needed to transfer data from you to the server.")
130
+
: I.t("The time needed to transfer data from {0} to the server.", target.getName())
131
+
).then("\n")
132
+
.then(I.t("The lower the better.")).color(ChatColor.GREEN)
135
133
)
136
134
137
135
.then(latency != -1 ? Pinger.formatLatency(latency) : I.t("{gray}(unable to retrieve latency)"))
138
136
139
137
.build()
140
138
);
141
139
142
-
RawMessage.send(sender, newRawText("")
140
+
RawMessage.send(sender, newRawText("")
143
141
.then(I.t("Server load: "))
144
142
.color(ChatColor.GOLD)
145
143
.hover(
146
-
newItemStackBuilder(Material.POTATO_ITEM)
147
-
.title(ChatColor.BOLD + I.t("Ticks per second"))
148
-
.longLore(ChatColor.RESET, I.t("The number of cycles the server executes per second. The best is 20; under 15, the server is experiencing difficulties."), 38)
149
-
.longLore(ChatColor.GRAY, I.t("The three values are the average number of TPS during the last 1, 5 and 15 minutes."), 38)
150
-
.loreLine(ChatColor.GREEN, I.t("The closest to 20 the better."))
151
-
.hideAttributes()
152
-
.item()
144
+
newRawText()
145
+
.then(I.t("Ticks per second")).style(ChatColor.BOLD).then("\n")
146
+
.then(I.t("The number of cycles the server executes per second. The best is 20; under 15, the server is experiencing difficulties.")).then("\n")
147
+
.then(I.t("The three values are the average number of TPS during the last 1, 5 and 15 minutes.")).color(ChatColor.GRAY).then("\n")
148
+
.then(I.t("The closest to 20 the better.")).color(ChatColor.GREEN)
153
149
)
154
150
155
151
.then(tps != null ? Pinger.formatTPS(tps) : I.t("{gray}(unable to retrieve server load)"))
sendWarning(sender, I.t("Both your latency and the server load are high."), I.t("If you are experiencing poor performances, it may come from your internet connection, the server, or both."));
168
+
}
169
+
elseif (highLatency)
170
+
{
171
+
sendWarning(sender, I.t("Your latency is high."), I.t("If you are experiencing poor performances, it probably comes from your internet connection."));
172
+
}
173
+
else
174
+
{
175
+
sendWarning(sender, I.t("The server load is high."), I.t("If you are experiencing poor performances, it probably comes from the server."));
176
+
}
177
+
}
178
+
else
179
+
{
180
+
if (lowTPS && highLatency)
181
+
{
182
+
sendWarning(sender, I.t("Both {0}'s latency and the server load are high.", target.getName()), I.t("If they are experiencing poor performances, it may come from their internet connection, the server, or both."));
183
+
}
184
+
elseif (highLatency)
185
+
{
186
+
sendWarning(sender, I.t("{0}'s latency is high.", target.getName()), I.t("If they are experiencing poor performances, it probably comes from their internet connection."));
187
+
}
188
+
else
189
+
{
190
+
sendWarning(sender, I.t("The server load is high."), I.t("If {0} is experiencing poor performances, it probably comes from the server.", target.getName()));
0 commit comments