diff --git a/src/main/java/minevalley/core/api/Core.java b/src/main/java/minevalley/core/api/Core.java index 9ad74893..790ea7d5 100644 --- a/src/main/java/minevalley/core/api/Core.java +++ b/src/main/java/minevalley/core/api/Core.java @@ -4,10 +4,6 @@ import minevalley.core.api.armorstand.FakeArmorStand; import minevalley.core.api.corporations.Group; import minevalley.core.api.corporations.companies.*; -import minevalley.core.api.database.DatabaseEntry; -import minevalley.core.api.database.DatabaseEntryCollection; -import minevalley.core.api.database.DatabaseTable; -import minevalley.core.api.database.Value; import minevalley.core.api.discord.EmbeddedMessage; import minevalley.core.api.discord.Webhook; import minevalley.core.api.economy.BankAccount; diff --git a/src/main/java/minevalley/core/api/CoreServer.java b/src/main/java/minevalley/core/api/CoreServer.java index 44e6ff16..dbe54945 100644 --- a/src/main/java/minevalley/core/api/CoreServer.java +++ b/src/main/java/minevalley/core/api/CoreServer.java @@ -4,10 +4,6 @@ import minevalley.core.api.armorstand.FakeArmorStand; import minevalley.core.api.corporations.Group; import minevalley.core.api.corporations.companies.*; -import minevalley.core.api.database.DatabaseEntry; -import minevalley.core.api.database.DatabaseEntryCollection; -import minevalley.core.api.database.DatabaseTable; -import minevalley.core.api.database.Value; import minevalley.core.api.discord.EmbeddedMessage; import minevalley.core.api.discord.Webhook; import minevalley.core.api.economy.BankAccount; diff --git a/src/main/java/minevalley/core/api/database/DatabaseEntry.java b/src/main/java/minevalley/core/api/database/DatabaseEntry.java deleted file mode 100644 index f93a8a09..00000000 --- a/src/main/java/minevalley/core/api/database/DatabaseEntry.java +++ /dev/null @@ -1,134 +0,0 @@ -package minevalley.core.api.database; - -import minevalley.core.api.Registrant; -import org.bukkit.Location; -import org.bukkit.block.Block; -import org.bukkit.inventory.ItemStack; - -import java.sql.Array; - -public interface DatabaseEntry { - - /** - * Removes the specific database entry from the table. - */ - void remove(); - - /** - * Checks if the database-entry exists. - * - * @return true if the selected database entry exists in the table - */ - boolean exists(); - - /** - * Changes a value of the selected entry. - * - * @param value value object with the column and the new value - */ - void changeValue(Value value); - - /** - * Gets the string at the given column. - * - * @param column name of the column - * @return string at given column from the selected database entry - */ - String getString(String column); - - /** - * Gets the integer at the given column. - * - * @param column name of the column - * @return integer at given column from the selected database entry - */ - int getInteger(String column); - - /** - * Gets the boolean at the given column. - * - * @param column name of the column - * @return boolean at given column from the selected database entry - */ - boolean getBoolean(String column); - - /** - * Gets the double at the given column. - * - * @param column name of the column - * @return double at given column from the selected database entry - */ - double getDouble(String column); - - /** - * Gets the float at the given column. - * - * @param column name of the column - * @return float at given column from the selected database entry - */ - float getFloat(String column); - - /** - * Gets the long at the given column. - * - * @param column name of the column - * @return long at given column from the selected database entry - */ - long getLong(String column); - - /** - * Gets the byte at the given column. - * - * @param column name of the column - * @return byte at given column from the selected database entry - */ - byte getByte(String column); - - /** - * Gets the array at the given column. - * - * @param column name of the column - * @return array at given column from the selected database entry - */ - Array getArray(String column); - - /** - * Gets the location at the given column (with pitch & yaw). - * - * @param column name of the column - * @return location at given column from the selected database entry - */ - Location getLocation(String column); - - /** - * Gets the block at the given column. - * - * @param column name of the column - * @return block at given column from the selected database entry - */ - Block getBlock(String column); - - /** - * Gets the registrant at the given column. - * - * @param column name of the column - * @return registrant at given column from the selected database entry - */ - Registrant getRegistrant(String column); - - /** - * Gets the itemstack at the given column. - * - * @param column name of the column - * @return itemstack at given column from the selected database entry - */ - ItemStack getItemStack(String column); - - /** - * Gets the itemstack[] at the given column. - * - * @param column name of the column - * @return itemstack[] at given column from the selected database entry - */ - ItemStack[] getItemStacks(String column); -} \ No newline at end of file diff --git a/src/main/java/minevalley/core/api/database/DatabaseEntryCollection.java b/src/main/java/minevalley/core/api/database/DatabaseEntryCollection.java deleted file mode 100644 index 327c7196..00000000 --- a/src/main/java/minevalley/core/api/database/DatabaseEntryCollection.java +++ /dev/null @@ -1,18 +0,0 @@ -package minevalley.core.api.database; - -import java.util.List; - -public interface DatabaseEntryCollection { - - /** - * Gets a list of all entries in this collection. - * - * @return list of database entries - */ - List getEntries(); - - /** - * Removes every single entry of this collection from the database. - */ - void remove(); -} \ No newline at end of file diff --git a/src/main/java/minevalley/core/api/database/DatabaseTable.java b/src/main/java/minevalley/core/api/database/DatabaseTable.java deleted file mode 100644 index 8b54e8a4..00000000 --- a/src/main/java/minevalley/core/api/database/DatabaseTable.java +++ /dev/null @@ -1,25 +0,0 @@ -package minevalley.core.api.database; - -import java.util.List; - -public interface DatabaseTable { - - /** - * Gets all entries in the table - * - * @return list of all database-entries - */ - List getEntries(); - - /** - * Removes all entries from this table - */ - void clear(); - - /** - * Adds a new entry with the given values into the table - * - * @param entries values and their target column - */ - void addEntry(Value... entries); -} \ No newline at end of file diff --git a/src/main/java/minevalley/core/api/database/Value.java b/src/main/java/minevalley/core/api/database/Value.java deleted file mode 100644 index 880c2315..00000000 --- a/src/main/java/minevalley/core/api/database/Value.java +++ /dev/null @@ -1,12 +0,0 @@ -package minevalley.core.api.database; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public final class Value { - - private final String column; - private final Object value; -} \ No newline at end of file diff --git a/src/main/java/minevalley/core/api/events/StatisticCreateEvent.java b/src/main/java/minevalley/core/api/events/StatisticCreateEvent.java index 734c7a79..41402928 100644 --- a/src/main/java/minevalley/core/api/events/StatisticCreateEvent.java +++ b/src/main/java/minevalley/core/api/events/StatisticCreateEvent.java @@ -1,8 +1,6 @@ package minevalley.core.api.events; import lombok.RequiredArgsConstructor; -import minevalley.core.api.database.DatabaseEntry; -import minevalley.core.api.database.Value; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; diff --git a/src/main/java/minevalley/core/api/users/OnTimeHandler.java b/src/main/java/minevalley/core/api/users/OnTimeHandler.java index 3fd9351d..3d0d9e63 100644 --- a/src/main/java/minevalley/core/api/users/OnTimeHandler.java +++ b/src/main/java/minevalley/core/api/users/OnTimeHandler.java @@ -1,7 +1,6 @@ package minevalley.core.api.users; import lombok.Setter; -import minevalley.core.api.database.Value; import java.time.LocalDate; import java.util.Map;