mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 12:25:46 +01:00
Handle db command args sanely
This commit is contained in:
parent
6d71e0f8be
commit
a0557112a1
@ -215,6 +215,7 @@ public class DatabaseCommand extends SubCommand {
|
||||
if (args.length < 6) {
|
||||
player.sendMessage(StaticCaption.of(
|
||||
"/plot database mysql [host] [port] [username] [password] [database] {prefix}"));
|
||||
return false;
|
||||
}
|
||||
String host = args[1];
|
||||
String port = args[2];
|
||||
@ -229,6 +230,7 @@ public class DatabaseCommand extends SubCommand {
|
||||
case "sqlite" -> {
|
||||
if (args.length < 2) {
|
||||
player.sendMessage(StaticCaption.of("/plot database sqlite [file]"));
|
||||
return false;
|
||||
}
|
||||
File sqliteFile =
|
||||
FileUtils.getFile(PlotSquared.platform().getDirectory(), args[1] + ".db");
|
||||
|
Loading…
Reference in New Issue
Block a user