From 4861cb3b4bb7a1ab7544a2679eff85dcd8364b2d Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 14 Jun 2019 08:54:35 +0200 Subject: [PATCH] Adding tps to bauinfo --- src/de/steamwar/bausystem/commands/CommandInfo.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/de/steamwar/bausystem/commands/CommandInfo.java b/src/de/steamwar/bausystem/commands/CommandInfo.java index 515cb33..e8d2f00 100644 --- a/src/de/steamwar/bausystem/commands/CommandInfo.java +++ b/src/de/steamwar/bausystem/commands/CommandInfo.java @@ -4,6 +4,7 @@ import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.sql.Bauwelt; import de.steamwar.bausystem.sql.BauweltMember; import de.warking.hunjy.MySQL.WarkingUser; +import net.minecraft.server.v1_12_R1.MinecraftServer; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -29,6 +30,14 @@ public class CommandInfo implements CommandExecutor { membermessage.append(member.isWorld() ? "§a" : "§c").append("W").append("§8]").append(" "); } sender.sendMessage(membermessage.toString()); + + + double[] tps = MinecraftServer.getServer().recentTps; + StringBuilder tpsmessage = new StringBuilder().append(BauSystem.PREFIX).append("TPS:§e"); + for(double t : tps){ + tpsmessage.append(String.format(" %.1f", t)); + } + sender.sendMessage(tpsmessage.toString()); return false; } }