Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support command wrapping and unwrapping #24

Open
virustotalop opened this issue Oct 18, 2020 · 0 comments
Open

Support command wrapping and unwrapping #24

virustotalop opened this issue Oct 18, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@virustotalop
Copy link
Member

CommandMap map;

Command original = map.get("test");
if(original != null) {
	map.put("test", new Command() {
		public void command(sender, command, label, args) {
			if(args.length == 0) {
				//execute registered command
			} else {
				original.command(sender, command, label, args);
			}
		}
	});
} else {
	//Just register regular command
}

If a command is wrapped on unregister it should unwrap.

@virustotalop virustotalop added the enhancement New feature or request label Oct 18, 2020
@virustotalop virustotalop self-assigned this Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant