/* $Id: GameEvent.java,v 1.6 2010/09/19 02:22:44 nhnb Exp $ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.core.engine;
import marauroa.server.db.command.DBCommand;
import marauroa.server.db.command.DBCommandQueue;
import marauroa.server.game.dbcommand.LogGameEventCommand;
public class GameEvent {
public final String source;
public final String event;
public final String[] params;
public GameEvent(final String source, final String event, final String... params) {
this.source = source;
this.event = event;
this.params = params;
}
public void raise() {
DBCommand command = new LogGameEventCommand(source, event, params);
DBCommandQueue.get().enqueue(command);
}
}