Added colors
This commit is contained in:
16
ChatApp/src/network/protocol/ANSIColor.java
Normal file
16
ChatApp/src/network/protocol/ANSIColor.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package network.protocol;
|
||||
|
||||
public class ANSIColor {
|
||||
public static final String RESET = "\u001B[0m";
|
||||
public static final String BLACK = "\u001B[30m";
|
||||
public static final String RED = "\u001B[31m";
|
||||
public static final String GREEN = "\u001B[32m";
|
||||
public static final String BLUE = "\u001B[34m";
|
||||
|
||||
public static String formatString(String message){
|
||||
return message.replace("&r", RED)
|
||||
.replace("&g", GREEN)
|
||||
.replace("&b", BLUE)
|
||||
.replace("&n", RESET);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user