mirror of
https://github.com/Artillex-Studios/AxTrade.git
synced 2025-01-07 19:17:53 +01:00
1.5.1
This commit is contained in:
parent
6a74451f7c
commit
f87014c2f3
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.artillexstudios</groupId>
|
<groupId>com.artillexstudios</groupId>
|
||||||
<artifactId>AxTrade</artifactId>
|
<artifactId>AxTrade</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.5.1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>AxTrade</name>
|
<name>AxTrade</name>
|
||||||
|
@ -109,7 +109,9 @@ public class Trade {
|
|||||||
List<String> player1Items = new ArrayList<>();
|
List<String> player1Items = new ArrayList<>();
|
||||||
player1.getTradeGui().getItems().forEach(itemStack -> {
|
player1.getTradeGui().getItems().forEach(itemStack -> {
|
||||||
if (itemStack == null) return;
|
if (itemStack == null) return;
|
||||||
|
Scheduler.get().runAt(player2.getPlayer().getLocation(), task -> {
|
||||||
ContainerUtils.INSTANCE.addOrDrop(player2.getPlayer().getInventory(), List.of(itemStack), player2.getPlayer().getLocation());
|
ContainerUtils.INSTANCE.addOrDrop(player2.getPlayer().getInventory(), List.of(itemStack), player2.getPlayer().getLocation());
|
||||||
|
});
|
||||||
final String itemName = Utils.getFormattedItemName(itemStack);
|
final String itemName = Utils.getFormattedItemName(itemStack);
|
||||||
int itemAm = itemStack.getAmount();
|
int itemAm = itemStack.getAmount();
|
||||||
player1Items.add(itemAm + "x " + itemName);
|
player1Items.add(itemAm + "x " + itemName);
|
||||||
@ -120,7 +122,9 @@ public class Trade {
|
|||||||
List<String> player2Items = new ArrayList<>();
|
List<String> player2Items = new ArrayList<>();
|
||||||
player2.getTradeGui().getItems().forEach(itemStack -> {
|
player2.getTradeGui().getItems().forEach(itemStack -> {
|
||||||
if (itemStack == null) return;
|
if (itemStack == null) return;
|
||||||
|
Scheduler.get().runAt(player1.getPlayer().getLocation(), task -> {
|
||||||
ContainerUtils.INSTANCE.addOrDrop(player1.getPlayer().getInventory(), List.of(itemStack), player1.getPlayer().getLocation());
|
ContainerUtils.INSTANCE.addOrDrop(player1.getPlayer().getInventory(), List.of(itemStack), player1.getPlayer().getLocation());
|
||||||
|
});
|
||||||
final String itemName = Utils.getFormattedItemName(itemStack);
|
final String itemName = Utils.getFormattedItemName(itemStack);
|
||||||
int itemAm = itemStack.getAmount();
|
int itemAm = itemStack.getAmount();
|
||||||
player2Items.add(itemAm + "x " + itemName);
|
player2Items.add(itemAm + "x " + itemName);
|
||||||
|
Loading…
Reference in New Issue
Block a user