Search in sources :

Example 1 with ChatQueueEntry

use of com.karanumcoding.adamantineshield.db.queue.ChatQueueEntry in project AdamantineShield by Karanum.

the class ChatListener method onChatCommandEvent.

@Listener
public void onChatCommandEvent(SendCommandEvent e, @Root Player p) {
    if (!logCommands)
        return;
    String command = e.getCommand();
    if (!e.getArguments().isEmpty()) {
        command += " " + e.getArguments();
    }
    db.addToQueue(new ChatQueueEntry(p, ChatType.COMMAND, command, new Date().getTime()));
}
Also used : ChatQueueEntry(com.karanumcoding.adamantineshield.db.queue.ChatQueueEntry) Date(java.util.Date) Listener(org.spongepowered.api.event.Listener)

Aggregations

ChatQueueEntry (com.karanumcoding.adamantineshield.db.queue.ChatQueueEntry)1 Date (java.util.Date)1 Listener (org.spongepowered.api.event.Listener)1