The part I seem to be having an issue with is as follows
java.lang.NoClassDefFoundError: net/minecraft/command/ICommand
Tools.java
package ayeso.mods;
import net.minecraft.server.MinecraftServer;
import net.minecraft.command.ServerCommandManager;
import net.minecraft.command.ICommand;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.ServerStarting;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.network.NetworkMod;
@Mod(modid="Tools", name="Ayesos Tools", version="0.1")
@NetworkMod(clientSideRequired=false, serverSideRequired=false)
public class Tools {
public static MinecraftServer server;
@Init
public void Init(FMLInitializationEvent event)
{
}
@ServerStarting
public void serverStarting(FMLServerStartingEvent event)
{
server = FMLCommonHandler.instance().getMinecraftServerInstance();
ServerCommandManager manager = (ServerCommandManager)server.getCommandManager();
manager.registerCommand(new TestCommand());
System.out.println("Registered 1 commands");
}
}
TestCommand.java
package ayeso.mods;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.src.ModLoader;
import cpw.mods.fml.common.FMLCommonHandler;
public class TestCommand extends CommandBase
{
public String getCommandName()
{
return "TestCommand";
}
@Override
public void processCommand(ICommandSender sender, String[] args)
{
System.out.println("Hello World");
}
}