1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 05:55:27 +01:00

Better regex

This commit is contained in:
Zrips 2024-04-17 11:50:09 +03:00
parent b89b99bd10
commit 49f0accf07

View File

@ -53,9 +53,9 @@ public class Language {
public static String updateJob(String text, Job job) {
return text
.replaceAll("(\\[|%)jobname(\\]|%)", job.getName())
.replaceAll("(\\[|%)jobdisplayname(\\]|%)", job.getDisplayName())
.replaceAll("(\\[|%)jobfullname(\\]|%)", job.getJobFullName());
.replaceAll("(\\[|%)(?i:jobname)(\\]|%)", job.getName())
.replaceAll("(\\[|%)(?i:jobdisplayname)(\\]|%)", job.getDisplayName())
.replaceAll("(\\[|%)(?i:jobfullname)(\\]|%)", job.getJobFullName());
}
public static void sendMessage(CommandSender sender, String key, Object... variables) {