diff options
author | Petr Ilin <hevav@hevav.dev> | 2022-12-25 20:40:31 +0300 |
---|---|---|
committer | Petr Ilin <hevav@hevav.dev> | 2022-12-25 20:40:31 +0300 |
commit | dbc5b3edc4d05fc7ea5820bb3c0c4daa736be177 (patch) | |
tree | bf04adbf0df6454e796b9ab832a5600c9a33c48b /src/main/java/net/elytrium/limboauth/event | |
parent | 07cf790e0f77f7ce77fabd9f6d3f87879987b14c (diff) | |
download | LimboAuth-dbc5b3edc4d05fc7ea5820bb3c0c4daa736be177.tar.gz LimboAuth-dbc5b3edc4d05fc7ea5820bb3c0c4daa736be177.tar.bz2 LimboAuth-dbc5b3edc4d05fc7ea5820bb3c0c4daa736be177.zip |
Password getter in PostEvent
Diffstat (limited to 'src/main/java/net/elytrium/limboauth/event')
3 files changed, 13 insertions, 6 deletions
diff --git a/src/main/java/net/elytrium/limboauth/event/PostAuthorizationEvent.java b/src/main/java/net/elytrium/limboauth/event/PostAuthorizationEvent.java index 0fed613..8449fa1 100644 --- a/src/main/java/net/elytrium/limboauth/event/PostAuthorizationEvent.java +++ b/src/main/java/net/elytrium/limboauth/event/PostAuthorizationEvent.java @@ -23,7 +23,7 @@ import net.elytrium.limboauth.model.RegisteredPlayer; public class PostAuthorizationEvent extends PostEvent { - public PostAuthorizationEvent(Consumer<TaskEvent> onComplete, LimboPlayer player, RegisteredPlayer playerInfo) { - super(onComplete, player, playerInfo); + public PostAuthorizationEvent(Consumer<TaskEvent> onComplete, LimboPlayer player, RegisteredPlayer playerInfo, String password) { + super(onComplete, player, playerInfo, password); } } diff --git a/src/main/java/net/elytrium/limboauth/event/PostEvent.java b/src/main/java/net/elytrium/limboauth/event/PostEvent.java index e3f590a..1a37fea 100644 --- a/src/main/java/net/elytrium/limboauth/event/PostEvent.java +++ b/src/main/java/net/elytrium/limboauth/event/PostEvent.java @@ -25,19 +25,22 @@ public abstract class PostEvent extends TaskEvent { private final LimboPlayer player; private final RegisteredPlayer playerInfo; + private final String password; - protected PostEvent(Consumer<TaskEvent> onComplete, LimboPlayer player, RegisteredPlayer playerInfo) { + protected PostEvent(Consumer<TaskEvent> onComplete, LimboPlayer player, RegisteredPlayer playerInfo, String password) { super(onComplete); this.player = player; this.playerInfo = playerInfo; + this.password = password; } - protected PostEvent(Consumer<TaskEvent> onComplete, Result result, LimboPlayer player, RegisteredPlayer playerInfo) { + protected PostEvent(Consumer<TaskEvent> onComplete, Result result, LimboPlayer player, RegisteredPlayer playerInfo, String password) { super(onComplete, result); this.player = player; this.playerInfo = playerInfo; + this.password = password; } public LimboPlayer getPlayer() { @@ -47,4 +50,8 @@ public abstract class PostEvent extends TaskEvent { public RegisteredPlayer getPlayerInfo() { return this.playerInfo; } + + public String getPassword() { + return this.password; + } } diff --git a/src/main/java/net/elytrium/limboauth/event/PostRegisterEvent.java b/src/main/java/net/elytrium/limboauth/event/PostRegisterEvent.java index 9c3a6d5..567f1ef 100644 --- a/src/main/java/net/elytrium/limboauth/event/PostRegisterEvent.java +++ b/src/main/java/net/elytrium/limboauth/event/PostRegisterEvent.java @@ -23,7 +23,7 @@ import net.elytrium.limboauth.model.RegisteredPlayer; public class PostRegisterEvent extends PostEvent { - public PostRegisterEvent(Consumer<TaskEvent> onComplete, LimboPlayer player, RegisteredPlayer playerInfo) { - super(onComplete, player, playerInfo); + public PostRegisterEvent(Consumer<TaskEvent> onComplete, LimboPlayer player, RegisteredPlayer playerInfo, String password) { + super(onComplete, player, playerInfo, password); } } |