1.3.6
This commit is contained in:
parent
bd2ef8d853
commit
109845d5e4
|
@ -22,17 +22,19 @@ public class PlayerChatInputListener extends IListener {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
String string = event.getMessage();
|
String string = event.getMessage();
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
PlayerChatInput playerInput = PlayerChatInputManager.getInput(player);
|
Bukkit.getScheduler().runTask(ElementOriginLib.inst(), ()-> {
|
||||||
if (string.toLowerCase().trim().equalsIgnoreCase("取消") || string.toLowerCase().trim().equalsIgnoreCase("none") || string.toLowerCase().trim().equalsIgnoreCase("cancle")) {
|
PlayerChatInput playerInput = PlayerChatInputManager.getInput(player);
|
||||||
playerInput.cancle();
|
if (string.toLowerCase().trim().equalsIgnoreCase("取消") || string.toLowerCase().trim().equalsIgnoreCase("none") || string.toLowerCase().trim().equalsIgnoreCase("cancle")) {
|
||||||
PlayerChatInputManager.removeInput(player);
|
playerInput.cancle();
|
||||||
player.sendMessage("playerchatinput.cancle");
|
PlayerChatInputManager.removeInput(player);
|
||||||
return;
|
player.sendMessage("playerchatinput.cancle");
|
||||||
}
|
return;
|
||||||
Bukkit.getScheduler().runTask(ElementOriginLib.inst(), ()-> playerInput.call(string));
|
}
|
||||||
if (playerInput.isCall() || playerInput.isCancel()) {
|
playerInput.call(string);
|
||||||
PlayerChatInputManager.removeInput(player);
|
if (playerInput.isCall() || playerInput.isCancel()) {
|
||||||
}
|
PlayerChatInputManager.removeInput(player);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user