Message Listener

This commit is contained in:
Clisprail
2014-05-05 14:13:28 +02:00
parent 137fc18f4e
commit 2a5937ebe5
4 changed files with 73 additions and 8 deletions
@@ -0,0 +1,36 @@
package org.rev317.min.api.events;
/**
*
* @author Everel, Matt
*
*/
public final class MessageEvent {
private int type;
private String name;
private String message;
public static final int TYPE_GENERIC = 0;
public static final int TYPE_PLAYER = 2;
public static final int TYPE_TRADE = 4;
public static final int TYPE_DUEL = 8;
public MessageEvent(final int type, String name, String msg) {
this.type = type;
this.name = name;
this.message = msg;
}
public final String getMessage() {
return message;
}
public final int getType() {
return type;
}
public final String getSender() {
return name;
}
}
@@ -0,0 +1,12 @@
package org.rev317.min.api.events.listeners;
import org.rev317.min.api.events.MessageEvent;
public interface MessageListener {
public void messageReceived(MessageEvent event);
}