Skip to content

Commit

Permalink
revert debug submit format change
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Feb 8, 2021
1 parent e8be761 commit 567ec7d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void debug(CommandContext args, CommandSender sender) throws CommandExcep
Debug.toggle();
}
Debug.record = !Debug.record;
Debug.Recording = new StringBuilder();
Debug.recording = new StringBuilder();
Messaging.sendInfo(sender, (Debug.record ? "Denizen debugger is now recording. Use /denizen " +
"submit to finish." : "Denizen debugger recording disabled."));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class Debug {

public static boolean shouldTrim = true;
public static boolean record = false;
public static StringBuilder Recording = new StringBuilder();
public static StringBuilder recording = new StringBuilder();

public static void toggle() {
showDebug = !showDebug;
Expand Down Expand Up @@ -517,7 +517,7 @@ public static void sendMessage(String string, boolean reformat) {

// Record current buffer to the to-be-submitted buffer
if (Debug.record) {
Debug.Recording.append(URLEncoder.encode(dateFormat.format(new Date())
Debug.recording.append(URLEncoder.encode(dateFormat.format(new Date())
+ " [INFO] " + string.replace(ChatColor.COLOR_CHAR, (char) 0x01) + "\n"));
}

Expand Down
Original file line number Diff line number Diff line change
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 = (pl.isEnabled() ? ChatColor.DARK_GREEN : ChatColor.DARK_RED) + pl.getName() + ": " + pl.getDescription().getVersion() + ", ";
String temp = ((char) 0x01) + (pl.isEnabled() ? "2" : "4") + 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() + ChatColor.GRAY + "(" + pla.getName() + "), ";
String temp = pla.getDisplayName().replace(ChatColor.COLOR_CHAR, (char) 0x01) + ((char) 0x01) + "7(" + pla.getName() + "), ";
playerlist.append(temp);
newlineLength += temp.length();
if (newlineLength > 80) {
Expand Down Expand Up @@ -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")) + recording)
+ "\n\n").replace(ChatColor.COLOR_CHAR, (char) 0x01)) + recording)
.getBytes(StandardCharsets.UTF_8));
// Wait for a response from the server
in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,13 +467,13 @@ public boolean allowStrangeYAMLSaves() {
@Override
public void startRecording() {
Debug.record = true;
Debug.Recording = new StringBuilder();
Debug.recording = new StringBuilder();
}

@Override
public void stopRecording() {
Debug.record = false;
Debug.Recording = new StringBuilder();
Debug.recording = new StringBuilder();
}

@Override
Expand All @@ -484,8 +484,8 @@ public void submitRecording(Consumer<String> processResult) {
}
Debug.record = false;
final DebugSubmit submit = new DebugSubmit();
submit.recording = Debug.Recording.toString();
Debug.Recording = new StringBuilder();
submit.recording = Debug.recording.toString();
Debug.recording = new StringBuilder();
submit.start();
BukkitRunnable task = new BukkitRunnable() {
public void run() {
Expand Down

0 comments on commit 567ec7d

Please sign in to comment.