From fb8780d0067864447bdb5c8b1e09ac63b7a7b649 Mon Sep 17 00:00:00 2001 From: Smart123s <28480228+Smart123s@users.noreply.github.com> Date: Sat, 22 May 2021 21:04:35 +0200 Subject: [PATCH] Prevent duplicate name check API call Previously: If allowFloodgateNameConflict = false or linked and either autoLoginFloodgate or autoRegisterFloodgate is set to no-conflict and a player with a non-conflicting name connects then there will be a double check. --- .../games647/fastlogin/bukkit/task/FloodgateAuthTask.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/task/FloodgateAuthTask.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/task/FloodgateAuthTask.java index 2592b064..29002568 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/task/FloodgateAuthTask.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/task/FloodgateAuthTask.java @@ -76,7 +76,10 @@ public class FloodgateAuthTask implements Runnable { } //decide if checks should be made for conflicting Java player names - if (!isLinked && + if (!isLinked //linked players have the same name as their Java profile + // if allowNameConflict is 'false' or 'linked' and the player had a conflicting + // name, than they would have been kicked in FloodgateHook#checkNameConflict + && allowNameConflict.equals("true") && ( autoLoginFloodgate.equals("no-conflict") || !isRegistered && autoRegisterFloodgate.equals("no-conflict"))