Browse Source

Update 'src/com/entryrise/lagassist/chunks/ChkAnalyse.java'

pull/9/head
Deliable 3 years ago
parent
commit
cc88b1360c
  1. 41
      src/com/entryrise/lagassist/chunks/ChkAnalyse.java

41
src/com/entryrise/lagassist/chunks/ChkAnalyse.java

@ -53,17 +53,17 @@ public class ChkAnalyse {
ch.genScores(); ch.genScores();
} }
Collections.sort(scores); Collections.sort(scores);
p.sendMessage("");
p.sendMessage("§2§l⬛⬛⬛⬛⬛⬛ §f§lCHUNKANALYSER §2§l⬛⬛⬛⬛⬛⬛");
p.sendMessage("");
for (int i = 0; i < ammoshow; i++) { for (int i = 0; i < ammoshow; i++) {
ChkStats cs = scores.get(i); ChkStats cs = scores.get(i);
p.spigot().sendMessage(cs.genText());
for (String str : Main.lang.getStringList("chunkanalyse.result1")) {
if (str.contains("$1")) {
p.spigot().sendMessage(cs.genText())
} else {
p.sendMessage(str.replace("$1", cs.genText()))
}
}
} }
p.sendMessage("");
p.sendMessage("§2§l⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛");
} }
}); });
@ -101,12 +101,7 @@ public class ChkAnalyse {
for (Chunk ch : topTen.keySet()) { for (Chunk ch : topTen.keySet()) {
int score = chunkscore.get(ch); int score = chunkscore.get(ch);
p.sendMessage("");
p.sendMessage("⬛⬛⬛⬛⬛⬛ §f§lCHUNKANALYSER ⬛⬛⬛⬛⬛⬛");
p.sendMessage("");
p.sendMessage("");
p.sendMessage("⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛");
for (String str : Main.lang.getStringList("chunkanalyse.result")) {
for (String str : Main.lang.getStringList("chunkanalyse.result2")) {
p.sendMessage(str.replace("$1", String.valueOf(ch.getX()) + " " + String.valueOf(ch.getZ())).replace("$2", String.valueOf(score))) p.sendMessage(str.replace("$1", String.valueOf(ch.getX()) + " " + String.valueOf(ch.getZ())).replace("$2", String.valueOf(score)))
} }
} }
@ -114,7 +109,7 @@ public class ChkAnalyse {
public static void analyseCurrentChunk(CommandSender s) { public static void analyseCurrentChunk(CommandSender s) {
if (!(s instanceof Player)) { if (!(s instanceof Player)) {
s.sendMessage(Main.PREFIX + "You cannot analyse the current chunk from console.");
s.sendMessage(Main.PREFIX + Main.lang.getString("errors.chunkanalyse.console-execution"));
return; return;
} }
Player p = (Player) s; Player p = (Player) s;
@ -128,17 +123,13 @@ public class ChkAnalyse {
String cmd = "lagassist tpchunk " + p.getWorld().getName() + " " + String.valueOf(coords[0]) + " " String cmd = "lagassist tpchunk " + p.getWorld().getName() + " " + String.valueOf(coords[0]) + " "
+ String.valueOf(coords[1]); + String.valueOf(coords[1]);
p.sendMessage("§2§l⬛⬛⬛⬛⬛⬛ §f§lCHUNK STATS §2§l⬛⬛⬛⬛⬛⬛");
p.sendMessage("");
p.sendMessage(" §2✸ §fChunk coordonates: §7" + crds);
p.sendMessage("");
p.sendMessage(" §2✸ §fEntity Amount: §7" + stats.getEnts().length);
p.sendMessage(" §2✸ §fTiles Amount: §7" + stats.getTiles().length);
p.sendMessage("");
p.spigot().sendMessage(stats.genMobCount(" §2✸ §fDetailed Info §7(HOVER)", cmd));
p.sendMessage("");
p.sendMessage("§2§l⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛");
for (String str : Main.lang.getStringList("chunkanalyse.result3")) {
if (str.endsWith("HOVERTEXT")) {
p.spigot().sendMessage(stats.genMobCount(str, cmd).replaceAll("HOVERTEXT", ""))
} else {
p.sendMessage(str.replace("$1", crds).replace("$2", stats.getEnts().length).replace("$3", stats.getTiles().length))
}
}
} }
} }

Loading…
Cancel
Save