Implemented Command Processor (#375)

* Added CommandConsole and CommandProcessor Interface

* Added two commands, ListPlayers and Stop

* Registered commands with CommandConsole

* Added request for console from main.

Made help prompt not print after requesting help...

* Moved some files around

You didn't see anything

* Bug fix

* swap `break;` for `continue;`

* *cough* bug fix
This commit is contained in:
Damion
2020-02-16 05:47:56 +11:00
committed by GitHub
parent 02c7c30582
commit 9b220ec47c
5 changed files with 145 additions and 0 deletions
@@ -13,6 +13,7 @@ import org.apache.mina.common.IoAcceptor;
import org.apache.mina.transport.socket.nio.SocketAcceptor;
import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
import com.rebotted.console.CommandConsole;
import com.rebotted.event.CycleEventHandler;
import com.rebotted.game.content.minigames.FightCaves;
import com.rebotted.game.content.minigames.FightPits;
@@ -213,6 +214,8 @@ public class GameEngine {
}
}, 0, GameConstants.CYCLE_TIME, TimeUnit.MILLISECONDS);
CommandConsole.getInstance();
try {
while (!scheduler.awaitTermination(60, TimeUnit.SECONDS)) {
// TODO