Prevent deprecation warns on PseudoServer and EnchantUtils

This commit is contained in:
Alexander
2021-05-27 15:11:00 +01:00
parent f6afcf5153
commit c8acee9102
2 changed files with 3 additions and 2 deletions

View File

@@ -68,6 +68,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@SuppressWarnings("deprecation")
public class PseudoServer implements Server {
public static final PseudoServer INSTANCE = new PseudoServer();

View File

@@ -135,6 +135,7 @@ public final class EnchantUtils {
* @param value The value to search for a matching enchantment by.
* @return Returns a matched enchantment or null.
*/
@SuppressWarnings("deprecation")
public static Enchantment getEnchantment(final String value) {
if (Strings.isNullOrEmpty(value)) {
return null;
@@ -143,8 +144,7 @@ public final class EnchantUtils {
if (enchantment != null) {
return enchantment;
}
//noinspection deprecation
enchantment = Enchantment.getByName(value.toUpperCase());
enchantment = Enchantment.getByName(value.toUpperCase()); // deprecated
if (enchantment != null) {
return enchantment;
}