Skip to content

Commit

Permalink
Fix shop not buying/selling errors being the wrong way around
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoenix616 committed Jul 25, 2021
1 parent 13b727c commit d193812
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ public static void onMessage(PreTransactionEvent event) {

switch (event.getTransactionOutcome()) {
case SHOP_DOES_NOT_BUY_THIS_ITEM:
message = Messages.NO_BUYING_HERE;
message = Messages.NO_SELLING_HERE;
break;
case SHOP_DOES_NOT_SELL_THIS_ITEM:
message = Messages.NO_SELLING_HERE;
message = Messages.NO_BUYING_HERE;
break;
case CLIENT_DOES_NOT_HAVE_PERMISSION:
message = Messages.NO_PERMISSION;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public static void onPriceCheck(PreTransactionEvent event) {

if (price.equals(NO_PRICE)) {
if (transactionType == BUY) {
event.setCancelled(SHOP_DOES_NOT_BUY_THIS_ITEM);
} else {
event.setCancelled(SHOP_DOES_NOT_SELL_THIS_ITEM);
} else {
event.setCancelled(SHOP_DOES_NOT_BUY_THIS_ITEM);
}
}
}
Expand Down

0 comments on commit d193812

Please sign in to comment.