This commit is contained in:
AlphaAE
2019-05-09 11:11:16 +08:00
parent aec23a18a7
commit 56c39c472b
2 changed files with 8 additions and 2 deletions

View File

@ -4,5 +4,4 @@ public interface Config {
int JOIN_WAITING_TIME = 240; int JOIN_WAITING_TIME = 240;
} }

View File

@ -34,8 +34,15 @@ public class DisplayInfoBlock implements JoinQuitEventBlock {
String name = player.getDisplayName(); String name = player.getDisplayName();
int ping = player.getPing(); int ping = player.getPing();
int coin = rePlayer.getCoin(); int coin = rePlayer.getCoin();
float tps = MainPlugin.getPlugin().getServer().getTicksPerSecond();
player.sendActionBar(TextFormat.colorize("" + name + " &f延迟: " + ping + "ms 硬币: " + coin)); StringBuilder showText = new StringBuilder()
.append(name)
.append(" &f硬币: ").append(coin)
.append(" 延迟: ").append(ping).append("ms")
.append(" TPS: ").append(tps);
player.sendActionBar(TextFormat.colorize(showText.toString()));
} catch (Exception e) { } catch (Exception e) {
cancel(); cancel();
} }