mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 01:49:49 -05:00
fix create command and it tab completer, ignore target direcotry
Former-commit-id: 98efa1a6bfbf6bc7f9e3cceb9ace011800a62a54 [formerly c85f8f3bd47ff45df4fe9189f0ec71010baf4c5b] Former-commit-id: 23c3ec90cfb0a414cb901e54b011870597edf83c
This commit is contained in:
1 parent
ef9817a858
commit
d0a5ab8ade
2 files changed
+13
-6
No files matched your search
@@ -26,7 +26,7 @@ public class SubCommand_Create implements CommandProcesser {
|
||||
@Override
|
||||
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
list.add(MsgUtil.getMessage("tabcomplete.amount", sender));
|
||||
list.add(MsgUtil.getMessage("tabcomplete.price", sender));
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -72,12 +72,18 @@ public class SubCommand_Create implements CommandProcesser {
|
||||
return;
|
||||
}
|
||||
|
||||
// Send creation menu.
|
||||
plugin.getShopManager().getActions().put(
|
||||
p.getUniqueId(),
|
||||
new Info(
|
||||
b.getLocation(),
|
||||
ShopAction.CREATE,
|
||||
p.getInventory().getItemInMainHand(),
|
||||
b.getRelative(p.getFacing().getOppositeFace())
|
||||
)
|
||||
);
|
||||
|
||||
if (cmdArg.length < 1) {
|
||||
// Send creation menu.
|
||||
Info info = new Info(b.getLocation(), ShopAction.CREATE,
|
||||
p.getInventory().getItemInMainHand(),
|
||||
b.getRelative(p.getFacing().getOppositeFace()));
|
||||
plugin.getShopManager().getActions().put(p.getUniqueId(), info);
|
||||
p.sendMessage(
|
||||
MsgUtil.getMessage("how-much-to-trade-for", sender, Util.getItemStackName(item)));
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user