Fix shop not buying/selling errors being the wrong way around

This commit is contained in:
Phoenix616 2021-07-25 22:30:18 +01:00
parent 13b727c779
commit d193812392
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0
2 changed files with 4 additions and 4 deletions

View File

@ -52,10 +52,10 @@ public class ErrorMessageSender implements Listener {
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;

View File

@ -28,9 +28,9 @@ public class PriceValidator implements Listener {
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);
}
}
}