From b4c52835e6fe64b332a0384db55c0e8440464b77 Mon Sep 17 00:00:00 2001 From: Zrips Date: Tue, 1 Dec 2020 14:23:43 +0200 Subject: [PATCH] Lets keep it compatible with java 8 --- .../com/gamingmesh/jobs/api/JobsLevelUpEvent.java | 12 ++++++------ .../jobs/stuff/FurnaceBrewingHandling.java | 2 +- src/main/java/com/gamingmesh/jobs/stuff/Util.java | 8 ++++++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/api/JobsLevelUpEvent.java b/src/main/java/com/gamingmesh/jobs/api/JobsLevelUpEvent.java index 411aa542..928ebbdd 100644 --- a/src/main/java/com/gamingmesh/jobs/api/JobsLevelUpEvent.java +++ b/src/main/java/com/gamingmesh/jobs/api/JobsLevelUpEvent.java @@ -76,7 +76,7 @@ public final class JobsLevelUpEvent extends BaseEvent implements Cancellable { /** * @deprecated use {@link #getOldTitle()} */ - @Deprecated(forRemoval = true) + @Deprecated public String getOldTitleName() { return oldTitle.getName(); } @@ -84,7 +84,7 @@ public final class JobsLevelUpEvent extends BaseEvent implements Cancellable { /** * @deprecated use {@link #getOldTitle()} */ - @Deprecated(forRemoval = true) + @Deprecated public String getOldTitleShort() { return oldTitle.getShortName(); } @@ -92,7 +92,7 @@ public final class JobsLevelUpEvent extends BaseEvent implements Cancellable { /** * @deprecated use {@link #getOldTitle()} */ - @Deprecated(forRemoval = true) + @Deprecated public String getOldTitleColor() { return oldTitle.getChatColor().toString(); } @@ -109,7 +109,7 @@ public final class JobsLevelUpEvent extends BaseEvent implements Cancellable { /** * @deprecated use {@link #getNewTitle()} */ - @Deprecated(forRemoval = true) + @Deprecated public String getNewTitleName() { return newTitle.getName(); } @@ -117,7 +117,7 @@ public final class JobsLevelUpEvent extends BaseEvent implements Cancellable { /** * @deprecated use {@link #getNewTitle()} */ - @Deprecated(forRemoval = true) + @Deprecated public String getNewTitleShort() { return newTitle.getShortName(); } @@ -125,7 +125,7 @@ public final class JobsLevelUpEvent extends BaseEvent implements Cancellable { /** * @deprecated use {@link #getNewTitle()} */ - @Deprecated(forRemoval = true) + @Deprecated public String getNewTitleColor() { return newTitle.getChatColor().toString(); } diff --git a/src/main/java/com/gamingmesh/jobs/stuff/FurnaceBrewingHandling.java b/src/main/java/com/gamingmesh/jobs/stuff/FurnaceBrewingHandling.java index e7e779ac..2e755a92 100644 --- a/src/main/java/com/gamingmesh/jobs/stuff/FurnaceBrewingHandling.java +++ b/src/main/java/com/gamingmesh/jobs/stuff/FurnaceBrewingHandling.java @@ -25,7 +25,7 @@ import com.gamingmesh.jobs.listeners.JobsPaymentListener; * marked as "removeable". In the future this class will get removed * and not used anymore by anyone. Instead use {@link Jobs#getBlockOwnerShips()} */ -@Deprecated(forRemoval = true) +@Deprecated public class FurnaceBrewingHandling { static HashMap> furnaceMap = new HashMap<>(); diff --git a/src/main/java/com/gamingmesh/jobs/stuff/Util.java b/src/main/java/com/gamingmesh/jobs/stuff/Util.java index a8e4d039..2c07381c 100644 --- a/src/main/java/com/gamingmesh/jobs/stuff/Util.java +++ b/src/main/java/com/gamingmesh/jobs/stuff/Util.java @@ -9,6 +9,7 @@ import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.util.ListIterator; import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.UUID; @@ -52,6 +53,13 @@ public class Util { return item; } + public static void toLowerCase(List strings) { + ListIterator iterator = strings.listIterator(); + while (iterator.hasNext()) { + iterator.set(iterator.next().toLowerCase()); + } + } + public static World getWorld(String name) { World w = Bukkit.getWorld(name); if (w != null)