mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 02:19:05 +00:00
Remove commented out blocks
This commit is contained in:
parent
6207bdab2f
commit
7069f24f14
@ -217,8 +217,6 @@ public class ConfigService {
|
|||||||
|
|
||||||
public boolean isProxyEnabled() {
|
public boolean isProxyEnabled() {
|
||||||
try {
|
try {
|
||||||
// return plugin.getServer().spigot().getConfig().getBoolean("settings.bungeecord")
|
|
||||||
// || plugin.getServer().spigot().getPaperConfig().getBoolean("settings.velocity-support.enabled");
|
|
||||||
return (plugin.getServer().spigot().getConfig().getBoolean("settings.bungeecord")
|
return (plugin.getServer().spigot().getConfig().getBoolean("settings.bungeecord")
|
||||||
|| plugin.getServer().spigot().getPaperConfig().getBoolean("settings.velocity-support.enabled")
|
|| plugin.getServer().spigot().getPaperConfig().getBoolean("settings.velocity-support.enabled")
|
||||||
|| plugin.getServer().spigot().getPaperConfig().getBoolean("proxies.velocity.enabled"));
|
|| plugin.getServer().spigot().getPaperConfig().getBoolean("proxies.velocity.enabled"));
|
||||||
|
@ -67,7 +67,6 @@ public class VentureChatFormatService {
|
|||||||
*/
|
*/
|
||||||
public String convertToJson(VentureChatPlayer sender, String format, String chat) {
|
public String convertToJson(VentureChatPlayer sender, String format, String chat) {
|
||||||
JsonFormat JSONformat = configService.getJsonFormat(sender.getJsonFormat());
|
JsonFormat JSONformat = configService.getJsonFormat(sender.getJsonFormat());
|
||||||
// String f = escapeJsonChars(format);
|
|
||||||
String c = escapeJsonChars(chat);
|
String c = escapeJsonChars(chat);
|
||||||
String json = "[\"\",{\"text\":\"\",\"extra\":[";
|
String json = "[\"\",{\"text\":\"\",\"extra\":[";
|
||||||
json += convertPlaceholders(format, JSONformat, sender);
|
json += convertPlaceholders(format, JSONformat, sender);
|
||||||
@ -113,17 +112,11 @@ public class VentureChatFormatService {
|
|||||||
formattedPlaceholder = escapeJsonChars(FormatUtils.FormatStringAll(PlaceholderAPI.setBracketPlaceholders(icp.getPlayer(), placeholder)));
|
formattedPlaceholder = escapeJsonChars(FormatUtils.FormatStringAll(PlaceholderAPI.setBracketPlaceholders(icp.getPlayer(), placeholder)));
|
||||||
temp += convertToJsonColors(escapeJsonChars(lastCode + remaining.substring(0, indexStart))) + ",";
|
temp += convertToJsonColors(escapeJsonChars(lastCode + remaining.substring(0, indexStart))) + ",";
|
||||||
lastCode = getLastCode(lastCode + remaining.substring(0, indexStart));
|
lastCode = getLastCode(lastCode + remaining.substring(0, indexStart));
|
||||||
// String action = "";
|
|
||||||
// String text = "";
|
|
||||||
// String hover = "";
|
|
||||||
boolean placeholderHasJsonAttribute = false;
|
boolean placeholderHasJsonAttribute = false;
|
||||||
for (JsonAttribute jsonAttribute : format.getJsonAttributes()) {
|
for (JsonAttribute jsonAttribute : format.getJsonAttributes()) {
|
||||||
if (placeholder.contains(jsonAttribute.getName().replace("{", "").replace("}", ""))) {
|
if (placeholder.contains(jsonAttribute.getName().replace("{", "").replace("}", ""))) {
|
||||||
// action = jsonAttribute.getClickAction();
|
|
||||||
// text = FormatUtils.FormatStringAll(PlaceholderAPI.setBracketPlaceholders(icp.getPlayer(), jsonAttribute.getClickText()));
|
|
||||||
final StringBuilder hover = new StringBuilder();
|
final StringBuilder hover = new StringBuilder();
|
||||||
for (String st : jsonAttribute.getHoverText()) {
|
for (String st : jsonAttribute.getHoverText()) {
|
||||||
// hover += FormatUtils.FormatStringAll(st) + "\n";
|
|
||||||
hover.append(FormatUtils.FormatStringAll(st) + "\n");
|
hover.append(FormatUtils.FormatStringAll(st) + "\n");
|
||||||
}
|
}
|
||||||
final String hoverText;
|
final String hoverText;
|
||||||
@ -155,14 +148,9 @@ public class VentureChatFormatService {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (!hover.isEmpty()) {
|
|
||||||
// hover = FormatUtils.FormatStringAll(PlaceholderAPI.setBracketPlaceholders(icp.getPlayer(), hover.substring(0, hover.length() - 1)));
|
|
||||||
// }
|
|
||||||
if (!placeholderHasJsonAttribute) {
|
if (!placeholderHasJsonAttribute) {
|
||||||
temp += convertToJsonColors(lastCode + formattedPlaceholder) + ",";
|
temp += convertToJsonColors(lastCode + formattedPlaceholder) + ",";
|
||||||
}
|
}
|
||||||
// temp += convertToJsonColors(lastCode + formattedPlaceholder, ",\"clickEvent\":{\"action\":\"" + action + "\",\"value\":\"" + text
|
|
||||||
// + "\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":[" + convertToJsonColors(hover) + "]}}") + ",";
|
|
||||||
lastCode = getLastCode(lastCode + formattedPlaceholder);
|
lastCode = getLastCode(lastCode + formattedPlaceholder);
|
||||||
remaining = remaining.substring(indexEnd);
|
remaining = remaining.substring(indexEnd);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user