mirror of
https://github.com/Artillex-Studios/AxTrade.git
synced 2025-01-04 18:47:51 +01:00
Fixes
This commit is contained in:
parent
2dd3038526
commit
326b7113b8
@ -16,6 +16,11 @@ public class Requests {
|
||||
private static final ArrayList<Request> requests = new ArrayList<>();
|
||||
|
||||
public static void addRequest(@NotNull Player sender, @NotNull Player receiver) {
|
||||
if (sender.isDead() || receiver.isDead()) {
|
||||
MESSAGEUTILS.sendLang(sender, "request.not-accepting", Map.of("%player%", receiver.getName()));
|
||||
return;
|
||||
}
|
||||
|
||||
if (sender.equals(receiver)) {
|
||||
MESSAGEUTILS.sendLang(sender, "request.cant-trade-self", Map.of("%player%", receiver.getName()));
|
||||
return;
|
||||
|
@ -42,6 +42,7 @@ public class TradeGui extends GuiFrame {
|
||||
|
||||
gui.setDefaultTopClickAction(event -> {
|
||||
player.cancel();
|
||||
Scheduler.get().run(scheduledTask -> trade.update());
|
||||
if (!slots.contains(event.getSlot())) {
|
||||
event.setCancelled(true);
|
||||
if (event.getCursor() == null) return;
|
||||
@ -49,7 +50,6 @@ public class TradeGui extends GuiFrame {
|
||||
event.getCursor().setAmount(0);
|
||||
return;
|
||||
}
|
||||
Scheduler.get().run(scheduledTask -> trade.update());
|
||||
});
|
||||
|
||||
gui.setDragAction(event -> {
|
||||
|
@ -38,6 +38,7 @@ request:
|
||||
already-in-trade: "&#CCFFEEThe player is already trading with someone!"
|
||||
already-sent: "&#CCFFEEYou have already sent a trade request to �FFDD%player%&#CCFFEE!"
|
||||
too-far: "&#CCFFEEYou are too far from �FFDD%player% &#CCFFEEto send a trade request!"
|
||||
not-accepting: "&#CCFFEEThis player is not accepting trades right now!"
|
||||
|
||||
# this must be 4 lines
|
||||
# note: currently the first line must be left empty
|
||||
|
Loading…
Reference in New Issue
Block a user