From 0a385ef6fb76761078bd888ad4b7c8d742120cd8 Mon Sep 17 00:00:00 2001 From: Adrian Date: Mon, 18 Dec 2023 22:09:19 -0500 Subject: [PATCH] feat(docs): Improved javadocs documentation --- .../authmevelocity/api/paper/event/LoginByProxyEvent.java | 3 ++- .../api/velocity/event/PreSendOnLoginEvent.java | 4 ++++ .../api/velocity/event/ProxyForcedUnregisterEvent.java | 5 ++++- .../authmevelocity/api/velocity/event/ProxyLoginEvent.java | 1 + .../authmevelocity/api/velocity/event/ProxyLogoutEvent.java | 5 ++++- .../api/velocity/event/ProxyRegisterEvent.java | 5 ++++- .../api/velocity/event/ProxyUnregisterEvent.java | 5 ++++- 7 files changed, 23 insertions(+), 5 deletions(-) diff --git a/api/paper/src/main/java/io/github/_4drian3d/authmevelocity/api/paper/event/LoginByProxyEvent.java b/api/paper/src/main/java/io/github/_4drian3d/authmevelocity/api/paper/event/LoginByProxyEvent.java index de92678..623f043 100644 --- a/api/paper/src/main/java/io/github/_4drian3d/authmevelocity/api/paper/event/LoginByProxyEvent.java +++ b/api/paper/src/main/java/io/github/_4drian3d/authmevelocity/api/paper/event/LoginByProxyEvent.java @@ -17,6 +17,7 @@ package io.github._4drian3d.authmevelocity.api.paper.event; +import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; import org.bukkit.event.player.PlayerEvent; @@ -36,7 +37,7 @@ public final class LoginByProxyEvent extends PlayerEvent { * @param who the player to be logged in */ public LoginByProxyEvent(@NotNull Player who) { - super(who); + super(who, !Bukkit.isPrimaryThread()); } @Override diff --git a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/PreSendOnLoginEvent.java b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/PreSendOnLoginEvent.java index 62502af..f9b8634 100644 --- a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/PreSendOnLoginEvent.java +++ b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/PreSendOnLoginEvent.java @@ -67,6 +67,10 @@ public final class PreSendOnLoginEvent implements ResultedEvent { return this.actualServer; } + /** + * Obtain the result of the event + * @return the event server result + */ @Override public @NotNull ServerResult getResult() { return this.result; diff --git a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyForcedUnregisterEvent.java b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyForcedUnregisterEvent.java index 38b145d..1293dd5 100644 --- a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyForcedUnregisterEvent.java +++ b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyForcedUnregisterEvent.java @@ -20,5 +20,8 @@ package io.github._4drian3d.authmevelocity.api.velocity.event; import com.velocitypowered.api.proxy.Player; import org.jetbrains.annotations.Nullable; -/**Event executed in case a player is forced unregister by a server operator*/ +/** + * Event executed in case a player is forced unregister by a server operator + * @param player the player who has been forced unregister + * */ public record ProxyForcedUnregisterEvent(@Nullable Player player) {} diff --git a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyLoginEvent.java b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyLoginEvent.java index 134bd89..dbab17b 100644 --- a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyLoginEvent.java +++ b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyLoginEvent.java @@ -22,5 +22,6 @@ import org.jetbrains.annotations.NotNull; /** * Event executed in case the player is successfully logged in + * @param player the player who has logged in */ public record ProxyLoginEvent(@NotNull Player player) {} diff --git a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyLogoutEvent.java b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyLogoutEvent.java index a425891..bcfa741 100644 --- a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyLogoutEvent.java +++ b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyLogoutEvent.java @@ -20,5 +20,8 @@ package io.github._4drian3d.authmevelocity.api.velocity.event; import com.velocitypowered.api.proxy.Player; import org.jetbrains.annotations.NotNull; -/**Event executed in case the player has logout from the network */ +/** + * Event executed in case the player has logout from the network + * @param player the player who has logged out + * */ public record ProxyLogoutEvent(@NotNull Player player) {} diff --git a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyRegisterEvent.java b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyRegisterEvent.java index 4d9e63b..4dec422 100644 --- a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyRegisterEvent.java +++ b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyRegisterEvent.java @@ -20,5 +20,8 @@ package io.github._4drian3d.authmevelocity.api.velocity.event; import com.velocitypowered.api.proxy.Player; import org.jetbrains.annotations.NotNull; -/**Event executed in case the player has register itself*/ +/** + * Event executed in case the player has register itself + * @param player the player registered + * */ public record ProxyRegisterEvent(@NotNull Player player) {} diff --git a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyUnregisterEvent.java b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyUnregisterEvent.java index 23020f7..41bf433 100644 --- a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyUnregisterEvent.java +++ b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/event/ProxyUnregisterEvent.java @@ -20,5 +20,8 @@ package io.github._4drian3d.authmevelocity.api.velocity.event; import com.velocitypowered.api.proxy.Player; import org.jetbrains.annotations.NotNull; -/**Event executed in case the player has unregistered itself*/ +/** + * Event executed in case the player has unregistered itself + * @param player the player who has unregistered itself + * */ public record ProxyUnregisterEvent(@NotNull Player player) {}