From dbc5b3edc4d05fc7ea5820bb3c0c4daa736be177 Mon Sep 17 00:00:00 2001 From: Petr Ilin Date: Sun, 25 Dec 2022 20:40:31 +0300 Subject: Password getter in PostEvent --- .../net/elytrium/limboauth/event/PostAuthorizationEvent.java | 4 ++-- src/main/java/net/elytrium/limboauth/event/PostEvent.java | 11 +++++++++-- .../java/net/elytrium/limboauth/event/PostRegisterEvent.java | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) (limited to 'src/main/java/net/elytrium/limboauth/event') 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 onComplete, LimboPlayer player, RegisteredPlayer playerInfo) { - super(onComplete, player, playerInfo); + public PostAuthorizationEvent(Consumer 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 onComplete, LimboPlayer player, RegisteredPlayer playerInfo) { + protected PostEvent(Consumer onComplete, LimboPlayer player, RegisteredPlayer playerInfo, String password) { super(onComplete); this.player = player; this.playerInfo = playerInfo; + this.password = password; } - protected PostEvent(Consumer onComplete, Result result, LimboPlayer player, RegisteredPlayer playerInfo) { + protected PostEvent(Consumer 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 onComplete, LimboPlayer player, RegisteredPlayer playerInfo) { - super(onComplete, player, playerInfo); + public PostRegisterEvent(Consumer onComplete, LimboPlayer player, RegisteredPlayer playerInfo, String password) { + super(onComplete, player, playerInfo, password); } } -- cgit