mirror of
https://github.com/AppleDash/SaneEconomy.git
synced 2024-11-04 17:49:40 +01:00
Fix a bug in output when a shop is created.
This commit is contained in:
parent
4fc43a1f99
commit
e8c2aa9d07
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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())
|
||||
));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user