Skip to content

Commit

Permalink
[Floodgate hook] Remove warning when floodgate is not configured corr…
Browse files Browse the repository at this point in the history
…ectly
  • Loading branch information
NEZNAMY committed Mar 1, 2025
1 parent 1e40cae commit ee47428
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions shared/src/main/java/me/neznamy/tab/shared/hook/FloodgateHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import lombok.Getter;
import me.neznamy.tab.shared.TAB;
import me.neznamy.chat.component.SimpleTextComponent;
import me.neznamy.tab.shared.util.ReflectionUtils;
import org.geysermc.floodgate.api.FloodgateApi;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -39,18 +38,6 @@ public boolean isFloodgatePlayer(@NotNull UUID uniqueId, @NotNull String name) {
}
boolean bedrock = FloodgateApi.getInstance().isFloodgatePlayer(uniqueId);
TAB.getInstance().debug("Floodgate returned bedrock status " + String.valueOf(bedrock).toUpperCase() + " for player " + name);
char firstCharacter = name.charAt(0);
boolean validFirstChar = (firstCharacter >= 'A' && firstCharacter <= 'Z') ||
(firstCharacter >= 'a' && firstCharacter <= 'z') ||
(firstCharacter >= '0' && firstCharacter <= '9') ||
(firstCharacter == '_');
if (!bedrock && !validFirstChar) {
TAB.getInstance().getPlatform().logWarn(new SimpleTextComponent("Floodgate returned bedrock status FALSE " +
"for player " + name + ", however, this player appears to be a bedrock player. This means " +
"floodgate is not configured correctly, usually because it is also installed on proxy, but not " +
"linked properly. See proxy setup on floodgate wiki for more details. This may result in visual issues for the player."));
}

return bedrock;
}
}

0 comments on commit ee47428

Please sign in to comment.