mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 08:30:59 +00:00
Prevent deprecation warns on PseudoServer and EnchantUtils
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user