Skip to content

Commit

Permalink
okay, this time it actually compiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
leafreynolds committed Jan 31, 2022
1 parent a2898ba commit 27a284f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/java/leaf/soulhome/items/GuideItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,15 @@ public static Component getEdition()
public InteractionResultHolder<ItemStack> use(Level worldIn, Player playerIn, InteractionHand handIn)
{
ItemStack stack = playerIn.getItemInHand(handIn);

if (playerIn instanceof ServerPlayer)
if (PatchouliCompat.PatchouliIsPresent())
{
ServerPlayer player = (ServerPlayer) playerIn;
PatchouliAPI.get().openBookGUI(player, ItemsRegistry.GUIDE.getId());
if (playerIn instanceof ServerPlayer)
{
ServerPlayer player = (ServerPlayer) playerIn;
PatchouliAPI.get().openBookGUI(player, ItemsRegistry.GUIDE.getId());
}
}

return new InteractionResultHolder<>(InteractionResult.SUCCESS, stack);
}

Expand Down

0 comments on commit 27a284f

Please sign in to comment.