本文整理汇总了Java中org.rev317.min.api.events.MessageEvent类的典型用法代码示例。如果您正苦于以下问题:Java MessageEvent类的具体用法?Java MessageEvent怎么用?Java MessageEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MessageEvent类属于org.rev317.min.api.events包,在下文中一共展示了MessageEvent类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: messageReceived
import org.rev317.min.api.events.MessageEvent; //导入依赖的package包/类
@Override
public void messageReceived(MessageEvent event) {
message = event.getMessage();
sender = event.getSender();
type = event.getType();
System.out.printf("\"%s\" from \"%s\" with type %d\n", message, sender, type);
}
示例2: messageReceived
import org.rev317.min.api.events.MessageEvent; //导入依赖的package包/类
@Override
public void messageReceived(MessageEvent event) {
message = event.getMessage();
sender = event.getSender();
type = event.getType();
System.out.printf("\"%s\" from \"%s\" and type %d\n", message, sender, type);
}
示例3: dispatch
import org.rev317.min.api.events.MessageEvent; //导入依赖的package包/类
public void dispatch(MessageEvent event) {
for (final MessageListener messageListener : messageListeners) {
messageListener.messageReceived(event);
}
}
示例4: messageListenerHook
import org.rev317.min.api.events.MessageEvent; //导入依赖的package包/类
public static final void messageListenerHook(int type, String name, String message) {
final MessageEvent messageEvent = new MessageEvent(type, name, message);
ScriptEngine.getInstance().dispatch(messageEvent);
}
示例5: messageReceived
import org.rev317.min.api.events.MessageEvent; //导入依赖的package包/类
void messageReceived(MessageEvent event);