diff --git a/api/pom.xml b/api/pom.xml index aa33966..6b32c81 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -5,7 +5,7 @@ minesql-parent cc.carm.plugin - 1.2.1 + 1.2.2 4.0.0 diff --git a/core/pom.xml b/core/pom.xml index d4571ff..a870d51 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -5,7 +5,7 @@ minesql-parent cc.carm.plugin - 1.2.1 + 1.2.2 4.0.0 diff --git a/core/src/main/java/cc/carm/plugin/minesql/MineSQLRegistry.java b/core/src/main/java/cc/carm/plugin/minesql/MineSQLRegistry.java index a64e0f2..ab2c6e5 100644 --- a/core/src/main/java/cc/carm/plugin/minesql/MineSQLRegistry.java +++ b/core/src/main/java/cc/carm/plugin/minesql/MineSQLRegistry.java @@ -21,7 +21,9 @@ public class MineSQLRegistry implements SQLRegistry { @Override public @NotNull Optional<@Nullable SQLManager> getOptional(@Nullable String id) { - return Optional.of(this.managers.get(id)); + if (id != null) return Optional.of(this.managers.get(id)); + else if (managers.isEmpty()) return Optional.empty(); + else return Optional.ofNullable(managers.values().iterator().next()); } @Override diff --git a/platforms/bukkit/pom.xml b/platforms/bukkit/pom.xml index 896ac97..7eb3b6f 100644 --- a/platforms/bukkit/pom.xml +++ b/platforms/bukkit/pom.xml @@ -5,7 +5,7 @@ minesql-parent cc.carm.plugin - 1.2.1 + 1.2.2 ../../pom.xml 4.0.0 diff --git a/platforms/bungee/pom.xml b/platforms/bungee/pom.xml index eff5fb4..83e6bb0 100644 --- a/platforms/bungee/pom.xml +++ b/platforms/bungee/pom.xml @@ -5,7 +5,7 @@ minesql-parent cc.carm.plugin - 1.2.1 + 1.2.2 ../../pom.xml 4.0.0 diff --git a/platforms/velocity/pom.xml b/platforms/velocity/pom.xml index 28b923e..d1dc855 100644 --- a/platforms/velocity/pom.xml +++ b/platforms/velocity/pom.xml @@ -5,7 +5,7 @@ minesql-parent cc.carm.plugin - 1.2.1 + 1.2.2 ../../pom.xml 4.0.0 diff --git a/plugin/pom.xml b/plugin/pom.xml index d0db76b..87c7a6c 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -5,7 +5,7 @@ minesql-parent cc.carm.plugin - 1.2.1 + 1.2.2 4.0.0 diff --git a/pom.xml b/pom.xml index dc4bafe..be63d7b 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ cc.carm.plugin minesql-parent pom - 1.2.1 + 1.2.2 api core