mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Add ChannelSettings, allow commands to be disabled
This commit is contained in:
1 parent
349fa385e8
commit
addef98b8e
20 files changed
+255
-159
No files matched your search
@@ -39,6 +39,7 @@ public final class CarbonChat extends JavaPlugin {
|
||||
|
||||
private YamlConfiguration modConfig;
|
||||
private YamlConfiguration languageConfig;
|
||||
private YamlConfiguration commandsConfig;
|
||||
|
||||
public static final LegacyComponentSerializer LEGACY =
|
||||
LegacyComponentSerializer.builder()
|
||||
@@ -65,6 +66,10 @@ public final class CarbonChat extends JavaPlugin {
|
||||
saveResource("language.yml", false);
|
||||
}
|
||||
|
||||
if (!(new File(getDataFolder(), "commands.yml").exists())) {
|
||||
saveResource("commands.yml", false);
|
||||
}
|
||||
|
||||
loadModConfig();
|
||||
loadLanguage();
|
||||
|
||||
@@ -149,6 +154,7 @@ public final class CarbonChat extends JavaPlugin {
|
||||
|
||||
loadModConfig();
|
||||
loadLanguage();
|
||||
loadCommandsConfig();
|
||||
}
|
||||
|
||||
private void loadModConfig() {
|
||||
@@ -159,6 +165,10 @@ public final class CarbonChat extends JavaPlugin {
|
||||
languageConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "language.yml"));
|
||||
}
|
||||
|
||||
private void loadCommandsConfig() {
|
||||
commandsConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "commands.yml"));
|
||||
}
|
||||
|
||||
private void registerContexts() {
|
||||
getContextManager().register("distance", new DistanceContext());
|
||||
}
|
||||
@@ -167,6 +177,10 @@ public final class CarbonChat extends JavaPlugin {
|
||||
return modConfig;
|
||||
}
|
||||
|
||||
public YamlConfiguration getCommandsConfig() {
|
||||
return commandsConfig;
|
||||
}
|
||||
|
||||
public YamlConfiguration getLanguage() {
|
||||
return languageConfig;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user