Disable moneyback message in `/as info` if sellDisabled is true

This commit is contained in:
Thijs Wiefferink 2018-05-26 01:33:23 +02:00
parent 012920a51c
commit f713edc5b5
1 changed files with 6 additions and 4 deletions

View File

@ -361,10 +361,12 @@ public class InfoCommand extends CommandAreaShop {
plugin.messageNoPrefix(sender, "info-regionBought", buy);
}
// Money back
if(SellCommand.canUse(sender, buy)) {
plugin.messageNoPrefix(sender, "info-regionMoneyBackBuyClick", buy);
} else {
plugin.messageNoPrefix(sender, "info-regionMoneyBackBuy", buy);
if(!buy.getBooleanSetting("buy.sellDisabled")) {
if (SellCommand.canUse(sender, buy)) {
plugin.messageNoPrefix(sender, "info-regionMoneyBackBuyClick", buy);
} else {
plugin.messageNoPrefix(sender, "info-regionMoneyBackBuy", buy);
}
}
// Friends
if(!buy.getFriendsFeature().getFriendNames().isEmpty()) {