Search in sources :

Example 31 with Icon

use of com.djrapitops.plan.extension.icon.Icon in project Plan by plan-player-analytics.

the class DataValueGatherer method storeExtensionInformation.

public void storeExtensionInformation() {
    String pluginName = extension.getPluginName();
    Icon pluginIcon = extension.getPluginIcon();
    long time = System.currentTimeMillis();
    ServerUUID serverUUID = serverInfo.getServerUUID();
    Database database = dbSystem.getDatabase();
    database.executeTransaction(new StoreIconTransaction(pluginIcon));
    database.executeTransaction(new StorePluginTransaction(pluginName, time, serverUUID, pluginIcon));
    for (TabInformation tab : extension.getPluginTabs()) {
        database.executeTransaction(new StoreIconTransaction(tab.getTabIcon()));
        database.executeTransaction(new StoreTabInformationTransaction(pluginName, serverUUID, tab));
    }
    database.executeTransaction(new RemoveInvalidResultsTransaction(pluginName, serverUUID, extension.getInvalidatedMethods()));
}
Also used : StoreIconTransaction(com.djrapitops.plan.extension.implementation.storage.transactions.StoreIconTransaction) ServerUUID(com.djrapitops.plan.identification.ServerUUID) Database(com.djrapitops.plan.storage.database.Database) StoreTabInformationTransaction(com.djrapitops.plan.extension.implementation.storage.transactions.StoreTabInformationTransaction) TabInformation(com.djrapitops.plan.extension.implementation.TabInformation) Icon(com.djrapitops.plan.extension.icon.Icon) StorePluginTransaction(com.djrapitops.plan.extension.implementation.storage.transactions.StorePluginTransaction)

Aggregations

Icon (com.djrapitops.plan.extension.icon.Icon)31 Family (com.djrapitops.plan.extension.icon.Family)17 Color (com.djrapitops.plan.extension.icon.Color)15 TabInformation (com.djrapitops.plan.extension.implementation.TabInformation)9 ElementOrder (com.djrapitops.plan.extension.ElementOrder)8 ExtensionDescription (com.djrapitops.plan.extension.implementation.results.ExtensionDescription)5 StoreIconTransaction (com.djrapitops.plan.extension.implementation.storage.transactions.StoreIconTransaction)3 Table (com.djrapitops.plan.extension.table.Table)3 Database (com.djrapitops.plan.storage.database.Database)3 Test (org.junit.jupiter.api.Test)3 ProviderInformation (com.djrapitops.plan.extension.implementation.ProviderInformation)2 StoreTableProviderTransaction (com.djrapitops.plan.extension.implementation.storage.transactions.providers.StoreTableProviderTransaction)2 ExtensionInformation (com.djrapitops.plan.extension.implementation.results.ExtensionInformation)1 StorePluginTransaction (com.djrapitops.plan.extension.implementation.storage.transactions.StorePluginTransaction)1 StoreTabInformationTransaction (com.djrapitops.plan.extension.implementation.storage.transactions.StoreTabInformationTransaction)1 ServerUUID (com.djrapitops.plan.identification.ServerUUID)1