Skip to content

Commit

Permalink
fix: 修复FloodgatePrefixProtect名称大小写问题
Browse files Browse the repository at this point in the history
  • Loading branch information
shulng committed Aug 28, 2024
1 parent 4663245 commit 9860d07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/cc/baka9/catseedlogin/bukkit/Listeners.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public void onPlayerPreLogin(AsyncPlayerPreLoginEvent event) {
}
if (Config.Settings.FloodgatePrefixProtect && Bukkit.getPluginManager().getPlugin("floodgate") != null) {
String prefix = FloodgateApi.getInstance().getPlayerPrefix();
if (name.startsWith(prefix) && !FloodgateApi.getInstance().isFloodgatePlayer(event.getUniqueId())) {
if (name.toLowerCase().startsWith(prefix.toLowerCase()) && !FloodgateApi.getInstance().isFloodgatePlayer(event.getUniqueId())) {
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_OTHER, "非法的基岩版玩家名称,请非基岩版玩家的名称不要以" + prefix + "开头");
return;
}
Expand Down

0 comments on commit 9860d07

Please sign in to comment.