>() {}, "extension_data");
}
\ No newline at end of file
diff --git a/Plan/common/src/main/java/com/djrapitops/plan/delivery/domain/mutators/CommandUseMutator.java b/Plan/common/src/main/java/com/djrapitops/plan/delivery/domain/mutators/CommandUseMutator.java
deleted file mode 100644
index 544869f29..000000000
--- a/Plan/common/src/main/java/com/djrapitops/plan/delivery/domain/mutators/CommandUseMutator.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * This file is part of Player Analytics (Plan).
- *
- * Plan is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License v3 as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Plan is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Plan. If not, see .
- */
-package com.djrapitops.plan.delivery.domain.mutators;
-
-import com.djrapitops.plan.delivery.domain.container.DataContainer;
-import com.djrapitops.plan.delivery.domain.keys.ServerKeys;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Mutator for Command Usage Map objects.
- *
- * Can be used to easily get different values about the map.
- *
- * @author Rsl1122
- */
-public class CommandUseMutator {
-
- private Map commandUsage;
-
- public CommandUseMutator(Map commandUsage) {
- this.commandUsage = commandUsage;
- }
-
- public static CommandUseMutator forContainer(DataContainer container) {
- return new CommandUseMutator(container.getValue(ServerKeys.COMMAND_USAGE).orElse(new HashMap<>()));
- }
-
- public int commandUsageCount() {
- int total = 0;
- for (Integer value : commandUsage.values()) {
- total += value;
- }
- return total;
- }
-}
\ No newline at end of file
diff --git a/Plan/common/src/main/java/com/djrapitops/plan/gathering/importing/data/ServerImportData.java b/Plan/common/src/main/java/com/djrapitops/plan/gathering/importing/data/ServerImportData.java
index 11f2a3824..8b387e350 100644
--- a/Plan/common/src/main/java/com/djrapitops/plan/gathering/importing/data/ServerImportData.java
+++ b/Plan/common/src/main/java/com/djrapitops/plan/gathering/importing/data/ServerImportData.java
@@ -19,18 +19,19 @@ package com.djrapitops.plan.gathering.importing.data;
import com.djrapitops.plan.gathering.domain.TPS;
import com.djrapitops.plan.gathering.domain.builders.TPSBuilder;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
/**
* @author Fuzzlemann
*/
public class ServerImportData {
- private Map commandUsages;
private List tpsData;
- private ServerImportData(Map commandUsages, List tpsData) {
- this.commandUsages = commandUsages;
+ private ServerImportData(List tpsData) {
this.tpsData = tpsData;
}
@@ -38,14 +39,6 @@ public class ServerImportData {
return new ServerImportDataBuilder();
}
- public Map getCommandUsages() {
- return commandUsages;
- }
-
- public void setCommandUsages(Map commandUsages) {
- this.commandUsages = commandUsages;
- }
-
public List getTpsData() {
return tpsData;
}
@@ -55,23 +48,12 @@ public class ServerImportData {
}
public static final class ServerImportDataBuilder {
- private final Map commandUsages = new HashMap<>();
private final List tpsData = new ArrayList<>();
private ServerImportDataBuilder() {
/* Private Constructor */
}
- public ServerImportDataBuilder commandUsage(String command, Integer usages) {
- this.commandUsages.put(command, usages);
- return this;
- }
-
- public ServerImportDataBuilder commandUsages(Map commandUsages) {
- this.commandUsages.putAll(commandUsages);
- return this;
- }
-
public ServerImportDataBuilder tpsData(long date, double ticksPerSecond, int players, double cpuUsage, long usedMemory, int entityCount, int chunksLoaded) {
TPS tps = TPSBuilder.get()
.date(date)
@@ -97,7 +79,7 @@ public class ServerImportData {
}
public ServerImportData build() {
- return new ServerImportData(commandUsages, tpsData);
+ return new ServerImportData(tpsData);
}
}
}
diff --git a/Plan/common/src/main/java/com/djrapitops/plan/storage/database/queries/DataStoreQueries.java b/Plan/common/src/main/java/com/djrapitops/plan/storage/database/queries/DataStoreQueries.java
index 41e153dc7..ac2b2a44f 100644
--- a/Plan/common/src/main/java/com/djrapitops/plan/storage/database/queries/DataStoreQueries.java
+++ b/Plan/common/src/main/java/com/djrapitops/plan/storage/database/queries/DataStoreQueries.java
@@ -42,43 +42,6 @@ public class DataStoreQueries {
/* static method class */
}
- /**
- * Store the used command in the database.
- *
- * @param serverUUID UUID of the Plan server.
- * @param commandName Name of the command that was used.
- * @return Executable, use inside a {@link com.djrapitops.plan.storage.database.transactions.Transaction}
- */
- public static Executable storeUsedCommandInformation(UUID serverUUID, String commandName) {
- return connection -> {
- if (!updateCommandUsage(serverUUID, commandName).execute(connection)) {
- insertNewCommandUsage(serverUUID, commandName).execute(connection);
- }
- return false;
- };
- }
-
- private static Executable updateCommandUsage(UUID serverUUID, String commandName) {
- return new ExecStatement(CommandUseTable.UPDATE_STATEMENT) {
- @Override
- public void prepare(PreparedStatement statement) throws SQLException {
- statement.setString(1, serverUUID.toString());
- statement.setString(2, commandName);
- }
- };
- }
-
- private static Executable insertNewCommandUsage(UUID serverUUID, String commandName) {
- return new ExecStatement(CommandUseTable.INSERT_STATEMENT) {
- @Override
- public void prepare(PreparedStatement statement) throws SQLException {
- statement.setString(1, commandName);
- statement.setInt(2, 1);
- statement.setString(3, serverUUID.toString());
- }
- };
- }
-
/**
* Store a finished session in the database.
*
diff --git a/Plan/common/src/main/java/com/djrapitops/plan/storage/database/queries/LargeFetchQueries.java b/Plan/common/src/main/java/com/djrapitops/plan/storage/database/queries/LargeFetchQueries.java
index c776eeba4..4608d4485 100644
--- a/Plan/common/src/main/java/com/djrapitops/plan/storage/database/queries/LargeFetchQueries.java
+++ b/Plan/common/src/main/java/com/djrapitops/plan/storage/database/queries/LargeFetchQueries.java
@@ -18,7 +18,6 @@ package com.djrapitops.plan.storage.database.queries;
import com.djrapitops.plan.gathering.domain.TPS;
import com.djrapitops.plan.gathering.domain.builders.TPSBuilder;
-import com.djrapitops.plan.storage.database.sql.tables.CommandUseTable;
import com.djrapitops.plan.storage.database.sql.tables.ServerTable;
import com.djrapitops.plan.storage.database.sql.tables.TPSTable;
import com.djrapitops.plan.storage.database.sql.tables.WorldTable;
@@ -40,41 +39,6 @@ public class LargeFetchQueries {
/* Static method class */
}
- /**
- * Query database for all command usage data.
- *
- * @return Multi map: Server UUID - (Command name - Usage count)
- */
- public static Query