1
mirror of https://github.com/CarmJos/MineSQL.git synced 2026-06-05 00:48:16 +08:00

fix(load): 修复插件加载时出现的问题

This commit is contained in:
2022-12-18 04:27:37 +08:00
parent 708d3f8f3f
commit fa30bdad81
7 changed files with 39 additions and 39 deletions
-6
View File
@@ -127,12 +127,6 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
@@ -14,14 +14,10 @@ import cc.carm.plugin.minesql.util.DBPropertiesUtil;
import co.aikar.commands.CommandManager;
import co.aikar.commands.InvalidCommandArgument;
import co.aikar.commands.Locales;
import com.google.common.collect.ImmutableList;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Properties;
import java.util.*;
import java.util.logging.Logger;
public class MineSQLCore implements IMineSQL {
@@ -126,8 +122,8 @@ public class MineSQLCore implements IMineSQL {
}
});
commandManager.getCommandCompletions().registerCompletion("sql-managers", c -> {
if (c.getIssuer().isPlayer()) return ImmutableList.of();
else return ImmutableList.copyOf(getRegistry().list().keySet());
if (c.getIssuer().isPlayer()) return Collections.emptyList();
else return getRegistry().list().keySet();
});
commandManager.registerCommand(new MineSQLCommand(this));
}
@@ -7,7 +7,6 @@ import cc.carm.plugin.minesql.api.SQLRegistry;
import cc.carm.plugin.minesql.api.source.SQLSourceConfig;
import cn.beecp.BeeDataSource;
import cn.beecp.BeeDataSourceConfig;
import com.google.common.collect.ImmutableMap;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Unmodifiable;
@@ -115,7 +114,7 @@ public class MineSQLRegistry implements SQLRegistry {
@Override
@Unmodifiable
public @NotNull Map<String, SQLManagerImpl> list() {
return ImmutableMap.copyOf(this.managers);
return Collections.unmodifiableMap(this.managers);
}
@Override