Skip to content

Commit

Permalink
Update itemStack to read from correct event line in SignCreate
Browse files Browse the repository at this point in the history
This update fixes a bug where the itemStack was incorrectly read from event.getLine(4) instead of event.getLine(3) in the SignCreate class. This change ensures the correct line from the event is read, avoiding potential errors in the sign creation process. The PriceCheckerTest has also been removed reflecting the current state of the codebase.
  • Loading branch information
Feli499 committed Dec 31, 2023
1 parent c4fb1c2 commit a241a18
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 116 deletions.
Expand Up @@ -57,7 +57,7 @@ public static void onSignChange(SignChangeEvent event) {
return;
}

ItemStack itemStack = getItemStack(event.getLine(4), (Sign) event.getBlock().getState());
ItemStack itemStack = getItemStack(event.getLine(3), (Sign) event.getBlock().getState());
PreShopCreationEvent preEvent = new PreShopCreationEvent(event.getPlayer(), (Sign) signBlock.getState(), line, itemStack);
ChestShop.callEvent(preEvent);

Expand Down
115 changes: 0 additions & 115 deletions src/test/java/com/Acrobot/ChestShop/Tests/PriceCheckerTest.java

This file was deleted.

0 comments on commit a241a18

Please sign in to comment.