Skip to content

Commit

Permalink
style: 格式化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
0XPYEX0 committed Aug 31, 2024
1 parent c575f97 commit 25b9591
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 32 deletions.
17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +25,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
45 changes: 23 additions & 22 deletions src/main/java/me/xpyex/module/cnusername/Logging.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,30 @@ public static void setLogger(Logger logger) {

public static class ColoredConsole {
private static final HashMap<String, String> MCColorToANSI = new HashMap<>();

static {
MCColorToANSI.put("§0", "\u001B[30m");
MCColorToANSI.put("§1", "\u001B[34m");
MCColorToANSI.put("§2", "\u001B[32m");
MCColorToANSI.put("§3", "\u001B[36m");
MCColorToANSI.put("§4", "\u001B[31m");
MCColorToANSI.put("§5", "\u001B[35m");
MCColorToANSI.put("§6", "\u001B[33m");
MCColorToANSI.put("§7", "\u001B[37m");
MCColorToANSI.put("§8", "\u001B[90m");
MCColorToANSI.put("§9", "\u001B[94m");
MCColorToANSI.put("§a", "\u001B[92m");
MCColorToANSI.put("§b", "\u001B[96m");
MCColorToANSI.put("§c", "\u001B[91m");
MCColorToANSI.put("§d", "\u001B[95m");
MCColorToANSI.put("§e", "\u001B[93m");
MCColorToANSI.put("§f", "\u001B[97m");
MCColorToANSI.put("§k", "\u001B[5m");
MCColorToANSI.put("§l", "\u001B[1m");
MCColorToANSI.put("§m", "\u001B[9m");
MCColorToANSI.put("§n", "\u001B[4m");
MCColorToANSI.put("§o", "\u001B[3m");
MCColorToANSI.put("§r", "\u001B[0m");
MCColorToANSI.put("§0", "\u001B[30m");
MCColorToANSI.put("§1", "\u001B[34m");
MCColorToANSI.put("§2", "\u001B[32m");
MCColorToANSI.put("§3", "\u001B[36m");
MCColorToANSI.put("§4", "\u001B[31m");
MCColorToANSI.put("§5", "\u001B[35m");
MCColorToANSI.put("§6", "\u001B[33m");
MCColorToANSI.put("§7", "\u001B[37m");
MCColorToANSI.put("§8", "\u001B[90m");
MCColorToANSI.put("§9", "\u001B[94m");
MCColorToANSI.put("§a", "\u001B[92m");
MCColorToANSI.put("§b", "\u001B[96m");
MCColorToANSI.put("§c", "\u001B[91m");
MCColorToANSI.put("§d", "\u001B[95m");
MCColorToANSI.put("§e", "\u001B[93m");
MCColorToANSI.put("§f", "\u001B[97m");
MCColorToANSI.put("§k", "\u001B[5m");
MCColorToANSI.put("§l", "\u001B[1m");
MCColorToANSI.put("§m", "\u001B[9m");
MCColorToANSI.put("§n", "\u001B[4m");
MCColorToANSI.put("§o", "\u001B[3m");
MCColorToANSI.put("§r", "\u001B[0m");
}

public static String toANSI(String s) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package me.xpyex.module.cnusername.mojang;

import java.util.regex.Pattern;
import me.xpyex.module.cnusername.Logging;
import me.xpyex.module.cnusername.impl.PatternVisitor;
import org.objectweb.asm.ClassVisitor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import java.io.IOException;
import me.xpyex.module.cnusername.CnUsername;
import me.xpyex.plugin.cnusername.CnUsernamePlugin;
import me.xpyex.module.cnusername.Logging;
import me.xpyex.module.cnusername.UpdateChecker;
import me.xpyex.module.cnusername.minecraft.ClassVisitorLoginListener;
import me.xpyex.module.cnusername.mojang.ClassVisitorStringUtil;
import me.xpyex.plugin.cnusername.CnUsernamePlugin;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package me.xpyex.plugin.cnusername.bungee;

import me.xpyex.module.cnusername.CnUsername;
import me.xpyex.plugin.cnusername.CnUsernamePlugin;
import me.xpyex.module.cnusername.Logging;
import me.xpyex.module.cnusername.UpdateChecker;
import me.xpyex.module.cnusername.bungee.ClassVisitorAllowedCharacters;
import me.xpyex.plugin.cnusername.CnUsernamePlugin;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.event.PreLoginEvent;
import net.md_5.bungee.api.plugin.Listener;
Expand Down

0 comments on commit 25b9591

Please sign in to comment.