Fixed some bugs resulting of my changes

This commit is contained in:
Fuzzlemann 2017-07-29 10:26:58 +02:00
parent d7f4168aa6
commit fb4225a377
3 changed files with 5 additions and 3 deletions

View File

@ -181,12 +181,14 @@ public class HtmlUtils {
Html.COLOR_A, Html.COLOR_B, Html.COLOR_C, Html.COLOR_D, Html.COLOR_E, Html.COLOR_F}; Html.COLOR_A, Html.COLOR_B, Html.COLOR_C, Html.COLOR_D, Html.COLOR_E, Html.COLOR_F};
for (Html html : replacer) { for (Html html : replacer) {
string = string.replace("§" + html.name().charAt(6), html.parse()); string = string.replace("§" + Character.toLowerCase(html.name().charAt(6)), html.parse());
} }
int spans = string.split("<span").length - 1; int spans = string.split("<span").length - 1;
for (int i = 0; i < spans; i++) { for (int i = 0; i < spans; i++) {
string = Html.SPAN.parse(string); string = Html.SPAN.parse(string);
} }
return string.replace("§r", ""); return string.replace("§r", "");
} }

View File

@ -208,7 +208,7 @@ public class Analysis {
if (analysisTypes.contains(boolTot)) { if (analysisTypes.contains(boolTot)) {
replaceMap.put(source.getPlaceholder(boolTot.getPlaceholderModifier()), AnalysisUtils.getBooleanTotal(boolTot, source, uuids)); replaceMap.put(source.getPlaceholder(boolTot.getPlaceholderModifier()), AnalysisUtils.getBooleanTotal(boolTot, source, uuids));
} }
} catch (Exception e) { } catch (NoClassDefFoundError | Exception e) {
Log.error("A PluginData-source caused an exception: " + source.getPlaceholder("").replace("%", "")); Log.error("A PluginData-source caused an exception: " + source.getPlaceholder("").replace("%", ""));
Log.toLog(this.getClass().getName(), e); Log.toLog(this.getClass().getName(), e);

View File

@ -105,7 +105,7 @@ public class AnalysisUtils {
return source.parseContainer("", "Wrong Analysistype specified: " + analysisType.name()); return source.parseContainer("", "Wrong Analysistype specified: " + analysisType.name());
} }
return source.parseContainer(analysisType.getModifier(), String.valueOf(total)); return source.parseContainer(analysisType.getModifier(), String.valueOf(total));
} catch (Exception e) { } catch (Exception | NoClassDefFoundError e) {
return logPluginDataCausedError(source, e); return logPluginDataCausedError(source, e);
} }
} }