mirror of
https://github.com/TotalFreedomMC/TF-Marriage.git
synced 2025-07-08 14:58:13 +00:00
Add reload command & remove ebean references
This commit is contained in:
parent
109cb00b6f
commit
7443277886
7 changed files with 32 additions and 134 deletions
|
@ -0,0 +1,29 @@
|
|||
package com.lenis0012.bukkit.marriage2.commands;
|
||||
|
||||
import com.lenis0012.bukkit.marriage2.Marriage;
|
||||
import com.lenis0012.bukkit.marriage2.config.Message;
|
||||
import com.lenis0012.bukkit.marriage2.config.Permissions;
|
||||
import com.lenis0012.bukkit.marriage2.config.Settings;
|
||||
import com.lenis0012.bukkit.marriage2.internal.MarriagePlugin;
|
||||
import com.lenis0012.pluginutils.modules.configuration.ConfigurationModule;
|
||||
|
||||
public class CommandReload extends Command {
|
||||
|
||||
public CommandReload(Marriage marriage) {
|
||||
super(marriage, "reload");
|
||||
|
||||
// Command options
|
||||
setDescription("Reload configuration settings");
|
||||
setPermission(Permissions.RELOAD);
|
||||
setAllowConsole(true);
|
||||
setHidden(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
MarriagePlugin plugin = (MarriagePlugin) marriage.getPlugin();
|
||||
ConfigurationModule module = plugin.getModule(ConfigurationModule.class);
|
||||
module.reloadSettings(Settings.class, false);
|
||||
reply(Message.CONFIG_RELOAD);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue