Skip to content

Commit

Permalink
update debug record format a lil for new pastebin
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Feb 6, 2021
1 parent c876122 commit d3ca99e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Expand Up @@ -75,9 +75,9 @@ public class EntityTag implements ObjectTag, Adjustable, EntityFormObject, Flagg

// List a mechanism here if it can be safely run before spawn.
public static HashSet<String> earlyValidMechanisms = new HashSet<>(Arrays.asList(
"max_health", "health_data", "health", "visible",
"armor_pose", "arms", "base_plate", "is_small", "marker",
"velocity", "age", "is_using_riptide"
"max_health", "health_data", "health",
"visible", "armor_pose", "arms", "base_plate", "is_small", "marker",
"velocity", "age", "is_using_riptide", "size"
));

private static final Map<UUID, Entity> rememberedEntities = new HashMap<>();
Expand Down
Expand Up @@ -39,7 +39,7 @@ public void run() {
int newlineLength = 0;
int pluginCount = Bukkit.getPluginManager().getPlugins().length;
for (Plugin pl : Bukkit.getPluginManager().getPlugins()) {
String temp = ((char) 0x01) + (pl.isEnabled() ? "2" : "4") + pl.getName() + ": " + pl.getDescription().getVersion() + ", ";
String temp = (pl.isEnabled() ? ChatColor.DARK_GREEN : ChatColor.DARK_RED) + pl.getName() + ": " + pl.getDescription().getVersion() + ", ";
pluginlist.append(temp);
newlineLength += temp.length();
if (newlineLength > 80) {
Expand All @@ -65,7 +65,7 @@ public void run() {
newlineLength = 0;
int playerCount = Bukkit.getOnlinePlayers().size();
for (Player pla : Bukkit.getOnlinePlayers()) {
String temp = pla.getDisplayName().replace(ChatColor.COLOR_CHAR, (char) 0x01) + ((char) 0x01) + "7(" + pla.getName() + "), ";
String temp = pla.getDisplayName() + ChatColor.GRAY + "(" + pla.getName() + "), ";
playerlist.append(temp);
newlineLength += temp.length();
if (newlineLength > 80) {
Expand Down Expand Up @@ -94,7 +94,7 @@ public void run() {
// Gather other setting info
boolean bungee = Bukkit.getServer().spigot().getConfig().getBoolean("settings.bungeecord");
// Create the final message pack and upload it
uc.getOutputStream().write(("postid=pastetext&pastetype=log"
uc.getOutputStream().write(("pastetype=log"
+ "&response=micro&v=200&pastetitle=Denizen+Debug+Logs+From+" + URLEncoder.encode(ChatColor.stripColor(Bukkit.getServer().getMotd()))
+ "&pastecontents=" + URLEncoder.encode(("Java Version: " + System.getProperty("java.version")
+ "\nUp-time: " + new DurationTag((System.currentTimeMillis() - Denizen.startTime) / 50).formatted()
Expand All @@ -105,7 +105,7 @@ public void run() {
+ "\nOnline Players (" + playerCount + "): " + playerlist.substring(0, playerlist.length() - 2)
+ "\nTotal Players Ever: " + PlayerTag.getAllPlayers().size() + " (" + validPl + " valid, " + invalidPl + " invalid)"
+ "\nMode: " + (Bukkit.getServer().getOnlineMode() ? ChatColor.GREEN + "online" : (bungee ? ChatColor.YELLOW : ChatColor.RED) + "offline") + (bungee ? " (BungeeCord)" : "")
+ "\n\n").replace(ChatColor.COLOR_CHAR, (char) 0x01)) + recording)
+ "\n\n")) + recording)
.getBytes(StandardCharsets.UTF_8));
// Wait for a response from the server
in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
Expand Down

0 comments on commit d3ca99e

Please sign in to comment.