mercredi 6 mai 2015

Minecraft like command system

I am making modifications to this popular java game Minecraft, better known as "hack client". I am trying to make a efficient and fast command system / API for the client, to be able to "command" the hack client using the Minecraft built-in chat. Example: -help or -toggle mod Sprint.

I know MC has a command system, but I don't wanna use it for numerous reasons.

I have looked for Java command parsing libraries, but they won't work with the Minecraft chat as I would need to most likely use the main method (public static void main) for them?

I know where to get the text that is going to be sent and cancelling sending it if it starts with my prefix -. But it is a single String and I guess parsing it to arguments would be string.split(" ")?

This is what I need help with: Easily creating commands, parsing the text that is entered, and performing commands. Would I need to make my own "API"? Is there any tutorials for something like this or would I need to just figure out everything from scratch?

Aucun commentaire:

Enregistrer un commentaire