|
|
|
@@ -6,62 +6,62 @@ import cn.hamster3.mc.plugin.ball.common.event.server.ServerOfflineEvent;
|
|
|
|
|
import cn.hamster3.mc.plugin.ball.common.event.server.ServerOnlineEvent;
|
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
|
|
|
|
|
|
public abstract class BallListener {
|
|
|
|
|
public interface BallListener {
|
|
|
|
|
/**
|
|
|
|
|
* 该监听器的执行优先级
|
|
|
|
|
*
|
|
|
|
|
* @return 优先级
|
|
|
|
|
*/
|
|
|
|
|
public ListenerPriority getPriority() {
|
|
|
|
|
default ListenerPriority getPriority() {
|
|
|
|
|
return ListenerPriority.NORMAL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onConnectActive() {
|
|
|
|
|
default void onConnectActive() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onMessageReceived(@NotNull BallMessageInfo event) {
|
|
|
|
|
default void onMessageReceived(@NotNull BallMessageInfo event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onMessageSend(@NotNull BallMessageInfo event) {
|
|
|
|
|
default void onMessageSend(@NotNull BallMessageInfo event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onConnectException(Throwable throwable) {
|
|
|
|
|
default void onConnectException(Throwable throwable) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onServiceDead() {
|
|
|
|
|
default void onServiceDead() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onBallPlayerPreLogin(@NotNull BallPlayerPreLoginEvent event) {
|
|
|
|
|
default void onBallPlayerPreLogin(@NotNull BallPlayerPreLoginEvent event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onBallPlayerLogin(@NotNull BallPlayerLoginEvent event) {
|
|
|
|
|
default void onBallPlayerLogin(@NotNull BallPlayerLoginEvent event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onBallPlayerPostLogin(@NotNull BallPlayerPostLoginEvent event) {
|
|
|
|
|
default void onBallPlayerPostLogin(@NotNull BallPlayerPostLoginEvent event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onBallPlayerPreConnectServer(@NotNull BallPlayerPreConnectServerEvent event) {
|
|
|
|
|
default void onBallPlayerPreConnectServer(@NotNull BallPlayerPreConnectServerEvent event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onBallPlayerConnectServer(@NotNull BallPlayerConnectServerEvent event) {
|
|
|
|
|
default void onBallPlayerConnectServer(@NotNull BallPlayerConnectServerEvent event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onBallPlayerPostConnectServer(@NotNull BallPlayerPostConnectServerEvent event) {
|
|
|
|
|
default void onBallPlayerPostConnectServer(@NotNull BallPlayerPostConnectServerEvent event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onBallPlayerLogout(@NotNull BallPlayerLogoutEvent event) {
|
|
|
|
|
default void onBallPlayerLogout(@NotNull BallPlayerLogoutEvent event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onBallPlayerInfoUpdate(@NotNull BallPlayerInfoUpdateEvent event) {
|
|
|
|
|
default void onBallPlayerInfoUpdate(@NotNull BallPlayerInfoUpdateEvent event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onBallPlayerChat(@NotNull BallPlayerChatEvent event) {
|
|
|
|
|
default void onBallPlayerChat(@NotNull BallPlayerChatEvent event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onServerOnline(@NotNull ServerOnlineEvent event) {
|
|
|
|
|
default void onServerOnline(@NotNull ServerOnlineEvent event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onServerOffline(@NotNull ServerOfflineEvent event) {
|
|
|
|
|
default void onServerOffline(@NotNull ServerOfflineEvent event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|