Skip to content

Commit d50c0c3

Browse files
committed
fix message sending
1 parent ba6046c commit d50c0c3

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -727,16 +727,17 @@ public void actionBuy(
727727
Integer.toString(shop.getLocation().getBlockX()),
728728
Integer.toString(shop.getLocation().getBlockY()),
729729
Integer.toString(shop.getLocation().getBlockZ())).forLocale();
730-
}
731-
732-
transactionMessage = new MsgUtil.TransactionMessage(msg, Util.serialize(shop.getItem()), null);
730+
transactionMessage = new MsgUtil.TransactionMessage(msg, Util.serialize(shop.getItem()), null);
733731

734-
if (plugin.getConfiguration().getBoolean("shop.sending-stock-message-to-staffs")) {
735-
for (UUID staff : shop.getModerator().getStaffs()) {
736-
MsgUtil.send(shop, staff, transactionMessage);
732+
if (plugin.getConfiguration().getBoolean("shop.sending-stock-message-to-staffs")) {
733+
for (UUID staff : shop.getModerator().getStaffs()) {
734+
MsgUtil.send(shop, staff, transactionMessage);
735+
}
737736
}
737+
MsgUtil.send(shop, shop.getOwner(), transactionMessage);
738738
}
739-
MsgUtil.send(shop, shop.getOwner(), transactionMessage);
739+
740+
740741

741742

742743
shop.buy(buyer, buyerInventory, player != null ? player.getLocation() : shop.getLocation(), amount);
@@ -1119,16 +1120,17 @@ public void actionSell(
11191120
Integer.toString(shop.getLocation().getBlockY()),
11201121
Integer.toString(shop.getLocation().getBlockZ()),
11211122
MsgUtil.convertItemStackToTranslateText(shop.getItem().getType())).forLocale();
1122-
}
1123-
1124-
transactionMessage = new MsgUtil.TransactionMessage(msg, Util.serialize(shop.getItem()), null);
1123+
transactionMessage = new MsgUtil.TransactionMessage(msg, Util.serialize(shop.getItem()), null);
11251124

1126-
MsgUtil.send(shop, shop.getOwner(), transactionMessage);
1127-
if (plugin.getConfiguration().getBoolean("shop.sending-stock-message-to-staffs")) {
1128-
for (UUID staff : shop.getModerator().getStaffs()) {
1129-
MsgUtil.send(shop, staff, transactionMessage);
1125+
MsgUtil.send(shop, shop.getOwner(), transactionMessage);
1126+
if (plugin.getConfiguration().getBoolean("shop.sending-stock-message-to-staffs")) {
1127+
for (UUID staff : shop.getModerator().getStaffs()) {
1128+
MsgUtil.send(shop, staff, transactionMessage);
1129+
}
11301130
}
11311131
}
1132+
1133+
11321134
shop.sell(seller, sellerInventory, player != null ? player.getLocation() : shop.getLocation(), amount);
11331135
sendPurchaseSuccess(seller, shop, amount);
11341136
ShopSuccessPurchaseEvent se = new ShopSuccessPurchaseEvent(shop, seller, sellerInventory, amount, total, taxModifier);

0 commit comments

Comments
 (0)