LimitedCreative/src/main/java/de/jaschastarke/minecraft/limitedcreative/LimitedCreative.java

55 lines
1.6 KiB
Java
Raw Normal View History

package de.jaschastarke.minecraft.limitedcreative;
2013-02-01 21:25:43 +00:00
import de.jaschastarke.I18n;
import de.jaschastarke.bukkit.lib.Core;
import de.jaschastarke.bukkit.lib.PluginLang;
import de.jaschastarke.bukkit.lib.configuration.command.ConfigCommand;
public class LimitedCreative extends Core {
protected Config config = null;
2013-01-22 17:38:48 +00:00
protected MainCommand command = null;
@Override
2013-02-01 21:25:43 +00:00
public void onInitialize() {
super.onInitialize();
config = new Config(this);
2013-01-22 17:38:48 +00:00
setLang(new PluginLang("lang/messages", this));
command = new MainCommand(this);
2013-02-01 21:25:43 +00:00
ConfigCommand cc = new ConfigCommand(config, Permissions.CONFIG);
cc.setPackageName(this.getName() + " - " + this.getLocale().trans(cc.getPackageName()));
command.registerCommand(cc);
2013-01-22 17:38:48 +00:00
commands.registerCommand(command);
Hooks.inizializeHooks(this);
2013-01-22 17:38:48 +00:00
addModule(new FeatureSwitchGameMode(this));
addModule(new ModInventories(this));
addModule(new ModCreativeLimits(this));
addModule(new ModRegions(this));
addModule(new ModCmdBlocker(this));
2013-02-01 21:25:43 +00:00
addModule(new FeatureMetrics(this));
config.setModuleStates();
2013-01-22 17:38:48 +00:00
config.saveDefault();
}
2013-02-01 21:25:43 +00:00
@Override
public boolean isDebug() {
return config.getDebug();
}
public Config getPluginConfig() {
return config;
}
2013-02-01 21:25:43 +00:00
public I18n getLocale() {
2013-01-22 17:38:48 +00:00
return getLang();
}
public MainCommand getMainCommand() {
return command;
}
}