ingame consol??

how would i create so players can for example do commands like /help /commands /tp x y z

It’s a text box that waits for enter/return to be pressed and then parses a line of input and does something accordingly.

ok that helps little bit thanks =D

BurntPizza is absolutely correct.

But for questions like these, we’re going to need a lot more info- what are you programming your game in? What have you tried so far? What exactly are you confused about?

It’s hard to answer general “how do I do this” type questions other than by pointing you to google.

That’s why I go for the meta-answer, the only person capable of the actual answer is the person asking most of the time, they just don’t realize it yet.

you could setup a [icode]HashMap<String,Runnable>[/icode], fetch with the given user input string as BurntPizza said and [icode].run()[/icode] it.

That assumes none of the commands take arguments, but a more elaborate solution would be based on that.


mapping.get(first word of input).call(other words of input as args);

first you call … [icode]main(String[] args)[/icode]

:wink: