mirror of
https://github.com/AppleDash/SaneEconomy.git
synced 2024-11-05 01:59:35 +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;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,14 +49,14 @@ public class SignChangeListener implements Listener {
|
|||||||
MessageUtils.sendMessage(evt.getPlayer(), "Sign shop created!");
|
MessageUtils.sendMessage(evt.getPlayer(), "Sign shop created!");
|
||||||
MessageUtils.sendMessage(evt.getPlayer(), String.format("Item: %d x %s", signShop.getQuantity(), signShop.getItem()));
|
MessageUtils.sendMessage(evt.getPlayer(), String.format("Item: %d x %s", signShop.getQuantity(), signShop.getItem()));
|
||||||
|
|
||||||
if (signShop.canBuy()) {
|
if (signShop.canBuy()) { // The player be buying from the shop, not the other way around.
|
||||||
MessageUtils.sendMessage(evt.getPlayer(), String.format("Will buy from players for %s.",
|
MessageUtils.sendMessage(evt.getPlayer(), String.format("Will sell too players for %s.",
|
||||||
plugin.getSaneEconomy().getEconomyManager().getCurrency().formatAmount(signShop.getBuyPrice())
|
plugin.getSaneEconomy().getEconomyManager().getCurrency().formatAmount(signShop.getBuyPrice())
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (signShop.canSell()) {
|
if (signShop.canSell()) { // The player be selling to the shop, not the other way around.
|
||||||
MessageUtils.sendMessage(evt.getPlayer(), String.format("Will sell to players for %s.",
|
MessageUtils.sendMessage(evt.getPlayer(), String.format("Will buy from players for %s.",
|
||||||
plugin.getSaneEconomy().getEconomyManager().getCurrency().formatAmount(signShop.getSellPrice())
|
plugin.getSaneEconomy().getEconomyManager().getCurrency().formatAmount(signShop.getSellPrice())
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user