diff --git a/bukkit-utils/src/main/java/net/anweisen/utilities/bukkit/utils/misc/BukkitReflectionUtils.java b/bukkit-utils/src/main/java/net/anweisen/utilities/bukkit/utils/misc/BukkitReflectionUtils.java index aea10b2..e9878a2 100644 --- a/bukkit-utils/src/main/java/net/anweisen/utilities/bukkit/utils/misc/BukkitReflectionUtils.java +++ b/bukkit-utils/src/main/java/net/anweisen/utilities/bukkit/utils/misc/BukkitReflectionUtils.java @@ -24,7 +24,7 @@ */ public final class BukkitReflectionUtils { - protected static final ILogger logger = ILogger.forThisClass(); + private static final ILogger logger = ILogger.forThisClass(); private BukkitReflectionUtils() { } @@ -34,7 +34,7 @@ public static double getAbsorptionAmount(@Nonnull Player player) { try { return player.getAbsorptionAmount(); - } catch (Throwable ex) { + } catch (Throwable ignored) { } try { @@ -47,7 +47,7 @@ public static double getAbsorptionAmount(@Nonnull Player player) { Method getAbsorptionMethod = classOfHandle.getMethod("getAbsorptionHearts"); getAbsorptionMethod.setAccessible(true); return (double) (float) getAbsorptionMethod.invoke(handle); - } catch (Throwable ex) { + } catch (Throwable ignored) { } logger.warn("Could not get absorption amount for player of class {}", classOfPlayer.getName()); @@ -57,7 +57,7 @@ public static double getAbsorptionAmount(@Nonnull Player player) { public static boolean isAir(@Nonnull Material material) { try { return material.isAir(); - } catch (Throwable ex) { + } catch (Throwable ignored) { } switch (material.name()) { @@ -74,7 +74,7 @@ public static boolean isAir(@Nonnull Material material) { public static int getMinHeight(@Nonnull World world) { try { return world.getMinHeight(); - } catch (Throwable ex) { + } catch (Throwable ignored) { } return 0; @@ -88,7 +88,7 @@ public static int getMinHeight(@Nonnull World world) { public static boolean isInWater(@Nonnull Entity entity) { try { return entity.isInWater(); - } catch (Throwable ex) { + } catch (Throwable ignored) { } return false; diff --git a/bukkit-utils/src/main/java/net/anweisen/utilities/bukkit/utils/misc/GameProfileUtils.java b/bukkit-utils/src/main/java/net/anweisen/utilities/bukkit/utils/misc/GameProfileUtils.java index 50e856c..bc7ad93 100644 --- a/bukkit-utils/src/main/java/net/anweisen/utilities/bukkit/utils/misc/GameProfileUtils.java +++ b/bukkit-utils/src/main/java/net/anweisen/utilities/bukkit/utils/misc/GameProfileUtils.java @@ -19,7 +19,7 @@ */ public final class GameProfileUtils { - protected static final ILogger logger = ILogger.forThisClass(); + private static final ILogger logger = ILogger.forThisClass(); private GameProfileUtils() {} @@ -54,7 +54,7 @@ public static void applyTextures(@Nonnull SkullMeta meta, @Nullable UUID uuid, @ setProfileMethod.setAccessible(true); setProfileMethod.invoke(meta, profile); return; - } catch (Exception ex) { + } catch (Exception ignored) { } try { @@ -67,11 +67,11 @@ public static void applyTextures(@Nonnull SkullMeta meta, @Nullable UUID uuid, @ field = classOfMeta.getDeclaredField("serializedProfile"); field.setAccessible(true); field.set(meta, profile); - } catch (Exception ex) { + } catch (Exception ignored) { } return; - } catch (Exception ex) { + } catch (Exception ignored) { } logger.warn("Unable to apply textures to item"); diff --git a/bukkit-utils/src/main/java/net/anweisen/utilities/bukkit/utils/misc/MinecraftVersion.java b/bukkit-utils/src/main/java/net/anweisen/utilities/bukkit/utils/misc/MinecraftVersion.java index cdad239..6b7a299 100644 --- a/bukkit-utils/src/main/java/net/anweisen/utilities/bukkit/utils/misc/MinecraftVersion.java +++ b/bukkit-utils/src/main/java/net/anweisen/utilities/bukkit/utils/misc/MinecraftVersion.java @@ -34,6 +34,8 @@ public enum MinecraftVersion implements Version { V1_17, // 1.17 V1_18, // 1.18 V1_19, // 1.19 + V1_20, // 1.20 + V1_21 // 1.21 ; private final int major, minor, revision;