Filtered nicknames to remove color codes

This commit is contained in:
Teriuihi 2021-09-10 20:35:17 +02:00
parent 4511f3468e
commit 4e4ebce88d

View File

@ -275,7 +275,9 @@ public class Database {
statement.setString(1, uuid.toString()); statement.setString(1, uuid.toString());
ResultSet resultSet = statement.executeQuery(); ResultSet resultSet = statement.executeQuery();
if (resultSet.next()) { if (resultSet.next()) {
return resultSet.getString("player_name"); return resultSet.getString("nickname")
.replaceAll("\\{#[<>0-9a-fA-F]{6,8}}", "")
.replaceAll("[&§].", "");
} }
} catch (SQLException exception) { } catch (SQLException exception) {
exception.printStackTrace(); exception.printStackTrace();