mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-12 15:56:00 +08:00
Fixed issues with null group names
- COALESCE in player table query - Query filter UUID takes null - Player String values can be null - Kingdoms Extension updated to not have null group names
This commit is contained in:
parent
202fdbc2e3
commit
9348d01749
@ -78,6 +78,8 @@ public enum Html {
|
||||
* @return String with span elements.
|
||||
*/
|
||||
public static String swapColorCodesToSpan(String string) {
|
||||
if (string == null) return null;
|
||||
|
||||
Html[] replacer = new Html[]{
|
||||
Html.COLOR_0, Html.COLOR_1, Html.COLOR_2, Html.COLOR_3,
|
||||
Html.COLOR_4, Html.COLOR_5, Html.COLOR_6, Html.COLOR_7,
|
||||
|
@ -131,7 +131,7 @@ public class ExtensionServerTableDataQuery implements Query<Map<UUID, ExtensionT
|
||||
|
||||
String sql = SELECT +
|
||||
"v1." + ExtensionGroupsTable.USER_UUID + " as uuid," +
|
||||
"v1." + ExtensionGroupsTable.GROUP_NAME + " as group_value," +
|
||||
"COALESCE(v1." + ExtensionGroupsTable.GROUP_NAME + ",'None') as group_value," +
|
||||
"p1." + ExtensionProviderTable.PROVIDER_NAME + " as provider_name," +
|
||||
"p1." + ExtensionProviderTable.TEXT + " as text," +
|
||||
"i1." + ExtensionIconTable.ICON_NAME + " as provider_icon_name," +
|
||||
|
@ -58,7 +58,7 @@ public class ExtensionUUIDsInGroupQuery extends QueryStatement<Set<UUID>> {
|
||||
ExtensionProviderTable.set3PluginValuesToStatement(statement, 1, groupProvider, pluginName, serverUUID);
|
||||
int index = 4;
|
||||
for (String group : inGroups) {
|
||||
statement.setString(index, group);
|
||||
setStringOrNull(statement, index, group == null || "null".equalsIgnoreCase(group) ? null : group);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ dependencies {
|
||||
compile 'com.djrapitops:Extension-GriefPrevention-Sponge:4.0.1-R0.2'
|
||||
compile 'com.djrapitops:Extension-Heroes:R0.2'
|
||||
compile 'com.djrapitops:Extension-Jobs:4.16.3-R0.1'
|
||||
compile 'com.djrapitops:Extension-KingdomsX:1.10.17-R0.2'
|
||||
compile 'com.djrapitops:Extension-KingdomsX:1.10.17-R0.3'
|
||||
compile 'com.djrapitops:Extension-Lands:5.4.12-R0.1'
|
||||
compile 'com.djrapitops:Extension-Litebans:0.3.4-R0.1'
|
||||
compile 'com.djrapitops:Extension-LogBlock:1.16.1.2-R0.2'
|
||||
|
Loading…
Reference in New Issue
Block a user