Hotfix (/playtime | Tablist TPS)
All checks were successful
Build Plugin / build-test (push) Successful in 46s
All checks were successful
Build Plugin / build-test (push) Successful in 46s
This commit is contained in:
parent
885030eae3
commit
1701006db3
@ -15,23 +15,23 @@ public class PlaytimeCommand implements CommandExecutor {
|
||||
if (pl == null) {
|
||||
return;
|
||||
}
|
||||
exec.sendMessage("- " + ChatColor.GOLD.toString() + "PLAYTIME: ");
|
||||
exec.sendMessage("- " + ChatColor.GOLD.toString() + "PlayTime: ");
|
||||
exec.sendMessage(
|
||||
"- " + ChatColor.GRAY.toString() + "Player: " + ChatColor.WHITE.toString() + pl.getName());
|
||||
// exec.sendMessage("- First Join: ");
|
||||
int playtime = Spielzeit.getHours(pl.getStatistic(Statistic.TOTAL_WORLD_TIME));
|
||||
String str = "Stunden";
|
||||
String str = " Stunden";
|
||||
if (playtime == 1) {
|
||||
str = "Stunde";
|
||||
str = " Stunde";
|
||||
}
|
||||
exec.sendMessage("- " + ChatColor.GRAY.toString() + "Spielzeit: " + ChatColor.GREEN.toString()
|
||||
+ playtime + str);
|
||||
exec.sendMessage("- " + ChatColor.GRAY.toString()
|
||||
+ "Detailierte Spielzeit: " + ChatColor.GREEN.toString()
|
||||
+ Spielzeit.formatTicks(pl.getStatistic(Statistic.TOTAL_WORLD_TIME)));
|
||||
exec.sendMessage("- " + ChatColor.GRAY.toString() + "Du hast den Server "
|
||||
+ ChatColor.GREEN.toString() + (pl.getStatistic(Statistic.LEAVE_GAME) + 1)
|
||||
+ ChatColor.GRAY.toString() + " mal betreten.");
|
||||
exec.sendMessage("- " + ChatColor.GRAY.toString() + "Server " + ChatColor.GREEN.toString()
|
||||
+ (pl.getStatistic(Statistic.LEAVE_GAME) + 1) + ChatColor.GRAY.toString()
|
||||
+ " mal betreten.");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -2,10 +2,10 @@ package de.npid7.serverlite.Tasks;
|
||||
|
||||
import de.npid7.serverlite.D7ServerLite;
|
||||
import de.npid7.serverlite.Helpers.Spielzeit;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Statistic;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
@ -48,12 +48,18 @@ public class TablistTask {
|
||||
if (playtime == 1) {
|
||||
str = " Stunde";
|
||||
}
|
||||
String tpsclr = ChatColor.GREEN.toString();
|
||||
if (tps < 18.0 && tps > 15.0) {
|
||||
tpsclr = ChatColor.GOLD.toString();
|
||||
} else if (tps <= 15 || tps > 20) {
|
||||
tpsclr = ChatColor.RED.toString();
|
||||
}
|
||||
pl.setPlayerListHeader(
|
||||
"\n§x§5§5§5§5§5§5§lѕ§x§5§B§5§B§5§B§lᴜ§x§6§1§6§1§6§1§lʀ§x§6§7§6§7§6§7§lᴠ§x§6§D§6§D§6§D§lɪ§x§7§3§7§3§7§3§lᴠ§x§7§9§7§9§7§9§lᴀ§x§8§0§8§0§8§0§lʟ§x§8§6§8§6§8§6§lᴘ§x§8§C§8§C§8§C§lʀ§x§9§2§9§2§9§2§lᴏ§x§9§8§9§8§9§8§lᴊ§x§9§E§9§E§9§E§lᴇ§x§A§4§A§4§A§4§lᴋ§x§A§A§A§A§A§A§lᴛ\n"
|
||||
+ "\n" + ChatColor.GRAY.toString() + "ᴅᴇɪɴ ᴘɪɴɢ" + ChatColor.DARK_GRAY.toString() + ": "
|
||||
+ ChatColor.GREEN.toString() + pl.getPing() + " " + ChatColor.GRAY.toString()
|
||||
+ "ѕᴇʀᴠᴇʀ ᴛᴘѕ" + ChatColor.DARK_GRAY.toString() + ": " + ChatColor.GREEN.toString()
|
||||
+ String.format("%.1f", tps) + "\n\n" + ChatColor.GRAY.toString() + "ѕᴘɪᴇʟᴢᴇɪᴛ"
|
||||
+ tpsclr + String.format("%.1f", tps) + "\n\n" + ChatColor.GRAY.toString() + "ѕᴘɪᴇʟᴢᴇɪᴛ"
|
||||
+ ChatColor.DARK_GRAY.toString() + ": " + ChatColor.GREEN.toString() + playtime + str
|
||||
+ "\n");
|
||||
pl.setPlayerListFooter("\n");
|
||||
|
Loading…
Reference in New Issue
Block a user