Posted March 1, 20169 yr Hello i am fairly new to modding and recently i have been trying to add a custom command to my mod. i have been using a tutorial at http://www.minecraftforge.net/wiki/Server_Command. How ever the variable icommandsender is causing problems. I have searched the net.minecraft files and cant work it out. The code is word for word of the tutorial
March 1, 20169 yr This looks outdated (unless you are yourself outdated). First: Please - use 1.8.9 If you do/will: (example) public class MyCommand extends CommandBase { @Override public String getCommandName() { return "mycommand"; } @Override public void processCommand(ICommandSender ics, String[] args) throws CommandException {} } public static void init(FMLServerStartingEvent event) { event.registerServerCommand(new MyCommand()); } 1.7.10 is no longer supported by forge, you are on your own.
March 2, 20169 yr Author This looks outdated (unless you are yourself outdated). First: Please - use 1.8.9 If you do/will: (example) public class MyCommand extends CommandBase { @Override public String getCommandName() { return "mycommand"; } @Override public void processCommand(ICommandSender ics, String[] args) throws CommandException {} } public static void init(FMLServerStartingEvent event) { event.registerServerCommand(new MyCommand()); } Thanks an was using 1.8.9
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.