Fix a bug in output when a shop is created.

This commit is contained in:
AppleDash 2016-10-23 14:11:31 -04:00
parent 4fc43a1f99
commit e8c2aa9d07
2 changed files with 5 additions and 5 deletions

View File

@ -40,7 +40,7 @@ public class InteractListener implements Listener {
return;
}
if (evt.getPlayer().getInventory().getItemInMainHand() != null && evt.getPlayer().getInventory().getItemInMainHand().getType() == Material.DIAMOND_AXE) {
if ((evt.getPlayer().getInventory().getItemInMainHand() != null) && (evt.getPlayer().getInventory().getItemInMainHand().getType() == Material.DIAMOND_AXE)) {
return;
}

View File

@ -49,14 +49,14 @@ public class SignChangeListener implements Listener {
MessageUtils.sendMessage(evt.getPlayer(), "Sign shop created!");
MessageUtils.sendMessage(evt.getPlayer(), String.format("Item: %d x %s", signShop.getQuantity(), signShop.getItem()));
if (signShop.canBuy()) {
MessageUtils.sendMessage(evt.getPlayer(), String.format("Will buy from players for %s.",
if (signShop.canBuy()) { // The player be buying from the shop, not the other way around.
MessageUtils.sendMessage(evt.getPlayer(), String.format("Will sell too players for %s.",
plugin.getSaneEconomy().getEconomyManager().getCurrency().formatAmount(signShop.getBuyPrice())
));
}
if (signShop.canSell()) {
MessageUtils.sendMessage(evt.getPlayer(), String.format("Will sell to players for %s.",
if (signShop.canSell()) { // The player be selling to the shop, not the other way around.
MessageUtils.sendMessage(evt.getPlayer(), String.format("Will buy from players for %s.",
plugin.getSaneEconomy().getEconomyManager().getCurrency().formatAmount(signShop.getSellPrice())
));
}