Filtered nicknames to remove color codes
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user