8000 Command works, Unexpected Error Appeared · Issue #503 · CommandAPI/CommandAPI · GitHub
[go: up one dir, main page]

Skip to content
Command works, Unexpected Error Appeared #503
Open
@ImNotStable

Description

@ImNotStable

CommandAPI version

9.20

Minecraft version

1.20.1

Are you shading the CommandAPI?

Yes

What I did

  • I added all the prerequisites for CommandAPI & everything is working besides receiving an unexpected error.
  • I joined, then ran the command.
  • An error appeared, but the command worked.

What actually happened

The command worked as it should. All that happened was an error appeared in the console.

What should have happened

No error

Server logs and CommandAPI config

[22:07:01 ERROR]: Caught previously unhandled exception :
[22:07:01 ERROR]: Caught previously unhandled exception :
[22:07:01 ERROR]: Paper Async Command Builder Thread Pool - 1
java.util.ConcurrentModificationException: null
        at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1486) ~[?:?]
        at java.util.TreeMap$ValueIterator.next(TreeMap.java:1531) ~[?:?]
        at net.minecraft.commands.Commands.fillUsableCommands(Commands.java:483) ~[?:?]
        at net.minecraft.commands.Commands.sendAsync(Commands.java:443) ~[?:?]
        at net.minecraft.commands.Commands.lambda$sendCommands$5(Commands.java:422) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[22:07:01 ERROR]: Paper Async Command Builder Thread Pool - 0
java.util.ConcurrentModificationException: null
        at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1486) ~[?:?]
        at java.util.TreeMap$ValueIterator.next(TreeMap.java:1531) ~[?:?]
        at net.minecraft.commands.Commands.fillUsableCommands(Commands.java:483) ~[?:?]
        at net.minecraft.commands.Commands.sendAsync(Commands.java:443) ~[?:?]
        at net.minecraft.commands.Commands.lambda$sendCommands$5(Commands.java:422) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[22:07:01 ERROR]: Caught previously unhandled exception :
[22:07:01 ERROR]: Paper Async Command Builder Thread Pool - 2
java.util.ConcurrentModificationException: null
        at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1486) ~[?:?]
        at java.util.TreeMap$ValueIterator.next(TreeMap.java:1531) ~[?:?]
        at net.minecraft.commands.Commands.fillUsableCommands(Commands.java:483) ~[?:?]
        at net.minecraft.commands.Commands.sendAsync(Commands.java:443) ~[?:?]
        at net.minecraft.commands.Commands.lambda$sendCommands$5(Commands.java:422) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[22:07:01 ERROR]: Caught previously unhandled exception :
[22:07:01 ERROR]: Paper Async Command Builder Thread Pool - 3
java.util.ConcurrentModificationException: null
        at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1486) ~[?:?]
        at java.util.TreeMap$ValueIterator.next(TreeMap.java:1531) ~[?:?]
        at net.minecraft.commands.Commands.fillUsableCommands(Commands.java:483) ~[?:?]
        at net.minecraft.commands.Commands.sendAsync(Commands.java:443) ~[?:?]
        at net.m
81E8
inecraft.commands.Commands.lambda$sendCommands$5(Commands.java:422) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[22:07:01 ERROR]: Caught previously unhandled exception :
[22:07:01 ERROR]: Paper Async Command Builder Thread Pool - 4
java.util.ConcurrentModificationException: null
        at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1486) ~[?:?]
        at java.util.TreeMap$ValueIterator.next(TreeMap.java:1531) ~[?:?]
        at net.minecraft.commands.Commands.fillUsableCommands(Commands.java:483) ~[?:?]
        at net.minecraft.commands.Commands.sendAsync(Commands.java:443) ~[?:?]
        at net.minecraft.commands.Commands.lambda$sendCommands$5(Commands.java:422) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Other

    new CommandTree("qualityeconomy")
      .withAliases("qe")
      .withPermission("qualityeconomy.admin")
      .then(new LiteralArgument("reload")
        .executes((sender, args) -> {
          reload();
          sender.sendMessage(Component.text("Reloading QualityEconomy...", NamedTextColor.GRAY));
        })
        .then(new LiteralArgument("messages")
          .executes((sender, args) -> {
            Messages.loadMessages();
            sender.sendMessage(Component.text("Reloading QualityEconomy messages.yml...", NamedTextColor.GRAY));
          }))
        .then(new LiteralArgument("configuration")
          .executes((sender, args) -> {
            Configuration.loadConfiguration();
            sender.sendMessage(Component.text("Reloading QualityEconomy config.yml...", NamedTextColor.GRAY));
          })))
      .then(new LiteralArgument("database")
        .then(new LiteralArgument("import")
          .then(new GreedyStringArgument("fileName")
            .includeSuggestions(ArgumentSuggestions.strings(getImportableFiles()))
            .executes((sender, args) -> {
              sender.sendMessage(Component.text("Importing Database...", NamedTextColor.GRAY));
              StorageManager.importDatabase(args.get("fileName").toString());
              sender.sendMessage(Component.text("Imported Database", NamedTextColor.GREEN));
            })))
        .then(new LiteralArgument("export")
          .executes((sender, args) -> {
            sender.sendMessage(Component.text("Exporting Database...", NamedTextColor.GRAY));
            StorageManager.exportDatabase("plugins/QualityEconomy/");
            sender.sendMessage(Component.text("Exported Database", NamedTextColor.GREEN));
          }))
        .then(new LiteralArgument("createFakeEntries")
          .withRequirement(sender -> TestToolkit.DEBUG_MODE)
          .then(new IntegerArgument("entries", 1, 9999)
            .executes((sender, args) -> {
              try {
                int entries = (int) args.get("entries");
                AccountManager.createFakeAccounts(entries != 0 ? entries : 10);
              } catch (NumberFormatException ignored) {
                sender.sendMessage(Component.text("Invalid amount.", NamedTextColor.RED));
              }
            }))))
      .register();

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0