mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-05 08:39:31 +00:00
Message Listener
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user