![]()
You just need to annotate the handling method with the annotation. Similar to how the preInit() and i nit() methods are put into the main class (or common proxy) of your mod, there is another "FML life cycle event" called the FMLServerStartingEvent that makes a good place to register the server commands. #MINECRAFT SERVER COMMANDS 1.7 10 MOD#Register Command In FMLServerStartingEvent In Your Main Mod Class Tip: It is usually a good idea to send chat messages to indicate the success or failure of the command. If I find that there is an entity registered with that name I will spawn it at the player location, otherwise I post an error message to the chat. In my case I am using the additional text argument of the command and using it to look up registered entities. The "real work" of the command happens in the processCommand() method. For example, in this case in addition to the command itself I wanted to pass an additional text argument (in my case the name of the entity). The getCommandUsage() is important as it defines the format of the command. In my case I wanted all users to be allowed so I returned true. The canCommandSenderUseCommand() method can be used to filter out which users are allowed to use the command. Tip: People often use aliases to allow for abbreviated command names. These aliases should be added in the command class constructor.The actual command name is specified by the getCommandName() method, but you can also add aliases (other words that will also act to invoke the command). #MINECRAFT SERVER COMMANDS 1.7 10 DOWNLOAD#Speedster Heropack Mod (1.7.10) Download Links For Minecraft 1.7.10. ![]() Drag Heropack to the folder (do not unzip the file).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |