diff --git a/src/main/java/minevalley/core/api/Core.java b/src/main/java/minevalley/core/api/Core.java index 790ea7d..4b1e88d 100644 --- a/src/main/java/minevalley/core/api/Core.java +++ b/src/main/java/minevalley/core/api/Core.java @@ -314,91 +314,6 @@ public static void sendDebug(@Nonnull DebugType type, @Nonnull String message) { server.sendDebug(type, removeColorCodes(message)); } - /** - * Gets the specific database-entry from the specified table with the specified value in the column. - * If there are more than one entry, that math the given description, this gets the first one. - * If you want to get multiple entries, use database-collection, or database-table! - * - * @param tableName name of the table as string - * @param searchValue value according to which the entries are filtered in a specific column - * @return the first database-entry that matches the given description - */ - public static DatabaseEntry getDatabaseEntry(String tableName, Value searchValue) { - return server.getDatabaseEntry(tableName, searchValue); - } - - /** - * Gets the specific database-entry from the specified table with the specified value in the column. - * If there are more than one entry, that math the given description, this gets the first one. - * If you want to get multiple entries, use database-collection, or database-table! - * - * @param tableName name of the table as string - * @param searchValues value according to which the entries are filtered in a specific column - * @return the first database-entry that matches the given description - */ - public static DatabaseEntry getDatabaseEntryAnd(String tableName, Value... searchValues) { - return server.getDatabaseEntryAnd(tableName, searchValues); - } - - /** - * Gets the specific database-entry from the specified table with the specified value in the column. - * If there are more than one entry, that math the given description, this gets the first one. - * If you want to get multiple entries, use database-collection, or database-table! - * - * @param tableName name of the table as string - * @param searchValues value according to which the entries are filtered in a specific column - * @return the first database-entry that matches the given description - */ - public static DatabaseEntry getDatabaseEntryOr(String tableName, Value... searchValues) { - return server.getDatabaseEntryOr(tableName, searchValues); - } - - /** - * Gets a database-collection from the specified table with the specified value in the column. - * This gets all the entries that match the description. If you're searching for one single entry, use database-entry! - * - * @param tableName name of the table as string - * @param searchValue value according to which the entries are filtered in a specific column - * @return a collection of all database-entries in this table, that matches the given description - */ - public static DatabaseEntryCollection getDatabaseEntryCollection(String tableName, Value searchValue) { - return server.getDatabaseEntryCollection(tableName, searchValue); - } - - /** - * Gets a database-collection from the specified table with the specified value in the column. - * This gets all the entries that match the description. If you're searching for one single entry, use database-entry! - * - * @param tableName name of the table as string - * @param searchValues value according to which the entries are filtered in a specific column - * @return a collection of all database-entries in this table, that matches the given description - */ - public static DatabaseEntryCollection getDatabaseEntryCollectionAnd(String tableName, Value... searchValues) { - return server.getDatabaseEntryCollectionAnd(tableName, searchValues); - } - - /** - * Gets a database-collection from the specified table with the specified value in the column. - * This gets all the entries that match the description. If you're searching for one single entry, use database-entry! - * - * @param tableName name of the table as string - * @param searchValues value according to which the entries are filtered in a specific column - * @return a collection of all database-entries in this table, that matches the given description - */ - public static DatabaseEntryCollection getDatabaseEntryCollectionOr(String tableName, Value... searchValues) { - return server.getDatabaseEntryCollectionOr(tableName, searchValues); - } - - /** - * Gets the database-table with the specific name. - * - * @param tableName name of the database-table - * @return database-table with specific name - */ - public static DatabaseTable getDatabaseTable(String tableName) { - return server.getDatabaseTable(tableName); - } - /** * Sets the setting with the given key. *

diff --git a/src/main/java/minevalley/core/api/CoreServer.java b/src/main/java/minevalley/core/api/CoreServer.java index dbe5494..94a8b2d 100644 --- a/src/main/java/minevalley/core/api/CoreServer.java +++ b/src/main/java/minevalley/core/api/CoreServer.java @@ -107,20 +107,6 @@ public interface CoreServer { void sendDebug(@Nonnull DebugType type, @Nonnull String message); - DatabaseEntry getDatabaseEntry(String tableName, Value searchValue); - - DatabaseEntry getDatabaseEntryAnd(String tableName, Value... searchValues); - - DatabaseEntry getDatabaseEntryOr(String tableName, Value... searchValues); - - DatabaseEntryCollection getDatabaseEntryCollection(String tableName, Value searchValue); - - DatabaseEntryCollection getDatabaseEntryCollectionAnd(String tableName, Value... searchValues); - - DatabaseEntryCollection getDatabaseEntryCollectionOr(String tableName, Value... searchValues); - - DatabaseTable getDatabaseTable(String tableName); - void setSetting(@Nonnull String key, @Nonnull String value) throws IllegalArgumentException; String getSetting(String key); diff --git a/src/main/java/minevalley/core/api/events/StatisticCreateEvent.java b/src/main/java/minevalley/core/api/events/StatisticCreateEvent.java index 4140292..d63ac32 100644 --- a/src/main/java/minevalley/core/api/events/StatisticCreateEvent.java +++ b/src/main/java/minevalley/core/api/events/StatisticCreateEvent.java @@ -7,18 +7,14 @@ @RequiredArgsConstructor public class StatisticCreateEvent extends Event { - public static final HandlerList HANDLER_LIST = new HandlerList(); + // TODO 29.12.2024: recently removed DatabaseEntry object due to rework of database util might not work anymore (StatisticCreateEvent) - private final DatabaseEntry entry; + public static final HandlerList HANDLER_LIST = new HandlerList(); public static HandlerList getHandlerList() { return HANDLER_LIST; } - public void setStatistic(String key, double value) { - entry.changeValue(new Value(key, value)); - } - @Override public HandlerList getHandlers() { return HANDLER_LIST;