args.assertCompletelyParsed();
PlayerInventory inventory = player.get(PlayerInventory.class);
if (inventory == null) {
throw new CommandException("Player has no inventory.");
}
ItemStack i = inventory.getQuickbar().getSelectedSlot().get();
if (i == null || !(i.getMaterial() instanceof Map)) {
throw new CommandException("Held item is not a map");
}
Map m = (Map) i.getMaterial();
int bx = args.popInteger("bx");
int by = args.popInteger("by");
int tx = args.popInteger("tx");
int ty = args.popInteger("ty");
int col = args.popInteger("col");