package com.volumetricpixels.vitals.main;

import org.spout.api.command.annotated.AnnotatedCommandRegistrationFactory;
import org.spout.api.command.annotated.SimpleInjector;
import org.spout.api.plugin.CommonPlugin;

import com.volumetricpixels.vitals.main.commands.AdminCommands;
import com.volumetricpixels.vitals.main.commands.GeneralCommands;
import com.volumetricpixels.vitals.main.configuration.VitalsConfiguration;

public class Vitals extends CommonPlugin {

        private VitalsConfiguration config;

        @Override
        public void onDisable() {
                getLogger().info("[Vitals] v" + getDescription().getVersion() + " disabled!");
        }

        @Override
        public void onEnable() {
                config = new VitalsConfiguration(getDataFolder());

		// Register commands.
                AnnotatedCommandRegistrationFactory commandRegistration = new AnnotatedCommandRegistrationFactory(new SimpleInjector(this));
                getEngine().getRootCommand().addSubCommands(this, AdminCommands.class, commandRegistration);
                getEngine().getRootCommand().addSubCommands(this, GeneralCommands.class, commandRegistration);

                getLogger().info("[Vitals] v" + getDescription().getVersion() + " enabled!");
        }

        public VitalsConfiguration getConfig() {
                return config;
        }

}
@@ -340,32 +340,167 @@
 neralCommands;%0D%0A
+import com.volumetricpixels.vitals.main.commands.ProtectionCommands;%0D%0Aimport com.volumetricpixels.vitals.main.commands.WorldCommands;%0D%0A
 import com.volum
@@ -1328,16 +1328,241 @@
 ation);%0D
+%0A                getEngine().getRootCommand().addSubCommands(this, ProtectionCommands.class, commandRegistration);%0D%0A                getEngine().getRootCommand().addSubCommands(this, WorldCommands.class, commandRegistration);%0D
 %0A%0D%0A     

Add registration of world + protection cmds