Skip to content

Commit

Permalink
Merge pull request #27 from Sefiraat/fix/dumb_dumb
Browse files Browse the repository at this point in the history
Dumb
  • Loading branch information
Sefiraat authored Jul 16, 2022
2 parents 4ea81f6 + b546ea3 commit f2a8ab1
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ public void onUsePack(PlayerInteractEvent event) {
final SlimefunItem slimefunItem = SlimefunItem.getByItem(heldItem);
final Action action = event.getAction();

if (heldItem.getAmount() > 1) {
player.sendMessage(MessageFormat.format(
"{0}Packs must be unstacked before use",
ThemeType.WARNING.getColor())
);
return;
}

// Check if a dank/trash pack is in the main hand
if (slimefunItem instanceof DankPack) {
event.setCancelled(true);
if (heldItem.getAmount() > 1) {
player.sendMessage(MessageFormat.format(
"{0}Packs must be unstacked before use",
ThemeType.WARNING.getColor())
);
return;
}

final DankPack dankPack = (DankPack) slimefunItem;
final ItemMeta heldIemMeta = heldItem.getItemMeta();
Expand Down

0 comments on commit f2a8ab1

Please sign in to comment.