Archived
0

Fixed removing commands on reload

This commit is contained in:
Pepich
2018-03-12 03:29:33 +01:00
parent 452b738e2d
commit 2fde435e34
2 changed files with 11 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
command data {
import [string:file] as [string:module] {
run import_file file module;
run config_import_file file module;
type console;
}
}
@@ -11,11 +11,11 @@ command config {
alias settings;
perm datamanager.admin;
list {
run list;
run config_list;
help Lists all modules that have at least one config setting.;
}
list [string:module] {
run list2 module;
run config_list2 module;
help Lists all config settings of the specified module.;
}
get [string:module] [string:key] {
@@ -23,11 +23,11 @@ command config {
help Displays the value of the specified setting.;
}
set [string:module] [string:key] [string:value...] {
run set module key value;
run config_set module key value;
help Assigns a new value to the given setting.;
}
remove_all [string:module] {
run remove_all module;
run config_remove_all module;
type console;
help Deletes all config settings of a given module.;
}

View File

@@ -36,7 +36,7 @@ import com.redstoner.modules.Module;
@Commands(CommandHolderType.Stream)
@AutoRegisterListener
@Version(major = 4, minor = 1, revision = 8, compatible = 4)
@Version(major = 4, minor = 1, revision = 9, compatible = 4)
public final class DataManager implements CoreModule, Listener
{
protected final File dataFolder = new File(Main.plugin.getDataFolder(), "data");
@@ -734,14 +734,14 @@ public final class DataManager implements CoreModule, Listener
}
}
@Command(hook = "list")
@Command(hook = "config_list")
public boolean list(CommandSender sender)
{
getLogger().message(sender, Arrays.toString(module_index.toArray(new String[] {})));
return true;
}
@Command(hook = "list2")
@Command(hook = "config_list2")
public boolean list(CommandSender sender, String module)
{
Object o = config_data.get(module);
@@ -764,7 +764,7 @@ public final class DataManager implements CoreModule, Listener
return true;
}
@Command(hook = "get")
@Command(hook = "config_get")
public boolean get(CommandSender sender, String module, String key)
{
getLogger().message(sender, new String[] {"§e" + module + "." + key + "§7 currently holds the value:",
@@ -772,7 +772,7 @@ public final class DataManager implements CoreModule, Listener
return true;
}
@Command(hook = "set")
@Command(hook = "config_set")
public boolean set(CommandSender sender, String module, String key, String value)
{
if (setConfig_(module, key, value))
@@ -787,7 +787,7 @@ public final class DataManager implements CoreModule, Listener
return true;
}
@Command(hook = "remove_all")
@Command(hook = "config_remove_all")
public boolean remove_all(CommandSender sender, String module)
{
if (removeAllConfig_(module))