1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 14:05:25 +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) { public static String updateJob(String text, Job job) {
return text return text
.replaceAll("(\\[|%)jobname(\\]|%)", job.getName()) .replaceAll("(\\[|%)(?i:jobname)(\\]|%)", job.getName())
.replaceAll("(\\[|%)jobdisplayname(\\]|%)", job.getDisplayName()) .replaceAll("(\\[|%)(?i:jobdisplayname)(\\]|%)", job.getDisplayName())
.replaceAll("(\\[|%)jobfullname(\\]|%)", job.getJobFullName()); .replaceAll("(\\[|%)(?i:jobfullname)(\\]|%)", job.getJobFullName());
} }
public static void sendMessage(CommandSender sender, String key, Object... variables) { public static void sendMessage(CommandSender sender, String key, Object... variables) {