Class AbstractBotEvent

java.lang.Object
org.spongepowered.api.event.impl.AbstractEvent
me.dreamvoid.miraimc.sponge.event.bot.AbstractBotEvent
All Implemented Interfaces:
org.spongepowered.api.event.Event
Direct Known Subclasses:
MiraiBotAvatarChangedEvent, MiraiBotInvitedJoinGroupRequestEvent, MiraiBotNickChangedEvent, MiraiBotOfflineEvent, MiraiBotOnlineEvent, MiraiBotReloginEvent, MiraiMemberJoinRequestEvent, MiraiNewFriendRequestEvent, MiraiSignEvent

public abstract class AbstractBotEvent extends org.spongepowered.api.event.impl.AbstractEvent
(Sponge) Bot(抽象)
  • Field Summary

    Fields inherited from class org.spongepowered.api.event.impl.AbstractEvent

    currentOrder
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractBotEvent(net.mamoe.mirai.event.events.BotEvent event, org.spongepowered.api.event.Cause cause)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull org.spongepowered.api.event.Cause
     
    获取机器人实例
    long
    获取机器人账号
    int
    获取哈希值
    获取机器人昵称
    获取原始事件内容
    [!]

    Methods inherited from class org.spongepowered.api.event.impl.AbstractEvent

    init

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.spongepowered.api.event.Event

    context, source
  • Constructor Details

    • AbstractBotEvent

      public AbstractBotEvent(net.mamoe.mirai.event.events.BotEvent event, org.spongepowered.api.event.Cause cause)
  • Method Details

    • getBotID

      public long getBotID()
      获取机器人账号
      Returns:
      机器人账号
    • getNick

      public String getNick()
      获取机器人昵称
      Returns:
      机器人昵称
    • getBot

      public MiraiBot getBot()
      获取机器人实例
      Returns:
      机器人实例
    • toString

      public String toString()
      获取原始事件内容
      [!] 不推荐使用
      Overrides:
      toString in class Object
      Returns:
      原始事件内容
    • getHashCode

      public int getHashCode()
      获取哈希值
      Returns:
      哈希值
    • cause

      @NotNull public @NotNull org.spongepowered.api.event.Cause cause()