Skip to content

Commit 2d5a53a

Browse files
committed
Kick player if Floodgate name conflict checking fails
Rebased on Sat May 22 13:48:29 2021 +0200 Fixed typos in strings
1 parent 9a6112e commit 2d5a53a

File tree

1 file changed

+9
-4
lines changed
  • bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hook/floodgate

1 file changed

+9
-4
lines changed

bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hook/floodgate/FloodgateHook.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public FloodgateHook(FastLoginBukkit plugin) {
2121
}
2222

2323
/**
24-
* Check if the player's name conflict's an existing Java player's name, and
24+
* Check if the player's name conflicts an existing Java player's name, and
2525
* kick them if it does
2626
*
2727
* @param core the FastLoginCore
@@ -40,15 +40,20 @@ public void checkNameConflict(String username, LoginSource source, FloodgatePlay
4040
} catch (IOException | RateLimitException e) {
4141
e.printStackTrace();
4242
plugin.getLog().error(
43-
"Could not check wether Floodgate Player {}'s name conflits a premium Java player's name.",
43+
"Could not check wether Floodgate Player {}'s name conflicts a premium Java player's name.",
4444
username);
45+
try {
46+
source.kick("Could not check if your name conflicts an existing Java Premium Player's name");
47+
} catch (Exception e1) {
48+
plugin.getLog().error("Could not kick Player {}", username);
49+
}
4550
}
4651

4752
if (premiumUUID.isPresent()) {
48-
plugin.getLog().info("Bedrock Player {}'s name conflits an existing Java Premium Player's name",
53+
plugin.getLog().info("Bedrock Player {}'s name conflicts an existing Java Premium Player's name",
4954
username);
5055
try {
51-
source.kick("Your name conflits an existing Java Premium Player's name");
56+
source.kick("Your name conflicts an existing Java Premium Player's name");
5257
} catch (Exception e) {
5358
e.printStackTrace();
5459
plugin.getLog().error("Could not kick Player {}", username);

0 commit comments

Comments
 (0)