From 49f0accf078f747c629a7b9eff05ea83cdf357ca Mon Sep 17 00:00:00 2001 From: Zrips Date: Wed, 17 Apr 2024 11:50:09 +0300 Subject: [PATCH] Better regex --- src/main/java/com/gamingmesh/jobs/i18n/Language.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/i18n/Language.java b/src/main/java/com/gamingmesh/jobs/i18n/Language.java index 1cd66829..964e5b66 100644 --- a/src/main/java/com/gamingmesh/jobs/i18n/Language.java +++ b/src/main/java/com/gamingmesh/jobs/i18n/Language.java @@ -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) {