mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2025-02-27 08:51:22 +01:00
ProtocolLib dependency update.
This commit is contained in:
parent
c8629381d8
commit
0ae7cc9027
@ -266,7 +266,7 @@
|
||||
<dependency>
|
||||
<groupId>com.cnaude.protocol</groupId>
|
||||
<artifactId>ProtocolLib</artifactId>
|
||||
<version>3.6.3</version>
|
||||
<version>3.6.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
4
pom.xml
4
pom.xml
@ -97,7 +97,7 @@
|
||||
<dependency>
|
||||
<groupId>com.cnaude.pircbotx</groupId>
|
||||
<artifactId>pircbotx-shaded</artifactId>
|
||||
<version>2.1.6</version>
|
||||
<version>2.1.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -259,7 +259,7 @@
|
||||
<dependency>
|
||||
<groupId>com.cnaude.protocol</groupId>
|
||||
<artifactId>ProtocolLib</artifactId>
|
||||
<version>3.6.3</version>
|
||||
<version>3.6.4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- CleverNotch -->
|
||||
|
@ -105,6 +105,51 @@ public class ColorConverter {
|
||||
message = message.replace(matcher.group(1), matcher.group(2));
|
||||
}
|
||||
|
||||
String m[] = message.split("");
|
||||
message = "";
|
||||
|
||||
int bold = 0;
|
||||
int underline = 0;
|
||||
int italic = 0;
|
||||
int reverse = 0;
|
||||
for (String s : m) {
|
||||
switch (s) {
|
||||
case Colors.NORMAL:
|
||||
bold=0;
|
||||
underline=0;
|
||||
italic=0;
|
||||
reverse=0;
|
||||
break;
|
||||
case Colors.BOLD:
|
||||
bold++;
|
||||
if (bold % 2 == 0) {
|
||||
s = Colors.NORMAL;
|
||||
}
|
||||
break;
|
||||
case Colors.UNDERLINE:
|
||||
underline++;
|
||||
if (underline % 2 == 0) {
|
||||
s = Colors.NORMAL;
|
||||
}
|
||||
break;
|
||||
case Colors.ITALIC:
|
||||
italic++;
|
||||
if (italic % 2 == 0) {
|
||||
s = Colors.NORMAL;
|
||||
}
|
||||
break;
|
||||
case Colors.REVERSE:
|
||||
reverse++;
|
||||
if (reverse % 2 == 0) {
|
||||
s = Colors.NORMAL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
message = message + s;
|
||||
}
|
||||
|
||||
if (stripIRCColors) {
|
||||
return Colors.removeFormattingAndColors(message);
|
||||
} else {
|
||||
@ -186,6 +231,8 @@ public class ColorConverter {
|
||||
ircColorMap.put(ChatColor.YELLOW, Colors.YELLOW);
|
||||
ircColorMap.put(ChatColor.WHITE, Colors.WHITE);
|
||||
ircColorMap.put(ChatColor.RESET, Colors.NORMAL);
|
||||
//ircColorMap.put(ChatColor.ITALIC, Colors.REVERSE);
|
||||
ircColorMap.put(ChatColor.ITALIC, Colors.ITALIC);
|
||||
|
||||
gameColorMap.put(Colors.BLACK, ChatColor.BLACK);
|
||||
gameColorMap.put(Colors.BLUE, ChatColor.BLUE);
|
||||
@ -206,5 +253,7 @@ public class ColorConverter {
|
||||
gameColorMap.put(Colors.UNDERLINE, ChatColor.UNDERLINE);
|
||||
gameColorMap.put(Colors.WHITE, ChatColor.WHITE);
|
||||
gameColorMap.put(Colors.YELLOW, ChatColor.YELLOW);
|
||||
//gameColorMap.put(Colors.REVERSE, ChatColor.ITALIC);
|
||||
gameColorMap.put(Colors.ITALIC, ChatColor.ITALIC);
|
||||
}
|
||||
}
|
||||
|
@ -278,6 +278,7 @@ irc-color-map:
|
||||
YELLOW: YELLOW
|
||||
WHITE: WHITE
|
||||
RESET: NORMAL
|
||||
ITALIC: ITALIC
|
||||
# IRC to game color map: IRC Color Code => Game Color Code
|
||||
game-color-map:
|
||||
BLACK: BLACK
|
||||
@ -299,6 +300,7 @@ game-color-map:
|
||||
UNDERLINE: UNDERLINE
|
||||
WHITE: WHITE
|
||||
YELLOW: YELLOW
|
||||
ITALIC: ITALIC
|
||||
Debug: false
|
||||
# Ignore chat cancellation.
|
||||
ignore-chat-cancel: false
|
||||
|
Loading…
Reference in New Issue
Block a user