Search in sources :

Example 1 with Parameters

use of com.djrapitops.plan.extension.implementation.providers.Parameters in project Plan by plan-player-analytics.

the class DataValueGatherer method updateValues.

public void updateValues(UUID playerUUID, String playerName) {
    Parameters parameters = Parameters.player(serverInfo.getServerUUID(), playerUUID, playerName);
    ExtensionDataBuilder dataBuilder = extension.getExtension().newExtensionDataBuilder();
    addValuesToBuilder(dataBuilder, extension.getMethods().get(ExtensionMethod.ParameterType.PLAYER_STRING), parameters);
    addValuesToBuilder(dataBuilder, extension.getMethods().get(ExtensionMethod.ParameterType.PLAYER_UUID), parameters);
    gatherPlayer(parameters, (ExtDataBuilder) dataBuilder);
    dbSystem.getDatabase().executeTransaction(new RemoveInvalidResultsTransaction(extension.getPluginName(), serverInfo.getServerUUID(), ((ExtDataBuilder) dataBuilder).getInvalidatedValues()));
}
Also used : Parameters(com.djrapitops.plan.extension.implementation.providers.Parameters) ExtensionDataBuilder(com.djrapitops.plan.extension.builder.ExtensionDataBuilder)

Example 2 with Parameters

use of com.djrapitops.plan.extension.implementation.providers.Parameters in project Plan by plan-player-analytics.

the class DataValueGatherer method updateValues.

public void updateValues() {
    Parameters parameters = Parameters.server(serverInfo.getServerUUID());
    ExtensionDataBuilder dataBuilder = extension.getExtension().newExtensionDataBuilder();
    addValuesToBuilder(dataBuilder, extension.getMethods().get(ExtensionMethod.ParameterType.SERVER_NONE), parameters);
    gather(parameters, (ExtDataBuilder) dataBuilder);
}
Also used : Parameters(com.djrapitops.plan.extension.implementation.providers.Parameters) ExtensionDataBuilder(com.djrapitops.plan.extension.builder.ExtensionDataBuilder)

Aggregations

ExtensionDataBuilder (com.djrapitops.plan.extension.builder.ExtensionDataBuilder)2 Parameters (com.djrapitops.plan.extension.implementation.providers.Parameters)2