Skip to content

Commit

Permalink
remove braces from statements
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Aug 8, 2024
1 parent 225d715 commit c17d3da
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions shared/src/main/java/me/xginko/aef/utils/MaterialUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,16 @@ public static boolean isPlayerHead(BlockState blockState) {

@SuppressWarnings("deprecation")
public static boolean isPlayerHead(ItemStack itemStack) {
if (!PLAYER_HEADS.contains(itemStack.getType())) {
if (!PLAYER_HEADS.contains(itemStack.getType()))
return false;
}

if (PlatformUtil.getMinecraftVersion() > 12) {
if (PlatformUtil.getMinecraftVersion() > 12)
return true; // Player heads have their own Material enum post 1.12.2
}

if (!itemStack.hasItemMeta()) {
if (!itemStack.hasItemMeta())
return false;
}

if (((SkullMeta) itemStack.getItemMeta()).hasOwner()) {

if (((SkullMeta) itemStack.getItemMeta()).hasOwner())
return true;
}

if (itemStack.getItemMeta() instanceof BlockStateMeta) {
BlockStateMeta blockStateMeta = (BlockStateMeta) itemStack.getItemMeta();
Expand Down

0 comments on commit c17d3da

Please sign in to comment.