1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 22:13:25 +01:00

Lets keep it compatible with java 8

This commit is contained in:
Zrips 2020-12-01 14:23:43 +02:00
parent 073192c3b0
commit b4c52835e6
3 changed files with 15 additions and 7 deletions

View File

@ -76,7 +76,7 @@ public final class JobsLevelUpEvent extends BaseEvent implements Cancellable {
/** /**
* @deprecated use {@link #getOldTitle()} * @deprecated use {@link #getOldTitle()}
*/ */
@Deprecated(forRemoval = true) @Deprecated
public String getOldTitleName() { public String getOldTitleName() {
return oldTitle.getName(); return oldTitle.getName();
} }
@ -84,7 +84,7 @@ public final class JobsLevelUpEvent extends BaseEvent implements Cancellable {
/** /**
* @deprecated use {@link #getOldTitle()} * @deprecated use {@link #getOldTitle()}
*/ */
@Deprecated(forRemoval = true) @Deprecated
public String getOldTitleShort() { public String getOldTitleShort() {
return oldTitle.getShortName(); return oldTitle.getShortName();
} }
@ -92,7 +92,7 @@ public final class JobsLevelUpEvent extends BaseEvent implements Cancellable {
/** /**
* @deprecated use {@link #getOldTitle()} * @deprecated use {@link #getOldTitle()}
*/ */
@Deprecated(forRemoval = true) @Deprecated
public String getOldTitleColor() { public String getOldTitleColor() {
return oldTitle.getChatColor().toString(); return oldTitle.getChatColor().toString();
} }
@ -109,7 +109,7 @@ public final class JobsLevelUpEvent extends BaseEvent implements Cancellable {
/** /**
* @deprecated use {@link #getNewTitle()} * @deprecated use {@link #getNewTitle()}
*/ */
@Deprecated(forRemoval = true) @Deprecated
public String getNewTitleName() { public String getNewTitleName() {
return newTitle.getName(); return newTitle.getName();
} }
@ -117,7 +117,7 @@ public final class JobsLevelUpEvent extends BaseEvent implements Cancellable {
/** /**
* @deprecated use {@link #getNewTitle()} * @deprecated use {@link #getNewTitle()}
*/ */
@Deprecated(forRemoval = true) @Deprecated
public String getNewTitleShort() { public String getNewTitleShort() {
return newTitle.getShortName(); return newTitle.getShortName();
} }
@ -125,7 +125,7 @@ public final class JobsLevelUpEvent extends BaseEvent implements Cancellable {
/** /**
* @deprecated use {@link #getNewTitle()} * @deprecated use {@link #getNewTitle()}
*/ */
@Deprecated(forRemoval = true) @Deprecated
public String getNewTitleColor() { public String getNewTitleColor() {
return newTitle.getChatColor().toString(); return newTitle.getChatColor().toString();
} }

View File

@ -25,7 +25,7 @@ import com.gamingmesh.jobs.listeners.JobsPaymentListener;
* marked as "removeable". In the future this class will get removed * marked as "removeable". In the future this class will get removed
* and not used anymore by anyone. Instead use {@link Jobs#getBlockOwnerShips()} * and not used anymore by anyone. Instead use {@link Jobs#getBlockOwnerShips()}
*/ */
@Deprecated(forRemoval = true) @Deprecated
public class FurnaceBrewingHandling { public class FurnaceBrewingHandling {
static HashMap<UUID, List<blockLoc>> furnaceMap = new HashMap<>(); static HashMap<UUID, List<blockLoc>> furnaceMap = new HashMap<>();

View File

@ -9,6 +9,7 @@ import java.util.Enumeration;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.ListIterator;
import java.util.jar.JarEntry; import java.util.jar.JarEntry;
import java.util.jar.JarFile; import java.util.jar.JarFile;
import java.util.UUID; import java.util.UUID;
@ -52,6 +53,13 @@ public class Util {
return item; return item;
} }
public static void toLowerCase(List<String> strings) {
ListIterator<String> iterator = strings.listIterator();
while (iterator.hasNext()) {
iterator.set(iterator.next().toLowerCase());
}
}
public static World getWorld(String name) { public static World getWorld(String name) {
World w = Bukkit.getWorld(name); World w = Bukkit.getWorld(name);
if (w != null) if (w != null)