30 lines
678 B
Java
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();
|
|
}
|
|
|
|
}
|