Files
DarkRP2D/core/src/com/darkrp2d/input/CommandStream.java
2017-10-13 18:55:50 +02:00

30 lines
678 B
Java

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.darkrp2d.input;
import com.darkrp2d.input.commands.Command;
import java.util.LinkedList;
import java.util.Queue;
/**
*
* @author gulum
*/
public class CommandStream {
private static Queue<Command> commandStream = new LinkedList<Command>();
public static boolean registerCommand(Command com) {
return commandStream.offer(com);
}
public static Command pollCommand() {
return commandStream.poll();
}
}