Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- private static GroupManager groupManager;
- public static List<Command> commands;
- public Main() { }
- @SuppressWarnings("unused")
- public static void main(String args[]) throws Exception {
- Logger info = new Logger("i");
- Logger err = new Logger("e");
- Logger warn = new Logger("w");
- info.send("Master startet...");
- new FileManager().create();
- groupManager = new GroupManager();
- new Logger().send("\n" +
- " _________ ________ ________ \r\n" +
- "|\\___ ___\\ |\\ __ \\ |\\ ____\\ \r\n" +
- "\\|___ \\ \\_| \\ \\ \\|\\ /_ \\ \\ \\___| \r\n" +
- " \\ \\ \\ \\ \\ __ \\ \\ \\ \\ \r\n" +
- " \\ \\ \\ __\\ \\ \\|\\ \\ __\\ \\ \\____ \r\n" +
- " \\ \\__\\\\__\\ \\_______\\\\__\\ \\_______\\\r\n" +
- " \\|__\\|__|\\|_______\\|__|\\|_______|\r\n" +
- " ");
- info.send("Master wurde gestartet...");
- registerCommands();
- }
- private static void registerCommands() {
- addCommands(new StopCommand());
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
- String line;
- while((line = reader.readLine()) != null) {
- if(line.length() != 0) {
- for(Command command : commands) {
- command.execute(line.split(" "));
- }
- }
- }
- } catch(Exception e) { new Logger("e").send(e.getMessage()); }
- }
- private static void addCommands(Command command) {
- commands.add(command);
- }
- public GroupManager getGroupManager() {
- return groupManager;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement