From 47ce85a1edc02b89626f8d5cca72a071157a315b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Mon, 24 Oct 2022 21:30:19 +0200 Subject: [PATCH] Fix another SQL error --- .../wtf/beatrice/nounspicker/commands/NounsCommand.java | 6 ++++++ .../wtf/beatrice/nounspicker/utils/DatabaseManager.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/wtf/beatrice/nounspicker/commands/NounsCommand.java b/src/main/java/wtf/beatrice/nounspicker/commands/NounsCommand.java index 578b2af..7ee5652 100644 --- a/src/main/java/wtf/beatrice/nounspicker/commands/NounsCommand.java +++ b/src/main/java/wtf/beatrice/nounspicker/commands/NounsCommand.java @@ -5,6 +5,8 @@ import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.jetbrains.annotations.NotNull; import wtf.beatrice.nounspicker.NounsPicker; +import wtf.beatrice.nounspicker.commands.subcommands.NounsCreateSubCommand; +import wtf.beatrice.nounspicker.commands.subcommands.NounsDeleteSubCommand; import wtf.beatrice.nounspicker.commands.subcommands.NounsSetSubCommand; public class NounsCommand implements CommandExecutor @@ -33,6 +35,10 @@ public class NounsCommand implements CommandExecutor { case "set": return NounsSetSubCommand.run(sender, args); + case "create": + return NounsCreateSubCommand.run(sender, args); + case "delete": + return NounsDeleteSubCommand.run(sender, args); } diff --git a/src/main/java/wtf/beatrice/nounspicker/utils/DatabaseManager.java b/src/main/java/wtf/beatrice/nounspicker/utils/DatabaseManager.java index b643cfd..6158e41 100644 --- a/src/main/java/wtf/beatrice/nounspicker/utils/DatabaseManager.java +++ b/src/main/java/wtf/beatrice/nounspicker/utils/DatabaseManager.java @@ -155,7 +155,7 @@ public class DatabaseManager } public int getHighestPronounId() { - String query = "SELECT id" + + String query = "SELECT id " + "FROM pronouns " + "ORDER BY id DESC " + "LIMIT 1";