From 338e3f92f439d507dc6fef88b3d1d055fffd607b Mon Sep 17 00:00:00 2001 From: montlikadani Date: Tue, 25 Dec 2018 13:03:16 +0100 Subject: [PATCH] Need code for switch types --- .../gamingmesh/jobs/Placeholders/Placeholder.java | 14 ++++++++------ src/main/resources/locale/messages_hu.yml | 2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/Placeholders/Placeholder.java b/src/main/java/com/gamingmesh/jobs/Placeholders/Placeholder.java index cb1b07a3..cb2136c4 100644 --- a/src/main/java/com/gamingmesh/jobs/Placeholders/Placeholder.java +++ b/src/main/java/com/gamingmesh/jobs/Placeholders/Placeholder.java @@ -51,7 +51,7 @@ public class Placeholder { user_canjoin_$1("jobname/number"); private String[] vars; - private List groups = new ArrayList(); + private List groups = new ArrayList<>(); private ChatFilterRule rule = null; private boolean hidden = false; @@ -62,7 +62,7 @@ public class Placeholder { Matcher matcher = numericalRule.getMatcher(this.toString()); if (matcher != null) { rule = new ChatFilterRule(); - List ls = new ArrayList(); + List ls = new ArrayList<>(); ls.add("(%" + pref + "_)" + this.toString().replaceAll("\\$\\d", "([^\"^%]*)") + "(%)"); // For MVdWPlaceholderAPI // ls.add("(\\{" + pref + this.toString().replaceAll("\\$\\d", "([^\"^%]*)" + "(\\})")); @@ -173,7 +173,7 @@ public class Placeholder { } public List getComplexRegexMatchers(String text) { - List lsInLs = new ArrayList(); + List lsInLs = new ArrayList<>(); if (!this.isComplex()) return lsInLs; @@ -188,7 +188,7 @@ public class Placeholder { public List getComplexValues(String text) { - List lsInLs = new ArrayList(); + List lsInLs = new ArrayList<>(); if (!this.isComplex() || text == null) return lsInLs; @@ -225,7 +225,7 @@ public class Placeholder { } public List updatePlaceHolders(Player player, List messages) { - List ms = new ArrayList(messages); + List ms = new ArrayList<>(messages); for (int i = 0, l = messages.size(); i < l; ++i) { ms.set(i, updatePlaceHolders(player, messages.get(i))); } @@ -442,7 +442,7 @@ public class Placeholder { } } - List values = new ArrayList(); + List values = new ArrayList<>(); if (placeHolder.isComplex()) { values = placeHolder.getComplexValues(value); @@ -480,6 +480,8 @@ public class Placeholder { switch (placeHolder) { case maxjobs: return String.valueOf(Jobs.getGCManager().getMaxJobs()); + default: + break; } return null; diff --git a/src/main/resources/locale/messages_hu.yml b/src/main/resources/locale/messages_hu.yml index 0be88953..bfcea860 100644 --- a/src/main/resources/locale/messages_hu.yml +++ b/src/main/resources/locale/messages_hu.yml @@ -15,6 +15,8 @@ general: mins: '&e%mins% &6perc ' secs: '&e%secs% &6másodperc ' invalidPage: '&cÉrvénytelen oldal' + true: '&2Igaz' + false: '&cHamis' admin: error: '&cHiba történt a parancsban.' success: '&eA parancs végrehajtásra került.'