Skip to content

Commit

Permalink
add new minecraft versions
Browse files Browse the repository at this point in the history
  • Loading branch information
EinfachBeez committed Jul 12, 2024
1 parent 5486cbf commit 8ed93e2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
public final class BukkitReflectionUtils {

protected static final ILogger logger = ILogger.forThisClass();
private static final ILogger logger = ILogger.forThisClass();

private BukkitReflectionUtils() {
}
Expand All @@ -34,7 +34,7 @@ public static double getAbsorptionAmount(@Nonnull Player player) {

try {
return player.getAbsorptionAmount();
} catch (Throwable ex) {
} catch (Throwable ignored) {
}

try {
Expand All @@ -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());
Expand All @@ -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()) {
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
public final class GameProfileUtils {

protected static final ILogger logger = ILogger.forThisClass();
private static final ILogger logger = ILogger.forThisClass();

private GameProfileUtils() {}

Expand Down Expand Up @@ -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 {
Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8ed93e2

Please sign in to comment.