mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-22 18:09:06 +00:00
Bugfix use 1.20.4 json boolean type for urls
This commit is contained in:
parent
d87c255059
commit
05762e0bc7
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>mineverse.Aust1n46.chat</groupId>
|
||||
<artifactId>VentureChat</artifactId>
|
||||
<version>3.7.0</version>
|
||||
<version>3.7.1</version>
|
||||
<url>https://bitbucket.org/Aust1n46/venturechat/src/master</url>
|
||||
<scm>
|
||||
<url>https://bitbucket.org/Aust1n46/venturechat/src/master</url>
|
||||
|
@ -190,8 +190,8 @@ public class Format {
|
||||
if (ChatColor.stripColor(link).contains("https://"))
|
||||
https = "s";
|
||||
temp += convertToJsonColors(lastCode + link,
|
||||
",\"underlined\":\"" + underlineURLs()
|
||||
+ "\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"http" + https + "://"
|
||||
",\"underlined\":" + underlineURLs()
|
||||
+ ",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"http" + https + "://"
|
||||
+ ChatColor.stripColor(link.replace("http://", "").replace("https://", ""))
|
||||
+ "\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":["
|
||||
+ convertToJsonColors(lastCode + link) + "]}}")
|
||||
@ -811,8 +811,13 @@ public class Format {
|
||||
.replace(")", "\\)").replace("|", "\\|").replace("+", "\\+").replace("*", "\\*");
|
||||
}
|
||||
|
||||
public static boolean underlineURLs() {
|
||||
return getInstance().getConfig().getBoolean("underlineurls", true);
|
||||
public static String underlineURLs() {
|
||||
final boolean configValue = getInstance().getConfig().getBoolean("underlineurls", true);
|
||||
if (VersionHandler.isAtLeast_1_20_4()) {
|
||||
return String.valueOf(configValue);
|
||||
} else {
|
||||
return "\"" + configValue + "\"";
|
||||
}
|
||||
}
|
||||
|
||||
public static String parseTimeStringFromMillis(long millis) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user