Skip to content

minecraft:reload break my own vanilla commands #631

@FastJoe0

Description

@FastJoe0

CommandAPI version

9.7.0

Minecraft version

1.21.4

Are you shading the CommandAPI?

Yes

What I did

@Override
public void onLoad() {
    CommandAPI.onLoad(new CommandAPIBukkitConfig(this)
        .shouldHookPaperReload(true)
        .skipReloadDatapacks(true)
        .verboseOutput(true)
    );
    CommandAPI.unregister("tp", true);
    CommandAPI.unregister("teleport", true)
}

@Override
public void onEnable() {
    CommandAPI.onEnable();

    new CommandTp(this).registerTpCommand();

}

What actually happened

After loading my plugin, another plugin (TreasureMapsPlus) at the end of loading the server executes the minecraft:reload command which break my minecraft vanilla command (/tp).

You don't even need the TreasureMapsPlus plugin to reproduce this bug. Just execute minecraft:reload on a running server. All minecraft vanilla commands that we have created based on already existing ones in vanilla will be broken.

minecraft:reload
[23:49:47 INFO]: Reloading!
[23:49:48 INFO]: Loaded 1370 recipes
[23:49:48 INFO]: Loaded 1481 advancements
[23:49:48 INFO]: [CommandAPI] /minecraft:reload detected. Reloading CommandAPI commands!
[23:49:48 INFO]: [CommandAPI] Reloading datapacks...
[23:49:48 INFO]: Loaded 1370 recipes
[23:49:48 INFO]: Loaded 1481 advancements
[23:49:48 INFO]: [CommandAPI] Finished reloading datapacks

What should have happened

minecraft:reload should reload the modified vanilla commands.

Server logs and CommandAPI config

CommandAPI config:

shouldHookPaperReload(true)
skipReloadDatapacks(true)
.verboseOutput(true)

Server logs:
https://hastebin.com/share/pupedonijo.markdown

Other

feb3188

Metadata

Metadata

Assignees

No one assigned

    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