use of com.djrapitops.plan.extension.implementation.results.ExtensionDescription in project Plan by plan-player-analytics.
the class ExtensionAggregateBooleansQuery method extractTabDataByPluginID.
private QueriedTabData extractTabDataByPluginID(ResultSet set) throws SQLException {
QueriedTabData tabData = new QueriedTabData();
while (set.next()) {
int pluginID = set.getInt("plugin_id");
String tabName = Optional.ofNullable(set.getString("tab_name")).orElse("");
ExtensionTabData.Builder extensionTab = tabData.getTab(pluginID, tabName, () -> extractTabInformation(tabName, set));
ExtensionDescription extensionDescription = extractDescription(set);
extractAndPutDataTo(extensionTab, extensionDescription, set);
}
return tabData;
}
use of com.djrapitops.plan.extension.implementation.results.ExtensionDescription in project Plan by plan-player-analytics.
the class ExtensionAggregateBooleansQuery method extractDescription.
private ExtensionDescription extractDescription(ResultSet set) throws SQLException {
String name = set.getString("provider_name") + "_aggregate";
String text = set.getString(ExtensionProviderTable.TEXT) + " / Players";
String description = set.getString(ExtensionProviderTable.DESCRIPTION);
int priority = set.getInt("provider_priority");
String iconName = set.getString("provider_icon_name");
Family family = Family.getByName(set.getString("provider_icon_family")).orElse(Family.SOLID);
Color color = Color.getByName(set.getString("provider_icon_color")).orElse(Color.NONE);
Icon icon = new Icon(family, iconName, color);
return new ExtensionDescription(name, text, description, icon, priority);
}
use of com.djrapitops.plan.extension.implementation.results.ExtensionDescription in project Plan by plan-player-analytics.
the class ExtensionAggregateDoublesQuery method extractDescription.
private ExtensionDescription extractDescription(ResultSet set) throws SQLException {
String name = set.getString("provider_name");
String text = set.getString(ExtensionProviderTable.TEXT);
String description = set.getString(ExtensionProviderTable.DESCRIPTION);
int priority = set.getInt("provider_priority");
String iconName = set.getString("provider_icon_name");
Family family = Family.getByName(set.getString("provider_icon_family")).orElse(Family.SOLID);
Color color = Color.getByName(set.getString("provider_icon_color")).orElse(Color.NONE);
Icon icon = new Icon(family, iconName, color);
return new ExtensionDescription(name, text, description, icon, priority);
}
use of com.djrapitops.plan.extension.implementation.results.ExtensionDescription in project Plan by plan-player-analytics.
the class ExtensionAggregateDoublesQuery method extractTabDataByPluginID.
private QueriedTabData extractTabDataByPluginID(ResultSet set) throws SQLException {
QueriedTabData tabData = new QueriedTabData();
while (set.next()) {
int pluginID = set.getInt("plugin_id");
String tabName = Optional.ofNullable(set.getString("tab_name")).orElse("");
ExtensionTabData.Builder extensionTab = tabData.getTab(pluginID, tabName, () -> extractTabInformation(tabName, set));
ExtensionDescription extensionDescription = extractDescription(set);
extractAndPutDataTo(extensionTab, extensionDescription, set);
}
return tabData;
}
use of com.djrapitops.plan.extension.implementation.results.ExtensionDescription in project Plan by plan-player-analytics.
the class ExtensionAggregateNumbersQuery method extractDescription.
private ExtensionDescription extractDescription(ResultSet set) throws SQLException {
String name = set.getString("provider_name");
String text = set.getString(ExtensionProviderTable.TEXT);
String description = set.getString(ExtensionProviderTable.DESCRIPTION);
int priority = set.getInt("provider_priority");
String iconName = set.getString("provider_icon_name");
Family family = Family.getByName(set.getString("provider_icon_family")).orElse(Family.SOLID);
Color color = Color.getByName(set.getString("provider_icon_color")).orElse(Color.NONE);
Icon icon = new Icon(family, iconName, color);
return new ExtensionDescription(name, text, description, icon, priority);
}
Aggregations