Skip to content

CommandBucket should determine argument types by method parameters #1

Description

@tyler569

I envision being able to write /tp as

@Command("tp")
void teleportLocation(Player sender, Vector3 target) {
    sender.teleport(target)
}

@Command("tp")
void teleportPlayer(Player sender, Player target) {
    sender.teleport(target.location())
}

And have CommandBucket figure everything else out - it should see they collapse to children of "tp", it should see that the Vector3 is a "minecraft:vec3", and that the Player is a "minecraft:entity" the the scoping flags to be only a single player.

It should also parse the string arguments internally, so the Command methods don't need to re-do the same parsing work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions